code stringlengths 5 1.01M | repo_name stringlengths 5 84 | path stringlengths 4 311 | language stringclasses 30
values | license stringclasses 15
values | size int64 5 1.01M | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|
/*
* Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved.
*
* The Apache Software License, Version 1.1
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Caucho Technology (http://www.caucho.com/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "Burlap", "Resin", and "Caucho" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* info@caucho.com.
*
* 5. Products derived from this software may not be called "Resin"
* nor may "Resin" appear in their names without prior written
* permission of Caucho Technology.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Scott Ferguson
*/
package com.caucho.hessian4.client;
import java.net.URL;
import java.net.URLConnection;
import java.net.HttpURLConnection;
import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.FileNotFoundException;
/**
* Internal connection to a server. The default connection is based on
* java.net
*/
public class HessianURLConnection extends AbstractHessianConnection {
private URL _url;
private URLConnection _conn;
private int _statusCode;
private String _statusMessage;
private InputStream _inputStream;
private InputStream _errorStream;
HessianURLConnection(URL url, URLConnection conn)
{
_url = url;
_conn = conn;
}
/**
* Adds a HTTP header.
*/
@Override
public void addHeader(String key, String value)
{
_conn.setRequestProperty(key, value);
}
/**
* Returns the output stream for the request.
*/
public OutputStream getOutputStream()
throws IOException
{
return _conn.getOutputStream();
}
/**
* Sends the request
*/
public void sendRequest()
throws IOException
{
if (_conn instanceof HttpURLConnection) {
HttpURLConnection httpConn = (HttpURLConnection) _conn;
_statusCode = 500;
try {
_statusCode = httpConn.getResponseCode();
} catch (Exception e) {
}
parseResponseHeaders(httpConn);
InputStream is = null;
if (_statusCode != 200) {
StringBuffer sb = new StringBuffer();
int ch;
try {
is = httpConn.getInputStream();
if (is != null) {
while ((ch = is.read()) >= 0)
sb.append((char) ch);
is.close();
}
is = httpConn.getErrorStream();
if (is != null) {
while ((ch = is.read()) >= 0)
sb.append((char) ch);
}
_statusMessage = sb.toString();
} catch (FileNotFoundException e) {
throw new HessianConnectionException("HessianProxy cannot connect to '" + _url, e);
} catch (IOException e) {
if (is == null)
throw new HessianConnectionException(_statusCode + ": " + e, e);
else
throw new HessianConnectionException(_statusCode + ": " + sb, e);
}
if (is != null)
is.close();
throw new HessianConnectionException(_statusCode + ": " + sb.toString());
}
}
}
protected void parseResponseHeaders(HttpURLConnection conn)
throws IOException
{
}
/**
* Returns the status code.
*/
public int getStatusCode()
{
return _statusCode;
}
/**
* Returns the status string.
*/
public String getStatusMessage()
{
return _statusMessage;
}
/**
* Returns the InputStream to the result
*/
@Override
public InputStream getInputStream()
throws IOException
{
return _conn.getInputStream();
}
@Override
public String getContentEncoding()
{
return _conn.getContentEncoding();
}
/**
* Close/free the connection
*/
@Override
public void close()
{
_inputStream = null;
}
/**
* Disconnect the connection
*/
@Override
public void destroy()
{
close();
URLConnection conn = _conn;
_conn = null;
if (conn instanceof HttpURLConnection)
((HttpURLConnection) conn).disconnect();
}
}
| xien777/yajsw | yajsw/hessian4/src/main/java/com/caucho/hessian4/client/HessianURLConnection.java | Java | lgpl-2.1 | 5,695 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2541,
1011,
2432,
6187,
10875,
2080,
2974,
1010,
4297,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
1996,
15895,
4007,
6105,
1010,
2544,
1015,
1012,
1015,
1008,
1008,
25707,
1998,
2224,
1999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="af_ZA" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Gamecash</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>Gamecash</b> version</source>
<translation><b>Gamecash</b> weergawe</translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The Gamecash developers</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Adres Boek</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Dubbel-klik om die adres of etiket te wysig</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Skep 'n nuwe adres</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Maak 'n kopie van die huidige adres na die stelsel klipbord</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Gamecash addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Gamecash address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Teken &Boodskap</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Gamecash address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Verwyder</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Gamecash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Stuur &Muntstukke</translation>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Voer die Adresboek Data Uit</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Fout uitvoering</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Kon nie na die %1 lêer skryf nie</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etiket</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(geen etiket)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Tik Wagwoord in</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Nuwe wagwoord</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Herhaal nuwe wagwoord</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Tik die nuwe wagwoord vir die beursie in.<br/>Gebruik asseblief 'n wagwoord van <b>ten minste 10 ewekansige karakters</b>, of <b>agt (8) of meer woorde.</b></translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Enkripteer beursie</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Sluit beursie oop</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Sluit beursie oop</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Verander wagwoord</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Tik asseblief die ou en nuwe wagwoord vir die beursie in.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Bevestig beursie enkripsie.</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR LITECOINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Die beursie is nou bewaak</translation>
</message>
<message>
<location line="-56"/>
<source>Gamecash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your gamecashs from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Die beursie kon nie bewaak word nie</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Beursie bewaaking het misluk as gevolg van 'n interne fout. Die beursie is nie bewaak nie!</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Die wagwoord stem nie ooreen nie</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Beursie oopsluiting het misluk</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Die wagwoord wat ingetik was om die beursie oop te sluit, was verkeerd.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Beursie dekripsie het misluk</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Sinchroniseer met die netwerk ...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Oorsig</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Wys algemene oorsig van die beursie</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Transaksies</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Besoek transaksie geskiedenis</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Wysig die lys van gestoorde adresse en etikette</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Wys die lys van adresse vir die ontvangs van betalings</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>S&luit af</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Sluit af</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Gamecash</source>
<translation>Wys inligting oor Gamecash</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opsies</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Gamecash address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Gamecash</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Gamecash</source>
<translation>Gamecash</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Beursie</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About Gamecash</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Gamecash addresses to prove you own them</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Gamecash addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Lêer</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Instellings</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&Hulp</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Blad nutsbalk</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Gamecash client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Gamecash network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation>%1 agter</translation>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation>Ontvangs van laaste blok is %1 terug.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation>Fout</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Informasie</translation>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Gamecash address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Gamecash can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Gamecash address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Gamecash-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Gebruik:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start Gamecash after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start Gamecash on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Gamecash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the Gamecash network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Gamecash.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show Gamecash addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Gamecash.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Gamecash network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Beursie</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start gamecash: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the Gamecash-Qt help message to get a list with possible Gamecash command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>Gamecash - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Gamecash Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the Gamecash debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Gamecash RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>S&tuur</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>Die adres waarheen die betaling gestuur moet word (b.v. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Gamecash address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>&Teken boodskap</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation>Handtekening</translation>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Gamecash address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Teken &Boodskap</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Gamecash address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Gamecash address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter Gamecash signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Gamecash developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Van</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Na</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>eie adres</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>etiket</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Krediet</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>nie aanvaar nie</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Debiet</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Transaksie fooi</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Netto bedrag</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Boodskap</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Transaksie ID</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Bedrag</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>waar</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>onwaar</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Tipe</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Bedrag</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Ontvang met</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Gestuur na</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Gemyn</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(n.v.t)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Datum en tyd wat die transaksie ontvang was.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Tipe transaksie.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Alles</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Vandag</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Hierdie week</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Hierdie maand</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Verlede maand</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Hierdie jaar</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Ontvang met</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Gestuur na</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Aan/na jouself</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Gemyn</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Ander</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Min bedrag</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Maak kopie van adres</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Tipe</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etiket</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Bedrag</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Fout uitvoering</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Kon nie na die %1 lêer skryf nie</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Gamecash version</source>
<translation>Gamecash weergawe</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Gebruik:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or gamecashd</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: gamecash.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: gamecashd.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 9333 or testnet: 19333)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=gamecashrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Gamecash Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Gamecash is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Gamecash will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation>Fout: Hardeskyf spasie is baie laag!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation>Informasie</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Gamecash Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation>Sisteem fout:</translation>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Laai adresse...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Gamecash</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Gamecash to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Laai blok indeks...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Gamecash is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Laai beursie...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Klaar gelaai</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Fout</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS>
| gamecashofficial/gamecash | src/qt/locale/bitcoin_af_ZA.ts | TypeScript | mit | 98,214 | [
30522,
1026,
1029,
20950,
30524,
2653,
1027,
1000,
21358,
1035,
23564,
1000,
2544,
1027,
1000,
1016,
1012,
1014,
1000,
1028,
1026,
12398,
16044,
2278,
1028,
21183,
2546,
1011,
1022,
1026,
1013,
12398,
16044,
2278,
1028,
1026,
6123,
1028,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ArticleComment'
db.create_table('cms_articlecomment', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('article', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Article'])),
('created_at', self.gf('django.db.models.fields.DateField')(auto_now_add=True, blank=True)),
('author', self.gf('django.db.models.fields.CharField')(max_length=60)),
('comment', self.gf('django.db.models.fields.TextField')()),
))
db.send_create_signal('cms', ['ArticleComment'])
def backwards(self, orm):
# Deleting model 'ArticleComment'
db.delete_table('cms_articlecomment')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'cms.article': {
'Meta': {'ordering': "['title']", 'object_name': 'Article'},
'allow_comments': ('django.db.models.fields.CharField', [], {'default': "'N'", 'max_length': '1'}),
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
'content': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'conversions': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_at': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime.now'}),
'header': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'keywords': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'sections': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['cms.Section']", 'null': 'True', 'through': "orm['cms.SectionItem']", 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '250', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'updated_at': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}),
'views': ('django.db.models.fields.IntegerField', [], {'default': '0'})
},
'cms.articlearchive': {
'Meta': {'ordering': "('updated_at',)", 'object_name': 'ArticleArchive'},
'article': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Article']"}),
'content': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
},
'cms.articlecomment': {
'Meta': {'ordering': "('created_at',)", 'object_name': 'ArticleComment'},
'article': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Article']"}),
'author': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
'comment': ('django.db.models.fields.TextField', [], {}),
'created_at': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
'cms.filedownload': {
'Meta': {'object_name': 'FileDownload'},
'count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'expires_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.File']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'uuid': ('uuidfield.fields.UUIDField', [], {'unique': 'True', 'max_length': '32', 'blank': 'True'})
},
'cms.menu': {
'Meta': {'object_name': 'Menu'},
'article': ('smart_selects.db_fields.ChainedForeignKey', [], {'default': 'None', 'to': "orm['cms.Article']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'link': ('django.db.models.fields.CharField', [], {'max_length': '250', 'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['cms.Menu']"}),
u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Section']", 'null': 'True', 'blank': 'True'}),
u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.section': {
'Meta': {'ordering': "['title']", 'object_name': 'Section'},
'articles': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['cms.Article']", 'null': 'True', 'through': "orm['cms.SectionItem']", 'blank': 'True'}),
'conversions': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'keywords': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '250', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'views': ('django.db.models.fields.IntegerField', [], {'default': '0'})
},
'cms.sectionitem': {
'Meta': {'ordering': "['order']", 'object_name': 'SectionItem'},
'article': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Article']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}),
'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Section']"})
},
'cms.urlmigrate': {
'Meta': {'object_name': 'URLMigrate'},
'dtupdate': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'new_url': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'obs': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'old_url': ('django.db.models.fields.CharField', [], {'max_length': '250', 'db_index': 'True'}),
'redirect_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
'views': ('django.db.models.fields.IntegerField', [], {'default': '0'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'filer.file': {
'Meta': {'object_name': 'File'},
'_file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'folder': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'all_files'", 'null': 'True', 'to': "orm['filer.Folder']"}),
'has_all_mandatory_data': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_files'", 'null': 'True', 'to': "orm['auth.User']"}),
'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'polymorphic_filer.file_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
'sha1': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40', 'blank': 'True'}),
'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
},
'filer.folder': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('parent', 'name'),)", 'object_name': 'Folder'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filer_owned_folders'", 'null': 'True', 'to': "orm['auth.User']"}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['filer.Folder']"}),
u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
}
}
complete_apps = ['cms'] | josircg/raizcidadanista | raizcidadanista/cms/migrations/0004_auto__add_articlecomment.py | Python | gpl-3.0 | 14,504 | [
30522,
1001,
1011,
1008,
1011,
16861,
1024,
21183,
2546,
1011,
1022,
1011,
1008,
1011,
2013,
2148,
1012,
21183,
12146,
12324,
3058,
7292,
1035,
21183,
12146,
2004,
3058,
7292,
2013,
2148,
1012,
16962,
12324,
16962,
2013,
2148,
1012,
1058,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas
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 The University of Texas nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
void bli_her_int( conj_t conjh,
obj_t* alpha,
obj_t* x,
obj_t* c,
her_t* cntl );
| tkelman/blis | frame/2/her/bli_her_int.h | C | bsd-3-clause | 1,823 | [
30522,
1013,
1008,
1038,
6856,
2019,
4874,
1011,
2241,
7705,
2005,
4975,
2152,
1011,
2836,
1038,
8523,
1011,
2066,
8860,
1012,
9385,
1006,
1039,
1007,
2297,
1010,
1996,
2118,
1997,
3146,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html>
<head>
<title>SenseNet : modul Senzory</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./SenseNet_Files/over.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="./SenseNet_Files/font-awesome.min.css">
<link href='http://fonts.googleapis.com/css?family=Arvo' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
<link rel="icon" href="./SenseNet_Files/favicon.ico">
<meta name="author" content="labka.cz" />
<meta name="description" content="SenseNet platform which is able to measure, parse, and predict data about air polution in industrial region Ostrava" />
<meta name="keywords" content="SenseNet, SensoricNet, Sense Net, Sensoric Net, AI, platform, prediction, parser, neural network, hackerspace, labka.cz, labka, ostrava, hackerspaces, polution, air, environmental, environment"/>
</head>
<body>
<!-- Imported floating menu -->
<div class="obal">
<div class="menu">
<iframe src="menu.html" seamless></iframe>
</div>
</div>
<div class="celek">
<img class="obrR" src="./SenseNet_Files/pavel_s.png" width="350px">
<h2>Modul NET : infrastruktura </h2>
<div>
Mezi moduly Smysly [Sense] a Mozek [Brain] musí samozřejmě existovat nějaké spojení, tak jako jsou jím v lidském těle nervy.br />
V našem případě je takových spojení potřeba několik. Budou se budou vzájemně překrývat, protože komunikace je zásadní pro každý projekt a proto je potřebné mít oněch pomyslných nervových soustav několik a na několika různých vrstvách.<br />
<br />
Cílem projektu je vytvoření rozhraní mezi senzory a servery, na kterých se budou data zpracovávat, a to tak, aby bylo možné projekt zveřejnit jak pod OpenSource licencemi, jako kompletní, preprodukovatelné řešení, tak aby na druhou stranu bylo možné enterprise nasazení za pomoci patentovaných technologií a garantovaných vysílacích pásem.<br />
<h3>NB-IoT</h3>
NB-IoT je experimentální standardizovaná techologie bezdrátového přenosu malých množtví dat pomocí existující bezdrátové telefonní a datové sítě.<br />
<br />
Technologie NB-IoT je založena na standardech Low Power Wide Area (LPWA) a díky její nízké spotřebě a vysoké propustnosti se Internet věcí může masivně rozšířit. Podporuje řešení jak v průmyslu (např. v energetice, automobilovém průmyslu, strojírenství, zemědělství, atd.), zdravotnictví a v projektech chytrých měst, tak i v oblasti běžného života (monitorování a zabezpečení domácností, vozidel, domácích mazlíčků atd.). Mezi největší výhody patří výborná prostupnost signálu překážkami, signál se tak dostane i do sklepů nebo garáží, dále provoz na licencovaném frekvenčním pásmu zajišťujícím uživatelům spolehlivější a bezpečnější komunikaci, roaming, nízká spotřeba energie koncovými zařízeními (výdrž baterie až 10 – 15 let) a také jejich nízká cena. <br />
<br />
Našemu týmu se podařilo okolo testovacícho čipu vybudovat celou hardwarovou platformu tak, že tato může být připojena k senzorickému modulu, a bude možné testovat její stabilitu, pokrytí a náročnost na napájení.<br />
Tato část projektu je již téměř dokončena a nachází se ve stádiu pre-produkčního testování.<br />
<br />
Díky tomu, že se jedná o technologii patentovanou a ke své fuknci využívající produkční komerční frekvence vlastněné společností Vodafone, nebude tato část modulu zařazena v OpenSource verzi projektu SenseNet<br />
<h3>LoraWan</h3>
Nekomerční, OpenSource obdoba NB-IoT sestávající z open hardware i open software, která využívá nekomerční, ale také negarantovaná vysílací pásma pro rádiový přenos.<br />
Modul bude zařazen do OpenSource dokumentace SenseNet a měl by být plně schopen nahradit komerční, patentované řešení.<br />
V součastné době ještě neproběhlo testování v Labce, nicméně hardware senzorů je pro LoraWan nasazení připraven.<br />
<h3>Interní síťová infrastruktura</h3>
Interně bude pro síťování projektu použita standarndní implementace IPv4 a do budoucna IPv6.<br />
Tato část projektu je již hotová v pre-produkčním stadiu, bude vytvořena ještě dokumentace pro jiné než testovací a laboratorní použití.
</body>
</html>
| Labka-cz/SensorNet | Web/net.html | HTML | gpl-3.0 | 4,611 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
3168,
7159,
1024,
16913,
5313,
12411,
6844,
2854,
1026,
1013,
2516,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/* Copyright (c) 2000 The Legion Of The Bouncy Castle
* (http://www.bouncycastle.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the 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.
*/
package jcifs.spnego.asn1;
import java.io.IOException;
import java.util.Enumeration;
public class BERConstructedSequence
extends DERConstructedSequence
{
/*
*/
void encode(
DEROutputStream out)
throws IOException
{
if (out instanceof ASN1OutputStream || out instanceof BEROutputStream)
{
out.write(SEQUENCE | CONSTRUCTED);
out.write(0x80);
Enumeration e = getObjects();
while (e.hasMoreElements())
{
out.writeObject(e.nextElement());
}
out.write(0x00);
out.write(0x00);
}
else
{
super.encode(out);
}
}
}
| emmanuel-keller/jcifs-krb5 | src/jcifs/spnego/asn1/BERConstructedSequence.java | Java | lgpl-2.1 | 1,967 | [
30522,
1013,
1008,
9385,
1006,
1039,
1007,
2456,
1996,
8009,
1997,
1996,
8945,
4609,
5666,
3317,
1008,
1006,
8299,
1024,
1013,
1013,
7479,
1012,
8945,
4609,
5666,
23662,
1012,
8917,
1007,
1008,
1008,
6656,
2003,
2182,
3762,
4379,
1010,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2018 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Support for a Chromium OS Google Binary Block, used to record read-only
# information mostly used by firmware.
from collections import OrderedDict
from patman import command
from binman.entry import Entry, EntryArg
from dtoc import fdt_util
from patman import tools
# Build GBB flags.
# (src/platform/vboot_reference/firmware/include/gbb_header.h)
gbb_flag_properties = {
'dev-screen-short-delay': 0x1,
'load-option-roms': 0x2,
'enable-alternate-os': 0x4,
'force-dev-switch-on': 0x8,
'force-dev-boot-usb': 0x10,
'disable-fw-rollback-check': 0x20,
'enter-triggers-tonorm': 0x40,
'force-dev-boot-legacy': 0x80,
'faft-key-override': 0x100,
'disable-ec-software-sync': 0x200,
'default-dev-boot-legacy': 0x400,
'disable-pd-software-sync': 0x800,
'disable-lid-shutdown': 0x1000,
'force-dev-boot-fastboot-full-cap': 0x2000,
'enable-serial': 0x4000,
'disable-dwmp': 0x8000,
}
class Entry_gbb(Entry):
"""An entry which contains a Chromium OS Google Binary Block
Properties / Entry arguments:
- hardware-id: Hardware ID to use for this build (a string)
- keydir: Directory containing the public keys to use
- bmpblk: Filename containing images used by recovery
Chromium OS uses a GBB to store various pieces of information, in particular
the root and recovery keys that are used to verify the boot process. Some
more details are here:
https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
but note that the page dates from 2013 so is quite out of date. See
README.chromium for how to obtain the required keys and tools.
"""
def __init__(self, section, etype, node):
super().__init__(section, etype, node)
self.hardware_id, self.keydir, self.bmpblk = self.GetEntryArgsOrProps(
[EntryArg('hardware-id', str),
EntryArg('keydir', str),
EntryArg('bmpblk', str)])
# Read in the GBB flags from the config
self.gbb_flags = 0
flags_node = node.FindNode('flags')
if flags_node:
for flag, value in gbb_flag_properties.items():
if fdt_util.GetBool(flags_node, flag):
self.gbb_flags |= value
def ObtainContents(self):
gbb = 'gbb.bin'
fname = tools.GetOutputFilename(gbb)
if not self.size:
self.Raise('GBB must have a fixed size')
gbb_size = self.size
bmpfv_size = gbb_size - 0x2180
if bmpfv_size < 0:
self.Raise('GBB is too small (minimum 0x2180 bytes)')
sizes = [0x100, 0x1000, bmpfv_size, 0x1000]
sizes = ['%#x' % size for size in sizes]
keydir = tools.GetInputFilename(self.keydir)
gbb_set_command = [
'gbb_utility', '-s',
'--hwid=%s' % self.hardware_id,
'--rootkey=%s/root_key.vbpubk' % keydir,
'--recoverykey=%s/recovery_key.vbpubk' % keydir,
'--flags=%d' % self.gbb_flags,
'--bmpfv=%s' % tools.GetInputFilename(self.bmpblk),
fname]
tools.Run('futility', 'gbb_utility', '-c', ','.join(sizes), fname)
tools.Run('futility', *gbb_set_command)
self.SetContents(tools.ReadFile(fname))
return True
| Digilent/u-boot-digilent | tools/binman/etype/gbb.py | Python | gpl-2.0 | 3,381 | [
30522,
1001,
23772,
2595,
1011,
6105,
1011,
8909,
4765,
18095,
1024,
14246,
2140,
1011,
1016,
1012,
1014,
1009,
1001,
9385,
1006,
1039,
1007,
2760,
8224,
1010,
4297,
1001,
2517,
2011,
4079,
3221,
1026,
1055,
3501,
2290,
1030,
10381,
21716,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/***********************************************************************************************************************
Copyright (c) 2016, Imagination Technologies Limited and/or its affiliated group companies.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoAP;
using CoAP.Server.Resources;
namespace Imagination.LWM2M.Resources
{
internal class LWM2MSecurityResources : LWM2MResources
{
public LWM2MSecurityResources()
: base("0", true)
{ }
protected override void DoPost(CoapExchange exchange)
{
LWM2MSecurityResource lWM2MSecurityResource = LWM2MSecurityResource.Deserialise(exchange.Request);
if (lWM2MSecurityResource == null)
{
Response response = Response.CreateResponse(exchange.Request, StatusCode.BadRequest);
exchange.Respond(response);
}
else
{
this.Add(lWM2MSecurityResource);
Response response = Response.CreateResponse(exchange.Request, StatusCode.Changed);
exchange.Respond(response);
}
}
protected override void DoPut(CoapExchange exchange)
{
LWM2MSecurityResource lWM2MSecurityResource = LWM2MSecurityResource.Deserialise(exchange.Request);
if (lWM2MSecurityResource == null)
{
Response response = Response.CreateResponse(exchange.Request, StatusCode.BadRequest);
exchange.Respond(response);
}
else
{
this.Add(lWM2MSecurityResource);
Response response = Response.CreateResponse(exchange.Request, StatusCode.Changed);
exchange.Respond(response);
}
}
}
}
| boyvinall/DeviceServer | test/LWM2MTestClient/Resources/LWM2MSecurityResources.cs | C# | bsd-3-clause | 3,161 | [
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
<meta charset="utf-8">
<title>【转.译】关于万向节死锁(Gimbal Lock) | 小人国国王</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="在http://blog.donews.com/wanderpoet/archive/2005/07/04/453608.aspx看到一篇关于Gimbal Lock的E文,解释得挺清楚的,">
<meta property="og:type" content="article">
<meta property="og:title" content="【转.译】关于万向节死锁(Gimbal Lock) ">
<meta property="og:url" content="http://yoursite.com/2017/06/29/【转-译】关于万向节死锁-Gimbal-Lock/index.html">
<meta property="og:site_name" content="小人国国王">
<meta property="og:description" content="在http://blog.donews.com/wanderpoet/archive/2005/07/04/453608.aspx看到一篇关于Gimbal Lock的E文,解释得挺清楚的,">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://upload-images.jianshu.io/upload_images/977602-cd85148402a41e85.gif?imageMogr2/auto-orient/strip">
<meta property="og:updated_time" content="2019-09-14T18:07:25.163Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="【转.译】关于万向节死锁(Gimbal Lock) ">
<meta name="twitter:description" content="在http://blog.donews.com/wanderpoet/archive/2005/07/04/453608.aspx看到一篇关于Gimbal Lock的E文,解释得挺清楚的,">
<meta name="twitter:image" content="http://upload-images.jianshu.io/upload_images/977602-cd85148402a41e85.gif?imageMogr2/auto-orient/strip">
<link rel="alternate" href="/atom.xml" title="小人国国王" type="application/atom+xml">
<link rel="icon" href="https://raw.githubusercontent.com/A-limon/pacman/master/source/img/favicon.ico">
<link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/style.css">
</head>
</html>
<body>
<div id="container">
<div id="wrap">
<header id="header">
<div id="banner"></div>
<div id="header-outer" class="outer">
<div id="header-title" class="inner">
<h1 id="logo-wrap">
<a href="/" id="logo">小人国国王</a>
</h1>
</div>
<div id="header-inner" class="inner">
<nav id="main-nav">
<a id="main-nav-toggle" class="nav-icon"></a>
<a class="main-nav-link" href="/">Home</a>
<a class="main-nav-link" href="/archives">Archives</a>
</nav>
<nav id="sub-nav">
<a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
<a id="nav-search-btn" class="nav-icon" title="搜索"></a>
</nav>
<div id="search-form-wrap">
<form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit"></button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
</div>
</div>
</div>
</header>
<div class="outer">
<section id="main"><article id="post-【转-译】关于万向节死锁-Gimbal-Lock" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2017/06/29/【转-译】关于万向节死锁-Gimbal-Lock/" class="article-date">
<time datetime="2017-06-29T03:27:39.000Z" itemprop="datePublished">2017-06-29</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 class="article-title" itemprop="name">
【转.译】关于万向节死锁(Gimbal Lock)
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>在<a href="http://blog.donews.com/wanderpoet/archive/2005/07/04/453608.aspx" target="_blank" rel="noopener">http://blog.donews.com/wanderpoet/archive/2005/07/04/453608.aspx</a>看到一篇关于Gimbal Lock的E文,解释得挺清楚的,<a id="more"></a>翻译如下:Gimbal Lock<br>What’s Gimbal Lock?</p>
<p>Gimbal lock is the phenomenon of two rotational axis of an object pointing in the same direction. Actually, if two axis of the object become aligned, then we say that there’s a gimbal lock. In other words, a rotation in one axis could ‘override’ a rotation in another, making you lose a degree of freedom.</p>
<p>万向节锁是什么</p>
<p>万象节锁是指物体的两个旋转轴指向同一个方向。实际上,当两个旋转轴平行时,我们就说万向节锁现象发生了,换句话说,绕一个轴旋转可能会覆盖住另一个轴的旋转,从而失去一维自由度</p>
<p>How Gimbal Lock occurred?</p>
<p>Generally speaking, it occurred when you rotate the object which only use Eular Angles to denote it. The reason for this is that Eular angles evaluate each axis independently in a set order. Let’s see a certain scene. First the object travels down the X axis. When that operation is complete it then travels down the Y axis, and finally the Z axis. The problem with gimbal lock occurs when you rotate the object down the Y axis, say 90 degrees. Since the X component has already been evaluated it doesn’t get carried along with the other two axis. What winds up happening is the X and Z axis get pointed down the same axis.</p>
<p>通常说来,万向节锁发生在使用Eular Angles(欧拉角)的旋转操作中,原因是Eular Angles按照一定的顺序依次独立地绕轴旋转。让我们想象一个具体的旋转场景,首先物体先绕转X轴旋转,然后再绕Y轴,最后绕Z轴选择,从而完成一个旋转操作(飘飘白云译注:实际是想绕某一个轴旋转,然而Eular Angle将这个旋转分成三个独立的步骤进行),当你绕Y轴旋转90度之后万向节锁的问题就出现了,因为X轴已经被求值了,它不再随同其他两个轴旋转,这样X轴与Z轴就指向同一个方向(它们相当于同一个轴了)。</p>
<p>Here’s a pic showing what happened:<br>万向节锁现象图:</p>
<p><img src="http://upload-images.jianshu.io/upload_images/977602-cd85148402a41e85.gif?imageMogr2/auto-orient/strip" alt></p>
<p>以上我添加的译文,下面是转贴的译文,原译者:<a href="http://www.cnblogs.com/soroman/" target="_blank" rel="noopener">SoRoMan</a>Maybe it’s a bit difficult to understand. OK, let me show you a real sence.<br>可能有点不好理解。让我们看个现实中的场景。</p>
<p>Say that we have a telescope and a tripod to put the telescope on. The tripod is put on the ground. The top of the tripod holding the telescope is leveled with the horizon (reference plane) so that a vertical rotation axis (we call it X axis) is perfectly vertical to the ground plane. The telescope can then be rotated around 360 degrees in X axis so that it can scan the horizon in all the directions of the compass. Zero degrees azimuth is usually set toward a heading of true north. A second horizontal axis parallel to the ground plane (we call it Y axis), enables the telescope to be rotated in elevation upward or downward from the horizon. The horizon is usually set at zero degrees and the telescope can be rotated +90 degrees upward in elevation so that it is looking straight up toward the zenith or rotated -90 degrees downward so that it is looking vertically at the ground plane.</p>
<p>假如我们有一个望远镜和一个用来放望远镜的三脚架,(我们将)三脚架放在地面上,使支撑望远镜的三脚架的顶部是平行于地平面(参考平面)的,以便使得竖向的旋转轴(记为x轴)是完全地垂直于地平面的。现在,我们就可以将望远镜饶x轴旋转360度,从而观察(以望远镜为中心的)水平包围圈的所有方向。通常将正北朝向方位角度记为0度方位角。第二个坐标轴,即平行于地平面的横向的坐标轴(记为y轴)使得望远镜可以饶着它上下旋转,通常将地平面朝向的仰角记为0度,这样,望远镜可以向上仰+90度指向天顶,或者向下-90度指向脚底。</p>
<p>OK, that’s all we needed. every point in the sky (and the ground) can be referenced by only ONE unique pair of X and Y readings. For example an X of 90 degrees and Y of 45 degrees specifies a point exactly due east of the telescope and in a skyward direction half way up toward the zenith.</p>
<p>好了,万事俱备。现在,天空中(包括地面上)的每个点只需要唯一的一对x和y度数就可以确定。比如x=90度,y=45度指向的点是位于正东方向的半天空上。</p>
<p>Now let me show you how the gimal lock occurred. We detect a high flying aircraft, near the horizon, due east from the telescope (X = 90 degrees, Y = 10 degrees) and we follow it (track it) as it comes directly toward us. The X angle stays at 90 degrees and the Y angle slowly increases. As the aircraft comes closer the Y angle increases more rapidly and just as the aircraft reaches an Y of 90 degrees (exactly overhead), it makes a sharp turn due south. We find that we cannot quickly move the telescope toward the south because the Y angle is exactly +90 degrees so we loose sight (loose track) of the aircraft . We have GIMBAL LOCK!</p>
<p>现在,看看万向节死锁是怎么发生的。一次,我们探测到有一个飞行器贴地飞行,位于望远镜的正东方向(x=90度,y=10度),朝着我们直飞过来,我们跟踪它。飞行器飞行方向是保持x轴角度90度不变,而y向的角度在慢慢增大。随着飞行器的临近,y轴角增长的越来越快且当y向的角度达到90度时(即将超越),突然它急转弯朝南飞去。这时,我们发现我们不能将望远镜朝向南方,因为此时y向已经是90度,造成我们失去跟踪目标。这就是万向节死锁!(译注:为什么说不能将望远镜朝向南方呢,让我们看看坐标变化,从开始的(x=90度,y=10度)到(x=90度,y=90度),这个过程没有问题,望远镜慢慢转动跟踪飞行器。当飞行器到达(x=90度,y=90度)后,坐标突然变成(x=180度,y=90度)(因为朝南),x由90突变成180度,所以望远镜需要饶垂直轴向x轴旋转180-90=90度以便追上飞行器,但此时,望远镜已经是平行于x轴,我们知道饶平行于自身的中轴线的的旋转改变不了朝向,就象拧螺丝一样,螺丝头的指向不变。所以望远镜的指向还是天顶。而后由于飞行器飞远,坐标变成(x=180度,y<90度)时,y向角减小,望远镜只能又转回到正东指向,望’器’兴叹。这说明用x,y旋转角(又称欧拉角)来定向物体有时并不能按照你想像的那样工作,象上面的例子中从(x=90度,y=10度)到(x=90度,y=90度),按照欧拉角旋转确实可以正确地定向,但从(x=90度,y=90度)到(x=180度,y=90度),再到(x=180度,y<90度),按照欧拉角旋转后的定向并非正确。)</p>
<p>It’s a example of 2D coordinate frame. It’s very similar in 3D frame. We say that you have a vector which is parellel to the X axis. And we rotate it around Y axis so that the vector is parellel to the Z axis. Then we find that any rotations around Z axis will have no effect on the vector. We say that we have a GIMBAL LOCK</p>
<p>上面是2维坐标系中的例子,同样,对于3维的也一样。比如有一个平行于x轴的向量,我们先将它饶y旋转直到它平行于z轴,这时,我们会发现任何饶z的旋转都改变不了向量的方向,即万向节死锁。 </p>
<p>原文地址:<a href="http://blog.csdn.net/kesalin/article/details/2161254" target="_blank" rel="noopener">http://blog.csdn.net/kesalin/article/details/2161254</a></p>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2017/06/29/【转-译】关于万向节死锁-Gimbal-Lock/" data-id="ck0kdx1wd0008d4uuiic5bc69" class="article-share-link">Share</a>
</footer>
</div>
<nav id="article-nav">
<a href="/2017/06/29/网游工作室创业者必看《中国合伙人》/" id="article-nav-newer" class="article-nav-link-wrap">
<strong class="article-nav-caption">Newer</strong>
<div class="article-nav-title">
网游工作室创业者必看《中国合伙人》
</div>
</a>
<a href="/2017/06/29/OpenGL-ES-03-3D变换:模型,视图,投影与Viewport/" id="article-nav-older" class="article-nav-link-wrap">
<strong class="article-nav-caption">Older</strong>
<div class="article-nav-title">[OpenGL ES 03]3D变换:模型,视图,投影与Viewport</div>
</a>
</nav>
</article>
</section>
<aside id="sidebar">
<div class="widget-wrap">
<h3 class="widget-title">标签</h3>
<div class="widget">
<ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Markdown指南/">Markdown指南</a></li></ul>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">标签云</h3>
<div class="widget tagcloud">
<a href="/tags/Markdown指南/" style="font-size: 10px;">Markdown指南</a>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">归档</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/">十二月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/11/">十一月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/">十月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/">九月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/">八月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/07/">七月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/">六月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">五月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/03/">三月 2017</a></li></ul>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">最新文章</h3>
<div class="widget">
<ul>
<li>
<a href="/2017/12/13/无论是第一批90后还是年轻人-为何都感叹自己老了/">无论是第一批90后还是年轻人 为何都感叹自己老了</a>
</li>
<li>
<a href="/2017/12/07/7800元在美国官网购买256G-iPhone-X的经历/">7800元在美国官网购买256G iPhone X的经历</a>
</li>
<li>
<a href="/2017/11/24/iOS中最值得设计师学习的33个APP图标/">iOS中最值得设计师学习的33个APP图标</a>
</li>
<li>
<a href="/2017/11/16/“高考零分生”的中场战事/">“高考零分生”的中场战事</a>
</li>
<li>
<a href="/2017/10/30/中年危机的焦虑:到了那个时候,我还有竞争力吗?/">中年危机的焦虑:到了那个时候,我还有竞争力吗?</a>
</li>
</ul>
</div>
</div>
</aside>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
© 2019 jinyou<br>
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
</div>
</div>
</footer>
</div>
<nav id="mobile-nav">
<a href="/" class="mobile-nav-link">Home</a>
<a href="/archives" class="mobile-nav-link">Archives</a>
</nav>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script src="/js/script.js"></script>
</div>
</body>
</html> | jinyouli/jinyouli.github.io | 2017/06/29/【转-译】关于万向节死锁-Gimbal-Lock/index.html | HTML | mit | 16,426 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
18804,
2171,
1027,
1000,
13103,
1000,
4180,
1027,
1000,
2002,
2595,
2080,
1017,
1012,
1023,
1012,
1014,
1000,
1028,
1026,
18804,
25869,
13462,
1027,
1000... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*----------------------------------------------------------------------------*
* This file is part of Pitaya. *
* Copyright (C) 2012-2016 Osman KOCAK <kocakosm@gmail.com> *
* *
* This program is free software: you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or (at your *
* option) any later version. *
* 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 Lesser General Public *
* License for more details. *
* You should have received a copy of the GNU Lesser General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*----------------------------------------------------------------------------*/
package org.kocakosm.pitaya.io;
import org.kocakosm.pitaya.charset.Charsets;
import org.kocakosm.pitaya.util.Parameters;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Text files utilities.
*
* @see XFiles
*
* @author Osman KOCAK
*/
public final class TextFiles
{
/**
* Returns the first (up to 10) lines of the given {@code File} using
* the system's default charset. Named after the Unix command of the
* same name.
*
* @param f the {@code File} to read.
*
* @return the first lines of the given {@code File}.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> head(File f) throws IOException
{
return head(f, Charsets.DEFAULT);
}
/**
* Returns the first (up to 10) lines of the given {@code File} using
* the specified charset. Named after the Unix command of the same name.
*
* @param f the {@code File} to read.
* @param charset the charset to use.
*
* @return the first lines of the given {@code File}.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> head(File f, Charset charset) throws IOException
{
return head(f, 10, charset);
}
/**
* Returns the first (up to {@code n}) lines of the given {@code File}
* using the system's default charset. Named after the Unix command of
* the same name.
*
* @param f the {@code File} to read.
* @param n the maximum number of lines to read.
*
* @return the first lines of the given {@code File}.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws IllegalArgumentException if {@code n} is negative.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> head(File f, int n) throws IOException
{
return head(f, n, Charsets.DEFAULT);
}
/**
* Returns the first (up to {@code n}) lines of the given {@code File}
* using the specified charset. Named after the Unix command of the same
* name.
*
* @param f the {@code File} to read.
* @param n the maximum number of lines to read.
* @param charset the charset to use.
*
* @return the first lines of the given {@code File}.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws IllegalArgumentException if {@code n} is negative.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> head(File f, int n, Charset charset)
throws IOException
{
Parameters.checkCondition(n >= 0);
List<String> lines = new ArrayList<String>();
BufferedReader reader = newReader(f, charset);
try {
String line = reader.readLine();
while (line != null && lines.size() < n) {
lines.add(line);
line = reader.readLine();
}
} finally {
IO.close(reader);
}
return Collections.unmodifiableList(lines);
}
/**
* Returns the last (up to 10) lines of the given {@code File} using the
* system's default charset. Named after the Unix command of the same
* name.
*
* @param f the {@code File} to read.
*
* @return the last lines of the given {@code File}.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> tail(File f) throws IOException
{
return tail(f, Charsets.DEFAULT);
}
/**
* Returns the last (up to 10) lines of the given {@code File} using the
* specified charset. Named after the Unix command of the same name.
*
* @param f the {@code File} to read.
* @param charset the charset to use.
*
* @return the last lines of the given {@code File}.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> tail(File f, Charset charset) throws IOException
{
return tail(f, 10, charset);
}
/**
* Returns the last (up to n) lines of the given {@code File} using the
* system's default charset. Named after the Unix command of the same
* name.
*
* @param f the {@code File} to read.
* @param n the maximum number of lines to read.
*
* @return the last lines of the given {@code File}.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws IllegalArgumentException if {@code n} is negative.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> tail(File f, int n) throws IOException
{
return tail(f, n, Charsets.DEFAULT);
}
/**
* Returns the last (up to n) lines of the given {@code File} using the
* specified charset. Named after the Unix command of the same name.
*
* @param f the {@code File} to read.
* @param n the maximum number of lines to read.
* @param charset the charset to use.
*
* @return the last lines of the given {@code File}.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws IllegalArgumentException if {@code n} is negative.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> tail(File f, int n, Charset charset)
throws IOException
{
Parameters.checkCondition(n >= 0);
if (n == 0) {
return Collections.emptyList();
}
List<String> lines = new LinkedList<String>();
BufferedReader reader = newReader(f, charset);
try {
String line = reader.readLine();
while (line != null) {
lines.add(line);
if (lines.size() > n) {
lines.remove(0);
}
line = reader.readLine();
}
} finally {
IO.close(reader);
}
return Collections.unmodifiableList(lines);
}
/**
* Returns a new {@code BufferedReader} to read the given {@code File}
* using the system's default charset.
*
* @param f the file to read from.
*
* @return a {@code BufferedReader} to read the given {@code File}.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws FileNotFoundException if {@code f} doesn't exist, or if it is
* a directory rather than a regular file, or if it can't be opened
* for reading.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static BufferedReader newReader(File f) throws FileNotFoundException
{
return newReader(f, Charsets.DEFAULT);
}
/**
* Returns a new {@code BufferedReader} to read the given {@code File}
* using the specified charset.
*
* @param f the file to read from.
* @param charset the charset to use.
*
* @return a {@code BufferedReader} to read the given {@code File}.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws FileNotFoundException if {@code f} doesn't exist, or if it is
* a directory rather than a regular file, or if it can't be opened
* for reading.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static BufferedReader newReader(File f, Charset charset)
throws FileNotFoundException
{
InputStream in = new FileInputStream(f);
return new BufferedReader(new InputStreamReader(in, charset));
}
/**
* Returns a new {@code BufferedWriter} to write to the given
* {@code File} using the system's default charset.
*
* @param f the file to write to.
* @param options the write options.
*
* @return a {@code BufferedWriter} to write to the given {@code File}.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws IllegalArgumentException if incompatible options are given.
* @throws FileNotFoundException if {@code f} exists but is a directory
* rather than a regular file, or if it does not exist but cannot
* be created, or if it cannot be opened for any other reason.
* @throws IOException if the {@link WriteOption#CREATE} option is given
* and the specified file already exists.
* @throws SecurityException if a security manager exists and denies
* write access to {@code f}.
*/
public static BufferedWriter newWriter(File f, WriteOption... options)
throws IOException
{
return newWriter(f, Charsets.DEFAULT, options);
}
/**
* Returns a new {@code BufferedWriter} to write to the given
* {@code File} using the specified charset.
*
* @param f the file to write to.
* @param charset the charset to use.
* @param options the write options.
*
* @return a {@code BufferedWriter} to write to the given {@code File}.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws IllegalArgumentException if incompatible options are given.
* @throws FileNotFoundException if {@code f} exists but is a directory
* rather than a regular file, or if it does not exist but cannot
* be created, or if it cannot be opened for any other reason.
* @throws IOException if the {@link WriteOption#CREATE} option is given
* and the specified file already exists.
* @throws SecurityException if a security manager exists and denies
* write access to {@code f}.
*/
public static BufferedWriter newWriter(File f, Charset charset,
WriteOption... options) throws IOException
{
OutputStream out = XFiles.newOutputStream(f, options);
return new BufferedWriter(new OutputStreamWriter(out, charset));
}
/**
* Reads the whole content of the given {@code File} as a {@code String}
* using the system's default charset.
*
* @param f the file to read.
*
* @return the file's content as a {@code String}.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static String read(File f) throws IOException
{
return read(f, Charsets.DEFAULT);
}
/**
* Reads the whole content of the given {@code File} as a {@code String}
* using the specified charset.
*
* @param f the file to read.
* @param charset the charset to use.
*
* @return the file's content as a {@code String}.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static String read(File f, Charset charset) throws IOException
{
BufferedReader in = newReader(f, charset);
try {
return CharStreams.read(in);
} finally {
IO.close(in);
}
}
/**
* Reads all the lines from the given {@code File} using the system's
* default charset. Note that the returned {@code List} is immutable.
*
* @param f the file to read.
*
* @return the file's lines.
*
* @throws NullPointerException if {@code f} is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> readLines(File f) throws IOException
{
return readLines(f, Charsets.DEFAULT);
}
/**
* Reads all the lines from the given {@code File} using the specified
* charset. Note that the returned {@code List} is immutable.
*
* @param f the file to read.
* @param charset the charset to use.
*
* @return the file's lines.
*
* @throws NullPointerException if one of the arguments is {@code null}.
* @throws IOException if {@code f} does not exist, or if it is a
* directory rather than a regular file, or if it can't be read.
* @throws SecurityException if a security manager exists and denies
* read access to {@code f}.
*/
public static List<String> readLines(File f, Charset charset)
throws IOException
{
BufferedReader in = newReader(f, charset);
try {
return CharStreams.readLines(in);
} finally {
IO.close(in);
}
}
private TextFiles()
{
/* ... */
}
}
| kocakosm/pitaya | src/org/kocakosm/pitaya/io/TextFiles.java | Java | lgpl-3.0 | 15,156 | [
30522,
1013,
1008,
1011,
1011,
1011,
1011,
30524,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace W3TC;
class Util_WpFile_FilesystemRmdirException extends Util_WpFile_FilesystemOperationException {
private $folder;
public function __construct( $message, $credentials_form, $folder ) {
parent::__construct( $message, $credentials_form );
$this->folder = $folder;
}
public function folder() {
return $this->folder;
}
}
| matwaroff/Brandme-WP | wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemRmdirException.php | PHP | gpl-3.0 | 350 | [
30522,
1026,
1029,
25718,
3415,
15327,
1059,
2509,
13535,
1025,
2465,
21183,
4014,
1035,
1059,
14376,
9463,
1035,
6764,
27268,
6633,
10867,
4305,
2890,
2595,
24422,
8908,
21183,
4014,
1035,
1059,
14376,
9463,
1035,
6764,
27268,
6633,
25918,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package org.maera.plugin.osgi.factory;
import com.mockobjects.dynamic.C;
import com.mockobjects.dynamic.Mock;
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.maera.plugin.*;
import org.maera.plugin.event.impl.DefaultPluginEventManager;
import org.maera.plugin.module.ModuleFactory;
import org.maera.plugin.osgi.container.OsgiContainerManager;
import org.maera.plugin.osgi.container.impl.DefaultOsgiPersistentCache;
import org.maera.plugin.osgi.hostcomponents.HostComponentRegistration;
import org.maera.plugin.test.PluginJarBuilder;
import org.maera.plugin.test.PluginTestUtils;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.service.packageadmin.PackageAdmin;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.Hashtable;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class OsgiPluginFactoryTest {
private OsgiPluginFactory factory;
private File jar;
private Mock mockBundle;
private Mock mockSystemBundle;
private OsgiContainerManager osgiContainerManager;
private File tmpDir;
@Before
public void setUp() throws IOException, URISyntaxException {
tmpDir = PluginTestUtils.createTempDirectory(OsgiPluginFactoryTest.class);
osgiContainerManager = mock(OsgiContainerManager.class);
mock(ModuleFactory.class);
factory = new OsgiPluginFactory(PluginAccessor.Descriptor.FILENAME, (String) null, new DefaultOsgiPersistentCache(tmpDir), osgiContainerManager, new DefaultPluginEventManager());
jar = new PluginJarBuilder("someplugin").addPluginInformation("plugin.key", "My Plugin", "1.0").build();
mockBundle = new Mock(Bundle.class);
final Dictionary<String, String> dict = new Hashtable<String, String>();
dict.put(Constants.BUNDLE_DESCRIPTION, "desc");
dict.put(Constants.BUNDLE_VERSION, "1.0");
mockBundle.matchAndReturn("getHeaders", dict);
mockSystemBundle = new Mock(Bundle.class);
final Dictionary<String, String> sysDict = new Hashtable<String, String>();
sysDict.put(Constants.BUNDLE_DESCRIPTION, "desc");
sysDict.put(Constants.BUNDLE_VERSION, "1.0");
mockSystemBundle.matchAndReturn("getHeaders", sysDict);
mockSystemBundle.matchAndReturn("getLastModified", System.currentTimeMillis());
mockSystemBundle.matchAndReturn("getSymbolicName", "system.bundle");
Mock mockSysContext = new Mock(BundleContext.class);
mockSystemBundle.matchAndReturn("getBundleContext", mockSysContext.proxy());
mockSysContext.matchAndReturn("getServiceReference", C.ANY_ARGS, null);
mockSysContext.matchAndReturn("getService", C.ANY_ARGS, new Mock(PackageAdmin.class).proxy());
}
@After
public void tearDown() throws IOException {
factory = null;
FileUtils.cleanDirectory(tmpDir);
jar.delete();
}
@Test
public void testCanLoadNoXml() throws PluginParseException, IOException {
final File plugin = new PluginJarBuilder("loadwithxml").build();
final String key = factory.canCreate(new JarPluginArtifact(plugin));
assertNull(key);
}
@Test
public void testCanLoadWithXml() throws PluginParseException, IOException {
final File plugin = new PluginJarBuilder("loadwithxml").addPluginInformation("foo.bar", "", "1.0").build();
final String key = factory.canCreate(new JarPluginArtifact(plugin));
assertEquals("foo.bar", key);
}
@Test
public void testCreateOsgiPlugin() throws PluginParseException {
mockBundle.expectAndReturn("getSymbolicName", "plugin.key");
when(osgiContainerManager.getHostComponentRegistrations()).thenReturn(new ArrayList<HostComponentRegistration>());
when(osgiContainerManager.getBundles()).thenReturn(new Bundle[]{(Bundle) mockSystemBundle.proxy()});
final Plugin plugin = factory.create(new JarPluginArtifact(jar), (ModuleDescriptorFactory) new Mock(ModuleDescriptorFactory.class).proxy());
assertNotNull(plugin);
assertTrue(plugin instanceof OsgiPlugin);
}
@Test
public void testCreateOsgiPluginWithBadVersion() throws PluginParseException, IOException {
jar = new PluginJarBuilder("someplugin").addPluginInformation("plugin.key", "My Plugin", "beta.1.0").build();
mockBundle.expectAndReturn("getSymbolicName", "plugin.key");
when(osgiContainerManager.getHostComponentRegistrations()).thenReturn(new ArrayList<HostComponentRegistration>());
when(osgiContainerManager.getBundles()).thenReturn(new Bundle[]{(Bundle) mockSystemBundle.proxy()});
try {
factory.create(new JarPluginArtifact(jar), (ModuleDescriptorFactory) new Mock(ModuleDescriptorFactory.class).proxy());
fail("Should have complained about osgi version");
}
catch (PluginParseException ignored) {
}
}
@Test
public void testCreateOsgiPluginWithBadVersion2() throws PluginParseException, IOException {
jar = new PluginJarBuilder("someplugin").addPluginInformation("plugin.key", "My Plugin", "3.2-rc1").build();
mockBundle.expectAndReturn("getSymbolicName", "plugin.key");
when(osgiContainerManager.getHostComponentRegistrations()).thenReturn(new ArrayList<HostComponentRegistration>());
when(osgiContainerManager.getBundles()).thenReturn(new Bundle[]{(Bundle) mockSystemBundle.proxy()});
Plugin plugin = factory.create(new JarPluginArtifact(jar), (ModuleDescriptorFactory) new Mock(ModuleDescriptorFactory.class).proxy());
assertTrue(plugin instanceof OsgiPlugin);
}
}
| katasource/maera | osgi/loader/src/test/java/org/maera/plugin/osgi/factory/OsgiPluginFactoryTest.java | Java | bsd-3-clause | 5,917 | [
30522,
7427,
8917,
1012,
11530,
2527,
1012,
13354,
2378,
1012,
9808,
5856,
1012,
4713,
1025,
12324,
4012,
1012,
12934,
16429,
20614,
2015,
1012,
8790,
1012,
1039,
1025,
12324,
4012,
1012,
12934,
16429,
20614,
2015,
1012,
8790,
1012,
12934,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace Extia\Workflow\AnnualReviewBundle\Form\Type;
use Extia\Bundle\TaskBundle\Form\Type\AbstractNodeType;
use Symfony\Component\Form\FormBuilderInterface;
/**
* form type for preparing node
* @see Extia/Workflow/AnnualReviewBundle/Resources/workflows/preparing.xml
*/
class PreparingNodeType extends AbstractNodeType
{
/**
* {@inherit_doc}
*/
public function getName()
{
return 'annual_review_preparing_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add(
$builder->create('annual_review_doc', 'document', array(
'label' => 'annual_review.preparing.form.document',
'button_label' => 'annual_review.preparing.form.doc_label_button',
'required' => true
))
->addModelTransformer($this->createDocumentTransformer($options))
);
$builder->add('manager_id', 'choice', array(
'required' => true,
'multiple' => false,
'expanded' => false,
'choices' => $this->getManagersChoices(),
'label' => 'annual_review.preparing.form.manager_id'
));
$builder->add('meeting_date', 'datetime', array(
'required' => true,
'date_widget' => 'text',
'time_widget' => 'text',
'input' => 'timestamp',
'label' => 'annual_review.preparing.form.meeting_date'
));
}
}
| Nyxis/Rhea | src/Extia/Workflow/AnnualReviewBundle/Form/Type/PreparingNodeType.php | PHP | mit | 1,587 | [
30522,
1026,
1029,
25718,
3415,
15327,
4654,
10711,
1032,
2147,
12314,
1032,
3296,
2890,
8584,
27265,
2571,
1032,
2433,
1032,
2828,
1025,
2224,
4654,
10711,
1032,
14012,
1032,
4708,
27265,
2571,
1032,
2433,
1032,
2828,
1032,
10061,
3630,
32... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
include("Sfa/BillToAddress.php");
include("Sfa/CardInfo.php");
include("Sfa/Merchant.php");
include("Sfa/MPIData.php");
include("Sfa/ShipToAddress.php");
include("Sfa/PGResponse.php");
include("Sfa/PostLibPHP.php");
include("Sfa/PGReserveData.php");
$oMPI = new MPIData();
$oCI = new CardInfo();
$oPostLibphp = new PostLibPHP();
$oMerchant = new Merchant();
$oBTA = new BillToAddress();
$oSTA = new ShipToAddress();
$oPGResp = new PGResponse();
$oPGReserveData = new PGReserveData();
$oMerchant->setMerchantDetails("96039227","96039227","96039227","10.10.10.238",rand()."","Ord1234","http://localhost/Payment_Gateway/SFAResponse.php","POST","INR","INV123","req.Sale","100","","Ext1","true","Ext3","Ext4","New PHP");
$oBTA->setAddressDetails ("CID","Tester","Aline1","Aline2","Aline3","Pune","A.P","48927489","IND","tester@soft.com");
$oSTA->setAddressDetails ("Add1","Add2","Add3","City","State","443543","IND","sad@df.com");
#$oMPI->setMPIRequestDetails("1245","12.45","356","2","2 shirts","12","20011212","12","0","","image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*","Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)");
$oPGResp=$oPostLibphp->postSSL($oBTA,$oSTA,$oMerchant,$oMPI,$oPGReserveData);
if($oPGResp->getRespCode() == '000'){
$url =$oPGResp->getRedirectionUrl();
#$url =~ s/http/https/;
#print "Location: ".$url."\n\n";
#header("Location: ".$url);
redirect($url);
}else{
print "Error Occured.<br>";
print "Error Code:".$oPGResp->getRespCode()."<br>";
print "Error Message:".$oPGResp->getRespMessage()."<br>";
}
# This will remove all white space
#$oResp =~ s/\s*//g;
# $oPGResp->getResponse($oResp);
#print $oPGResp->getRespCode()."<br>";
#print $oPGResp->getRespMessage()."<br>";
#print $oPGResp->getTxnId()."<br>";
#print $oPGResp->getEpgTxnId()."<br>";
function redirect($url) {
if(headers_sent()){
?>
<html><head>
<script language="javascript" type="text/javascript">
window.self.location='<?php print($url);?>';
</script>
</head></html>
<?php
exit;
} else {
header("Location: ".$url);
exit;
}
}
?> | Numerico-Informatic-Systems-Pvt-Ltd/gsmpoly | app/webroot/payment/TestSsl.php | PHP | mit | 2,201 | [
30522,
1026,
1029,
25718,
2421,
1006,
1000,
16420,
2050,
1013,
3021,
3406,
4215,
16200,
4757,
1012,
25718,
1000,
1007,
1025,
2421,
1006,
1000,
16420,
2050,
1013,
4003,
2378,
14876,
1012,
25718,
1000,
1007,
1025,
2421,
1006,
1000,
16420,
205... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*! jQuery UI - v1.10.3 - 2014-01-12
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.progressbar.js, jquery.ui.slider.js
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
(function( $, undefined ) {
var uuid = 0,
runiqueId = /^ui-id-\d+$/;
// $.ui might exist from components with no dependencies, e.g., $.ui.position
$.ui = $.ui || {};
$.extend( $.ui, {
version: "1.10.3",
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
}
});
// plugins
$.fn.extend({
focus: (function( orig ) {
return function( delay, fn ) {
return typeof delay === "number" ?
this.each(function() {
var elem = this;
setTimeout(function() {
$( elem ).focus();
if ( fn ) {
fn.call( elem );
}
}, delay );
}) :
orig.apply( this, arguments );
};
})( $.fn.focus ),
scrollParent: function() {
var scrollParent;
if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
scrollParent = this.parents().filter(function() {
return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
}).eq(0);
} else {
scrollParent = this.parents().filter(function() {
return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
}).eq(0);
}
return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
},
zIndex: function( zIndex ) {
if ( zIndex !== undefined ) {
return this.css( "zIndex", zIndex );
}
if ( this.length ) {
var elem = $( this[ 0 ] ), position, value;
while ( elem.length && elem[ 0 ] !== document ) {
// Ignore z-index if position is set to a value where z-index is ignored by the browser
// This makes behavior of this function consistent across browsers
// WebKit always returns auto if the element is positioned
position = elem.css( "position" );
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
// IE returns 0 when zIndex is not specified
// other browsers return a string
// we ignore the case of nested elements with an explicit value of 0
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
value = parseInt( elem.css( "zIndex" ), 10 );
if ( !isNaN( value ) && value !== 0 ) {
return value;
}
}
elem = elem.parent();
}
}
return 0;
},
uniqueId: function() {
return this.each(function() {
if ( !this.id ) {
this.id = "ui-id-" + (++uuid);
}
});
},
removeUniqueId: function() {
return this.each(function() {
if ( runiqueId.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
});
}
});
// selectors
function focusable( element, isTabIndexNotNaN ) {
var map, mapName, img,
nodeName = element.nodeName.toLowerCase();
if ( "area" === nodeName ) {
map = element.parentNode;
mapName = map.name;
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
return false;
}
img = $( "img[usemap=#" + mapName + "]" )[0];
return !!img && visible( img );
}
return ( /input|select|textarea|button|object/.test( nodeName ) ?
!element.disabled :
"a" === nodeName ?
element.href || isTabIndexNotNaN :
isTabIndexNotNaN) &&
// the element and all of its ancestors must be visible
visible( element );
}
function visible( element ) {
return $.expr.filters.visible( element ) &&
!$( element ).parents().addBack().filter(function() {
return $.css( this, "visibility" ) === "hidden";
}).length;
}
$.extend( $.expr[ ":" ], {
data: $.expr.createPseudo ?
$.expr.createPseudo(function( dataName ) {
return function( elem ) {
return !!$.data( elem, dataName );
};
}) :
// support: jQuery <1.8
function( elem, i, match ) {
return !!$.data( elem, match[ 3 ] );
},
focusable: function( element ) {
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
},
tabbable: function( element ) {
var tabIndex = $.attr( element, "tabindex" ),
isTabIndexNaN = isNaN( tabIndex );
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
}
});
// support: jQuery <1.8
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
$.each( [ "Width", "Height" ], function( i, name ) {
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
type = name.toLowerCase(),
orig = {
innerWidth: $.fn.innerWidth,
innerHeight: $.fn.innerHeight,
outerWidth: $.fn.outerWidth,
outerHeight: $.fn.outerHeight
};
function reduce( elem, size, border, margin ) {
$.each( side, function() {
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
if ( border ) {
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
}
if ( margin ) {
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
}
});
return size;
}
$.fn[ "inner" + name ] = function( size ) {
if ( size === undefined ) {
return orig[ "inner" + name ].call( this );
}
return this.each(function() {
$( this ).css( type, reduce( this, size ) + "px" );
});
};
$.fn[ "outer" + name] = function( size, margin ) {
if ( typeof size !== "number" ) {
return orig[ "outer" + name ].call( this, size );
}
return this.each(function() {
$( this).css( type, reduce( this, size, true, margin ) + "px" );
});
};
});
}
// support: jQuery <1.8
if ( !$.fn.addBack ) {
$.fn.addBack = function( selector ) {
return this.add( selector == null ?
this.prevObject : this.prevObject.filter( selector )
);
};
}
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
$.fn.removeData = (function( removeData ) {
return function( key ) {
if ( arguments.length ) {
return removeData.call( this, $.camelCase( key ) );
} else {
return removeData.call( this );
}
};
})( $.fn.removeData );
}
// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
$.support.selectstart = "onselectstart" in document.createElement( "div" );
$.fn.extend({
disableSelection: function() {
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
".ui-disableSelection", function( event ) {
event.preventDefault();
});
},
enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
}
});
$.extend( $.ui, {
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
plugin: {
add: function( module, option, set ) {
var i,
proto = $.ui[ module ].prototype;
for ( i in set ) {
proto.plugins[ i ] = proto.plugins[ i ] || [];
proto.plugins[ i ].push( [ option, set[ i ] ] );
}
},
call: function( instance, name, args ) {
var i,
set = instance.plugins[ name ];
if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
return;
}
for ( i = 0; i < set.length; i++ ) {
if ( instance.options[ set[ i ][ 0 ] ] ) {
set[ i ][ 1 ].apply( instance.element, args );
}
}
}
},
// only used by resizable
hasScroll: function( el, a ) {
//If overflow is hidden, the element might have extra content, but the user wants to hide it
if ( $( el ).css( "overflow" ) === "hidden") {
return false;
}
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
has = false;
if ( el[ scroll ] > 0 ) {
return true;
}
// TODO: determine which cases actually cause this to happen
// if the element doesn't have the scroll set, see if it's possible to
// set the scroll
el[ scroll ] = 1;
has = ( el[ scroll ] > 0 );
el[ scroll ] = 0;
return has;
}
});
})( jQuery );
(function( $, undefined ) {
var uuid = 0,
slice = Array.prototype.slice,
_cleanData = $.cleanData;
$.cleanData = function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
try {
$( elem ).triggerHandler( "remove" );
// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
}
_cleanData( elems );
};
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
fullName = namespace + "-" + name;
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
// create selector for plugin
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};
$[ namespace ] = $[ namespace ] || {};
existingConstructor = $[ namespace ][ name ];
constructor = $[ namespace ][ name ] = function( options, element ) {
// allow instantiation without "new" keyword
if ( !this._createWidget ) {
return new constructor( options, element );
}
// allow instantiation without initializing for simple inheritance
// must use "new" keyword (the code above always passes args)
if ( arguments.length ) {
this._createWidget( options, element );
}
};
// extend with the existing constructor to carry over any static properties
$.extend( constructor, existingConstructor, {
version: prototype.version,
// copy the object used to create the prototype in case we need to
// redefine the widget later
_proto: $.extend( {}, prototype ),
// track widgets that inherit from this widget in case this widget is
// redefined after a widget inherits from it
_childConstructors: []
});
basePrototype = new base();
// we need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
basePrototype.options = $.widget.extend( {}, basePrototype.options );
$.each( prototype, function( prop, value ) {
if ( !$.isFunction( value ) ) {
proxiedPrototype[ prop ] = value;
return;
}
proxiedPrototype[ prop ] = (function() {
var _super = function() {
return base.prototype[ prop ].apply( this, arguments );
},
_superApply = function( args ) {
return base.prototype[ prop ].apply( this, args );
};
return function() {
var __super = this._super,
__superApply = this._superApply,
returnValue;
this._super = _super;
this._superApply = _superApply;
returnValue = value.apply( this, arguments );
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
})();
});
constructor.prototype = $.widget.extend( basePrototype, {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
widgetFullName: fullName
});
// If this widget is being redefined then we need to find all widgets that
// are inheriting from it and redefine all of them so that they inherit from
// the new version of this widget. We're essentially trying to replace one
// level in the prototype chain.
if ( existingConstructor ) {
$.each( existingConstructor._childConstructors, function( i, child ) {
var childPrototype = child.prototype;
// redefine the child widget using the same prototype that was
// originally used, but inherit from the new version of the base
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
});
// remove the list of existing child constructors from the old constructor
// so the old child constructors can be garbage collected
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push( constructor );
}
$.widget.bridge( name, constructor );
};
$.widget.extend = function( target ) {
var input = slice.call( arguments, 1 ),
inputIndex = 0,
inputLength = input.length,
key,
value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {
target[ key ] = $.isPlainObject( target[ key ] ) ?
$.widget.extend( {}, target[ key ], value ) :
// Don't extend strings, arrays, etc. with objects
$.widget.extend( {}, value );
// Copy everything else by reference
} else {
target[ key ] = value;
}
}
}
}
return target;
};
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = slice.call( arguments, 1 ),
returnValue = this;
// allow multiple hashes to be passed on init
options = !isMethodCall && args.length ?
$.widget.extend.apply( null, [ options ].concat(args) ) :
options;
if ( isMethodCall ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
if ( !instance ) {
return $.error( "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'" );
}
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
}
methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get() ) :
methodValue;
return false;
}
});
} else {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} )._init();
} else {
$.data( this, fullName, new object( options, this ) );
}
});
}
return returnValue;
};
};
$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: false,
// callbacks
create: null
},
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this.bindings = $();
this.hoverable = $();
this.focusable = $();
if ( element !== this ) {
$.data( element, this.widgetFullName, this );
this._on( true, this.element, {
remove: function( event ) {
if ( event.target === element ) {
this.destroy();
}
}
});
this.document = $( element.style ?
// element within the document
element.ownerDocument :
// element is window or document
element.document || element );
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
}
this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: $.noop,
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
// we can probably remove the unbind calls in 2.0
// all event bindings should go through this._on()
this.element
.unbind( this.eventNamespace )
// 1.9 BC for #7810
// TODO remove dual storage
.removeData( this.widgetName )
.removeData( this.widgetFullName )
// support: jquery <1.6.3
// http://bugs.jquery.com/ticket/9413
.removeData( $.camelCase( this.widgetFullName ) );
this.widget()
.unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetFullName + "-disabled " +
"ui-state-disabled" );
// clean up events and states
this.bindings.unbind( this.eventNamespace );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
},
_destroy: $.noop,
widget: function() {
return this.element;
},
option: function( key, value ) {
var options = key,
parts,
curOption,
i;
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
return $.widget.extend( {}, this.options );
}
if ( typeof key === "string" ) {
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
options = {};
parts = key.split( "." );
key = parts.shift();
if ( parts.length ) {
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
for ( i = 0; i < parts.length - 1; i++ ) {
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
if ( value === undefined ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
if ( value === undefined ) {
return this.options[ key ] === undefined ? null : this.options[ key ];
}
options[ key ] = value;
}
}
this._setOptions( options );
return this;
},
_setOptions: function( options ) {
var key;
for ( key in options ) {
this._setOption( key, options[ key ] );
}
return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
if ( key === "disabled" ) {
this.widget()
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
.attr( "aria-disabled", value );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
}
return this;
},
enable: function() {
return this._setOption( "disabled", false );
},
disable: function() {
return this._setOption( "disabled", true );
},
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement,
instance = this;
// no suppressDisabledCheck flag, shuffle arguments
if ( typeof suppressDisabledCheck !== "boolean" ) {
handlers = element;
element = suppressDisabledCheck;
suppressDisabledCheck = false;
}
// no element argument, shuffle and use this.element
if ( !handlers ) {
handlers = element;
element = this.element;
delegateElement = this.widget();
} else {
// accept selectors, DOM elements
element = delegateElement = $( element );
this.bindings = this.bindings.add( element );
}
$.each( handlers, function( event, handler ) {
function handlerProxy() {
// allow widgets to customize the disabled handling
// - disabled as an array instead of boolean
// - disabled class as method for disabling individual parts
if ( !suppressDisabledCheck &&
( instance.options.disabled === true ||
$( this ).hasClass( "ui-state-disabled" ) ) ) {
return;
}
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
// copy the guid so direct unbinding works
if ( typeof handler !== "string" ) {
handlerProxy.guid = handler.guid =
handler.guid || handlerProxy.guid || $.guid++;
}
var match = event.match( /^(\w+)\s*(.*)$/ ),
eventName = match[1] + instance.eventNamespace,
selector = match[2];
if ( selector ) {
delegateElement.delegate( selector, eventName, handlerProxy );
} else {
element.bind( eventName, handlerProxy );
}
});
},
_off: function( element, eventName ) {
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
element.unbind( eventName ).undelegate( eventName );
},
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
var instance = this;
return setTimeout( handlerProxy, delay || 0 );
},
_hoverable: function( element ) {
this.hoverable = this.hoverable.add( element );
this._on( element, {
mouseenter: function( event ) {
$( event.currentTarget ).addClass( "ui-state-hover" );
},
mouseleave: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-hover" );
}
});
},
_focusable: function( element ) {
this.focusable = this.focusable.add( element );
this._on( element, {
focusin: function( event ) {
$( event.currentTarget ).addClass( "ui-state-focus" );
},
focusout: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-focus" );
}
});
},
_trigger: function( type, event, data ) {
var prop, orig,
callback = this.options[ type ];
data = data || {};
event = $.Event( event );
event.type = ( type === this.widgetEventPrefix ?
type :
this.widgetEventPrefix + type ).toLowerCase();
// the original event may come from any element
// so we need to reset the target on the new event
event.target = this.element[ 0 ];
// copy original event properties over to the new event
orig = event.originalEvent;
if ( orig ) {
for ( prop in orig ) {
if ( !( prop in event ) ) {
event[ prop ] = orig[ prop ];
}
}
}
this.element.trigger( event, data );
return !( $.isFunction( callback ) &&
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
event.isDefaultPrevented() );
}
};
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
if ( typeof options === "string" ) {
options = { effect: options };
}
var hasOptions,
effectName = !options ?
method :
options === true || typeof options === "number" ?
defaultEffect :
options.effect || defaultEffect;
options = options || {};
if ( typeof options === "number" ) {
options = { duration: options };
}
hasOptions = !$.isEmptyObject( options );
options.complete = callback;
if ( options.delay ) {
element.delay( options.delay );
}
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
element[ method ]( options );
} else if ( effectName !== method && element[ effectName ] ) {
element[ effectName ]( options.duration, options.easing, callback );
} else {
element.queue(function( next ) {
$( this )[ method ]();
if ( callback ) {
callback.call( element[ 0 ] );
}
next();
});
}
};
});
})( jQuery );
(function( $, undefined ) {
var mouseHandled = false;
$( document ).mouseup( function() {
mouseHandled = false;
});
$.widget("ui.mouse", {
version: "1.10.3",
options: {
cancel: "input,textarea,button,select,option",
distance: 1,
delay: 0
},
_mouseInit: function() {
var that = this;
this.element
.bind("mousedown."+this.widgetName, function(event) {
return that._mouseDown(event);
})
.bind("click."+this.widgetName, function(event) {
if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
$.removeData(event.target, that.widgetName + ".preventClickEvent");
event.stopImmediatePropagation();
return false;
}
});
this.started = false;
},
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind("."+this.widgetName);
if ( this._mouseMoveDelegate ) {
$(document)
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
}
},
_mouseDown: function(event) {
// don't let more than one widget handle mouseStart
if( mouseHandled ) { return; }
// we may have missed mouseup (out of window)
(this._mouseStarted && this._mouseUp(event));
this._mouseDownEvent = event;
var that = this,
btnIsLeft = (event.which === 1),
// event.target.nodeName works around a bug in IE 8 with
// disabled inputs (#7620)
elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
return true;
}
this.mouseDelayMet = !this.options.delay;
if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function() {
that.mouseDelayMet = true;
}, this.options.delay);
}
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
this._mouseStarted = (this._mouseStart(event) !== false);
if (!this._mouseStarted) {
event.preventDefault();
return true;
}
}
// Click event may never have fired (Gecko & Opera)
if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
$.removeData(event.target, this.widgetName + ".preventClickEvent");
}
// these delegates are required to keep context
this._mouseMoveDelegate = function(event) {
return that._mouseMove(event);
};
this._mouseUpDelegate = function(event) {
return that._mouseUp(event);
};
$(document)
.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.bind("mouseup."+this.widgetName, this._mouseUpDelegate);
event.preventDefault();
mouseHandled = true;
return true;
},
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
return this._mouseUp(event);
}
if (this._mouseStarted) {
this._mouseDrag(event);
return event.preventDefault();
}
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
this._mouseStarted =
(this._mouseStart(this._mouseDownEvent, event) !== false);
(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
}
return !this._mouseStarted;
},
_mouseUp: function(event) {
$(document)
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
if (this._mouseStarted) {
this._mouseStarted = false;
if (event.target === this._mouseDownEvent.target) {
$.data(event.target, this.widgetName + ".preventClickEvent", true);
}
this._mouseStop(event);
}
return false;
},
_mouseDistanceMet: function(event) {
return (Math.max(
Math.abs(this._mouseDownEvent.pageX - event.pageX),
Math.abs(this._mouseDownEvent.pageY - event.pageY)
) >= this.options.distance
);
},
_mouseDelayMet: function(/* event */) {
return this.mouseDelayMet;
},
// These are placeholder methods, to be overriden by extending plugin
_mouseStart: function(/* event */) {},
_mouseDrag: function(/* event */) {},
_mouseStop: function(/* event */) {},
_mouseCapture: function(/* event */) { return true; }
});
})(jQuery);
(function( $, undefined ) {
$.ui = $.ui || {};
var cachedScrollbarWidth,
max = Math.max,
abs = Math.abs,
round = Math.round,
rhorizontal = /left|center|right/,
rvertical = /top|center|bottom/,
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
rposition = /^\w+/,
rpercent = /%$/,
_position = $.fn.position;
function getOffsets( offsets, width, height ) {
return [
parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
];
}
function parseCss( element, property ) {
return parseInt( $.css( element, property ), 10 ) || 0;
}
function getDimensions( elem ) {
var raw = elem[0];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
height: elem.height(),
offset: { top: 0, left: 0 }
};
}
if ( $.isWindow( raw ) ) {
return {
width: elem.width(),
height: elem.height(),
offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
};
}
if ( raw.preventDefault ) {
return {
width: 0,
height: 0,
offset: { top: raw.pageY, left: raw.pageX }
};
}
return {
width: elem.outerWidth(),
height: elem.outerHeight(),
offset: elem.offset()
};
}
$.position = {
scrollbarWidth: function() {
if ( cachedScrollbarWidth !== undefined ) {
return cachedScrollbarWidth;
}
var w1, w2,
div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
innerDiv = div.children()[0];
$( "body" ).append( div );
w1 = innerDiv.offsetWidth;
div.css( "overflow", "scroll" );
w2 = innerDiv.offsetWidth;
if ( w1 === w2 ) {
w2 = div[0].clientWidth;
}
div.remove();
return (cachedScrollbarWidth = w1 - w2);
},
getScrollInfo: function( within ) {
var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
hasOverflowX = overflowX === "scroll" ||
( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
hasOverflowY = overflowY === "scroll" ||
( overflowY === "auto" && within.height < within.element[0].scrollHeight );
return {
width: hasOverflowY ? $.position.scrollbarWidth() : 0,
height: hasOverflowX ? $.position.scrollbarWidth() : 0
};
},
getWithinInfo: function( element ) {
var withinElement = $( element || window ),
isWindow = $.isWindow( withinElement[0] );
return {
element: withinElement,
isWindow: isWindow,
offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
width: isWindow ? withinElement.width() : withinElement.outerWidth(),
height: isWindow ? withinElement.height() : withinElement.outerHeight()
};
}
};
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
// make a copy, we don't want to modify arguments
options = $.extend( {}, options );
var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
target = $( options.of ),
within = $.position.getWithinInfo( options.within ),
scrollInfo = $.position.getScrollInfo( within ),
collision = ( options.collision || "flip" ).split( " " ),
offsets = {};
dimensions = getDimensions( target );
if ( target[0].preventDefault ) {
// force left top to allow flipping
options.at = "left top";
}
targetWidth = dimensions.width;
targetHeight = dimensions.height;
targetOffset = dimensions.offset;
// clone to reuse original targetOffset later
basePosition = $.extend( {}, targetOffset );
// force my and at to have valid horizontal and vertical positions
// if a value is missing or invalid, it will be converted to center
$.each( [ "my", "at" ], function() {
var pos = ( options[ this ] || "" ).split( " " ),
horizontalOffset,
verticalOffset;
if ( pos.length === 1) {
pos = rhorizontal.test( pos[ 0 ] ) ?
pos.concat( [ "center" ] ) :
rvertical.test( pos[ 0 ] ) ?
[ "center" ].concat( pos ) :
[ "center", "center" ];
}
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
// calculate offsets
horizontalOffset = roffset.exec( pos[ 0 ] );
verticalOffset = roffset.exec( pos[ 1 ] );
offsets[ this ] = [
horizontalOffset ? horizontalOffset[ 0 ] : 0,
verticalOffset ? verticalOffset[ 0 ] : 0
];
// reduce to just the positions without the offsets
options[ this ] = [
rposition.exec( pos[ 0 ] )[ 0 ],
rposition.exec( pos[ 1 ] )[ 0 ]
];
});
// normalize collision option
if ( collision.length === 1 ) {
collision[ 1 ] = collision[ 0 ];
}
if ( options.at[ 0 ] === "right" ) {
basePosition.left += targetWidth;
} else if ( options.at[ 0 ] === "center" ) {
basePosition.left += targetWidth / 2;
}
if ( options.at[ 1 ] === "bottom" ) {
basePosition.top += targetHeight;
} else if ( options.at[ 1 ] === "center" ) {
basePosition.top += targetHeight / 2;
}
atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
basePosition.left += atOffset[ 0 ];
basePosition.top += atOffset[ 1 ];
return this.each(function() {
var collisionPosition, using,
elem = $( this ),
elemWidth = elem.outerWidth(),
elemHeight = elem.outerHeight(),
marginLeft = parseCss( this, "marginLeft" ),
marginTop = parseCss( this, "marginTop" ),
collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
position = $.extend( {}, basePosition ),
myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
if ( options.my[ 0 ] === "right" ) {
position.left -= elemWidth;
} else if ( options.my[ 0 ] === "center" ) {
position.left -= elemWidth / 2;
}
if ( options.my[ 1 ] === "bottom" ) {
position.top -= elemHeight;
} else if ( options.my[ 1 ] === "center" ) {
position.top -= elemHeight / 2;
}
position.left += myOffset[ 0 ];
position.top += myOffset[ 1 ];
// if the browser doesn't support fractions, then round for consistent results
if ( !$.support.offsetFractions ) {
position.left = round( position.left );
position.top = round( position.top );
}
collisionPosition = {
marginLeft: marginLeft,
marginTop: marginTop
};
$.each( [ "left", "top" ], function( i, dir ) {
if ( $.ui.position[ collision[ i ] ] ) {
$.ui.position[ collision[ i ] ][ dir ]( position, {
targetWidth: targetWidth,
targetHeight: targetHeight,
elemWidth: elemWidth,
elemHeight: elemHeight,
collisionPosition: collisionPosition,
collisionWidth: collisionWidth,
collisionHeight: collisionHeight,
offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
my: options.my,
at: options.at,
within: within,
elem : elem
});
}
});
if ( options.using ) {
// adds feedback as second argument to using callback, if present
using = function( props ) {
var left = targetOffset.left - position.left,
right = left + targetWidth - elemWidth,
top = targetOffset.top - position.top,
bottom = top + targetHeight - elemHeight,
feedback = {
target: {
element: target,
left: targetOffset.left,
top: targetOffset.top,
width: targetWidth,
height: targetHeight
},
element: {
element: elem,
left: position.left,
top: position.top,
width: elemWidth,
height: elemHeight
},
horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
};
if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
feedback.horizontal = "center";
}
if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
feedback.vertical = "middle";
}
if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
feedback.important = "horizontal";
} else {
feedback.important = "vertical";
}
options.using.call( this, props, feedback );
};
}
elem.offset( $.extend( position, { using: using } ) );
});
};
$.ui.position = {
fit: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
outerWidth = within.width,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = withinOffset - collisionPosLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
newOverRight;
// element is wider than within
if ( data.collisionWidth > outerWidth ) {
// element is initially over the left side of within
if ( overLeft > 0 && overRight <= 0 ) {
newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
position.left += overLeft - newOverRight;
// element is initially over right side of within
} else if ( overRight > 0 && overLeft <= 0 ) {
position.left = withinOffset;
// element is initially over both left and right sides of within
} else {
if ( overLeft > overRight ) {
position.left = withinOffset + outerWidth - data.collisionWidth;
} else {
position.left = withinOffset;
}
}
// too far left -> align with left edge
} else if ( overLeft > 0 ) {
position.left += overLeft;
// too far right -> align with right edge
} else if ( overRight > 0 ) {
position.left -= overRight;
// adjust based on position and margin
} else {
position.left = max( position.left - collisionPosLeft, position.left );
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = withinOffset - collisionPosTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
newOverBottom;
// element is taller than within
if ( data.collisionHeight > outerHeight ) {
// element is initially over the top of within
if ( overTop > 0 && overBottom <= 0 ) {
newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
position.top += overTop - newOverBottom;
// element is initially over bottom of within
} else if ( overBottom > 0 && overTop <= 0 ) {
position.top = withinOffset;
// element is initially over both top and bottom of within
} else {
if ( overTop > overBottom ) {
position.top = withinOffset + outerHeight - data.collisionHeight;
} else {
position.top = withinOffset;
}
}
// too far up -> align with top
} else if ( overTop > 0 ) {
position.top += overTop;
// too far down -> align with bottom edge
} else if ( overBottom > 0 ) {
position.top -= overBottom;
// adjust based on position and margin
} else {
position.top = max( position.top - collisionPosTop, position.top );
}
}
},
flip: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = collisionPosLeft - offsetLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
myOffset = data.my[ 0 ] === "left" ?
-data.elemWidth :
data.my[ 0 ] === "right" ?
data.elemWidth :
0,
atOffset = data.at[ 0 ] === "left" ?
data.targetWidth :
data.at[ 0 ] === "right" ?
-data.targetWidth :
0,
offset = -2 * data.offset[ 0 ],
newOverRight,
newOverLeft;
if ( overLeft < 0 ) {
newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
position.left += myOffset + atOffset + offset;
}
}
else if ( overRight > 0 ) {
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
position.left += myOffset + atOffset + offset;
}
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = collisionPosTop - offsetTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
top = data.my[ 1 ] === "top",
myOffset = top ?
-data.elemHeight :
data.my[ 1 ] === "bottom" ?
data.elemHeight :
0,
atOffset = data.at[ 1 ] === "top" ?
data.targetHeight :
data.at[ 1 ] === "bottom" ?
-data.targetHeight :
0,
offset = -2 * data.offset[ 1 ],
newOverTop,
newOverBottom;
if ( overTop < 0 ) {
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
position.top += myOffset + atOffset + offset;
}
}
else if ( overBottom > 0 ) {
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
position.top += myOffset + atOffset + offset;
}
}
}
},
flipfit: {
left: function() {
$.ui.position.flip.left.apply( this, arguments );
$.ui.position.fit.left.apply( this, arguments );
},
top: function() {
$.ui.position.flip.top.apply( this, arguments );
$.ui.position.fit.top.apply( this, arguments );
}
}
};
// fraction support test
(function () {
var testElement, testElementParent, testElementStyle, offsetLeft, i,
body = document.getElementsByTagName( "body" )[ 0 ],
div = document.createElement( "div" );
//Create a "fake body" for testing based on method used in jQuery.support
testElement = document.createElement( body ? "div" : "body" );
testElementStyle = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
margin: 0,
background: "none"
};
if ( body ) {
$.extend( testElementStyle, {
position: "absolute",
left: "-1000px",
top: "-1000px"
});
}
for ( i in testElementStyle ) {
testElement.style[ i ] = testElementStyle[ i ];
}
testElement.appendChild( div );
testElementParent = body || document.documentElement;
testElementParent.insertBefore( testElement, testElementParent.firstChild );
div.style.cssText = "position: absolute; left: 10.7432222px;";
offsetLeft = $( div ).offset().left;
$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
testElement.innerHTML = "";
testElementParent.removeChild( testElement );
})();
}( jQuery ) );
(function( $, undefined ) {
var uid = 0,
hideProps = {},
showProps = {};
hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
showProps.height = showProps.paddingTop = showProps.paddingBottom =
showProps.borderTopWidth = showProps.borderBottomWidth = "show";
$.widget( "ui.accordion", {
version: "1.10.3",
options: {
active: 0,
animate: {},
collapsible: false,
event: "click",
header: "> li > :first-child,> :not(li):even",
heightStyle: "auto",
icons: {
activeHeader: "ui-icon-triangle-1-s",
header: "ui-icon-triangle-1-e"
},
// callbacks
activate: null,
beforeActivate: null
},
_create: function() {
var options = this.options;
this.prevShow = this.prevHide = $();
this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
// ARIA
.attr( "role", "tablist" );
// don't allow collapsible: false and active: false / null
if ( !options.collapsible && (options.active === false || options.active == null) ) {
options.active = 0;
}
this._processPanels();
// handle negative values
if ( options.active < 0 ) {
options.active += this.headers.length;
}
this._refresh();
},
_getCreateEventData: function() {
return {
header: this.active,
panel: !this.active.length ? $() : this.active.next(),
content: !this.active.length ? $() : this.active.next()
};
},
_createIcons: function() {
var icons = this.options.icons;
if ( icons ) {
$( "<span>" )
.addClass( "ui-accordion-header-icon ui-icon " + icons.header )
.prependTo( this.headers );
this.active.children( ".ui-accordion-header-icon" )
.removeClass( icons.header )
.addClass( icons.activeHeader );
this.headers.addClass( "ui-accordion-icons" );
}
},
_destroyIcons: function() {
this.headers
.removeClass( "ui-accordion-icons" )
.children( ".ui-accordion-header-icon" )
.remove();
},
_destroy: function() {
var contents;
// clean up main element
this.element
.removeClass( "ui-accordion ui-widget ui-helper-reset" )
.removeAttr( "role" );
// clean up headers
this.headers
.removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
.removeAttr( "role" )
.removeAttr( "aria-selected" )
.removeAttr( "aria-controls" )
.removeAttr( "tabIndex" )
.each(function() {
if ( /^ui-accordion/.test( this.id ) ) {
this.removeAttribute( "id" );
}
});
this._destroyIcons();
// clean up content panels
contents = this.headers.next()
.css( "display", "" )
.removeAttr( "role" )
.removeAttr( "aria-expanded" )
.removeAttr( "aria-hidden" )
.removeAttr( "aria-labelledby" )
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
.each(function() {
if ( /^ui-accordion/.test( this.id ) ) {
this.removeAttribute( "id" );
}
});
if ( this.options.heightStyle !== "content" ) {
contents.css( "height", "" );
}
},
_setOption: function( key, value ) {
if ( key === "active" ) {
// _activate() will handle invalid values and update this.options
this._activate( value );
return;
}
if ( key === "event" ) {
if ( this.options.event ) {
this._off( this.headers, this.options.event );
}
this._setupEvents( value );
}
this._super( key, value );
// setting collapsible: false while collapsed; open first panel
if ( key === "collapsible" && !value && this.options.active === false ) {
this._activate( 0 );
}
if ( key === "icons" ) {
this._destroyIcons();
if ( value ) {
this._createIcons();
}
}
// #5332 - opacity doesn't cascade to positioned elements in IE
// so we need to add the disabled class to the headers and panels
if ( key === "disabled" ) {
this.headers.add( this.headers.next() )
.toggleClass( "ui-state-disabled", !!value );
}
},
_keydown: function( event ) {
/*jshint maxcomplexity:15*/
if ( event.altKey || event.ctrlKey ) {
return;
}
var keyCode = $.ui.keyCode,
length = this.headers.length,
currentIndex = this.headers.index( event.target ),
toFocus = false;
switch ( event.keyCode ) {
case keyCode.RIGHT:
case keyCode.DOWN:
toFocus = this.headers[ ( currentIndex + 1 ) % length ];
break;
case keyCode.LEFT:
case keyCode.UP:
toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
break;
case keyCode.SPACE:
case keyCode.ENTER:
this._eventHandler( event );
break;
case keyCode.HOME:
toFocus = this.headers[ 0 ];
break;
case keyCode.END:
toFocus = this.headers[ length - 1 ];
break;
}
if ( toFocus ) {
$( event.target ).attr( "tabIndex", -1 );
$( toFocus ).attr( "tabIndex", 0 );
toFocus.focus();
event.preventDefault();
}
},
_panelKeyDown : function( event ) {
if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
$( event.currentTarget ).prev().focus();
}
},
refresh: function() {
var options = this.options;
this._processPanels();
// was collapsed or no panel
if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
options.active = false;
this.active = $();
// active false only when collapsible is true
} else if ( options.active === false ) {
this._activate( 0 );
// was active, but active panel is gone
} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
// all remaining panel are disabled
if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
options.active = false;
this.active = $();
// activate previous panel
} else {
this._activate( Math.max( 0, options.active - 1 ) );
}
// was active, active panel still exists
} else {
// make sure active index is correct
options.active = this.headers.index( this.active );
}
this._destroyIcons();
this._refresh();
},
_processPanels: function() {
this.headers = this.element.find( this.options.header )
.addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
this.headers.next()
.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
.filter(":not(.ui-accordion-content-active)")
.hide();
},
_refresh: function() {
var maxHeight,
options = this.options,
heightStyle = options.heightStyle,
parent = this.element.parent(),
accordionId = this.accordionId = "ui-accordion-" +
(this.element.attr( "id" ) || ++uid);
this.active = this._findActive( options.active )
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
.removeClass( "ui-corner-all" );
this.active.next()
.addClass( "ui-accordion-content-active" )
.show();
this.headers
.attr( "role", "tab" )
.each(function( i ) {
var header = $( this ),
headerId = header.attr( "id" ),
panel = header.next(),
panelId = panel.attr( "id" );
if ( !headerId ) {
headerId = accordionId + "-header-" + i;
header.attr( "id", headerId );
}
if ( !panelId ) {
panelId = accordionId + "-panel-" + i;
panel.attr( "id", panelId );
}
header.attr( "aria-controls", panelId );
panel.attr( "aria-labelledby", headerId );
})
.next()
.attr( "role", "tabpanel" );
this.headers
.not( this.active )
.attr({
"aria-selected": "false",
tabIndex: -1
})
.next()
.attr({
"aria-expanded": "false",
"aria-hidden": "true"
})
.hide();
// make sure at least one header is in the tab order
if ( !this.active.length ) {
this.headers.eq( 0 ).attr( "tabIndex", 0 );
} else {
this.active.attr({
"aria-selected": "true",
tabIndex: 0
})
.next()
.attr({
"aria-expanded": "true",
"aria-hidden": "false"
});
}
this._createIcons();
this._setupEvents( options.event );
if ( heightStyle === "fill" ) {
maxHeight = parent.height();
this.element.siblings( ":visible" ).each(function() {
var elem = $( this ),
position = elem.css( "position" );
if ( position === "absolute" || position === "fixed" ) {
return;
}
maxHeight -= elem.outerHeight( true );
});
this.headers.each(function() {
maxHeight -= $( this ).outerHeight( true );
});
this.headers.next()
.each(function() {
$( this ).height( Math.max( 0, maxHeight -
$( this ).innerHeight() + $( this ).height() ) );
})
.css( "overflow", "auto" );
} else if ( heightStyle === "auto" ) {
maxHeight = 0;
this.headers.next()
.each(function() {
maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
})
.height( maxHeight );
}
},
_activate: function( index ) {
var active = this._findActive( index )[ 0 ];
// trying to activate the already active panel
if ( active === this.active[ 0 ] ) {
return;
}
// trying to collapse, simulate a click on the currently active header
active = active || this.active[ 0 ];
this._eventHandler({
target: active,
currentTarget: active,
preventDefault: $.noop
});
},
_findActive: function( selector ) {
return typeof selector === "number" ? this.headers.eq( selector ) : $();
},
_setupEvents: function( event ) {
var events = {
keydown: "_keydown"
};
if ( event ) {
$.each( event.split(" "), function( index, eventName ) {
events[ eventName ] = "_eventHandler";
});
}
this._off( this.headers.add( this.headers.next() ) );
this._on( this.headers, events );
this._on( this.headers.next(), { keydown: "_panelKeyDown" });
this._hoverable( this.headers );
this._focusable( this.headers );
},
_eventHandler: function( event ) {
var options = this.options,
active = this.active,
clicked = $( event.currentTarget ),
clickedIsActive = clicked[ 0 ] === active[ 0 ],
collapsing = clickedIsActive && options.collapsible,
toShow = collapsing ? $() : clicked.next(),
toHide = active.next(),
eventData = {
oldHeader: active,
oldPanel: toHide,
newHeader: collapsing ? $() : clicked,
newPanel: toShow
};
event.preventDefault();
if (
// click on active header, but not collapsible
( clickedIsActive && !options.collapsible ) ||
// allow canceling activation
( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
return;
}
options.active = collapsing ? false : this.headers.index( clicked );
// when the call to ._toggle() comes after the class changes
// it causes a very odd bug in IE 8 (see #6720)
this.active = clickedIsActive ? $() : clicked;
this._toggle( eventData );
// switch classes
// corner classes on the previously active header stay after the animation
active.removeClass( "ui-accordion-header-active ui-state-active" );
if ( options.icons ) {
active.children( ".ui-accordion-header-icon" )
.removeClass( options.icons.activeHeader )
.addClass( options.icons.header );
}
if ( !clickedIsActive ) {
clicked
.removeClass( "ui-corner-all" )
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
if ( options.icons ) {
clicked.children( ".ui-accordion-header-icon" )
.removeClass( options.icons.header )
.addClass( options.icons.activeHeader );
}
clicked
.next()
.addClass( "ui-accordion-content-active" );
}
},
_toggle: function( data ) {
var toShow = data.newPanel,
toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
// handle activating a panel during the animation for another activation
this.prevShow.add( this.prevHide ).stop( true, true );
this.prevShow = toShow;
this.prevHide = toHide;
if ( this.options.animate ) {
this._animate( toShow, toHide, data );
} else {
toHide.hide();
toShow.show();
this._toggleComplete( data );
}
toHide.attr({
"aria-expanded": "false",
"aria-hidden": "true"
});
toHide.prev().attr( "aria-selected", "false" );
// if we're switching panels, remove the old header from the tab order
// if we're opening from collapsed state, remove the previous header from the tab order
// if we're collapsing, then keep the collapsing header in the tab order
if ( toShow.length && toHide.length ) {
toHide.prev().attr( "tabIndex", -1 );
} else if ( toShow.length ) {
this.headers.filter(function() {
return $( this ).attr( "tabIndex" ) === 0;
})
.attr( "tabIndex", -1 );
}
toShow
.attr({
"aria-expanded": "true",
"aria-hidden": "false"
})
.prev()
.attr({
"aria-selected": "true",
tabIndex: 0
});
},
_animate: function( toShow, toHide, data ) {
var total, easing, duration,
that = this,
adjust = 0,
down = toShow.length &&
( !toHide.length || ( toShow.index() < toHide.index() ) ),
animate = this.options.animate || {},
options = down && animate.down || animate,
complete = function() {
that._toggleComplete( data );
};
if ( typeof options === "number" ) {
duration = options;
}
if ( typeof options === "string" ) {
easing = options;
}
// fall back from options to animation in case of partial down settings
easing = easing || options.easing || animate.easing;
duration = duration || options.duration || animate.duration;
if ( !toHide.length ) {
return toShow.animate( showProps, duration, easing, complete );
}
if ( !toShow.length ) {
return toHide.animate( hideProps, duration, easing, complete );
}
total = toShow.show().outerHeight();
toHide.animate( hideProps, {
duration: duration,
easing: easing,
step: function( now, fx ) {
fx.now = Math.round( now );
}
});
toShow
.hide()
.animate( showProps, {
duration: duration,
easing: easing,
complete: complete,
step: function( now, fx ) {
fx.now = Math.round( now );
if ( fx.prop !== "height" ) {
adjust += fx.now;
} else if ( that.options.heightStyle !== "content" ) {
fx.now = Math.round( total - toHide.outerHeight() - adjust );
adjust = 0;
}
}
});
},
_toggleComplete: function( data ) {
var toHide = data.oldPanel;
toHide
.removeClass( "ui-accordion-content-active" )
.prev()
.removeClass( "ui-corner-top" )
.addClass( "ui-corner-all" );
// Work around for rendering bug in IE (#5421)
if ( toHide.length ) {
toHide.parent()[0].className = toHide.parent()[0].className;
}
this._trigger( "activate", null, data );
}
});
})( jQuery );
(function( $, undefined ) {
$.widget( "ui.progressbar", {
version: "1.10.3",
options: {
max: 100,
value: 0,
change: null,
complete: null
},
min: 0,
_create: function() {
// Constrain initial value
this.oldValue = this.options.value = this._constrainedValue();
this.element
.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
.attr({
// Only set static values, aria-valuenow and aria-valuemax are
// set inside _refreshValue()
role: "progressbar",
"aria-valuemin": this.min
});
this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
.appendTo( this.element );
this._refreshValue();
},
_destroy: function() {
this.element
.removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
.removeAttr( "role" )
.removeAttr( "aria-valuemin" )
.removeAttr( "aria-valuemax" )
.removeAttr( "aria-valuenow" );
this.valueDiv.remove();
},
value: function( newValue ) {
if ( newValue === undefined ) {
return this.options.value;
}
this.options.value = this._constrainedValue( newValue );
this._refreshValue();
},
_constrainedValue: function( newValue ) {
if ( newValue === undefined ) {
newValue = this.options.value;
}
this.indeterminate = newValue === false;
// sanitize value
if ( typeof newValue !== "number" ) {
newValue = 0;
}
return this.indeterminate ? false :
Math.min( this.options.max, Math.max( this.min, newValue ) );
},
_setOptions: function( options ) {
// Ensure "value" option is set after other values (like max)
var value = options.value;
delete options.value;
this._super( options );
this.options.value = this._constrainedValue( value );
this._refreshValue();
},
_setOption: function( key, value ) {
if ( key === "max" ) {
// Don't allow a max less than min
value = Math.max( this.min, value );
}
this._super( key, value );
},
_percentage: function() {
return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
},
_refreshValue: function() {
var value = this.options.value,
percentage = this._percentage();
this.valueDiv
.toggle( this.indeterminate || value > this.min )
.toggleClass( "ui-corner-right", value === this.options.max )
.width( percentage.toFixed(0) + "%" );
this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate );
if ( this.indeterminate ) {
this.element.removeAttr( "aria-valuenow" );
if ( !this.overlayDiv ) {
this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv );
}
} else {
this.element.attr({
"aria-valuemax": this.options.max,
"aria-valuenow": value
});
if ( this.overlayDiv ) {
this.overlayDiv.remove();
this.overlayDiv = null;
}
}
if ( this.oldValue !== value ) {
this.oldValue = value;
this._trigger( "change" );
}
if ( value === this.options.max ) {
this._trigger( "complete" );
}
}
});
})( jQuery );
(function( $, undefined ) {
// number of pages in a slider
// (how many times can you page up/down to go through the whole range)
var numPages = 5;
$.widget( "ui.slider", $.ui.mouse, {
version: "1.10.3",
widgetEventPrefix: "slide",
options: {
animate: false,
distance: 0,
max: 100,
min: 0,
orientation: "horizontal",
range: false,
step: 1,
value: 0,
values: null,
// callbacks
change: null,
slide: null,
start: null,
stop: null
},
_create: function() {
this._keySliding = false;
this._mouseSliding = false;
this._animateOff = true;
this._handleIndex = null;
this._detectOrientation();
this._mouseInit();
this.element
.addClass( "ui-slider" +
" ui-slider-" + this.orientation +
" ui-widget" +
" ui-widget-content" +
" ui-corner-all");
this._refresh();
this._setOption( "disabled", this.options.disabled );
this._animateOff = false;
},
_refresh: function() {
this._createRange();
this._createHandles();
this._setupEvents();
this._refreshValue();
},
_createHandles: function() {
var i, handleCount,
options = this.options,
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
handles = [];
handleCount = ( options.values && options.values.length ) || 1;
if ( existingHandles.length > handleCount ) {
existingHandles.slice( handleCount ).remove();
existingHandles = existingHandles.slice( 0, handleCount );
}
for ( i = existingHandles.length; i < handleCount; i++ ) {
handles.push( handle );
}
this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
this.handle = this.handles.eq( 0 );
this.handles.each(function( i ) {
$( this ).data( "ui-slider-handle-index", i );
});
},
_createRange: function() {
var options = this.options,
classes = "";
if ( options.range ) {
if ( options.range === true ) {
if ( !options.values ) {
options.values = [ this._valueMin(), this._valueMin() ];
} else if ( options.values.length && options.values.length !== 2 ) {
options.values = [ options.values[0], options.values[0] ];
} else if ( $.isArray( options.values ) ) {
options.values = options.values.slice(0);
}
}
if ( !this.range || !this.range.length ) {
this.range = $( "<div></div>" )
.appendTo( this.element );
classes = "ui-slider-range" +
// note: this isn't the most fittingly semantic framework class for this element,
// but worked best visually with a variety of themes
" ui-widget-header ui-corner-all";
} else {
this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
// Handle range switching from true to min/max
.css({
"left": "",
"bottom": ""
});
}
this.range.addClass( classes +
( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
} else {
this.range = $([]);
}
},
_setupEvents: function() {
var elements = this.handles.add( this.range ).filter( "a" );
this._off( elements );
this._on( elements, this._handleEvents );
this._hoverable( elements );
this._focusable( elements );
},
_destroy: function() {
this.handles.remove();
this.range.remove();
this.element
.removeClass( "ui-slider" +
" ui-slider-horizontal" +
" ui-slider-vertical" +
" ui-widget" +
" ui-widget-content" +
" ui-corner-all" );
this._mouseDestroy();
},
_mouseCapture: function( event ) {
var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
that = this,
o = this.options;
if ( o.disabled ) {
return false;
}
this.elementSize = {
width: this.element.outerWidth(),
height: this.element.outerHeight()
};
this.elementOffset = this.element.offset();
position = { x: event.pageX, y: event.pageY };
normValue = this._normValueFromMouse( position );
distance = this._valueMax() - this._valueMin() + 1;
this.handles.each(function( i ) {
var thisDistance = Math.abs( normValue - that.values(i) );
if (( distance > thisDistance ) ||
( distance === thisDistance &&
(i === that._lastChangedValue || that.values(i) === o.min ))) {
distance = thisDistance;
closestHandle = $( this );
index = i;
}
});
allowed = this._start( event, index );
if ( allowed === false ) {
return false;
}
this._mouseSliding = true;
this._handleIndex = index;
closestHandle
.addClass( "ui-state-active" )
.focus();
offset = closestHandle.offset();
mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
top: event.pageY - offset.top -
( closestHandle.height() / 2 ) -
( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
};
if ( !this.handles.hasClass( "ui-state-hover" ) ) {
this._slide( event, index, normValue );
}
this._animateOff = true;
return true;
},
_mouseStart: function() {
return true;
},
_mouseDrag: function( event ) {
var position = { x: event.pageX, y: event.pageY },
normValue = this._normValueFromMouse( position );
this._slide( event, this._handleIndex, normValue );
return false;
},
_mouseStop: function( event ) {
this.handles.removeClass( "ui-state-active" );
this._mouseSliding = false;
this._stop( event, this._handleIndex );
this._change( event, this._handleIndex );
this._handleIndex = null;
this._clickOffset = null;
this._animateOff = false;
return false;
},
_detectOrientation: function() {
this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
},
_normValueFromMouse: function( position ) {
var pixelTotal,
pixelMouse,
percentMouse,
valueTotal,
valueMouse;
if ( this.orientation === "horizontal" ) {
pixelTotal = this.elementSize.width;
pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
} else {
pixelTotal = this.elementSize.height;
pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
}
percentMouse = ( pixelMouse / pixelTotal );
if ( percentMouse > 1 ) {
percentMouse = 1;
}
if ( percentMouse < 0 ) {
percentMouse = 0;
}
if ( this.orientation === "vertical" ) {
percentMouse = 1 - percentMouse;
}
valueTotal = this._valueMax() - this._valueMin();
valueMouse = this._valueMin() + percentMouse * valueTotal;
return this._trimAlignValue( valueMouse );
},
_start: function( event, index ) {
var uiHash = {
handle: this.handles[ index ],
value: this.value()
};
if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values( index );
uiHash.values = this.values();
}
return this._trigger( "start", event, uiHash );
},
_slide: function( event, index, newVal ) {
var otherVal,
newValues,
allowed;
if ( this.options.values && this.options.values.length ) {
otherVal = this.values( index ? 0 : 1 );
if ( ( this.options.values.length === 2 && this.options.range === true ) &&
( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
) {
newVal = otherVal;
}
if ( newVal !== this.values( index ) ) {
newValues = this.values();
newValues[ index ] = newVal;
// A slide can be canceled by returning false from the slide callback
allowed = this._trigger( "slide", event, {
handle: this.handles[ index ],
value: newVal,
values: newValues
} );
otherVal = this.values( index ? 0 : 1 );
if ( allowed !== false ) {
this.values( index, newVal, true );
}
}
} else {
if ( newVal !== this.value() ) {
// A slide can be canceled by returning false from the slide callback
allowed = this._trigger( "slide", event, {
handle: this.handles[ index ],
value: newVal
} );
if ( allowed !== false ) {
this.value( newVal );
}
}
}
},
_stop: function( event, index ) {
var uiHash = {
handle: this.handles[ index ],
value: this.value()
};
if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values( index );
uiHash.values = this.values();
}
this._trigger( "stop", event, uiHash );
},
_change: function( event, index ) {
if ( !this._keySliding && !this._mouseSliding ) {
var uiHash = {
handle: this.handles[ index ],
value: this.value()
};
if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values( index );
uiHash.values = this.values();
}
//store the last changed value index for reference when handles overlap
this._lastChangedValue = index;
this._trigger( "change", event, uiHash );
}
},
value: function( newValue ) {
if ( arguments.length ) {
this.options.value = this._trimAlignValue( newValue );
this._refreshValue();
this._change( null, 0 );
return;
}
return this._value();
},
values: function( index, newValue ) {
var vals,
newValues,
i;
if ( arguments.length > 1 ) {
this.options.values[ index ] = this._trimAlignValue( newValue );
this._refreshValue();
this._change( null, index );
return;
}
if ( arguments.length ) {
if ( $.isArray( arguments[ 0 ] ) ) {
vals = this.options.values;
newValues = arguments[ 0 ];
for ( i = 0; i < vals.length; i += 1 ) {
vals[ i ] = this._trimAlignValue( newValues[ i ] );
this._change( null, i );
}
this._refreshValue();
} else {
if ( this.options.values && this.options.values.length ) {
return this._values( index );
} else {
return this.value();
}
}
} else {
return this._values();
}
},
_setOption: function( key, value ) {
var i,
valsLength = 0;
if ( key === "range" && this.options.range === true ) {
if ( value === "min" ) {
this.options.value = this._values( 0 );
this.options.values = null;
} else if ( value === "max" ) {
this.options.value = this._values( this.options.values.length-1 );
this.options.values = null;
}
}
if ( $.isArray( this.options.values ) ) {
valsLength = this.options.values.length;
}
$.Widget.prototype._setOption.apply( this, arguments );
switch ( key ) {
case "orientation":
this._detectOrientation();
this.element
.removeClass( "ui-slider-horizontal ui-slider-vertical" )
.addClass( "ui-slider-" + this.orientation );
this._refreshValue();
break;
case "value":
this._animateOff = true;
this._refreshValue();
this._change( null, 0 );
this._animateOff = false;
break;
case "values":
this._animateOff = true;
this._refreshValue();
for ( i = 0; i < valsLength; i += 1 ) {
this._change( null, i );
}
this._animateOff = false;
break;
case "min":
case "max":
this._animateOff = true;
this._refreshValue();
this._animateOff = false;
break;
case "range":
this._animateOff = true;
this._refresh();
this._animateOff = false;
break;
}
},
//internal value getter
// _value() returns value trimmed by min and max, aligned by step
_value: function() {
var val = this.options.value;
val = this._trimAlignValue( val );
return val;
},
//internal values getter
// _values() returns array of values trimmed by min and max, aligned by step
// _values( index ) returns single value trimmed by min and max, aligned by step
_values: function( index ) {
var val,
vals,
i;
if ( arguments.length ) {
val = this.options.values[ index ];
val = this._trimAlignValue( val );
return val;
} else if ( this.options.values && this.options.values.length ) {
// .slice() creates a copy of the array
// this copy gets trimmed by min and max and then returned
vals = this.options.values.slice();
for ( i = 0; i < vals.length; i+= 1) {
vals[ i ] = this._trimAlignValue( vals[ i ] );
}
return vals;
} else {
return [];
}
},
// returns the step-aligned value that val is closest to, between (inclusive) min and max
_trimAlignValue: function( val ) {
if ( val <= this._valueMin() ) {
return this._valueMin();
}
if ( val >= this._valueMax() ) {
return this._valueMax();
}
var step = ( this.options.step > 0 ) ? this.options.step : 1,
valModStep = (val - this._valueMin()) % step,
alignValue = val - valModStep;
if ( Math.abs(valModStep) * 2 >= step ) {
alignValue += ( valModStep > 0 ) ? step : ( -step );
}
// Since JavaScript has problems with large floats, round
// the final value to 5 digits after the decimal point (see #4124)
return parseFloat( alignValue.toFixed(5) );
},
_valueMin: function() {
return this.options.min;
},
_valueMax: function() {
return this.options.max;
},
_refreshValue: function() {
var lastValPercent, valPercent, value, valueMin, valueMax,
oRange = this.options.range,
o = this.options,
that = this,
animate = ( !this._animateOff ) ? o.animate : false,
_set = {};
if ( this.options.values && this.options.values.length ) {
this.handles.each(function( i ) {
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
if ( that.options.range === true ) {
if ( that.orientation === "horizontal" ) {
if ( i === 0 ) {
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
}
if ( i === 1 ) {
that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
}
} else {
if ( i === 0 ) {
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
}
if ( i === 1 ) {
that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
}
}
}
lastValPercent = valPercent;
});
} else {
value = this.value();
valueMin = this._valueMin();
valueMax = this._valueMax();
valPercent = ( valueMax !== valueMin ) ?
( value - valueMin ) / ( valueMax - valueMin ) * 100 :
0;
_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
if ( oRange === "min" && this.orientation === "horizontal" ) {
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
}
if ( oRange === "max" && this.orientation === "horizontal" ) {
this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
}
if ( oRange === "min" && this.orientation === "vertical" ) {
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
}
if ( oRange === "max" && this.orientation === "vertical" ) {
this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
}
}
},
_handleEvents: {
keydown: function( event ) {
/*jshint maxcomplexity:25*/
var allowed, curVal, newVal, step,
index = $( event.target ).data( "ui-slider-handle-index" );
switch ( event.keyCode ) {
case $.ui.keyCode.HOME:
case $.ui.keyCode.END:
case $.ui.keyCode.PAGE_UP:
case $.ui.keyCode.PAGE_DOWN:
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
event.preventDefault();
if ( !this._keySliding ) {
this._keySliding = true;
$( event.target ).addClass( "ui-state-active" );
allowed = this._start( event, index );
if ( allowed === false ) {
return;
}
}
break;
}
step = this.options.step;
if ( this.options.values && this.options.values.length ) {
curVal = newVal = this.values( index );
} else {
curVal = newVal = this.value();
}
switch ( event.keyCode ) {
case $.ui.keyCode.HOME:
newVal = this._valueMin();
break;
case $.ui.keyCode.END:
newVal = this._valueMax();
break;
case $.ui.keyCode.PAGE_UP:
newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
break;
case $.ui.keyCode.PAGE_DOWN:
newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
break;
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
if ( curVal === this._valueMax() ) {
return;
}
newVal = this._trimAlignValue( curVal + step );
break;
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
if ( curVal === this._valueMin() ) {
return;
}
newVal = this._trimAlignValue( curVal - step );
break;
}
this._slide( event, index, newVal );
},
click: function( event ) {
event.preventDefault();
},
keyup: function( event ) {
var index = $( event.target ).data( "ui-slider-handle-index" );
if ( this._keySliding ) {
this._keySliding = false;
this._stop( event, index );
this._change( event, index );
$( event.target ).removeClass( "ui-state-active" );
}
}
}
});
}(jQuery));
| nccgroup/typofinder | TypoMagic/js/jquery-ui-1.10.3.custom.js | JavaScript | agpl-3.0 | 78,447 | [
30522,
1013,
1008,
999,
1046,
4226,
2854,
21318,
1011,
1058,
2487,
1012,
2184,
1012,
1017,
1011,
2297,
1011,
5890,
1011,
2260,
1008,
8299,
1024,
1013,
1013,
1046,
4226,
2854,
10179,
1012,
4012,
1008,
2950,
1024,
1046,
4226,
2854,
1012,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright 2006-2011 The Kuali Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ecl2.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kuali.rice.kew.xml.export;
import org.kuali.rice.core.api.CoreApiServiceLocator;
import org.kuali.rice.kew.export.KewExportDataSet;
import org.kuali.rice.kim.api.group.Group;
import org.kuali.rice.kim.api.group.GroupService;
import org.kuali.rice.kim.api.identity.IdentityService;
import org.kuali.rice.kim.api.services.KimApiServiceLocator;
import org.kuali.rice.test.BaselineTestCase;
import java.util.List;
import static org.junit.Assert.assertTrue;
/**
* This is a description of what this class does - jjhanso don't forget to fill this in.
*
* @author Kuali Rice Team (rice.collab@kuali.org)
*
*/
@BaselineTestCase.BaselineMode(BaselineTestCase.Mode.NONE)
public class GroupXmlExporterTest extends XmlExporterTestCase {
/**
* This overridden method ...
*
* @see org.kuali.rice.kew.xml.export.XmlExporterTestCase#assertExport()
*/
@Override
protected void assertExport() throws Exception {
IdentityService identityService = KimApiServiceLocator.getIdentityService();
GroupService groupService = KimApiServiceLocator.getGroupService();
List<? extends Group> oldGroups = groupService.getGroupsByPrincipalId(
identityService.getPrincipalByPrincipalName("ewestfal").getPrincipalId());
KewExportDataSet dataSet = new KewExportDataSet();
dataSet.getGroups().addAll(oldGroups);
byte[] xmlBytes = CoreApiServiceLocator.getXmlExporterService().export(dataSet.createExportDataSet());
assertTrue("XML should be non empty.", xmlBytes != null && xmlBytes.length > 0);
StringBuffer output = new StringBuffer();
for (int i=0; i < xmlBytes.length; i++){
output.append((char)xmlBytes[i]);
}
System.out.print(output.toString());
// now clear the tables
//ClearDatabaseLifecycle clearLifeCycle = new ClearDatabaseLifecycle();
//clearLifeCycle.getTablesToClear().add("EN_RULE_BASE_VAL_T");
//clearLifeCycle.getTablesToClear().add("EN_RULE_ATTRIB_T");
//clearLifeCycle.getTablesToClear().add("EN_RULE_TMPL_T");
//clearLifeCycle.getTablesToClear().add("EN_DOC_TYP_T");
//clearLifeCycle.start();
//new ClearCacheLifecycle().stop();
//KimImplServiceLocator.getGroupService().
// import the exported xml
//loadXmlStream(new BufferedInputStream(new ByteArrayInputStream(xmlBytes)));
/*
List newRules = KEWServiceLocator.getRuleService().fetchAllRules(true);
assertEquals("Should have same number of old and new Rules.", oldRules.size(), newRules.size());
for (Iterator iterator = oldRules.iterator(); iterator.hasNext();) {
RuleBaseValues oldRule = (RuleBaseValues) iterator.next();
boolean foundRule = false;
for (Iterator iterator2 = newRules.iterator(); iterator2.hasNext();) {
RuleBaseValues newRule = (RuleBaseValues) iterator2.next();
if (oldRule.getDescription().equals(newRule.getDescription())) {
assertRuleExport(oldRule, newRule);
foundRule = true;
}
}
assertTrue("Could not locate the new rule for description " + oldRule.getDescription(), foundRule);
}
*/
}
}
| sbower/kuali-rice-1 | it/kew/src/test/java/org/kuali/rice/kew/xml/export/GroupXmlExporterTest.java | Java | apache-2.0 | 4,009 | [
30522,
1013,
1008,
1008,
9385,
2294,
1011,
2249,
1996,
13970,
11475,
3192,
1008,
1008,
7000,
2104,
1996,
4547,
2451,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.appyvet.rangebarsample.colorpicker;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import com.appyvet.rangebarsample.Component;
import com.appyvet.rangebarsample.R;
/**
* A dialog which takes in as input an array of colors and creates a palette allowing the user to
* select a specific color swatch, which invokes a listener.
*/
public class ColorPickerDialog extends DialogFragment implements ColorPickerSwatch.OnSwatchColorSelectedListener {
/**
* Interface for a callback when a color square is selected.
*/
public interface OnColorSelectedListener {
/**
* Called when a specific color square has been selected.
*/
public void onColorSelected(int color, Component component);
}
public static final int SIZE_LARGE = 1;
public static final int SIZE_SMALL = 2;
protected AlertDialog mAlertDialog;
protected static final String KEY_TITLE_ID = "title_id";
protected static final String KEY_COLORS = "colors";
protected static final String KEY_SELECTED_COLOR = "selected_color";
protected static final String KEY_COLUMNS = "columns";
protected static final String KEY_SIZE = "size";
protected int mTitleResId = R.string.color_picker_default_title;
protected int[] mColors = null;
protected int mSelectedColor;
protected int mColumns;
protected int mSize;
private Component mComponent;
private ColorPickerPalette mPalette;
private ProgressBar mProgress;
protected OnColorSelectedListener mListener;
public ColorPickerDialog() {
// Empty constructor required for dialog fragments.
}
public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor,
int columns, int size, Component component) {
ColorPickerDialog ret = new ColorPickerDialog();
ret.initialize(titleResId, colors, selectedColor, columns, size, component);
return ret;
}
public void initialize(int titleResId, int[] colors, int selectedColor, int columns, int size, Component component) {
setArguments(titleResId, columns, size);
setColors(colors, selectedColor);
mComponent = component;
}
public void setArguments(int titleResId, int columns, int size) {
Bundle bundle = new Bundle();
bundle.putInt(KEY_TITLE_ID, titleResId);
bundle.putInt(KEY_COLUMNS, columns);
bundle.putInt(KEY_SIZE, size);
setArguments(bundle);
}
public void setOnColorSelectedListener(OnColorSelectedListener listener) {
mListener = listener;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mTitleResId = getArguments().getInt(KEY_TITLE_ID);
mColumns = getArguments().getInt(KEY_COLUMNS);
mSize = getArguments().getInt(KEY_SIZE);
}
if (savedInstanceState != null) {
mColors = savedInstanceState.getIntArray(KEY_COLORS);
mSelectedColor = (Integer) savedInstanceState.getSerializable(KEY_SELECTED_COLOR);
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Activity activity = getActivity();
View view = LayoutInflater.from(getActivity()).inflate(R.layout.color_picker_dialog, null);
mProgress = (ProgressBar) view.findViewById(android.R.id.progress);
mPalette = (ColorPickerPalette) view.findViewById(R.id.color_picker);
mPalette.init(mSize, mColumns, this);
if (mColors != null) {
showPaletteView();
}
mAlertDialog = new AlertDialog.Builder(activity)
.setTitle(mTitleResId)
.setView(view)
.create();
return mAlertDialog;
}
@Override
public void onSwatchColorSelected(int color) {
if (mListener != null) {
mListener.onColorSelected(color, mComponent);
}
if (getTargetFragment() instanceof ColorPickerSwatch.OnSwatchColorSelectedListener) {
final OnColorSelectedListener listener =
(OnColorSelectedListener) getTargetFragment();
listener.onColorSelected(color, mComponent);
}
if (color != mSelectedColor) {
mSelectedColor = color;
// Redraw palette to show checkmark on newly selected color before dismissing.
mPalette.drawPalette(mColors, mSelectedColor);
}
dismiss();
}
public void showPaletteView() {
if (mProgress != null && mPalette != null) {
mProgress.setVisibility(View.GONE);
refreshPalette();
mPalette.setVisibility(View.VISIBLE);
}
}
public void showProgressBarView() {
if (mProgress != null && mPalette != null) {
mProgress.setVisibility(View.VISIBLE);
mPalette.setVisibility(View.GONE);
}
}
public void setColors(int[] colors, int selectedColor) {
if (mColors != colors || mSelectedColor != selectedColor) {
mColors = colors;
mSelectedColor = selectedColor;
refreshPalette();
}
}
public void setColors(int[] colors) {
if (mColors != colors) {
mColors = colors;
refreshPalette();
}
}
public void setSelectedColor(int color) {
if (mSelectedColor != color) {
mSelectedColor = color;
refreshPalette();
}
}
private void refreshPalette() {
if (mPalette != null && mColors != null) {
mPalette.drawPalette(mColors, mSelectedColor);
}
}
public int[] getColors() {
return mColors;
}
public int getSelectedColor() {
return mSelectedColor;
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putIntArray(KEY_COLORS, mColors);
outState.putSerializable(KEY_SELECTED_COLOR, mSelectedColor);
}
}
| oli107/material-range-bar | RangeBarSample/src/main/java/com/appyvet/rangebarsample/colorpicker/ColorPickerDialog.java | Java | apache-2.0 | 6,997 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2286,
1996,
11924,
2330,
3120,
2622,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Required for $langinfo
zmodload zsh/langinfo
# URL-encode a string
#
# Encodes a string using RFC 2396 URL-encoding (%-escaped).
# See: https://www.ietf.org/rfc/rfc2396.txt
#
# By default, reserved characters and unreserved "mark" characters are
# not escaped by this function. This allows the common usage of passing
# an entire URL in, and encoding just special characters in it, with
# the expectation that reserved and mark characters are used appropriately.
# The -r and -m options turn on escaping of the reserved and mark characters,
# respectively, which allows arbitrary strings to be fully escaped for
# embedding inside URLs, where reserved characters might be misinterpreted.
#
# Prints the encoded string on stdout.
# Returns nonzero if encoding failed.
#
# Usage:
# omz_urlencode [-r] [-m] [-P] <string>
#
# -r causes reserved characters (;/?:@&=+$,) to be escaped
#
# -m causes "mark" characters (_.!~*''()-) to be escaped
#
# -P causes spaces to be encoded as '%20' instead of '+'
function omz_urlencode() {
emulate -L zsh
zparseopts -D -E -a opts r m P
local in_str=$1
local url_str=""
local spaces_as_plus
if [[ -z $opts[(r)-P] ]]; then spaces_as_plus=1; fi
local str="$in_str"
# URLs must use UTF-8 encoding; convert str to UTF-8 if required
local encoding=$langinfo[CODESET]
local safe_encodings
safe_encodings=(UTF-8 utf8 US-ASCII)
if [[ -z ${safe_encodings[(r)$encoding]} ]]; then
str=$(echo -E "$str" | iconv -f $encoding -t UTF-8)
if [[ $? != 0 ]]; then
echo "Error converting string from $encoding to UTF-8" >&2
return 1
fi
fi
# Use LC_CTYPE=C to process text byte-by-byte
local i byte ord LC_ALL=C
export LC_ALL
local reserved=';/?:@&=+$,'
local mark='_.!~*''()-'
local dont_escape="[A-Za-z0-9"
if [[ -z $opts[(r)-r] ]]; then
dont_escape+=$reserved
fi
# $mark must be last because of the "-"
if [[ -z $opts[(r)-m] ]]; then
dont_escape+=$mark
fi
dont_escape+="]"
# Implemented to use a single printf call and avoid subshells in the loop,
# for performance (primarily on Windows).
local url_str=""
for (( i = 1; i <= ${#str}; ++i )); do
byte="$str[i]"
if [[ "$byte" =~ "$dont_escape" ]]; then
url_str+="$byte"
else
if [[ "$byte" == " " && -n $spaces_as_plus ]]; then
url_str+="+"
else
ord=$(( [##16] #byte ))
url_str+="%$ord"
fi
fi
done
echo -E "$url_str"
}
| j-c-m/dotfiles | .zsh/00-functions.zsh | Shell | unlicense | 2,457 | [
30522,
1001,
3223,
2005,
1002,
11374,
2378,
14876,
1062,
5302,
19422,
10441,
2094,
1062,
4095,
1013,
11374,
2378,
14876,
1001,
24471,
2140,
1011,
4372,
16044,
1037,
5164,
1001,
1001,
4372,
23237,
1037,
5164,
2478,
14645,
23688,
2575,
24471,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
class Sesion
{
private static $id;
public static function crearSesion()
{
session_start();
}
public static function destruirSesion()
{
session_start();
session_unset();
session_destroy();
self::$id = null;
}
public static function getId()
{
return self::$id;
}
public static function setId()
{
//session_regenerate_id();
self::$id = session_id();
}
public static function setValor(string $clave, string $valor)
{
$_SESSION[$clave] = $valor;
}
public static function getValor(string $clave)
{
return $_SESSION[$clave];
}
}
| UNAH-SISTEMAS/2017-1PAC-POO | 313_clase_sesion/sesion.class.php | PHP | gpl-3.0 | 701 | [
30522,
1026,
1029,
25718,
2465,
7367,
10992,
1063,
2797,
10763,
1002,
8909,
1025,
2270,
10763,
3853,
13675,
26492,
2229,
3258,
1006,
1007,
1063,
5219,
1035,
2707,
1006,
1007,
1025,
1065,
2270,
10763,
3853,
4078,
16344,
10179,
22573,
10992,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
import Ember from 'ember';
export default Ember.Component.extend({
tagName : '',
item : null,
isFollowing : false,
isLoggedIn : false,
init() {
this.set('isLoggedIn', !!this.get('application.user.login'));
if (this.get('application.places.length') > 0) {
this.set('isFollowing', !!this.get('application.places').findBy('id', this.get('item.id')));
}
}
});
| b37t1td/barapp-freecodecamp | client/app/components/user-following.js | JavaScript | mit | 389 | [
30522,
12324,
7861,
5677,
2013,
1005,
7861,
5677,
1005,
1025,
9167,
12398,
7861,
5677,
1012,
6922,
1012,
7949,
1006,
1063,
6415,
18442,
1024,
1005,
1005,
1010,
8875,
1024,
19701,
1010,
2003,
14876,
7174,
9328,
1024,
6270,
1010,
2003,
21197,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package storage
import (
"fmt"
"io"
"path"
"github.com/goamz/goamz/aws"
"github.com/goamz/goamz/s3"
)
/*
Repository data is stored in Amazon S3.
Valid Params for KST_S3:
* "awsregion" The code for the AWS Region, for example "us-east-1"
* "bucket" The name of the AWS bucket
* "prefix" An optional prefix for the bucket contents, for example "pulldeploy"
*/
const KST_S3 AccessMethod = "s3"
// stS3 is used for PullDeploy repositories in Amazon S3.
type stS3 struct {
regionName string // Name of the AWS Region with our bucket
bucketName string // Name of the S3 bucket
pathPrefix string // Optional prefix to namespace our bucket
bucket *s3.Bucket // Handle to the S3 bucket
}
// Initialize the repository object.
func (st *stS3) init(params Params) error {
// Extract the AWS region name.
if regionName, ok := params["awsregion"]; ok {
st.regionName = regionName
}
// Extract the AWS bucket name.
if bucketName, ok := params["bucket"]; ok {
st.bucketName = bucketName
}
// Extract the optional prefix for our paths.
if pathPrefix, ok := params["prefix"]; ok {
st.pathPrefix = pathPrefix
}
// Validate the region.
region, ok := aws.Regions[st.regionName]
if !ok {
validSet := ""
for k := range aws.Regions {
validSet += " " + k
}
return fmt.Errorf("Invalid AWS region name: '%s' Valid values:%s",
st.regionName, validSet)
}
// Pull AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY out of the environment.
auth, err := aws.EnvAuth()
if err != nil {
return err
}
// Open a handle to the bucket.
s := s3.New(auth, region)
st.bucket = s.Bucket(st.bucketName)
return nil
}
// Get fetches the contents of a repository file into a byte array.
func (st *stS3) Get(repoPath string) ([]byte, error) {
return st.bucket.Get(st.makeS3Path(repoPath))
}
// Put writes the contents of a byte array into a repository file.
func (st *stS3) Put(repoPath string, data []byte) error {
options := s3.Options{}
return st.bucket.Put(
st.makeS3Path(repoPath),
data,
"application/octet-stream",
"authenticated-read",
options,
)
}
// GetReader returns a stream handle for reading a repository file.
func (st *stS3) GetReader(repoPath string) (io.ReadCloser, error) {
return st.bucket.GetReader(st.makeS3Path(repoPath))
}
// PutReader writes a stream to a repository file.
func (st *stS3) PutReader(repoPath string, rc io.ReadCloser, length int64) error {
options := s3.Options{}
return st.bucket.PutReader(
st.makeS3Path(repoPath),
rc,
length,
"application/octet-stream",
"authenticated-read",
options,
)
}
// Delete removes a repository file.
func (st *stS3) Delete(repoPath string) error {
return st.bucket.Del(st.makeS3Path(repoPath))
}
// Utility helper to generate a full S3 repository path.
func (st *stS3) makeS3Path(repoPath string) string {
if st.pathPrefix == "" {
return repoPath
}
return path.Join(st.pathPrefix, repoPath)
}
| mredivo/pulldeploy | storage/s3.go | GO | bsd-2-clause | 2,946 | [
30522,
7427,
5527,
12324,
1006,
1000,
4718,
2102,
1000,
1000,
22834,
1000,
1000,
4130,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
15244,
2213,
2480,
1013,
15244,
2213,
2480,
1013,
22091,
2015,
1000,
1000,
21025,
2705,
12083,
1012,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
// Exit if accessed directly
if ( !defined('ABSPATH')) exit;
/**
* Sidebar Right Half Template
*
*
* @file sidebar-right-half.php
* @package Responsive
* @author Emil Uzelac
* @copyright 2003 - 2012 ThemeID
* @license license.txt
* @version Release: 1.0
* @filesource wp-content/themes/responsive/sidebar-right-half.php
* @link http://codex.wordpress.org/Theme_Development#Widgets_.28sidebar.php.29
* @since available since Release 1.0
*/
?>
</div>
<div id="widgets" class="grid col-460 fit">
<?php responsive_widgets(); // above widgets hook ?>
<?php if (!dynamic_sidebar('right-sidebar')) : ?>
<div class="widget-wrapper-right">
</div><!-- end of .widget-wrapper -->
<?php endif; //end of sidebar-right-half ?>
<?php responsive_widgets_end(); // after widgets hook ?>
</div><!-- end of #widgets --> | ianknauer/TeF_wordpress | wp-content/themes/Trottier/sidebar-home.php | PHP | gpl-2.0 | 977 | [
30522,
1026,
1029,
25718,
1013,
1013,
6164,
2065,
11570,
3495,
2065,
1006,
999,
4225,
1006,
1005,
14689,
15069,
1005,
1007,
1007,
6164,
1025,
1013,
1008,
1008,
1008,
2217,
8237,
2157,
2431,
23561,
1008,
1008,
1008,
1030,
5371,
2217,
8237,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<ul class="no-bullet clipping-block">
<li class="media-object blurb3-leads-image2 stack-for-small">
<div class="media-object-section">
<div class="article-date-lg"><strong><span class="uppercase">Insight</span></strong> | October 12, 2016</div>
<h3 class="article-headline"><a href="#">Why are the Experts Pessimistic About the Future of Homeownership? </a></h3>
<p>The national homeownership rate has been declining for over a decade. According to the experts, we can expect further declines. <a href="#">More</a></p>
</div>
<div class="media-object-section">
<a class="overlay" href="#"><img src="/research/images/beck-video.jpg"></a>
</div>
</li>
<li class="media-object blurb3-leads-image2 stack-for-small">
<div class="media-object-section">
<div class="article-date-lg"><strong><span class="uppercase">Outlook</span></strong> | September 20, 2016</div>
<h3 class="article-headline"><a href="#">Mortgage Originations Poised to Surge </a></h3>
<p>Even as housing market activity begins its seasonal cooldown, our forecast for the best year in total home sales since 2006 looks increasingly on the mark. <a href="#">More</a></p>
</div>
<div class="media-object-section">
<a class="overlay" href="#"><img src="/research/images/201611-ol-forecast-snapshot.jpg"></a>
</div>
</li>
<li class="media-object blurb3-leads-image2 stack-for-small">
<div class="media-object-section">
<div class="article-date-lg"><strong><span class="uppercase">Outlook</span></strong> | August 20, 2016</div>
<h3 class="article-headline"><a href="#">The Return of the $2 Trillion Mortgage Market </a></h3>
<p>For the first time since 2012, mortgage originations are forecasted to top $2 trillion in 2016. Here’s why. <a href="#">More</a></p>
</div>
<div class="media-object-section">
<a class="overlay" href="#"><img src="/research/images/201608-ol-outstanding-agency-mbs.jpg"></a>
</div>
</li>
<li class="media-object blurb3-leads-image2 stack-for-small">
<div class="media-object-section">
<div class="article-date-lg"><strong><span class="uppercase">Outlook</span></strong> | July 19, 2016</div>
<h3 class="article-headline"><a href="#">Fun After Fifty </a></h3>
<p>According to the common wisdom, Baby Boomers — like Peter Pan — refuse to grow older. Instead of retiring, they launch second — and third — careers. Instead of moving to seniors-oriented communities, they “age-in-place” or, even better, move into the heart of a walkable city. Human interest stories in the Sunday papers claim that 70 is the new 40 and 60 still has bad skin and trouble talking to girls. These clichés make great copy, but how accurate are they? <a href="#">More</a></p>
</div>
<div class="media-object-section">
<a class="overlay" href="#"><img src="/research/images/201607-insight-exhibit_09_and_10_sm.jpg"></a>
</div>
</li>
<li class="media-object blurb3-leads-image2 stack-for-small">
<div class="media-object-section">
<div class="article-date-lg"><strong><span class="uppercase">Outlook</span></strong> | July 12, 2016</div>
<h3 class="article-headline"><a href="#">Despite Global Risks, U.S. Housing Markets Remains Stalwart</a></h3>
<p>With the U.K.'s decision to exit from the European Union, global risks increased substantially leading us to revise our views for the remainder of 2016 and all of 2017. Nonetheless, the turbulence abroad should continue to create demand for U.S. Treasuries and keep mortgage rates near historic lows; thereby, allowing mortgage originations to surpass 2015's level. <a href="#">More</a></p>
</div>
<div class="media-object-section">
<a class="overlay" href="#"><img src="/research/images/201607-ol-02-30y-mortgage-vs-10y-treas.jpg"></a>
</div>
</li>
</ul> | SCarrero/fmzurb | src/partials/research-list.html | HTML | mit | 3,908 | [
30522,
1026,
17359,
2465,
1027,
1000,
2053,
1011,
7960,
12528,
4691,
1011,
3796,
1000,
1028,
1026,
5622,
2465,
1027,
1000,
2865,
1011,
4874,
14819,
2497,
2509,
1011,
5260,
1011,
3746,
2475,
9991,
1011,
2005,
1011,
2235,
1000,
1028,
1026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
return function ($bh) {
$bh->match('progressbar', function($ctx, $json) {
$val = $json->val ?: 0;
$ctx
->js([ 'val' => $val ])
->content([
'elem' => 'bar',
'attrs' => [ 'style' => 'width:' . $val . '%' ]
]);
});
};
| kompolom/bem-components-php | common.blocks/progressbar/progressbar.bh.php | PHP | mpl-2.0 | 314 | [
30522,
1026,
1029,
25718,
2709,
3853,
1006,
1002,
1038,
2232,
1007,
1063,
1002,
1038,
2232,
1011,
1028,
2674,
1006,
1005,
5082,
8237,
1005,
1010,
3853,
1006,
1002,
14931,
2595,
1010,
1002,
1046,
3385,
1007,
1063,
1002,
11748,
1027,
1002,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
Copyright 2013 KLab Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef CKLBUIDebugItem_h
#define CKLBUIDebugItem_h
#include "CKLBUITask.h"
#include "CKLBNodeVirtualDocument.h"
/*!
* \class CKLBUIDebugItem
* \brief Debug Item Task Class
*
* CKLBUIDebugItem allows to display debug purpose items in the Game.
* A few properties (such as text, color, etc.) can be modified in runtime
* and used for debugging.
*/
class CKLBUIDebugItem : public CKLBUITask
{
friend class CKLBTaskFactory<CKLBUIDebugItem>;
private:
CKLBUIDebugItem();
virtual ~CKLBUIDebugItem();
bool init(CKLBUITask* pParent, CKLBNode* pNode, u32 order, float x, float y, u32 alpha, u32 color, const char* font, u32 size, const char* text, const char* callback,u32 id);
bool initCore(u32 order, float x, float y, u32 alpha, u32 color, const char* font, u32 size, const char* text, const char* callback,u32 id);
public:
static CKLBUIDebugItem* create(CKLBUITask* pParent, CKLBNode* pNode, u32 order, float x, float y, u32 alpha, u32 color, const char* font, u32 size, const char* text, const char* callback,u32 id);
u32 getClassID ();
bool initUI (CLuaState& lua);
void execute (u32 deltaT);
void dieUI ();
inline virtual void setOrder (u32 order) { m_order = order; m_update = true; }
inline virtual u32 getOrder () { return m_order; }
inline void setAlpha (u32 alpha) { m_alpha = alpha; m_update = true; }
inline u32 getAlpha () { return m_alpha; }
inline void setU24Color (u32 color) { m_color = color; m_update = true; }
inline u32 getU24Color () { return m_color; }
inline void setColor (u32 color) { m_alpha = color >> 24; m_color = color & 0xFFFFFF; m_update = true; }
inline u32 getColor () { return (m_alpha << 24) | m_color; }
inline void setFont (const char* font) { setStrC(m_font, font); m_update = true; }
inline const char* getFont () { return m_font; }
inline void setSize (u32 size) { m_size = size; m_update = true; }
inline u32 getSize () { return m_size; }
inline void setText (const char* text) { setStrC(m_text, text); m_update = true; }
inline const char* getText () { return m_text; }
private:
u32 m_order;
u8 m_format;
u8 m_alpha;
u32 m_color;
const char* m_font;
const char* m_text;
u32 m_size;
bool setup_node();
// 現在は VDocで仮実装しておく。
CKLBNodeVirtualDocument * m_pLabel;
bool m_update;
STextInfo m_txinfo;
const char * m_callback;
int m_ID;
int m_padId;
static PROP_V2 ms_propItems[];
};
#endif // CKLBUIDebugItem_h
| mhidaka/playgroundthon | Engine/source/UISystem/CKLBUIDebugItem.h | C | apache-2.0 | 3,395 | [
30522,
1013,
1008,
9385,
2286,
1047,
20470,
4297,
1012,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace cmdr.TsiLib.FormatXml.Base
{
public enum TsiXmlEntryType
{
Boolean = 0,
Integer = 1,
Float = 2,
String = 3,
ListOfBoolean = 4,
ListOfInteger = 5,
ListOfFloat = 6,
ListOfString = 7
}
}
| TakTraum/cmdr | cmdr/cmdr.TsiLib/FormatXml/Base/TsiXmlEntryType.cs | C# | gpl-3.0 | 410 | [
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
3793,
1025,
2478,
2291,
1012,
11689,
2075,
1012,
8518,
1025,
3415,
15327,
4642,
13626,
1012,
24529,
18622,
2497,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
declare(strict_types=1);
namespace OpenTelemetry\Tests\Unit\Contrib;
use AssertWell\PHPUnitGlobalState\EnvironmentVariables;
use Grpc\UnaryCall;
use Mockery;
use Mockery\MockInterface;
use OpenTelemetry\Contrib\OtlpGrpc\Exporter;
use Opentelemetry\Proto\Collector\Trace\V1\TraceServiceClient;
use OpenTelemetry\SDK\Trace\SpanExporterInterface;
use OpenTelemetry\Tests\Unit\SDK\Trace\SpanExporter\AbstractExporterTest;
use OpenTelemetry\Tests\Unit\SDK\Util\SpanData;
use org\bovigo\vfs\vfsStream;
/**
* @covers OpenTelemetry\Contrib\OtlpGrpc\Exporter
*/
class OTLPGrpcExporterTest extends AbstractExporterTest
{
use EnvironmentVariables;
public function createExporter(): SpanExporterInterface
{
return new Exporter();
}
public function tearDown(): void
{
$this->restoreEnvironmentVariables();
}
/**
* @psalm-suppress UndefinedConstant
*/
public function test_exporter_happy_path(): void
{
$exporter = new Exporter(
//These first parameters were copied from the constructor's default values
'localhost:4317',
true,
'',
'',
false,
10,
$this->createMockTraceServiceClient([
'expectations' => [
'num_spans' => 1,
],
'return_values' => [
'status_code' => \Grpc\STATUS_OK,
],
])
);
$exporterStatusCode = $exporter->export([new SpanData()]);
$this->assertSame(SpanExporterInterface::STATUS_SUCCESS, $exporterStatusCode);
}
public function test_exporter_unexpected_grpc_response_status(): void
{
$exporter = new Exporter(
//These first parameters were copied from the constructor's default values
'localhost:4317',
true,
'',
'',
false,
10,
$this->createMockTraceServiceClient([
'expectations' => [
'num_spans' => 1,
],
'return_values' => [
'status_code' => 'An unexpected status',
],
])
);
$exporterStatusCode = $exporter->export([new SpanData()]);
$this->assertSame(SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE, $exporterStatusCode);
}
public function test_exporter_grpc_responds_as_unavailable(): void
{
$this->assertEquals(SpanExporterInterface::STATUS_FAILED_RETRYABLE, (new Exporter())->export([new SpanData()]));
}
public function test_set_headers_with_environment_variables(): void
{
$this->setEnvironmentVariable('OTEL_EXPORTER_OTLP_HEADERS', 'x-aaa=foo,x-bbb=barf');
$exporter = new Exporter();
$this->assertEquals(['x-aaa' => 'foo', 'x-bbb' => 'barf'], $exporter->getHeaders());
}
public function test_set_header(): void
{
$exporter = new Exporter();
$exporter->setHeader('foo', 'bar');
$headers = $exporter->getHeaders();
$this->assertArrayHasKey('foo', $headers);
$this->assertEquals('bar', $headers['foo']);
}
public function test_set_headers_in_constructor(): void
{
$exporter = new Exporter('localhost:4317', true, '', 'x-aaa=foo,x-bbb=bar');
$this->assertEquals(['x-aaa' => 'foo', 'x-bbb' => 'bar'], $exporter->getHeaders());
$exporter->setHeader('key', 'value');
$this->assertEquals(['x-aaa' => 'foo', 'x-bbb' => 'bar', 'key' => 'value'], $exporter->getHeaders());
}
public function test_should_be_ok_to_exporter_empty_spans_collection(): void
{
$this->assertEquals(
SpanExporterInterface::STATUS_SUCCESS,
(new Exporter('test.otlp'))->export([])
);
}
private function isInsecure(Exporter $exporter) : bool
{
$reflection = new \ReflectionClass($exporter);
$property = $reflection->getProperty('insecure');
$property->setAccessible(true);
return $property->getValue($exporter);
}
public function test_client_options(): void
{
// default options
$exporter = new Exporter('localhost:4317');
$opts = $exporter->getClientOptions();
$this->assertEquals(10, $opts['timeout']);
$this->assertTrue($this->isInsecure($exporter));
$this->assertArrayNotHasKey('grpc.default_compression_algorithm', $opts);
// method args
$exporter = new Exporter('localhost:4317', false, '', '', true, 5);
$opts = $exporter->getClientOptions();
$this->assertEquals(5, $opts['timeout']);
$this->assertFalse($this->isInsecure($exporter));
$this->assertEquals(2, $opts['grpc.default_compression_algorithm']);
// env vars
$this->setEnvironmentVariable('OTEL_EXPORTER_OTLP_TIMEOUT', '1');
$this->setEnvironmentVariable('OTEL_EXPORTER_OTLP_COMPRESSION', 'gzip');
$this->setEnvironmentVariable('OTEL_EXPORTER_OTLP_INSECURE', 'false');
$exporter = new Exporter('localhost:4317');
$opts = $exporter->getClientOptions();
$this->assertEquals(1, $opts['timeout']);
$this->assertFalse($this->isInsecure($exporter));
$this->assertEquals(2, $opts['grpc.default_compression_algorithm']);
}
/**
* @psalm-suppress PossiblyUndefinedMethod
* @psalm-suppress UndefinedMagicMethod
*/
private function createMockTraceServiceClient(array $options = [])
{
[
'expectations' => [
'num_spans' => $expectedNumSpans,
],
'return_values' => [
'status_code' => $statusCode,
]
] = $options;
/** @var MockInterface&TraceServiceClient */
$mockClient = Mockery::mock(TraceServiceClient::class)
->allows('Export')
->withArgs(function ($request) use ($expectedNumSpans) {
return (count($request->getResourceSpans()) === $expectedNumSpans);
})
->andReturns(
Mockery::mock(UnaryCall::class)
->allows('wait')
->andReturns(
[
'unused response data',
new class($statusCode) {
public $code;
public function __construct($code)
{
$this->code = $code;
}
},
]
)
->getMock()
)
->getMock();
return $mockClient;
}
public function test_from_connection_string(): void
{
// @phpstan-ignore-next-line
$this->assertNotSame(
Exporter::fromConnectionString(),
Exporter::fromConnectionString()
);
}
public function test_create_with_cert_file(): void
{
$certDir = 'var';
$certFile = 'file.cert';
vfsStream::setup($certDir);
$certPath = vfsStream::url(sprintf('%s/%s', $certDir, $certFile));
file_put_contents($certPath, 'foo');
$this->setEnvironmentVariable('OTEL_EXPORTER_OTLP_INSECURE', 'false');
$this->setEnvironmentVariable('OTEL_EXPORTER_OTLP_CERTIFICATE', $certPath);
$this->assertSame(
$certPath,
(new Exporter())->getCertificateFile()
);
}
}
| open-telemetry/opentelemetry-php | tests/Unit/Contrib/OTLPGrpcExporterTest.php | PHP | apache-2.0 | 7,876 | [
30522,
1026,
1029,
25718,
13520,
1006,
9384,
1035,
4127,
1027,
1015,
1007,
1025,
3415,
15327,
2330,
9834,
21382,
11129,
1032,
5852,
1032,
3131,
1032,
9530,
18886,
2497,
1025,
2224,
20865,
4381,
1032,
25718,
19496,
2102,
23296,
16429,
9777,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html>
<head>
<title>Asterisk Project : Asterisk 12 Application_BridgeWait</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body class="theme-default aui-theme-default">
<div id="page">
<div id="main" class="aui-page-panel">
<div id="main-header">
<div id="breadcrumb-section">
<ol id="breadcrumbs">
<li class="first">
<span><a href="index.html">Asterisk Project</a></span>
</li>
<li>
<span><a href="Asterisk-12-Documentation_25919697.html">Asterisk 12 Documentation</a></span>
</li>
<li>
<span><a href="Asterisk-12-Command-Reference_26476688.html">Asterisk 12 Command Reference</a></span>
</li>
<li>
<span><a href="Asterisk-12-Dialplan-Applications_26476696.html">Asterisk 12 Dialplan Applications</a></span>
</li>
</ol>
</div>
<h1 id="title-heading" class="pagetitle">
<span id="title-text">
Asterisk Project : Asterisk 12 Application_BridgeWait
</span>
</h1>
</div>
<div id="content" class="view">
<div class="page-metadata">
Added by wikibot , edited by wikibot on Aug 29, 2013
</div>
<div id="main-content" class="wiki-content group">
<h1 id="Asterisk12Application_BridgeWait-BridgeWait%28%29">BridgeWait()</h1>
<h3 id="Asterisk12Application_BridgeWait-Synopsis">Synopsis</h3>
<p>Put a call into the holding bridge.</p>
<h3 id="Asterisk12Application_BridgeWait-Description">Description</h3>
<p>This application places the incoming channel into a holding bridge. The channel will then wait in the holding bridge until some event occurs which removes it from the holding bridge.</p>
<div class="aui-message hint shadowed information-macro">
<p class="title">Note</p>
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
<p>This application will answer calls which haven't already been answered.</p>
</div>
</div>
<h3 id="Asterisk12Application_BridgeWait-Syntax">Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>BridgeWait(name[,role,options])</pre>
</div></div>
<h5 id="Asterisk12Application_BridgeWait-Arguments">Arguments</h5>
<ul>
<li><code>name</code> - Name of the holding bridge to join. This is a handle for <code>BridgeWait</code> only and does not affect the actual bridges that are created. If not provided, the reserved name <code>default</code> will be used.</li>
<li><code>role</code> - Defines the channel's purpose for entering the holding bridge. Values are case sensitive.
<ul>
<li><code>participant</code> - The channel will enter the holding bridge to be placed on hold until it is removed from the bridge for some reason. (default)</li>
<li><code>announcer</code> - The channel will enter the holding bridge to make announcements to channels that are currently in the holding bridge. While an announcer is present, holding for the participants will be suspended.</li>
</ul>
</li>
<li><code>options</code>
<ul>
<li><code>m</code> - The specified MOH class will be used/suggested for music on hold operations. This option will only be useful for entertainment modes that use it (m and h).
<ul>
<li><code>class</code></li>
</ul>
</li>
<li><code>e</code> - Which entertainment mechanism should be used while on hold in the holding bridge. Only the first letter is read.
<ul>
<li><code>m</code> - Play music on hold (default)</li>
<li><code>r</code> - Ring without pause</li>
<li><code>s</code> - Generate silent audio</li>
<li><code>h</code> - Put the channel on hold</li>
<li><code>n</code> - No entertainment</li>
</ul>
</li>
<li><code>S</code> - Automatically exit the bridge and return to the PBX after <strong>duration</strong> seconds.
<ul>
<li><code>duration</code></li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="Asterisk12Application_BridgeWait-SeeAlso">See Also</h3>
<h3 id="Asterisk12Application_BridgeWait-ImportVersion">Import Version</h3>
<p>This documentation was imported from Asterisk Version Unknown</p>
</div>
</div> </div>
<div id="footer">
<section class="footer-body">
<p>Document generated by Confluence on Dec 20, 2013 14:15</p>
</section>
</div>
</div> </body>
</html>
| truongduy134/asterisk | doc/Asterisk-Admin-Guide/Asterisk-12-Application_BridgeWait_26476803.html | HTML | gpl-2.0 | 5,444 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
2004,
3334,
20573,
2622,
1024,
2004,
3334,
20573,
2260,
4646,
1035,
2958,
21547,
2102,
1026,
1013,
2516,
1028,
1026,
4957,
2128,
2140,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/*
*********************************************************************
* LogAnalyzer - http://loganalyzer.adiscon.com
* ----------------------------------------------------------------- *
* StreamConfig has the capability to create a specific LogStream *
* object depending on a configured LogStream*Config object. *
* *
* All directives are explained within this file *
*
* Copyright (C) 2008-2010 Adiscon GmbH.
*
* This file is part of LogAnalyzer.
*
* LogAnalyzer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LogAnalyzer 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 LogAnalyzer. If not, see <http://www.gnu.org/licenses/>.
*
* A copy of the GPL can be found in the file "COPYING" in this
* distribution.
*********************************************************************
*/
// --- Avoid directly accessing this file!
if ( !defined('IN_PHPLOGCON') )
{
die('Hacking attempt');
exit;
}
// ---
class LogStreamConfigDB extends LogStreamConfig {
public $DBServer = '127.0.0.1';
public $DBPort = 3306;
public $DBName = '';
public $DBUser = '';
public $DBPassword = '';
public $DBType = DB_MYSQL; // Default = MYSQL!
public $DBTableType = 'winsyslog'; // Default = WINSYSLOG DB Layout!
public $DBTableName = 'systemevents'; // Default Tabelname from WINSYSLOG
public $DBEnableRowCounting = true; // Default RowCounting is enabled!
// Runtime configuration variables
public $RecordsPerQuery = 100; // This will determine how to limit sql statements
public $IDsPerQuery = 5000; // When we query ID's, we read a lot more the datarecords at once!
public $SortColumn = SYSLOG_UID; // Default sorting column
// public $FileName = '';
// public $LineParserType = "syslog"; // Default = Syslog!
// public $_lineParser = null;
public function LogStreamFactory($o)
{
// An instance is created, then include the logstreamdisk class as well!
global $gl_root_path;
require_once($gl_root_path . 'classes/logstreamdb.class.php');
// // Create and set LineParser Instance
// $this->_lineParser = $this->CreateLineParser();
//$RecordsPerQuery
//$_pageCount
// return LogStreamDisk instance
return new LogStreamDB($o);
}
/*
private function CreateLineParser()
{
// We need to include Line Parser on demand!
global $gl_root_path;
require_once($gl_root_path . 'classes/logstreamlineparser.class.php');
// Probe if file exists then include it!
$strIncludeFile = 'classes/logstreamlineparser' . $this->LineParserType . '.class.php';
$strClassName = "LogStreamLineParser" . $this->LineParserType;
if ( is_file($strIncludeFile) )
{
require_once($strIncludeFile);
// TODO! Create Parser based on Source Config!
//return LineParser Instance
return new $strClassName();
}
else
DieWithErrorMsg("Couldn't locate LineParser include file '" . $strIncludeFile . "'");
}
*/
}
?>
| rsyslog/loganalyzer | src/classes/logstreamconfigdb.class.php | PHP | gpl-3.0 | 3,358 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Marvell MV88W8618 / Freecom MusicPal emulation.
*
* Copyright (c) 2008 Jan Kiszka
*
* This code is licensed under the GNU GPL v2.
*
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/devices.h"
#include "net/net.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/char/serial.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "block/block.h"
#include "hw/block/flash.h"
#include "ui/console.h"
#include "hw/i2c/i2c.h"
#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "ui/pixel_ops.h"
#define MP_MISC_BASE 0x80002000
#define MP_MISC_SIZE 0x00001000
#define MP_ETH_BASE 0x80008000
#define MP_ETH_SIZE 0x00001000
#define MP_WLAN_BASE 0x8000C000
#define MP_WLAN_SIZE 0x00000800
#define MP_UART1_BASE 0x8000C840
#define MP_UART2_BASE 0x8000C940
#define MP_GPIO_BASE 0x8000D000
#define MP_GPIO_SIZE 0x00001000
#define MP_FLASHCFG_BASE 0x90006000
#define MP_FLASHCFG_SIZE 0x00001000
#define MP_AUDIO_BASE 0x90007000
#define MP_PIC_BASE 0x90008000
#define MP_PIC_SIZE 0x00001000
#define MP_PIT_BASE 0x90009000
#define MP_PIT_SIZE 0x00001000
#define MP_LCD_BASE 0x9000c000
#define MP_LCD_SIZE 0x00001000
#define MP_SRAM_BASE 0xC0000000
#define MP_SRAM_SIZE 0x00020000
#define MP_RAM_DEFAULT_SIZE 32*1024*1024
#define MP_FLASH_SIZE_MAX 32*1024*1024
#define MP_TIMER1_IRQ 4
#define MP_TIMER2_IRQ 5
#define MP_TIMER3_IRQ 6
#define MP_TIMER4_IRQ 7
#define MP_EHCI_IRQ 8
#define MP_ETH_IRQ 9
#define MP_UART1_IRQ 11
#define MP_UART2_IRQ 11
#define MP_GPIO_IRQ 12
#define MP_RTC_IRQ 28
#define MP_AUDIO_IRQ 30
/* Wolfson 8750 I2C address */
#define MP_WM_ADDR 0x1A
/* Ethernet register offsets */
#define MP_ETH_SMIR 0x010
#define MP_ETH_PCXR 0x408
#define MP_ETH_SDCMR 0x448
#define MP_ETH_ICR 0x450
#define MP_ETH_IMR 0x458
#define MP_ETH_FRDP0 0x480
#define MP_ETH_FRDP1 0x484
#define MP_ETH_FRDP2 0x488
#define MP_ETH_FRDP3 0x48C
#define MP_ETH_CRDP0 0x4A0
#define MP_ETH_CRDP1 0x4A4
#define MP_ETH_CRDP2 0x4A8
#define MP_ETH_CRDP3 0x4AC
#define MP_ETH_CTDP0 0x4E0
#define MP_ETH_CTDP1 0x4E4
#define MP_ETH_CTDP2 0x4E8
#define MP_ETH_CTDP3 0x4EC
/* MII PHY access */
#define MP_ETH_SMIR_DATA 0x0000FFFF
#define MP_ETH_SMIR_ADDR 0x03FF0000
#define MP_ETH_SMIR_OPCODE (1 << 26) /* Read value */
#define MP_ETH_SMIR_RDVALID (1 << 27)
/* PHY registers */
#define MP_ETH_PHY1_BMSR 0x00210000
#define MP_ETH_PHY1_PHYSID1 0x00410000
#define MP_ETH_PHY1_PHYSID2 0x00610000
#define MP_PHY_BMSR_LINK 0x0004
#define MP_PHY_BMSR_AUTONEG 0x0008
#define MP_PHY_88E3015 0x01410E20
/* TX descriptor status */
#define MP_ETH_TX_OWN (1 << 31)
/* RX descriptor status */
#define MP_ETH_RX_OWN (1 << 31)
/* Interrupt cause/mask bits */
#define MP_ETH_IRQ_RX_BIT 0
#define MP_ETH_IRQ_RX (1 << MP_ETH_IRQ_RX_BIT)
#define MP_ETH_IRQ_TXHI_BIT 2
#define MP_ETH_IRQ_TXLO_BIT 3
/* Port config bits */
#define MP_ETH_PCXR_2BSM_BIT 28 /* 2-byte incoming suffix */
/* SDMA command bits */
#define MP_ETH_CMD_TXHI (1 << 23)
#define MP_ETH_CMD_TXLO (1 << 22)
typedef struct mv88w8618_tx_desc {
uint32_t cmdstat;
uint16_t res;
uint16_t bytes;
uint32_t buffer;
uint32_t next;
} mv88w8618_tx_desc;
typedef struct mv88w8618_rx_desc {
uint32_t cmdstat;
uint16_t bytes;
uint16_t buffer_size;
uint32_t buffer;
uint32_t next;
} mv88w8618_rx_desc;
typedef struct mv88w8618_eth_state {
SysBusDevice busdev;
MemoryRegion iomem;
qemu_irq irq;
uint32_t smir;
uint32_t icr;
uint32_t imr;
int mmio_index;
uint32_t vlan_header;
uint32_t tx_queue[2];
uint32_t rx_queue[4];
uint32_t frx_queue[4];
uint32_t cur_rx[4];
NICState *nic;
NICConf conf;
} mv88w8618_eth_state;
static void eth_rx_desc_put(uint32_t addr, mv88w8618_rx_desc *desc)
{
cpu_to_le32s(&desc->cmdstat);
cpu_to_le16s(&desc->bytes);
cpu_to_le16s(&desc->buffer_size);
cpu_to_le32s(&desc->buffer);
cpu_to_le32s(&desc->next);
cpu_physical_memory_write(addr, desc, sizeof(*desc));
}
static void eth_rx_desc_get(uint32_t addr, mv88w8618_rx_desc *desc)
{
cpu_physical_memory_read(addr, desc, sizeof(*desc));
le32_to_cpus(&desc->cmdstat);
le16_to_cpus(&desc->bytes);
le16_to_cpus(&desc->buffer_size);
le32_to_cpus(&desc->buffer);
le32_to_cpus(&desc->next);
}
static int eth_can_receive(NetClientState *nc)
{
return 1;
}
static ssize_t eth_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
mv88w8618_eth_state *s = qemu_get_nic_opaque(nc);
uint32_t desc_addr;
mv88w8618_rx_desc desc;
int i;
for (i = 0; i < 4; i++) {
desc_addr = s->cur_rx[i];
if (!desc_addr) {
continue;
}
do {
eth_rx_desc_get(desc_addr, &desc);
if ((desc.cmdstat & MP_ETH_RX_OWN) && desc.buffer_size >= size) {
cpu_physical_memory_write(desc.buffer + s->vlan_header,
buf, size);
desc.bytes = size + s->vlan_header;
desc.cmdstat &= ~MP_ETH_RX_OWN;
s->cur_rx[i] = desc.next;
s->icr |= MP_ETH_IRQ_RX;
if (s->icr & s->imr) {
qemu_irq_raise(s->irq);
}
eth_rx_desc_put(desc_addr, &desc);
return size;
}
desc_addr = desc.next;
} while (desc_addr != s->rx_queue[i]);
}
return size;
}
static void eth_tx_desc_put(uint32_t addr, mv88w8618_tx_desc *desc)
{
cpu_to_le32s(&desc->cmdstat);
cpu_to_le16s(&desc->res);
cpu_to_le16s(&desc->bytes);
cpu_to_le32s(&desc->buffer);
cpu_to_le32s(&desc->next);
cpu_physical_memory_write(addr, desc, sizeof(*desc));
}
static void eth_tx_desc_get(uint32_t addr, mv88w8618_tx_desc *desc)
{
cpu_physical_memory_read(addr, desc, sizeof(*desc));
le32_to_cpus(&desc->cmdstat);
le16_to_cpus(&desc->res);
le16_to_cpus(&desc->bytes);
le32_to_cpus(&desc->buffer);
le32_to_cpus(&desc->next);
}
static void eth_send(mv88w8618_eth_state *s, int queue_index)
{
uint32_t desc_addr = s->tx_queue[queue_index];
mv88w8618_tx_desc desc;
uint32_t next_desc;
uint8_t buf[2048];
int len;
do {
eth_tx_desc_get(desc_addr, &desc);
next_desc = desc.next;
if (desc.cmdstat & MP_ETH_TX_OWN) {
len = desc.bytes;
if (len < 2048) {
cpu_physical_memory_read(desc.buffer, buf, len);
qemu_send_packet(qemu_get_queue(s->nic), buf, len);
}
desc.cmdstat &= ~MP_ETH_TX_OWN;
s->icr |= 1 << (MP_ETH_IRQ_TXLO_BIT - queue_index);
eth_tx_desc_put(desc_addr, &desc);
}
desc_addr = next_desc;
} while (desc_addr != s->tx_queue[queue_index]);
}
static uint64_t mv88w8618_eth_read(void *opaque, hwaddr offset,
unsigned size)
{
mv88w8618_eth_state *s = opaque;
switch (offset) {
case MP_ETH_SMIR:
if (s->smir & MP_ETH_SMIR_OPCODE) {
switch (s->smir & MP_ETH_SMIR_ADDR) {
case MP_ETH_PHY1_BMSR:
return MP_PHY_BMSR_LINK | MP_PHY_BMSR_AUTONEG |
MP_ETH_SMIR_RDVALID;
case MP_ETH_PHY1_PHYSID1:
return (MP_PHY_88E3015 >> 16) | MP_ETH_SMIR_RDVALID;
case MP_ETH_PHY1_PHYSID2:
return (MP_PHY_88E3015 & 0xFFFF) | MP_ETH_SMIR_RDVALID;
default:
return MP_ETH_SMIR_RDVALID;
}
}
return 0;
case MP_ETH_ICR:
return s->icr;
case MP_ETH_IMR:
return s->imr;
case MP_ETH_FRDP0 ... MP_ETH_FRDP3:
return s->frx_queue[(offset - MP_ETH_FRDP0)/4];
case MP_ETH_CRDP0 ... MP_ETH_CRDP3:
return s->rx_queue[(offset - MP_ETH_CRDP0)/4];
case MP_ETH_CTDP0 ... MP_ETH_CTDP3:
return s->tx_queue[(offset - MP_ETH_CTDP0)/4];
default:
return 0;
}
}
static void mv88w8618_eth_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
mv88w8618_eth_state *s = opaque;
switch (offset) {
case MP_ETH_SMIR:
s->smir = value;
break;
case MP_ETH_PCXR:
s->vlan_header = ((value >> MP_ETH_PCXR_2BSM_BIT) & 1) * 2;
break;
case MP_ETH_SDCMR:
if (value & MP_ETH_CMD_TXHI) {
eth_send(s, 1);
}
if (value & MP_ETH_CMD_TXLO) {
eth_send(s, 0);
}
if (value & (MP_ETH_CMD_TXHI | MP_ETH_CMD_TXLO) && s->icr & s->imr) {
qemu_irq_raise(s->irq);
}
break;
case MP_ETH_ICR:
s->icr &= value;
break;
case MP_ETH_IMR:
s->imr = value;
if (s->icr & s->imr) {
qemu_irq_raise(s->irq);
}
break;
case MP_ETH_FRDP0 ... MP_ETH_FRDP3:
s->frx_queue[(offset - MP_ETH_FRDP0)/4] = value;
break;
case MP_ETH_CRDP0 ... MP_ETH_CRDP3:
s->rx_queue[(offset - MP_ETH_CRDP0)/4] =
s->cur_rx[(offset - MP_ETH_CRDP0)/4] = value;
break;
case MP_ETH_CTDP0 ... MP_ETH_CTDP3:
s->tx_queue[(offset - MP_ETH_CTDP0)/4] = value;
break;
}
}
static const MemoryRegionOps mv88w8618_eth_ops = {
.read = mv88w8618_eth_read,
.write = mv88w8618_eth_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static void eth_cleanup(NetClientState *nc)
{
mv88w8618_eth_state *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
static NetClientInfo net_mv88w8618_info = {
.type = NET_CLIENT_OPTIONS_KIND_NIC,
.size = sizeof(NICState),
.can_receive = eth_can_receive,
.receive = eth_receive,
.cleanup = eth_cleanup,
};
static int mv88w8618_eth_init(SysBusDevice *dev)
{
mv88w8618_eth_state *s = FROM_SYSBUS(mv88w8618_eth_state, dev);
sysbus_init_irq(dev, &s->irq);
s->nic = qemu_new_nic(&net_mv88w8618_info, &s->conf,
object_get_typename(OBJECT(dev)), dev->qdev.id, s);
memory_region_init_io(&s->iomem, &mv88w8618_eth_ops, s, "mv88w8618-eth",
MP_ETH_SIZE);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
static const VMStateDescription mv88w8618_eth_vmsd = {
.name = "mv88w8618_eth",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(smir, mv88w8618_eth_state),
VMSTATE_UINT32(icr, mv88w8618_eth_state),
VMSTATE_UINT32(imr, mv88w8618_eth_state),
VMSTATE_UINT32(vlan_header, mv88w8618_eth_state),
VMSTATE_UINT32_ARRAY(tx_queue, mv88w8618_eth_state, 2),
VMSTATE_UINT32_ARRAY(rx_queue, mv88w8618_eth_state, 4),
VMSTATE_UINT32_ARRAY(frx_queue, mv88w8618_eth_state, 4),
VMSTATE_UINT32_ARRAY(cur_rx, mv88w8618_eth_state, 4),
VMSTATE_END_OF_LIST()
}
};
static Property mv88w8618_eth_properties[] = {
DEFINE_NIC_PROPERTIES(mv88w8618_eth_state, conf),
DEFINE_PROP_END_OF_LIST(),
};
static void mv88w8618_eth_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = mv88w8618_eth_init;
dc->vmsd = &mv88w8618_eth_vmsd;
dc->props = mv88w8618_eth_properties;
}
static const TypeInfo mv88w8618_eth_info = {
.name = "mv88w8618_eth",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(mv88w8618_eth_state),
.class_init = mv88w8618_eth_class_init,
};
/* LCD register offsets */
#define MP_LCD_IRQCTRL 0x180
#define MP_LCD_IRQSTAT 0x184
#define MP_LCD_SPICTRL 0x1ac
#define MP_LCD_INST 0x1bc
#define MP_LCD_DATA 0x1c0
/* Mode magics */
#define MP_LCD_SPI_DATA 0x00100011
#define MP_LCD_SPI_CMD 0x00104011
#define MP_LCD_SPI_INVALID 0x00000000
/* Commmands */
#define MP_LCD_INST_SETPAGE0 0xB0
/* ... */
#define MP_LCD_INST_SETPAGE7 0xB7
#define MP_LCD_TEXTCOLOR 0xe0e0ff /* RRGGBB */
typedef struct musicpal_lcd_state {
SysBusDevice busdev;
MemoryRegion iomem;
uint32_t brightness;
uint32_t mode;
uint32_t irqctrl;
uint32_t page;
uint32_t page_off;
QemuConsole *con;
uint8_t video_ram[128*64/8];
} musicpal_lcd_state;
static uint8_t scale_lcd_color(musicpal_lcd_state *s, uint8_t col)
{
switch (s->brightness) {
case 7:
return col;
case 0:
return 0;
default:
return (col * s->brightness) / 7;
}
}
#define SET_LCD_PIXEL(depth, type) \
static inline void glue(set_lcd_pixel, depth) \
(musicpal_lcd_state *s, int x, int y, type col) \
{ \
int dx, dy; \
DisplaySurface *surface = qemu_console_surface(s->con); \
type *pixel = &((type *) surface_data(surface))[(y * 128 * 3 + x) * 3]; \
\
for (dy = 0; dy < 3; dy++, pixel += 127 * 3) \
for (dx = 0; dx < 3; dx++, pixel++) \
*pixel = col; \
}
SET_LCD_PIXEL(8, uint8_t)
SET_LCD_PIXEL(16, uint16_t)
SET_LCD_PIXEL(32, uint32_t)
static void lcd_refresh(void *opaque)
{
musicpal_lcd_state *s = opaque;
DisplaySurface *surface = qemu_console_surface(s->con);
int x, y, col;
switch (surface_bits_per_pixel(surface)) {
case 0:
return;
#define LCD_REFRESH(depth, func) \
case depth: \
col = func(scale_lcd_color(s, (MP_LCD_TEXTCOLOR >> 16) & 0xff), \
scale_lcd_color(s, (MP_LCD_TEXTCOLOR >> 8) & 0xff), \
scale_lcd_color(s, MP_LCD_TEXTCOLOR & 0xff)); \
for (x = 0; x < 128; x++) { \
for (y = 0; y < 64; y++) { \
if (s->video_ram[x + (y/8)*128] & (1 << (y % 8))) { \
glue(set_lcd_pixel, depth)(s, x, y, col); \
} else { \
glue(set_lcd_pixel, depth)(s, x, y, 0); \
} \
} \
} \
break;
LCD_REFRESH(8, rgb_to_pixel8)
LCD_REFRESH(16, rgb_to_pixel16)
LCD_REFRESH(32, (is_surface_bgr(surface) ?
rgb_to_pixel32bgr : rgb_to_pixel32))
default:
hw_error("unsupported colour depth %i\n",
surface_bits_per_pixel(surface));
}
dpy_gfx_update(s->con, 0, 0, 128*3, 64*3);
}
static void lcd_invalidate(void *opaque)
{
}
static void musicpal_lcd_gpio_brigthness_in(void *opaque, int irq, int level)
{
musicpal_lcd_state *s = opaque;
s->brightness &= ~(1 << irq);
s->brightness |= level << irq;
}
static uint64_t musicpal_lcd_read(void *opaque, hwaddr offset,
unsigned size)
{
musicpal_lcd_state *s = opaque;
switch (offset) {
case MP_LCD_IRQCTRL:
return s->irqctrl;
default:
return 0;
}
}
static void musicpal_lcd_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
musicpal_lcd_state *s = opaque;
switch (offset) {
case MP_LCD_IRQCTRL:
s->irqctrl = value;
break;
case MP_LCD_SPICTRL:
if (value == MP_LCD_SPI_DATA || value == MP_LCD_SPI_CMD) {
s->mode = value;
} else {
s->mode = MP_LCD_SPI_INVALID;
}
break;
case MP_LCD_INST:
if (value >= MP_LCD_INST_SETPAGE0 && value <= MP_LCD_INST_SETPAGE7) {
s->page = value - MP_LCD_INST_SETPAGE0;
s->page_off = 0;
}
break;
case MP_LCD_DATA:
if (s->mode == MP_LCD_SPI_CMD) {
if (value >= MP_LCD_INST_SETPAGE0 &&
value <= MP_LCD_INST_SETPAGE7) {
s->page = value - MP_LCD_INST_SETPAGE0;
s->page_off = 0;
}
} else if (s->mode == MP_LCD_SPI_DATA) {
s->video_ram[s->page*128 + s->page_off] = value;
s->page_off = (s->page_off + 1) & 127;
}
break;
}
}
static const MemoryRegionOps musicpal_lcd_ops = {
.read = musicpal_lcd_read,
.write = musicpal_lcd_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static const GraphicHwOps musicpal_gfx_ops = {
.invalidate = lcd_invalidate,
.gfx_update = lcd_refresh,
};
static int musicpal_lcd_init(SysBusDevice *dev)
{
musicpal_lcd_state *s = FROM_SYSBUS(musicpal_lcd_state, dev);
s->brightness = 7;
memory_region_init_io(&s->iomem, &musicpal_lcd_ops, s,
"musicpal-lcd", MP_LCD_SIZE);
sysbus_init_mmio(dev, &s->iomem);
s->con = graphic_console_init(DEVICE(dev), &musicpal_gfx_ops, s);
qemu_console_resize(s->con, 128*3, 64*3);
qdev_init_gpio_in(&dev->qdev, musicpal_lcd_gpio_brigthness_in, 3);
return 0;
}
static const VMStateDescription musicpal_lcd_vmsd = {
.name = "musicpal_lcd",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(brightness, musicpal_lcd_state),
VMSTATE_UINT32(mode, musicpal_lcd_state),
VMSTATE_UINT32(irqctrl, musicpal_lcd_state),
VMSTATE_UINT32(page, musicpal_lcd_state),
VMSTATE_UINT32(page_off, musicpal_lcd_state),
VMSTATE_BUFFER(video_ram, musicpal_lcd_state),
VMSTATE_END_OF_LIST()
}
};
static void musicpal_lcd_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = musicpal_lcd_init;
dc->vmsd = &musicpal_lcd_vmsd;
}
static const TypeInfo musicpal_lcd_info = {
.name = "musicpal_lcd",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(musicpal_lcd_state),
.class_init = musicpal_lcd_class_init,
};
/* PIC register offsets */
#define MP_PIC_STATUS 0x00
#define MP_PIC_ENABLE_SET 0x08
#define MP_PIC_ENABLE_CLR 0x0C
typedef struct mv88w8618_pic_state
{
SysBusDevice busdev;
MemoryRegion iomem;
uint32_t level;
uint32_t enabled;
qemu_irq parent_irq;
} mv88w8618_pic_state;
static void mv88w8618_pic_update(mv88w8618_pic_state *s)
{
qemu_set_irq(s->parent_irq, (s->level & s->enabled));
}
static void mv88w8618_pic_set_irq(void *opaque, int irq, int level)
{
mv88w8618_pic_state *s = opaque;
if (level) {
s->level |= 1 << irq;
} else {
s->level &= ~(1 << irq);
}
mv88w8618_pic_update(s);
}
static uint64_t mv88w8618_pic_read(void *opaque, hwaddr offset,
unsigned size)
{
mv88w8618_pic_state *s = opaque;
switch (offset) {
case MP_PIC_STATUS:
return s->level & s->enabled;
default:
return 0;
}
}
static void mv88w8618_pic_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
mv88w8618_pic_state *s = opaque;
switch (offset) {
case MP_PIC_ENABLE_SET:
s->enabled |= value;
break;
case MP_PIC_ENABLE_CLR:
s->enabled &= ~value;
s->level &= ~value;
break;
}
mv88w8618_pic_update(s);
}
static void mv88w8618_pic_reset(DeviceState *d)
{
mv88w8618_pic_state *s = FROM_SYSBUS(mv88w8618_pic_state,
SYS_BUS_DEVICE(d));
s->level = 0;
s->enabled = 0;
}
static const MemoryRegionOps mv88w8618_pic_ops = {
.read = mv88w8618_pic_read,
.write = mv88w8618_pic_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static int mv88w8618_pic_init(SysBusDevice *dev)
{
mv88w8618_pic_state *s = FROM_SYSBUS(mv88w8618_pic_state, dev);
qdev_init_gpio_in(&dev->qdev, mv88w8618_pic_set_irq, 32);
sysbus_init_irq(dev, &s->parent_irq);
memory_region_init_io(&s->iomem, &mv88w8618_pic_ops, s,
"musicpal-pic", MP_PIC_SIZE);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
static const VMStateDescription mv88w8618_pic_vmsd = {
.name = "mv88w8618_pic",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(level, mv88w8618_pic_state),
VMSTATE_UINT32(enabled, mv88w8618_pic_state),
VMSTATE_END_OF_LIST()
}
};
static void mv88w8618_pic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = mv88w8618_pic_init;
dc->reset = mv88w8618_pic_reset;
dc->vmsd = &mv88w8618_pic_vmsd;
}
static const TypeInfo mv88w8618_pic_info = {
.name = "mv88w8618_pic",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(mv88w8618_pic_state),
.class_init = mv88w8618_pic_class_init,
};
/* PIT register offsets */
#define MP_PIT_TIMER1_LENGTH 0x00
/* ... */
#define MP_PIT_TIMER4_LENGTH 0x0C
#define MP_PIT_CONTROL 0x10
#define MP_PIT_TIMER1_VALUE 0x14
/* ... */
#define MP_PIT_TIMER4_VALUE 0x20
#define MP_BOARD_RESET 0x34
/* Magic board reset value (probably some watchdog behind it) */
#define MP_BOARD_RESET_MAGIC 0x10000
typedef struct mv88w8618_timer_state {
ptimer_state *ptimer;
uint32_t limit;
int freq;
qemu_irq irq;
} mv88w8618_timer_state;
typedef struct mv88w8618_pit_state {
SysBusDevice busdev;
MemoryRegion iomem;
mv88w8618_timer_state timer[4];
} mv88w8618_pit_state;
static void mv88w8618_timer_tick(void *opaque)
{
mv88w8618_timer_state *s = opaque;
qemu_irq_raise(s->irq);
}
static void mv88w8618_timer_init(SysBusDevice *dev, mv88w8618_timer_state *s,
uint32_t freq)
{
QEMUBH *bh;
sysbus_init_irq(dev, &s->irq);
s->freq = freq;
bh = qemu_bh_new(mv88w8618_timer_tick, s);
s->ptimer = ptimer_init(bh);
}
static uint64_t mv88w8618_pit_read(void *opaque, hwaddr offset,
unsigned size)
{
mv88w8618_pit_state *s = opaque;
mv88w8618_timer_state *t;
switch (offset) {
case MP_PIT_TIMER1_VALUE ... MP_PIT_TIMER4_VALUE:
t = &s->timer[(offset-MP_PIT_TIMER1_VALUE) >> 2];
return ptimer_get_count(t->ptimer);
default:
return 0;
}
}
static void mv88w8618_pit_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
mv88w8618_pit_state *s = opaque;
mv88w8618_timer_state *t;
int i;
switch (offset) {
case MP_PIT_TIMER1_LENGTH ... MP_PIT_TIMER4_LENGTH:
t = &s->timer[offset >> 2];
t->limit = value;
if (t->limit > 0) {
ptimer_set_limit(t->ptimer, t->limit, 1);
} else {
ptimer_stop(t->ptimer);
}
break;
case MP_PIT_CONTROL:
for (i = 0; i < 4; i++) {
t = &s->timer[i];
if (value & 0xf && t->limit > 0) {
ptimer_set_limit(t->ptimer, t->limit, 0);
ptimer_set_freq(t->ptimer, t->freq);
ptimer_run(t->ptimer, 0);
} else {
ptimer_stop(t->ptimer);
}
value >>= 4;
}
break;
case MP_BOARD_RESET:
if (value == MP_BOARD_RESET_MAGIC) {
qemu_system_reset_request();
}
break;
}
}
static void mv88w8618_pit_reset(DeviceState *d)
{
mv88w8618_pit_state *s = FROM_SYSBUS(mv88w8618_pit_state,
SYS_BUS_DEVICE(d));
int i;
for (i = 0; i < 4; i++) {
ptimer_stop(s->timer[i].ptimer);
s->timer[i].limit = 0;
}
}
static const MemoryRegionOps mv88w8618_pit_ops = {
.read = mv88w8618_pit_read,
.write = mv88w8618_pit_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static int mv88w8618_pit_init(SysBusDevice *dev)
{
mv88w8618_pit_state *s = FROM_SYSBUS(mv88w8618_pit_state, dev);
int i;
/* Letting them all run at 1 MHz is likely just a pragmatic
* simplification. */
for (i = 0; i < 4; i++) {
mv88w8618_timer_init(dev, &s->timer[i], 1000000);
}
memory_region_init_io(&s->iomem, &mv88w8618_pit_ops, s,
"musicpal-pit", MP_PIT_SIZE);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
static const VMStateDescription mv88w8618_timer_vmsd = {
.name = "timer",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_PTIMER(ptimer, mv88w8618_timer_state),
VMSTATE_UINT32(limit, mv88w8618_timer_state),
VMSTATE_END_OF_LIST()
}
};
static const VMStateDescription mv88w8618_pit_vmsd = {
.name = "mv88w8618_pit",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_STRUCT_ARRAY(timer, mv88w8618_pit_state, 4, 1,
mv88w8618_timer_vmsd, mv88w8618_timer_state),
VMSTATE_END_OF_LIST()
}
};
static void mv88w8618_pit_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = mv88w8618_pit_init;
dc->reset = mv88w8618_pit_reset;
dc->vmsd = &mv88w8618_pit_vmsd;
}
static const TypeInfo mv88w8618_pit_info = {
.name = "mv88w8618_pit",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(mv88w8618_pit_state),
.class_init = mv88w8618_pit_class_init,
};
/* Flash config register offsets */
#define MP_FLASHCFG_CFGR0 0x04
typedef struct mv88w8618_flashcfg_state {
SysBusDevice busdev;
MemoryRegion iomem;
uint32_t cfgr0;
} mv88w8618_flashcfg_state;
static uint64_t mv88w8618_flashcfg_read(void *opaque,
hwaddr offset,
unsigned size)
{
mv88w8618_flashcfg_state *s = opaque;
switch (offset) {
case MP_FLASHCFG_CFGR0:
return s->cfgr0;
default:
return 0;
}
}
static void mv88w8618_flashcfg_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
mv88w8618_flashcfg_state *s = opaque;
switch (offset) {
case MP_FLASHCFG_CFGR0:
s->cfgr0 = value;
break;
}
}
static const MemoryRegionOps mv88w8618_flashcfg_ops = {
.read = mv88w8618_flashcfg_read,
.write = mv88w8618_flashcfg_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static int mv88w8618_flashcfg_init(SysBusDevice *dev)
{
mv88w8618_flashcfg_state *s = FROM_SYSBUS(mv88w8618_flashcfg_state, dev);
s->cfgr0 = 0xfffe4285; /* Default as set by U-Boot for 8 MB flash */
memory_region_init_io(&s->iomem, &mv88w8618_flashcfg_ops, s,
"musicpal-flashcfg", MP_FLASHCFG_SIZE);
sysbus_init_mmio(dev, &s->iomem);
return 0;
}
static const VMStateDescription mv88w8618_flashcfg_vmsd = {
.name = "mv88w8618_flashcfg",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(cfgr0, mv88w8618_flashcfg_state),
VMSTATE_END_OF_LIST()
}
};
static void mv88w8618_flashcfg_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = mv88w8618_flashcfg_init;
dc->vmsd = &mv88w8618_flashcfg_vmsd;
}
static const TypeInfo mv88w8618_flashcfg_info = {
.name = "mv88w8618_flashcfg",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(mv88w8618_flashcfg_state),
.class_init = mv88w8618_flashcfg_class_init,
};
/* Misc register offsets */
#define MP_MISC_BOARD_REVISION 0x18
#define MP_BOARD_REVISION 0x31
typedef struct {
SysBusDevice parent_obj;
MemoryRegion iomem;
} MusicPalMiscState;
#define TYPE_MUSICPAL_MISC "musicpal-misc"
#define MUSICPAL_MISC(obj) \
OBJECT_CHECK(MusicPalMiscState, (obj), TYPE_MUSICPAL_MISC)
static uint64_t musicpal_misc_read(void *opaque, hwaddr offset,
unsigned size)
{
switch (offset) {
case MP_MISC_BOARD_REVISION:
return MP_BOARD_REVISION;
default:
return 0;
}
}
static void musicpal_misc_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
}
static const MemoryRegionOps musicpal_misc_ops = {
.read = musicpal_misc_read,
.write = musicpal_misc_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static void musicpal_misc_init(Object *obj)
{
SysBusDevice *sd = SYS_BUS_DEVICE(obj);
MusicPalMiscState *s = MUSICPAL_MISC(obj);
memory_region_init_io(&s->iomem, &musicpal_misc_ops, NULL,
"musicpal-misc", MP_MISC_SIZE);
sysbus_init_mmio(sd, &s->iomem);
}
static const TypeInfo musicpal_misc_info = {
.name = TYPE_MUSICPAL_MISC,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_init = musicpal_misc_init,
.instance_size = sizeof(MusicPalMiscState),
};
/* WLAN register offsets */
#define MP_WLAN_MAGIC1 0x11c
#define MP_WLAN_MAGIC2 0x124
static uint64_t mv88w8618_wlan_read(void *opaque, hwaddr offset,
unsigned size)
{
switch (offset) {
/* Workaround to allow loading the binary-only wlandrv.ko crap
* from the original Freecom firmware. */
case MP_WLAN_MAGIC1:
return ~3;
case MP_WLAN_MAGIC2:
return -1;
default:
return 0;
}
}
static void mv88w8618_wlan_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
}
static const MemoryRegionOps mv88w8618_wlan_ops = {
.read = mv88w8618_wlan_read,
.write =mv88w8618_wlan_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static int mv88w8618_wlan_init(SysBusDevice *dev)
{
MemoryRegion *iomem = g_new(MemoryRegion, 1);
memory_region_init_io(iomem, &mv88w8618_wlan_ops, NULL,
"musicpal-wlan", MP_WLAN_SIZE);
sysbus_init_mmio(dev, iomem);
return 0;
}
/* GPIO register offsets */
#define MP_GPIO_OE_LO 0x008
#define MP_GPIO_OUT_LO 0x00c
#define MP_GPIO_IN_LO 0x010
#define MP_GPIO_IER_LO 0x014
#define MP_GPIO_IMR_LO 0x018
#define MP_GPIO_ISR_LO 0x020
#define MP_GPIO_OE_HI 0x508
#define MP_GPIO_OUT_HI 0x50c
#define MP_GPIO_IN_HI 0x510
#define MP_GPIO_IER_HI 0x514
#define MP_GPIO_IMR_HI 0x518
#define MP_GPIO_ISR_HI 0x520
/* GPIO bits & masks */
#define MP_GPIO_LCD_BRIGHTNESS 0x00070000
#define MP_GPIO_I2C_DATA_BIT 29
#define MP_GPIO_I2C_CLOCK_BIT 30
/* LCD brightness bits in GPIO_OE_HI */
#define MP_OE_LCD_BRIGHTNESS 0x0007
typedef struct musicpal_gpio_state {
SysBusDevice busdev;
MemoryRegion iomem;
uint32_t lcd_brightness;
uint32_t out_state;
uint32_t in_state;
uint32_t ier;
uint32_t imr;
uint32_t isr;
qemu_irq irq;
qemu_irq out[5]; /* 3 brightness out + 2 lcd (data and clock ) */
} musicpal_gpio_state;
static void musicpal_gpio_brightness_update(musicpal_gpio_state *s) {
int i;
uint32_t brightness;
/* compute brightness ratio */
switch (s->lcd_brightness) {
case 0x00000007:
brightness = 0;
break;
case 0x00020000:
brightness = 1;
break;
case 0x00020001:
brightness = 2;
break;
case 0x00040000:
brightness = 3;
break;
case 0x00010006:
brightness = 4;
break;
case 0x00020005:
brightness = 5;
break;
case 0x00040003:
brightness = 6;
break;
case 0x00030004:
default:
brightness = 7;
}
/* set lcd brightness GPIOs */
for (i = 0; i <= 2; i++) {
qemu_set_irq(s->out[i], (brightness >> i) & 1);
}
}
static void musicpal_gpio_pin_event(void *opaque, int pin, int level)
{
musicpal_gpio_state *s = opaque;
uint32_t mask = 1 << pin;
uint32_t delta = level << pin;
uint32_t old = s->in_state & mask;
s->in_state &= ~mask;
s->in_state |= delta;
if ((old ^ delta) &&
((level && (s->imr & mask)) || (!level && (s->ier & mask)))) {
s->isr = mask;
qemu_irq_raise(s->irq);
}
}
static uint64_t musicpal_gpio_read(void *opaque, hwaddr offset,
unsigned size)
{
musicpal_gpio_state *s = opaque;
switch (offset) {
case MP_GPIO_OE_HI: /* used for LCD brightness control */
return s->lcd_brightness & MP_OE_LCD_BRIGHTNESS;
case MP_GPIO_OUT_LO:
return s->out_state & 0xFFFF;
case MP_GPIO_OUT_HI:
return s->out_state >> 16;
case MP_GPIO_IN_LO:
return s->in_state & 0xFFFF;
case MP_GPIO_IN_HI:
return s->in_state >> 16;
case MP_GPIO_IER_LO:
return s->ier & 0xFFFF;
case MP_GPIO_IER_HI:
return s->ier >> 16;
case MP_GPIO_IMR_LO:
return s->imr & 0xFFFF;
case MP_GPIO_IMR_HI:
return s->imr >> 16;
case MP_GPIO_ISR_LO:
return s->isr & 0xFFFF;
case MP_GPIO_ISR_HI:
return s->isr >> 16;
default:
return 0;
}
}
static void musicpal_gpio_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
musicpal_gpio_state *s = opaque;
switch (offset) {
case MP_GPIO_OE_HI: /* used for LCD brightness control */
s->lcd_brightness = (s->lcd_brightness & MP_GPIO_LCD_BRIGHTNESS) |
(value & MP_OE_LCD_BRIGHTNESS);
musicpal_gpio_brightness_update(s);
break;
case MP_GPIO_OUT_LO:
s->out_state = (s->out_state & 0xFFFF0000) | (value & 0xFFFF);
break;
case MP_GPIO_OUT_HI:
s->out_state = (s->out_state & 0xFFFF) | (value << 16);
s->lcd_brightness = (s->lcd_brightness & 0xFFFF) |
(s->out_state & MP_GPIO_LCD_BRIGHTNESS);
musicpal_gpio_brightness_update(s);
qemu_set_irq(s->out[3], (s->out_state >> MP_GPIO_I2C_DATA_BIT) & 1);
qemu_set_irq(s->out[4], (s->out_state >> MP_GPIO_I2C_CLOCK_BIT) & 1);
break;
case MP_GPIO_IER_LO:
s->ier = (s->ier & 0xFFFF0000) | (value & 0xFFFF);
break;
case MP_GPIO_IER_HI:
s->ier = (s->ier & 0xFFFF) | (value << 16);
break;
case MP_GPIO_IMR_LO:
s->imr = (s->imr & 0xFFFF0000) | (value & 0xFFFF);
break;
case MP_GPIO_IMR_HI:
s->imr = (s->imr & 0xFFFF) | (value << 16);
break;
}
}
static const MemoryRegionOps musicpal_gpio_ops = {
.read = musicpal_gpio_read,
.write = musicpal_gpio_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static void musicpal_gpio_reset(DeviceState *d)
{
musicpal_gpio_state *s = FROM_SYSBUS(musicpal_gpio_state,
SYS_BUS_DEVICE(d));
s->lcd_brightness = 0;
s->out_state = 0;
s->in_state = 0xffffffff;
s->ier = 0;
s->imr = 0;
s->isr = 0;
}
static int musicpal_gpio_init(SysBusDevice *dev)
{
musicpal_gpio_state *s = FROM_SYSBUS(musicpal_gpio_state, dev);
sysbus_init_irq(dev, &s->irq);
memory_region_init_io(&s->iomem, &musicpal_gpio_ops, s,
"musicpal-gpio", MP_GPIO_SIZE);
sysbus_init_mmio(dev, &s->iomem);
qdev_init_gpio_out(&dev->qdev, s->out, ARRAY_SIZE(s->out));
qdev_init_gpio_in(&dev->qdev, musicpal_gpio_pin_event, 32);
return 0;
}
static const VMStateDescription musicpal_gpio_vmsd = {
.name = "musicpal_gpio",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(lcd_brightness, musicpal_gpio_state),
VMSTATE_UINT32(out_state, musicpal_gpio_state),
VMSTATE_UINT32(in_state, musicpal_gpio_state),
VMSTATE_UINT32(ier, musicpal_gpio_state),
VMSTATE_UINT32(imr, musicpal_gpio_state),
VMSTATE_UINT32(isr, musicpal_gpio_state),
VMSTATE_END_OF_LIST()
}
};
static void musicpal_gpio_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = musicpal_gpio_init;
dc->reset = musicpal_gpio_reset;
dc->vmsd = &musicpal_gpio_vmsd;
}
static const TypeInfo musicpal_gpio_info = {
.name = "musicpal_gpio",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(musicpal_gpio_state),
.class_init = musicpal_gpio_class_init,
};
/* Keyboard codes & masks */
#define KEY_RELEASED 0x80
#define KEY_CODE 0x7f
#define KEYCODE_TAB 0x0f
#define KEYCODE_ENTER 0x1c
#define KEYCODE_F 0x21
#define KEYCODE_M 0x32
#define KEYCODE_EXTENDED 0xe0
#define KEYCODE_UP 0x48
#define KEYCODE_DOWN 0x50
#define KEYCODE_LEFT 0x4b
#define KEYCODE_RIGHT 0x4d
#define MP_KEY_WHEEL_VOL (1 << 0)
#define MP_KEY_WHEEL_VOL_INV (1 << 1)
#define MP_KEY_WHEEL_NAV (1 << 2)
#define MP_KEY_WHEEL_NAV_INV (1 << 3)
#define MP_KEY_BTN_FAVORITS (1 << 4)
#define MP_KEY_BTN_MENU (1 << 5)
#define MP_KEY_BTN_VOLUME (1 << 6)
#define MP_KEY_BTN_NAVIGATION (1 << 7)
typedef struct musicpal_key_state {
SysBusDevice busdev;
MemoryRegion iomem;
uint32_t kbd_extended;
uint32_t pressed_keys;
qemu_irq out[8];
} musicpal_key_state;
static void musicpal_key_event(void *opaque, int keycode)
{
musicpal_key_state *s = opaque;
uint32_t event = 0;
int i;
if (keycode == KEYCODE_EXTENDED) {
s->kbd_extended = 1;
return;
}
if (s->kbd_extended) {
switch (keycode & KEY_CODE) {
case KEYCODE_UP:
event = MP_KEY_WHEEL_NAV | MP_KEY_WHEEL_NAV_INV;
break;
case KEYCODE_DOWN:
event = MP_KEY_WHEEL_NAV;
break;
case KEYCODE_LEFT:
event = MP_KEY_WHEEL_VOL | MP_KEY_WHEEL_VOL_INV;
break;
case KEYCODE_RIGHT:
event = MP_KEY_WHEEL_VOL;
break;
}
} else {
switch (keycode & KEY_CODE) {
case KEYCODE_F:
event = MP_KEY_BTN_FAVORITS;
break;
case KEYCODE_TAB:
event = MP_KEY_BTN_VOLUME;
break;
case KEYCODE_ENTER:
event = MP_KEY_BTN_NAVIGATION;
break;
case KEYCODE_M:
event = MP_KEY_BTN_MENU;
break;
}
/* Do not repeat already pressed buttons */
if (!(keycode & KEY_RELEASED) && (s->pressed_keys & event)) {
event = 0;
}
}
if (event) {
/* Raise GPIO pin first if repeating a key */
if (!(keycode & KEY_RELEASED) && (s->pressed_keys & event)) {
for (i = 0; i <= 7; i++) {
if (event & (1 << i)) {
qemu_set_irq(s->out[i], 1);
}
}
}
for (i = 0; i <= 7; i++) {
if (event & (1 << i)) {
qemu_set_irq(s->out[i], !!(keycode & KEY_RELEASED));
}
}
if (keycode & KEY_RELEASED) {
s->pressed_keys &= ~event;
} else {
s->pressed_keys |= event;
}
}
s->kbd_extended = 0;
}
static int musicpal_key_init(SysBusDevice *dev)
{
musicpal_key_state *s = FROM_SYSBUS(musicpal_key_state, dev);
memory_region_init(&s->iomem, "dummy", 0);
sysbus_init_mmio(dev, &s->iomem);
s->kbd_extended = 0;
s->pressed_keys = 0;
qdev_init_gpio_out(&dev->qdev, s->out, ARRAY_SIZE(s->out));
qemu_add_kbd_event_handler(musicpal_key_event, s);
return 0;
}
static const VMStateDescription musicpal_key_vmsd = {
.name = "musicpal_key",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(kbd_extended, musicpal_key_state),
VMSTATE_UINT32(pressed_keys, musicpal_key_state),
VMSTATE_END_OF_LIST()
}
};
static void musicpal_key_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = musicpal_key_init;
dc->vmsd = &musicpal_key_vmsd;
}
static const TypeInfo musicpal_key_info = {
.name = "musicpal_key",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(musicpal_key_state),
.class_init = musicpal_key_class_init,
};
static struct arm_boot_info musicpal_binfo = {
.loader_start = 0x0,
.board_id = 0x20e,
};
static void musicpal_init(QEMUMachineInitArgs *args)
{
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
ARMCPU *cpu;
qemu_irq *cpu_pic;
qemu_irq pic[32];
DeviceState *dev;
DeviceState *i2c_dev;
DeviceState *lcd_dev;
DeviceState *key_dev;
DeviceState *wm8750_dev;
SysBusDevice *s;
i2c_bus *i2c;
int i;
unsigned long flash_size;
DriveInfo *dinfo;
MemoryRegion *address_space_mem = get_system_memory();
MemoryRegion *ram = g_new(MemoryRegion, 1);
MemoryRegion *sram = g_new(MemoryRegion, 1);
if (!cpu_model) {
cpu_model = "arm926";
}
cpu = cpu_arm_init(cpu_model);
if (!cpu) {
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
cpu_pic = arm_pic_init_cpu(cpu);
/* For now we use a fixed - the original - RAM size */
memory_region_init_ram(ram, "musicpal.ram", MP_RAM_DEFAULT_SIZE);
vmstate_register_ram_global(ram);
memory_region_add_subregion(address_space_mem, 0, ram);
memory_region_init_ram(sram, "musicpal.sram", MP_SRAM_SIZE);
vmstate_register_ram_global(sram);
memory_region_add_subregion(address_space_mem, MP_SRAM_BASE, sram);
dev = sysbus_create_simple("mv88w8618_pic", MP_PIC_BASE,
cpu_pic[ARM_PIC_CPU_IRQ]);
for (i = 0; i < 32; i++) {
pic[i] = qdev_get_gpio_in(dev, i);
}
sysbus_create_varargs("mv88w8618_pit", MP_PIT_BASE, pic[MP_TIMER1_IRQ],
pic[MP_TIMER2_IRQ], pic[MP_TIMER3_IRQ],
pic[MP_TIMER4_IRQ], NULL);
if (serial_hds[0]) {
serial_mm_init(address_space_mem, MP_UART1_BASE, 2, pic[MP_UART1_IRQ],
1825000, serial_hds[0], DEVICE_NATIVE_ENDIAN);
}
if (serial_hds[1]) {
serial_mm_init(address_space_mem, MP_UART2_BASE, 2, pic[MP_UART2_IRQ],
1825000, serial_hds[1], DEVICE_NATIVE_ENDIAN);
}
/* Register flash */
dinfo = drive_get(IF_PFLASH, 0, 0);
if (dinfo) {
flash_size = bdrv_getlength(dinfo->bdrv);
if (flash_size != 8*1024*1024 && flash_size != 16*1024*1024 &&
flash_size != 32*1024*1024) {
fprintf(stderr, "Invalid flash image size\n");
exit(1);
}
/*
* The original U-Boot accesses the flash at 0xFE000000 instead of
* 0xFF800000 (if there is 8 MB flash). So remap flash access if the
* image is smaller than 32 MB.
*/
#ifdef TARGET_WORDS_BIGENDIAN
pflash_cfi02_register(0x100000000ULL-MP_FLASH_SIZE_MAX, NULL,
"musicpal.flash", flash_size,
dinfo->bdrv, 0x10000,
(flash_size + 0xffff) >> 16,
MP_FLASH_SIZE_MAX / flash_size,
2, 0x00BF, 0x236D, 0x0000, 0x0000,
0x5555, 0x2AAA, 1);
#else
pflash_cfi02_register(0x100000000ULL-MP_FLASH_SIZE_MAX, NULL,
"musicpal.flash", flash_size,
dinfo->bdrv, 0x10000,
(flash_size + 0xffff) >> 16,
MP_FLASH_SIZE_MAX / flash_size,
2, 0x00BF, 0x236D, 0x0000, 0x0000,
0x5555, 0x2AAA, 0);
#endif
}
sysbus_create_simple("mv88w8618_flashcfg", MP_FLASHCFG_BASE, NULL);
qemu_check_nic_model(&nd_table[0], "mv88w8618");
dev = qdev_create(NULL, "mv88w8618_eth");
qdev_set_nic_properties(dev, &nd_table[0]);
qdev_init_nofail(dev);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, MP_ETH_BASE);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[MP_ETH_IRQ]);
sysbus_create_simple("mv88w8618_wlan", MP_WLAN_BASE, NULL);
sysbus_create_simple(TYPE_MUSICPAL_MISC, MP_MISC_BASE, NULL);
dev = sysbus_create_simple("musicpal_gpio", MP_GPIO_BASE, pic[MP_GPIO_IRQ]);
i2c_dev = sysbus_create_simple("gpio_i2c", -1, NULL);
i2c = (i2c_bus *)qdev_get_child_bus(i2c_dev, "i2c");
lcd_dev = sysbus_create_simple("musicpal_lcd", MP_LCD_BASE, NULL);
key_dev = sysbus_create_simple("musicpal_key", -1, NULL);
/* I2C read data */
qdev_connect_gpio_out(i2c_dev, 0,
qdev_get_gpio_in(dev, MP_GPIO_I2C_DATA_BIT));
/* I2C data */
qdev_connect_gpio_out(dev, 3, qdev_get_gpio_in(i2c_dev, 0));
/* I2C clock */
qdev_connect_gpio_out(dev, 4, qdev_get_gpio_in(i2c_dev, 1));
for (i = 0; i < 3; i++) {
qdev_connect_gpio_out(dev, i, qdev_get_gpio_in(lcd_dev, i));
}
for (i = 0; i < 4; i++) {
qdev_connect_gpio_out(key_dev, i, qdev_get_gpio_in(dev, i + 8));
}
for (i = 4; i < 8; i++) {
qdev_connect_gpio_out(key_dev, i, qdev_get_gpio_in(dev, i + 15));
}
wm8750_dev = i2c_create_slave(i2c, "wm8750", MP_WM_ADDR);
dev = qdev_create(NULL, "mv88w8618_audio");
s = SYS_BUS_DEVICE(dev);
qdev_prop_set_ptr(dev, "wm8750", wm8750_dev);
qdev_init_nofail(dev);
sysbus_mmio_map(s, 0, MP_AUDIO_BASE);
sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]);
musicpal_binfo.ram_size = MP_RAM_DEFAULT_SIZE;
musicpal_binfo.kernel_filename = kernel_filename;
musicpal_binfo.kernel_cmdline = kernel_cmdline;
musicpal_binfo.initrd_filename = initrd_filename;
arm_load_kernel(cpu, &musicpal_binfo);
}
static QEMUMachine musicpal_machine = {
.name = "musicpal",
.desc = "Marvell 88w8618 / MusicPal (ARM926EJ-S)",
.init = musicpal_init,
DEFAULT_MACHINE_OPTIONS,
};
static void musicpal_machine_init(void)
{
qemu_register_machine(&musicpal_machine);
}
machine_init(musicpal_machine_init);
static void mv88w8618_wlan_class_init(ObjectClass *klass, void *data)
{
SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
sdc->init = mv88w8618_wlan_init;
}
static const TypeInfo mv88w8618_wlan_info = {
.name = "mv88w8618_wlan",
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(SysBusDevice),
.class_init = mv88w8618_wlan_class_init,
};
static void musicpal_register_types(void)
{
type_register_static(&mv88w8618_pic_info);
type_register_static(&mv88w8618_pit_info);
type_register_static(&mv88w8618_flashcfg_info);
type_register_static(&mv88w8618_eth_info);
type_register_static(&mv88w8618_wlan_info);
type_register_static(&musicpal_lcd_info);
type_register_static(&musicpal_gpio_info);
type_register_static(&musicpal_key_info);
type_register_static(&musicpal_misc_info);
}
type_init(musicpal_register_types)
| xsilon/qemu | hw/arm/musicpal.c | C | gpl-2.0 | 48,330 | [
30522,
1013,
1008,
1008,
8348,
2140,
19842,
2620,
2620,
2860,
20842,
15136,
1013,
2489,
9006,
2189,
12952,
7861,
9513,
1012,
1008,
1008,
9385,
1006,
1039,
1007,
2263,
5553,
11382,
17112,
2912,
1008,
1008,
2023,
3642,
2003,
7000,
2104,
1996,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/diagnostics/diagnostics_controller.h"
#include <string>
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "chrome/browser/diagnostics/diagnostics_model.h"
#include "chrome/browser/diagnostics/diagnostics_writer.h"
#include "chrome/common/chrome_switches.h"
namespace diagnostics {
DiagnosticsController* DiagnosticsController::GetInstance() {
return Singleton<DiagnosticsController>::get();
}
DiagnosticsController::DiagnosticsController() : writer_(NULL) {}
DiagnosticsController::~DiagnosticsController() {}
const DiagnosticsModel& DiagnosticsController::GetResults() const {
return *model_;
}
bool DiagnosticsController::HasResults() {
return (model_.get() && model_->GetTestRunCount() > 0);
}
void DiagnosticsController::ClearResults() { model_.reset(); }
// This entry point is called from early in startup when very few things have
// been initialized, so be careful what you use.
int DiagnosticsController::Run(const CommandLine& command_line,
DiagnosticsWriter* writer) {
writer_ = writer;
model_.reset(MakeDiagnosticsModel(command_line));
model_->RunAll(writer_);
return 0;
}
// This entry point is called from early in startup when very few things have
// been initialized, so be careful what you use.
int DiagnosticsController::RunRecovery(const CommandLine& command_line,
DiagnosticsWriter* writer) {
if (!HasResults()) {
if (writer) {
writer->WriteInfoLine("No diagnostics have been run.");
writer->OnAllRecoveryDone(model_.get());
}
return -1;
}
writer_ = writer;
model_->RecoverAll(writer_);
return 0;
}
} // namespace diagnostics
| aospx-kitkat/platform_external_chromium_org | chrome/browser/diagnostics/diagnostics_controller.cc | C++ | bsd-3-clause | 1,952 | [
30522,
1013,
1013,
9385,
2286,
1996,
10381,
21716,
5007,
6048,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
2224,
1997,
2023,
3120,
3642,
2003,
9950,
2011,
1037,
18667,
2094,
1011,
2806,
6105,
2008,
2064,
2022,
1013,
1013,
2179,
1999,
1996,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
import { createStore, compose, applyMiddleware } from 'redux';
import reduxImmutableStateInvariant from 'redux-immutable-state-invariant';
import thunk from 'redux-thunk';
import axios from 'axios';
import axiosMiddleware from 'redux-axios-middleware';
import rootReducer from '../reducers';
const client = axios.create({
//all axios can be used, shown in axios documentation
baseURL: '/api/',
responseType: 'json'
});
function configureStoreProd(initialState) {
const middlewares = [
// Add other middleware on this line...
// thunk middleware can also accept an extra argument to be passed to each thunk action
// https://github.com/gaearon/redux-thunk#injecting-a-custom-argument
thunk,
axiosMiddleware(client)
];
return createStore(
rootReducer,
initialState,
compose(applyMiddleware(...middlewares))
);
}
function configureStoreDev(initialState) {
const middlewares = [
// Add other middleware on this line...
// Redux middleware that spits an error on you when you try to mutate your state either inside a dispatch or between dispatches.
reduxImmutableStateInvariant(),
// thunk middleware can also accept an extra argument to be passed to each thunk action
// https://github.com/gaearon/redux-thunk#injecting-a-custom-argument
thunk,
axiosMiddleware(client)
];
const composeEnhancers =
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; // add support for Redux dev tools
const store = createStore(
rootReducer,
initialState,
composeEnhancers(applyMiddleware(...middlewares))
);
if (module.hot) {
// Enable Webpack hot module replacement for reducers
module.hot.accept('../reducers', () => {
const nextReducer = require('../reducers').default; // eslint-disable-line global-require
store.replaceReducer(nextReducer);
});
}
return store;
}
const configureStore =
process.env.NODE_ENV === 'production'
? configureStoreProd
: configureStoreDev;
export default configureStore;
| guiconti/Buildev | src/store/configureStore.js | JavaScript | mit | 2,037 | [
30522,
12324,
1063,
9005,
19277,
1010,
17202,
1010,
6611,
4328,
20338,
8059,
1065,
2013,
1005,
2417,
5602,
1005,
1025,
12324,
2417,
5602,
5714,
28120,
3085,
9153,
9589,
10755,
2937,
2102,
2013,
1005,
2417,
5602,
1011,
10047,
28120,
3085,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package tcp
import (
"fmt"
"io"
"net"
"os"
"sync"
"github.com/rootless-containers/rootlesskit/pkg/port"
"github.com/rootless-containers/rootlesskit/pkg/port/builtin/msg"
)
func Run(socketPath string, spec port.Spec, stopCh <-chan struct{}, logWriter io.Writer) error {
ln, err := net.Listen("tcp", fmt.Sprintf("%s:%d", spec.ParentIP, spec.ParentPort))
if err != nil {
fmt.Fprintf(logWriter, "listen: %v\n", err)
return err
}
newConns := make(chan net.Conn)
go func() {
for {
c, err := ln.Accept()
if err != nil {
fmt.Fprintf(logWriter, "accept: %v\n", err)
close(newConns)
return
}
newConns <- c
}
}()
go func() {
defer ln.Close()
for {
select {
case c, ok := <-newConns:
if !ok {
return
}
go func() {
if err := copyConnToChild(c, socketPath, spec, stopCh); err != nil {
fmt.Fprintf(logWriter, "copyConnToChild: %v\n", err)
return
}
}()
case <-stopCh:
return
}
}
}()
// no wait
return nil
}
func copyConnToChild(c net.Conn, socketPath string, spec port.Spec, stopCh <-chan struct{}) error {
defer c.Close()
// get fd from the child as an SCM_RIGHTS cmsg
fd, err := msg.ConnectToChildWithRetry(socketPath, spec, 10)
if err != nil {
return err
}
f := os.NewFile(uintptr(fd), "")
defer f.Close()
fc, err := net.FileConn(f)
if err != nil {
return err
}
defer fc.Close()
bicopy(c, fc, stopCh)
return nil
}
// bicopy is based on libnetwork/cmd/proxy/tcp_proxy.go .
// NOTE: sendfile(2) cannot be used for sockets
func bicopy(x, y net.Conn, quit <-chan struct{}) {
var wg sync.WaitGroup
var broker = func(to, from net.Conn) {
io.Copy(to, from)
if fromTCP, ok := from.(*net.TCPConn); ok {
fromTCP.CloseRead()
}
if toTCP, ok := to.(*net.TCPConn); ok {
toTCP.CloseWrite()
}
wg.Done()
}
wg.Add(2)
go broker(x, y)
go broker(y, x)
finish := make(chan struct{})
go func() {
wg.Wait()
close(finish)
}()
select {
case <-quit:
case <-finish:
}
x.Close()
y.Close()
<-finish
}
| rancher/k3s | vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/tcp/tcp.go | GO | apache-2.0 | 2,034 | [
30522,
7427,
22975,
2361,
12324,
1006,
1000,
4718,
2102,
1000,
1000,
22834,
1000,
1000,
5658,
1000,
1000,
9808,
1000,
1000,
26351,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
7117,
3238,
1011,
16143,
1013,
7117,
3238,
23615,
1013,
105... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
Embedded CSS
Before moving to full version - check twice!
NO DUPLICATES
*/
#icon-wpcf {
background: url('../images/logo-32.png') no-repeat;
}
#icon-wpcf-access {
background: url('../images/access-icon-32x32.png') no-repeat;
}
#icon-wpcf-search {
background: url('../images/search_36x34.png') no-repeat;
}
.wpcf-ajax-loading {
background: url('../images/ajax-loader-big.gif') no-repeat;
width: 32px;
height: 32px;
}
.wpcf-ajax-loading-small {
background: url('../images/ajax-loader-small.gif') no-repeat;
width: 16px;
height: 16px;
}
/* FORMS */
.wpcf-form-fieldset {
background-color: #ffffff;
padding: 0 15px 15px 15px;
border: 1px solid #cccccc;
border-color: #cccccc;
margin: 15px 0 25px 0;
}
.wpcf-form-fieldset fieldset {
margin-bottom: 0;
}
.wpcf-fields-form fieldset {
width: auto;
}
.wpcf-form-fieldset legend {
font-weight: bold;
}
.wpcf-form-fieldset .legend-collapsed {
padding-left: 15px;
background-image: url('../images/expand.png');
background-repeat: no-repeat;
background-position: 0px 2px;
cursor: pointer;
}
.wpcf-form-fieldset .legend-expanded {
padding-left: 15px;
background-image: url('../images/collapse.png');
background-repeat: no-repeat;
background-position: 0px 3px;
cursor: pointer;
}
.wpcf-form-fieldset .collapsed {
display: none;
}
.wpcf-form-item {
margin-bottom: 25px;
}
.wpcf-form-fieldset .wpcf-form-item:first-child {
margin-top: 5px;
}
.wpcf-form-item .wpcf-form-item {
margin-bottom: 0;
}
.wpcf-form-submit {
margin-top: 15px;
}
.wpcf-form-description {
font-size: 0.85em;
font-style: italic;
margin-bottom: 5px;
}
.wpcf-form-description-fieldset {
font-size: 1em;
font-style: normal;
margin: 10px 0;
}
.wpcf-form-textarea {
width: 100%;
}
.wpcf-form-description-textarea,
.wpcf-form-description-checkboxes,
.wpcf-form-description-radios {
font-size: 1em;
font-style: normal;
margin-bottom: 5px;
}
.wpcf-form-label {
white-space: nowrap;
}
.wpcf-form-textfield-label {
font-size: 1em;
font-weight: bold;
display: block;
}
.wpcf-form-textfield {
width: 200px;
}
.wpcf-form-item-file label {
font-size: 1em;
font-weight: bold;
display: block;
}
.wpcf-form-item-textarea label,
.wpcf-form-title-checkboxes,
.wpcf-form-title-radios,
.wpcf-form-select-label {
font-size: 1em;
font-weight: bold;
}
.wpcf-form-item-textarea label {
display: block;
}
.wpcf-form-error {
background-color: #ffffe0;
border: 1px solid #e6db55;
padding: 5px 10px;
width: auto;
margin: 10px 0;
display: block;
}
input.wpcf-form-error {
background-color: #F8F8F8;
border-color: Red !important;
}
.wpcf-form-fields-align-right {
float: left;
width: 250px;
margin-top: 0;
margin-left: 450px;
/* position: absolute;*/
position: fixed;
/* THIS IS ALSO SET IN JS AFTER ADDING SCROLL */
clear: both;
z-index: 12;
}
.wpcf-form-fields-align-right fieldset {
width: 250px;
background-color: #ffffff;
}
.wpcf-form-fields-align-right a.wpcf-fields-add-ajax-link {
margin: 3px 5px 2px 0;
float: left;
}
.wpcf-fields-form .ui-draggable .wpcf-form-fieldset .wpcf-form-fieldset legend {
cursor: pointer;
}
.wpcf-fields-form .ui-sortable {
padding: 0 0 10px 0;
}
.wpcf-fields-form .ui-sortable-placeholder {
border: 1px dashed #CCCCCC;
width: auto;
visibility: visible !important;
}
.wpcf-form-fields-delete,
.wpcf-fields-form-move-field {
float: left;
margin-top: 10px;
margin-top: 3px;
margin-right: 5px;
}
.wpcf-fields-form-move-field {
cursor: move;
}
.wpcf-fields-form .taxonomy-title {
margin-top: 10px;
font-style: italic;
}
/* LIST */
#wpcf_groups_list th {
white-space: nowrap;
}
#wpcf-table-group_name {
width: 250px;
}
#wpcf-table-group_taxonomies {
width: 200px;
}
#wpcf-form-fields-main {
width: 400px;
}
/* STRANGE */
#ui-datepicker-div {
display: none;
}
.wpcf-shortcode {
margin-top: 5px;
}
.wpcf-pointer {
cursor: pointer;
}
.wpcf-fields-form-validate-table {
padding: 0;
margin: 0;
width: 100%;
border: 1px solid #D2D2D2;
}
.wpcf-fields-form-validate-table td {
padding: 5px 10px;
margin: 0;
}
.wpcf-fields-form-validate-table thead tr {
background-color: #E8E8E8;
font-weight: bold;
}
.wpcf-fields-form-validate-table thead td {
border-bottom: 1px solid #D2D2D2;
}
.wpcf-fields-form-validate-table tbody tr:nth-child(odd) {
background-color: #F7F7F7;
}
.wpcf-fields-form-validate-table tbody tr:nth-child(even) {
background-color: #EEEEEE;
}
.wpcf-fields-form-validate-table td .textfield{
width: 100%;
}
.wpcf-fields-form-radio-move-field {
cursor: move;
}
/* TYPES FORM */
#wpcf-types-form-name-table,
#wpcf-types-form-visibility-table,
#wpcf-types-form-labels-table,
#wpcf-types-form-taxonomies-table,
#wpcf-types-form-supports-table,
.wpcf-types-form-table {
margin-bottom: 20px;
padding-bottom: 5px;
}
#wpcf-types-form-name-table td,
#wpcf-types-form-visibility-table td,
#wpcf-types-form-labels-table td,
#wpcf-types-form-taxonomies-table td,
#wpcf-types-form-supports-table td,
.wpcf-types-form-table td {
border: none;
}
#wpcf-types-form-name-table tbody tr td:first-child {
text-align: right;
}
#wpcf-types-form-name-table tbody tr:first-child td {
padding-top: 10px;
}
#wpcf-types-form-name-table input {
width: 100%;
}
#wpcf-types-form-name-table label {
font-weight: normal;
}
#wpcf-types-form-visibility-table tbody table {
margin-top: 5px;
}
#wpcf-types-form-visibility-table tbody table td {
padding: 0;
vertical-align: middle;
}
#wpcf-types-form-visibility-table tbody table tr td:first-child {
text-align: right;
}
#wpcf-types-form-visibility-table tbody table label {
font-weight: normal;
}
#wpcf-types-form-labels-table tbody tr td:first-child {
text-align: right;
}
#wpcf-types-form-labels-table tbody label {
font-weight: normal;
}
#wpcf-types-form-labels-table tbody td {
vertical-align: middle;
}
#wpcf-types-form-labels-table .wpcf-form-description {
font-size: 0.9em;
line-height: 1.2em;
}
#wpcf-types-form-labels-table tbody tr:first-child td {
padding-top: 15px;
}
#wpcf-types-form-rewrite-toggle {
margin: 0 0 20px 0;
}
/*CHECKBOXES*/
.wpcf-checkboxes-drag {
position: absolute;
}
.wpcf-checkboxes-drag img {
cursor: pointer;
}
.wpcf-fields-checkboxes-draggable legend {
background-position: 15px 2px !important;
background-repeat: no-repeat;
cursor: pointer;
padding-left: 30px !important;
}
.wpcf-message {
padding: 0 0.6em;
border-radius: 3px 3px 3px 3px;
border-style: solid;
border-width: 1px;
margin: 1em 0 1em 0;
}
.wpcf-error {
background-color: #FFEBE8;
border-color: #CC0000;
padding: 5px;
}
.wpcf-admin-fields-help {
margin-bottom: 10px;
}
.wpcf-help-link {
display:inline-block;
min-height:19px;
height:19px;
font-size:11px !important;
line-height:19px;
min-width:19px;
padding-left:20px;
padding-top:4px;
background:url('../../common/res/images/question.png') no-repeat 0 6px;
text-decoration:none !important;
position:relative;
z-index:100;
/*color:#FFFFFF !important;*/
float:right;
margin: -20px 45px 0 0;
}
.wpcf-help-link:hover {
text-decoration:underline !important;
color:#d54e21 !important;
background-position:0 -19px;
}
.wpcf-form-options-header-title {
position: absolute;
margin: -18px 0 0 40px;
}
.wpcf-form-options-header-value {
position: absolute;
margin: -18px 0 0 125px;
}
.wpcf-loading {
width: 20px;
height: 16px;
background: url('../images/wpspin.gif') no-repeat 2px 0;
display: inline-block;
}
.wpcf-hide {
display: none;
}
.wpcf-show {
/*display: block;*/
}
/* SETTINGS PAGE */
.horlist {
margin-bottom: 12px;
}
.horlist li {
float: left;
line-height: 20px;
margin-right: 10px;
}
#wpcf-ajax * {
width: auto;
}
#wpcf-ajax #wpcontent {
margin: 0px;
}
#wpcf-ajax #wpbody-content{
padding: 20px;
width: 80%;
}
#wpcf-ajax #wpfooter {
clear: both;
display: none;
}
.wpcf-editor-popup-advanced-link {
display: block;
padding: 10px 0;
outline: 0 !important;
border: 0 !important;
}
.wpcf-editor-popup-advanced-link a:hover,
.wpcf-editor-popup-advanced-link a:active,
.wpcf-editor-popup-advanced-link a:focus {
outline: 0 !important;
border: 0 !important;
}
.modman-inline-table {
margin-top: 20px;
}
.wpcf-pagination-top {
margin-bottom: 10px;
}
.types-ajax #wpwrap {
margin-top: 20px;
}
.types-small-italic {
font-size: 0.9em;
font-style: italic;
}
.types-ajax #screen-meta-links,
.types-ajax #screen-meta {
display: none;
} | noahjohn9259/emberrcom | wp-content/plugins/types/embedded/resources/css/basic.css | CSS | gpl-2.0 | 8,876 | [
30522,
1013,
1008,
11157,
30524,
24471,
2140,
1006,
1005,
1012,
1012,
1013,
4871,
1013,
8154,
1011,
3590,
1012,
1052,
3070,
1005,
1007,
2053,
1011,
9377,
1025,
1065,
1001,
12696,
1011,
1059,
15042,
2546,
1011,
3229,
1063,
4281,
1024,
24471,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# /* **************************************************************************
# * *
# * (C) Copyright Paul Mensonides 2002.
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# * *
# ************************************************************************** */
#
# /* Revised by Edward Diener (2020) */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP
# define BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP
#
# include <boost/preprocessor/config/config.hpp>
#
# /* BOOST_PP_SEQ_SPLIT */
#
# define BOOST_PP_SEQ_SPLIT(n, seq) BOOST_PP_SEQ_SPLIT_D(n, seq)
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n seq)
# else
# define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n ## seq)
# endif
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
#
# define BOOST_PP_SEQ_SPLIT_1(x) (x),
# define BOOST_PP_SEQ_SPLIT_2(x) (x) BOOST_PP_SEQ_SPLIT_1
# define BOOST_PP_SEQ_SPLIT_3(x) (x) BOOST_PP_SEQ_SPLIT_2
# define BOOST_PP_SEQ_SPLIT_4(x) (x) BOOST_PP_SEQ_SPLIT_3
# define BOOST_PP_SEQ_SPLIT_5(x) (x) BOOST_PP_SEQ_SPLIT_4
# define BOOST_PP_SEQ_SPLIT_6(x) (x) BOOST_PP_SEQ_SPLIT_5
# define BOOST_PP_SEQ_SPLIT_7(x) (x) BOOST_PP_SEQ_SPLIT_6
# define BOOST_PP_SEQ_SPLIT_8(x) (x) BOOST_PP_SEQ_SPLIT_7
# define BOOST_PP_SEQ_SPLIT_9(x) (x) BOOST_PP_SEQ_SPLIT_8
# define BOOST_PP_SEQ_SPLIT_10(x) (x) BOOST_PP_SEQ_SPLIT_9
# define BOOST_PP_SEQ_SPLIT_11(x) (x) BOOST_PP_SEQ_SPLIT_10
# define BOOST_PP_SEQ_SPLIT_12(x) (x) BOOST_PP_SEQ_SPLIT_11
# define BOOST_PP_SEQ_SPLIT_13(x) (x) BOOST_PP_SEQ_SPLIT_12
# define BOOST_PP_SEQ_SPLIT_14(x) (x) BOOST_PP_SEQ_SPLIT_13
# define BOOST_PP_SEQ_SPLIT_15(x) (x) BOOST_PP_SEQ_SPLIT_14
# define BOOST_PP_SEQ_SPLIT_16(x) (x) BOOST_PP_SEQ_SPLIT_15
# define BOOST_PP_SEQ_SPLIT_17(x) (x) BOOST_PP_SEQ_SPLIT_16
# define BOOST_PP_SEQ_SPLIT_18(x) (x) BOOST_PP_SEQ_SPLIT_17
# define BOOST_PP_SEQ_SPLIT_19(x) (x) BOOST_PP_SEQ_SPLIT_18
# define BOOST_PP_SEQ_SPLIT_20(x) (x) BOOST_PP_SEQ_SPLIT_19
# define BOOST_PP_SEQ_SPLIT_21(x) (x) BOOST_PP_SEQ_SPLIT_20
# define BOOST_PP_SEQ_SPLIT_22(x) (x) BOOST_PP_SEQ_SPLIT_21
# define BOOST_PP_SEQ_SPLIT_23(x) (x) BOOST_PP_SEQ_SPLIT_22
# define BOOST_PP_SEQ_SPLIT_24(x) (x) BOOST_PP_SEQ_SPLIT_23
# define BOOST_PP_SEQ_SPLIT_25(x) (x) BOOST_PP_SEQ_SPLIT_24
# define BOOST_PP_SEQ_SPLIT_26(x) (x) BOOST_PP_SEQ_SPLIT_25
# define BOOST_PP_SEQ_SPLIT_27(x) (x) BOOST_PP_SEQ_SPLIT_26
# define BOOST_PP_SEQ_SPLIT_28(x) (x) BOOST_PP_SEQ_SPLIT_27
# define BOOST_PP_SEQ_SPLIT_29(x) (x) BOOST_PP_SEQ_SPLIT_28
# define BOOST_PP_SEQ_SPLIT_30(x) (x) BOOST_PP_SEQ_SPLIT_29
# define BOOST_PP_SEQ_SPLIT_31(x) (x) BOOST_PP_SEQ_SPLIT_30
# define BOOST_PP_SEQ_SPLIT_32(x) (x) BOOST_PP_SEQ_SPLIT_31
# define BOOST_PP_SEQ_SPLIT_33(x) (x) BOOST_PP_SEQ_SPLIT_32
# define BOOST_PP_SEQ_SPLIT_34(x) (x) BOOST_PP_SEQ_SPLIT_33
# define BOOST_PP_SEQ_SPLIT_35(x) (x) BOOST_PP_SEQ_SPLIT_34
# define BOOST_PP_SEQ_SPLIT_36(x) (x) BOOST_PP_SEQ_SPLIT_35
# define BOOST_PP_SEQ_SPLIT_37(x) (x) BOOST_PP_SEQ_SPLIT_36
# define BOOST_PP_SEQ_SPLIT_38(x) (x) BOOST_PP_SEQ_SPLIT_37
# define BOOST_PP_SEQ_SPLIT_39(x) (x) BOOST_PP_SEQ_SPLIT_38
# define BOOST_PP_SEQ_SPLIT_40(x) (x) BOOST_PP_SEQ_SPLIT_39
# define BOOST_PP_SEQ_SPLIT_41(x) (x) BOOST_PP_SEQ_SPLIT_40
# define BOOST_PP_SEQ_SPLIT_42(x) (x) BOOST_PP_SEQ_SPLIT_41
# define BOOST_PP_SEQ_SPLIT_43(x) (x) BOOST_PP_SEQ_SPLIT_42
# define BOOST_PP_SEQ_SPLIT_44(x) (x) BOOST_PP_SEQ_SPLIT_43
# define BOOST_PP_SEQ_SPLIT_45(x) (x) BOOST_PP_SEQ_SPLIT_44
# define BOOST_PP_SEQ_SPLIT_46(x) (x) BOOST_PP_SEQ_SPLIT_45
# define BOOST_PP_SEQ_SPLIT_47(x) (x) BOOST_PP_SEQ_SPLIT_46
# define BOOST_PP_SEQ_SPLIT_48(x) (x) BOOST_PP_SEQ_SPLIT_47
# define BOOST_PP_SEQ_SPLIT_49(x) (x) BOOST_PP_SEQ_SPLIT_48
# define BOOST_PP_SEQ_SPLIT_50(x) (x) BOOST_PP_SEQ_SPLIT_49
# define BOOST_PP_SEQ_SPLIT_51(x) (x) BOOST_PP_SEQ_SPLIT_50
# define BOOST_PP_SEQ_SPLIT_52(x) (x) BOOST_PP_SEQ_SPLIT_51
# define BOOST_PP_SEQ_SPLIT_53(x) (x) BOOST_PP_SEQ_SPLIT_52
# define BOOST_PP_SEQ_SPLIT_54(x) (x) BOOST_PP_SEQ_SPLIT_53
# define BOOST_PP_SEQ_SPLIT_55(x) (x) BOOST_PP_SEQ_SPLIT_54
# define BOOST_PP_SEQ_SPLIT_56(x) (x) BOOST_PP_SEQ_SPLIT_55
# define BOOST_PP_SEQ_SPLIT_57(x) (x) BOOST_PP_SEQ_SPLIT_56
# define BOOST_PP_SEQ_SPLIT_58(x) (x) BOOST_PP_SEQ_SPLIT_57
# define BOOST_PP_SEQ_SPLIT_59(x) (x) BOOST_PP_SEQ_SPLIT_58
# define BOOST_PP_SEQ_SPLIT_60(x) (x) BOOST_PP_SEQ_SPLIT_59
# define BOOST_PP_SEQ_SPLIT_61(x) (x) BOOST_PP_SEQ_SPLIT_60
# define BOOST_PP_SEQ_SPLIT_62(x) (x) BOOST_PP_SEQ_SPLIT_61
# define BOOST_PP_SEQ_SPLIT_63(x) (x) BOOST_PP_SEQ_SPLIT_62
# define BOOST_PP_SEQ_SPLIT_64(x) (x) BOOST_PP_SEQ_SPLIT_63
# define BOOST_PP_SEQ_SPLIT_65(x) (x) BOOST_PP_SEQ_SPLIT_64
# define BOOST_PP_SEQ_SPLIT_66(x) (x) BOOST_PP_SEQ_SPLIT_65
# define BOOST_PP_SEQ_SPLIT_67(x) (x) BOOST_PP_SEQ_SPLIT_66
# define BOOST_PP_SEQ_SPLIT_68(x) (x) BOOST_PP_SEQ_SPLIT_67
# define BOOST_PP_SEQ_SPLIT_69(x) (x) BOOST_PP_SEQ_SPLIT_68
# define BOOST_PP_SEQ_SPLIT_70(x) (x) BOOST_PP_SEQ_SPLIT_69
# define BOOST_PP_SEQ_SPLIT_71(x) (x) BOOST_PP_SEQ_SPLIT_70
# define BOOST_PP_SEQ_SPLIT_72(x) (x) BOOST_PP_SEQ_SPLIT_71
# define BOOST_PP_SEQ_SPLIT_73(x) (x) BOOST_PP_SEQ_SPLIT_72
# define BOOST_PP_SEQ_SPLIT_74(x) (x) BOOST_PP_SEQ_SPLIT_73
# define BOOST_PP_SEQ_SPLIT_75(x) (x) BOOST_PP_SEQ_SPLIT_74
# define BOOST_PP_SEQ_SPLIT_76(x) (x) BOOST_PP_SEQ_SPLIT_75
# define BOOST_PP_SEQ_SPLIT_77(x) (x) BOOST_PP_SEQ_SPLIT_76
# define BOOST_PP_SEQ_SPLIT_78(x) (x) BOOST_PP_SEQ_SPLIT_77
# define BOOST_PP_SEQ_SPLIT_79(x) (x) BOOST_PP_SEQ_SPLIT_78
# define BOOST_PP_SEQ_SPLIT_80(x) (x) BOOST_PP_SEQ_SPLIT_79
# define BOOST_PP_SEQ_SPLIT_81(x) (x) BOOST_PP_SEQ_SPLIT_80
# define BOOST_PP_SEQ_SPLIT_82(x) (x) BOOST_PP_SEQ_SPLIT_81
# define BOOST_PP_SEQ_SPLIT_83(x) (x) BOOST_PP_SEQ_SPLIT_82
# define BOOST_PP_SEQ_SPLIT_84(x) (x) BOOST_PP_SEQ_SPLIT_83
# define BOOST_PP_SEQ_SPLIT_85(x) (x) BOOST_PP_SEQ_SPLIT_84
# define BOOST_PP_SEQ_SPLIT_86(x) (x) BOOST_PP_SEQ_SPLIT_85
# define BOOST_PP_SEQ_SPLIT_87(x) (x) BOOST_PP_SEQ_SPLIT_86
# define BOOST_PP_SEQ_SPLIT_88(x) (x) BOOST_PP_SEQ_SPLIT_87
# define BOOST_PP_SEQ_SPLIT_89(x) (x) BOOST_PP_SEQ_SPLIT_88
# define BOOST_PP_SEQ_SPLIT_90(x) (x) BOOST_PP_SEQ_SPLIT_89
# define BOOST_PP_SEQ_SPLIT_91(x) (x) BOOST_PP_SEQ_SPLIT_90
# define BOOST_PP_SEQ_SPLIT_92(x) (x) BOOST_PP_SEQ_SPLIT_91
# define BOOST_PP_SEQ_SPLIT_93(x) (x) BOOST_PP_SEQ_SPLIT_92
# define BOOST_PP_SEQ_SPLIT_94(x) (x) BOOST_PP_SEQ_SPLIT_93
# define BOOST_PP_SEQ_SPLIT_95(x) (x) BOOST_PP_SEQ_SPLIT_94
# define BOOST_PP_SEQ_SPLIT_96(x) (x) BOOST_PP_SEQ_SPLIT_95
# define BOOST_PP_SEQ_SPLIT_97(x) (x) BOOST_PP_SEQ_SPLIT_96
# define BOOST_PP_SEQ_SPLIT_98(x) (x) BOOST_PP_SEQ_SPLIT_97
# define BOOST_PP_SEQ_SPLIT_99(x) (x) BOOST_PP_SEQ_SPLIT_98
# define BOOST_PP_SEQ_SPLIT_100(x) (x) BOOST_PP_SEQ_SPLIT_99
# define BOOST_PP_SEQ_SPLIT_101(x) (x) BOOST_PP_SEQ_SPLIT_100
# define BOOST_PP_SEQ_SPLIT_102(x) (x) BOOST_PP_SEQ_SPLIT_101
# define BOOST_PP_SEQ_SPLIT_103(x) (x) BOOST_PP_SEQ_SPLIT_102
# define BOOST_PP_SEQ_SPLIT_104(x) (x) BOOST_PP_SEQ_SPLIT_103
# define BOOST_PP_SEQ_SPLIT_105(x) (x) BOOST_PP_SEQ_SPLIT_104
# define BOOST_PP_SEQ_SPLIT_106(x) (x) BOOST_PP_SEQ_SPLIT_105
# define BOOST_PP_SEQ_SPLIT_107(x) (x) BOOST_PP_SEQ_SPLIT_106
# define BOOST_PP_SEQ_SPLIT_108(x) (x) BOOST_PP_SEQ_SPLIT_107
# define BOOST_PP_SEQ_SPLIT_109(x) (x) BOOST_PP_SEQ_SPLIT_108
# define BOOST_PP_SEQ_SPLIT_110(x) (x) BOOST_PP_SEQ_SPLIT_109
# define BOOST_PP_SEQ_SPLIT_111(x) (x) BOOST_PP_SEQ_SPLIT_110
# define BOOST_PP_SEQ_SPLIT_112(x) (x) BOOST_PP_SEQ_SPLIT_111
# define BOOST_PP_SEQ_SPLIT_113(x) (x) BOOST_PP_SEQ_SPLIT_112
# define BOOST_PP_SEQ_SPLIT_114(x) (x) BOOST_PP_SEQ_SPLIT_113
# define BOOST_PP_SEQ_SPLIT_115(x) (x) BOOST_PP_SEQ_SPLIT_114
# define BOOST_PP_SEQ_SPLIT_116(x) (x) BOOST_PP_SEQ_SPLIT_115
# define BOOST_PP_SEQ_SPLIT_117(x) (x) BOOST_PP_SEQ_SPLIT_116
# define BOOST_PP_SEQ_SPLIT_118(x) (x) BOOST_PP_SEQ_SPLIT_117
# define BOOST_PP_SEQ_SPLIT_119(x) (x) BOOST_PP_SEQ_SPLIT_118
# define BOOST_PP_SEQ_SPLIT_120(x) (x) BOOST_PP_SEQ_SPLIT_119
# define BOOST_PP_SEQ_SPLIT_121(x) (x) BOOST_PP_SEQ_SPLIT_120
# define BOOST_PP_SEQ_SPLIT_122(x) (x) BOOST_PP_SEQ_SPLIT_121
# define BOOST_PP_SEQ_SPLIT_123(x) (x) BOOST_PP_SEQ_SPLIT_122
# define BOOST_PP_SEQ_SPLIT_124(x) (x) BOOST_PP_SEQ_SPLIT_123
# define BOOST_PP_SEQ_SPLIT_125(x) (x) BOOST_PP_SEQ_SPLIT_124
# define BOOST_PP_SEQ_SPLIT_126(x) (x) BOOST_PP_SEQ_SPLIT_125
# define BOOST_PP_SEQ_SPLIT_127(x) (x) BOOST_PP_SEQ_SPLIT_126
# define BOOST_PP_SEQ_SPLIT_128(x) (x) BOOST_PP_SEQ_SPLIT_127
# define BOOST_PP_SEQ_SPLIT_129(x) (x) BOOST_PP_SEQ_SPLIT_128
# define BOOST_PP_SEQ_SPLIT_130(x) (x) BOOST_PP_SEQ_SPLIT_129
# define BOOST_PP_SEQ_SPLIT_131(x) (x) BOOST_PP_SEQ_SPLIT_130
# define BOOST_PP_SEQ_SPLIT_132(x) (x) BOOST_PP_SEQ_SPLIT_131
# define BOOST_PP_SEQ_SPLIT_133(x) (x) BOOST_PP_SEQ_SPLIT_132
# define BOOST_PP_SEQ_SPLIT_134(x) (x) BOOST_PP_SEQ_SPLIT_133
# define BOOST_PP_SEQ_SPLIT_135(x) (x) BOOST_PP_SEQ_SPLIT_134
# define BOOST_PP_SEQ_SPLIT_136(x) (x) BOOST_PP_SEQ_SPLIT_135
# define BOOST_PP_SEQ_SPLIT_137(x) (x) BOOST_PP_SEQ_SPLIT_136
# define BOOST_PP_SEQ_SPLIT_138(x) (x) BOOST_PP_SEQ_SPLIT_137
# define BOOST_PP_SEQ_SPLIT_139(x) (x) BOOST_PP_SEQ_SPLIT_138
# define BOOST_PP_SEQ_SPLIT_140(x) (x) BOOST_PP_SEQ_SPLIT_139
# define BOOST_PP_SEQ_SPLIT_141(x) (x) BOOST_PP_SEQ_SPLIT_140
# define BOOST_PP_SEQ_SPLIT_142(x) (x) BOOST_PP_SEQ_SPLIT_141
# define BOOST_PP_SEQ_SPLIT_143(x) (x) BOOST_PP_SEQ_SPLIT_142
# define BOOST_PP_SEQ_SPLIT_144(x) (x) BOOST_PP_SEQ_SPLIT_143
# define BOOST_PP_SEQ_SPLIT_145(x) (x) BOOST_PP_SEQ_SPLIT_144
# define BOOST_PP_SEQ_SPLIT_146(x) (x) BOOST_PP_SEQ_SPLIT_145
# define BOOST_PP_SEQ_SPLIT_147(x) (x) BOOST_PP_SEQ_SPLIT_146
# define BOOST_PP_SEQ_SPLIT_148(x) (x) BOOST_PP_SEQ_SPLIT_147
# define BOOST_PP_SEQ_SPLIT_149(x) (x) BOOST_PP_SEQ_SPLIT_148
# define BOOST_PP_SEQ_SPLIT_150(x) (x) BOOST_PP_SEQ_SPLIT_149
# define BOOST_PP_SEQ_SPLIT_151(x) (x) BOOST_PP_SEQ_SPLIT_150
# define BOOST_PP_SEQ_SPLIT_152(x) (x) BOOST_PP_SEQ_SPLIT_151
# define BOOST_PP_SEQ_SPLIT_153(x) (x) BOOST_PP_SEQ_SPLIT_152
# define BOOST_PP_SEQ_SPLIT_154(x) (x) BOOST_PP_SEQ_SPLIT_153
# define BOOST_PP_SEQ_SPLIT_155(x) (x) BOOST_PP_SEQ_SPLIT_154
# define BOOST_PP_SEQ_SPLIT_156(x) (x) BOOST_PP_SEQ_SPLIT_155
# define BOOST_PP_SEQ_SPLIT_157(x) (x) BOOST_PP_SEQ_SPLIT_156
# define BOOST_PP_SEQ_SPLIT_158(x) (x) BOOST_PP_SEQ_SPLIT_157
# define BOOST_PP_SEQ_SPLIT_159(x) (x) BOOST_PP_SEQ_SPLIT_158
# define BOOST_PP_SEQ_SPLIT_160(x) (x) BOOST_PP_SEQ_SPLIT_159
# define BOOST_PP_SEQ_SPLIT_161(x) (x) BOOST_PP_SEQ_SPLIT_160
# define BOOST_PP_SEQ_SPLIT_162(x) (x) BOOST_PP_SEQ_SPLIT_161
# define BOOST_PP_SEQ_SPLIT_163(x) (x) BOOST_PP_SEQ_SPLIT_162
# define BOOST_PP_SEQ_SPLIT_164(x) (x) BOOST_PP_SEQ_SPLIT_163
# define BOOST_PP_SEQ_SPLIT_165(x) (x) BOOST_PP_SEQ_SPLIT_164
# define BOOST_PP_SEQ_SPLIT_166(x) (x) BOOST_PP_SEQ_SPLIT_165
# define BOOST_PP_SEQ_SPLIT_167(x) (x) BOOST_PP_SEQ_SPLIT_166
# define BOOST_PP_SEQ_SPLIT_168(x) (x) BOOST_PP_SEQ_SPLIT_167
# define BOOST_PP_SEQ_SPLIT_169(x) (x) BOOST_PP_SEQ_SPLIT_168
# define BOOST_PP_SEQ_SPLIT_170(x) (x) BOOST_PP_SEQ_SPLIT_169
# define BOOST_PP_SEQ_SPLIT_171(x) (x) BOOST_PP_SEQ_SPLIT_170
# define BOOST_PP_SEQ_SPLIT_172(x) (x) BOOST_PP_SEQ_SPLIT_171
# define BOOST_PP_SEQ_SPLIT_173(x) (x) BOOST_PP_SEQ_SPLIT_172
# define BOOST_PP_SEQ_SPLIT_174(x) (x) BOOST_PP_SEQ_SPLIT_173
# define BOOST_PP_SEQ_SPLIT_175(x) (x) BOOST_PP_SEQ_SPLIT_174
# define BOOST_PP_SEQ_SPLIT_176(x) (x) BOOST_PP_SEQ_SPLIT_175
# define BOOST_PP_SEQ_SPLIT_177(x) (x) BOOST_PP_SEQ_SPLIT_176
# define BOOST_PP_SEQ_SPLIT_178(x) (x) BOOST_PP_SEQ_SPLIT_177
# define BOOST_PP_SEQ_SPLIT_179(x) (x) BOOST_PP_SEQ_SPLIT_178
# define BOOST_PP_SEQ_SPLIT_180(x) (x) BOOST_PP_SEQ_SPLIT_179
# define BOOST_PP_SEQ_SPLIT_181(x) (x) BOOST_PP_SEQ_SPLIT_180
# define BOOST_PP_SEQ_SPLIT_182(x) (x) BOOST_PP_SEQ_SPLIT_181
# define BOOST_PP_SEQ_SPLIT_183(x) (x) BOOST_PP_SEQ_SPLIT_182
# define BOOST_PP_SEQ_SPLIT_184(x) (x) BOOST_PP_SEQ_SPLIT_183
# define BOOST_PP_SEQ_SPLIT_185(x) (x) BOOST_PP_SEQ_SPLIT_184
# define BOOST_PP_SEQ_SPLIT_186(x) (x) BOOST_PP_SEQ_SPLIT_185
# define BOOST_PP_SEQ_SPLIT_187(x) (x) BOOST_PP_SEQ_SPLIT_186
# define BOOST_PP_SEQ_SPLIT_188(x) (x) BOOST_PP_SEQ_SPLIT_187
# define BOOST_PP_SEQ_SPLIT_189(x) (x) BOOST_PP_SEQ_SPLIT_188
# define BOOST_PP_SEQ_SPLIT_190(x) (x) BOOST_PP_SEQ_SPLIT_189
# define BOOST_PP_SEQ_SPLIT_191(x) (x) BOOST_PP_SEQ_SPLIT_190
# define BOOST_PP_SEQ_SPLIT_192(x) (x) BOOST_PP_SEQ_SPLIT_191
# define BOOST_PP_SEQ_SPLIT_193(x) (x) BOOST_PP_SEQ_SPLIT_192
# define BOOST_PP_SEQ_SPLIT_194(x) (x) BOOST_PP_SEQ_SPLIT_193
# define BOOST_PP_SEQ_SPLIT_195(x) (x) BOOST_PP_SEQ_SPLIT_194
# define BOOST_PP_SEQ_SPLIT_196(x) (x) BOOST_PP_SEQ_SPLIT_195
# define BOOST_PP_SEQ_SPLIT_197(x) (x) BOOST_PP_SEQ_SPLIT_196
# define BOOST_PP_SEQ_SPLIT_198(x) (x) BOOST_PP_SEQ_SPLIT_197
# define BOOST_PP_SEQ_SPLIT_199(x) (x) BOOST_PP_SEQ_SPLIT_198
# define BOOST_PP_SEQ_SPLIT_200(x) (x) BOOST_PP_SEQ_SPLIT_199
# define BOOST_PP_SEQ_SPLIT_201(x) (x) BOOST_PP_SEQ_SPLIT_200
# define BOOST_PP_SEQ_SPLIT_202(x) (x) BOOST_PP_SEQ_SPLIT_201
# define BOOST_PP_SEQ_SPLIT_203(x) (x) BOOST_PP_SEQ_SPLIT_202
# define BOOST_PP_SEQ_SPLIT_204(x) (x) BOOST_PP_SEQ_SPLIT_203
# define BOOST_PP_SEQ_SPLIT_205(x) (x) BOOST_PP_SEQ_SPLIT_204
# define BOOST_PP_SEQ_SPLIT_206(x) (x) BOOST_PP_SEQ_SPLIT_205
# define BOOST_PP_SEQ_SPLIT_207(x) (x) BOOST_PP_SEQ_SPLIT_206
# define BOOST_PP_SEQ_SPLIT_208(x) (x) BOOST_PP_SEQ_SPLIT_207
# define BOOST_PP_SEQ_SPLIT_209(x) (x) BOOST_PP_SEQ_SPLIT_208
# define BOOST_PP_SEQ_SPLIT_210(x) (x) BOOST_PP_SEQ_SPLIT_209
# define BOOST_PP_SEQ_SPLIT_211(x) (x) BOOST_PP_SEQ_SPLIT_210
# define BOOST_PP_SEQ_SPLIT_212(x) (x) BOOST_PP_SEQ_SPLIT_211
# define BOOST_PP_SEQ_SPLIT_213(x) (x) BOOST_PP_SEQ_SPLIT_212
# define BOOST_PP_SEQ_SPLIT_214(x) (x) BOOST_PP_SEQ_SPLIT_213
# define BOOST_PP_SEQ_SPLIT_215(x) (x) BOOST_PP_SEQ_SPLIT_214
# define BOOST_PP_SEQ_SPLIT_216(x) (x) BOOST_PP_SEQ_SPLIT_215
# define BOOST_PP_SEQ_SPLIT_217(x) (x) BOOST_PP_SEQ_SPLIT_216
# define BOOST_PP_SEQ_SPLIT_218(x) (x) BOOST_PP_SEQ_SPLIT_217
# define BOOST_PP_SEQ_SPLIT_219(x) (x) BOOST_PP_SEQ_SPLIT_218
# define BOOST_PP_SEQ_SPLIT_220(x) (x) BOOST_PP_SEQ_SPLIT_219
# define BOOST_PP_SEQ_SPLIT_221(x) (x) BOOST_PP_SEQ_SPLIT_220
# define BOOST_PP_SEQ_SPLIT_222(x) (x) BOOST_PP_SEQ_SPLIT_221
# define BOOST_PP_SEQ_SPLIT_223(x) (x) BOOST_PP_SEQ_SPLIT_222
# define BOOST_PP_SEQ_SPLIT_224(x) (x) BOOST_PP_SEQ_SPLIT_223
# define BOOST_PP_SEQ_SPLIT_225(x) (x) BOOST_PP_SEQ_SPLIT_224
# define BOOST_PP_SEQ_SPLIT_226(x) (x) BOOST_PP_SEQ_SPLIT_225
# define BOOST_PP_SEQ_SPLIT_227(x) (x) BOOST_PP_SEQ_SPLIT_226
# define BOOST_PP_SEQ_SPLIT_228(x) (x) BOOST_PP_SEQ_SPLIT_227
# define BOOST_PP_SEQ_SPLIT_229(x) (x) BOOST_PP_SEQ_SPLIT_228
# define BOOST_PP_SEQ_SPLIT_230(x) (x) BOOST_PP_SEQ_SPLIT_229
# define BOOST_PP_SEQ_SPLIT_231(x) (x) BOOST_PP_SEQ_SPLIT_230
# define BOOST_PP_SEQ_SPLIT_232(x) (x) BOOST_PP_SEQ_SPLIT_231
# define BOOST_PP_SEQ_SPLIT_233(x) (x) BOOST_PP_SEQ_SPLIT_232
# define BOOST_PP_SEQ_SPLIT_234(x) (x) BOOST_PP_SEQ_SPLIT_233
# define BOOST_PP_SEQ_SPLIT_235(x) (x) BOOST_PP_SEQ_SPLIT_234
# define BOOST_PP_SEQ_SPLIT_236(x) (x) BOOST_PP_SEQ_SPLIT_235
# define BOOST_PP_SEQ_SPLIT_237(x) (x) BOOST_PP_SEQ_SPLIT_236
# define BOOST_PP_SEQ_SPLIT_238(x) (x) BOOST_PP_SEQ_SPLIT_237
# define BOOST_PP_SEQ_SPLIT_239(x) (x) BOOST_PP_SEQ_SPLIT_238
# define BOOST_PP_SEQ_SPLIT_240(x) (x) BOOST_PP_SEQ_SPLIT_239
# define BOOST_PP_SEQ_SPLIT_241(x) (x) BOOST_PP_SEQ_SPLIT_240
# define BOOST_PP_SEQ_SPLIT_242(x) (x) BOOST_PP_SEQ_SPLIT_241
# define BOOST_PP_SEQ_SPLIT_243(x) (x) BOOST_PP_SEQ_SPLIT_242
# define BOOST_PP_SEQ_SPLIT_244(x) (x) BOOST_PP_SEQ_SPLIT_243
# define BOOST_PP_SEQ_SPLIT_245(x) (x) BOOST_PP_SEQ_SPLIT_244
# define BOOST_PP_SEQ_SPLIT_246(x) (x) BOOST_PP_SEQ_SPLIT_245
# define BOOST_PP_SEQ_SPLIT_247(x) (x) BOOST_PP_SEQ_SPLIT_246
# define BOOST_PP_SEQ_SPLIT_248(x) (x) BOOST_PP_SEQ_SPLIT_247
# define BOOST_PP_SEQ_SPLIT_249(x) (x) BOOST_PP_SEQ_SPLIT_248
# define BOOST_PP_SEQ_SPLIT_250(x) (x) BOOST_PP_SEQ_SPLIT_249
# define BOOST_PP_SEQ_SPLIT_251(x) (x) BOOST_PP_SEQ_SPLIT_250
# define BOOST_PP_SEQ_SPLIT_252(x) (x) BOOST_PP_SEQ_SPLIT_251
# define BOOST_PP_SEQ_SPLIT_253(x) (x) BOOST_PP_SEQ_SPLIT_252
# define BOOST_PP_SEQ_SPLIT_254(x) (x) BOOST_PP_SEQ_SPLIT_253
# define BOOST_PP_SEQ_SPLIT_255(x) (x) BOOST_PP_SEQ_SPLIT_254
# define BOOST_PP_SEQ_SPLIT_256(x) (x) BOOST_PP_SEQ_SPLIT_255
#
# else
#
# include <boost/preprocessor/config/limits.hpp>
#
# if BOOST_PP_LIMIT_SEQ == 256
# include <boost/preprocessor/seq/detail/limits/split_256.hpp>
# elif BOOST_PP_LIMIT_SEQ == 512
# include <boost/preprocessor/seq/detail/limits/split_256.hpp>
# include <boost/preprocessor/seq/detail/limits/split_512.hpp>
# elif BOOST_PP_LIMIT_SEQ == 1024
# include <boost/preprocessor/seq/detail/limits/split_256.hpp>
# include <boost/preprocessor/seq/detail/limits/split_512.hpp>
# include <boost/preprocessor/seq/detail/limits/split_1024.hpp>
# else
# error Incorrect value for the BOOST_PP_LIMIT_SEQ limit
# endif
#
# endif
#
# endif
| BeGe78/esood | vendor/bundle/ruby/3.0.0/gems/passenger-6.0.10/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/split.hpp | C++ | gpl-3.0 | 17,434 | [
30522,
1001,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
30524,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# encoding: utf-8
require "phonology"
require File.expand_path("../spanish/orthography", __FILE__)
require File.expand_path("../spanish/phonology", __FILE__)
require File.expand_path("../spanish/syllable", __FILE__)
# This library provides some linguistic and orthographic tools for Spanish
# words.
module Spanish
extend self
# Returns an array of Spanish letters from string.
# Example:
# Spanish.letters("chillar")
# # => ["ch", "i", "ll", "a", "r"]
def letters(string)
string.scan(Orthography::LETTERS)
end
# Get an array of Phonology::Sounds from the string.
def get_sounds(string, *rules)
sequence = Orthography.translator.translate(string)
Syllabifier.syllabify(sequence)
Phonology.general_rules.values.each do |rule|
rule.apply(sequence)
end
rules.each do |rule|
Phonology.optional_rules[rule.to_sym].apply(sequence)
end
sequence
end
# Translate the Spanish string to International Phonetic Alphabet.
# Example:
#
# Spanish.get_ipa("chavo")
# # => 't͡ʃaβo
def get_ipa(string, *rules)
get_sounds(string, *rules).to_s
end
def get_syllables(string, *rules)
get_sounds(string, *rules).map(&:syllable).uniq
end
def get_syllables_ipa(string, *rules)
syllables = get_syllables(string, *rules)
syllables.map {|s| syllables.length == 1 ? s.to_s(false) : s.to_s }.join(" ")
end
end
| norman/spanish | lib/spanish.rb | Ruby | mit | 1,408 | [
30522,
1001,
17181,
1024,
21183,
2546,
1011,
1022,
5478,
1000,
6887,
17175,
6483,
1000,
5478,
5371,
1012,
7818,
1035,
4130,
1006,
1000,
1012,
1012,
1013,
3009,
1013,
2030,
2705,
9888,
1000,
1010,
1035,
1035,
5371,
1035,
1035,
1007,
5478,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
//
// ActionConfigurator.h
// Dasher
//
// Created by Alan Lawrence on 24/11/2010.
// Copyright 2010 Cavendish Laboratory. All rights reserved.
//
#import "Actions.h"
@interface ActionConfigurator : UITableViewController {
ActionButton *button;
UIView *headers[3];
}
-(id)init;
@end
| ipomoena/dasher | Src/iPhone/Classes/ActionConfigurator.h | C | gpl-2.0 | 293 | [
30522,
1013,
1013,
1013,
1013,
2895,
8663,
8873,
27390,
8844,
1012,
1044,
1013,
1013,
11454,
2121,
1013,
1013,
1013,
1013,
2580,
2011,
5070,
5623,
2006,
2484,
1013,
2340,
1013,
2230,
1012,
1013,
1013,
9385,
2230,
23570,
5911,
1012,
2035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Austrocephalocereus estevesii subsp. insigniflorus Diers & Esteves SUBSPECIES
#### Status
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | mdoering/backbone | life/Plantae/Magnoliophyta/Magnoliopsida/Caryophyllales/Cactaceae/Austrocephalocereus/Austrocephalocereus estevesii/Austrocephalocereus estevesii insigniflorus/README.md | Markdown | apache-2.0 | 219 | [
30522,
1001,
16951,
3401,
21890,
4135,
17119,
10600,
28517,
6961,
6137,
24807,
1012,
16021,
23773,
10128,
10626,
2271,
3280,
2869,
1004,
28517,
6961,
11056,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
2248,
3269,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*============================================================================
Library: CppMicroServices
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
============================================================================*/
#ifndef USLISTENERFUNCTORS_P_H
#define USLISTENERFUNCTORS_P_H
#include <usServiceEvent.h>
#include <usModuleEvent.h>
#include <algorithm>
#include <cstring>
#ifdef US_HAVE_STD_FUNCTION
#ifdef US_HAVE_FUNCTIONAL_H
#include <functional>
#elif defined(US_HAVE_TR1_FUNCTIONAL_H)
#include <tr1/functional>
#endif
#define US_FUNCTION_TYPE std::function
#elif defined(US_HAVE_TR1_FUNCTION)
#ifdef US_HAVE_TR1_FUNCTIONAL_H
#include <tr1/functional>
#elif defined(US_HAVE_FUNCTIONAL_H)
#include <functional>
#endif
#define US_FUNCTION_TYPE std::tr1::function
#endif
#define US_MODULE_LISTENER_FUNCTOR US_FUNCTION_TYPE<void(const US_PREPEND_NAMESPACE(ModuleEvent)&)>
#define US_SERVICE_LISTENER_FUNCTOR US_FUNCTION_TYPE<void(const US_PREPEND_NAMESPACE(ServiceEvent)&)>
US_BEGIN_NAMESPACE
template<class X>
US_MODULE_LISTENER_FUNCTOR ModuleListenerMemberFunctor(X* x, void (X::*memFn)(const US_PREPEND_NAMESPACE(ModuleEvent)))
{ return std::bind(std::mem_fn(memFn), x, std::placeholders::_1); }
struct ModuleListenerCompare : std::binary_function<std::pair<US_MODULE_LISTENER_FUNCTOR, void*>,
std::pair<US_MODULE_LISTENER_FUNCTOR, void*>, bool>
{
bool operator()(const std::pair<US_MODULE_LISTENER_FUNCTOR, void*>& p1,
const std::pair<US_MODULE_LISTENER_FUNCTOR, void*>& p2) const
{
return p1.second == p2.second &&
p1.first.target<void(const US_PREPEND_NAMESPACE(ModuleEvent)&)>() == p2.first.target<void(const US_PREPEND_NAMESPACE(ModuleEvent)&)>();
}
};
template<class X>
US_SERVICE_LISTENER_FUNCTOR ServiceListenerMemberFunctor(X* x, void (X::*memFn)(const US_PREPEND_NAMESPACE(ServiceEvent)))
{ return std::bind(std::mem_fn(memFn), x, std::placeholders::_1); }
struct ServiceListenerCompare : std::binary_function<US_SERVICE_LISTENER_FUNCTOR, US_SERVICE_LISTENER_FUNCTOR, bool>
{
bool operator()(const US_SERVICE_LISTENER_FUNCTOR& f1,
const US_SERVICE_LISTENER_FUNCTOR& f2) const
{
return f1.target<void(const US_PREPEND_NAMESPACE(ServiceEvent)&)>() == f2.target<void(const US_PREPEND_NAMESPACE(ServiceEvent)&)>();
}
};
US_END_NAMESPACE
US_HASH_FUNCTION_NAMESPACE_BEGIN
US_HASH_FUNCTION_BEGIN(US_SERVICE_LISTENER_FUNCTOR)
void(*targetFunc)(const US_PREPEND_NAMESPACE(ServiceEvent)&) = arg.target<void(const US_PREPEND_NAMESPACE(ServiceEvent)&)>();
void* targetPtr = nullptr;
std::memcpy(&targetPtr, &targetFunc, sizeof(void*));
return US_HASH_FUNCTION(void*, targetPtr);
US_HASH_FUNCTION_END
US_HASH_FUNCTION_NAMESPACE_END
#endif // USLISTENERFUNCTORS_P_H
| fmilano/mitk | Modules/CppMicroServices/core/src/util/usListenerFunctors_p.h | C | bsd-3-clause | 3,474 | [
30522,
1013,
1008,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package de.uni.bremen.stummk.psp.calculation;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
import de.uni.bremen.stummk.psp.control.AddDefectDialog;
import de.uni.bremen.stummk.psp.control.AddPIPDialog;
import de.uni.bremen.stummk.psp.control.AddTaskDialog;
import de.uni.bremen.stummk.psp.control.AddTimeRecordDialog;
import de.uni.bremen.stummk.psp.data.DefectRecord;
import de.uni.bremen.stummk.psp.data.PIP;
import de.uni.bremen.stummk.psp.data.PersistenceItem;
import de.uni.bremen.stummk.psp.data.Phase;
import de.uni.bremen.stummk.psp.data.Project;
import de.uni.bremen.stummk.psp.data.Task;
import de.uni.bremen.stummk.psp.data.TimeRecord;
import de.uni.bremen.stummk.psp.utility.Constants;
/**
* Action which adds a new record or edit an existing record of a formular
*
* @author Konstantin
*
*/
public class AddAction extends Action implements IWorkbenchAction {
private Shell shell;
private String pageID;
private Project project;
private PersistenceItem selection;
private Phase phase = null;
/**
* Constructor
*
* @param shell the shell which calls the action
* @param pageID the id of the form page, which calls the action
* @param project the project the calling page belongs to
* @param selection the selection or null if nothing is selected or a new record should be added
* @param commandID the comand {@link Constants.COMMAND_ADD} or
* {@link Constants.COMMAND_ADD_TIME_RECORD} if time record should be added to a task
* @param text the text shown in the context menu
* @param decriptor the image descriptor of this action
*/
public AddAction(Shell shell, String pageID, Project project, PersistenceItem selection, String commandID,
String text, ImageDescriptor decriptor) {
super(text);
this.shell = shell;
this.pageID = pageID;
this.project = project;
this.selection = selection;
setId(commandID);
setImageDescriptor(decriptor);
}
@Override
public void run() {
// run action depedning on page calling this action
if (getId().equals(Constants.COMMAND_ADD_TIME_RECORD) && selection instanceof Task) {
new AddTimeRecordDialog(shell, project, (Task) selection).open();
} else {
switch (pageID) {
case Constants.ID_PIP_FORM:
new AddPIPDialog(shell, project, (PIP) selection).open();
break;
case Constants.ID_TIME_RECORD_FORM:
new AddTimeRecordDialog(shell, project, (TimeRecord) selection).open();
break;
case Constants.ID_DEFECT_RECORD_FORM:
new AddDefectDialog(shell, project, (DefectRecord) selection).open();
break;
case Constants.ID_TASK_PLANNING_FORM:
new AddTaskDialog(shell, project, (Task) selection).open();
break;
case Constants.ID_TASK_OVERVIEW:
if (phase != null) {
new AddTaskDialog(shell, project, (Task) selection, phase).open();
} else {
new AddTaskDialog(shell, project, (Task) selection).open();
}
break;
}
}
}
@Override
public void dispose() {}
/**
* Sets the phase of the selection in the TaskOverview to select Phase by default
*
* @param phaseOfSelection the phase which should be selected
*/
public void setPhase(Phase phaseOfSelection) {
this.phase = phaseOfSelection;
}
}
| stummk/psp-eclipse | Source/de.uni.bremen.stummk.psp/src/de/uni/bremen/stummk/psp/calculation/AddAction.java | Java | mit | 3,515 | [
30522,
7427,
2139,
1012,
4895,
2072,
1012,
30524,
8917,
1012,
13232,
1012,
25430,
2102,
1012,
15536,
28682,
1012,
5806,
1025,
12324,
8917,
1012,
13232,
1012,
21318,
1012,
4506,
1012,
2895,
21450,
1012,
1045,
6198,
10609,
7507,
7542,
1025,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package migrate
import (
"reflect"
"testing"
"github.com/influxdata/influxdb/v2/pkg/slices"
)
func Test_sortShardDirs(t *testing.T) {
input := []shardMapping{
{path: "/influxdb/data/db0/autogen/0"},
{path: "/influxdb/data/db0/rp0/10"},
{path: "/influxdb/data/db0/autogen/10"},
{path: "/influxdb/data/db0/autogen/2"},
{path: "/influxdb/data/db0/autogen/43"},
{path: "/influxdb/data/apple/rp1/99"},
{path: "/influxdb/data/apple/rp2/0"},
{path: "/influxdb/data/db0/autogen/33"},
}
expected := []shardMapping{
{path: "/influxdb/data/apple/rp1/99"},
{path: "/influxdb/data/apple/rp2/0"},
{path: "/influxdb/data/db0/autogen/0"},
{path: "/influxdb/data/db0/autogen/2"},
{path: "/influxdb/data/db0/autogen/10"},
{path: "/influxdb/data/db0/autogen/33"},
{path: "/influxdb/data/db0/autogen/43"},
{path: "/influxdb/data/db0/rp0/10"},
}
if err := sortShardDirs(input); err != nil {
t.Fatal(err)
}
if got, exp := input, expected; !reflect.DeepEqual(got, exp) {
t.Fatalf("got %v, expected %v", got, expected)
}
input = append(input, shardMapping{path: "/influxdb/data/db0/rp0/badformat"})
if err := sortShardDirs(input); err == nil {
t.Fatal("expected error, got <nil>")
}
}
var sep = tsmKeyFieldSeparator1x
func Test_sort1xTSMKeys(t *testing.T) {
cases := []struct {
input [][]byte
expected [][]byte
}{
{
input: slices.StringsToBytes(
"cpu"+sep+"a",
"cpu"+sep+"b",
"cpu"+sep+"c",
"disk"+sep+"a",
),
expected: slices.StringsToBytes(
"cpu"+sep+"a",
"cpu"+sep+"b",
"cpu"+sep+"c",
"disk"+sep+"a",
),
},
{
input: slices.StringsToBytes(
"cpu"+sep+"c",
"cpu,region=east"+sep+"b",
"cpu,region=east,server=a"+sep+"a",
),
expected: slices.StringsToBytes(
"cpu,region=east,server=a"+sep+"a",
"cpu,region=east"+sep+"b",
"cpu"+sep+"c",
),
},
{
input: slices.StringsToBytes(
"cpu"+sep+"c",
"cpu,region=east"+sep+"b",
"cpu,region=east,server=a"+sep+"a",
),
expected: slices.StringsToBytes(
"cpu,region=east,server=a"+sep+"a",
"cpu,region=east"+sep+"b",
"cpu"+sep+"c",
),
},
{
input: slices.StringsToBytes(
"\xc1\xbd\xd5)x!\a#H\xd4\xf3ç\xde\v\x14,\x00=m0,tag0=value1#!~#v0",
"\xc1\xbd\xd5)x!\a#H\xd4\xf3ç\xde\v\x14,\x00=m0,tag0=value19,tag1=value999,tag2=value9,tag3=value0#!~#v0",
),
expected: slices.StringsToBytes(
"\xc1\xbd\xd5)x!\a#H\xd4\xf3ç\xde\v\x14,\x00=m0,tag0=value1"+sep+"v0",
"\xc1\xbd\xd5)x!\a#H\xd4\xf3ç\xde\v\x14,\x00=m0,tag0=value19,tag1=value999,tag2=value9,tag3=value0"+sep+"v0",
),
},
}
for _, tc := range cases {
sort1xTSMKeys(tc.input)
if got, exp := tc.input, tc.expected; !reflect.DeepEqual(got, exp) {
t.Errorf("got %s, expected %s", got, exp)
}
}
}
| nooproblem/influxdb | tsdb/migrate/migrate_test.go | GO | mit | 2,793 | [
30522,
7427,
22806,
12324,
1006,
1000,
8339,
1000,
1000,
5604,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
18050,
2850,
2696,
1013,
18050,
18939,
1013,
1058,
2475,
1013,
1052,
2243,
2290,
1013,
25609,
1000,
1007,
4569,
2278,
3231,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* @file MakeChain.C
* @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
* @date Tue Jul 12 10:20:07 2011
*
* @brief Script to generate a chain of files
*
* @ingroup pwglf_forward_scripts
*/
/**
* Check if a path points to a file
*
* @param path Path
*
* @return True if the path points to a regular file
*
* @ingroup pwglf_forward_scripts
*/
Bool_t
IsFile(const char* path)
{
Long_t id;
Long_t size;
Long_t flags;
Long_t modtime;
gSystem->GetPathInfo(path, &id, &size, &flags, &modtime);
return !((flags & 0x2) == 0x2);
}
/**
* Test if we can open a file
*
* @param name Name of file
* @param pattern Pattern to check against
*
* @return True on success
*/
Bool_t
TestFile(const TString& name, const char* pattern=0)
{
// If this is not a root file, ignore
if (!name.EndsWith(".root")) return false;
// If this file does not contain the pattern, ignore
if (pattern && pattern[0] != '\0' && !name.Contains(pattern)) return false;
if (name.Contains("friends")) return false;
Bool_t ret = true;
TFile* test = TFile::Open(name.Data(), "READ");
if (!test || test->IsZombie()) {
Warning("TestFile", "Failed to open file %s", name.Data());
ret = false;
}
else
test->Close();
return ret;
}
/**
* Scan a directory (optionally recursive) for data files to add to
* the chain. Only ROOT files, and files which name contain the
* passed pattern are considered.
*
* @param dir Directory to scan
* @param chain Chain to add data to
* @param pattern Pattern that the file name must contain
* @param recursive Whether to scan recursively
*
* @ingroup pwglf_forward_scripts
*/
void
ScanDirectory(TSystemDirectory* dir, TChain* chain,
const char* pattern, bool recursive)
{
// Get list of files, and go back to old working directory
TString oldDir(gSystem->WorkingDirectory());
TList* files = dir->GetListOfFiles();
gSystem->ChangeDirectory(oldDir);
// Sort list of files and check if we should add it
files->Sort();
TIter next(files);
TSystemFile* file = 0;
while ((file = static_cast<TSystemFile*>(next()))) {
TString name(file->GetName());
// Ignore special links
if (name == "." || name == "..") continue;
// Check if this is a directory
if (file->IsDirectory()) {
if (recursive)
ScanDirectory(static_cast<TSystemDirectory*>(file),chain,
pattern,recursive);
continue;
}
// Get the path
TString data(Form("%s/%s", file->GetTitle(), name.Data()));
// Check the fuile
if (!TestFile(data, pattern)) continue;
chain->Add(data);
}
}
/**
* Scan an input list of files
*
* @param chain Chain to add to
* @param path File with list of files to add
* @param treeName Name of tree in files
*
* @return true on success
*/
Bool_t
ScanInputList(TChain* chain, const TString& path, const char* treeName=0)
{
std::ifstream in(path.Data());
if (!in) {
Error("ScanInputList", "Failed to open input list %s", path.Data());
return false;
}
TString line;
while (in.good()) {
line.ReadLine(in); // Skip white-space
if (line.IsNull()) break; // Nothing -> EOF
if (line[0] == '#') continue; // Ignore comment lines
if (!TestFile(line, 0)) continue;
chain->Add(line);
}
in.close();
return true;
}
/**
* Make a chain of specified data
*
* @param what What data to chain. Possible values are
* - ESD Event summary data (AliESD)
* - AOD Analysis object data (AliAOD)
* - MC Simulation data (galice)
* @param datadir Data directory to scan
* @param recursive Whether to recurse into sub-directories
*
* @return Pointer to newly create chain, or null
*
* @ingroup pwglf_forward_scripts
*/
TChain*
MakeChain(const char* what, const char* datadir, bool recursive=false)
{
TString w(what);
w.ToUpper();
const char* treeName = 0;
const char* pattern = 0;
if (w.Contains("ESD")) { treeName = "esdTree"; pattern = "AliESD"; }
else if (w.Contains("AOD")) { treeName = "aodTree"; pattern = "AliAOD"; }
else if (w.Contains("MC")) { treeName = "TE"; pattern = "galice"; }
else {
Error("MakeChain", "Unknown mode '%s' (not one of ESD,AOD, or MC)", what);
return 0;
}
// --- Our data chain ----------------------------------------------
TChain* chain = new TChain(treeName);
// --- Get list of files --------------------------------------------
// Open source directory, and make sure we go back to were we were
TString oldDir(gSystem->WorkingDirectory());
TString path(gSystem->ExpandPathName(datadir));
if (!IsFile(path)) {
TSystemDirectory d(datadir, datadir);
ScanDirectory(&d, chain, pattern, recursive);
}
else if (path.EndsWith(".root")) {
if (TestFile(path, pattern)) chain->Add(path);
}
else {
// Input seems to be a list - parse it
ScanInputList(chain, path);
}
// Make sure we do not make an empty chain
if (chain->GetListOfFiles()->GetEntries() <= 0) {
Warning("MakeChain", "Chain %s is empty for input %s",
treeName, datadir);
delete chain;
chain = 0;
}
return chain;
}
//
// EOF
//
| akubera/AliPhysics | PWGLF/FORWARD/analysis2/scripts/MakeChain.C | C++ | bsd-3-clause | 5,298 | [
30522,
1013,
1008,
1008,
1008,
1030,
5371,
2191,
24925,
2078,
1012,
1039,
1008,
1030,
3166,
3017,
28925,
24189,
1026,
16480,
13728,
1030,
17488,
28745,
26526,
2094,
1012,
2002,
4048,
1012,
1050,
5638,
1012,
1040,
2243,
1028,
1008,
1030,
305... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package org.herac.tuxguitar.app.action.impl.tools;
import org.herac.tuxguitar.action.TGActionContext;
import org.herac.tuxguitar.app.tools.scale.ScaleManager;
import org.herac.tuxguitar.editor.action.TGActionBase;
import org.herac.tuxguitar.util.TGContext;
public class TGSelectScaleAction extends TGActionBase{
public static final String NAME = "action.tools.select-scale";
public static final String ATTRIBUTE_INDEX = "scaleIndex";
public static final String ATTRIBUTE_KEY = "scaleKey";
public TGSelectScaleAction(TGContext context) {
super(context, NAME);
}
protected void processAction(TGActionContext context){
Integer index = context.getAttribute(ATTRIBUTE_INDEX);
Integer key = context.getAttribute(ATTRIBUTE_KEY);
ScaleManager scaleManager = ScaleManager.getInstance(getContext());
scaleManager.selectScale(index != null ? index : ScaleManager.NONE_SELECTION, key != null ? key : 0);
}
}
| bluenote10/TuxguitarParser | tuxguitar-src/TuxGuitar/src/org/herac/tuxguitar/app/action/impl/tools/TGSelectScaleAction.java | Java | lgpl-2.1 | 926 | [
30522,
7427,
8917,
1012,
2014,
6305,
1012,
10722,
2595,
25698,
7559,
1012,
10439,
1012,
2895,
1012,
17727,
2140,
1012,
5906,
1025,
12324,
8917,
1012,
2014,
6305,
1012,
10722,
2595,
25698,
7559,
1012,
2895,
1012,
1056,
3654,
7542,
8663,
1820... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module Hierarchy</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th bgcolor="#70b0f0" class="navbar-select"
> Trees </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="file:///G:/Web%20Development/epydoc/">EIC Site-packages</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%"> </td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="module-tree.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<center><b>
[ <a href="module-tree.html">Module Hierarchy</a>
| <a href="class-tree.html">Class Hierarchy</a> ]
</b></center><br />
<h1 class="epydoc">Module Hierarchy</h1>
<ul class="nomargin-top">
<li> <strong class="uidlink"><a href="bbpy-module.html">bbpy</a></strong>: <em class="summary">The BBpy module contains methods and classes that allow Python
programs to interface with BBx data files and structures.</em>
<ul>
<li> <strong class="uidlink"><a href="bbpy.config-module.html">bbpy.config</a></strong>: <em class="summary">The config module contains classes for getting the BBx environment
configuration information.</em> </li>
<li> <strong class="uidlink"><a href="bbpy.files-module.html">bbpy.files</a></strong>
<ul>
<li> <strong class="uidlink"><a href="bbpy.files.mkeyed-module.html">bbpy.files.mkeyed</a></strong>: <em class="summary">Python utilities for reading and writing MKEYED files</em> </li>
<li> <strong class="uidlink"><a href="bbpy.files.template-module.html">bbpy.files.template</a></strong> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="bbpy.functions-module.html">bbpy.functions</a></strong>
<ul>
<li class="private"> <strong class="uidlink"><a href="bbpy.functions.bitwise-module.html" onclick="show_private();">bbpy.functions.bitwise</a></strong> </li>
<li class="private"> <strong class="uidlink"><a href="bbpy.functions.checksums-module.html" onclick="show_private();">bbpy.functions.checksums</a></strong> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="bbpy.strings-module.html">bbpy.strings</a></strong> </li>
<li> <strong class="uidlink"><a href="bbpy.util-module.html">bbpy.util</a></strong>: <em class="summary">Utility functions for BBPy</em> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="dateutil-module.html">dateutil</a></strong>: <em class="summary">Copyright (c) 2003-2010 Gustavo Niemeyer
<gustavo@niemeyer.net></em>
<ul>
<li> <strong class="uidlink"><a href="dateutil.easter-module.html">dateutil.easter</a></strong>: <em class="summary">Copyright (c) 2003-2007 Gustavo Niemeyer
<gustavo@niemeyer.net></em> </li>
<li> <strong class="uidlink"><a href="dateutil.parser-module.html">dateutil.parser</a></strong>: <em class="summary">Copyright (c) 2003-2007 Gustavo Niemeyer
<gustavo@niemeyer.net></em> </li>
<li> <strong class="uidlink"><a href="dateutil.relativedelta-module.html">dateutil.relativedelta</a></strong>: <em class="summary">Copyright (c) 2003-2010 Gustavo Niemeyer
<gustavo@niemeyer.net></em> </li>
<li> <strong class="uidlink"><a href="dateutil.rrule-module.html">dateutil.rrule</a></strong>: <em class="summary">Copyright (c) 2003-2010 Gustavo Niemeyer
<gustavo@niemeyer.net></em> </li>
<li> <strong class="uidlink"><a href="dateutil.tz-module.html">dateutil.tz</a></strong>: <em class="summary">Copyright (c) 2003-2007 Gustavo Niemeyer
<gustavo@niemeyer.net></em> </li>
<li> <strong class="uidlink"><a href="dateutil.tzwin-module.html">dateutil.tzwin</a></strong> </li>
<li> <strong class="uidlink"><a href="dateutil.zoneinfo-module.html">dateutil.zoneinfo</a></strong>: <em class="summary">Copyright (c) 2003-2005 Gustavo Niemeyer
<gustavo@niemeyer.net></em> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="eicpy-module.html">eicpy</a></strong>
<ul>
<li> <strong class="uidlink"><a href="eicpy.address-module.html">eicpy.address</a></strong> </li>
<li> <strong class="uidlink"><a href="eicpy.beta-module.html">eicpy.beta</a></strong>: <em class="summary">Check for agent allowed to access Beta features</em> </li>
<li> <strong class="uidlink"><a href="eicpy.bridge-module.html">eicpy.bridge</a></strong>
<ul>
<li> <strong class="uidlink"><a href="eicpy.bridge.acordxml-module.html">eicpy.bridge.acordxml</a></strong> </li>
<li> <strong class="uidlink"><a href="eicpy.bridge.bridge-module.html">eicpy.bridge.bridge</a></strong> </li>
<li> <strong class="uidlink"><a href="eicpy.bridge.common-module.html">eicpy.bridge.common</a></strong> </li>
<li> <strong class="uidlink"><a href="eicpy.bridge.common_itc-module.html">eicpy.bridge.common_itc</a></strong> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="eicpy.cgierror-module.html">eicpy.cgierror</a></strong>: <em class="summary">Traceback formatting for Equity's Python programs, inspired by
Ka-Ping Yee's cgitb.</em> </li>
<li> <strong class="uidlink"><a href="eicpy.coverage-module.html">eicpy.coverage</a></strong>: <em class="summary">Coverage library for accessing rate coverages</em> </li>
<li> <strong class="uidlink"><a href="eicpy.data-module.html">eicpy.data</a></strong>: <em class="summary">This module encapsulates the best (fastest) way to retrieve data
from legacy sources.</em> </li>
<li> <strong class="uidlink"><a href="eicpy.dcs-module.html">eicpy.dcs</a></strong>: <em class="summary">Module for interfacing with DCS.</em> </li>
<li> <strong class="uidlink"><a href="eicpy.elf-module.html">eicpy.elf</a></strong>: <em class="summary">Base classes for eLink currently only used for endorsements
(endorsement/edriver.py, etc.)</em> </li>
<li> <strong class="uidlink"><a href="eicpy.encrypt-module.html">eicpy.encrypt</a></strong>: <em class="summary">A replacement for SUBR.ENCRYPT; reverse-engineering ENCRYPT:</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement-module.html">eicpy.endorsement</a></strong>: <em class="summary">The endorsement module contains methods and classes for eLink
endorsements</em>
<ul>
<li> <strong class="uidlink"><a href="eicpy.endorsement.edriver-module.html">eicpy.endorsement.edriver</a></strong>: <em class="summary">Endorsement driver that uses the elf.py Driver class</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement.endapply-module.html">eicpy.endorsement.endapply</a></strong>: <em class="summary">Endorsement request applied</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement.epolicy-module.html">eicpy.endorsement.epolicy</a></strong>: <em class="summary">Endorsement policy that uses the elf.py Policy class</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement.erequest-module.html">eicpy.endorsement.erequest</a></strong>: <em class="summary">Endorsement request classes</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement.ersdriver-module.html">eicpy.endorsement.ersdriver</a></strong>: <em class="summary">Endorsement request driver class</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement.ersvehicle-module.html">eicpy.endorsement.ersvehicle</a></strong>: <em class="summary">Endorsement request vehicle class</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement.evehicle-module.html">eicpy.endorsement.evehicle</a></strong>: <em class="summary">Endorsement vehicle that uses the elf.py Vehicle class</em> </li>
<li> <strong class="uidlink"><a href="eicpy.endorsement.misc-module.html">eicpy.endorsement.misc</a></strong>: <em class="summary">Miscellaneous utilities for endorsements</em> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="eicpy.erroremail-module.html">eicpy.erroremail</a></strong>: <em class="summary">This script is designed to handle error emails for the web side for
both Python and BBx.</em> </li>
<li> <strong class="uidlink"><a href="eicpy.insureds-module.html">eicpy.insureds</a></strong>
<ul>
<li> <strong class="uidlink"><a href="eicpy.insureds.mobile-module.html">eicpy.insureds.mobile</a></strong>
<ul>
<li> <strong class="uidlink"><a href="eicpy.insureds.mobile.eicmobile-module.html">eicpy.insureds.mobile.eicmobile</a></strong> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="eicpy.insureds.pesession-module.html">eicpy.insureds.pesession</a></strong>: <em class="summary">Sessions to work like previously created BBx PE.VALIDATE.SESSION</em> </li>
<li> <strong class="uidlink"><a href="eicpy.insureds.policelink-module.html">eicpy.insureds.policelink</a></strong>: <em class="summary">Polic-elink main python library script that's used heavily in
mobile</em> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="eicpy.irupload-module.html">eicpy.irupload</a></strong>: <em class="summary">ImageRight Upload utilities</em> </li>
<li> <strong class="uidlink"><a href="eicpy.misc-module.html">eicpy.misc</a></strong>: <em class="summary">Miscellaneous functions</em> </li>
<li> <strong class="uidlink"><a href="eicpy.multiagent-module.html">eicpy.multiagent</a></strong>: <em class="summary">Multi state agent utilities</em> </li>
<li> <strong class="uidlink"><a href="eicpy.name_build-module.html">eicpy.name_build</a></strong> </li>
<li> <strong class="uidlink"><a href="eicpy.paypal-module.html">eicpy.paypal</a></strong>: <em class="summary">PayPal payment library</em> </li>
<li> <strong class="uidlink"><a href="eicpy.pdf-module.html">eicpy.pdf</a></strong>: <em class="summary">PDF handling for eLink including Printall functionality</em> </li>
<li> <strong class="uidlink"><a href="eicpy.rpc-module.html">eicpy.rpc</a></strong>
<ul>
<li class="private"> <strong class="uidlink"><a href="eicpy.rpc.driver-module.html" onclick="show_private();">eicpy.rpc.driver</a></strong>: <em class="summary">Location tools for XML-RPC.</em> </li>
<li class="private"> <strong class="uidlink"><a href="eicpy.rpc.location-module.html" onclick="show_private();">eicpy.rpc.location</a></strong>: <em class="summary">Location tools for XML-RPC.</em> </li>
<li class="private"> <strong class="uidlink"><a href="eicpy.rpc.vehicle-module.html" onclick="show_private();">eicpy.rpc.vehicle</a></strong>: <em class="summary">Vehicle tools for XML-RPC.</em> </li>
<li class="private"> <strong class="uidlink"><a href="eicpy.rpc.voucher-module.html" onclick="show_private();">eicpy.rpc.voucher</a></strong>: <em class="summary">Voucher tools for XML-RPC.</em> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="eicpy.sql-module.html">eicpy.sql</a></strong>: <em class="summary">This module contains ezsql and supporting classes and functions.</em> </li>
<li> <strong class="uidlink"><a href="eicpy.vehicle-module.html">eicpy.vehicle</a></strong>: <em class="summary">Vehicle lookups including VIN, makes and models</em> </li>
<li> <strong class="uidlink"><a href="eicpy.www-module.html">eicpy.www</a></strong>: <em class="summary">Python module for Building a Web page using Zope Page Templates</em> </li>
<li> <strong class="uidlink"><a href="eicpy.yourpay-module.html">eicpy.yourpay</a></strong>: <em class="summary">YourPay request and response utility</em> </li>
</ul>
</li>
<li> <strong class="uidlink"><a href="simplejson-module.html">simplejson</a></strong>: <em class="summary">JSON (JavaScript Object Notation) <http://json.org> is a
subset of JavaScript syntax (ECMA-262 3rd edition) used as a
lightweight data interchange format.</em>
<ul>
<li class="private"> <strong class="uidlink"><a href="simplejson._speedups-module.html" onclick="show_private();">simplejson._speedups</a></strong>: <em class="summary">simplejson speedups</em> </li>
<li class="private"> <strong class="uidlink"><a href="simplejson.decoder-module.html" onclick="show_private();">simplejson.decoder</a></strong>: <em class="summary">Implementation of JSONDecoder</em> </li>
<li class="private"> <strong class="uidlink"><a href="simplejson.encoder-module.html" onclick="show_private();">simplejson.encoder</a></strong>: <em class="summary">Implementation of JSONEncoder</em> </li>
<li> <strong class="uidlink"><a href="simplejson.ordered_dict-module.html">simplejson.ordered_dict</a></strong>: <em class="summary">Drop-in replacement for collections.OrderedDict by Raymond
Hettinger</em> </li>
<li class="private"> <strong class="uidlink"><a href="simplejson.scanner-module.html" onclick="show_private();">simplejson.scanner</a></strong>: <em class="summary">JSON token scanner</em> </li>
<li> <strong class="uidlink"><a href="simplejson.tool-module.html">simplejson.tool</a></strong>: <em class="summary">Command-line tool to validate and pretty-print JSON</em> </li>
</ul>
</li>
</ul>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th bgcolor="#70b0f0" class="navbar-select"
> Trees </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="file:///G:/Web%20Development/epydoc/">EIC Site-packages</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
<a href="epydoc-log.html">Generated by Epydoc
3.0.1 on Mon Oct 8 11:15:33 2012</a>
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
| chauncey/there-be-docs | static/docs/epydocs/module-tree.html | HTML | mit | 16,369 | [
30522,
1026,
1029,
20950,
2544,
1027,
1000,
1015,
1012,
1014,
1000,
17181,
1027,
1000,
2004,
6895,
2072,
1000,
1029,
1028,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/* **********************************************************************
/*
* NOTE: This copyright does *not* cover user programs that use Hyperic
* program services by normal system calls through the application
* program interfaces provided as part of the Hyperic Plug-in Development
* Kit or the Hyperic Client Development Kit - this is merely considered
* normal use of the program, and does *not* fall under the heading of
* "derived work".
*
* Copyright (C) [2004-2012], VMware, Inc.
* This file is part of Hyperic.
*
* Hyperic is free software; you can redistribute it and/or modify
* it under the terms version 2 of the GNU General Public License as
* published by the Free Software Foundation. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*/
package org.hyperic.tools.ant;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PropertiesFileMergerTask extends Properties{
private static Method saveConvertMethod ;
private String fileContent ;
private Map<String,String[]> delta ;
private boolean isLoaded ;
static {
try{
saveConvertMethod = Properties.class.getDeclaredMethod("saveConvert", String.class, boolean.class, boolean.class) ;
saveConvertMethod.setAccessible(true) ;
}catch(Throwable t) {
throw (t instanceof RuntimeException ? (RuntimeException) t: new RuntimeException(t)) ;
}//EO catch block
}//EO static block
public PropertiesFileMergerTask() {
this.delta = new HashMap<String, String[]>() ;
}//EOM
@Override
public synchronized Object put(Object key, Object value) {
Object oPrevious = null ;
try{
oPrevious = super.put(key, value);
if(this.isLoaded && !value.equals(oPrevious)) this.delta.put(key.toString(), new String[] { value.toString(), (String) oPrevious}) ;
return oPrevious ;
}catch(Throwable t) {
t.printStackTrace() ;
throw new RuntimeException(t) ;
}//EO catch block
}//EOM
@Override
public final synchronized Object remove(Object key) {
final Object oExisting = super.remove(key);
this.delta.remove(key) ;
return oExisting ;
}//EOM
public static final PropertiesFileMergerTask load(final File file) throws IOException {
InputStream fis = null, fis1 = null ;
try{
if(!file.exists()) throw new IOException(file + " does not exist or is not readable") ;
//else
final PropertiesFileMergerTask properties = new PropertiesFileMergerTask() ;
fis = new FileInputStream(file) ;
//first read the content into a string
final byte[] arrFileContent = new byte[(int)fis.available()] ;
fis.read(arrFileContent) ;
properties.fileContent = new String(arrFileContent) ;
fis1 = new ByteArrayInputStream(arrFileContent) ;
properties.load(fis1);
// System.out.println(properties.fileContent);
return properties ;
}catch(Throwable t) {
throw (t instanceof IOException ? (IOException)t : new IOException(t)) ;
}finally{
if(fis != null) fis.close() ;
if(fis1 != null) fis1.close() ;
}//EO catch block
}//EOM
@Override
public synchronized void load(InputStream inStream) throws IOException {
try{
super.load(inStream);
}finally{
this.isLoaded = true ;
}//EO catch block
}//EOm
public final void store(final File outputFile, final String comments) throws IOException {
if(this.delta.isEmpty()) return ;
FileOutputStream fos = null ;
String key = null, value = null ;
Pattern pattern = null ;
Matcher matcher = null ;
String[] arrValues = null;
try{
for(Map.Entry<String,String[]> entry : this.delta.entrySet()) {
key = (String) saveConvertMethod.invoke(this, entry.getKey(), true/*escapeSpace*/, true /*escUnicode*/);
arrValues = entry.getValue() ;
value = (String) saveConvertMethod.invoke(this, arrValues[0], false/*escapeSpace*/, true /*escUnicode*/);
//if the arrValues[1] == null then this is a new property
if(arrValues[1] == null) {
this.fileContent = this.fileContent + "\n" + key + "=" + value ;
}else {
//pattern = Pattern.compile(key+"\\s*=(\\s*.*\\s*)"+ arrValues[1].replaceAll("\\s+", "(\\\\s*.*\\\\s*)") , Pattern.MULTILINE) ;
pattern = Pattern.compile(key+"\\s*=.*\n", Pattern.MULTILINE) ;
matcher = pattern.matcher(this.fileContent) ;
this.fileContent = matcher.replaceAll(key + "=" + value) ;
}//EO else if existing property
System.out.println("Adding/Replacing " + key + "-->" + arrValues[1] + " with: " + value) ;
}//EO while there are more entries ;
fos = new FileOutputStream(outputFile) ;
fos.write(this.fileContent.getBytes()) ;
}catch(Throwable t) {
throw (t instanceof IOException ? (IOException)t : new IOException(t)) ;
}finally{
if(fos != null) {
fos.flush() ;
fos.close() ;
}//EO if bw was initialized
}//EO catch block
}//EOM
public static void main(String[] args) throws Throwable {
///FOR DEBUG
String s = " 1 2 4 sdf \\\\\nsdfsd" ;
final Pattern pattern = Pattern.compile("test.prop2\\s*=.*(?:\\\\?\\s*)(\n)" , Pattern.MULTILINE) ;
final Matcher matcher = pattern.matcher("test.prop2="+s) ;
System.out.println(matcher.replaceAll("test.prop2=" + "newvalue$1")) ;
///FOR DEBUG
if(true) return ;
final String path = "/tmp/confs/hq-server-46.conf" ;
final File file = new File(path) ;
final PropertiesFileMergerTask properties = PropertiesFileMergerTask.load(file) ;
/* final Pattern pattern = Pattern.compile("test.prop1\\s*=this(\\s*.*\\s*)is(\\s*.*\\s*)the(\\s*.*\\s*)value" ,
Pattern.MULTILINE) ;
final Matcher matcher = pattern.matcher(properties.fileContent) ;
System.out.println( matcher.replaceAll("test.prop1=new value") ) ;
System.out.println("\n\n--> " + properties.get("test.prop1")) ;*/
final String overridingConfPath = "/tmp/confs/hq-server-5.conf" ;
//final Properties overrdingProperties = new Properties() ;
final FileInputStream fis = new FileInputStream(overridingConfPath) ;
properties.load(fis) ;
fis.close() ;
///properties.putAll(overrdingProperties) ;
final String outputPath = "/tmp/confs/output-hq-server.conf" ;
final File outputFile = new File(outputPath) ;
final String comments = "" ;
properties.store(outputFile, comments) ;
}//EOM
}//EOC
| cc14514/hq6 | hq-installer/src/main/java/org/hyperic/tools/ant/PropertiesFileMergerTask.java | Java | unlicense | 8,153 | [
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Dec 30 01:26:13 PST 2012 -->
<TITLE>
Uses of Class org.apache.hadoop.security.KerberosName (Hadoop 1.0.4-SNAPSHOT API)
</TITLE>
<META NAME="date" CONTENT="2012-12-30">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.hadoop.security.KerberosName (Hadoop 1.0.4-SNAPSHOT API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/hadoop/security/KerberosName.html" title="class in org.apache.hadoop.security"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/hadoop/security//class-useKerberosName.html" target="_top"><B>FRAMES</B></A>
<A HREF="KerberosName.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.apache.hadoop.security.KerberosName</B></H2>
</CENTER>
No usage of org.apache.hadoop.security.KerberosName
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/hadoop/security/KerberosName.html" title="class in org.apache.hadoop.security"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/hadoop/security//class-useKerberosName.html" target="_top"><B>FRAMES</B></A>
<A HREF="KerberosName.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2009 The Apache Software Foundation
</BODY>
</HTML>
| davidl1/hortonworks-extension | build/docs/api/org/apache/hadoop/security/class-use/KerberosName.html | HTML | apache-2.0 | 6,022 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
'use strict';
angular.module('aurea')
.directive('d3Bars', function ($window, $timeout, d3Service) {
return {
restrict: 'EA',
scope: {
data: '=',
onClick: '&'
},
link: function (scope, ele, attrs) {
d3Service.d3().then(function (d3) {
var margin = parseInt(attrs.margin) || 20,
barHeight = parseInt(attrs.barHeight) || 20,
barPadding = parseInt(attrs.barPadding) || 5;
var svg = d3.select(ele[0])
.append('svg')
.style('width', '100%');
// Browser onresize event
window.onresize = function () {
scope.$apply();
};
// Watch for resize event
scope.$watch(function () {
return angular.element($window)[0].innerWidth;
}, function () {
scope.render(scope.data);
});
scope.$watch('data', function (newData) {
scope.render(newData);
}, true);
scope.render = function (data) {
// remove all previous items before render
svg.selectAll('*').remove();
// If we don't pass any data, return out of the element
if (!data) return;
// setup variables
var width = d3.select(ele[0]).node().offsetWidth - margin,
// calculate the height
height = scope.data.length * (barHeight + barPadding),
// Use the category20() scale function for multicolor support
color = d3.scale.category20(),
// our xScale
xScale = d3.scale.linear()
.domain([0, 31])
.range([0, width]);
// set the height based on the calculations above
svg.attr('height', height);
//create the rectangles for the bar chart
svg.selectAll('rect')
.data(data).enter()
.append('rect')
.attr('height', barHeight)
.attr('width', 140)
.attr('x', 110)
.attr('y', function (d, i) {
return i * (barHeight + barPadding);
})
.attr('fill', function (d) {
return color(d.value);
})
.attr('width', function (d) {
return xScale(d.value);
});
var baseSelection = svg.selectAll('text');
baseSelection
.data(data)
.enter()
.append('text')
.attr('font-family', 'monospace')
.attr('fill', '#000')
.attr('y', function (d, i) {
return i * (barHeight + barPadding) + 15;
})
.attr('x', 15)
.text(function (d) {
return d.name;
});
baseSelection
.data(data)
.enter()
.append('text')
.attr('font-family', 'monospace')
.attr('fill', '#fff')
.attr('y', function (d, i) {
return i * (barHeight + barPadding) + 15;
})
.attr('x', 114)
.text(function (d) {
return d.value > 0 ? d.value : '';
});
};
});
}
};
}); | apuliasoft/aurea | public/js/directives/d3.js | JavaScript | gpl-3.0 | 4,457 | [
30522,
1005,
2224,
9384,
1005,
1025,
16108,
1012,
11336,
1006,
1005,
8740,
16416,
1005,
1007,
1012,
16449,
1006,
1005,
1040,
2509,
8237,
2015,
1005,
1010,
3853,
1006,
1002,
3332,
1010,
1002,
2051,
5833,
1010,
1040,
2509,
8043,
7903,
2063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2013 - Raw Material Software Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL v3
Details of these licenses can be found at: www.gnu.org/licenses
JUCE 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.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.juce.com for more information.
==============================================================================
*/
PositionedGlyph::PositionedGlyph() noexcept
: character (0), glyph (0), x (0), y (0), w (0), whitespace (false)
{
}
PositionedGlyph::PositionedGlyph (const Font& font_, const juce_wchar character_, const int glyph_,
const float x_, const float y_, const float w_, const bool whitespace_)
: font (font_), character (character_), glyph (glyph_),
x (x_), y (y_), w (w_), whitespace (whitespace_)
{
}
PositionedGlyph::PositionedGlyph (const PositionedGlyph& other)
: font (other.font), character (other.character), glyph (other.glyph),
x (other.x), y (other.y), w (other.w), whitespace (other.whitespace)
{
}
PositionedGlyph::~PositionedGlyph() {}
PositionedGlyph& PositionedGlyph::operator= (const PositionedGlyph& other)
{
font = other.font;
character = other.character;
glyph = other.glyph;
x = other.x;
y = other.y;
w = other.w;
whitespace = other.whitespace;
return *this;
}
static inline void drawGlyphWithFont (const Graphics& g, int glyph, const Font& font, const AffineTransform& t)
{
LowLevelGraphicsContext& context = g.getInternalContext();
context.setFont (font);
context.drawGlyph (glyph, t);
}
void PositionedGlyph::draw (const Graphics& g) const
{
if (! isWhitespace())
drawGlyphWithFont (g, glyph, font, AffineTransform::translation (x, y));
}
void PositionedGlyph::draw (const Graphics& g, const AffineTransform& transform) const
{
if (! isWhitespace())
drawGlyphWithFont (g, glyph, font, AffineTransform::translation (x, y).followedBy (transform));
}
void PositionedGlyph::createPath (Path& path) const
{
if (! isWhitespace())
{
if (Typeface* const t = font.getTypeface())
{
Path p;
t->getOutlineForGlyph (glyph, p);
path.addPath (p, AffineTransform::scale (font.getHeight() * font.getHorizontalScale(), font.getHeight())
.translated (x, y));
}
}
}
bool PositionedGlyph::hitTest (float px, float py) const
{
if (getBounds().contains (px, py) && ! isWhitespace())
{
if (Typeface* const t = font.getTypeface())
{
Path p;
t->getOutlineForGlyph (glyph, p);
AffineTransform::translation (-x, -y)
.scaled (1.0f / (font.getHeight() * font.getHorizontalScale()), 1.0f / font.getHeight())
.transformPoint (px, py);
return p.contains (px, py);
}
}
return false;
}
void PositionedGlyph::moveBy (const float deltaX,
const float deltaY)
{
x += deltaX;
y += deltaY;
}
//==============================================================================
GlyphArrangement::GlyphArrangement()
{
glyphs.ensureStorageAllocated (128);
}
GlyphArrangement::GlyphArrangement (const GlyphArrangement& other)
: glyphs (other.glyphs)
{
}
GlyphArrangement& GlyphArrangement::operator= (const GlyphArrangement& other)
{
glyphs = other.glyphs;
return *this;
}
GlyphArrangement::~GlyphArrangement()
{
}
//==============================================================================
void GlyphArrangement::clear()
{
glyphs.clear();
}
PositionedGlyph& GlyphArrangement::getGlyph (const int index) const noexcept
{
return glyphs.getReference (index);
}
//==============================================================================
void GlyphArrangement::addGlyphArrangement (const GlyphArrangement& other)
{
glyphs.addArray (other.glyphs);
}
void GlyphArrangement::addGlyph (const PositionedGlyph& glyph)
{
glyphs.add (glyph);
}
void GlyphArrangement::removeRangeOfGlyphs (int startIndex, const int num)
{
glyphs.removeRange (startIndex, num < 0 ? glyphs.size() : num);
}
//==============================================================================
void GlyphArrangement::addLineOfText (const Font& font,
const String& text,
const float xOffset,
const float yOffset)
{
addCurtailedLineOfText (font, text, xOffset, yOffset, 1.0e10f, false);
}
void GlyphArrangement::addCurtailedLineOfText (const Font& font,
const String& text,
const float xOffset,
const float yOffset,
const float maxWidthPixels,
const bool useEllipsis)
{
if (text.isNotEmpty())
{
Array <int> newGlyphs;
Array <float> xOffsets;
font.getGlyphPositions (text, newGlyphs, xOffsets);
const int textLen = newGlyphs.size();
glyphs.ensureStorageAllocated (glyphs.size() + textLen);
String::CharPointerType t (text.getCharPointer());
for (int i = 0; i < textLen; ++i)
{
const float nextX = xOffsets.getUnchecked (i + 1);
if (nextX > maxWidthPixels + 1.0f)
{
// curtail the string if it's too wide..
if (useEllipsis && textLen > 3 && glyphs.size() >= 3)
insertEllipsis (font, xOffset + maxWidthPixels, 0, glyphs.size());
break;
}
else
{
const float thisX = xOffsets.getUnchecked (i);
const bool isWhitespace = t.isWhitespace();
glyphs.add (PositionedGlyph (font, t.getAndAdvance(),
newGlyphs.getUnchecked(i),
xOffset + thisX, yOffset,
nextX - thisX, isWhitespace));
}
}
}
}
int GlyphArrangement::insertEllipsis (const Font& font, const float maxXPos,
const int startIndex, int endIndex)
{
int numDeleted = 0;
if (glyphs.size() > 0)
{
Array<int> dotGlyphs;
Array<float> dotXs;
font.getGlyphPositions ("..", dotGlyphs, dotXs);
const float dx = dotXs[1];
float xOffset = 0.0f, yOffset = 0.0f;
while (endIndex > startIndex)
{
const PositionedGlyph& pg = glyphs.getReference (--endIndex);
xOffset = pg.x;
yOffset = pg.y;
glyphs.remove (endIndex);
++numDeleted;
if (xOffset + dx * 3 <= maxXPos)
break;
}
for (int i = 3; --i >= 0;)
{
glyphs.insert (endIndex++, PositionedGlyph (font, '.', dotGlyphs.getFirst(),
xOffset, yOffset, dx, false));
--numDeleted;
xOffset += dx;
if (xOffset > maxXPos)
break;
}
}
return numDeleted;
}
void GlyphArrangement::addJustifiedText (const Font& font,
const String& text,
float x, float y,
const float maxLineWidth,
Justification horizontalLayout)
{
int lineStartIndex = glyphs.size();
addLineOfText (font, text, x, y);
const float originalY = y;
while (lineStartIndex < glyphs.size())
{
int i = lineStartIndex;
if (glyphs.getReference(i).getCharacter() != '\n'
&& glyphs.getReference(i).getCharacter() != '\r')
++i;
const float lineMaxX = glyphs.getReference (lineStartIndex).getLeft() + maxLineWidth;
int lastWordBreakIndex = -1;
while (i < glyphs.size())
{
const PositionedGlyph& pg = glyphs.getReference (i);
const juce_wchar c = pg.getCharacter();
if (c == '\r' || c == '\n')
{
++i;
if (c == '\r' && i < glyphs.size()
&& glyphs.getReference(i).getCharacter() == '\n')
++i;
break;
}
else if (pg.isWhitespace())
{
lastWordBreakIndex = i + 1;
}
else if (pg.getRight() - 0.0001f >= lineMaxX)
{
if (lastWordBreakIndex >= 0)
i = lastWordBreakIndex;
break;
}
++i;
}
const float currentLineStartX = glyphs.getReference (lineStartIndex).getLeft();
float currentLineEndX = currentLineStartX;
for (int j = i; --j >= lineStartIndex;)
{
if (! glyphs.getReference (j).isWhitespace())
{
currentLineEndX = glyphs.getReference (j).getRight();
break;
}
}
float deltaX = 0.0f;
if (horizontalLayout.testFlags (Justification::horizontallyJustified))
spreadOutLine (lineStartIndex, i - lineStartIndex, maxLineWidth);
else if (horizontalLayout.testFlags (Justification::horizontallyCentred))
deltaX = (maxLineWidth - (currentLineEndX - currentLineStartX)) * 0.5f;
else if (horizontalLayout.testFlags (Justification::right))
deltaX = maxLineWidth - (currentLineEndX - currentLineStartX);
moveRangeOfGlyphs (lineStartIndex, i - lineStartIndex,
x + deltaX - currentLineStartX, y - originalY);
lineStartIndex = i;
y += font.getHeight();
}
}
void GlyphArrangement::addFittedText (const Font& f,
const String& text,
const float x, const float y,
const float width, const float height,
Justification layout,
int maximumLines,
const float minimumHorizontalScale)
{
// doesn't make much sense if this is outside a sensible range of 0.5 to 1.0
jassert (minimumHorizontalScale > 0 && minimumHorizontalScale <= 1.0f);
if (text.containsAnyOf ("\r\n"))
{
GlyphArrangement ga;
ga.addJustifiedText (f, text, x, y, width, layout);
const Rectangle<float> bb (ga.getBoundingBox (0, -1, false));
float dy = y - bb.getY();
if (layout.testFlags (Justification::verticallyCentred)) dy += (height - bb.getHeight()) * 0.5f;
else if (layout.testFlags (Justification::bottom)) dy += (height - bb.getHeight());
ga.moveRangeOfGlyphs (0, -1, 0.0f, dy);
glyphs.addArray (ga.glyphs);
return;
}
int startIndex = glyphs.size();
addLineOfText (f, text.trim(), x, y);
if (glyphs.size() > startIndex)
{
float lineWidth = glyphs.getReference (glyphs.size() - 1).getRight()
- glyphs.getReference (startIndex).getLeft();
if (lineWidth <= 0)
return;
if (lineWidth * minimumHorizontalScale < width)
{
if (lineWidth > width)
stretchRangeOfGlyphs (startIndex, glyphs.size() - startIndex,
width / lineWidth);
justifyGlyphs (startIndex, glyphs.size() - startIndex,
x, y, width, height, layout);
}
else if (maximumLines <= 1)
{
fitLineIntoSpace (startIndex, glyphs.size() - startIndex,
x, y, width, height, f, layout, minimumHorizontalScale);
}
else
{
Font font (f);
String txt (text.trim());
const int length = txt.length();
const int originalStartIndex = startIndex;
int numLines = 1;
if (length <= 12 && ! txt.containsAnyOf (" -\t\r\n"))
maximumLines = 1;
maximumLines = jmin (maximumLines, length);
while (numLines < maximumLines)
{
++numLines;
const float newFontHeight = height / (float) numLines;
if (newFontHeight < font.getHeight())
{
font.setHeight (jmax (8.0f, newFontHeight));
removeRangeOfGlyphs (startIndex, -1);
addLineOfText (font, txt, x, y);
lineWidth = glyphs.getReference (glyphs.size() - 1).getRight()
- glyphs.getReference (startIndex).getLeft();
}
if (numLines > lineWidth / width || newFontHeight < 8.0f)
break;
}
if (numLines < 1)
numLines = 1;
float lineY = y;
float widthPerLine = lineWidth / numLines;
for (int line = 0; line < numLines; ++line)
{
int i = startIndex;
float lineStartX = glyphs.getReference (startIndex).getLeft();
if (line == numLines - 1)
{
widthPerLine = width;
i = glyphs.size();
}
else
{
while (i < glyphs.size())
{
lineWidth = (glyphs.getReference (i).getRight() - lineStartX);
if (lineWidth > widthPerLine)
{
// got to a point where the line's too long, so skip forward to find a
// good place to break it..
const int searchStartIndex = i;
while (i < glyphs.size())
{
if ((glyphs.getReference (i).getRight() - lineStartX) * minimumHorizontalScale < width)
{
if (glyphs.getReference (i).isWhitespace()
|| glyphs.getReference (i).getCharacter() == '-')
{
++i;
break;
}
}
else
{
// can't find a suitable break, so try looking backwards..
i = searchStartIndex;
for (int back = 1; back < jmin (7, i - startIndex - 1); ++back)
{
if (glyphs.getReference (i - back).isWhitespace()
|| glyphs.getReference (i - back).getCharacter() == '-')
{
i -= back - 1;
break;
}
}
break;
}
++i;
}
break;
}
++i;
}
int wsStart = i;
while (wsStart > 0 && glyphs.getReference (wsStart - 1).isWhitespace())
--wsStart;
int wsEnd = i;
while (wsEnd < glyphs.size() && glyphs.getReference (wsEnd).isWhitespace())
++wsEnd;
removeRangeOfGlyphs (wsStart, wsEnd - wsStart);
i = jmax (wsStart, startIndex + 1);
}
i -= fitLineIntoSpace (startIndex, i - startIndex,
x, lineY, width, font.getHeight(), font,
layout.getOnlyHorizontalFlags() | Justification::verticallyCentred,
minimumHorizontalScale);
startIndex = i;
lineY += font.getHeight();
if (startIndex >= glyphs.size())
break;
}
justifyGlyphs (originalStartIndex, glyphs.size() - originalStartIndex,
x, y, width, height, layout.getFlags() & ~Justification::horizontallyJustified);
}
}
}
//==============================================================================
void GlyphArrangement::moveRangeOfGlyphs (int startIndex, int num, const float dx, const float dy)
{
jassert (startIndex >= 0);
if (dx != 0.0f || dy != 0.0f)
{
if (num < 0 || startIndex + num > glyphs.size())
num = glyphs.size() - startIndex;
while (--num >= 0)
glyphs.getReference (startIndex++).moveBy (dx, dy);
}
}
int GlyphArrangement::fitLineIntoSpace (int start, int numGlyphs, float x, float y, float w, float h, const Font& font,
Justification justification, float minimumHorizontalScale)
{
int numDeleted = 0;
const float lineStartX = glyphs.getReference (start).getLeft();
float lineWidth = glyphs.getReference (start + numGlyphs - 1).getRight() - lineStartX;
if (lineWidth > w)
{
if (minimumHorizontalScale < 1.0f)
{
stretchRangeOfGlyphs (start, numGlyphs, jmax (minimumHorizontalScale, w / lineWidth));
lineWidth = glyphs.getReference (start + numGlyphs - 1).getRight() - lineStartX - 0.5f;
}
if (lineWidth > w)
{
numDeleted = insertEllipsis (font, lineStartX + w, start, start + numGlyphs);
numGlyphs -= numDeleted;
}
}
justifyGlyphs (start, numGlyphs, x, y, w, h, justification);
return numDeleted;
}
void GlyphArrangement::stretchRangeOfGlyphs (int startIndex, int num,
const float horizontalScaleFactor)
{
jassert (startIndex >= 0);
if (num < 0 || startIndex + num > glyphs.size())
num = glyphs.size() - startIndex;
if (num > 0)
{
const float xAnchor = glyphs.getReference (startIndex).getLeft();
while (--num >= 0)
{
PositionedGlyph& pg = glyphs.getReference (startIndex++);
pg.x = xAnchor + (pg.x - xAnchor) * horizontalScaleFactor;
pg.font.setHorizontalScale (pg.font.getHorizontalScale() * horizontalScaleFactor);
pg.w *= horizontalScaleFactor;
}
}
}
Rectangle<float> GlyphArrangement::getBoundingBox (int startIndex, int num, const bool includeWhitespace) const
{
jassert (startIndex >= 0);
if (num < 0 || startIndex + num > glyphs.size())
num = glyphs.size() - startIndex;
Rectangle<float> result;
while (--num >= 0)
{
const PositionedGlyph& pg = glyphs.getReference (startIndex++);
if (includeWhitespace || ! pg.isWhitespace())
result = result.getUnion (pg.getBounds());
}
return result;
}
void GlyphArrangement::justifyGlyphs (const int startIndex, const int num,
const float x, const float y, const float width, const float height,
Justification justification)
{
jassert (num >= 0 && startIndex >= 0);
if (glyphs.size() > 0 && num > 0)
{
const Rectangle<float> bb (getBoundingBox (startIndex, num, ! justification.testFlags (Justification::horizontallyJustified
| Justification::horizontallyCentred)));
float deltaX = 0.0f, deltaY = 0.0f;
if (justification.testFlags (Justification::horizontallyJustified)) deltaX = x - bb.getX();
else if (justification.testFlags (Justification::horizontallyCentred)) deltaX = x + (width - bb.getWidth()) * 0.5f - bb.getX();
else if (justification.testFlags (Justification::right)) deltaX = x + width - bb.getRight();
else deltaX = x - bb.getX();
if (justification.testFlags (Justification::top)) deltaY = y - bb.getY();
else if (justification.testFlags (Justification::bottom)) deltaY = y + height - bb.getBottom();
else deltaY = y + (height - bb.getHeight()) * 0.5f - bb.getY();
moveRangeOfGlyphs (startIndex, num, deltaX, deltaY);
if (justification.testFlags (Justification::horizontallyJustified))
{
int lineStart = 0;
float baseY = glyphs.getReference (startIndex).getBaselineY();
int i;
for (i = 0; i < num; ++i)
{
const float glyphY = glyphs.getReference (startIndex + i).getBaselineY();
if (glyphY != baseY)
{
spreadOutLine (startIndex + lineStart, i - lineStart, width);
lineStart = i;
baseY = glyphY;
}
}
if (i > lineStart)
spreadOutLine (startIndex + lineStart, i - lineStart, width);
}
}
}
void GlyphArrangement::spreadOutLine (const int start, const int num, const float targetWidth)
{
if (start + num < glyphs.size()
&& glyphs.getReference (start + num - 1).getCharacter() != '\r'
&& glyphs.getReference (start + num - 1).getCharacter() != '\n')
{
int numSpaces = 0;
int spacesAtEnd = 0;
for (int i = 0; i < num; ++i)
{
if (glyphs.getReference (start + i).isWhitespace())
{
++spacesAtEnd;
++numSpaces;
}
else
{
spacesAtEnd = 0;
}
}
numSpaces -= spacesAtEnd;
if (numSpaces > 0)
{
const float startX = glyphs.getReference (start).getLeft();
const float endX = glyphs.getReference (start + num - 1 - spacesAtEnd).getRight();
const float extraPaddingBetweenWords
= (targetWidth - (endX - startX)) / (float) numSpaces;
float deltaX = 0.0f;
for (int i = 0; i < num; ++i)
{
glyphs.getReference (start + i).moveBy (deltaX, 0.0f);
if (glyphs.getReference (start + i).isWhitespace())
deltaX += extraPaddingBetweenWords;
}
}
}
}
//==============================================================================
inline void GlyphArrangement::drawGlyphUnderline (const Graphics& g, const PositionedGlyph& pg,
const int i, const AffineTransform& transform) const
{
const float lineThickness = (pg.font.getDescent()) * 0.3f;
float nextX = pg.x + pg.w;
if (i < glyphs.size() - 1 && glyphs.getReference (i + 1).y == pg.y)
nextX = glyphs.getReference (i + 1).x;
Path p;
p.addRectangle (pg.x, pg.y + lineThickness * 2.0f, nextX - pg.x, lineThickness);
g.fillPath (p, transform);
}
void GlyphArrangement::draw (const Graphics& g) const
{
for (int i = 0; i < glyphs.size(); ++i)
{
const PositionedGlyph& pg = glyphs.getReference(i);
if (pg.font.isUnderlined())
drawGlyphUnderline (g, pg, i, AffineTransform::identity);
pg.draw (g);
}
}
void GlyphArrangement::draw (const Graphics& g, const AffineTransform& transform) const
{
for (int i = 0; i < glyphs.size(); ++i)
{
const PositionedGlyph& pg = glyphs.getReference(i);
if (pg.font.isUnderlined())
drawGlyphUnderline (g, pg, i, transform);
pg.draw (g, transform);
}
}
void GlyphArrangement::createPath (Path& path) const
{
for (int i = 0; i < glyphs.size(); ++i)
glyphs.getReference (i).createPath (path);
}
int GlyphArrangement::findGlyphIndexAt (const float x, const float y) const
{
for (int i = 0; i < glyphs.size(); ++i)
if (glyphs.getReference (i).hitTest (x, y))
return i;
return -1;
}
| aneeshvartakavi/VSTPlugins | stereoEnhancer/JuceLibraryCode/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp | C++ | gpl-2.0 | 25,385 | [
30522,
1013,
1008,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
\begin{tabular}
\multicolumn{4}{l}{Nimellisarvot} & \multicolumn{5}{l}{Tyhjakayntikoe} & \multicolumn{3}{l}{Oikosulkukoe} \\ % & \multicolumn{40}{1}{something}
$S_N$ & $=$ & $\SI{1000}{\kV\A}$ & $U_0$ & $=$ & $U_{N1}$ & $U_k$ & $=$ & $\SI{360}{\V}$ \\
\end{tabular}
| cmhughes/latexindent.pl | test-cases/alignment/multicol-out.tex | TeX | gpl-3.0 | 321 | [
30522,
1032,
4088,
1063,
21628,
7934,
1065,
1032,
4800,
25778,
2819,
2078,
1063,
1018,
1065,
1063,
1048,
1065,
1063,
9152,
10199,
6856,
2906,
22994,
1065,
1004,
1032,
4800,
25778,
2819,
2078,
1063,
1019,
1065,
1063,
1048,
1065,
1063,
5939,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
require 'spec_helper'
describe 'neutron::agents::lbaas' do
let :pre_condition do
"class { 'neutron': rabbit_password => 'passw0rd' }"
end
let :params do
{}
end
let :default_params do
{ :package_ensure => 'present',
:enabled => true,
:debug => false,
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:device_driver => 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver',
:use_namespaces => nil,
:manage_haproxy_package => true
}
end
let :default_facts do
{ :operatingsystem => 'default',
:operatingsystemrelease => 'default'
}
end
shared_examples_for 'neutron lbaas agent' do
let :p do
default_params.merge(params)
end
it { is_expected.to contain_class('neutron::params') }
it_configures 'haproxy lbaas_driver'
it_configures 'haproxy lbaas_driver without package'
it 'configures lbaas_agent.ini' do
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/debug').with_value(p[:debug]);
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]);
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/device_driver').with_value(p[:device_driver]);
is_expected.to contain_neutron_lbaas_agent_config('haproxy/user_group').with_value(platform_params[:nobody_user_group]);
end
it 'installs neutron lbaas agent package' do
is_expected.to contain_package('neutron-lbaas-agent').with(
:name => platform_params[:lbaas_agent_package],
:ensure => p[:package_ensure],
:tag => ['openstack', 'neutron-package'],
)
is_expected.to contain_package('neutron').with_before(/Package\[neutron-lbaas-agent\]/)
end
it 'configures neutron lbaas agent service' do
is_expected.to contain_service('neutron-lbaas-service').with(
:name => platform_params[:lbaas_agent_service],
:enable => true,
:ensure => 'running',
:require => 'Class[Neutron]',
:tag => 'neutron-service',
)
is_expected.to contain_service('neutron-lbaas-service').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-lbaas-agent]' ] )
end
context 'with manage_service as false' do
before :each do
params.merge!(:manage_service => false)
end
it 'should not start/stop service' do
is_expected.to contain_service('neutron-lbaas-service').without_ensure
end
end
context 'with use_namespaces as false' do
before :each do
params.merge!(:use_namespaces => false)
end
it 'should set use_namespaces option' do
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/use_namespaces').with_value(p[:use_namespaces])
end
end
end
shared_examples_for 'haproxy lbaas_driver' do
it 'installs haproxy packages' do
if platform_params.has_key?(:lbaas_agent_package)
is_expected.to contain_package(platform_params[:haproxy_package]).with_before(['Package[neutron-lbaas-agent]'])
end
is_expected.to contain_package(platform_params[:haproxy_package]).with(
:ensure => 'present'
)
end
end
shared_examples_for 'haproxy lbaas_driver without package' do
let :pre_condition do
"package { 'haproxy':
ensure => 'present'
}
class { 'neutron': rabbit_password => 'passw0rd' }"
end
before do
params.merge!(:manage_haproxy_package => false)
end
it 'installs haproxy package via haproxy module' do
is_expected.to contain_package(platform_params[:haproxy_package]).with(
:ensure => 'present'
)
end
end
context 'on Debian platforms' do
let :facts do
default_facts.merge(
{ :osfamily => 'Debian',
:concat_basedir => '/dne'
}
)
end
let :platform_params do
{ :haproxy_package => 'haproxy',
:lbaas_agent_package => 'neutron-lbaas-agent',
:nobody_user_group => 'nogroup',
:lbaas_agent_service => 'neutron-lbaas-agent' }
end
it_configures 'neutron lbaas agent'
end
context 'on RedHat platforms' do
let :facts do
default_facts.merge(
{ :osfamily => 'RedHat',
:operatingsystemrelease => '7',
:concat_basedir => '/dne'
}
)
end
let :platform_params do
{ :haproxy_package => 'haproxy',
:lbaas_agent_package => 'openstack-neutron-lbaas',
:nobody_user_group => 'nobody',
:lbaas_agent_service => 'neutron-lbaas-agent' }
end
it_configures 'neutron lbaas agent'
end
end
| plumgrid/puppet-neutron | spec/classes/neutron_agents_lbaas_spec.rb | Ruby | apache-2.0 | 4,780 | [
30522,
5478,
1005,
28699,
1035,
2393,
2121,
1005,
6235,
1005,
20393,
1024,
1024,
6074,
1024,
1024,
6053,
11057,
2015,
1005,
2079,
2292,
1024,
3653,
1035,
4650,
2079,
1000,
2465,
1063,
1005,
20393,
1005,
1024,
10442,
1035,
20786,
1027,
1028,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
return array(
/*
|--------------------------------------------------------------------------
| Administrator Language Lines for knockout
|--------------------------------------------------------------------------
|
| pl - Polish
|
*/
'delete_active_item' => 'Czy na pewno chcesz usunąć ten obiekt? Czynności tej nie można cofnąć.',
'saving' => 'Trwa zapisywanie ...',
'saved' => 'Obiekt zapisany.',
'deleting' => 'Usuwanie ...',
'deleted' => 'Obiekt usunięty.',
'character_left' => ' znak pozostał',
'characters_left' => ' znaki pozostały',
'no_results' => 'Brak pasujących wyników',
'select_options' => 'Wybierz jakieś opcje',
);
| palamago/shared-links-ranking | vendor/frozennode/administrator/src/lang/pl/knockout.php | PHP | gpl-2.0 | 723 | [
30522,
1026,
1029,
25718,
2709,
9140,
1006,
1013,
1008,
1064,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Esteban Galvis</title>
<meta name="description" content="GG">
<meta name="Esteban G G" content="SitePoint">
<!-- <link href="resources/css/hover.min.css" rel="stylesheet"> -->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body class="general foto">
<h2 class="section-heading text-uppercase text-center item">Welcome to my personal page.</h2>
<div class="container-fluid">
<div class="diseno-base">
<div class="container-fluid">
<div class="container-fluid widget">
<div class="container-fluid blog">
<h3 id="weekblog">Esteban Galvis Gutierrez</h3>
<p>This is currently a work in progress.</p>
</div>
</div>
</div>
</div>
<div class="diseno-base foto2" >
<div class="container-fluid ">
<div class="container-fluid">
<nav id="item">
<ul class="nav nav-pills nav-stacked ">
<li class="hvr-fade" role="presentation"><a href="#research" ><h3>Research</h3></a></li>
<li class="hvr-fade" role="presentation"><a href="#work"><h3>Work</h3></a></li>
</nav>
</div>
<!--
<div class="circle">
<div id="circle2">
<div id="circle1">
</div>
</div>
</div>
-->
</div>
</div>
<div class="diseno-base" >
<div class="container-fluid">
<div class="container-fluid">
<nav id="item">
<ul class="nav nav-pills nav-stacked ">
<li class="hvr-fade" role="presentation"><a href="#about" ><h3>About Me</h3></a></li>
<li class="hvr-fade" role="presentation"><a href="cg.html"><h3>Computer Graphics Spring '17</h3></a></li>
<!-- <li class="hvr-fade" role="presentation"><a href="#"><h3>Products</h3></a></li>
<li class="hvr-fade" role="presentation"><a href="#"><h3>Contact us</h3></a></li>
<li class="hvr-fade" role="presentation"><a href="#"><h3>Company's Values</h3> </a></li> -->
</ul>
</nav>
</div>
</div>
<!-- Services -->
<section id="work">
<div class="container blog">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading text-uppercase">Work Experience</h2>
<h3 class="section-subheading text-muted"</h3>
</div>
</div>
<div class="row text-center">
<div class="col-md-6">
<span class="fa-stack fa-4x">
<i class="fas fa-circle fa-stack-2x text-primary"></i>
<i class="fas fa-shopping-cart fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading">Unity Technologies</h4>
<p class="text-muted">Have been working as as Support Intern since June 2014.</p>
</div>
<div class="col-md-6">
<span class="fa-stack fa-4x">
<i class="fas fa-circle fa-stack-2x text-primary"></i>
<i class="fas fa-laptop fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading">Damappa</h4>
<p class="text-muted">Worked as a Machine Learning Dev Feb - March 2018.</p>
</div>
</div>
</div>
</section>
<!-- Services -->
<section id="research">
<div class="container blog">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading text-uppercase">Research Experience</h2>
<h3 class="section-subheading text-muted"</h3>
</div>
</div>
<div class="row text-center">
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fas fa-circle fa-stack-2x text-primary"></i>
<i class="fas fa-shopping-cart fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading">Imagine- Universidad de los Andes</h4>
<p class="text-muted">Fall 2018: Based on video data, extract insights for decision making (Mobility System). Task: Detect and classify a variety of classes</p>
<h5>Tease</h5>
<video width="240" height="240" controls>
<source src="resources/videos/ejemplo.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fas fa-circle fa-stack-2x text-primary"></i>
<i class="fas fa-laptop fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading">Math Department Uniandes & Policia Nacional</h4>
<p class="text-muted">Fall 2017: Cleaned, normalized, clustered and visualized homicides for hypothesis testing</p>
</div>
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fas fa-circle fa-stack-2x text-primary"></i>
<i class="fas fa-laptop fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading">Courant Institute of Mathematical Sciences New York University</h4>
<p class="text-muted">Summer 2017: Machine Translation and Information Extraction of legal texts as data..</p>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="about">
<div class="container blog">
<h2 class="section-heading text-uppercase text-center">About Me</h2>
<div class="row">
<div class="col-lg-12 mx-auto">
<!-- To configure the contact form email address, go to mail/contact_me.php and update the email address in the PHP file on line 19. -->
<!-- The form should work on most web servers, but if the form is not working you may need to configure your web server differently. -->
<p class="item text-center"> I'm a Systems and Computer Engineering student with a Minor in Management at Universidad de los Andes. My main interests are in Machine Learning applied to Natural Language Processing and Computer Vision.</p>
</div>
</div>
</div>
</section>
</div>
<script src="resources/js/jquery-2.2.4.js"></script>
<script src="resources/js/bootstrap.min.js"></script>
<!-- Bootstrap CSS -->
<link href="resources/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="resources/css/style.css">
</body>
</html>
| tebandesade/tebandesade.github.io | old/index.html | HTML | mit | 6,666 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
2516,
1028,
28517,
8193,
14891,
11365,
1026,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Copyright 2012 Max Toro Q.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace myxsl.saxon {
static class StringExtensions {
public static bool HasValue(this string s) {
return !String.IsNullOrEmpty(s);
}
}
}
| maxtoroq/myxsl | src/myxsl.saxon/util/StringExtensions.cs | C# | apache-2.0 | 851 | [
30522,
1013,
1013,
9385,
2262,
4098,
23790,
1053,
1012,
1013,
1013,
1013,
1013,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1013,
1013,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* BaseContact class
*
* @author Carlos Palma <chonwil@gmail.com>
*/
abstract class BaseContact extends ContentDataObject {
// -------------------------------------------------------
// Access methods
// -------------------------------------------------------
/**
* Return value of 'id' field
*
* @access public
* @param void
* @return integer
*/
function getObjectId() {
return $this->getColumnValue('object_id');
} // getObjectId()
/**
* Set value of 'id' field
*
* @access public
* @param integer $value
* @return boolean
*/
function setObjectId($value) {
return $this->setColumnValue('object_id', $value);
} // setObjectId()
/**
* Return value of 'first_name' field
*
* @access public
* @param void
* @return string
*/
function getFirstName() {
return $this->getColumnValue('first_name');
} // getFirstName()
/**
* Set value of 'first_name' field
*
* @access public
* @param string $value
* @return boolean
*/
function setFirstName($value) {
return $this->setColumnValue('first_name', $value);
} // setFirstName()
/**
* Return value of 'surname' field
*
* @access public
* @param void
* @return string
*/
function getSurname() {
return $this->getColumnValue('surname');
} // getSurname()
/**
* Set value of 'surname' field
*
* @access public
* @param string $value
* @return boolean
*/
function setSurname($value) {
return $this->setColumnValue('surname', $value);
} // setSurname()
/**
* Return value of 'company_id' field
*
* @access public
* @param void
* @return integer
*/
function getCompanyId() {
return $this->getColumnValue('company_id');
} // getCompanyId()
/**
* Set value of 'company_id' field
*
* @access public
* @param integer $value
* @return boolean
*/
function setCompanyId($value) {
return $this->setColumnValue('company_id', $value);
} // setCompanyId()
/**
* Return value of 'is_company' field
*
* @access public
* @param void
* @return boolean
*/
function getIsCompany() {
return $this->getColumnValue('is_company');
} // getIsCompany()
/**
* Set value of 'is_company' field
*
* @access public
* @param boolean $value
* @return boolean
*/
function setIsCompany($value) {
return $this->setColumnValue('is_company', $value);
} // setIsCompany()
/**
* Return value of 'user_type' field
*
* @access public
* @param void
* @return boolean
*/
function getUserType() {
return $this->getColumnValue('user_type');
} // getUserType()
/**
* Set value of 'user_type' field
*
* @access public
* @param boolean $value
* @return boolean
*/
function setUserType($value) {
return $this->setColumnValue('user_type', $value);
} // setUserType()
/**
* Return value of 'birthday' field
*
* @access public
* @param void
* @return datetimevalue
*/
function getBirthday() {
return $this->getColumnValue('birthday');
} // getBirthday()
/**
* Set value of 'birthday' field
*
* @access public
* @param datetimevalue $value
* @return boolean
*/
function setBirthday($value) {
return $this->setColumnValue('birthday', $value);
} // setBirthday()
/**
* Return value of 'department' field
*
* @access public
* @param void
* @return string
*/
function getDepartment() {
return $this->getColumnValue('department');
} // getDepartment()
/**
* Set value of 'department' field
*
* @access public
* @param string $value
* @return boolean
*/
function setDepartment($value) {
return $this->setColumnValue('department', $value);
} // setDepartment()
/**
* Return value of 'job_title' field
*
* @access public
* @param void
* @return string
*/
function getJobTitle() {
return $this->getColumnValue('job_title');
} // getJobTitle()
/**
* Set value of 'job_title' field
*
* @access public
* @param string $value
* @return boolean
*/
function setJobTitle($value) {
return $this->setColumnValue('job_title', $value);
} // setJobTitle()
/**
* Return value of 'timezone' field
*
* @access public
* @param void
* @return float
*/
function getTimezone() {
return $this->getColumnValue('timezone');
} // getTimezone()
/**
* Set value of 'timezone' field
*
* @access public
* @param float $value
* @return boolean
*/
function setTimezone($value) {
return $this->setColumnValue('timezone', $value);
} // setTimezone()
/**
* Return value of 'is_active_user' field
*
* @access public
* @param void
* @return boolean
*/
function getIsActiveUser() {
return $this->getColumnValue('is_active_user');
} // getIsActiveUser()
/**
* Set value of 'is_active_user' field
*
* @access public
* @param boolean $value
* @return boolean
*/
function setIsActiveUser($value) {
return $this->setColumnValue('is_active_user', $value);
} // setIsActiveUser()
/**
* Return value of 'token' field
*
* @access public
* @param void
* @return string
*/
function getToken() {
return $this->getColumnValue('token');
} // getToken()
/**
* Set value of 'token' field
*
* @access public
* @param string $value
* @return boolean
*/
function setToken($value) {
return $this->setColumnValue('token', $value);
} // setToken()
/**
* Return value of 'salt' field
*
* @access public
* @param void
* @return string
*/
function getSalt() {
return $this->getColumnValue('salt');
} // getSalt()
/**
* Set value of 'salt' field
*
* @access public
* @param string $value
* @return boolean
*/
function setSalt($value) {
return $this->setColumnValue('salt', $value);
} // setSalt()
/**
* Return value of 'twister' field
*
* @access public
* @param void
* @return string
*/
function getTwister() {
return $this->getColumnValue('twister');
} // getTwister()
/**
* Set value of 'twister' field
*
* @access public
* @param string $value
* @return boolean
*/
function setTwister($value) {
return $this->setColumnValue('twister', $value);
} // setTwister()
/**
* Return value of 'display_name' field
*
* @access public
* @param void
* @return string
*/
function getDisplayName() {
return $this->getColumnValue('display_name');
} // getDisplayName()
/**
* Set value of 'display_name' field
*
* @access public
* @param string $value
* @return boolean
*/
function setDisplayName($value) {
return $this->setColumnValue('display_name', $value);
} // setDisplayName()
/**
* Return value of 'permission_group_id' field
*
* @access public
* @param void
* @return integer
*/
function getPermissionGroupId() {
return $this->getColumnValue('permission_group_id');
} // getPermissionGroupId()
/**
* Set value of 'permission_group_id' field
*
* @access public
* @param integer $value
* @return boolean
*/
function setPermissionGroupId($value) {
return $this->setColumnValue('permission_group_id', $value);
} // setPermissionGroupId()
/**
* Return value of 'username' field
*
* @access public
* @param void
* @return string
*/
function getUsername() {
return $this->getColumnValue('username');
} // getUsername()
/**
* Set value of 'username' field
*
* @access public
* @param string $value
* @return boolean
*/
function setUsername($value) {
return $this->setColumnValue('username', $value);
} // setUsername()
/**
* Return value of 'contact_passwords_id' field
*
* @access public
* @param void
* @return string
*/
function getContactPasswordsId() {
return $this->getColumnValue('contact_passwords_id');
} // getContactPasswordsId()
/**
* Set value of 'contact_passwords_id' field
*
* @access public
* @param string $value
* @return boolean
*/
function setContactPasswordsId($value) {
return $this->setColumnValue('contact_passwords_id', $value);
} // setContactPasswordsId()
/**
* Return value of 'comments' field
*
* @access public
* @param void
* @return string
*/
function getCommentsField() {
return $this->getColumnValue('comments');
} // getCommentsField()
/**
* Set value of 'comments' field
*
* @access public
* @param string $value
* @return boolean
*/
function setCommentsField($value) {
return $this->setColumnValue('comments', $value);
} // setCommentsField()
/**
* Return value of 'picture_file' field
*
* @access public
* @param void
* @return string
*/
function getPictureFile() {
return $this->getColumnValue('picture_file');
} // getPictureFile()
/**
* Set value of 'picture_file' field
*
* @access public
* @param string $value
* @return boolean
*/
function setPictureFile($value) {
return $this->setColumnValue('picture_file', $value);
} // setPictureFile()
function getPictureFileSmall() {
return $this->getColumnValue('picture_file_small');
}
function setPictureFileSmall($value) {
return $this->setColumnValue('picture_file_small', $value);
}
function getPictureFileMedium() {
return $this->getColumnValue('picture_file_medium');
}
function setPictureFileMedium($value) {
return $this->setColumnValue('picture_file_medium', $value);
}
/**
* Return value of 'avatar_file' field
*
* @access public
* @param void
* @return string
*/
function getAvatarFile() {
return $this->getColumnValue('avatar_file');
} // getAvatarFile()
/**
* Set value of 'avatar_file' field
*
* @access public
* @param string $value
* @return boolean
*/
function setAvatarFile($value) {
return $this->setColumnValue('avatar_file', $value);
} // setAvatarFile()
/**
* Return value of 'last_login' field
*
* @access public
* @param void
* @return DateTimeValue
*/
function getLastLogin() {
return $this->getColumnValue('last_login');
} // getLastLogin()
/**
* Set value of 'last_login' field
*
* @access public
* @param DateTimeValue $value
* @return boolean
*/
function setLastLogin(DateTimeValue $value) {
return $this->setColumnValue('last_login', $value);
} // setLastLogin()
/**
* Return value of 'last_visit' field
*
* @access public
* @param void
* @return DateTimeValue
*/
function getLastVisit() {
return $this->getColumnValue('last_visit');
} // getLastVisit()
/**
* Set value of 'last_visit' field
*
* @access public
* @param DateTimeValue $value
* @return boolean
*/
function setLastVisit($value) {
return $this->setColumnValue('last_visit', $value);
} // setLastVisit()
/**
* Return value of 'last_activity' field
*
* @access public
* @param void
* @return DateTimeValue
*/
function getLastActivity() {
return $this->getColumnValue('last_activity');
} // getLastActivity()
/**
* Set value of 'last_activity' field
*
* @access public
* @param DateTimeValue $value
* @return boolean
*/
function setLastActivity($value) {
return $this->setColumnValue('last_activity', $value);
} // setLastActivity()
/**
* Return value of 'personal_member_id' field
*
* @access public
* @param void
* @return integer
*/
function getPersonalMemberId() {
return $this->getColumnValue('personal_member_id');
} // getPersonalMemberId()
/**
* Set value of 'personal_member_id' field
*
* @access public
* @param integer $value
* @return boolean
*/
function setPersonalMemberId($value) {
return $this->setColumnValue('personal_member_id', $value);
} // setPersonalMemberId()
/**
* Return value of 'disabled' field
*
* @access public
* @param void
* @return integer
*/
function getDisabled() {
return $this->getColumnValue('disabled');
} // getDisabled()
/**
* Set value of 'disabled' field
*
* @access public
* @param integer $value
* @return boolean
*/
function setDisabled($value) {
return $this->setColumnValue('disabled', $value);
} // setDisabled()
/**
* Return value of 'token_disabled' field
*
* @access public
* @param void
* @return string
*/
function getTokenDisabled() {
return $this->getColumnValue('token_disabled');
} // getTokenDisabled()
/**
* Set value of 'token_disabled' field
*
* @access public
* @param string $value
* @return boolean
*/
function setTokenDisabled($value) {
return $this->setColumnValue('token_disabled', $value);
} // setTokenDisabled()
/**
* Return value of 'default_billing_id' field
*
* @access public
* @param void
* @return integer
*/
function getDefaultBillingId() {
return $this->getColumnValue('default_billing_id');
} // getDefaultBillingId()
/**
* Set value of 'default_billing_id' field
*
* @access public
* @param integer $value
* @return boolean
*/
function setDefaultBillingId($value) {
return $this->setColumnValue('default_billing_id', $value);
} // setDefaultBillingId()
function getUserTimezoneId() {
return $this->getColumnValue('user_timezone_id');
}
function setUserTimezoneId($value) {
return $this->setColumnValue('user_timezone_id', $value);
}
/**
* Return manager instance
*
* @access protected
* @param void
* @return Contacts
*/
function manager() {
if(!($this->manager instanceof Contacts)) $this->manager = Contacts::instance();
return $this->manager;
} // manager
} // BaseContact
?> | fengoffice/fengoffice | application/models/contacts/base/BaseContact.class.php | PHP | agpl-3.0 | 15,547 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
2918,
8663,
2696,
6593,
2465,
1008,
1008,
1030,
3166,
5828,
23985,
1026,
16480,
2078,
29602,
1030,
20917,
4014,
1012,
4012,
1028,
1008,
1013,
10061,
2465,
2918,
8663,
2696,
6593,
8908,
4180,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/* Public domain. */
#ifndef CDB_H
#define CDB_H
#include <string.h>
#include "types.h"
#define KVLSZ 4
#define CDB_MAX_KEY 0xff
#define CDB_MAX_VALUE 0xffffff
#define CDB_HASHSTART 5381
struct cdb {
char *map; /* 0 if no map is available */
int fd; /* filedescriptor */
ut32 size; /* initialized if map is nonzero */
ut32 loop; /* number of hash slots searched under this key */
ut32 khash; /* initialized if loop is nonzero */
ut32 kpos; /* initialized if loop is nonzero */
ut32 hpos; /* initialized if loop is nonzero */
ut32 hslots; /* initialized if loop is nonzero */
ut32 dpos; /* initialized if cdb_findnext() returns 1 */
ut32 dlen; /* initialized if cdb_findnext() returns 1 */
};
/* TODO THIS MUST GTFO! */
bool cdb_getkvlen(struct cdb *db, ut32 *klen, ut32 *vlen, ut32 pos);
void cdb_free(struct cdb *);
bool cdb_init(struct cdb *, int fd);
void cdb_findstart(struct cdb *);
bool cdb_read(struct cdb *, char *, unsigned int, ut32);
int cdb_findnext(struct cdb *, ut32 u, const char *, ut32);
#define cdb_datapos(c) ((c)->dpos)
#define cdb_datalen(c) ((c)->dlen)
#endif
| alvarofe/sdb | src/cdb.h | C | mit | 1,120 | [
30522,
1013,
1008,
2270,
5884,
1012,
1008,
1013,
1001,
2065,
13629,
2546,
3729,
2497,
1035,
1044,
1001,
9375,
3729,
2497,
1035,
1044,
1001,
2421,
1026,
5164,
1012,
1044,
1028,
1001,
2421,
1000,
4127,
1012,
1044,
1000,
1001,
9375,
24888,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# frozen_string_literal: true
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
# Devise will use the `secret_key_base` as its `secret_key`
# by default. You can change it below and use your own secret key.
# config.secret_key = 'afef731ba411e696418ccdf15672854f06cfd82616e49f56f622f11db9773a30903d6b7fec4b9ff42d25d7b5b7c36d6d5f354cd242723bab722482882c1dfd1e'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
# Configure the parent class responsible to send e-mails.
# config.parent_mailer = 'ActionMailer::Base'
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'devise/orm/active_record'
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
# config.authentication_keys = [:email]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
# find_for_authentication method and considered in your model lookup. For instance,
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
# The same considerations mentioned for authentication_keys also apply to request_keys.
# config.request_keys = []
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [:email]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
config.strip_whitespace_keys = [:email]
# Tell if authentication through request.params is enabled. True by default.
# It can be set to an array that will enable params authentication only for the
# given strategies, for example, `config.params_authenticatable = [:database]` will
# enable it only for database (email + password) authentication.
# config.params_authenticatable = true
# Tell if authentication through HTTP Auth is enabled. False by default.
# It can be set to an array that will enable http authentication only for the
# given strategies, for example, `config.http_authenticatable = [:database]` will
# enable it only for database authentication. The supported strategies are:
# :database = Support basic authentication with authentication key + password
# config.http_authenticatable = false
# If 401 status code should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# The realm used in Http Basic Authentication. 'Application' by default.
# config.http_authentication_realm = 'Application'
# It will change confirmation, password recovery and other workflows
# to behave the same regardless if the e-mail provided was right or wrong.
# Does not affect registerable.
# config.paranoid = true
# By default Devise will store the user in session. You can skip storage for
# particular strategies by setting this option.
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
config.skip_session_storage = [:http_auth]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX
# requests for sign in and sign up, you need to get a new CSRF token
# from the server. You can disable this option at your own risk.
# config.clean_up_csrf_token_on_authentication = true
# When false, Devise will not attempt to reload routes on eager load.
# This can reduce the time taken to boot the app but if your application
# requires the Devise mappings to be loaded during boot time the application
# won't boot properly.
# config.reload_routes = true
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
# using other algorithms, it sets how many times you want the password to be hashed.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments. Note that, for bcrypt (the default
# algorithm), the cost increases exponentially with the number of stretches (e.g.
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
config.stretches = Rails.env.test? ? 1 : 11
# Set up a pepper to generate the hashed password.
# config.pepper = '2bc7416d0de0a77bb9ceb648ffbf4972aabe87755d6e82bc1c866a7401739fbe9a566c4408cf2ffd979f84024d3581530348de5862a17563f95f666c1314d5d5'
# Send a notification to the original email when the user's email is changed.
# config.send_email_changed_notification = false
# Send a notification email when the user's password is changed.
# config.send_password_change_notification = false
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
# their account within 3 days after the mail was sent, but on the fourth day
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
# config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed, new email is stored in
# unconfirmed_email column, and copied to email column on successful confirmation.
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [:email]
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# Options to be passed to the created cookie. For instance, you can set
# secure: true in order to force SSL only cookies.
# config.rememberable_options = {}
# ==> Configuration for :validatable
# Range for password length.
config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
# Defines which key will be used when locking and unlocking an account
# config.unlock_keys = [:email]
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
# :both = Enables both strategies
# :none = No unlock strategy. You should handle unlocking by yourself.
# config.unlock_strategy = :both
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
# config.maximum_attempts = 20
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour
# Warn on the last attempt before the account is locked.
# config.last_attempt_warning = true
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
# config.reset_password_keys = [:email]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
config.reset_password_within = 6.hours
# When set to false, does not sign a user in automatically after their password is
# reset. Defaults to true, so a user is signed in automatically after a reset.
# config.sign_in_after_reset_password = true
# ==> Configuration for :encryptable
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
# You can use :sha1, :sha512 or algorithms from others authentication tools as
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
# for default behavior) and :restful_authentication_sha1 (then you should set
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
#
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = false
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
# Set this configuration to false if you want /users/sign_out to sign out
# only the current scope. By default, Devise signs out all scopes.
# config.sign_out_all_scopes = true
# ==> Navigation configuration
# Lists the formats that should be treated as navigational. Formats like
# :html, should redirect to the sign in page when the user does not have
# access, but formats like :xml or :json, should return 401.
#
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
# config.navigational_formats = ['*/*', :html]
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: '/my_engine'
#
# The router that invoked `devise_for`, in the example above, would be:
# config.router_name = :my_engine
#
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end
| motiko/my-trivia-server | config/initializers/devise.rb | Ruby | gpl-3.0 | 13,673 | [
30522,
1001,
7708,
1035,
5164,
1035,
18204,
1024,
30524,
18008,
1998,
2061,
5743,
1012,
1001,
2116,
1997,
2122,
9563,
7047,
2064,
2022,
2275,
3442,
1999,
2115,
2944,
1012,
14386,
3366,
1012,
16437,
2079,
1064,
9530,
8873,
2290,
1064,
1001,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package at.ac.tuwien.dsg.pm.resources;
import at.ac.tuwien.dsg.pm.PeerManager;
import at.ac.tuwien.dsg.pm.model.Collective;
import at.ac.tuwien.dsg.smartcom.model.CollectiveInfo;
import at.ac.tuwien.dsg.smartcom.model.Identifier;
import javax.inject.Inject;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.List;
/**
* @author Philipp Zeppezauer (philipp.zeppezauer@gmail.com)
* @version 1.0
*/
@Path("collectiveInfo")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class CollectiveInfoResource {
@Inject
private PeerManager manager;
@GET
@Path("/{id}")
public CollectiveInfo getCollectiveInfo(@PathParam("id") String id) {
Collective collective = manager.getCollective(id);
if (collective == null) {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build());
}
CollectiveInfo info = new CollectiveInfo();
info.setId(Identifier.collective(id));
info.setDeliveryPolicy(collective.getDeliveryPolicy());
List<Identifier> peers = new ArrayList<>(collective.getPeers().size());
for (String s : collective.getPeers()) {
peers.add(Identifier.peer(s));
}
info.setPeers(peers);
return info;
}
}
| PhilZeppe/CaaS | pm/src/main/java/at/ac/tuwien/dsg/pm/resources/CollectiveInfoResource.java | Java | apache-2.0 | 1,385 | [
30522,
7427,
2012,
1012,
9353,
1012,
10722,
9148,
2368,
1012,
16233,
2290,
1012,
7610,
1012,
4219,
1025,
12324,
2012,
1012,
9353,
1012,
10722,
9148,
2368,
1012,
16233,
2290,
1012,
7610,
1012,
8152,
24805,
4590,
1025,
12324,
2012,
1012,
9353... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
* {
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-text-size-adjust: none;
-webkit-touch-callout: none;
-webkit-font-smoothing: antialiased;
}
.progress {
background-color: #000;
height: 2px;
left: 0px;
position: fixed;
right: 0px;
top: 0px;
-webkit-transition: width 0.2s, opacity 0.4s;
transition: width 0.2s, opacity 0.4s;
width: 0%;
z-index: 999999;
}
html, body {
height: 100%;
}
body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
font-size: 15px;
letter-spacing: 0;
margin: 0;
overflow-x: hidden;
color: #000;
}
img {
max-width: 100%;
}
kbd {
display: inline-block;
padding: 3px 5px;
margin-bottom: 3px;
font-size: 12px !important;
line-height: 12px;
vertical-align: middle;
border: solid 1px #ccc;
border-radius: 3px;
}
/* navbar */
nav {
position: absolute;
right: 0;
left: 0;
z-index: 10;
margin: 25px 60px 0 0;
text-align: right;
}
nav p {
margin: 0;
}
nav ul, nav li {
list-style: none;
display: inline-block;
margin: 0;
}
nav a {
margin: 0 1em;
padding: 5px 0;
font-size: 16px;
text-decoration: none;
color: inherit;
-webkit-transition: color .3s;
transition: color .3s;
}
nav a:hover {
color: #000;
}
nav a.active {
color: #000;
border-bottom: 2px solid #000;
}
/* navbar dropdown */
nav li {
position: relative;
display: inline-block;
}
nav li ul {
background-color: rgba(255, 255, 255, 0.6);
border: 1px solid #000;
opacity: 0;
overflow: hidden;
padding: 0;
position: absolute;
right: 1em;
top: 26px;
-webkit-transform-origin: 100% 0%;
transform-origin: 100% 0%;
-webkit-transform: scale(1, 0);
transform: scale(1, 0);
-webkit-transition: opacity .4s ease-out, -webkit-transform .2s ease;
transition: opacity .4s ease-out, -webkit-transform .2s ease;
transition: opacity .4s ease-out, transform .2s ease;
transition: opacity .4s ease-out, transform .2s ease, -webkit-transform .2s ease;
-webkit-transition-delay: .3s;
transition-delay: .3s;
}
nav li ul li {
display: block;
font-size: 14px;
margin: 0;
padding: 4px 10px;
white-space: nowrap;
}
nav li ul a {
display: block;
margin: 0;
padding: 0;
}
nav li ul a.active {
border-bottom: 0;
}
nav li:hover ul {
opacity: 1;
-webkit-transform: scale(1, 1);
transform: scale(1, 1);
-webkit-transition: opacity .4s ease, -webkit-transform .2s ease-out;
transition: opacity .4s ease, -webkit-transform .2s ease-out;
transition: opacity .4s ease, transform .2s ease-out;
transition: opacity .4s ease, transform .2s ease-out, -webkit-transform .2s ease-out;
-webkit-transition-delay: 0;
transition-delay: 0;
}
nav.no-badge {
margin-right: 25px;
}
/* github corner */
.github-corner {
position: fixed;
top: 0;
right: 0;
z-index: 1;
text-decoration: none;
border-bottom: 0;
}
.github-corner svg {
color: #fff;
height: 80px;
width: 80px;
fill: #000;
}
.github-corner:hover .octo-arm {
-webkit-animation: octocat-wave 560ms ease-in-out;
animation: octocat-wave 560ms ease-in-out;
}
/* main */
main {
width: 100vw;
height: 100%;
position: relative;
}
.anchor {
text-decoration: none;
-webkit-transition: all .3s;
transition: all .3s;
display: inline-block;
}
.anchor span {
color: #000;
}
.anchor:hover {
text-decoration: underline;
}
/* sidebar */
.sidebar {
border-right: 1px solid rgba(0, 0, 0, .07);
overflow-y: auto;
padding: 40px 0;
top: 0;
bottom: 0;
left: 0;
position: absolute;
-webkit-transition: -webkit-transform 250ms ease-out;
transition: -webkit-transform 250ms ease-out;
transition: transform 250ms ease-out;
transition: transform 250ms ease-out, -webkit-transform 250ms ease-out;
width: 300px;
z-index: 20;
}
.sidebar ul {
margin: 0;
padding: 0;
}
.sidebar ul, .sidebar ul li {
list-style: none;
}
.sidebar ul li a {
display: block;
border-bottom: none;
}
.sidebar ul li ul {
padding-left: 20px;
}
/* sidebar toggle */
.sidebar-toggle {
background-color: transparent;
border: 0;
outline: none;
bottom: 0;
left: 0;
position: absolute;
text-align: center;
-webkit-transition: opacity .3s;
transition: opacity .3s;
width: 30px;
z-index: 30;
outline: none;
width: 284px;
padding: 10px;
background-color: rgba(255, 255, 255, 0.8);
}
.sidebar-toggle .sidebar-toggle-button:hover {
opacity: .4;
}
.sidebar-toggle span {
background-color: #000;
display: block;
width: 16px;
height: 2px;
margin-bottom: 4px;
}
body.sticky .sidebar, body.sticky .sidebar-toggle {
position: fixed;
}
/* main content */
.content {
top: 0;
right: 0;
bottom: 0;
left: 300px;
position: absolute;
padding-top: 20px;
-webkit-transition: left 250ms ease;
transition: left 250ms ease;
}
/* markdown content found on pages */
.markdown-section {
position: relative;
margin: 0 auto;
max-width: 800px;
padding: 20px 15px 40px 15px;
}
.markdown-section > * {
box-sizing: border-box;
font-size: inherit;
}
.markdown-section >:first-child {
margin-top: 0!important;
}
.markdown-section table {
display: block;
width: 100%;
overflow: auto;
border-spacing: 0;
border-collapse: collapse;
margin-bottom: 1em;
}
.markdown-section th {
font-weight: 700;
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-section td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-section tr {
border-top: 1px solid #ccc;
}
.markdown-section tr:nth-child(2n) {
background-color: #f8f8f8;
}
body.close .sidebar {
-webkit-transform: translateX(-300px);
transform: translateX(-300px);
}
body.close .sidebar-toggle {
width: auto;
}
body.close .content {
left: 0;
}
@media (max-width: 600px) {
.github-corner, .sidebar-toggle, .sidebar {
position: fixed;
}
nav {
margin-top: 16px;
}
nav li ul {
top: 30px;
}
main {
height: auto;
overflow-x: hidden;
}
.sidebar {
left: -300px;
-webkit-transition: -webkit-transform 250ms ease-out;
transition: -webkit-transform 250ms ease-out;
transition: transform 250ms ease-out;
transition: transform 250ms ease-out, -webkit-transform 250ms ease-out;
}
.content {
left: 0;
max-width: 100vw;
position: static;
-webkit-transition: -webkit-transform 250ms ease;
transition: -webkit-transform 250ms ease;
transition: transform 250ms ease;
transition: transform 250ms ease, -webkit-transform 250ms ease;
}
nav, .github-corner {
-webkit-transition: -webkit-transform 250ms ease-out;
transition: -webkit-transform 250ms ease-out;
transition: transform 250ms ease-out;
transition: transform 250ms ease-out, -webkit-transform 250ms ease-out;
}
.sidebar-toggle {
width: auto;
background-color: transparent;
}
body.close .sidebar {
-webkit-transform: translateX(300px);
transform: translateX(300px);
}
body.close .sidebar-toggle {
width: 284px;
background-color: rgba(255, 255, 255, 0.8);
-webkit-transition: 1s background-color;
transition: 1s background-color;
}
body.close .content {
-webkit-transform: translateX(300px);
transform: translateX(300px);
}
body.close nav, body.close .github-corner {
display: none;
}
.github-corner .octo-arm {
-webkit-animation: octocat-wave 560ms ease-in-out;
animation: octocat-wave 560ms ease-in-out;
}
.github-corner:hover .octo-arm {
-webkit-animation: none;
animation: none;
}
}
@-webkit-keyframes octocat-wave {
0%, 100% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
20%, 60% {
-webkit-transform: rotate(-25deg);
transform: rotate(-25deg);
}
40%, 80% {
-webkit-transform: rotate(10deg);
transform: rotate(10deg);
}
}
@keyframes octocat-wave {
0%, 100% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
20%, 60% {
-webkit-transform: rotate(-25deg);
transform: rotate(-25deg);
}
40%, 80% {
-webkit-transform: rotate(10deg);
transform: rotate(10deg);
}
}
| PeterDaveHello/jsdelivr | files/docsify/1.5.2/themes/pure.css | CSS | mit | 8,937 | [
30522,
1008,
1063,
3482,
1011,
30524,
3543,
1025,
1011,
4773,
23615,
1011,
11112,
1011,
12944,
1011,
3609,
1024,
1054,
18259,
2050,
1006,
1014,
1010,
1014,
1010,
1014,
1010,
1014,
1007,
1025,
1011,
4773,
23615,
1011,
3793,
1011,
2946,
1011,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using System;
using System.ComponentModel;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace Moen.KanColle.Dentan.ViewModel
{
public abstract class ViewModel<T> : ModelBase, IDisposable
where T : ModelBase
{
public T Model { get; private set; }
public IConnectableObservable<string> PropertyChangedObservable { get; private set; }
IDisposable r_Subscriptions;
protected ViewModel(T rpModel)
{
Model = rpModel;
PropertyChangedObservable = Observable.FromEventPattern<PropertyChangedEventHandler, PropertyChangedEventArgs>(
rpHandler => Model.PropertyChanged += rpHandler,
rpHandler => Model.PropertyChanged -= rpHandler)
.Select(r => r.EventArgs.PropertyName).Publish();
r_Subscriptions = PropertyChangedObservable.Connect();
}
public void Dispose()
{
r_Subscriptions.Dispose();
}
}
}
| KodamaSakuno/ProjectDentan | Dentan/ViewModel/ViewModel`T.cs | C# | mit | 1,000 | [
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6922,
5302,
9247,
1025,
2478,
2291,
1012,
22643,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
22643,
1012,
5739,
1025,
3415,
15327,
22078,
2078,
1012,
22827,
26895,
2063,
1012,
21418,
2319,
1012,
319... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
var CategoryLevel = function(){
'use strict';
var categorys = {};
this.addCategory = function(_name) {
categorys[_name] = [];
};
this.addDataToLastCategory = function(_categoryName, _lineData, _className) {
var category = categorys[_categoryName];
};
};
| russellmt/PortfolioProject | app/js/categoryLevel.js | JavaScript | mit | 298 | [
30522,
13075,
4696,
20414,
2884,
1027,
3853,
1006,
1007,
1063,
1005,
2224,
9384,
1005,
1025,
13075,
4696,
2015,
1027,
1063,
1065,
1025,
2023,
1012,
5587,
16280,
20255,
2100,
1027,
3853,
1006,
1035,
2171,
1007,
1063,
4696,
2015,
1031,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
declare(strict_types=1);
namespace Kerox\Messenger\Exception;
class InvalidOptionException extends MessengerException
{
}
| ker0x/messenger | src/Exception/InvalidOptionException.php | PHP | mit | 131 | [
30522,
1026,
1029,
25718,
13520,
1006,
9384,
1035,
4127,
1027,
1015,
1007,
1025,
3415,
15327,
17710,
3217,
2595,
1032,
11981,
1032,
6453,
1025,
2465,
19528,
7361,
3508,
10288,
24422,
8908,
11981,
10288,
24422,
1063,
1065,
102,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
(function () {
'use strict';
angular
.module('tables')
.config(routeConfig);
routeConfig.$inject = ['$stateProvider'];
function routeConfig($stateProvider) {
$stateProvider
.state('tables', {
abstract: true,
url: '/tables',
template: '<ui-view/>'
})
.state('tables.list', {
url: '',
templateUrl: 'modules/tables/client/views/list-tables.client.view.html',
controller: 'TablesListController',
controllerAs: 'vm',
data: {
pageTitle: 'Tables List'
}
})
.state('tables.create', {
url: '/create',
templateUrl: 'modules/tables/client/views/form-table.client.view.html',
controller: 'TablesController',
controllerAs: 'vm',
resolve: {
tableResolve: newTable
},
data: {
pageTitle : 'Tables Create'
}
})
.state('tables.edit', {
url: '/:tableId/edit',
templateUrl: 'modules/tables/client/views/form-table.client.view.html',
controller: 'TablesController',
controllerAs: 'vm',
resolve: {
tableResolve: getTable
},
data: {
roles: ['*'],
pageTitle: 'Edit Table {{ tableResolve.name }}'
}
})
.state('tables.view', {
url: '/:tableId',
templateUrl: 'modules/tables/client/views/view-table.client.view.html',
controller: 'TablesController',
controllerAs: 'vm',
resolve: {
tableResolve: getTable
},
data:{
pageTitle: 'Table {{ articleResolve.name }}'
}
});
}
getTable.$inject = ['$stateParams', 'TablesService'];
function getTable($stateParams, TablesService) {
return TablesService.get({
tableId: $stateParams.tableId
}).$promise;
}
newTable.$inject = ['TablesService'];
function newTable(TablesService) {
return new TablesService();
}
})();
| megatronv7/pos | modules/tables/client/config/tables.client.routes.js | JavaScript | mit | 1,997 | [
30522,
1006,
3853,
1006,
1007,
1063,
1005,
2224,
9384,
1005,
1025,
16108,
1012,
11336,
1006,
1005,
7251,
1005,
1007,
1012,
9530,
8873,
2290,
1006,
2799,
8663,
8873,
2290,
1007,
30524,
2290,
1006,
1002,
2110,
21572,
17258,
2121,
1007,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/*-------------------------------------------------------
*
* Plugin "miniMarket"
* Author: Stepanov Mark (nikto)
* Official site: http://altocms.ru/profile/nikto/
* Contact e-mail: markus1024@yandex.ru
*
---------------------------------------------------------
*/
class PluginMinimarket_ModuleGeo_EntityRegion extends PluginMinimarket_ModuleGeo_EntityGeo {
}
// EOF | ViktorZharina/auto-alto-971-cms | plugins/minimarket/classes/modules/geo/entity/Region.entity.class.php | PHP | mit | 391 | [
30522,
1026,
1029,
25718,
1013,
1008,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* Clipit Web Space
* PHP version: >= 5.2
* Creation date: 7/07/14
* Last update: 7/07/14
* @author Miguel Ángel Gutiérrez <magutierrezmoreno@gmail.com>, URJC Clipit Project
* @version $Version$
* @link http://clipit.es
* @license GNU Affero General Public License v3
* @package Clipit
*/
elgg_load_js("jquery:dynatable");
?>
<script>
$(function(){
$(document).on("change", "#tricky-topic", function(){
var content = $("#tricky_topic_view");
if($(this).val() == 0){
content.hide();
return false;
}
content.show().html('<i class="fa fa-spinner fa-spin blue"></i>');
$.ajax({
url: elgg.config.wwwroot+"ajax/view/tricky_topic/list",
type: "POST",
data: {
tricky_topic : $(this).val(),
show_tags: 'list'
},
success: function(html){
content.html(html);
}
});
});
$(document).on("click", "#save-tricky-topic", function(){
var container = $("#form-tricky-topic"),
form = container.find("#form-add-tricky-topic"),
form_data = elgg.security.addToken($.param(form.find(":input").serializeArray())).replace("?", "&");
if(!form.find(':input').valid()){
return false;
}
container.html($("<i class='fa fa-spinner fa-2x fa-spin blue'/>"));
elgg.action('tricky_topic/save', {
data: form_data,
success: function(json){
container.html(json.output)
container.find("option:selected").change();
}
});
});
$(document).on("click", "#add-tricky-topic", function(){
$(this).parent("div").toggleClass("hide");
$("#select-tricky-topic").toggle();
$("#form-add-tricky-topic").toggle().find("input:first").focus();
});
$(document).on("click", "#next_step", function(){
var form = $("#form-tricky-topic");
if(form.is(":visible")){
form.find("#save-tricky-topic").click();
}
});
// Advanced options
$('#input-activity-open').click(function(){
$('.grouping-mode').hide();
});
$('#input-activity-closed').click(function(){
$('.grouping-mode').show();
});
});
</script>
<style>
ul.ui-menu.ui-autocomplete{
background-color: #fff;
cursor: default;
font-size: 14px;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.2);
box-shadow: 0 6px 12px rgba(0,0,0,0.2);
padding: 3px;
max-width: 350px;
}
ul.ui-menu.ui-autocomplete li {
border-bottom: 1px solid #eee;
}
ul.ui-menu.ui-autocomplete li:last-child {
border-bottom: 0;
}
ul.ui-menu.ui-autocomplete li > a {
display: block;
padding: 3px;
padding-left: 10px;
font-weight: bold;
}
ul.ui-menu.ui-autocomplete li:hover > a, ul.ui-menu.ui-autocomplete li >a.ui-state-focus{
color: #fff;
text-decoration: none;
background: #32b4e5;
}
</style>
<script>
var datepicker_setup = function(){
var activity_form = $("#activity-create");
$(".activity-date").datepicker({
firstDay: 1,
minDate: activity_form.find("input[name=activity-start]").val(),
maxDate: activity_form.find("input[name=activity-end]").val(),
onClose: function (text, inst) {
$(activity_form
.find(".input-task-start, .input-task-end, input[name='activity-end']"))
.datepicker( "option", "minDate", activity_form.find("input[name=activity-start]").val());
if($(this).hasClass('input-task-start')){
var $task_end = $(this).closest('.task').find('.input-task-end'),
task_start_val = $(this).val();
$task_end.datepicker( "option", "minDate", task_start_val);
}
$(activity_form
.find(".input-task-start, .input-task-end, input[name='activity-start']"))
.datepicker( "option", "maxDate", activity_form.find("input[name=activity-end]").val() );
}
});
}
$(function(){
datepicker_setup();
$(".nav-steps li").on("click", function(e) {
e.preventDefault();
return false;
});
$(document).on("click", ".button_step, .nav-steps a",function(){
// Step 4 (Make groups) empty
$("#nav-step-4").hide();
$("#step_4").html('');
var step = $(this).data("step");
var current_step = parseInt($(".step:visible").attr("id").replace("step_", ""));
// is validated
if(($(this).attr("id") == 'next_step' || $(this).attr("id") == 'back_step') || step > current_step){
if(!$("#activity-create").valid()){
return false;
}
}
if(step > 0){
$(".nav-steps li").removeClass('disabled');
if(step == 2 && $('.task-list li').length == 0){
$("#add_task").click();
}
} else {
$(".nav-steps li").slice(2,4).addClass('disabled');
}
$(".nav-steps li").removeClass("active");
$("#nav-step-"+ step).parent("li").addClass("active");
$(this).closest(".container").find(".step").hide();
$("#step_"+ step).fadeIn();
});
$(window).bind('beforeunload', function(){
return '<?php echo elgg_echo('exit:page:confirmation');?>';
});
$(document).on("click", '#finish_setup', function(e){
if(!$("#activity-create").valid()){
return false;
}
$(window).unbind('beforeunload');
});
});
</script>
<div id="step_1" style="display: none;" class="row step">
<div class="col-md-6" id="form-tricky-topic">
<?php echo elgg_view("activity/create/tricky_topics");?>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="activity-title"><?php echo elgg_echo("activity:title");?></label>
<?php echo elgg_view("input/text", array(
'name' => 'activity-title',
'class' => 'form-control',
'autofocus' => true,
'required' => true
));
?>
</div>
<div class="row">
<div class="col-md-4">
<label for="activity-start"><?php echo elgg_echo("activity:start");?></label>
<?php echo elgg_view("input/text", array(
'name' => 'activity-start',
'class' => 'form-control datepicker activity-date',
'required' => true,
'data-rule-regex' => '(.{2})\/(.{2})\/(.{4})$',
'data-msg-regex' => 'dd/mm/yyyy',
));
?>
</div>
<div class="col-md-4">
<label for="activity-end"><?php echo elgg_echo("activity:end");?></label>
<?php echo elgg_view("input/text", array(
'name' => 'activity-end',
'class' => 'form-control datepicker activity-date',
'required' => true,
'data-rule-regex' => '(\w{2})\/(\w{2})\/(\w{4})$',
'data-msg-regex' => 'dd/mm/yyyy',
));
?>
</div>
</div>
<div class="form-group margin-top-10">
<label for="activity-description"><?php echo elgg_echo("description");?></label>
<?php echo elgg_view("input/plaintext", array(
'name' => 'activity-description',
'class' => 'form-control',
'required' => true,
'rows' => 6,
));
?>
</div>
<div>
<a data-toggle="collapse" href="#activity-advanced-options">
<strong><i class="fa fa-cog"></i> <?php echo elgg_echo('options:advanced');?></strong>
</a>
<div class="collapse margin-top-10" id="activity-advanced-options">
<?php echo elgg_view('forms/activity/admin/options');?>
</div>
</div>
</div>
<div class="col-md-12 text-right margin-top-20">
<hr>
<?php echo elgg_view('input/button', array(
'value' => elgg_echo('back'),
'data-step' => 0,
'id' => 'back_step',
'class' => "btn btn-primary btn-border-blue pull-left button_step",
));
?>
<?php echo elgg_view('input/button', array(
'value' => elgg_echo('next'),
'data-step' => 2,
'id' => 'next_step',
'class' => "btn btn-primary button_step",
));
?>
</div>
</div> | juxtalearn/clipit | mod/z04_clipit_activity/views/default/activity/create/step_1.php | PHP | agpl-3.0 | 8,949 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
12528,
4183,
4773,
2686,
1008,
25718,
2544,
1024,
1028,
1027,
1019,
1012,
1016,
1008,
4325,
3058,
1024,
1021,
1013,
5718,
1013,
2403,
1008,
2197,
10651,
1024,
1021,
1013,
5718,
1013,
2403,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html lang="ru" dir="ltr" class="client-nojs">
<head>
<link href='style.css' rel='stylesheet' type='text/css'/>
<meta charset="UTF-8" />
<title>LibreMoney API</title>
<style>a:lang(ar),a:lang(ckb),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}</style>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Nxt_API_ru skin-vector action-view vector-animateLayout">
<h2>LibreMoney</h2>
<h3>2. Основная часть</h3>
<h4>2.8. API (RestAPI)</h4>
<h2><span class="mw-headline" id=".D0.9E.D0.BF.D0.B5.D1.80.D0.B0.D1.86.D0.B8.D0.B8_.D1.81_.D1.82.D0.BE.D0.BA.D0.B5.D0.BD.D0.B0.D0.BC.D0.B8"><b>Операции с токенами</b></span></h2>
<h3><span class="mw-headline" id="Decode_Token"><b>Decode Token</b></span></h3>
<p>Декодирует токен авторизации. Используется для авторизации аккаунта на указанном веб-сайте, без необходимости передачи секретной фразы.
</p>
<h4><span class="mw-headline" id=".D0.97.D0.B0.D0.BF.D1.80.D0.BE.D1.81_49"><b>Запрос</b></span></h4>
<pre>http://localhost:1400/api?
requestType=decodeToken&
website=WEBSITE&
token=AUTHSTRING
</pre>
<p>Где:
</p>
<ul>
<li>WEBSITE — URL веб-сайта, где необходима авторизация по токену. По принятому соглашению не содержит часть "http://" URL'а.
</li>
<li>AUTHSTRING — закодированная строка авторизации
</li>
</ul>
<h4><span class="mw-headline" id=".D0.9E.D1.82.D0.B2.D0.B5.D1.82_37"><b>Ответ</b></span></h4>
<pre>
{
"account": "ACCOUNT",
"timestamp": TIME,
"valid": BOOLEAN
}
</pre>
<p>Где:
</p>
<ul>
<li>ACCOUNT — номер аккаунта LibreMoney, ассоциированный с токеном
</li>
<li>TIME — время в секундах начиная с о времени создания блока генезиса, определяющее время создания токена
</li>
<li>BOOLEAN — либо "true" (истина), либо "false" (ложь), показывает валиден ли токен
</li>
</ul>
<h4><span class="mw-headline" id=".D0.9F.D1.80.D0.B8.D0.BC.D0.B5.D1.80_47"><b>Пример</b></span></h4>
<p>Запрос:
</p>
<pre>http://localhost:1400/api?
requestType=decodeToken&
website=www.domain.com&
token=StringOf160Chars
</pre>
<p>Ответ:
</p>
<pre>
{
"account": "398532577100249608",
"timestamp": 622,
"valid": true
}
</pre>
<p><small><i>Проверено 18/05/14</i></small>
</p>
<h3><span class="mw-headline" id="Generate_Token"><b>Generate Token</b></span></h3>
<p>Создаёт токен (ключ) авторизации. Используется для авторизации аккаунта на определенном веб-сайте без необходимости передачи секретной фразы.
</p>
<h4><span class="mw-headline" id=".D0.97.D0.B0.D0.BF.D1.80.D0.BE.D1.81_50"><b>Запрос</b></span></h4>
<pre>http://localhost:1400/api?
requestType=generateToken&
secretPhrase=SECRET&
website=WEBSITE
</pre>
<p>Где:
</p>
<ul>
<li>SECRET - ключевая фраза (private key) аккаунта, который создаёт токен.
</li>
<li>WEBSITE - URL веб-сайта, на котором проходит авторизация. По соглашению не содержит часть "http://" URL'а.
</li>
</ul>
<h4><span class="mw-headline" id=".D0.9E.D1.82.D0.B2.D0.B5.D1.82_38"><b>Ответ</b></span></h4>
<pre>
{
"token": StringOf160Chars
}
</pre>
<h4><span class="mw-headline" id=".D0.9F.D1.80.D0.B8.D0.BC.D0.B5.D1.80_48"><b>Пример</b></span></h4>
<p>Запрос:
</p>
<pre>http://localhost:1400/api?
requestType=generateToken&
secretPhrase=ItWasABrightColdDayInAprilAndTheClocksWereStrikingThirteen&
website=www.genesisblock.com
</pre>
<p>Ответ:
</p>
<pre>
{
"token": "7dstcbs4fnbq614faea405ga3dj...etb0n9f0k6uvlku4d751kftqlb128t4"
}
</pre>
<p><small><i>Проверено 18/05/14</i></small>
</p>
</body>
</html>
| libremoney/main | Public/doc/LibreMoney-2.8.11-Api-Token.ru.html | HTML | cc0-1.0 | 4,432 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
11374,
1027,
1000,
21766,
1000,
16101,
1027,
1000,
8318,
2099,
1000,
2465,
1027,
1000,
7396,
1011,
2053,
22578,
1000,
1028,
1026,
2132,
1028,
1026,
4957,
17850,
12879,
1027,
1005,
280... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
-- Delete a product category and its products
DELETE FROM SalesLT.Product
WHERE ProductCategoryID =
(SELECT ProductCategoryID FROM SalesLT.ProductCategory WHERE Name = 'Bells and Horns');
DELETE FROM SalesLT.ProductCategory
WHERE ProductCategoryID =
(SELECT ProductCategoryID FROM SalesLT.ProductCategory WHERE Name = 'Bells and Horns'); | nebuchadnezer/QueryingT-SQL | Mod 09 - Modifying Data/Lab Solution/03 - Delete Products.sql | SQL | mit | 340 | [
30522,
1011,
1011,
3972,
12870,
1037,
4031,
4696,
1998,
2049,
3688,
3972,
12870,
2013,
4341,
7096,
1012,
4031,
2073,
4031,
16280,
20255,
10139,
2094,
1027,
1006,
7276,
4031,
16280,
20255,
10139,
2094,
2013,
4341,
7096,
1012,
4031,
16280,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_55) on Tue Dec 15 17:42:16 BRST 2015 -->
<title>R.id</title>
<meta name="date" content="2015-12-15">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="R.id";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/R.id.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.drawable.html" title="class in com.github.rtoshiro.example.fvvapplication"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.layout.html" title="class in com.github.rtoshiro.example.fvvapplication"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/github/rtoshiro/example/fvvapplication/R.id.html" target="_top">Frames</a></li>
<li><a href="R.id.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#methods_inherited_from_class_java.lang.Object">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.github.rtoshiro.example.fvvapplication</div>
<h2 title="Class R.id" class="title">Class R.id</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.github.rtoshiro.example.fvvapplication.R.id</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.html" title="class in com.github.rtoshiro.example.fvvapplication">R</a></dd>
</dl>
<hr>
<br>
<pre>public static final class <span class="strong">R.id</span>
extends java.lang.Object</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#action_settings">action_settings</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#rel_videocontrols">rel_videocontrols</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#textview">textview</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#vcv_img_fullscreen">vcv_img_fullscreen</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#vcv_img_play">vcv_img_play</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#vcv_seekbar">vcv_seekbar</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#vcv_txt_elapsed">vcv_txt_elapsed</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#vcv_txt_total">vcv_txt_total</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#videoview">videoview</a></strong></code> </td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.id.html#R.id()">R.id</a></strong>()</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="action_settings">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>action_settings</h4>
<pre>public static final int action_settings</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.action_settings">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="rel_videocontrols">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rel_videocontrols</h4>
<pre>public static final int rel_videocontrols</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.rel_videocontrols">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="textview">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>textview</h4>
<pre>public static final int textview</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.textview">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="vcv_img_fullscreen">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vcv_img_fullscreen</h4>
<pre>public static final int vcv_img_fullscreen</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.vcv_img_fullscreen">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="vcv_img_play">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vcv_img_play</h4>
<pre>public static final int vcv_img_play</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.vcv_img_play">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="vcv_seekbar">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vcv_seekbar</h4>
<pre>public static final int vcv_seekbar</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.vcv_seekbar">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="vcv_txt_elapsed">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vcv_txt_elapsed</h4>
<pre>public static final int vcv_txt_elapsed</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.vcv_txt_elapsed">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="vcv_txt_total">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vcv_txt_total</h4>
<pre>public static final int vcv_txt_total</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.vcv_txt_total">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="videoview">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>videoview</h4>
<pre>public static final int videoview</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.github.rtoshiro.example.fvvapplication.R.id.videoview">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="R.id()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>R.id</h4>
<pre>public R.id()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/R.id.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.drawable.html" title="class in com.github.rtoshiro.example.fvvapplication"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../com/github/rtoshiro/example/fvvapplication/R.layout.html" title="class in com.github.rtoshiro.example.fvvapplication"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/github/rtoshiro/example/fvvapplication/R.id.html" target="_top">Frames</a></li>
<li><a href="R.id.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#methods_inherited_from_class_java.lang.Object">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| rtoshiro/FullscreenVideoView | doc/com/github/rtoshiro/example/fvvapplication/R.id.html | HTML | apache-2.0 | 14,064 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
from simtk.openmm import app
import simtk.openmm as mm
from simtk import unit
def findForce(system, forcetype, add=True):
""" Finds a specific force in the system force list - added if not found."""
for force in system.getForces():
if isinstance(force, forcetype):
return force
if add==True:
system.addForce(forcetype())
return findForce(system, forcetype)
return None
def setGlobalForceParameter(force, key, value):
for i in range(force.getNumGlobalParameters()):
if force.getGlobalParameterName(i)==key:
print('setting force parameter', key, '=', value)
force.setGlobalParameterDefaultValue(i, value);
def atomIndexInResidue(residue):
""" list of atom index in residue """
index=[]
for a in list(residue.atoms()):
index.append(a.index)
return index
def getResiduePositions(residue, positions):
""" Returns array w. atomic positions of residue """
ndx = atomIndexInResidue(residue)
return np.array(positions)[ndx]
def uniquePairs(index):
""" list of unique, internal pairs """
return list(combinations( range(index[0],index[-1]+1),2 ) )
def addHarmonicConstraint(harmonicforce, pairlist, positions, threshold, k):
""" add harmonic bonds between pairs if distance is smaller than threshold """
print('Constraint force constant =', k)
for i,j in pairlist:
distance = unit.norm( positions[i]-positions[j] )
if distance<threshold:
harmonicforce.addBond( i,j,
distance.value_in_unit(unit.nanometer),
k.value_in_unit( unit.kilojoule/unit.nanometer**2/unit.mole ))
print("added harmonic bond between", i, j, 'with distance',distance)
def addExclusions(nonbondedforce, pairlist):
""" add nonbonded exclusions between pairs """
for i,j in pairlist:
nonbondedforce.addExclusion(i,j)
def rigidifyResidue(residue, harmonicforce, positions, nonbondedforce=None,
threshold=6.0*unit.angstrom, k=2500*unit.kilojoule/unit.nanometer**2/unit.mole):
""" make residue rigid by adding constraints and nonbonded exclusions """
index = atomIndexInResidue(residue)
pairlist = uniquePairs(index)
addHarmonicConstraint(harmonic, pairlist, pdb.positions, threshold, k)
if nonbondedforce is not None:
for i,j in pairlist:
print('added nonbonded exclusion between', i, j)
nonbonded.addExclusion(i,j)
| mlund/pyha | pyha/openmm.py | Python | mit | 2,333 | [
30522,
2013,
21934,
2102,
2243,
1012,
2330,
7382,
12324,
10439,
12324,
21934,
2102,
2243,
1012,
2330,
7382,
2004,
3461,
2013,
21934,
2102,
2243,
12324,
3131,
13366,
2424,
14821,
1006,
2291,
1010,
2486,
13874,
1010,
5587,
1027,
2995,
1007,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#ifndef CONFFILE_H
#define CONFFILE_H
#include "netstream.h"
void endpt_config_init(struct endpt_cfg * config);
int io_config_init(struct io_cfg * config, int nitems);
int endpt_config_set_item(struct endpt_cfg * config, char * key, char * value);
int parse_config_file(struct io_cfg * config, char * filename);
void print_config(struct io_cfg * cfg);
int check_config(struct io_cfg * config);
#endif
| xtompok/netstream | conffile.h | C | mit | 405 | [
30522,
1001,
2065,
13629,
2546,
9530,
26989,
2571,
30524,
13876,
1035,
9530,
8873,
2290,
1035,
1999,
4183,
1006,
2358,
6820,
6593,
2203,
13876,
1035,
12935,
2290,
1008,
9530,
8873,
2290,
1007,
1025,
20014,
22834,
1035,
9530,
8873,
2290,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
// security check - must be included in all scripts
if (!$GLOBALS['kewl_entry_point_run']){
die("You cannot view this page directly");
}
/**
*
* Data access class for hellokinky module. This class
* extends dbTable to access the table tbl_hellokinky
* @author Acquim Matuli-Bulimwengu
* @copyright (c) 2005 GNU GPL
* @version 1.0
*
*/
class dbfb_questions extends dbtable
{
/**
*
* Standard init method to define table and instantiate
* common objects.
*/
function init()
{
//Set the table in the parent class
parent::init('tbl_feedback_questions');
$this->table = 'tbl_feedback_questions';
}
/* This function gets feedback questions from the database
* All the questions in the database are to be returned
*/
function get_questions(){
$arr = array();
$query = 'SELECT * FROM '.$this->table;
//echo $query;
$arr = $this->getArray($query);
$quesitons = $arr;
//for($i = 0; $i < count($quesitons); $i++){
//echo ($i+1)." question ".$questions[$i]['fb_question']."<br/>";
//}
return $arr;
}
public function delete_question($question_id){
$this->delete('puid', $question_id);
}
//This functions saves a single row to the database
function save_questions($row){
$objUser = $this->getObject('user', 'security');
$userid = $objUser->userId();
$row['modified'] = $this->now();
$row['userid'] = $objUser->userId();
// echo "and userid value is".$row['userid'];
if ($row['puid'] == null){//new question and it must be inserted
$this->insert($row);
}
else {// existing and it is being updated
$this->update('puid', $row['puid'], $row);
}
}
public function get_table(){
return $this->table;
}
}
?>
| chisimba/modules | feedback/classes/dbfb_questions_class_inc.php | PHP | gpl-2.0 | 1,986 | [
30522,
1026,
1029,
25718,
1013,
1013,
3036,
4638,
1011,
2442,
2022,
2443,
1999,
2035,
14546,
2065,
1006,
999,
1002,
3795,
2015,
1031,
1005,
17710,
13668,
1035,
4443,
1035,
2391,
1035,
2448,
1005,
1033,
1007,
1063,
3280,
1006,
1000,
2017,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Log$
* Revision 1.8 2004/12/06 11:55:37 cargilld
* Rename parameter named exception to get rid of warning msgs.
*
* Revision 1.7 2004/09/08 13:55:32 peiyongz
* Apache License Version 2.0
*
* Revision 1.6 2002/11/05 21:46:19 tng
* Explicit code using namespace in application.
*
* Revision 1.5 2002/11/04 15:23:03 tng
* C++ Namespace Support.
*
* Revision 1.4 2002/02/01 22:37:14 peiyongz
* sane_include
*
* Revision 1.3 2000/03/02 19:53:42 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.2 2000/02/06 07:47:19 rahulj
* Year 2K copyright swat.
*
* Revision 1.1.1.1 1999/11/09 01:09:50 twl
* Initial checkin
*
* Revision 1.6 1999/11/08 20:43:37 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/sax/HandlerBase.hpp>
XERCES_CPP_NAMESPACE_USE
XERCES_CPP_NAMESPACE_BEGIN
class AttributeList;
XERCES_CPP_NAMESPACE_END
class MemParseHandlers : public HandlerBase
{
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
MemParseHandlers();
~MemParseHandlers();
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
unsigned int getElementCount()
{
return fElementCount;
}
unsigned int getAttrCount()
{
return fAttrCount;
}
unsigned int getCharacterCount()
{
return fCharacterCount;
}
unsigned int getSpaceCount()
{
return fSpaceCount;
}
// -----------------------------------------------------------------------
// Handlers for the SAX DocumentHandler interface
// -----------------------------------------------------------------------
void startElement(const XMLCh* const name, AttributeList& attributes);
void characters(const XMLCh* const chars, const unsigned int length);
void ignorableWhitespace(const XMLCh* const chars, const unsigned int length);
void resetDocument();
// -----------------------------------------------------------------------
// Handlers for the SAX ErrorHandler interface
// -----------------------------------------------------------------------
void warning(const SAXParseException& exc);
void error(const SAXParseException& exc);
void fatalError(const SAXParseException& exc);
private:
// -----------------------------------------------------------------------
// Private data members
//
// fAttrCount
// fCharacterCount
// fElementCount
// fSpaceCount
// These are just counters that are run upwards based on the input
// from the document handlers.
// -----------------------------------------------------------------------
unsigned int fAttrCount;
unsigned int fCharacterCount;
unsigned int fElementCount;
unsigned int fSpaceCount;
};
| xin3liang/platform_external_xerces-cpp | samples/MemParse/MemParseHandlers.hpp | C++ | apache-2.0 | 4,187 | [
30522,
1013,
1008,
1008,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
2030,
2062,
1008,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
5500,
2007,
1008,
2023,
2147,
2005,
3176,
2592,
4953,
9385,
6095,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
local _, ns = ...
local oUF = ns.oUF
local VISIBLE = 1
local HIDDEN = 0
local wipe = wipe
local pcall = pcall
local floor = floor
local unpack = unpack
local tinsert = tinsert
local infinity = math.huge
local _G = _G
local GetTime = GetTime
local UnitAura = UnitAura
local CreateFrame = CreateFrame
local UnitIsUnit = UnitIsUnit
local UnitIsEnemy = UnitIsEnemy
local UnitReaction = UnitReaction
local GameTooltip = GameTooltip
local LCD = oUF.isClassic and LibStub('LibClassicDurations', true)
local DAY, HOUR, MINUTE = 86400, 3600, 60
local function FormatTime(s)
if s == infinity then return end
if s < MINUTE then
return '%.1fs', s
elseif s < HOUR then
return '%dm %ds', s/60%60, s%60
elseif s < DAY then
return '%dh %dm', s/(60*60), s/60%60
else
return '%dd %dh', s/DAY, (s / HOUR) - (floor(s/DAY) * 24)
end
end
local function onEnter(self)
if GameTooltip:IsForbidden() or not self:IsVisible() then return end
GameTooltip:SetOwner(self, self.tooltipAnchor)
GameTooltip:SetUnitAura(self.unit, self.index, self.filter)
end
local function onLeave()
if GameTooltip:IsForbidden() then return end
GameTooltip:Hide()
end
local function onUpdate(bar, elapsed)
bar.elapsed = (bar.elapsed or 0) + elapsed
if bar.elapsed > 0.01 then
local remain = bar.expiration - GetTime()
bar:SetValue(remain / bar.duration)
bar.timeText:SetFormattedText(FormatTime(remain))
bar.elapsed = 0
end
end
local function createAuraBar(element, index)
local bar = CreateFrame('StatusBar', element:GetName() .. 'StatusBar' .. index, element)
bar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
bar:SetMinMaxValues(0, 1)
bar.tooltipAnchor = element.tooltipAnchor
bar:SetScript('OnEnter', onEnter)
bar:SetScript('OnLeave', onLeave)
bar:EnableMouse(false)
local spark = bar:CreateTexture(nil, "OVERLAY", nil);
spark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
spark:SetWidth(12)
spark:SetBlendMode("ADD")
spark:SetPoint('CENTER', bar:GetStatusBarTexture(), 'RIGHT')
local icon = bar:CreateTexture(nil, 'ARTWORK')
icon:SetPoint('RIGHT', bar, 'LEFT', -element.barSpacing, 0)
icon:SetSize(element.height, element.height)
local nameText = bar:CreateFontString(nil, 'OVERLAY', 'NumberFontNormal')
nameText:SetPoint('LEFT', bar, 'LEFT', 2, 0)
local timeText = bar:CreateFontString(nil, 'OVERLAY', 'NumberFontNormal')
timeText:SetPoint('RIGHT', bar, 'RIGHT', -2, 0)
bar.icon = icon
bar.spark = spark
bar.nameText = nameText
bar.timeText = timeText
bar.__owner = element
if(element.PostCreateBar) then element:PostCreateBar(bar) end
return bar
end
local function customFilter(element, unit, button, name)
if (element.onlyShowPlayer and button.isPlayer) or (not element.onlyShowPlayer and name) then
return true
end
end
local function updateBar(element, bar)
if bar.count > 1 then
bar.nameText:SetFormattedText('[%d] %s', bar.count, bar.spell)
else
bar.nameText:SetText(bar.spell)
end
if not bar.noTime and element.sparkEnabled then
bar.spark:Show()
else
bar.spark:Hide()
end
local r, g, b = .2, .6, 1
local debuffType = bar.debuffType
if element.buffColor then r, g, b = unpack(element.buffColor) end
if bar.filter == 'HARMFUL' then
if not debuffType or debuffType == '' then
debuffType = 'none'
end
local color = _G.DebuffTypeColor[debuffType]
r, g, b = color.r, color.g, color.b
end
bar.icon:SetTexture(bar.texture)
bar.icon:SetSize(element.height, element.height)
bar:SetStatusBarColor(r, g, b)
bar:SetSize(element.width, element.height)
bar:EnableMouse(not element.disableMouse)
bar:SetID(bar.index)
bar:Show()
if element.PostUpdateBar then
element:PostUpdateBar(bar.unit, bar, bar.index, bar.position, bar.duration, bar.expiration, debuffType, bar.isStealable)
end
end
local function updateAura(element, unit, index, offset, filter, isDebuff, visible)
local name, texture, count, debuffType, duration, expiration, source, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, effect1, effect2, effect3
if LCD and not UnitIsUnit('player', unit) then
local durationNew, expirationTimeNew
name, texture, count, debuffType, duration, expiration, source, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, effect1, effect2, effect3 = LCD:UnitAura(unit, index, filter)
if spellID then
durationNew, expirationTimeNew = LCD:GetAuraDurationByUnit(unit, spellID, source, name)
end
if durationNew and durationNew > 0 then
duration, expiration = durationNew, expirationTimeNew
end
else
name, texture, count, debuffType, duration, expiration, source, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, effect1, effect2, effect3 = UnitAura(unit, index, filter)
end
if not name then return end
local position = visible + offset + 1
local bar = element[position]
if not bar then
bar = (element.CreateBar or createAuraBar) (element, position)
tinsert(element, bar)
element.createdBars = element.createdBars + 1
end
element.active[position] = bar
bar.unit = unit
bar.count = count
bar.index = index
bar.caster = source
bar.filter = filter
bar.texture = texture
bar.isDebuff = isDebuff
bar.debuffType = debuffType
bar.isStealable = isStealable
bar.isPlayer = source == 'player' or source == 'vehicle'
bar.position = position
bar.duration = duration
bar.expiration = expiration
bar.spellID = spellID
bar.spell = name
bar.noTime = (duration == 0 and expiration == 0)
local show = (element.CustomFilter or customFilter) (element, unit, bar, name, texture,
count, debuffType, duration, expiration, source, isStealable, nameplateShowPersonal, spellID,
canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, effect1, effect2, effect3)
updateBar(element, bar)
bar:SetScript('OnUpdate', not bar.noTime and onUpdate or nil)
return show and VISIBLE or HIDDEN
end
local function SetPosition(element, from, to)
local height = element.height
local spacing = element.spacing
local anchor = element.initialAnchor
local barSpacing = element.barSpacing
local growth = element.growth == 'DOWN' and -1 or 1
for i = from, to do
local bar = element.active[i]
if not bar then break end
bar:ClearAllPoints()
bar:SetPoint(anchor, element, anchor, barSpacing, (i == 1 and 0) or (growth * ((i - 1) * (height + spacing))))
if bar.noTime then
bar:SetValue(1)
bar.timeText:SetText()
end
end
end
local function filterBars(element, unit, filter, limit, isDebuff, offset, dontHide)
if(not offset) then offset = 0 end
local index = 1
local visible = 0
local hidden = 0
while(visible < limit) do
local result = updateAura(element, unit, index, offset, filter, isDebuff, visible)
if(not result) then
break
elseif(result == VISIBLE) then
visible = visible + 1
elseif(result == HIDDEN) then
hidden = hidden + 1
end
index = index + 1
end
if(not dontHide) then
for i = visible + offset + 1, #element do
element[i]:Hide()
end
end
return visible, hidden
end
local function UpdateAuras(self, event, unit)
if(self.unit ~= unit) then return end
local element = self.AuraBars
if(element) then
if(element.PreUpdate) then element:PreUpdate(unit) end
wipe(element.active)
local isEnemy = UnitIsEnemy(unit, 'player')
local reaction = UnitReaction(unit, 'player')
local filter = (not isEnemy and (not reaction or reaction > 4) and (element.friendlyAuraType or 'HELPFUL')) or element.enemyAuraType or 'HARMFUL'
local visibleAuras = filterBars(element, unit, filter, element.maxBars, filter == 'HARMFUL', 0)
element.visibleAuras = visibleAuras
local fromRange, toRange
if(element.PreSetPosition) then
fromRange, toRange = element:PreSetPosition(element.maxBars)
end
if(fromRange or element.createdBars > element.anchoredBars) then
(element.SetPosition or SetPosition) (element, fromRange or element.anchoredBars + 1, toRange or element.createdBars)
element.anchoredBars = element.createdBars
end
if(element.PostUpdate) then element:PostUpdate(unit) end
end
end
local function Update(self, event, unit)
if(self.unit ~= unit) then return end
UpdateAuras(self, event, unit)
-- Assume no event means someone wants to re-anchor things. This is usually
-- done by UpdateAllElements and :ForceUpdate.
if(event == 'ForceUpdate' or not event) then
local element = self.AuraBars
if(element) then
(element.SetPosition or SetPosition) (element, 1, element.createdBars)
end
end
end
local function ForceUpdate(element)
return Update(element.__owner, 'ForceUpdate', element.__owner.unit)
end
local function Enable(self)
local element = self.AuraBars
if(element) then
oUF:RegisterEvent(self, 'UNIT_AURA', UpdateAuras)
element.__owner = self
element.ForceUpdate = ForceUpdate
element.active = {}
element.anchoredBars = 0
element.createdBars = element.createdBars or 0
element.width = element.width or 240
element.height = element.height or 12
element.sparkEnabled = element.sparkEnabled or true
element.spacing = element.spacing or 2
element.initialAnchor = element.initialAnchor or 'BOTTOMLEFT'
element.growth = element.growth or 'UP'
element.maxBars = element.maxBars or 32
element.barSpacing = element.barSpacing or 2
-- Avoid parenting GameTooltip to frames with anchoring restrictions,
-- otherwise it'll inherit said restrictions which will cause issues
-- with its further positioning, clamping, etc
if(not pcall(self.GetCenter, self)) then
element.tooltipAnchor = 'ANCHOR_CURSOR'
else
element.tooltipAnchor = element.tooltipAnchor or 'ANCHOR_BOTTOMRIGHT'
end
element:Show()
return true
end
end
local function Disable(self)
local element = self.AuraBars
if(element) then
oUF:UnregisterEvent(self, 'UNIT_AURA', UpdateAuras)
element:Hide()
end
end
oUF:AddElement('AuraBars', Update, Enable, Disable)
| qyh214/wow_addons_private_use | AddOns/ElvUI/Libraries/Core/oUF_Plugins/oUF_AuraBars.lua | Lua | gpl-3.0 | 10,018 | [
30522,
2334,
1035,
1010,
24978,
1027,
1012,
1012,
1012,
2334,
15068,
2546,
1027,
24978,
1012,
15068,
2546,
2334,
5710,
1027,
1015,
2334,
5023,
1027,
1014,
2334,
13387,
1027,
13387,
2334,
7473,
8095,
1027,
7473,
8095,
2334,
2723,
1027,
2723,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* \brief UART LOG component
* \author Christian Helmuth
* \date 2011-05-30
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _UART_COMPONENT_H_
#define _UART_COMPONENT_H_
/* Genode includes */
#include <base/rpc_server.h>
#include <util/arg_string.h>
#include <os/session_policy.h>
#include <os/attached_ram_dataspace.h>
#include <root/component.h>
#include <uart_session/uart_session.h>
/* local includes */
#include "uart_driver.h"
namespace Uart {
using namespace Genode;
class Session_component : public Rpc_object<Uart::Session,
Session_component>
{
private:
/*
* XXX Do not use hard-coded value, better make it dependent
* on the RAM quota donated by the client.
*/
enum { IO_BUFFER_SIZE = 4096 };
Genode::Attached_ram_dataspace _io_buffer;
/**
* Functor informing the client about new data to read
*/
struct Char_avail_callback : Uart::Char_avail_callback
{
Genode::Signal_context_capability sigh;
void operator ()()
{
if (sigh.valid())
Genode::Signal_transmitter(sigh).submit();
}
} _char_avail_callback;
Uart::Driver_factory &_driver_factory;
Uart::Driver &_driver;
Size _size;
unsigned char _poll_char()
{
while (!_driver.char_avail());
return _driver.get_char();
}
void _put_string(char const *s)
{
for (; *s; s++)
_driver.put_char(*s);
}
/**
* Read ASCII number from UART
*
* \return character that terminates the sequence of digits
*/
unsigned char _read_number(unsigned &result)
{
result = 0;
for (;;) {
unsigned char c = _poll_char();
if (!is_digit(c))
return c;
result = result*10 + digit(c);
}
}
/**
* Try to detect the size of the terminal
*/
Size _detect_size()
{
/*
* Set cursor position to (hopefully) exceed the terminal
* dimensions.
*/
_put_string("\033[1;199r\033[199;255H");
/* flush incoming characters */
for (; _driver.char_avail(); _driver.get_char());
/* request cursor coordinates */
_put_string("\033[6n");
unsigned width = 0, height = 0;
if (_poll_char() == 27
&& _poll_char() == '['
&& _read_number(height) == ';'
&& _read_number(width) == 'R') {
PINF("detected terminal size %dx%d", width, height);
return Size(width, height);
}
return Size(0, 0);
}
public:
/**
* Constructor
*/
Session_component(Uart::Driver_factory &driver_factory,
unsigned index, unsigned baudrate, bool detect_size)
:
_io_buffer(Genode::env()->ram_session(), IO_BUFFER_SIZE),
_driver_factory(driver_factory),
_driver(*_driver_factory.create(index, baudrate, _char_avail_callback)),
_size(detect_size ? _detect_size() : Size(0, 0))
{ }
/****************************
** Uart session interface **
****************************/
void baud_rate(Genode::size_t bits_per_second)
{
_driver.baud_rate(bits_per_second);
}
/********************************
** Terminal session interface **
********************************/
Size size() { return _size; }
bool avail() { return _driver.char_avail(); }
Genode::size_t _read(Genode::size_t dst_len)
{
char *io_buf = _io_buffer.local_addr<char>();
Genode::size_t sz = Genode::min(dst_len, _io_buffer.size());
Genode::size_t n = 0;
while ((n < sz) && _driver.char_avail())
io_buf[n++] = _driver.get_char();
return n;
}
void _write(Genode::size_t num_bytes)
{
/* constain argument to I/O buffer size */
num_bytes = Genode::min(num_bytes, _io_buffer.size());
char const *io_buf = _io_buffer.local_addr<char>();
for (Genode::size_t i = 0; i < num_bytes; i++)
_driver.put_char(io_buf[i]);
}
Genode::Dataspace_capability _dataspace()
{
return _io_buffer.cap();
}
void connected_sigh(Genode::Signal_context_capability sigh)
{
/*
* Immediately reflect connection-established signal to the
* client because the session is ready to use immediately after
* creation.
*/
Genode::Signal_transmitter(sigh).submit();
}
void read_avail_sigh(Genode::Signal_context_capability sigh)
{
_char_avail_callback.sigh = sigh;
if (_driver.char_avail())
_char_avail_callback();
}
Genode::size_t read(void *, Genode::size_t) { return 0; }
Genode::size_t write(void const *, Genode::size_t) { return 0; }
};
typedef Root_component<Session_component, Multiple_clients> Root_component;
class Root : public Root_component
{
private:
Driver_factory &_driver_factory;
protected:
Session_component *_create_session(const char *args)
{
try {
Session_policy policy(args);
unsigned index = 0;
policy.attribute("uart").value(&index);
unsigned baudrate = 0;
try {
policy.attribute("baudrate").value(&baudrate);
} catch (Xml_node::Nonexistent_attribute) { }
bool detect_size = false;
try {
detect_size = policy.attribute("detect_size").has_value("yes");
} catch (Xml_node::Nonexistent_attribute) { }
return new (md_alloc())
Session_component(_driver_factory, index, baudrate, detect_size);
} catch (Xml_node::Nonexistent_attribute) {
PERR("Missing \"uart\" attribute in policy definition");
throw Root::Unavailable();
} catch (Session_policy::No_policy_defined) {
PERR("Invalid session request, no matching policy");
throw Root::Unavailable();
}
}
public:
/**
* Constructor
*/
Root(Rpc_entrypoint *ep, Allocator *md_alloc, Driver_factory &driver_factory)
:
Root_component(ep, md_alloc), _driver_factory(driver_factory)
{ }
};
}
#endif /* _UART_COMPONENT_H_ */
| m-stein/genode | os/src/drivers/uart/uart_component.h | C | gpl-2.0 | 6,030 | [
30522,
1013,
1008,
1008,
1032,
4766,
25423,
5339,
8833,
6922,
1008,
1032,
3166,
3017,
24515,
2232,
1008,
1032,
3058,
2249,
1011,
5709,
1011,
2382,
1008,
1013,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2249,
1011,
2286,
8991,
10244,
13625,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* glFusion CMS
*
* UTF-8 Language File for Calendar Plugin
*
* @license GNU General Public License version 2 or later
* http://www.opensource.org/licenses/gpl-license.php
*
* Copyright (C) 2008-2018 by the following authors:
* Mark R. Evans mark AT glfusion DOT org
*
* Based on prior work Copyright (C) 2001-2005 by the following authors:
* Tony Bibbs - tony AT tonybibbs DOT com
* Trinity Bays - trinity93 AT gmail DOT com
*
*/
if (!defined ('GVERSION')) {
die ('This file cannot be used on its own.');
}
global $LANG32;
###############################################################################
# Array Format:
# $LANGXX[YY]: $LANG - variable name
# XX - file id number
# YY - phrase id number
###############################################################################
# index.php
$LANG_CAL_1 = array(
1 => 'Tapahtumakalenteri',
2 => 'Ei tapahtumia.',
3 => 'Milloin',
4 => 'Juuri',
5 => 'Kuvaus',
6 => 'Lisää tapahtuma',
7 => 'Tulevat tapahtumat',
8 => 'Lisäämällä tämän taphtuman kalenteriisi, näet nopeasti ne tapahtumat jotka sinua kiinnostaa klikkaamalla "Oma Kalenteri" käyttäjän toiminnot alueella.',
9 => 'Lisää minun jalenteriin',
10 => 'Poista minun kalenterista',
11 => 'Lisätään tapahtuma %s\'s Kalenteriin',
12 => 'Tapahtuma',
13 => 'Alkaa',
14 => 'Loppuu',
15 => 'Takaisin kalenteriin',
16 => 'Kalenteri',
17 => 'Aloituspäivä',
18 => 'Lopetuspäivä',
19 => 'kalenteriin lähetetyt',
20 => 'Otsikko',
21 => 'Alkamis päivä',
22 => 'URL',
23 => 'Sinun tapahtumat',
24 => 'Sivuston tapahtumat',
25 => 'Ei tulevia tapahtumia',
26 => 'Lähetä tapahtuma',
27 => "Lähetetään tapahtuma {$_CONF['site_name']} laitaa tapahtuman pääkalenteriin josta käyttäjät voi lisätä heidän omaan kalenteriin. Tämä toiminto <b>EI</b> ole tarkoitettu henkilökohtaisiin tapahtumiin kuten syntymäpäivät yms tapahtumat.<br><br>Kun olet lähettänyt tapahtumasi, se lähetetään ylläpitoon ja jos se hyväksytään, tapahtumasai ilmestyy pääkalenteriin.",
28 => 'Otsikko',
29 => 'Päättymis aika',
30 => 'Alamis aika',
31 => 'Kokopäivän tapahtuma',
32 => 'Osoiterivi 1',
33 => 'Osoiterivi 2',
34 => 'Kaupunki',
35 => 'Osavaltio',
36 => 'Postinumero',
37 => 'Tapahtuman tyyppi',
38 => 'Muokkaa tapahtuma tyyppejä',
39 => 'Sijainti',
40 => 'Lisää tapahtuma kohteeseen',
41 => 'Pääkalenteri',
42 => 'Henkilökohtainen kalenteri',
43 => 'Linkki',
44 => 'HTML koodit eivät ole sallittu',
45 => 'Lähetä',
46 => 'Tapahtumat systeemissä',
47 => 'Top kymmenen tapahtumat',
48 => 'Lukukertoja',
49 => 'Näyttää siltä että tällä sivustolla ei ole tapahtumia, tai kukaan ei ole klikannut niitä.',
50 => 'Tapahtumat',
51 => 'Poista',
52 => 'Lähetti',
53 => 'Calendar View',
);
$_LANG_CAL_SEARCH = array(
'results' => 'Kalenteri tulokset',
'title' => 'Otsikko',
'date_time' => 'Päivä & Aika',
'location' => 'Sijainti',
'description' => 'Kuvaus'
);
###############################################################################
# calendar.php ($LANG30)
$LANG_CAL_2 = array(
8 => 'Lisää oma tapahtuma',
9 => '%s Tapahtuma',
10 => 'Tapahtumat ',
11 => 'Pääkalenteri',
12 => 'Oma kalenteri',
25 => 'Takaisin ',
26 => 'Koko päivän',
27 => 'Viikko',
28 => 'Oma kalenteri kohteelle',
29 => ' Julkinen kalenteri',
30 => 'poista tapahtuma',
31 => 'Lisää',
32 => 'Tapahtuma',
33 => 'Päivä',
34 => 'Aika',
35 => 'Nopea lisäys',
36 => 'Lähetä',
37 => 'Oma kalenteri toiminto ei ole käytössä',
38 => 'Oma tapahtuma muokkaus',
39 => 'Päivä',
40 => 'Viikko',
41 => 'Kuukausi',
42 => 'Lisää päätapahtuma',
43 => 'Lähetetyt tapahtumat'
);
###############################################################################
# admin/plugins/calendar/index.php, formerly admin/event.php ($LANG22)
$LANG_CAL_ADMIN = array(
1 => 'Tapahtuma Muokkaus',
2 => 'Virhe',
3 => 'Viestin muoto',
4 => 'Tapahtuman URL',
5 => 'Tapahtuman alkamispäivä',
6 => 'Tapahtuman päättymispäivä',
7 => 'Tapahtuman sijainti',
8 => 'Kuvaus tapahtumasta',
9 => '(mukaanlukien http://)',
10 => 'Sinun täytyy antaa päivä/aika, tapahtuman otsikko, ja kuvaus tapahtumasta',
11 => 'Kalenteri hallinta',
12 => 'Muokataksesi tai poistaaksesi tapahtuman, klikkaa tapahtuman edit ikonia alhaalla. Uuden tapahtuman luodaksesi klikkaa "Luo uusi" ylhäältä. Klikkaa kopioi ikonia kopioidaksesi olemassaolevan tapahtuman.',
13 => 'Omistaja',
14 => 'Alkamispäivä',
15 => 'Päättymispäivä',
16 => '',
17 => "Yrität päästä tapahtumaan johon sinulla ei ole pääsy oikeutta. Tämä yrtitys kirjattiin. <a href=\"{$_CONF['site_admin_url']}/plugins/calendar/index.php\">mene takaisin tapahtuman hallintaan</a>.",
18 => '',
19 => '',
20 => 'tallenna',
21 => 'peruuta',
22 => 'poista',
23 => 'Epäkelpo Alkamis Päivä.',
24 => 'Epäkelpo päättymis Päivä.',
25 => 'Päättymispäivä On Aikaisemmin Kuin Alkamispäivä.',
26 => 'Batch Event Manager',
27 => 'Tässä ovat kaikki tapahtumat jotka ovat vanhempia kuin ',
28 => ' kuukautta. Päivitä aikaväli halutuksi, ja klikkaa Päivitä Lista. valitse yksi tai useampia tapahtumia tuloksista, ja klikkaa poista Ikonia alla poistaaksesi nämä tapahtumat. Vain tapahtumat jotka näkyy tällä sivulla ja on listattu, poistetaan.',
29 => '',
30 => 'Päivitä Lista',
31 => 'Oletko varma että haluat poistaa kaikki valitut käyttäjät?',
32 => 'Listaa kaikki',
33 => 'Yhtään tapahtumaa ei valittu poistettavaksi',
34 => 'Tapahtuman ID',
35 => 'ei voitu poistaa',
36 => 'Poistettu',
37 => 'Moderoi Tapahtumaa',
38 => 'Batch tapahtuma Admin',
39 => 'Tapahtuman Admin',
40 => 'Event List',
41 => 'This screen allows you to edit / create events. Edit the fields below and save.',
);
$LANG_CAL_AUTOTAG = array(
'desc_calendar' => 'Link: to a Calendar event on this site; link_text defaults to event title: [calendar:<i>event_id</i> {link_text}]',
);
$LANG_CAL_MESSAGE = array(
'save' => 'tapahtuma Tallennettu.',
'delete' => 'Tapahtuma Poistettu.',
'private' => 'Tapahtuma Tallennettu Kalenteriisi',
'login' => 'Kalenteriasi ei voi avata ennenkuin olet kirjautunut',
'removed' => 'tapahtuma poistettu kalenteristasi',
'noprivate' => 'Valitamme, mutta henkilökohtaiset kalenterit ei ole sallittu tällä hetkellä',
'unauth' => 'Sinulla ei ole oikeuksia tapahtuman ylläpito sivulle. Kaikki yritykset kirjataan',
'delete_confirm' => 'Oletko varma että haluat poistaa tämän tapahtuman?'
);
$PLG_calendar_MESSAGE4 = "Kiitos lähettämistä tapahtuman {$_CONF['site_name']}. On toimitettu henkilökuntamme hyväksyttäväksi. Jos hyväksytään, tapahtuma nähdään täällä, meidän <a href=\"{$_CONF['site_url']}/calendar/index.php\">kalenteri</a> jaksossa.";
$PLG_calendar_MESSAGE17 = 'Tapahtuma Tallennettu.';
$PLG_calendar_MESSAGE18 = 'Tapahtuma Poistettu.';
$PLG_calendar_MESSAGE24 = 'Tapahtuma Tallennettu Kalenteriisi.';
$PLG_calendar_MESSAGE26 = 'Tapahtuma Poistettu.';
// Messages for the plugin upgrade
$PLG_calendar_MESSAGE3001 = 'Plugin päivitys ei tueta.';
$PLG_calendar_MESSAGE3002 = $LANG32[9];
// Localization of the Admin Configuration UI
$LANG_configsections['calendar'] = array(
'label' => 'Kalenteri',
'title' => 'Kalenteri Asetukset'
);
$LANG_confignames['calendar'] = array(
'calendarloginrequired' => 'Kalenteri Kirjautuminen Vaaditaan',
'hidecalendarmenu' => 'Piiloita Kalenteri Valikossa',
'personalcalendars' => 'Salli Henkilökohtaiset Kalenterit',
'eventsubmission' => 'Ota Käyttöön Lähetys Jono',
'showupcomingevents' => 'Näytä Tulevat Tapahtumat',
'upcomingeventsrange' => 'Tulevien Tapahtumien Aikaväli',
'event_types' => 'Tapahtuma Tyypit',
'hour_mode' => 'Tunti Moodi',
'notification' => 'Sähköposti Ilmoitus',
'delete_event' => 'Poista Tapahtumalta Omistaja',
'aftersave' => 'Tapahtuman Tallennuksen Jälkeen',
'default_permissions' => 'Tapahtuman Oletus Oikeudet',
'only_admin_submit' => 'Salli Vain Admineitten Lähettää',
'displayblocks' => 'Näytä glFusion Lohkot',
);
$LANG_configsubgroups['calendar'] = array(
'sg_main' => 'Pää Asetukset'
);
$LANG_fs['calendar'] = array(
'fs_main' => 'Yleiset Kalenteri Asetukset',
'fs_permissions' => 'Oletus Oikeudet'
);
$LANG_configSelect['calendar'] = array(
0 => array(1=> 'True', 0 => 'False'),
1 => array(true => 'True', false => 'False'),
6 => array(12 => '12', 24 => '24'),
9 => array('item'=>'Forward to Event', 'list'=>'Display Admin List', 'plugin'=>'Display Calendar', 'home'=>'Display Home', 'admin'=>'Display Admin'),
12 => array(0=>'No access', 2=>'Vain luku', 3=>'Read-Write'),
13 => array(0=>'Left Blocks', 1=>'Right Blocks', 2=>'Left & Right Blocks', 3=>'Ei yhtään')
);
?>
| glFusion/glfusion | private/plugins/calendar/language/finnish_utf-8.php | PHP | gpl-2.0 | 9,331 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
1043,
10270,
14499,
4642,
2015,
1008,
1008,
21183,
2546,
1011,
1022,
2653,
5371,
2005,
8094,
13354,
2378,
1008,
1008,
1030,
6105,
27004,
2236,
2270,
6105,
2544,
1016,
2030,
2101,
1008,
8299,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
namespace Baskerville.Services
{
using System.Collections.Generic;
using System.Linq;
using Data.Contracts.Repository;
using Models.DataModels;
using Models.ViewModels;
using AutoMapper;
using System.Web.Mvc;
using System.Data.Entity;
using System.Net;
using Contracts;
public class ProductsService : Service, IProductService
{
public ProductsService(IDbContext context)
: base(context)
{
}
public ProductViewModel GetProduct(int id)
{
var product = this.Products
.GetAll()
.Include("Category")
.FirstOrDefault(p => !p.IsRemoved && p.Id == id);
if (product == null)
return null;
var model = Mapper.Map<Product, ProductViewModel>(product);
if (product.Category.IsPrimary)
model.PrimaryCategoryId = (int)product.CategoryId;
else
{
model.PrimaryCategoryId = (int)product.Category.PrimaryCategoryId;
model.SubcategoryId = (int)product.CategoryId;
}
model.PrimaryCategories = this.GetPrimaryCategories();
model.Subcategories = this.GetSubCategories((int)model.PrimaryCategoryId);
return model;
}
public IEnumerable<ProductViewModel> GetAllProducts()
{
var productViewModels = this.Products
.Find(p => !p.IsRemoved)
.Select(Mapper.Map<Product, ProductViewModel>).ToList();
return productViewModels;
}
public ProductViewModel GetEmptyProduct()
{
var productViewModel = new ProductViewModel();
productViewModel.PrimaryCategories = this.GetPrimaryCategories();
return productViewModel;
}
public void CreateProduct(ProductViewModel model)
{
var product = Mapper.Map<ProductViewModel, Product>(model);
if (model.SubcategoryId != null)
product.CategoryId = model.SubcategoryId;
else
product.CategoryId = model.PrimaryCategoryId;
this.Products.Insert(product);
}
public void RemoveProduct(int id)
{
var product = this.Products.GetById(id);
product.IsRemoved = true;
this.Products.Update(product);
}
public HttpStatusCode UpdatePublicity(int id)
{
var product = this.Products.GetById(id);
if (product == null)
return HttpStatusCode.NotFound;
product.IsPublic = !product.IsPublic;
this.Products.Update(product);
return HttpStatusCode.OK;
}
public void UpdateProduct(ProductViewModel model)
{
var product = this.Products.GetById(model.Id);
Mapper.Map(model, product);
if (model.SubcategoryId != null)
product.CategoryId = model.SubcategoryId;
else
product.CategoryId = model.PrimaryCategoryId;
this.Products.Update(product);
}
public IEnumerable<ProductCategory> GetPrimaryCategories()
{
return this.Categoires.Find(c => c.IsPrimary).ToList();
}
public IEnumerable<SelectListItem> GetSubCategories(int categoryId)
{
List<SelectListItem> selectedCategories = new List<SelectListItem>();
IDictionary<string, string> categoriesDict = new Dictionary<string, string>();
var subCategories = this.Categoires.Find(c => c.PrimaryCategoryId == categoryId);
foreach (var subCategory in subCategories)
{
selectedCategories.Add(new SelectListItem() { Text = subCategory.NameBg, Value = subCategory.Id.ToString() });
}
return selectedCategories;
}
}
}
| MarioZisov/Baskerville | BaskervilleWebsite/Baskerville.Services/ProductsService.cs | C# | apache-2.0 | 3,979 | [
30522,
3415,
15327,
19021,
5484,
3077,
1012,
2578,
1063,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2951,
1012,
8311,
1012,
22409,
1025,
2478,
4275,
1012,
2951,
5302,
9247,
2015,
1025,
2478,
4275,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*! CSS Mount | (c) 2016 @thenneken | https://github.com/TheW1zzard/css-mount */
/* =============================
* grid
* =============================*/
/* =============================
* breakpoints
* =============================*/
/* =============================
* space
* =============================*/
/* =============================
* font
* =============================*/
/* =============================
* colors
* =============================*/
.col-md-1 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 8.33333%; }
.col-md-2 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 16.66667%; }
.col-md-3 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 25%; }
.col-md-4 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 33.33333%; }
.col-md-5 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 41.66667%; }
.col-md-6 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 50%; }
.col-md-7 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 58.33333%; }
.col-md-8 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 66.66667%; }
.col-md-9 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 75%; }
.col-md-10 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 83.33333%; }
.col-md-11 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 91.66667%; }
.col-md-12 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 100%; }
.col-md-offset-left-0 {
margin-left: 0%; }
.col-md-offset-left-1 {
margin-left: 8.33333%; }
.col-md-offset-left-2 {
margin-left: 16.66667%; }
.col-md-offset-left-3 {
margin-left: 25%; }
.col-md-offset-left-4 {
margin-left: 33.33333%; }
.col-md-offset-left-5 {
margin-left: 41.66667%; }
.col-md-offset-left-6 {
margin-left: 50%; }
.col-md-offset-left-7 {
margin-left: 58.33333%; }
.col-md-offset-left-8 {
margin-left: 66.66667%; }
.col-md-offset-left-9 {
margin-left: 75%; }
.col-md-offset-left-10 {
margin-left: 83.33333%; }
.col-md-offset-left-11 {
margin-left: 91.66667%; }
.col-md-offset-right-0 {
margin-right: 0%; }
.col-md-offset-right-1 {
margin-right: 8.33333%; }
.col-md-offset-right-2 {
margin-right: 16.66667%; }
.col-md-offset-right-3 {
margin-right: 25%; }
.col-md-offset-right-4 {
margin-right: 33.33333%; }
.col-md-offset-right-5 {
margin-right: 41.66667%; }
.col-md-offset-right-6 {
margin-right: 50%; }
.col-md-offset-right-7 {
margin-right: 58.33333%; }
.col-md-offset-right-8 {
margin-right: 66.66667%; }
.col-md-offset-right-9 {
margin-right: 75%; }
.col-md-offset-right-10 {
margin-right: 83.33333%; }
.col-md-offset-right-11 {
margin-right: 91.66667%; }
@media all and (max-width: 1024px) {
.col-sm-1 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 8.33333%; }
.col-sm-2 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 16.66667%; }
.col-sm-3 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 25%; }
.col-sm-4 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 33.33333%; }
.col-sm-5 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 41.66667%; }
.col-sm-6 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 50%; }
.col-sm-7 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 58.33333%; }
.col-sm-8 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 66.66667%; }
.col-sm-9 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 75%; }
.col-sm-10 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 83.33333%; }
.col-sm-11 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 91.66667%; }
.col-sm-12 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 100%; }
.col-sm-offset-left-0 {
margin-left: 0%; }
.col-sm-offset-left-1 {
margin-left: 8.33333%; }
.col-sm-offset-left-2 {
margin-left: 16.66667%; }
.col-sm-offset-left-3 {
margin-left: 25%; }
.col-sm-offset-left-4 {
margin-left: 33.33333%; }
.col-sm-offset-left-5 {
margin-left: 41.66667%; }
.col-sm-offset-left-6 {
margin-left: 50%; }
.col-sm-offset-left-7 {
margin-left: 58.33333%; }
.col-sm-offset-left-8 {
margin-left: 66.66667%; }
.col-sm-offset-left-9 {
margin-left: 75%; }
.col-sm-offset-left-10 {
margin-left: 83.33333%; }
.col-sm-offset-left-11 {
margin-left: 91.66667%; }
.col-sm-offset-right-0 {
margin-right: 0%; }
.col-sm-offset-right-1 {
margin-right: 8.33333%; }
.col-sm-offset-right-2 {
margin-right: 16.66667%; }
.col-sm-offset-right-3 {
margin-right: 25%; }
.col-sm-offset-right-4 {
margin-right: 33.33333%; }
.col-sm-offset-right-5 {
margin-right: 41.66667%; }
.col-sm-offset-right-6 {
margin-right: 50%; }
.col-sm-offset-right-7 {
margin-right: 58.33333%; }
.col-sm-offset-right-8 {
margin-right: 66.66667%; }
.col-sm-offset-right-9 {
margin-right: 75%; }
.col-sm-offset-right-10 {
margin-right: 83.33333%; }
.col-sm-offset-right-11 {
margin-right: 91.66667%; } }
@media all and (max-width: 640px) {
.col-md-1 {
width: 100%; }
.col-md-offset-left-1 {
margin-left: 0; }
.col-md-offset-right-1 {
margin-right: 0; }
.col-md-2 {
width: 100%; }
.col-md-offset-left-2 {
margin-left: 0; }
.col-md-offset-right-2 {
margin-right: 0; }
.col-md-3 {
width: 100%; }
.col-md-offset-left-3 {
margin-left: 0; }
.col-md-offset-right-3 {
margin-right: 0; }
.col-md-4 {
width: 100%; }
.col-md-offset-left-4 {
margin-left: 0; }
.col-md-offset-right-4 {
margin-right: 0; }
.col-md-5 {
width: 100%; }
.col-md-offset-left-5 {
margin-left: 0; }
.col-md-offset-right-5 {
margin-right: 0; }
.col-md-6 {
width: 100%; }
.col-md-offset-left-6 {
margin-left: 0; }
.col-md-offset-right-6 {
margin-right: 0; }
.col-md-7 {
width: 100%; }
.col-md-offset-left-7 {
margin-left: 0; }
.col-md-offset-right-7 {
margin-right: 0; }
.col-md-8 {
width: 100%; }
.col-md-offset-left-8 {
margin-left: 0; }
.col-md-offset-right-8 {
margin-right: 0; }
.col-md-9 {
width: 100%; }
.col-md-offset-left-9 {
margin-left: 0; }
.col-md-offset-right-9 {
margin-right: 0; }
.col-md-10 {
width: 100%; }
.col-md-offset-left-10 {
margin-left: 0; }
.col-md-offset-right-10 {
margin-right: 0; }
.col-md-11 {
width: 100%; }
.col-md-offset-left-11 {
margin-left: 0; }
.col-md-offset-right-11 {
margin-right: 0; }
.col-md-12 {
width: 100%; }
.col-md-offset-left-12 {
margin-left: 0; }
.col-md-offset-right-12 {
margin-right: 0; }
.col-xs-1 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 8.33333%; }
.col-xs-2 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 16.66667%; }
.col-xs-3 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 25%; }
.col-xs-4 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 33.33333%; }
.col-xs-5 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 41.66667%; }
.col-xs-6 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 50%; }
.col-xs-7 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 58.33333%; }
.col-xs-8 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 66.66667%; }
.col-xs-9 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 75%; }
.col-xs-10 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 83.33333%; }
.col-xs-11 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 91.66667%; }
.col-xs-12 {
float: left;
padding-left: 10px;
padding-right: 10px;
width: 100%; }
.col-xs-offset-left-0 {
margin-left: 0%; }
.col-xs-offset-left-1 {
margin-left: 8.33333%; }
.col-xs-offset-left-2 {
margin-left: 16.66667%; }
.col-xs-offset-left-3 {
margin-left: 25%; }
.col-xs-offset-left-4 {
margin-left: 33.33333%; }
.col-xs-offset-left-5 {
margin-left: 41.66667%; }
.col-xs-offset-left-6 {
margin-left: 50%; }
.col-xs-offset-left-7 {
margin-left: 58.33333%; }
.col-xs-offset-left-8 {
margin-left: 66.66667%; }
.col-xs-offset-left-9 {
margin-left: 75%; }
.col-xs-offset-left-10 {
margin-left: 83.33333%; }
.col-xs-offset-left-11 {
margin-left: 91.66667%; }
.col-xs-offset-right-0 {
margin-right: 0%; }
.col-xs-offset-right-1 {
margin-right: 8.33333%; }
.col-xs-offset-right-2 {
margin-right: 16.66667%; }
.col-xs-offset-right-3 {
margin-right: 25%; }
.col-xs-offset-right-4 {
margin-right: 33.33333%; }
.col-xs-offset-right-5 {
margin-right: 41.66667%; }
.col-xs-offset-right-6 {
margin-right: 50%; }
.col-xs-offset-right-7 {
margin-right: 58.33333%; }
.col-xs-offset-right-8 {
margin-right: 66.66667%; }
.col-xs-offset-right-9 {
margin-right: 75%; }
.col-xs-offset-right-10 {
margin-right: 83.33333%; }
.col-xs-offset-right-11 {
margin-right: 91.66667%; } }
/* =============================
* base
* =============================*/
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%; }
body {
margin: 0;
font-size: 14px;
line-height: 1.45;
color: #3a3a3a;
background-color: #fff; }
section {
width: 100%;
overflow: hidden; }
.title {
margin: 0px;
padding: 10px;
float: left;
text-transform: uppercase; }
.text-center {
text-align: center; }
/* =============================
* row
* =============================*/
.row {
width: 100%;
overflow: hidden;
padding-left: 10px;
padding-right: 10px; }
/* =============================
* container
* =============================*/
.container {
width: 940px;
overflow: hidden;
margin-right: auto;
margin-left: auto;
padding-left: 10px;
padding-right: 10px; }
@media all and (max-width: 1024px) {
.container {
width: 600px; } }
@media all and (max-width: 640px) {
.container {
width: auto;
max-width: 480px; } }
/* =============================
* lists
* =============================*/
ul {
margin: 10px 0;
padding: 0 0 0 25px; }
/* =============================
* alignment
* =============================*/
.container.-vertical-center, .row.-vertical-center {
position: absolute;
top: 50%;
transform: translateY(-50%); }
/* =============================
* links
* =============================*/
a {
color: #3a3a3a;
text-decoration: underline; }
a.btn {
text-decoration: none; }
a:active, a:hover {
outline: 0; }
/* =============================
* image
* =============================*/
img {
border: 0; }
.filled-bg {
background-repeat: no-repeat;
background-size: cover;
background-position: center; }
.filled-bg.-attch-fixed {
background-attachment: fixed; }
/* =============================
* hr
* =============================*/
hr {
border: 1px solid rgba(0, 0, 0, 0.35); }
/* =============================
* footer
* =============================*/
footer {
color: #fff;
padding: 5px 0px;
background-color: #3a3a3a; }
.btn {
display: inline-block;
padding: 10px 25px;
margin-bottom: 0;
line-height: 1.45;
text-align: center;
white-space: nowrap;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: transparent;
border: 1px solid rgba(0, 0, 0, 0.35);
border-radius: 2px; }
.btn:hover {
border: 1px solid rgba(0, 0, 0, 0.8); }
.btn.-right {
float: right; }
.btn.-alt {
border: 0;
background-color: rgba(255, 255, 255, 0.6); }
.btn.-alt:hover {
background-color: rgba(255, 255, 255, 0.8); }
.form-group {
margin-bottom: 20px;
border-left: 2px solid #ddd;
padding-left: 10px; }
label {
display: inline-block;
font-weight: bold;
max-width: 100%;
margin-bottom: 5px; }
.textfield, .selectfield {
display: block;
width: 100%;
font-size: 14px;
color: #3a3a3a;
height: 40px;
line-height: 1.45;
padding: 10px 15px;
background-color: #fff;
background-image: none;
border: 1px solid #ddd;
border-radius: 2px; }
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
border-radius: 0;
font-size: 1em;
width: 100%; }
button, input {
overflow: visible; }
button:focus, input:focus {
outline: 0; }
input, textarea, keygen, select, button {
font-family: sans-serif;
font-size: 14px; }
.navigation {
float: right; }
.navigation ul {
margin: 10px 20px;
padding: 0; }
.navigation ul li {
margin: 0;
padding: 0;
position: relative;
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block; }
.navigation ul li > ul {
display: none;
margin: 0;
padding: 0;
background-color: #fff;
position: absolute;
left: 50%;
transform: translateX(-50%); }
.navigation ul li > ul li {
padding: 0 10px;
width: 100%;
text-align: center; }
.navigation ul li > ul li:first-child {
padding: 10px 10px 0 10px; }
.navigation ul li > ul li:last-child {
padding: 0 10px 10px 10px; }
.navigation ul li:hover ul {
display: block; }
.navigation a {
padding: 10px 30px;
display: block;
text-decoration: none;
text-transform: uppercase; }
.navigation a:hover {
padding: 10px 30px 8px 30px;
border-bottom: 2px solid #ddd; }
@media all and (max-width: 640px) {
.navigation {
float: none; }
.navigation ul li {
width: 100%;
text-align: center; }
.navigation ul li > ul {
display: block;
position: relative; } }
.table {
width: 100%;
max-width: 100%;
margin-bottom: 10px;
border-spacing: 0;
border-collapse: collapse;
border-top: 0; }
.table tr, .table td, .table th {
padding: 10px;
line-height: 1.45;
vertical-align: top;
border-top: 1px solid #ddd; }
.table > tbody > tr:first-child td, .table tr:first-child {
border-top: 0; }
.table > thead > tr > th {
vertical-align: bottom;
border-top: 0;
border-bottom: 2px solid #ddd; }
th {
text-align: left; }
.thumbnail {
position: relative;
display: block;
padding: 5px;
margin: 0 0 10px 0;
background-color: transparent;
border: 1px solid rgba(0, 0, 0, 0.35);
border-radius: 2px; }
.thumbnail > img {
width: 100%; }
.thumbnail .cap {
padding: 10px; }
/*# sourceMappingURL=css-mount.css.map */
| TheW1zzard/css-mount | css-mount.css | CSS | mit | 15,312 | [
30522,
1013,
1008,
999,
20116,
2015,
4057,
1064,
1006,
1039,
1007,
2355,
1030,
2059,
2638,
7520,
1064,
16770,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
1996,
2860,
2487,
20715,
4103,
1013,
20116,
2015,
1011,
4057,
1008,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/bin/bash
if [ -n "$debug" ] ; then
set -x
fi
SRCDIR="$1"
BASE_OUTPUT="$2"
pushd "$SRCDIR" > /dev/null
function header
{
local title="$1"
local breadcrumb="$2"
local output="$3"
cat - > $output <<EOF
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>$title</title>
<style>
* { margin: 0; padding: 0; }
body { font-family: sans-serif; font-size: 12px; }
#head { padding: 20px; background: #00A500; }
#head a { color: #000; }
#body { padding: 20px; }
#foot { padding: 10px; font-size: 9px; border-top: 1px #18A303 solid; margin-top: 25px; }
p { line-height: 1.7em; margin-bottom: 1em; }
pre { margin-bottom: 0.5em; }
.multi-col { -moz-column-width: 20em; -webkit-column-width: 20em; -moz-column-gap: 1em; -webkit-column-gap: 1em; }
h1 { margin-bottom: 0.5em; }
h2,h3,h4 { margin: 1.3em 0 0.5em 0; }
ul, ol { margin: 0.5em 1.5em; }
</style>
</head>
<body>
<div id="head">
<h1>${title}</h1>
<p>${breadcrumb}</p>
</div>
<div id="body" style="multi-col">
EOF
}
function footer
{
local output="$1"
cat - >> $output <<EOF
</div>
<div id="foot">
<small>
<p>Generated by Libreoffice CI on $(hostname)</p>
<p>Last updated:
EOF
date '+%F %T' >> $output
cat - >> $output <<EOF
| <a href="http://www.documentfoundation.org/privacy">Privacy Policy</a> | <a href="http://www.documentfoundation.org/imprint">Impressum (Legal Info)</a>
</p>
</small>
</div>
</body>
</html>
EOF
}
function proc_text
{
# Local links: [[...]]
# Git links: [git:...]
# Other remote links: [...]
# Headings: == bleh ==
# Paragraphs: \n\n
sed -re ' s/\[\[([-_a-zA-Z0-9]+)\]\]/<a href="\1.html">\1<\/a>/g' - \
| sed -re ' s/\[git:([^]]+)\]/<a href="http:\/\/cgit.freedesktop.org\/libreoffice\/core\/tree\/\1">\1<\/a>/g' \
| sed -re ' s/\[([^]]+)\]/<a href="\1">\1<\/a>/g' \
| sed -re ' s/====([^=]+)====/<h4>\1<\/h4>/g' \
| sed -re ' s/===([^=]+)===/<h3>\1<\/h3>/g' \
| sed -re ' s/==([^=]+)==/<h2>\1<\/h2>/g' \
| sed -re ':a;N;$!ba;s/\n\n/<\/p><p>/g' \
| awk 'BEGIN { print "<p>" } { print } END { print "</p>" }'
}
# generate entry page
echo "generating index page"
header "LibreOffice Modules" " " "$BASE_OUTPUT/index.html"
for module_name in *; do
if [ -d $module_name ]; then
cur_file=
if [ -f $module_name/readme.txt ] ; then
cur_file="$module_name/readme.txt"
elif [ -f $module_name/README ] ; then
cur_file="$module_name/README"
fi
if [ -n "$cur_file" ]; then
# write index.html entry
text="<h2><a href=\"${module_name}.html\">${module_name}</a></h2>\n"
text="${text}$(head -n1 $cur_file | proc_text )"
echo -e $text >> "$BASE_OUTPUT/index.html"
# write detailed module content
header "$module_name" "<a href=\"index.html\">LibreOffice</a> » ${module_name}" "$BASE_OUTPUT/${module_name}.html"
text="<p><b>View module in:</b>"
text="${text} <a href=\"http://cgit.freedesktop.org/libreoffice/core/tree/${module_name}\">cgit</a>"
if [ -d ./docs/${module_name} ] ; then
text="${text} <a href=\"${module_name}/html/classes.html\">Doxygen</a>"
fi
text="${text} </p><p> </p>"
echo -e $text >> "$BASE_OUTPUT/${module_name}.html"
proc_text < $cur_file >> "$BASE_OUTPUT/${module_name}.html"
footer "$BASE_OUTPUT/${module_name}.html"
else
empty_modules[${#empty_modules[*]}]=$module_name
fi
fi
done
if [ ${#empty_modules[*]} -gt 0 ]; then
echo -e "<p> </p><p>READMEs were not available for these modules:</p><ul>\n" >> "$BASE_OUTPUT/index.html"
for module_name in "${empty_modules[@]}"; do
echo -e "<li><a href=\"http://cgit.freedesktop.org/libreoffice/core/tree/${module_name}\">${module_name}</a></li>\n" >> "$BASE_OUTPUT/index.html"
done
echo -e "</ul>\n" >> "$BASE_OUTPUT/index.html"
fi
footer "$BASE_OUTPUT/index.html"
popd > /dev/null
## done
| beppec56/core | solenv/bin/mkdocs_portal.sh | Shell | gpl-3.0 | 4,265 | [
30522,
1001,
999,
1013,
8026,
1013,
24234,
2065,
1031,
1011,
1050,
1000,
1002,
2139,
8569,
2290,
1000,
1033,
1025,
2059,
2275,
1011,
1060,
10882,
5034,
19797,
4313,
1027,
1000,
1002,
1015,
1000,
2918,
1035,
6434,
1027,
1000,
1002,
1016,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ site.description }}">
<meta name="keyword" content="{{ site.keyword }}">
<link rel="shortcut icon" href="{{ site.baseurl }}/img/favicon.ico">
<title>{% if page.title %}{{ page.title }} - {{ site.SEOTitle }}{% else %}{{ site.SEOTitle }}{% endif %}</title>
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}">
<!-- Custom CSS -->
<link rel="stylesheet" href="{{ "/css/hux-blog.min.css" | prepend: site.baseurl }}">
<!-- Pygments Github CSS -->
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl }}">
<!-- Custom Fonts -->
<!-- <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
<!-- Hux change font-awesome CDN to qiniu -->
<link href="http://cdn.staticfile.org/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- Hux Delete, sad but pending in China
<link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/
css'>
-->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- ga & ba script hoook -->
<script></script>
</head>
| ablozhou/ablozhou.github.io | _includes/head.html | HTML | cc0-1.0 | 2,232 | [
30522,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
1060,
1011,
25423,
1011,
11892,
1000,
4180,
1027,
1000,
29464,
1027,
3341,
1000,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Indosasa glabrata C.D.Chu & C.S.Chao SPECIES
#### Status
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | mdoering/backbone | life/Plantae/Magnoliophyta/Liliopsida/Poales/Poaceae/Indosasa/Indosasa glabrata/README.md | Markdown | apache-2.0 | 194 | [
30522,
1001,
11424,
20939,
2050,
1043,
20470,
14660,
1039,
1012,
1040,
1012,
14684,
1004,
1039,
1012,
1055,
1012,
22455,
2427,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
1996,
10161,
1997,
2166,
1010,
3822,
2254... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
A modal view for handling user logins
@class LoginView
@extends Discourse.ModalBodyView
@namespace Discourse
@module Discourse
**/
Discourse.LoginView = Discourse.ModalBodyView.extend({
templateName: 'modal/login',
siteBinding: 'Discourse.site',
title: Em.String.i18n('login.title'),
authenticate: null,
loggingIn: false,
showView: function(view) {
return this.get('controller').show(view);
},
newAccount: function() {
return this.showView(Discourse.CreateAccountView.create());
},
forgotPassword: function() {
return this.showView(Discourse.ForgotPasswordView.create());
},
loginButtonText: (function() {
if (this.get('loggingIn')) {
return Em.String.i18n('login.logging_in');
}
return Em.String.i18n('login.title');
}).property('loggingIn'),
loginDisabled: (function() {
if (this.get('loggingIn')) {
return true;
}
if (this.blank('loginName') || this.blank('loginPassword')) {
return true;
}
return false;
}).property('loginName', 'loginPassword', 'loggingIn'),
login: function() {
var _this = this;
this.set('loggingIn', true);
$.post("/session", {
login: this.get('loginName'),
password: this.get('loginPassword')
}).success(function(result) {
if (result.error) {
_this.set('loggingIn', false);
if( result.reason === 'not_activated' ) {
return _this.showView(Discourse.NotActivatedView.create({username: _this.get('loginName'), sentTo: result.sent_to_email, currentEmail: result.current_email}));
}
_this.flash(result.error, 'error');
} else {
return window.location.reload();
}
}).fail(function(result) {
_this.flash(Em.String.i18n('login.error'), 'error');
return _this.set('loggingIn', false);
});
return false;
},
authMessage: (function() {
if (this.blank('authenticate')) {
return "";
}
return Em.String.i18n("login." + (this.get('authenticate')) + ".message");
}).property('authenticate'),
twitterLogin: function() {
var left, top;
this.set('authenticate', 'twitter');
left = this.get('lastX') - 400;
top = this.get('lastY') - 200;
return window.open("/auth/twitter", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top);
},
facebookLogin: function() {
var left, top;
this.set('authenticate', 'facebook');
left = this.get('lastX') - 400;
top = this.get('lastY') - 200;
return window.open("/auth/facebook", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top);
},
openidLogin: function(provider) {
var left, top;
left = this.get('lastX') - 400;
top = this.get('lastY') - 200;
if (provider === "yahoo") {
this.set("authenticate", 'yahoo');
return window.open("/auth/yahoo", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top);
} else {
window.open("/auth/google", "_blank", "menubar=no,status=no,height=500,width=850,left=" + left + ",top=" + top);
return this.set("authenticate", 'google');
}
},
githubLogin: function() {
var left, top;
this.set('authenticate', 'github');
left = this.get('lastX') - 400;
top = this.get('lastY') - 200;
return window.open("/auth/github", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top);
},
personaLogin: function() {
navigator.id.request();
},
authenticationComplete: function(options) {
if (options.awaiting_approval) {
this.flash(Em.String.i18n('login.awaiting_approval'), 'success');
this.set('authenticate', null);
return;
}
if (options.awaiting_activation) {
this.flash(Em.String.i18n('login.awaiting_confirmation'), 'success');
this.set('authenticate', null);
return;
}
// Reload the page if we're authenticated
if (options.authenticated) {
window.location.reload();
return;
}
return this.showView(Discourse.CreateAccountView.create({
accountEmail: options.email,
accountUsername: options.username,
accountName: options.name,
authOptions: Em.Object.create(options)
}));
},
mouseMove: function(e) {
this.set('lastX', e.screenX);
return this.set('lastY', e.screenY);
},
didInsertElement: function(e) {
var _this = this;
return Em.run.next(function() {
return $('#login-account-password').keydown(function(e) {
if (e.keyCode === 13) {
return _this.login();
}
});
});
}
});
| SuperSonicDesignINC/FXDD | app/assets/javascripts/discourse/views/modal/login_view.js | JavaScript | gpl-2.0 | 4,631 | [
30522,
1013,
1008,
1008,
1037,
16913,
2389,
3193,
2005,
8304,
5310,
8833,
7076,
1030,
2465,
8833,
2378,
8584,
1030,
8908,
15152,
1012,
16913,
2389,
23684,
8584,
1030,
3415,
15327,
15152,
1030,
11336,
15152,
1008,
1008,
30524,
1063,
23561,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
.description a {
color: white;
} | sofiaaacole/sofiaswebsite | assets/css/style.css | CSS | mit | 33 | [
30522,
1012,
6412,
1037,
1063,
3609,
1024,
2317,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
import chalk = require("chalk");
import { take, select } from "redux-saga/effects";
import path = require("path");
import moment = require("moment");
import { titleize } from "inflection";
import { parallel } from "mesh";
import { weakMemo } from "../memo";
import AnsiUp from "ansi_up";
import { reader } from "../monad";
import { noop } from "lodash";
import { ImmutableObject, createImmutableObject } from "../immutable";
import { LogLevel, LogAction, LogActionTypes, Logger } from "./base";
// beat TS type checking
chalk.enabled = true;
function createLogColorizer(tester: RegExp, replaceValue: any) {
return function(input: string) {
if (!tester.test(input)) return input;
return input.replace(tester, replaceValue);
}
}
export type ConsoleLogState = {
argv?: {
color?: boolean,
hlog?: boolean
},
log?: {
level: LogLevel,
prefix?: string
}
}
const cwd = process.cwd();
const highlighters = [
createLogColorizer(/^INF/, (match) => chalk.bgCyan(match)),
createLogColorizer(/^ERR/, (match) => chalk.bgRed(match)),
createLogColorizer(/^DBG/, (match) => chalk.grey.bgBlack(match)),
createLogColorizer(/^WRN/, (match) => chalk.bgYellow(match)),
// timestamp
createLogColorizer(/\[\d+\.\d+\.\d+\]/, (match, inner) => `[${chalk.grey(inner)}]`),
// URL
createLogColorizer(/((\w{3,}\:\/\/)|([^\/\s\("':]+)?\/)([^\/\)\s"':]+\/?)+/g, (match) => {
return chalk.yellow(/\w+:\/\//.test(match) ? match : match.replace(cwd + "/", ""))
}),
// duration
createLogColorizer(/\s\d+(\.\d+)?(s|ms|m|h|d)(\s|$)/g, (match) => chalk.bold.cyan(match)),
// numbers
createLogColorizer(/\b\d+(\.\d+)?\b/g, (match, inner) => `${chalk.cyan(match)}`),
// strings
createLogColorizer(/"(.*?)"/g, (match, inner) => `"${chalk.blue(inner)}"`),
// tokens
createLogColorizer(/([\:\{\}",\(\)]|->|null|undefined|Infinity)/g, (match) => chalk.grey(match)),
// <<output - green (from audio again)
createLogColorizer(/<<(.*)/g, (match, word) => chalk.green(word)),
// >>input - magenta (from audio)
createLogColorizer(/>>(.*)/g, (match, word) => chalk.magenta(word)),
// **BIG EMPHASIS**
createLogColorizer(/\*\*(.*?)\*\*/, (match, word) => chalk.bgBlue(word)),
// *emphasis*
createLogColorizer(/\*(.*?)\*/g, (match, word) => chalk.bold(word)),
// ___underline___
createLogColorizer(/___(.*?)___/g, (match, word) => chalk.underline(word)),
// ~de emphasis~
createLogColorizer(/~(.*?)~/g, (match, word) => chalk.grey(word)),
];
function colorize(input: string) {
let output = input;
for (let i = 0, n = highlighters.length; i < n; i++) output = highlighters[i](output);
return output;
}
function styledConsoleLog(...args: any[]) {
var argArray = [];
if (args.length) {
var startTagRe = /<span\s+style=(['"])([^'"]*)\1\s*>/gi;
var endTagRe = /<\/span>/gi;
var reResultArray;
argArray.push(arguments[0].replace(startTagRe, '%c').replace(endTagRe, '%c'));
while (reResultArray = startTagRe.exec(arguments[0])) {
argArray.push(reResultArray[2]);
argArray.push('');
}
// pass through subsequent args since chrome dev tools does not (yet) support console.log styling of the following form: console.log('%cBlue!', 'color: blue;', '%cRed!', 'color: red;');
for (var j = 1; j < arguments.length; j++) {
argArray.push(arguments[j]);
}
}
console.log.apply(console, argArray);
}
// I'm against abbreviations, but it's happening here
// since all of these are the same length -- saves space in stdout, and makes
// logs easier to read.
const PREFIXES = {
[LogLevel.DEBUG]: "DBG ",
[LogLevel.INFO]: "INF ",
[LogLevel.WARNING]: "WRN ",
[LogLevel.ERROR]: "ERR ",
};
const defaultState = { level: LogLevel.ALL, prefix: "" };
export function* consoleLogSaga() {
while(true) {
const { log: { level: acceptedLevel, prefix }}: ConsoleLogState = (yield select()) || defaultState;
let { text, level }: LogAction = (yield take(LogActionTypes.LOG));
if (!(acceptedLevel & level)) continue;
const log = {
[LogLevel.DEBUG]: console.log.bind(console),
[LogLevel.LOG]: console.log.bind(console),
[LogLevel.INFO]: console.info.bind(console),
[LogLevel.WARNING]: console.warn.bind(console),
[LogLevel.ERROR]: console.error.bind(console)
}[level];
text = PREFIXES[level] + (prefix || "") + text;
text = colorize(text);
if (typeof window !== "undefined" && !window["$synthetic"]) {
return styledConsoleLog(new AnsiUp().ansi_to_html(text));
}
log(text);
}
}
| crcn/aerial | packages/aerial-common2/src/log/console.ts | TypeScript | mit | 4,631 | [
30522,
12324,
16833,
1027,
5478,
1006,
1000,
16833,
1000,
1007,
1025,
12324,
1063,
2202,
1010,
7276,
1065,
2013,
1000,
2417,
5602,
1011,
12312,
1013,
3896,
1000,
1025,
12324,
4130,
1027,
5478,
1006,
1000,
4130,
1000,
1007,
1025,
12324,
2617... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.geronimo.mail;
import javax.mail.Address;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.URLName;
/**
* @version $Rev$ $Date$
*/
public class NullTransport extends Transport {
public NullTransport(Session session, URLName urlName) {
super(session, urlName);
}
public void sendMessage(Message message, Address[] addresses) throws MessagingException {
// do nothing
}
protected boolean protocolConnect(String host, int port, String user, String password) throws MessagingException {
return true; // always connect
}
}
| meetdestiny/geronimo-trader | modules/mail/src/java/org/apache/geronimo/mail/NullTransport.java | Java | apache-2.0 | 1,308 | [
30522,
1013,
1008,
1008,
1008,
1008,
9385,
2432,
1996,
15895,
4007,
3192,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.spacecard.dao;
import com.spacecard.image.Image;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
/**
*
* @author user
*/
public class ImageDAO extends DatabaseConnector
{
public Vector<Image> getImages() throws SQLException
{
String sql = "SELECT * FROM image";
ResultSet rs = statement.executeQuery(sql);
Vector<Image> images = new Vector<Image>();
while(rs.next())
{
images.add(new Image(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4)));
}
return images;
}
public Vector<Image> getImages(String category) throws SQLException
{
String sql = "SELECT * FROM image WHERE category = '"+category+"'";
ResultSet rs = statement.executeQuery(sql);
Vector<Image> images = new Vector<Image>();
while(rs.next())
{
images.add(new Image(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4)));
}
return images;
}
public Image getImage(int imageId) throws SQLException
{
String sql = "SELECT * FROM image WHERE imageId = '"+imageId+"'";
ResultSet rs = statement.executeQuery(sql);
Image image = new Image();
while(rs.next())
{
image = new Image(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4));
}
return image;
}
}
| oyekunlei/spacecard | src/java/com/spacecard/dao/ImageDAO.java | Java | gpl-3.0 | 1,685 | [
30522,
1013,
1008,
1008,
2000,
2689,
2023,
6105,
20346,
1010,
5454,
6105,
20346,
2015,
1999,
2622,
5144,
1012,
1008,
2000,
2689,
2023,
23561,
5371,
1010,
5454,
5906,
1064,
23561,
2015,
1008,
1998,
2330,
1996,
23561,
1999,
1996,
3559,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2016, Linaro Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <types_ext.h>
#include <drivers/ps2mouse.h>
#include <drivers/serial.h>
#include <string.h>
#include <keep.h>
#include <trace.h>
#define PS2_CMD_RESET 0xff
#define PS2_CMD_ACK 0xfa
#define PS2_CMD_ENABLE_DATA_REPORTING 0xf4
#define PS2_BAT_OK 0xaa
#define PS2_MOUSE_ID 0x00
#define PS2_BYTE0_Y_OVERFLOW (1 << 7)
#define PS2_BYTE0_X_OVERFLOW (1 << 6)
#define PS2_BYTE0_Y_SIGN (1 << 5)
#define PS2_BYTE0_X_SIGN (1 << 4)
#define PS2_BYTE0_ALWAYS_ONE (1 << 3)
#define PS2_BYTE0_MIDDLE_DOWN (1 << 2)
#define PS2_BYTE0_RIGHT_DOWN (1 << 1)
#define PS2_BYTE0_LEFT_DOWN (1 << 0)
static void call_callback(struct ps2mouse_data *d, uint8_t byte1,
uint8_t byte2, uint8_t byte3)
{
uint8_t button;
int16_t xdelta;
int16_t ydelta;
button = byte1 & (PS2_BYTE0_MIDDLE_DOWN | PS2_BYTE0_RIGHT_DOWN |
PS2_BYTE0_LEFT_DOWN);
if (byte1 & PS2_BYTE0_X_OVERFLOW) {
xdelta = byte1 & PS2_BYTE0_X_SIGN ? -255 : 255;
} else {
xdelta = byte2;
if (byte1 & PS2_BYTE0_X_SIGN)
xdelta |= 0xff00; /* sign extend */
}
if (byte1 & PS2_BYTE0_Y_OVERFLOW) {
ydelta = byte1 & PS2_BYTE0_Y_SIGN ? -255 : 255;
} else {
ydelta = byte3;
if (byte1 & PS2_BYTE0_Y_SIGN)
ydelta |= 0xff00; /* sign extend */
}
d->callback(d->callback_data, button, xdelta, -ydelta);
}
static void psm_consume(struct ps2mouse_data *d, uint8_t b)
{
switch (d->state) {
case PS2MS_RESET:
if (b != PS2_CMD_ACK)
goto reset;
d->state = PS2MS_INIT;
return;
case PS2MS_INIT:
if (b != PS2_BAT_OK)
goto reset;
d->state = PS2MS_INIT2;
return;
case PS2MS_INIT2:
if (b != PS2_MOUSE_ID) {
EMSG("Unexpected byte 0x%x in state %d", b, d->state);
d->state = PS2MS_INACTIVE;
return;
}
d->state = PS2MS_INIT3;
d->serial->ops->putc(d->serial, PS2_CMD_ENABLE_DATA_REPORTING);
return;
case PS2MS_INIT3:
d->state = PS2MS_ACTIVE1;
return;
case PS2MS_ACTIVE1:
if (!(b & PS2_BYTE0_ALWAYS_ONE))
goto reset;
d->bytes[0] = b;
d->state = PS2MS_ACTIVE2;
return;
case PS2MS_ACTIVE2:
d->bytes[1] = b;
d->state = PS2MS_ACTIVE3;
return;
case PS2MS_ACTIVE3:
d->state = PS2MS_ACTIVE1;
call_callback(d, d->bytes[0], d->bytes[1], b);
return;
default:
EMSG("Unexpected byte 0x%x in state %d", b, d->state);
return;
}
reset:
EMSG("Unexpected byte 0x%x in state %d, resetting", b, d->state);
d->state = PS2MS_RESET;
d->serial->ops->putc(d->serial, PS2_CMD_RESET);
}
static enum itr_return ps2mouse_itr_cb(struct itr_handler *h)
{
struct ps2mouse_data *d = h->data;
if (!d->serial->ops->have_rx_data(d->serial))
return ITRR_NONE;
while (true) {
psm_consume(d, d->serial->ops->getchar(d->serial));
if (!d->serial->ops->have_rx_data(d->serial))
return ITRR_HANDLED;
}
}
KEEP_PAGER(ps2mouse_itr_cb);
void ps2mouse_init(struct ps2mouse_data *d, struct serial_chip *serial,
size_t serial_it, ps2mouse_callback cb, void *cb_data)
{
memset(d, 0, sizeof(*d));
d->serial = serial;
d->state = PS2MS_RESET;
d->itr_handler.it = serial_it;
d->itr_handler.flags = ITRF_TRIGGER_LEVEL;
d->itr_handler.handler = ps2mouse_itr_cb;
d->itr_handler.data = d;
d->callback = cb;
d->callback_data = cb_data;
itr_add(&d->itr_handler);
itr_enable(&d->itr_handler);
d->serial->ops->putc(d->serial, PS2_CMD_RESET);
}
| matt2048/optee_os | core/drivers/ps2mouse.c | C | bsd-2-clause | 4,633 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2355,
1010,
27022,
3217,
3132,
1008,
2035,
2916,
9235,
1012,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
1008,
14080,
1010,
2024,
7936,
3024,
2008,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular.module("ui.bootstrap.alert", []).directive('alert', function () {
return {
restrict:'EA',
templateUrl:'template/alert/alert.html',
transclude:true,
replace:true,
scope: {
type: '=',
close: '&'
},
link: function(scope, iElement, iAttrs, controller) {
scope.closeable = "close" in iAttrs;
}
};
});
| andrejbranch/techversed | web/components/angular-ui-bootstrap/src/alert/alert.js | JavaScript | mit | 358 | [
30522,
16108,
1012,
11336,
1006,
1000,
21318,
1012,
6879,
6494,
2361,
1012,
9499,
1000,
1010,
1031,
1033,
1007,
1012,
16449,
1006,
1005,
9499,
1005,
1010,
3853,
1006,
1007,
1063,
2709,
1063,
21573,
1024,
1005,
19413,
1005,
1010,
23561,
3126... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation (FSF), either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the Affero GNU General Public License
# version 3 along with this program. If not, see http://www.gnu.org/licenses/
from essentia_test import *
class TestHPCP(TestCase):
def testEmpty(self):
hpcp = HPCP()([], [])
self.assertEqualVector(hpcp, [0.]*12)
def testZeros(self):
hpcp = HPCP()([0]*10, [0]*10)
self.assertEqualVector(hpcp, [0.]*12)
def testSin440(self):
# Tests whether a real audio signal of one pure tone gets read as a
# single semitone activation, and gets read into the right pcp bin
sampleRate = 44100
audio = MonoLoader(filename = join(testdata.audio_dir, 'generated/synthesised/sin440_0db.wav'),
sampleRate = sampleRate)()
speaks = SpectralPeaks(sampleRate = sampleRate,
maxPeaks = 1,
maxFrequency = sampleRate/2,
minFrequency = 0,
magnitudeThreshold = 0,
orderBy = 'magnitude')
(freqs, mags) = speaks(Spectrum()(audio))
hpcp = HPCP()(freqs, mags)
self.assertEqualVector(hpcp, [1.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.])
def testAllSemitones(self):
# Tests whether a spectral peak output of 12 consecutive semitones
# yields a HPCP of all 1's
tonic = 440
freqs = [(tonic * 2**(x/12.)) for x in range(12)]
mags = [1] * 12
hpcp = HPCP()(freqs, mags)
self.assertEqualVector(hpcp, [1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.])
def testSubmediantPosition(self):
# Make sure that the submediant of a key based on 440 is in the
# correct location (submediant was randomly selected from all the
# tones)
tonic = 440
submediant = tonic * 2**(9./12.)
hpcp = HPCP()([submediant], [1])
self.assertEqualVector(hpcp, [0.,0.,0.,0.,0.,0.,0.,0.,0.,1.,0.,0.])
def testMaxShifted(self):
# Tests whether a HPCP reading with only the dominant semitone
# activated is correctly shifted so that the dominant is at the
# position 0
tonic = 440
dominant = tonic * 2**(7./12.)
hpcp = HPCP(maxShifted=True)([dominant], [1])
self.assertEqualVector(hpcp, [1.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.])
def chordHelper(self, half_steps, tunning, strength):
notes = [tunning*(2.**(half_steps[i]/12.)) for i in range(len(half_steps))]
hpcp = HPCP(maxShifted=False)([notes[0], notes[1], notes[2]], strength)
for i in range(len(hpcp)):
if i in half_steps: self.assertTrue(hpcp[i]>0)
elif (i - 12) in half_steps: self.assertTrue(hpcp[i]>0)
else: self.assertEqual(hpcp[i], 0)
def testChord(self):
tunning = 440
AMajor = [0, 4, 7] # AMajor = A4-C#5-E5
self.chordHelper(AMajor, tunning, [1,1,1])
CMajor = [3, -4, -2] # CMajor = C5-F4-G4
self.chordHelper(CMajor, tunning, [1,1,1])
CMajor = [-4, 3, -2] # CMajor = C5-F4-G4
self.chordHelper(CMajor, tunning, [1,0.5,0.2])
CMajor = [-4, -2, 3] # CMajor = C5-F4-G4
self.chordHelper(CMajor, tunning, [1,0.5,0.2])
CMajor = [3, 8, 10] # CMajor = C5-F5-G5
self.chordHelper(CMajor, tunning, [1,0.5,0.2])
AMinor = [0, 3, 7] # AMinor = A4-C5-E5
self.chordHelper(AMinor, tunning, [1,0.5,0.2])
CMinor = [3, 6, 10] # CMinor = C5-E5-G5
self.chordHelper(CMinor, tunning, [1,0.5,0.2])
# Test of various parameter logical bounds
def testLowFrequency(self):
hpcp = HPCP(minFrequency=100, maxFrequency=1000)([99], [1])
self.assertEqualVector(hpcp, [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.])
def testHighFrequency(self):
hpcp = HPCP(minFrequency=100, maxFrequency=1000)([1001], [1])
self.assertEqualVector(hpcp, [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.])
def testSmallMinRange(self):
self.assertConfigureFails(HPCP(), {'minFrequency':1, 'splitFrequency':200})
def testSmallMaxRange(self):
self.assertConfigureFails(HPCP(), {'maxFrequency':1199, 'splitFrequency':1000})
def testSmallMinMaxRange(self):
self.assertConfigureFails(HPCP(), {'bandPreset':False, 'maxFrequency':200, 'minFrequency':1})
def testSizeNonmultiple12(self):
self.assertConfigureFails(HPCP(), {'size':13})
def testHarmonics(self):
# Regression test for the 'harmonics' parameter
tone = 100. # arbitrary frequency [Hz]
freqs = [tone, tone*2, tone*3, tone*4]
mags = [1]*4
hpcpAlg = HPCP(minFrequency=50, maxFrequency=500, bandPreset=False, harmonics=3)
hpcp = hpcpAlg(freqs, mags)
expected = [0., 0., 0., 0.1340538263, 0., 0.2476127148, 0., 0., 0., 0., 1., 0.]
self.assertAlmostEqualVector(hpcp, expected, 1e-4)
def testRegression(self):
# Just makes sure algorithm does not crash on a real data source. This
# test is not really looking for correctness. Maybe consider revising
# it.
inputSize = 512
sampleRate = 44100
audio = MonoLoader(filename = join(testdata.audio_dir, join('recorded', 'musicbox.wav')),
sampleRate = sampleRate)()
fc = FrameCutter(frameSize = inputSize,
hopSize = inputSize)
windowingAlg = Windowing(type = 'blackmanharris62')
specAlg = Spectrum(size=inputSize)
sPeaksAlg = SpectralPeaks(sampleRate = sampleRate,
maxFrequency = sampleRate/2,
minFrequency = 0,
orderBy = 'magnitude')
hpcpAlg = HPCP(minFrequency=50, maxFrequency=500, bandPreset=False, harmonics=3)
frame = fc(audio)
while len(frame) != 0:
spectrum = specAlg(windowingAlg(frame))
(freqs, mags) = sPeaksAlg(spectrum)
hpcp = hpcpAlg(freqs,mags)
self.assertTrue(not any(numpy.isnan(hpcp)))
self.assertTrue(not any(numpy.isinf(hpcp)))
frame = fc(audio)
suite = allTests(TestHPCP)
if __name__ == '__main__':
TextTestRunner(verbosity=2).run(suite)
| arseneyr/essentia | test/src/unittest/spectral/test_hpcp.py | Python | agpl-3.0 | 7,101 | [
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
4372,
2615,
18750,
1001,
9385,
1006,
1039,
1007,
2294,
1011,
2355,
2189,
2974,
2177,
1011,
4895,
16402,
28032,
4017,
13433,
8737,
13765,
6904,
10024,
1001,
1001,
2023,
5371,
2003,
2112,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#include <Decoder/Context.h>
namespace HEVC { namespace Decoder {
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
}} /* HEVC::Decoder */
| vlad83/H.265Insight | src/Decoder/Context.cpp | C++ | gpl-3.0 | 252 | [
30522,
1001,
2421,
1026,
21933,
4063,
1013,
6123,
1012,
1044,
1028,
3415,
15327,
2002,
25465,
1063,
3415,
15327,
21933,
4063,
1063,
1013,
1008,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* SonarQube Java Properties Analyzer
* Copyright (C) 2015-2017 David RACODON
* david.racodon@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
package org.sonar.plugins.jproperties.api.visitors;
import javax.annotation.ParametersAreNonnullByDefault;
| racodond/sonar-jproperties-plugin | jproperties-frontend/src/main/java/org/sonar/plugins/jproperties/api/visitors/package-info.java | Java | lgpl-3.0 | 996 | [
30522,
1013,
1008,
1008,
24609,
28940,
4783,
9262,
5144,
17908,
2099,
1008,
9385,
1006,
1039,
1007,
2325,
1011,
2418,
2585,
10958,
3597,
5280,
1008,
2585,
1012,
10958,
3597,
5280,
1030,
20917,
4014,
1012,
4012,
1008,
1008,
2023,
2565,
2003,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
CREATE TABLE assenze (id INT NOT NULL, alunno INT DEFAULT NULL, docente INT DEFAULT NULL, giustificazione INT DEFAULT NULL, classe INT DEFAULT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, rilevazione VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_25D098EF16736B74 ON assenze (alunno);
CREATE INDEX IDX_25D098EFFD9FCFA4 ON assenze (docente);
CREATE INDEX IDX_25D098EF522B7D12 ON assenze (giustificazione);
CREATE INDEX IDX_25D098EF8F87BF96 ON assenze (classe);
CREATE TABLE festivi (id INT NOT NULL, istituto INT DEFAULT NULL, giorno DATE NOT NULL, descrizione VARCHAR(160) DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_7D1162BF53AEA9EF ON festivi (istituto);
CREATE TABLE logassenze (id INT NOT NULL, alunno INT DEFAULT NULL, docente INT DEFAULT NULL, logrevisore INT DEFAULT NULL, giustificazione INT DEFAULT NULL, classe INT DEFAULT NULL, assenza INT DEFAULT NULL, logtimestamp VARCHAR(255) NOT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, rilevazione VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_C9192CCE16736B74 ON logassenze (alunno);
CREATE INDEX IDX_C9192CCEFD9FCFA4 ON logassenze (docente);
CREATE INDEX IDX_C9192CCE4DD50500 ON logassenze (logrevisore);
CREATE INDEX IDX_C9192CCE522B7D12 ON logassenze (giustificazione);
CREATE INDEX IDX_C9192CCE8F87BF96 ON logassenze (classe);
CREATE INDEX IDX_C9192CCE22BD5CF6 ON logassenze (assenza);
CREATE TABLE logfirme (id INT NOT NULL, logrevisore INT DEFAULT NULL, docente INT DEFAULT NULL, firma INT DEFAULT NULL, classe INT DEFAULT NULL, logtimestamp VARCHAR(255) NOT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_60CB6F144DD50500 ON logfirme (logrevisore);
CREATE INDEX IDX_60CB6F14FD9FCFA4 ON logfirme (docente);
CREATE INDEX IDX_60CB6F142BED3563 ON logfirme (firma);
CREATE INDEX IDX_60CB6F148F87BF96 ON logfirme (classe);
CREATE TABLE anniscolastici (id INT NOT NULL, istituto INT DEFAULT NULL, descrizione VARCHAR(160) NOT NULL, inizioannoscolastico DATE NOT NULL, finelezioni DATE NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_47F4A1BD53AEA9EF ON anniscolastici (istituto);
CREATE TABLE librettipersonali (id INT NOT NULL, alunno INT DEFAULT NULL, classe INT DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_9749FCA716736B74 ON librettipersonali (alunno);
CREATE INDEX IDX_9749FCA78F87BF96 ON librettipersonali (classe);
CREATE TABLE librettipersonaliconversazioni (id INT NOT NULL, librettopersonale INT DEFAULT NULL, oggetto VARCHAR(160) NOT NULL, tipoconversazione VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_2192233F93E1C0CB ON librettipersonaliconversazioni (librettopersonale);
CREATE TABLE qualifiche (id INT NOT NULL, metrica INT DEFAULT NULL, materia INT DEFAULT NULL, istituto INT DEFAULT NULL, indirizzoscolastico INT DEFAULT NULL, annodicorso INT DEFAULT NULL, nome VARCHAR(160) NOT NULL, descrizione VARCHAR(4000) NOT NULL, tipo VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_B5A8E309D133DBAF ON qualifiche (metrica);
CREATE INDEX IDX_B5A8E3096DF05284 ON qualifiche (materia);
CREATE INDEX IDX_B5A8E30953AEA9EF ON qualifiche (istituto);
CREATE INDEX IDX_B5A8E30944C3F07 ON qualifiche (indirizzoscolastico);
CREATE TABLE annotazionidocente (id INT NOT NULL, alunno INT DEFAULT NULL, docente INT DEFAULT NULL, classe INT DEFAULT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, descrizione VARCHAR(2048) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_8C6EB31A16736B74 ON annotazionidocente (alunno);
CREATE INDEX IDX_8C6EB31AFD9FCFA4 ON annotazionidocente (docente);
CREATE INDEX IDX_8C6EB31A8F87BF96 ON annotazionidocente (classe);
CREATE TABLE tipiindirizzi (id INT NOT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE TABLE lezioni (id INT NOT NULL, docente INT DEFAULT NULL, materia INT DEFAULT NULL, classe INT DEFAULT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, descrizione VARCHAR(2048) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_F0943429FD9FCFA4 ON lezioni (docente);
CREATE INDEX IDX_F09434296DF05284 ON lezioni (materia);
CREATE INDEX IDX_F09434298F87BF96 ON lezioni (classe);
CREATE TABLE librettipersonalimessaggi (id INT NOT NULL, personafisica INT DEFAULT NULL, librettopersonaleconversazione INT DEFAULT NULL, fattoil TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, messaggio VARCHAR(2048) NOT NULL, tipomessaggio VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_5C719BF2D55D2016 ON librettipersonalimessaggi (personafisica);
CREATE INDEX IDX_5C719BF2EF1B8C43 ON librettipersonalimessaggi (librettopersonaleconversazione);
CREATE TABLE materiedeidocenti (materiadeldocente INT NOT NULL, docente INT DEFAULT NULL, materia INT DEFAULT NULL, classe INT DEFAULT NULL, PRIMARY KEY(materiadeldocente));
CREATE INDEX IDX_9D0A6590FD9FCFA4 ON materiedeidocenti (docente);
CREATE INDEX IDX_9D0A65906DF05284 ON materiedeidocenti (materia);
CREATE INDEX IDX_9D0A65908F87BF96 ON materiedeidocenti (classe);
CREATE TABLE mezzidicomunicazione (id INT NOT NULL, tipodicomunicazione INT DEFAULT NULL, soggetto INT DEFAULT NULL, descrizione VARCHAR(160) DEFAULT NULL, percorso VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_704D4DC95DFD650E ON mezzidicomunicazione (tipodicomunicazione);
CREATE INDEX IDX_704D4DC9CDBEE62F ON mezzidicomunicazione (soggetto);
CREATE TABLE librettipersonalimessaggiletti (id INT NOT NULL, personafisica INT DEFAULT NULL, librettopersonalemessaggio INT DEFAULT NULL, lettoil TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_A155BA45D55D2016 ON librettipersonalimessaggiletti (personafisica);
CREATE INDEX IDX_A155BA45DB009A72 ON librettipersonalimessaggiletti (librettopersonalemessaggio);
CREATE TABLE loggiustificazioni (id INT NOT NULL, alunno INT DEFAULT NULL, docente INT DEFAULT NULL, logrevisore INT DEFAULT NULL, librettopersonaleconversazione INT DEFAULT NULL, giustificazione INT DEFAULT NULL, classe INT DEFAULT NULL, logtimestamp VARCHAR(255) NOT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, descrizione VARCHAR(2048) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_61B85DE016736B74 ON loggiustificazioni (alunno);
CREATE INDEX IDX_61B85DE0FD9FCFA4 ON loggiustificazioni (docente);
CREATE INDEX IDX_61B85DE04DD50500 ON loggiustificazioni (logrevisore);
CREATE INDEX IDX_61B85DE0EF1B8C43 ON loggiustificazioni (librettopersonaleconversazione);
CREATE INDEX IDX_61B85DE0522B7D12 ON loggiustificazioni (giustificazione);
CREATE INDEX IDX_61B85DE08F87BF96 ON loggiustificazioni (classe);
CREATE TABLE figureprofessionalidettagli (id INT NOT NULL, soggetto INT DEFAULT NULL, personafisica INT DEFAULT NULL, figuraprofessionale INT DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_E1B10CF4CDBEE62F ON figureprofessionalidettagli (soggetto);
CREATE INDEX IDX_E1B10CF4D55D2016 ON figureprofessionalidettagli (personafisica);
CREATE INDEX IDX_E1B10CF4ACCE0B88 ON figureprofessionalidettagli (figuraprofessionale);
CREATE TABLE argomenti (id INT NOT NULL, materia INT DEFAULT NULL, classe INT DEFAULT NULL, descrizione VARCHAR(60) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_A4F9EFA96DF05284 ON argomenti (materia);
CREATE INDEX IDX_A4F9EFA98F87BF96 ON argomenti (classe);
CREATE TABLE soggetti (id INT NOT NULL, soggettodiriferimento INT DEFAULT NULL, istituto INT DEFAULT NULL, descrizione VARCHAR(160) NOT NULL, tiposoggetto VARCHAR(255) NOT NULL, foto BYTEA DEFAULT NULL, autorizzazionedatipersonali DATE DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_24DD431A1650D7BA ON soggetti (soggettodiriferimento);
CREATE INDEX IDX_24DD431A53AEA9EF ON soggetti (istituto);
CREATE TABLE firme (id INT NOT NULL, docente INT DEFAULT NULL, classe INT DEFAULT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_2C80F17AFD9FCFA4 ON firme (docente);
CREATE INDEX IDX_2C80F17A8F87BF96 ON firme (classe);
CREATE TABLE tipidicomunicazione (id INT NOT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE TABLE logannotazioni (id INT NOT NULL, logrevisore INT DEFAULT NULL, alunno INT DEFAULT NULL, docente INT DEFAULT NULL, classe INT DEFAULT NULL, annotazione INT DEFAULT NULL, logtimestamp VARCHAR(255) NOT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, tipoannotazione VARCHAR(255) DEFAULT NULL, descrizione VARCHAR(2048) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_639C03DD4DD50500 ON logannotazioni (logrevisore);
CREATE INDEX IDX_639C03DD16736B74 ON logannotazioni (alunno);
CREATE INDEX IDX_639C03DDFD9FCFA4 ON logannotazioni (docente);
CREATE INDEX IDX_639C03DD8F87BF96 ON logannotazioni (classe);
CREATE INDEX IDX_639C03DD3771335 ON logannotazioni (annotazione);
CREATE TABLE metriche (id INT NOT NULL, istituto INT DEFAULT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_78A04CB153AEA9EF ON metriche (istituto);
CREATE TABLE giustificazioni (id INT NOT NULL, docente INT DEFAULT NULL, alunno INT DEFAULT NULL, librettopersonaleconversazione INT DEFAULT NULL, classe INT DEFAULT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, descrizione VARCHAR(2048) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_5B9D3139FD9FCFA4 ON giustificazioni (docente);
CREATE INDEX IDX_5B9D313916736B74 ON giustificazioni (alunno);
CREATE INDEX IDX_5B9D3139EF1B8C43 ON giustificazioni (librettopersonaleconversazione);
CREATE INDEX IDX_5B9D31398F87BF96 ON giustificazioni (classe);
CREATE TABLE valutazioni (id INT NOT NULL, tipovoto INT DEFAULT NULL, agomento INT DEFAULT NULL, classe INT NOT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, alunno INT NOT NULL, materia INT NOT NULL, voto INT NOT NULL, visibilita VARCHAR(255) NOT NULL, note VARCHAR(160) DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_BF8AD0BED8D7170E ON valutazioni (tipovoto);
CREATE INDEX IDX_BF8AD0BE779D2274 ON valutazioni (agomento);
CREATE TABLE gruppiqualifiche (id INT NOT NULL, istituto INT DEFAULT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_B10560053AEA9EF ON gruppiqualifiche (istituto);
CREATE TABLE classialunni (id INT NOT NULL, alunno INT DEFAULT NULL, classe INT DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_FBFF1C9116736B74 ON classialunni (alunno);
CREATE INDEX IDX_FBFF1C918F87BF96 ON classialunni (classe);
CREATE TABLE voti (id INT NOT NULL, metrica INT DEFAULT NULL, descrizione VARCHAR(160) NOT NULL, millesimi SMALLINT NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_53A6C94FD133DBAF ON voti (metrica);
CREATE TABLE loglezioni (id INT NOT NULL, docente INT DEFAULT NULL, logrevisore INT DEFAULT NULL, materia INT DEFAULT NULL, lezione INT DEFAULT NULL, classe INT DEFAULT NULL, logtimestamp VARCHAR(255) NOT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, descrizione VARCHAR(2048) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_1C5D8008FD9FCFA4 ON loglezioni (docente);
CREATE INDEX IDX_1C5D80084DD50500 ON loglezioni (logrevisore);
CREATE INDEX IDX_1C5D80086DF05284 ON loglezioni (materia);
CREATE INDEX IDX_1C5D8008F9227802 ON loglezioni (lezione);
CREATE INDEX IDX_1C5D80088F87BF96 ON loglezioni (classe);
CREATE TABLE classi (id INT NOT NULL, indirizzoscolastico INT DEFAULT NULL, annoscolastico INT DEFAULT NULL, sezione VARCHAR(5) DEFAULT NULL, annodicorso INT NOT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_8631F3BD44C3F07 ON classi (indirizzoscolastico);
CREATE INDEX IDX_8631F3BD4622CECB ON classi (annoscolastico);
CREATE TABLE istituti (id INT NOT NULL, descrizione VARCHAR(160) NOT NULL, codicemeccanografico VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE TABLE gruppiqualifichedettaglio (id INT NOT NULL, qualifica INT DEFAULT NULL, gruppoqualifiche INT DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_4315485EE9AF05A ON gruppiqualifichedettaglio (qualifica);
CREATE INDEX IDX_4315485EE3A59C43 ON gruppiqualifichedettaglio (gruppoqualifiche);
CREATE TABLE personefisiche (id INT NOT NULL, personafisica INT DEFAULT NULL, tutore INT DEFAULT NULL, padre INT DEFAULT NULL, nazionedinascita INT DEFAULT NULL, madre INT DEFAULT NULL, nome VARCHAR(60) NOT NULL, cognome VARCHAR(60) NOT NULL, sesso VARCHAR(255) NOT NULL, natoil DATE DEFAULT NULL, decedutoil DATE DEFAULT NULL, comunedinascita VARCHAR(60) DEFAULT NULL, codicefiscale VARCHAR(255) DEFAULT NULL, statocivile VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_4E532798D55D2016 ON personefisiche (personafisica);
CREATE INDEX IDX_4E5327989744B4BE ON personefisiche (tutore);
CREATE INDEX IDX_4E532798D3656AEB ON personefisiche (padre);
CREATE INDEX IDX_4E532798A722C977 ON personefisiche (nazionedinascita);
CREATE INDEX IDX_4E5327984B1539D8 ON personefisiche (madre);
CREATE TABLE annotazioni (id INT NOT NULL, alunno INT DEFAULT NULL, docente INT DEFAULT NULL, classe INT DEFAULT NULL, giorno DATE NOT NULL, periododilezione INT NOT NULL, tipoannotazione VARCHAR(255) NOT NULL, descrizione VARCHAR(2048) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_AC15F1E16736B74 ON annotazioni (alunno);
CREATE INDEX IDX_AC15F1EFD9FCFA4 ON annotazioni (docente);
CREATE INDEX IDX_AC15F1E8F87BF96 ON annotazioni (classe);
CREATE TABLE valutazioniconversazioni (valutazione INT NOT NULL, conversazione INT NOT NULL, PRIMARY KEY(valutazione, conversazione));
CREATE TABLE tipipersonegiuridiche (id INT NOT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE TABLE indirizziscolastici (id INT NOT NULL, istituto INT DEFAULT NULL, descrizione VARCHAR(160) NOT NULL, annidicorso INT NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_59A507153AEA9EF ON indirizziscolastici (istituto);
CREATE TABLE personegiuridiche (id INT NOT NULL, personagiuridica INT DEFAULT NULL, tipopersonagiuridica INT DEFAULT NULL, nazione INT DEFAULT NULL, partitaiva VARCHAR(11) DEFAULT NULL, codicefiscale VARCHAR(16) DEFAULT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_9C42586C3403AD59 ON personegiuridiche (personagiuridica);
CREATE INDEX IDX_9C42586C9F823A92 ON personegiuridiche (tipopersonagiuridica);
CREATE INDEX IDX_9C42586CF52C2B3D ON personegiuridiche (nazione);
CREATE TABLE nazioni (id INT NOT NULL, isoa2 VARCHAR(255) NOT NULL, isoa3 VARCHAR(255) NOT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE TABLE materie (id INT NOT NULL, metrica INT DEFAULT NULL, istituto INT DEFAULT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_6A9D969DD133DBAF ON materie (metrica);
CREATE INDEX IDX_6A9D969D53AEA9EF ON materie (istituto);
CREATE TABLE tipivoto (id INT NOT NULL, descrizione VARCHAR(60) NOT NULL, PRIMARY KEY(id));
CREATE TABLE valutazioniqualifiche (id INT NOT NULL, voto INT DEFAULT NULL, valutazione INT DEFAULT NULL, qualifica INT DEFAULT NULL, note VARCHAR(160) DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_2556BFE1BAC56C7A ON valutazioniqualifiche (voto);
CREATE INDEX IDX_2556BFE1B63C9C95 ON valutazioniqualifiche (valutazione);
CREATE INDEX IDX_2556BFE1E9AF05A ON valutazioniqualifiche (qualifica);
CREATE TABLE figureprofessionali (id INT NOT NULL, descrizione VARCHAR(160) NOT NULL, PRIMARY KEY(id));
CREATE TABLE indirizzi (id INT NOT NULL, tipoindirizzo INT DEFAULT NULL, soggetto INT DEFAULT NULL, nazione INT DEFAULT NULL, prefissovia VARCHAR(15) DEFAULT NULL, via VARCHAR(160) DEFAULT NULL, civico VARCHAR(15) DEFAULT NULL, isolato VARCHAR(60) DEFAULT NULL, palazzo VARCHAR(60) DEFAULT NULL, scala VARCHAR(60) DEFAULT NULL, piano VARCHAR(15) DEFAULT NULL, interno VARCHAR(15) DEFAULT NULL, cap VARCHAR(15) DEFAULT NULL, localita VARCHAR(160) DEFAULT NULL, provincia VARCHAR(160) DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_FE4E099CEF28B300 ON indirizzi (tipoindirizzo);
CREATE INDEX IDX_FE4E099CCDBEE62F ON indirizzi (soggetto);
CREATE INDEX IDX_FE4E099CF52C2B3D ON indirizzi (nazione);
CREATE SEQUENCE assenze_assenza_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE festivi_festivo_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE logassenze_logassenza_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE logfirme_logfirma_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE anniscolastici_annoscolastico_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE librettipersonali_librettopersonale_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE librettipersonaliconversazioni_librettopersonaleconversazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE qualifiche_qualifica_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE annotazionidocente_annotazionedocente_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE tipiindirizzi_tipoindirizzo_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE lezioni_lezione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE librettipersonalimessaggi_librettopersonalemessaggio_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE materiedeidocenti_materiadeldocente_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE mezzidicomunicazione_mezzodicomunicazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE librettipersonalimessaggiletti_librettopersonalemessaggioletto_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE loggiustificazioni_loggiustificazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE figureprofessionalidettagli_figuraprofessionaledettaglio_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE argomenti_argomento_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE soggetti_soggetto_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE firme_firma_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE tipidicomunicazione_tipodicomunicazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE logannotazioni_logannotazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE metriche_metrica_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE giustificazioni_giustificazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE valutazioni_valutazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE gruppiqualifiche_gruppoqualifiche_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE classialunni_classealunno_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE voti_voto_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE loglezioni_loglezione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE classi_classe_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE istituti_istituto_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE gruppiqualifichedettaglio_gruppoqualifichedetaglio_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE personafisiche_personafisica_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE annotazioni_annotazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE tipipersonegiuridiche_tipopersonagiuridica_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE indirizziscolastici_indirizzoscolastico_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE personafisiche_personagiuridica_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE nazioni_nazione_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE materie_materia_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE tipivoto_tipovoto_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE valutazioniqualifiche_valutazionequalifica_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE figureprofessionali_figuraprofessionale_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE indirizzi_indirizzo_seq INCREMENT BY 1 MINVALUE 1 START 1;
ALTER TABLE assenze ADD CONSTRAINT FK_25D098EF16736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE assenze ADD CONSTRAINT FK_25D098EFFD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE assenze ADD CONSTRAINT FK_25D098EF522B7D12 FOREIGN KEY (giustificazione) REFERENCES giustificazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE assenze ADD CONSTRAINT FK_25D098EF8F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE festivi ADD CONSTRAINT FK_7D1162BF53AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logassenze ADD CONSTRAINT FK_C9192CCE16736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logassenze ADD CONSTRAINT FK_C9192CCEFD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logassenze ADD CONSTRAINT FK_C9192CCE4DD50500 FOREIGN KEY (logrevisore) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logassenze ADD CONSTRAINT FK_C9192CCE522B7D12 FOREIGN KEY (giustificazione) REFERENCES giustificazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logassenze ADD CONSTRAINT FK_C9192CCE8F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logassenze ADD CONSTRAINT FK_C9192CCE22BD5CF6 FOREIGN KEY (assenza) REFERENCES assenze (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logfirme ADD CONSTRAINT FK_60CB6F144DD50500 FOREIGN KEY (logrevisore) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logfirme ADD CONSTRAINT FK_60CB6F14FD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logfirme ADD CONSTRAINT FK_60CB6F142BED3563 FOREIGN KEY (firma) REFERENCES firme (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logfirme ADD CONSTRAINT FK_60CB6F148F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE anniscolastici ADD CONSTRAINT FK_47F4A1BD53AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE librettipersonali ADD CONSTRAINT FK_9749FCA716736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE librettipersonali ADD CONSTRAINT FK_9749FCA78F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE librettipersonaliconversazioni ADD CONSTRAINT FK_2192233F93E1C0CB FOREIGN KEY (librettopersonale) REFERENCES librettipersonali (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE qualifiche ADD CONSTRAINT FK_B5A8E309D133DBAF FOREIGN KEY (metrica) REFERENCES metriche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE qualifiche ADD CONSTRAINT FK_B5A8E3096DF05284 FOREIGN KEY (materia) REFERENCES materie (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE qualifiche ADD CONSTRAINT FK_B5A8E30953AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE qualifiche ADD CONSTRAINT FK_B5A8E30944C3F07 FOREIGN KEY (indirizzoscolastico) REFERENCES indirizziscolastici (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE annotazionidocente ADD CONSTRAINT FK_8C6EB31A16736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE annotazionidocente ADD CONSTRAINT FK_8C6EB31AFD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE annotazionidocente ADD CONSTRAINT FK_8C6EB31A8F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE lezioni ADD CONSTRAINT FK_F0943429FD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE lezioni ADD CONSTRAINT FK_F09434296DF05284 FOREIGN KEY (materia) REFERENCES materie (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE lezioni ADD CONSTRAINT FK_F09434298F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE librettipersonalimessaggi ADD CONSTRAINT FK_5C719BF2D55D2016 FOREIGN KEY (personafisica) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE librettipersonalimessaggi ADD CONSTRAINT FK_5C719BF2EF1B8C43 FOREIGN KEY (librettopersonaleconversazione) REFERENCES librettipersonaliconversazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE materiedeidocenti ADD CONSTRAINT FK_9D0A6590FD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE materiedeidocenti ADD CONSTRAINT FK_9D0A65906DF05284 FOREIGN KEY (materia) REFERENCES materie (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE materiedeidocenti ADD CONSTRAINT FK_9D0A65908F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE mezzidicomunicazione ADD CONSTRAINT FK_704D4DC95DFD650E FOREIGN KEY (tipodicomunicazione) REFERENCES tipidicomunicazione (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE mezzidicomunicazione ADD CONSTRAINT FK_704D4DC9CDBEE62F FOREIGN KEY (soggetto) REFERENCES soggetti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE librettipersonalimessaggiletti ADD CONSTRAINT FK_A155BA45D55D2016 FOREIGN KEY (personafisica) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE librettipersonalimessaggiletti ADD CONSTRAINT FK_A155BA45DB009A72 FOREIGN KEY (librettopersonalemessaggio) REFERENCES librettipersonalimessaggi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loggiustificazioni ADD CONSTRAINT FK_61B85DE016736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loggiustificazioni ADD CONSTRAINT FK_61B85DE0FD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loggiustificazioni ADD CONSTRAINT FK_61B85DE04DD50500 FOREIGN KEY (logrevisore) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loggiustificazioni ADD CONSTRAINT FK_61B85DE0EF1B8C43 FOREIGN KEY (librettopersonaleconversazione) REFERENCES librettipersonaliconversazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loggiustificazioni ADD CONSTRAINT FK_61B85DE0522B7D12 FOREIGN KEY (giustificazione) REFERENCES giustificazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loggiustificazioni ADD CONSTRAINT FK_61B85DE08F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE figureprofessionalidettagli ADD CONSTRAINT FK_E1B10CF4CDBEE62F FOREIGN KEY (soggetto) REFERENCES soggetti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE figureprofessionalidettagli ADD CONSTRAINT FK_E1B10CF4D55D2016 FOREIGN KEY (personafisica) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE figureprofessionalidettagli ADD CONSTRAINT FK_E1B10CF4ACCE0B88 FOREIGN KEY (figuraprofessionale) REFERENCES figureprofessionali (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE argomenti ADD CONSTRAINT FK_A4F9EFA96DF05284 FOREIGN KEY (materia) REFERENCES materie (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE argomenti ADD CONSTRAINT FK_A4F9EFA98F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE soggetti ADD CONSTRAINT FK_24DD431A1650D7BA FOREIGN KEY (soggettodiriferimento) REFERENCES soggetti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE soggetti ADD CONSTRAINT FK_24DD431A53AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE firme ADD CONSTRAINT FK_2C80F17AFD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE firme ADD CONSTRAINT FK_2C80F17A8F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logannotazioni ADD CONSTRAINT FK_639C03DD4DD50500 FOREIGN KEY (logrevisore) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logannotazioni ADD CONSTRAINT FK_639C03DD16736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logannotazioni ADD CONSTRAINT FK_639C03DDFD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logannotazioni ADD CONSTRAINT FK_639C03DD8F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE logannotazioni ADD CONSTRAINT FK_639C03DD3771335 FOREIGN KEY (annotazione) REFERENCES annotazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE metriche ADD CONSTRAINT FK_78A04CB153AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE giustificazioni ADD CONSTRAINT FK_5B9D3139FD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE giustificazioni ADD CONSTRAINT FK_5B9D313916736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE giustificazioni ADD CONSTRAINT FK_5B9D3139EF1B8C43 FOREIGN KEY (librettopersonaleconversazione) REFERENCES librettipersonaliconversazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE giustificazioni ADD CONSTRAINT FK_5B9D31398F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE valutazioni ADD CONSTRAINT FK_BF8AD0BED8D7170E FOREIGN KEY (tipovoto) REFERENCES tipivoto (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE valutazioni ADD CONSTRAINT FK_BF8AD0BE779D2274 FOREIGN KEY (agomento) REFERENCES argomenti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE gruppiqualifiche ADD CONSTRAINT FK_B10560053AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE classialunni ADD CONSTRAINT FK_FBFF1C9116736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE classialunni ADD CONSTRAINT FK_FBFF1C918F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE voti ADD CONSTRAINT FK_53A6C94FD133DBAF FOREIGN KEY (metrica) REFERENCES metriche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loglezioni ADD CONSTRAINT FK_1C5D8008FD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loglezioni ADD CONSTRAINT FK_1C5D80084DD50500 FOREIGN KEY (logrevisore) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loglezioni ADD CONSTRAINT FK_1C5D80086DF05284 FOREIGN KEY (materia) REFERENCES materie (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loglezioni ADD CONSTRAINT FK_1C5D8008F9227802 FOREIGN KEY (lezione) REFERENCES lezioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE loglezioni ADD CONSTRAINT FK_1C5D80088F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE classi ADD CONSTRAINT FK_8631F3BD44C3F07 FOREIGN KEY (indirizzoscolastico) REFERENCES indirizziscolastici (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE classi ADD CONSTRAINT FK_8631F3BD4622CECB FOREIGN KEY (annoscolastico) REFERENCES anniscolastici (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE gruppiqualifichedettaglio ADD CONSTRAINT FK_4315485EE9AF05A FOREIGN KEY (qualifica) REFERENCES qualifiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE gruppiqualifichedettaglio ADD CONSTRAINT FK_4315485EE3A59C43 FOREIGN KEY (gruppoqualifiche) REFERENCES gruppiqualifiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personefisiche ADD CONSTRAINT FK_4E532798D55D2016 FOREIGN KEY (personafisica) REFERENCES soggetti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personefisiche ADD CONSTRAINT FK_4E5327989744B4BE FOREIGN KEY (tutore) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personefisiche ADD CONSTRAINT FK_4E532798D3656AEB FOREIGN KEY (padre) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personefisiche ADD CONSTRAINT FK_4E532798A722C977 FOREIGN KEY (nazionedinascita) REFERENCES nazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personefisiche ADD CONSTRAINT FK_4E5327984B1539D8 FOREIGN KEY (madre) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE annotazioni ADD CONSTRAINT FK_AC15F1E16736B74 FOREIGN KEY (alunno) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE annotazioni ADD CONSTRAINT FK_AC15F1EFD9FCFA4 FOREIGN KEY (docente) REFERENCES personefisiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE annotazioni ADD CONSTRAINT FK_AC15F1E8F87BF96 FOREIGN KEY (classe) REFERENCES classi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE indirizziscolastici ADD CONSTRAINT FK_59A507153AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personegiuridiche ADD CONSTRAINT FK_9C42586C3403AD59 FOREIGN KEY (personagiuridica) REFERENCES soggetti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personegiuridiche ADD CONSTRAINT FK_9C42586C9F823A92 FOREIGN KEY (tipopersonagiuridica) REFERENCES tipipersonegiuridiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE personegiuridiche ADD CONSTRAINT FK_9C42586CF52C2B3D FOREIGN KEY (nazione) REFERENCES nazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE materie ADD CONSTRAINT FK_6A9D969DD133DBAF FOREIGN KEY (metrica) REFERENCES metriche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE materie ADD CONSTRAINT FK_6A9D969D53AEA9EF FOREIGN KEY (istituto) REFERENCES istituti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE valutazioniqualifiche ADD CONSTRAINT FK_2556BFE1BAC56C7A FOREIGN KEY (voto) REFERENCES voti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE valutazioniqualifiche ADD CONSTRAINT FK_2556BFE1B63C9C95 FOREIGN KEY (valutazione) REFERENCES valutazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE valutazioniqualifiche ADD CONSTRAINT FK_2556BFE1E9AF05A FOREIGN KEY (qualifica) REFERENCES qualifiche (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE indirizzi ADD CONSTRAINT FK_FE4E099CEF28B300 FOREIGN KEY (tipoindirizzo) REFERENCES tipiindirizzi (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE indirizzi ADD CONSTRAINT FK_FE4E099CCDBEE62F FOREIGN KEY (soggetto) REFERENCES soggetti (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE indirizzi ADD CONSTRAINT FK_FE4E099CF52C2B3D FOREIGN KEY (nazione) REFERENCES nazioni (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
| marcoalbarelli/PostgreSQL | doctrine_generated_schema.sql | SQL | agpl-3.0 | 34,154 | [
30522,
3443,
2795,
4632,
2368,
4371,
1006,
8909,
20014,
2025,
19701,
1010,
2632,
4609,
3630,
20014,
12398,
19701,
1010,
9986,
15781,
20014,
12398,
19701,
1010,
21025,
19966,
18513,
16103,
5643,
20014,
12398,
19701,
1010,
2465,
2063,
20014,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package server
import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"strings"
"sync"
"sync/atomic"
"text/template"
"time"
"github.com/TV4/graceful"
"github.com/gogap/config"
"github.com/gogap/go-wkhtmltox/wkhtmltox"
"github.com/gorilla/mux"
"github.com/phyber/negroni-gzip/gzip"
"github.com/rs/cors"
"github.com/spf13/cast"
"github.com/urfave/negroni"
)
const (
defaultTemplateText = `{"code":{{.Code}},"message":"{{.Message}}"{{if .Result}},"result":{{.Result|jsonify}}{{end}}}`
)
var (
htmlToX *wkhtmltox.WKHtmlToX
renderTmpls = make(map[string]*template.Template)
defaultTmpl *template.Template
)
type ConvertData struct {
Data []byte `json:"data"`
}
type ConvertArgs struct {
To string `json:"to"`
Fetcher wkhtmltox.FetcherOptions `json:"fetcher"`
Converter json.RawMessage `json:"converter"`
Template string `json:"template"`
}
type TemplateArgs struct {
To string
ConvertResponse
Response *RespHelper
}
type ConvertResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Result interface{} `json:"result"`
}
type serverWrapper struct {
tls bool
certFile string
keyFile string
reqNumber int64
addr string
n *negroni.Negroni
timeout time.Duration
}
func (p *serverWrapper) ServeHTTP(w http.ResponseWriter, r *http.Request) {
atomic.AddInt64(&p.reqNumber, 1)
defer atomic.AddInt64(&p.reqNumber, -1)
p.n.ServeHTTP(w, r)
}
func (p *serverWrapper) ListenAndServe() (err error) {
if p.tls {
err = http.ListenAndServeTLS(p.addr, p.certFile, p.keyFile, p)
} else {
err = http.ListenAndServe(p.addr, p)
}
return
}
func (p *serverWrapper) Shutdown(ctx context.Context) error {
num := atomic.LoadInt64(&p.reqNumber)
schema := "HTTP"
if p.tls {
schema = "HTTPS"
}
beginTime := time.Now()
for num > 0 {
time.Sleep(time.Second)
timeDiff := time.Now().Sub(beginTime)
if timeDiff > p.timeout {
break
}
}
log.Printf("[%s] Shutdown finished, Address: %s\n", schema, p.addr)
return nil
}
type WKHtmlToXServer struct {
conf config.Configuration
servers []*serverWrapper
}
func New(conf config.Configuration) (srv *WKHtmlToXServer, err error) {
serviceConf := conf.GetConfig("service")
wkHtmlToXConf := conf.GetConfig("wkhtmltox")
htmlToX, err = wkhtmltox.New(wkHtmlToXConf)
if err != nil {
return
}
// init templates
defaultTmpl, err = template.New("default").Funcs(funcMap).Parse(defaultTemplateText)
if err != nil {
return
}
err = loadTemplates(
serviceConf.GetConfig("templates"),
)
if err != nil {
return
}
// init http server
c := cors.New(
cors.Options{
AllowedOrigins: serviceConf.GetStringList("cors.allowed-origins"),
AllowedMethods: serviceConf.GetStringList("cors.allowed-methods"),
AllowedHeaders: serviceConf.GetStringList("cors.allowed-headers"),
ExposedHeaders: serviceConf.GetStringList("cors.exposed-headers"),
AllowCredentials: serviceConf.GetBoolean("cors.allow-credentials"),
MaxAge: int(serviceConf.GetInt64("cors.max-age")),
OptionsPassthrough: serviceConf.GetBoolean("cors.options-passthrough"),
Debug: serviceConf.GetBoolean("cors.debug"),
},
)
r := mux.NewRouter()
pathPrefix := serviceConf.GetString("path", "/")
r.PathPrefix(pathPrefix).Path("/convert").
Methods("POST").
HandlerFunc(handleHtmlToX)
r.PathPrefix(pathPrefix).Path("/ping").
Methods("GET", "HEAD").HandlerFunc(
func(rw http.ResponseWriter, req *http.Request) {
rw.Header().Set("Content-Type", "text/plain; charset=utf-8")
rw.Write([]byte("pong"))
},
)
n := negroni.Classic()
n.Use(c) // use cors
if serviceConf.GetBoolean("gzip-enabled", true) {
n.Use(gzip.Gzip(gzip.DefaultCompression))
}
n.UseHandler(r)
gracefulTimeout := serviceConf.GetTimeDuration("graceful.timeout", time.Second*3)
enableHTTP := serviceConf.GetBoolean("http.enabled", true)
enableHTTPS := serviceConf.GetBoolean("https.enabled", false)
var servers []*serverWrapper
if enableHTTP {
listenAddr := serviceConf.GetString("http.address", "127.0.0.1:8080")
httpServer := &serverWrapper{
n: n,
timeout: gracefulTimeout,
addr: listenAddr,
}
servers = append(servers, httpServer)
}
if enableHTTPS {
listenAddr := serviceConf.GetString("http.address", "127.0.0.1:443")
certFile := serviceConf.GetString("https.cert")
keyFile := serviceConf.GetString("https.key")
httpsServer := &serverWrapper{
n: n,
timeout: gracefulTimeout,
addr: listenAddr,
tls: true,
certFile: certFile,
keyFile: keyFile,
}
servers = append(servers, httpsServer)
}
srv = &WKHtmlToXServer{
conf: conf,
servers: servers,
}
return
}
func (p *WKHtmlToXServer) Run() (err error) {
wg := sync.WaitGroup{}
wg.Add(len(p.servers))
for i := 0; i < len(p.servers); i++ {
go func(srv *serverWrapper) {
defer wg.Done()
shcema := "HTTP"
if srv.tls {
shcema = "HTTPS"
}
log.Printf("[%s] Listening on %s\n", shcema, srv.addr)
graceful.ListenAndServe(srv)
}(p.servers[i])
}
wg.Wait()
return
}
func writeResp(rw http.ResponseWriter, convertArgs ConvertArgs, resp ConvertResponse) {
var tmpl *template.Template
if len(convertArgs.Template) == 0 {
tmpl = defaultTmpl
} else {
var exist bool
tmpl, exist = renderTmpls[convertArgs.Template]
if !exist {
tmpl = defaultTmpl
}
}
respHelper := newRespHelper(rw)
args := TemplateArgs{
To: convertArgs.To,
ConvertResponse: resp,
Response: respHelper,
}
buf := bytes.NewBuffer(nil)
err := tmpl.Execute(buf, args)
if err != nil {
log.Println(err)
}
if !respHelper.Holding() {
rw.Write(buf.Bytes())
}
}
func handleHtmlToX(rw http.ResponseWriter, req *http.Request) {
decoder := json.NewDecoder(req.Body)
decoder.UseNumber()
args := ConvertArgs{}
err := decoder.Decode(&args)
if err != nil {
writeResp(rw, args, ConvertResponse{http.StatusBadRequest, err.Error(), nil})
return
}
if len(args.Converter) == 0 {
writeResp(rw, args, ConvertResponse{http.StatusBadRequest, "converter is nil", nil})
return
}
to := strings.ToUpper(args.To)
var opts wkhtmltox.ConvertOptions
if to == "IMAGE" {
opts = &wkhtmltox.ToImageOptions{}
} else if to == "PDF" {
opts = &wkhtmltox.ToPDFOptions{}
} else {
writeResp(rw, args, ConvertResponse{http.StatusBadRequest, "argument of to is illegal (image|pdf)", nil})
return
}
err = json.Unmarshal(args.Converter, opts)
if err != nil {
writeResp(rw, args, ConvertResponse{http.StatusBadRequest, err.Error(), nil})
return
}
var convData []byte
convData, err = htmlToX.Convert(args.Fetcher, opts)
if err != nil {
writeResp(rw, args, ConvertResponse{http.StatusBadRequest, err.Error(), nil})
return
}
writeResp(rw, args, ConvertResponse{0, "", ConvertData{Data: convData}})
return
}
func loadTemplates(tmplsConf config.Configuration) (err error) {
if tmplsConf == nil {
return
}
tmpls := tmplsConf.Keys()
for _, name := range tmpls {
file := tmplsConf.GetString(name + ".template")
tmpl := template.New(name).Funcs(funcMap)
var data []byte
data, err = ioutil.ReadFile(file)
if err != nil {
return
}
tmpl, err = tmpl.Parse(string(data))
if err != nil {
return
}
renderTmpls[name] = tmpl
}
return
}
type RespHelper struct {
rw http.ResponseWriter
hold bool
}
func newRespHelper(rw http.ResponseWriter) *RespHelper {
return &RespHelper{
rw: rw,
hold: false,
}
}
func (p *RespHelper) SetHeader(key, value interface{}) error {
k := cast.ToString(key)
v := cast.ToString(value)
p.rw.Header().Set(k, v)
return nil
}
func (p *RespHelper) Hold(v interface{}) error {
h := cast.ToBool(v)
p.hold = h
return nil
}
func (p *RespHelper) Holding() bool {
return p.hold
}
func (p *RespHelper) Write(data []byte) error {
p.rw.Write(data)
return nil
}
func (p *RespHelper) WriteHeader(code interface{}) error {
c, err := cast.ToIntE(code)
if err != nil {
return err
}
p.rw.WriteHeader(c)
return nil
}
| gogap/go-wkhtmltox | server/server.go | GO | apache-2.0 | 8,166 | [
30522,
7427,
8241,
12324,
1006,
1000,
27507,
1000,
1000,
6123,
1000,
1000,
17181,
1013,
1046,
3385,
1000,
1000,
22834,
1013,
22834,
21823,
2140,
1000,
1000,
8833,
1000,
1000,
5658,
1013,
8299,
1000,
1000,
7817,
1000,
1000,
26351,
1000,
1000... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace Poker;
use Faker\Factory;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class RandomGame extends GameCommand
{
use GameTrait;
/**
* Configures the current command.
*/
public function configure()
{
$this->setName('random')
->setDescription('Just random some people and start a poker game.')
->addOption('number', null, InputOption::VALUE_OPTIONAL, 'set player number of this game.', 2);
}
/**
* Executes the current command.
*/
public function execute(InputInterface $input, OutputInterface $output)
{
$number = $input->getOption('number');
$faker = Factory::create();
for ($i=0; $i < $number; $i++) {
$username = $faker->firstname;
$hand = $this->random->generateHand();
$hands[] = $hand;
$rows[] = [$username, implode(' ', $hand)];
$data[] = [$username, $this->transfer->toFlowers(implode(' ', $hand))];
}
$this->exercuteGame($input, $output, $data, $rows, $hands);
}
}
| RryLee/phppoker | src/RandomGame.php | PHP | mit | 1,239 | [
30522,
1026,
1029,
25718,
3415,
15327,
11662,
1025,
2224,
8275,
2099,
1032,
4713,
1025,
2224,
25353,
2213,
14876,
4890,
1032,
6922,
1032,
10122,
1032,
2393,
2121,
1032,
2795,
1025,
2224,
25353,
2213,
14876,
4890,
1032,
6922,
1032,
10122,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Install script for directory: /Users/WilliamSinclair/Documents/jeff-launcher/backend/src/Utilities
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/local")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "Release")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Install shared libraries without execute permission?
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
set(CMAKE_INSTALL_SO_NO_EXE "0")
endif()
| kloke-source/jeff-launcher | build/backend/src/Utilities/cmake_install.cmake | CMake | gpl-3.0 | 1,030 | [
30522,
1001,
16500,
5896,
2005,
14176,
1024,
1013,
5198,
1013,
3766,
2378,
20464,
11215,
1013,
5491,
1013,
5076,
1011,
22742,
1013,
2067,
10497,
1013,
5034,
2278,
1013,
16548,
1001,
2275,
1996,
16500,
17576,
2065,
1006,
2025,
4225,
4642,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
if(!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
require_once ('include/upload_file.php');
// User is used to store Forecast information.
class Document extends SugarBean {
var $id;
var $document_name;
var $description;
var $category_id;
var $subcategory_id;
var $status_id;
var $status;
var $created_by;
var $date_entered;
var $date_modified;
var $modified_user_id;
var $assigned_user_id;
var $active_date;
var $exp_date;
var $document_revision_id;
var $filename;
var $doc_type;
var $img_name;
var $img_name_bare;
var $related_doc_id;
var $related_doc_name;
var $related_doc_rev_id;
var $related_doc_rev_number;
var $is_template;
var $template_type;
//additional fields.
var $revision;
var $last_rev_create_date;
var $last_rev_created_by;
var $last_rev_created_name;
var $file_url;
var $file_url_noimage;
var $table_name = "documents";
var $object_name = "Document";
var $user_preferences;
var $encodeFields = Array ();
// This is used to retrieve related fields from form posts.
var $additional_column_fields = Array ('revision');
var $new_schema = true;
var $module_dir = 'Documents';
var $save_file;
var $relationship_fields = Array(
'contract_id'=>'contracts',
);
function Document() {
parent :: SugarBean();
$this->setupCustomFields('Documents'); //parameter is module name
$this->disable_row_level_security = false;
}
function save($check_notify = false) {
if (empty($this->doc_type)) {
$this->doc_type = 'Sugar';
}
if (empty($this->id) || $this->new_with_id)
{
if (empty($this->id)) {
$this->id = create_guid();
$this->new_with_id = true;
}
if ( isset($_REQUEST) && isset($_REQUEST['duplicateSave']) && $_REQUEST['duplicateSave'] == true && isset($_REQUEST['filename_old_doctype']) ) {
$this->doc_type = $_REQUEST['filename_old_doctype'];
$isDuplicate = true;
} else {
$isDuplicate = false;
}
$Revision = new DocumentRevision();
//save revision.
$Revision->in_workflow = true;
$Revision->not_use_rel_in_req = true;
$Revision->new_rel_id = $this->id;
$Revision->new_rel_relname = 'Documents';
$Revision->change_log = translate('DEF_CREATE_LOG','Documents');
$Revision->revision = $this->revision;
$Revision->document_id = $this->id;
$Revision->filename = $this->filename;
if(isset($this->file_ext))
{
$Revision->file_ext = $this->file_ext;
}
if(isset($this->file_mime_type))
{
$Revision->file_mime_type = $this->file_mime_type;
}
$Revision->doc_type = $this->doc_type;
if ( isset($this->doc_id) ) {
$Revision->doc_id = $this->doc_id;
}
if ( isset($this->doc_url) ) {
$Revision->doc_url = $this->doc_url;
}
$Revision->id = create_guid();
$Revision->new_with_id = true;
$createRevision = false;
//Move file saved during populatefrompost to match the revision id rather than document id
if (!empty($_FILES['filename_file'])) {
rename(UploadFile :: get_url($this->filename, $this->id), UploadFile :: get_url($this->filename, $Revision->id));
$createRevision = true;
} else if ( $isDuplicate && ( empty($this->doc_type) || $this->doc_type == 'Sugar' ) ) {
// Looks like we need to duplicate a file, this is tricky
$oldDocument = new Document();
$oldDocument->retrieve($_REQUEST['duplicateId']);
$GLOBALS['log']->debug('Attempting to copy from '.UploadFile :: get_url($this->filename, $oldDocument->document_revision_id).' to '.UploadFile :: get_url($this->filename, $Revision->id));
copy(UploadFile :: get_url($this->filename, $oldDocument->document_revision_id), UploadFile :: get_url($this->filename, $Revision->id));
$createRevision = true;
}
// For external documents, we just need to make sure we have a doc_id
if ( !empty($this->doc_id) && $this->doc_type != 'Sugar' ) {
$createRevision = true;
}
if ( $createRevision ) {
$Revision->save();
//update document with latest revision id
$this->process_save_dates=false; //make sure that conversion does not happen again.
$this->document_revision_id = $Revision->id;
}
//set relationship field values if contract_id is passed (via subpanel create)
if (!empty($_POST['contract_id'])) {
$save_revision['document_revision_id']=$this->document_revision_id;
$this->load_relationship('contracts');
$this->contracts->add($_POST['contract_id'],$save_revision);
}
if ((isset($_POST['load_signed_id']) and !empty($_POST['load_signed_id']))) {
$query="update linked_documents set deleted=1 where id='".$_POST['load_signed_id']."'";
$this->db->query($query);
}
}
return parent :: save($check_notify);
}
function get_summary_text() {
return "$this->document_name";
}
function is_authenticated() {
return $this->authenticated;
}
function fill_in_additional_list_fields() {
$this->fill_in_additional_detail_fields();
}
function fill_in_additional_detail_fields() {
global $theme;
global $current_language;
global $timedate;
global $locale;
parent::fill_in_additional_detail_fields();
$mod_strings = return_module_language($current_language, 'Documents');
if (!empty($this->document_revision_id)) {
$query = "SELECT users.first_name AS first_name, users.last_name AS last_name,document_revisions.date_entered AS rev_date, document_revisions.filename AS filename, document_revisions.revision AS revision, document_revisions.file_ext AS file_ext FROM users, document_revisions WHERE users.id = document_revisions.created_by AND document_revisions.id = '$this->document_revision_id'";
$result = $this->db->query($query);
$row = $this->db->fetchByAssoc($result);
//populate name
if(isset($this->document_name))
{
$this->name = $this->document_name;
}
if(isset($row['filename']))$this->filename = $row['filename'];
//$this->latest_revision = $row['revision'];
if(isset($row['revision']))$this->revision = $row['revision'];
//populate the file url.
//image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions.
//if file is not found then default image file will be used.
global $img_name;
global $img_name_bare;
if (!empty ($row['file_ext'])) {
$img_name = SugarThemeRegistry::current()->getImageURL(strtolower($row['file_ext'])."_image_inline.gif");
$img_name_bare = strtolower($row['file_ext'])."_image_inline";
}
}
//set default file name.
if (!empty ($img_name) && file_exists($img_name)) {
$img_name = $img_name_bare;
} else {
$img_name = "def_image_inline"; //todo change the default image.
}
if($this->ACLAccess('DetailView')){
$file_url = "<a href='index.php?entryPoint=download&id=".basename(UploadFile :: get_url($this->filename, $this->document_revision_id))."&type=Documents' target='_blank'>".SugarThemeRegistry::current()->getImage($img_name, 'alt="'.$mod_strings['LBL_LIST_VIEW_DOCUMENT'].'" border="0"')."</a>";
if(!empty($this->doc_type) && $this->doc_type != 'Sugar' && !empty($this->doc_url))
$file_url= "<a href='".$this->doc_url."' target='_blank'>".SugarThemeRegistry::current()->getImage($this->doc_type.'_image_inline', 'alt="'.$mod_strings['LBL_LIST_VIEW_DOCUMENT'].'" border="0"',null,null,'.png')."</a>";
$this->file_url = $file_url;
$this->file_url_noimage = basename(UploadFile :: get_url($this->filename, $this->document_revision_id));
}else{
$this->file_url = "";
$this->file_url_noimage = "";
}
//get last_rev_by user name.
if (!empty ($row)) {
$this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
$this->last_rev_create_date = $timedate->to_display_date_time($row['rev_date']);
}
global $app_list_strings;
if(!empty($this->status_id)) {
//_pp($this->status_id);
$this->status = $app_list_strings['document_status_dom'][$this->status_id];
}
if (!empty($this->related_doc_id)) {
$this->related_doc_name = Document::get_document_name($this->related_doc_id);
$this->related_doc_rev_number = DocumentRevision::get_document_revision_name($this->related_doc_rev_id);
}
$this->save_file = basename($this->file_url_noimage);
}
function list_view_parse_additional_sections(& $list_form, $xTemplateSection) {
return $list_form;
}
function create_export_query(&$order_by, &$where, $relate_link_join='')
{
$custom_join = $this->custom_fields->getJOIN(true, true,$where);
if($custom_join)
$custom_join['join'] .= $relate_link_join;
$query = "SELECT
documents.*";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM documents ";
if($custom_join){
$query .= $custom_join['join'];
}
$where_auto = " documents.deleted = 0";
if ($where != "")
$query .= " WHERE $where AND ".$where_auto;
else
$query .= " WHERE ".$where_auto;
if ($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY documents.document_name";
return $query;
}
function get_list_view_data() {
global $current_language;
$app_list_strings = return_app_list_strings_language($current_language);
$document_fields = $this->get_list_view_array();
$this->fill_in_additional_list_fields();
$document_fields['FILENAME'] = $this->filename;
$document_fields['FILE_URL'] = $this->file_url;
$document_fields['FILE_URL_NOIMAGE'] = $this->file_url_noimage;
$document_fields['LAST_REV_CREATED_BY'] = $this->last_rev_created_name;
$document_fields['CATEGORY_ID'] = empty ($this->category_id) ? "" : $app_list_strings['document_category_dom'][$this->category_id];
$document_fields['SUBCATEGORY_ID'] = empty ($this->subcategory_id) ? "" : $app_list_strings['document_subcategory_dom'][$this->subcategory_id];
$document_fields['NAME'] = $this->document_name;
$document_fields['DOCUMENT_NAME_JAVASCRIPT'] = $GLOBALS['db']->helper->escape_quote($document_fields['DOCUMENT_NAME']);
return $document_fields;
}
function mark_relationships_deleted($id) {
//do nothing, this call is here to avoid default delete processing since
//delete.php handles deletion of document revisions.
}
function bean_implements($interface) {
switch ($interface) {
case 'ACL' :
return true;
}
return false;
}
//static function.
function get_document_name($doc_id){
if (empty($doc_id)) return null;
$db = DBManagerFactory::getInstance();
$query="select document_name from documents where id='$doc_id'";
$result=$db->query($query);
if (!empty($result)) {
$row=$db->fetchByAssoc($result);
if (!empty($row)) {
return $row['document_name'];
}
}
return null;
}
}
require_once('modules/Documents/DocumentExternalApiDropDown.php');
| shahrooz33ce/sugarcrm | modules/Documents/Document.php | PHP | agpl-3.0 | 13,892 | [
30522,
1026,
1029,
25718,
2065,
1006,
999,
4225,
1006,
1005,
5699,
4765,
2854,
1005,
1007,
1064,
1064,
999,
5699,
4765,
2854,
1007,
3280,
1006,
1005,
2025,
1037,
9398,
4443,
30524,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package org.stagemonitor.requestmonitor.ejb;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.returns;
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
import net.bytebuddy.matcher.ElementMatchers;
class IsDeclaredInInterfaceHierarchyElementMatcher implements ElementMatcher<TypeDescription> {
private final MethodDescription.InDefinedShape targetMethod;
static ElementMatcher<TypeDescription> isDeclaredInInterfaceHierarchy(MethodDescription.InDefinedShape method) {
return new IsDeclaredInInterfaceHierarchyElementMatcher(method);
}
public IsDeclaredInInterfaceHierarchyElementMatcher(MethodDescription.InDefinedShape targetMethod) {
this.targetMethod = targetMethod;
}
@Override
public boolean matches(TypeDescription targetInterface) {
if (ElementMatchers.declaresMethod(named(targetMethod.getName())
.and(returns(targetMethod.getReturnType().asErasure()))
.and(takesArguments(targetMethod.getParameters().asTypeList().asErasures())))
.matches(targetInterface)) {
return true;
} else {
for (TypeDescription typeDescription : targetInterface.getInterfaces().asErasures()) {
if (matches(typeDescription)) {
return true;
}
}
}
return false;
}
}
| trampi/stagemonitor | stagemonitor-requestmonitor/src/main/java/org/stagemonitor/requestmonitor/ejb/IsDeclaredInInterfaceHierarchyElementMatcher.java | Java | apache-2.0 | 1,446 | [
30522,
7427,
8917,
1012,
2754,
8202,
15660,
1012,
5227,
8202,
15660,
1012,
1041,
3501,
2497,
1025,
12324,
10763,
5658,
1012,
24880,
8569,
14968,
1012,
2674,
2121,
1012,
5783,
18900,
21844,
1012,
2315,
1025,
12324,
10763,
5658,
1012,
24880,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace app\models;
use Yii;
use yii\base\Model;
/**
* LoginForm is the model behind the login form.
*
* @property User|null $user This property is read-only.
*
*/
class AdminLogin extends Model
{
public $username;
public $password;
public $rememberMe = true;
private $_user = false;
/**
* @return array the validation rules.
*/
public function rules()
{
return [
// username and password are both required
[['username', 'password'], 'required'],
// rememberMe must be a boolean value
['rememberMe', 'boolean'],
// password is validated by validatePassword()
['password', 'validatePassword'],
];
}
/**
* Validates the password.
* This method serves as the inline validation for password.
*
* @param string $attribute the attribute currently being validated
* @param array $params the additional name-value pairs given in the rule
*/
public function validatePassword($attribute, $params)
{
if (!$this->hasErrors()) {
$user = $this->getUser();
if (!$user || !$user->validatePassword($this->password)) {
$this->addError($attribute, 'Incorrect username or password.');
}
}
}
/**
* Logs in a user using the provided username and password.
* @return bool whether the user is logged in successfully
*/
public function login()
{
if ($this->validate()) {
return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);
}
return false;
}
/**
* Finds user by [[username]]
*
* @return User|null
*/
public function getUser()
{
if ($this->_user === false) {
$this->_user = User::findByUsername($this->username);
}
return $this->_user;
}
}
| Chotainghe/chotainghe | YiiBasic/models/AdminLogin.php | PHP | mit | 1,953 | [
30522,
1026,
1029,
25718,
3415,
15327,
10439,
1032,
4275,
1025,
2224,
12316,
2072,
1025,
2224,
12316,
2072,
1032,
2918,
1032,
2944,
1025,
1013,
1008,
1008,
1008,
8833,
2378,
14192,
2003,
1996,
2944,
2369,
1996,
8833,
2378,
2433,
1012,
1008,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#define _ASM_GENERIC_PCI_DMA_COMPAT_H
#include <linux/dma-mapping.h>
#define dma_map_single_attrs(dev, cpu_addr, size, dir, attrs) \
dma_map_single(dev, cpu_addr, size, dir)
#define dma_unmap_single_attrs(dev, dma_addr, size, dir, attrs) \
dma_unmap_single(dev, dma_addr, size, dir)
#define dma_map_sg_attrs(dev, sgl, nents, dir, attrs) \
dma_map_sg(dev, sgl, nents, dir)
#define dma_unmap_sg_attrs(dev, sgl, nents, dir, attrs) \
dma_unmap_sg(dev, sgl, nents, dir)
static inline int
pci_dma_supported(struct pci_dev *hwdev, u64 mask)
{
return dma_supported(hwdev == NULL ? NULL : &hwdev->dev, mask);
}
static inline void *
pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
dma_addr_t *dma_handle)
{
return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, dma_handle, GFP_ATOMIC);
}
static inline void
pci_free_consistent(struct pci_dev *hwdev, size_t size,
void *vaddr, dma_addr_t dma_handle)
{
dma_free_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, vaddr, dma_handle);
}
static inline dma_addr_t
pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
return dma_map_single(hwdev == NULL ? NULL : &hwdev->dev, ptr, size, (enum dma_data_direction)direction);
}
static inline void
pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
dma_unmap_single(hwdev == NULL ? NULL : &hwdev->dev, dma_addr, size, (enum dma_data_direction)direction);
}
static inline dma_addr_t
pci_map_page(struct pci_dev *hwdev, struct page *page,
unsigned long offset, size_t size, int direction)
{
return dma_map_page(hwdev == NULL ? NULL : &hwdev->dev, page, offset, size, (enum dma_data_direction)direction);
}
static inline void
pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address,
size_t size, int direction)
{
dma_unmap_page(hwdev == NULL ? NULL : &hwdev->dev, dma_address, size, (enum dma_data_direction)direction);
}
static inline int
pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
return dma_map_sg(hwdev == NULL ? NULL : &hwdev->dev, sg, nents, (enum dma_data_direction)direction);
}
static inline void
pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
dma_unmap_sg(hwdev == NULL ? NULL : &hwdev->dev, sg, nents, (enum dma_data_direction)direction);
}
static inline void
pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, dma_addr_t dma_handle,
size_t size, int direction)
{
dma_sync_single_for_cpu(hwdev == NULL ? NULL : &hwdev->dev, dma_handle, size, (enum dma_data_direction)direction);
}
static inline void
pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t dma_handle,
size_t size, int direction)
{
dma_sync_single_for_device(hwdev == NULL ? NULL : &hwdev->dev, dma_handle, size, (enum dma_data_direction)direction);
}
static inline void
pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg,
int nelems, int direction)
{
dma_sync_sg_for_cpu(hwdev == NULL ? NULL : &hwdev->dev, sg, nelems, (enum dma_data_direction)direction);
}
static inline void
pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg,
int nelems, int direction)
{
dma_sync_sg_for_device(hwdev == NULL ? NULL : &hwdev->dev, sg, nelems, (enum dma_data_direction)direction);
}
static inline int
pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr)
{
return dma_mapping_error(&pdev->dev, dma_addr);
}
#ifdef CONFIG_PCI
static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
{
return dma_set_mask(&dev->dev, mask);
}
static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
{
return dma_set_coherent_mask(&dev->dev, mask);
}
#endif
| Team-SennyC2/android_kernel_htc_villec2 | include/asm-generic/pci-dma-compat.h | C | gpl-2.0 | 3,749 | [
30522,
1001,
9375,
1035,
2004,
2213,
1035,
12391,
1035,
7473,
2072,
1035,
1040,
2863,
1035,
4012,
4502,
2102,
1035,
1044,
1001,
2421,
1026,
11603,
1013,
1040,
2863,
1011,
12375,
1012,
1044,
1028,
1001,
9375,
1040,
2863,
1035,
4949,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* Contains all client objects for the ExchangeRateService
* service.
*
* PHP version 5
*
* Copyright 2016, Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package GoogleApiAdsDfp
* @subpackage v201605
* @category WebServices
* @copyright 2016, Google Inc. All Rights Reserved.
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License,
* Version 2.0
*/
require_once "Google/Api/Ads/Dfp/Lib/DfpSoapClient.php";
if (!class_exists("ApiError", false)) {
/**
* The API error base class that provides details about an error that occurred
* while processing a service request.
*
* <p>The OGNL field path is provided for parsers to identify the request data
* element that may have caused the error.</p>
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ApiError";
/**
* @access public
* @var string
*/
public $fieldPath;
/**
* @access public
* @var string
*/
public $trigger;
/**
* @access public
* @var string
*/
public $errorString;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($fieldPath = null, $trigger = null, $errorString = null) {
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("ApiVersionError", false)) {
/**
* Errors related to the usage of API versions.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ApiVersionError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ApiVersionError";
/**
* @access public
* @var tnsApiVersionErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("ApplicationException", false)) {
/**
* Base class for exceptions.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ApplicationException {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ApplicationException";
/**
* @access public
* @var string
*/
public $message;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($message = null) {
$this->message = $message;
}
}
}
if (!class_exists("AuthenticationError", false)) {
/**
* An error for an exception that occurred when authenticating.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class AuthenticationError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "AuthenticationError";
/**
* @access public
* @var tnsAuthenticationErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("CollectionSizeError", false)) {
/**
* Error for the size of the collection being too large
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class CollectionSizeError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "CollectionSizeError";
/**
* @access public
* @var tnsCollectionSizeErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("CommonError", false)) {
/**
* A place for common errors that can be used across services.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class CommonError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "CommonError";
/**
* @access public
* @var tnsCommonErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("Date", false)) {
/**
* Represents a date.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class Date {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "Date";
/**
* @access public
* @var integer
*/
public $year;
/**
* @access public
* @var integer
*/
public $month;
/**
* @access public
* @var integer
*/
public $day;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($year = null, $month = null, $day = null) {
$this->year = $year;
$this->month = $month;
$this->day = $day;
}
}
}
if (!class_exists("DfpDateTime", false)) {
/**
* Represents a date combined with the time of day.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class DfpDateTime {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "DateTime";
/**
* @access public
* @var Date
*/
public $date;
/**
* @access public
* @var integer
*/
public $hour;
/**
* @access public
* @var integer
*/
public $minute;
/**
* @access public
* @var integer
*/
public $second;
/**
* @access public
* @var string
*/
public $timeZoneID;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($date = null, $hour = null, $minute = null, $second = null, $timeZoneID = null) {
$this->date = $date;
$this->hour = $hour;
$this->minute = $minute;
$this->second = $second;
$this->timeZoneID = $timeZoneID;
}
}
}
if (!class_exists("ExchangeRateAction", false)) {
/**
* Represents the actions that can be performed on {@link ExchangeRate} objects.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRateAction {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ExchangeRateAction";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("ExchangeRate", false)) {
/**
* An {@code ExchangeRate} represents a currency which is one of the
* {@link Network#secondaryCurrencyCodes}, and the latest exchange rate between this currency and
* {@link Network#currencyCode}.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRate {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ExchangeRate";
/**
* @access public
* @var integer
*/
public $id;
/**
* @access public
* @var string
*/
public $currencyCode;
/**
* @access public
* @var tnsExchangeRateRefreshRate
*/
public $refreshRate;
/**
* @access public
* @var tnsExchangeRateDirection
*/
public $direction;
/**
* @access public
* @var integer
*/
public $exchangeRate;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($id = null, $currencyCode = null, $refreshRate = null, $direction = null, $exchangeRate = null) {
$this->id = $id;
$this->currencyCode = $currencyCode;
$this->refreshRate = $refreshRate;
$this->direction = $direction;
$this->exchangeRate = $exchangeRate;
}
}
}
if (!class_exists("ExchangeRateError", false)) {
/**
* Lists all errors associated with {@link ExchangeRate} objects.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRateError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ExchangeRateError";
/**
* @access public
* @var tnsExchangeRateErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("ExchangeRatePage", false)) {
/**
* Captures a page of {@link ExchangeRate} objects.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRatePage {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ExchangeRatePage";
/**
* @access public
* @var ExchangeRate[]
*/
public $results;
/**
* @access public
* @var integer
*/
public $startIndex;
/**
* @access public
* @var integer
*/
public $totalResultSetSize;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($results = null, $startIndex = null, $totalResultSetSize = null) {
$this->results = $results;
$this->startIndex = $startIndex;
$this->totalResultSetSize = $totalResultSetSize;
}
}
}
if (!class_exists("FeatureError", false)) {
/**
* Errors related to feature management. If you attempt using a feature that is not available to
* the current network you'll receive a FeatureError with the missing feature as the trigger.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class FeatureError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "FeatureError";
/**
* @access public
* @var tnsFeatureErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("InternalApiError", false)) {
/**
* Indicates that a server-side error has occured. {@code InternalApiError}s
* are generally not the result of an invalid request or message sent by the
* client.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class InternalApiError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "InternalApiError";
/**
* @access public
* @var tnsInternalApiErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("NotNullError", false)) {
/**
* Caused by supplying a null value for an attribute that cannot be null.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class NotNullError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "NotNullError";
/**
* @access public
* @var tnsNotNullErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("ParseError", false)) {
/**
* Lists errors related to parsing.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ParseError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ParseError";
/**
* @access public
* @var tnsParseErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("PermissionError", false)) {
/**
* Errors related to incorrect permission.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PermissionError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "PermissionError";
/**
* @access public
* @var tnsPermissionErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("PublisherQueryLanguageContextError", false)) {
/**
* An error that occurs while executing a PQL query contained in
* a {@link Statement} object.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PublisherQueryLanguageContextError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "PublisherQueryLanguageContextError";
/**
* @access public
* @var tnsPublisherQueryLanguageContextErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("PublisherQueryLanguageSyntaxError", false)) {
/**
* An error that occurs while parsing a PQL query contained in a
* {@link Statement} object.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PublisherQueryLanguageSyntaxError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "PublisherQueryLanguageSyntaxError";
/**
* @access public
* @var tnsPublisherQueryLanguageSyntaxErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("QuotaError", false)) {
/**
* Describes a client-side error on which a user is attempting
* to perform an action to which they have no quota remaining.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class QuotaError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "QuotaError";
/**
* @access public
* @var tnsQuotaErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("RequiredCollectionError", false)) {
/**
* A list of all errors to be used for validating sizes of collections.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class RequiredCollectionError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "RequiredCollectionError";
/**
* @access public
* @var tnsRequiredCollectionErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("RequiredError", false)) {
/**
* Errors due to missing required field.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class RequiredError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "RequiredError";
/**
* @access public
* @var tnsRequiredErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("RequiredNumberError", false)) {
/**
* A list of all errors to be used in conjunction with required number
* validators.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class RequiredNumberError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "RequiredNumberError";
/**
* @access public
* @var tnsRequiredNumberErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("ServerError", false)) {
/**
* Errors related to the server.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ServerError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ServerError";
/**
* @access public
* @var tnsServerErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("SoapRequestHeader", false)) {
/**
* Represents the SOAP request header used by API requests.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class SoapRequestHeader {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "SoapRequestHeader";
/**
* @access public
* @var string
*/
public $networkCode;
/**
* @access public
* @var string
*/
public $applicationName;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($networkCode = null, $applicationName = null) {
$this->networkCode = $networkCode;
$this->applicationName = $applicationName;
}
}
}
if (!class_exists("SoapResponseHeader", false)) {
/**
* Represents the SOAP request header used by API responses.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class SoapResponseHeader {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "SoapResponseHeader";
/**
* @access public
* @var string
*/
public $requestId;
/**
* @access public
* @var integer
*/
public $responseTime;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($requestId = null, $responseTime = null) {
$this->requestId = $requestId;
$this->responseTime = $responseTime;
}
}
}
if (!class_exists("Statement", false)) {
/**
* Captures the {@code WHERE}, {@code ORDER BY} and {@code LIMIT} clauses of a
* PQL query. Statements are typically used to retrieve objects of a predefined
* domain type, which makes SELECT clause unnecessary.
* <p>
* An example query text might be {@code "WHERE status = 'ACTIVE' ORDER BY id
* LIMIT 30"}.
* </p>
* <p>
* Statements support bind variables. These are substitutes for literals
* and can be thought of as input parameters to a PQL query.
* </p>
* <p>
* An example of such a query might be {@code "WHERE id = :idValue"}.
* </p>
* <p>
* Statements also support use of the LIKE keyword. This provides partial and
* wildcard string matching.
* </p>
* <p>
* An example of such a query might be {@code "WHERE name LIKE 'startswith%'"}.
* </p>
* The value for the variable idValue must then be set with an object of type
* {@link Value}, e.g., {@link NumberValue}, {@link TextValue} or
* {@link BooleanValue}.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class Statement {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "Statement";
/**
* @access public
* @var string
*/
public $query;
/**
* @access public
* @var String_ValueMapEntry[]
*/
public $values;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($query = null, $values = null) {
$this->query = $query;
$this->values = $values;
}
}
}
if (!class_exists("StatementError", false)) {
/**
* An error that occurs while parsing {@link Statement} objects.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class StatementError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "StatementError";
/**
* @access public
* @var tnsStatementErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("StringLengthError", false)) {
/**
* Errors for Strings which do not meet given length constraints.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class StringLengthError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "StringLengthError";
/**
* @access public
* @var tnsStringLengthErrorReason
*/
public $reason;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($reason = null, $fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->reason = $reason;
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("String_ValueMapEntry", false)) {
/**
* This represents an entry in a map with a key of type String
* and value of type Value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class String_ValueMapEntry {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "String_ValueMapEntry";
/**
* @access public
* @var string
*/
public $key;
/**
* @access public
* @var Value
*/
public $value;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($key = null, $value = null) {
$this->key = $key;
$this->value = $value;
}
}
}
if (!class_exists("UniqueError", false)) {
/**
* An error for a field which must satisfy a uniqueness constraint
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class UniqueError extends ApiError {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "UniqueError";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($fieldPath = null, $trigger = null, $errorString = null) {
parent::__construct();
$this->fieldPath = $fieldPath;
$this->trigger = $trigger;
$this->errorString = $errorString;
}
}
}
if (!class_exists("UpdateResult", false)) {
/**
* Represents the result of performing an action on objects.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class UpdateResult {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "UpdateResult";
/**
* @access public
* @var integer
*/
public $numChanges;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($numChanges = null) {
$this->numChanges = $numChanges;
}
}
}
if (!class_exists("Value", false)) {
/**
* {@code Value} represents a value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "Value";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("ApiVersionErrorReason", false)) {
/**
* Indicates that the operation is not allowed in the version the request
* was made in.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ApiVersionErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ApiVersionError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("AuthenticationErrorReason", false)) {
/**
* The SOAP message contains a request header with an ambiguous definition
* of the authentication header fields. This means either the {@code
* authToken} and {@code oAuthToken} fields were both null or both were
* specified. Exactly one value should be specified with each request.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class AuthenticationErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "AuthenticationError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("CollectionSizeErrorReason", false)) {
/**
* The value returned if the actual value is not exposed by the requested API version.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class CollectionSizeErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "CollectionSizeError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("CommonErrorReason", false)) {
/**
* Describes reasons for common errors
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class CommonErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "CommonError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("ExchangeRateDirection", false)) {
/**
* Determines which direction (from which currency to which currency) the exchange rate is in.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRateDirection {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ExchangeRateDirection";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("ExchangeRateErrorReason", false)) {
/**
* The reasons for the target error.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRateErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ExchangeRateError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("ExchangeRateRefreshRate", false)) {
/**
* Determines at which rate the exchange rate is refreshed.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRateRefreshRate {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ExchangeRateRefreshRate";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("FeatureErrorReason", false)) {
/**
* A feature is being used that is not enabled on the current network.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class FeatureErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "FeatureError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("InternalApiErrorReason", false)) {
/**
* The single reason for the internal API error.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class InternalApiErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "InternalApiError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("NotNullErrorReason", false)) {
/**
* The reasons for the target error.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class NotNullErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "NotNullError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("ParseErrorReason", false)) {
/**
* The reasons for the target error.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ParseErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ParseError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("PermissionErrorReason", false)) {
/**
* Describes reasons for permission errors.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PermissionErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "PermissionError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("PublisherQueryLanguageContextErrorReason", false)) {
/**
* The reasons for the target error.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PublisherQueryLanguageContextErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "PublisherQueryLanguageContextError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("PublisherQueryLanguageSyntaxErrorReason", false)) {
/**
* The reasons for the target error.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PublisherQueryLanguageSyntaxErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "PublisherQueryLanguageSyntaxError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("QuotaErrorReason", false)) {
/**
* The number of requests made per second is too high and has exceeded the
* allowable limit. The recommended approach to handle this error is to wait
* about 5 seconds and then retry the request. Note that this does not
* guarantee the request will succeed. If it fails again, try increasing the
* wait time.
* <p>
* Another way to mitigate this error is to limit requests to 2 per second for
* Small Business networks, or 8 per second for Premium networks. Once again
* this does not guarantee that every request will succeed, but may help
* reduce the number of times you receive this error.
* </p>
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class QuotaErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "QuotaError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("RequiredCollectionErrorReason", false)) {
/**
* A required collection is missing.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class RequiredCollectionErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "RequiredCollectionError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("RequiredErrorReason", false)) {
/**
* The reasons for the target error.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class RequiredErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "RequiredError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("RequiredNumberErrorReason", false)) {
/**
* Describes reasons for a number to be invalid.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class RequiredNumberErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "RequiredNumberError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("ServerErrorReason", false)) {
/**
* Describes reasons for server errors
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ServerErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ServerError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("StatementErrorReason", false)) {
/**
* A bind variable has not been bound to a value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class StatementErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "StatementError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("StringLengthErrorReason", false)) {
/**
* The value returned if the actual value is not exposed by the requested API version.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class StringLengthErrorReason {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "StringLengthError.Reason";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
}
}
}
if (!class_exists("CreateExchangeRates", false)) {
/**
* Creates new {@link ExchangeRate} objects.
*
* For each exchange rate, the following fields are required:
* <ul>
* <li>{@link ExchangeRate#currencyCode}</li>
* <li>{@link ExchangeRate#exchangeRate} when {@link ExchangeRate#refreshRate} is
* {@link ExchangeRateRefreshRate#FIXED}</li>
* </ul>
*
* @param exchangeRates the exchange rates to create
* @return the created exchange rates with their exchange rate values filled in
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class CreateExchangeRates {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var ExchangeRate[]
*/
public $exchangeRates;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($exchangeRates = null) {
$this->exchangeRates = $exchangeRates;
}
}
}
if (!class_exists("CreateExchangeRatesResponse", false)) {
/**
*
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class CreateExchangeRatesResponse {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var ExchangeRate[]
*/
public $rval;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($rval = null) {
$this->rval = $rval;
}
}
}
if (!class_exists("GetExchangeRatesByStatement", false)) {
/**
* Gets a {@link ExchangeRatePage} of {@link ExchangeRate} objects that satisfy the given
* {@link Statement#query}. The following fields are supported for filtering:
*
* <table>
* <tr>
* <th scope="col">PQL Property</th> <th scope="col">Object Property</th>
* </tr>
* <tr>
* <td>{@code id}</td>
* <td>{@link ExchangeRate#id}</td>
* </tr>
* <tr>
* <td>{@code currencyCode}</td>
* <td>{@link ExchangeRate#currencyCode}</td>
* </tr>
* <tr>
* <td>{@code refreshRate}</td>
* <td>{@link ExchangeRate#refreshRate}</td>
* </tr>
* <tr>
* <td>{@code direction}</td>
* <td>{@link ExchangeRate#direction}</td>
* </tr>
* <tr>
* <td>{@code exchangeRate}</td>
* <td>{@link ExchangeRate#exchangeRate}</td>
* </tr>
* </table>
*
* @param filterStatement a Publisher Query Language statement used to filter
* a set of exchange rates
* @return the exchange rates that match the given filter
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class GetExchangeRatesByStatement {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var Statement
*/
public $filterStatement;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($filterStatement = null) {
$this->filterStatement = $filterStatement;
}
}
}
if (!class_exists("GetExchangeRatesByStatementResponse", false)) {
/**
*
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class GetExchangeRatesByStatementResponse {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var ExchangeRatePage
*/
public $rval;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($rval = null) {
$this->rval = $rval;
}
}
}
if (!class_exists("PerformExchangeRateAction", false)) {
/**
* Performs an action on {@link ExchangeRate} objects that satisfy the given
* {@link Statement#query}. The following fields are supported for filtering:
*
* <table>
* <tr>
* <th scope="col">PQL Property</th> <th scope="col">Object Property</th>
* </tr>
* <tr>
* <td>{@code id}</td>
* <td>{@link ExchangeRate#id}</td>
* </tr>
* <tr>
* <td>{@code currencyCode}</td>
* <td>{@link ExchangeRate#currencyCode}</td>
* </tr>
* <tr>
* <td>{@code refreshRate}</td>
* <td>{@link ExchangeRate#refreshRate}</td>
* </tr>
* <tr>
* <td>{@code direction}</td>
* <td>{@link ExchangeRate#direction}</td>
* </tr>
* <tr>
* <td>{@code exchangeRate}</td>
* <td>{@link ExchangeRate#exchangeRate}</td>
* </tr>
* </table>
*
* @param exchangeRateAction the action to perform
* @param filterStatement a Publisher Query Language statement used to filter
* a set of exchange rates
* @return the result of the action performed
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PerformExchangeRateAction {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var ExchangeRateAction
*/
public $exchangeRateAction;
/**
* @access public
* @var Statement
*/
public $filterStatement;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($exchangeRateAction = null, $filterStatement = null) {
$this->exchangeRateAction = $exchangeRateAction;
$this->filterStatement = $filterStatement;
}
}
}
if (!class_exists("PerformExchangeRateActionResponse", false)) {
/**
*
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class PerformExchangeRateActionResponse {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var UpdateResult
*/
public $rval;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($rval = null) {
$this->rval = $rval;
}
}
}
if (!class_exists("UpdateExchangeRates", false)) {
/**
* Updates the specified {@link ExchangeRate} objects.
*
* @param exchangeRates the exchange rates to update
* @return the updated exchange rates
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class UpdateExchangeRates {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var ExchangeRate[]
*/
public $exchangeRates;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($exchangeRates = null) {
$this->exchangeRates = $exchangeRates;
}
}
}
if (!class_exists("UpdateExchangeRatesResponse", false)) {
/**
*
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class UpdateExchangeRatesResponse {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "";
/**
* @access public
* @var ExchangeRate[]
*/
public $rval;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($rval = null) {
$this->rval = $rval;
}
}
}
if (!class_exists("ObjectValue", false)) {
/**
* Contains an object value.
* <p>
* <b>This object is experimental!
* <code>ObjectValue</code> is an experimental, innovative, and rapidly
* changing new feature for DFP. Unfortunately, being on the bleeding edge means that we may make
* backwards-incompatible changes to
* <code>ObjectValue</code>. We will inform the community when this feature
* is no longer experimental.</b>
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ObjectValue extends Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ObjectValue";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
parent::__construct();
}
}
}
if (!class_exists("ApiException", false)) {
/**
* Exception class for holding a list of service errors.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ApiException extends ApplicationException {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "ApiException";
/**
* @access public
* @var ApiError[]
*/
public $errors;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($errors = null, $message = null) {
parent::__construct();
$this->errors = $errors;
$this->message = $message;
}
}
}
if (!class_exists("BooleanValue", false)) {
/**
* Contains a boolean value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class BooleanValue extends Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "BooleanValue";
/**
* @access public
* @var boolean
*/
public $value;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($value = null) {
parent::__construct();
$this->value = $value;
}
}
}
if (!class_exists("DateTimeValue", false)) {
/**
* Contains a date-time value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class DateTimeValue extends Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "DateTimeValue";
/**
* @access public
* @var DateTime
*/
public $value;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($value = null) {
parent::__construct();
$this->value = $value;
}
}
}
if (!class_exists("DateValue", false)) {
/**
* Contains a date value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class DateValue extends Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "DateValue";
/**
* @access public
* @var Date
*/
public $value;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($value = null) {
parent::__construct();
$this->value = $value;
}
}
}
if (!class_exists("DeleteExchangeRates", false)) {
/**
* The action used to delete {@link ExchangeRate} objects.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class DeleteExchangeRates extends ExchangeRateAction {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "DeleteExchangeRates";
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct() {
parent::__construct();
}
}
}
if (!class_exists("NumberValue", false)) {
/**
* Contains a numeric value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class NumberValue extends Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "NumberValue";
/**
* @access public
* @var string
*/
public $value;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($value = null) {
parent::__construct();
$this->value = $value;
}
}
}
if (!class_exists("SetValue", false)) {
/**
* Contains a set of {@link Value Values}. May not contain duplicates.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class SetValue extends Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "SetValue";
/**
* @access public
* @var Value[]
*/
public $values;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($values = null) {
parent::__construct();
$this->values = $values;
}
}
}
if (!class_exists("TextValue", false)) {
/**
* Contains a string value.
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class TextValue extends Value {
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const XSI_TYPE = "TextValue";
/**
* @access public
* @var string
*/
public $value;
/**
* Gets the namesapce of this class
* @return string the namespace of this class
*/
public function getNamespace() {
return self::WSDL_NAMESPACE;
}
/**
* Gets the xsi:type name of this class
* @return string the xsi:type name of this class
*/
public function getXsiTypeName() {
return self::XSI_TYPE;
}
public function __construct($value = null) {
parent::__construct();
$this->value = $value;
}
}
}
if (!class_exists("ExchangeRateService", false)) {
/**
* ExchangeRateService
* @package GoogleApiAdsDfp
* @subpackage v201605
*/
class ExchangeRateService extends DfpSoapClient {
const SERVICE_NAME = "ExchangeRateService";
const WSDL_NAMESPACE = "https://www.google.com/apis/ads/publisher/v201605";
const ENDPOINT = "https://ads.google.com/apis/ads/publisher/v201605/ExchangeRateService";
/**
* The endpoint of the service
* @var string
*/
public static $endpoint = "https://ads.google.com/apis/ads/publisher/v201605/ExchangeRateService";
/**
* Default class map for wsdl=>php
* @access private
* @var array
*/
public static $classmap = array(
"ObjectValue" => "ObjectValue",
"ApiError" => "ApiError",
"ApiException" => "ApiException",
"ApiVersionError" => "ApiVersionError",
"ApplicationException" => "ApplicationException",
"AuthenticationError" => "AuthenticationError",
"BooleanValue" => "BooleanValue",
"CollectionSizeError" => "CollectionSizeError",
"CommonError" => "CommonError",
"Date" => "Date",
"DateTime" => "DfpDateTime",
"DateTimeValue" => "DateTimeValue",
"DateValue" => "DateValue",
"DeleteExchangeRates" => "DeleteExchangeRates",
"ExchangeRateAction" => "ExchangeRateAction",
"ExchangeRate" => "ExchangeRate",
"ExchangeRateError" => "ExchangeRateError",
"ExchangeRatePage" => "ExchangeRatePage",
"FeatureError" => "FeatureError",
"InternalApiError" => "InternalApiError",
"NotNullError" => "NotNullError",
"NumberValue" => "NumberValue",
"ParseError" => "ParseError",
"PermissionError" => "PermissionError",
"PublisherQueryLanguageContextError" => "PublisherQueryLanguageContextError",
"PublisherQueryLanguageSyntaxError" => "PublisherQueryLanguageSyntaxError",
"QuotaError" => "QuotaError",
"RequiredCollectionError" => "RequiredCollectionError",
"RequiredError" => "RequiredError",
"RequiredNumberError" => "RequiredNumberError",
"ServerError" => "ServerError",
"SetValue" => "SetValue",
"SoapRequestHeader" => "SoapRequestHeader",
"SoapResponseHeader" => "SoapResponseHeader",
"Statement" => "Statement",
"StatementError" => "StatementError",
"StringLengthError" => "StringLengthError",
"String_ValueMapEntry" => "String_ValueMapEntry",
"TextValue" => "TextValue",
"UniqueError" => "UniqueError",
"UpdateResult" => "UpdateResult",
"Value" => "Value",
"ApiVersionError.Reason" => "ApiVersionErrorReason",
"AuthenticationError.Reason" => "AuthenticationErrorReason",
"CollectionSizeError.Reason" => "CollectionSizeErrorReason",
"CommonError.Reason" => "CommonErrorReason",
"ExchangeRateDirection" => "ExchangeRateDirection",
"ExchangeRateError.Reason" => "ExchangeRateErrorReason",
"ExchangeRateRefreshRate" => "ExchangeRateRefreshRate",
"FeatureError.Reason" => "FeatureErrorReason",
"InternalApiError.Reason" => "InternalApiErrorReason",
"NotNullError.Reason" => "NotNullErrorReason",
"ParseError.Reason" => "ParseErrorReason",
"PermissionError.Reason" => "PermissionErrorReason",
"PublisherQueryLanguageContextError.Reason" => "PublisherQueryLanguageContextErrorReason",
"PublisherQueryLanguageSyntaxError.Reason" => "PublisherQueryLanguageSyntaxErrorReason",
"QuotaError.Reason" => "QuotaErrorReason",
"RequiredCollectionError.Reason" => "RequiredCollectionErrorReason",
"RequiredError.Reason" => "RequiredErrorReason",
"RequiredNumberError.Reason" => "RequiredNumberErrorReason",
"ServerError.Reason" => "ServerErrorReason",
"StatementError.Reason" => "StatementErrorReason",
"StringLengthError.Reason" => "StringLengthErrorReason",
"createExchangeRates" => "CreateExchangeRates",
"createExchangeRatesResponse" => "CreateExchangeRatesResponse",
"getExchangeRatesByStatement" => "GetExchangeRatesByStatement",
"getExchangeRatesByStatementResponse" => "GetExchangeRatesByStatementResponse",
"performExchangeRateAction" => "PerformExchangeRateAction",
"performExchangeRateActionResponse" => "PerformExchangeRateActionResponse",
"updateExchangeRates" => "UpdateExchangeRates",
"updateExchangeRatesResponse" => "UpdateExchangeRatesResponse",
);
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl, $options, $user) {
$options["classmap"] = self::$classmap;
parent::__construct($wsdl, $options, $user, self::SERVICE_NAME,
self::WSDL_NAMESPACE);
}
/**
* Creates new {@link ExchangeRate} objects.
*
* For each exchange rate, the following fields are required:
* <ul>
* <li>{@link ExchangeRate#currencyCode}</li>
* <li>{@link ExchangeRate#exchangeRate} when {@link ExchangeRate#refreshRate} is
* {@link ExchangeRateRefreshRate#FIXED}</li>
* </ul>
*
* @param exchangeRates the exchange rates to create
* @return the created exchange rates with their exchange rate values filled in
*/
public function createExchangeRates($exchangeRates) {
$args = new CreateExchangeRates($exchangeRates);
$result = $this->__soapCall("createExchangeRates", array($args));
return $result->rval;
}
/**
* Gets a {@link ExchangeRatePage} of {@link ExchangeRate} objects that satisfy the given
* {@link Statement#query}. The following fields are supported for filtering:
*
* <table>
* <tr>
* <th scope="col">PQL Property</th> <th scope="col">Object Property</th>
* </tr>
* <tr>
* <td>{@code id}</td>
* <td>{@link ExchangeRate#id}</td>
* </tr>
* <tr>
* <td>{@code currencyCode}</td>
* <td>{@link ExchangeRate#currencyCode}</td>
* </tr>
* <tr>
* <td>{@code refreshRate}</td>
* <td>{@link ExchangeRate#refreshRate}</td>
* </tr>
* <tr>
* <td>{@code direction}</td>
* <td>{@link ExchangeRate#direction}</td>
* </tr>
* <tr>
* <td>{@code exchangeRate}</td>
* <td>{@link ExchangeRate#exchangeRate}</td>
* </tr>
* </table>
*
* @param filterStatement a Publisher Query Language statement used to filter
* a set of exchange rates
* @return the exchange rates that match the given filter
*/
public function getExchangeRatesByStatement($filterStatement) {
$args = new GetExchangeRatesByStatement($filterStatement);
$result = $this->__soapCall("getExchangeRatesByStatement", array($args));
return $result->rval;
}
/**
* Performs an action on {@link ExchangeRate} objects that satisfy the given
* {@link Statement#query}. The following fields are supported for filtering:
*
* <table>
* <tr>
* <th scope="col">PQL Property</th> <th scope="col">Object Property</th>
* </tr>
* <tr>
* <td>{@code id}</td>
* <td>{@link ExchangeRate#id}</td>
* </tr>
* <tr>
* <td>{@code currencyCode}</td>
* <td>{@link ExchangeRate#currencyCode}</td>
* </tr>
* <tr>
* <td>{@code refreshRate}</td>
* <td>{@link ExchangeRate#refreshRate}</td>
* </tr>
* <tr>
* <td>{@code direction}</td>
* <td>{@link ExchangeRate#direction}</td>
* </tr>
* <tr>
* <td>{@code exchangeRate}</td>
* <td>{@link ExchangeRate#exchangeRate}</td>
* </tr>
* </table>
*
* @param exchangeRateAction the action to perform
* @param filterStatement a Publisher Query Language statement used to filter
* a set of exchange rates
* @return the result of the action performed
*/
public function performExchangeRateAction($exchangeRateAction, $filterStatement) {
$args = new PerformExchangeRateAction($exchangeRateAction, $filterStatement);
$result = $this->__soapCall("performExchangeRateAction", array($args));
return $result->rval;
}
/**
* Updates the specified {@link ExchangeRate} objects.
*
* @param exchangeRates the exchange rates to update
* @return the updated exchange rates
*/
public function updateExchangeRates($exchangeRates) {
$args = new UpdateExchangeRates($exchangeRates);
$result = $this->__soapCall("updateExchangeRates", array($args));
return $result->rval;
}
}
}
| gamejolt/googleads-php-lib | src/Google/Api/Ads/Dfp/v201605/ExchangeRateService.php | PHP | apache-2.0 | 81,385 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
3397,
2035,
7396,
5200,
2005,
1996,
3863,
20370,
2121,
7903,
2063,
1008,
2326,
1012,
1008,
1008,
25718,
2544,
1019,
1008,
1008,
9385,
2355,
1010,
8224,
4297,
1012,
2035,
2916,
9235,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jsonp({"cep":"40365365","logradouro":"Avenida do Maria do Curuzu","bairro":"Curuzu","cidade":"Salvador","uf":"BA","estado":"Bahia"});
| lfreneda/cepdb | api/v1/40365365.jsonp.js | JavaScript | cc0-1.0 | 134 | [
30522,
1046,
3385,
2361,
1006,
1063,
1000,
8292,
2361,
1000,
1024,
1000,
28203,
26187,
21619,
2629,
1000,
30524,
2079,
3814,
2079,
12731,
6820,
9759,
1000,
1010,
1000,
21790,
18933,
1000,
1024,
1000,
12731,
6820,
9759,
1000,
1010,
1000,
287... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using System;
namespace FluentlyWindsor.Hawkeye
{
public class DependencyResolverException : Exception
{
public DependencyResolverException(string message) : base(message)
{
}
}
public class DependencyResolver
{
private static void ThrowIfLoggingWasNotInstalled()
{
if (WindsorInstaller.Container == null)
throw new DependencyResolverException("Please make sure you installed the logging nuget into Windsor using WindsorContainer.Install(new LoggingInstaller()).");
}
public static object Resolve(Type type)
{
ThrowIfLoggingWasNotInstalled();
return WindsorInstaller.Container.Resolve(type);
}
public static Array ResolveAll(Type type)
{
ThrowIfLoggingWasNotInstalled();
return WindsorInstaller.Container.ResolveAll(type);
}
public static T Resolve<T>()
{
ThrowIfLoggingWasNotInstalled();
return WindsorInstaller.Container.Resolve<T>();
}
public static T[] ResolveAll<T>()
{
ThrowIfLoggingWasNotInstalled();
return WindsorInstaller.Container.ResolveAll<T>();
}
}
} | cryosharp/fluentwindsor | FluentWindsor.Hawkeye/Hawkeye/DependencyResolver.cs | C# | mit | 1,270 | [
30522,
2478,
2291,
1025,
3415,
15327,
19376,
2135,
11101,
21748,
1012,
24882,
6672,
1063,
2270,
2465,
24394,
6072,
4747,
28943,
2595,
24422,
1024,
6453,
1063,
2270,
24394,
6072,
4747,
28943,
2595,
24422,
1006,
5164,
4471,
1007,
1024,
2918,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.