text
stringlengths
2
100k
meta
dict
/* * ==================================================================== * 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.hc.client5.http.examples; import org.apache.hc.client5.http.classic.methods.HttpGet; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; import org.apache.hc.client5.http.impl.classic.HttpClients; import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; import org.apache.hc.core5.http.HttpEntity; import org.apache.hc.core5.http.io.entity.EntityUtils; import org.apache.hc.core5.http.protocol.BasicHttpContext; import org.apache.hc.core5.http.protocol.HttpContext; /** * An example that performs GETs from multiple threads. * */ public class ClientMultiThreadedExecution { public static void main(final String[] args) throws Exception { // Create an HttpClient with the PoolingHttpClientConnectionManager. // This connection manager must be used if more than one thread will // be using the HttpClient. final PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(); cm.setMaxTotal(100); try (final CloseableHttpClient httpclient = HttpClients.custom() .setConnectionManager(cm) .build()) { // create an array of URIs to perform GETs on final String[] urisToGet = { "http://hc.apache.org/", "http://hc.apache.org/httpcomponents-core-ga/", "http://hc.apache.org/httpcomponents-client-ga/", }; // create a thread for each URI final GetThread[] threads = new GetThread[urisToGet.length]; for (int i = 0; i < threads.length; i++) { final HttpGet httpget = new HttpGet(urisToGet[i]); threads[i] = new GetThread(httpclient, httpget, i + 1); } // start the threads for (final GetThread thread : threads) { thread.start(); } // join the threads for (final GetThread thread : threads) { thread.join(); } } } /** * A thread that performs a GET. */ static class GetThread extends Thread { private final CloseableHttpClient httpClient; private final HttpContext context; private final HttpGet httpget; private final int id; public GetThread(final CloseableHttpClient httpClient, final HttpGet httpget, final int id) { this.httpClient = httpClient; this.context = new BasicHttpContext(); this.httpget = httpget; this.id = id; } /** * Executes the GetMethod and prints some status information. */ @Override public void run() { try { System.out.println(id + " - about to get something from " + httpget.getUri()); try (CloseableHttpResponse response = httpClient.execute(httpget, context)) { System.out.println(id + " - get executed"); // get the response body as an array of bytes final HttpEntity entity = response.getEntity(); if (entity != null) { final byte[] bytes = EntityUtils.toByteArray(entity); System.out.println(id + " - " + bytes.length + " bytes read"); } } } catch (final Exception e) { System.out.println(id + " - error: " + e); } } } }
{ "pile_set_name": "Github" }
package store import ( "crypto/tls" "errors" "time" ) // Backend represents a KV Store Backend type Backend string const ( // CONSUL backend CONSUL Backend = "consul" // ETCD backend ETCD Backend = "etcd" // ZK backend ZK Backend = "zk" // BOLTDB backend BOLTDB Backend = "boltdb" ) var ( // ErrBackendNotSupported is thrown when the backend k/v store is not supported by libkv ErrBackendNotSupported = errors.New("Backend storage not supported yet, please choose one of") // ErrCallNotSupported is thrown when a method is not implemented/supported by the current backend ErrCallNotSupported = errors.New("The current call is not supported with this backend") // ErrNotReachable is thrown when the API cannot be reached for issuing common store operations ErrNotReachable = errors.New("Api not reachable") // ErrCannotLock is thrown when there is an error acquiring a lock on a key ErrCannotLock = errors.New("Error acquiring the lock") // ErrKeyModified is thrown during an atomic operation if the index does not match the one in the store ErrKeyModified = errors.New("Unable to complete atomic operation, key modified") // ErrKeyNotFound is thrown when the key is not found in the store during a Get operation ErrKeyNotFound = errors.New("Key not found in store") // ErrPreviousNotSpecified is thrown when the previous value is not specified for an atomic operation ErrPreviousNotSpecified = errors.New("Previous K/V pair should be provided for the Atomic operation") // ErrKeyExists is thrown when the previous value exists in the case of an AtomicPut ErrKeyExists = errors.New("Previous K/V pair exists, cannot complete Atomic operation") ) // Config contains the options for a storage client type Config struct { ClientTLS *ClientTLSConfig TLS *tls.Config ConnectionTimeout time.Duration Bucket string PersistConnection bool Username string Password string } // ClientTLSConfig contains data for a Client TLS configuration in the form // the etcd client wants it. Eventually we'll adapt it for ZK and Consul. type ClientTLSConfig struct { CertFile string KeyFile string CACertFile string } // Store represents the backend K/V storage // Each store should support every call listed // here. Or it couldn't be implemented as a K/V // backend for libkv type Store interface { // Put a value at the specified key Put(key string, value []byte, options *WriteOptions) error // Get a value given its key Get(key string) (*KVPair, error) // Delete the value at the specified key Delete(key string) error // Verify if a Key exists in the store Exists(key string) (bool, error) // Watch for changes on a key Watch(key string, stopCh <-chan struct{}) (<-chan *KVPair, error) // WatchTree watches for changes on child nodes under // a given directory WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*KVPair, error) // NewLock creates a lock for a given key. // The returned Locker is not held and must be acquired // with `.Lock`. The Value is optional. NewLock(key string, options *LockOptions) (Locker, error) // List the content of a given prefix List(directory string) ([]*KVPair, error) // DeleteTree deletes a range of keys under a given directory DeleteTree(directory string) error // Atomic CAS operation on a single value. // Pass previous = nil to create a new key. AtomicPut(key string, value []byte, previous *KVPair, options *WriteOptions) (bool, *KVPair, error) // Atomic delete of a single value AtomicDelete(key string, previous *KVPair) (bool, error) // Close the store connection Close() } // KVPair represents {Key, Value, Lastindex} tuple type KVPair struct { Key string Value []byte LastIndex uint64 } // WriteOptions contains optional request parameters type WriteOptions struct { IsDir bool TTL time.Duration } // LockOptions contains optional request parameters type LockOptions struct { Value []byte // Optional, value to associate with the lock TTL time.Duration // Optional, expiration ttl associated with the lock RenewLock chan struct{} // Optional, chan used to control and stop the session ttl renewal for the lock } // Locker provides locking mechanism on top of the store. // Similar to `sync.Lock` except it may return errors. type Locker interface { Lock(stopChan chan struct{}) (<-chan struct{}, error) Unlock() error }
{ "pile_set_name": "Github" }
# Configuration file for fw_(printenv/setenv) utility. # Up to two entries are valid, in this case the redundant # environment sector is assumed present. # Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. # Futhermore, if the Flash sector size is ommitted, this value is assumed to # be the same as the Environment size, which is valid for NOR and SPI-dataflash # NOR example # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd2 0x0000 0x40000 0x4000 # MTD SPI-dataflash example # MTD device name Device offset Env. size Flash sector size Number of sectors #/dev/mtd5 0x4200 0x4200 #/dev/mtd6 0x4200 0x4200 # NAND example #/dev/mtd0 0x4000 0x4000 0x20000 2 # Block device example #/dev/mmcblk0 0xc0000 0x20000 # VFAT example #/boot/uboot.env 0x0000 0x4000
{ "pile_set_name": "Github" }
test testBroadcast | w b t e eventId | w := self newWorld. w create: 3 turtles: 1. eventId := EventId new. e := eventId newNo. b := self newGenerator. b broadcast: e. self assert: w raisedEvents isEmpty. t := self newThread: w. t forBreedNo: 3 index: 1. t codes: b code. t execute: 1. self assert: (w raisedEvents includes: e).
{ "pile_set_name": "Github" }
<?php /** * @author * @license The MIT License (MIT), http://opensource.org/licenses/MIT */ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['welcome.hello'] = 'Hello!';
{ "pile_set_name": "Github" }
<!--- ------------------------------------------------------------------------- ---- Author: Ben Nadel Desc: Handles the reading an writing of Excel files using the POI package that ships with ColdFusion. Special thanks to Ken Auenson and his suggestions: http://ken.auenson.com/examples/func_ExcelToQueryStruct_POI_example.txt Special thanks to (the following) for helping me debug: Close File Input stream - Jeremy Knue Null cell values - Richard J Julia - Charles Lewis - John Morgan Not creating queries for empty sheets - Sophek Tounn Sample Code: N/A Update History: 04/04/2007 - Ben Nadel Fixed several know bugs including: - Undefined query for empty sheets. - Handle NULL rows. - Handle NULL cells. - Closing file input stream to OS doesn't lock file. 02/01/2007 - Ben Nadel Added new line support (with text wrap). Also set the sheet's default column width. 01/21/2007 - Ben Nadel Added basic CSS support. 01/15/2007 - Ben Nadel Laid the foundations for the CFC. ----- ---------------------------------------------------------------------//// ---> <cfcomponent displayname="POIUtility" output="false" hint="Handles the reading and writing of Microsoft Excel files using POI and ColdFusion."> <cffunction name="Init" access="public" returntype="POIUtility" output="false" hint="Returns an initialized POI Utility instance."> <!--- Return This reference. ---> <cfreturn THIS /> </cffunction> <cffunction name="GetCellStyle" access="private" returntype="any" output="false" hint="Takes the standardized CSS object and creates an Excel cell style."> <!--- Define arguments. ---> <cfargument name="WorkBook" type="any" required="true" /> <cfargument name="CSS" type="struct" required="true" /> <cfscript> // Define the local scope. var LOCAL = StructNew(); // Create a default cell style object. LOCAL.Style = ARGUMENTS.WorkBook.CreateCellStyle(); // Check for background color. if (ListFindNoCase( "AQUA,BLACK,BLUE,BLUE_GREY,BRIGHT_GREEN,BROWN,CORAL,CORNFLOWER_BLUE,DARK_BLUE,DARK_GREEN,DARK_RED,DARK_TEAL,DARK_YELLOW,GOLD,GREEN,GREY_25_PERCENT,GREY_40_PERCENT,GREY_50_PERCENT,GREY_80_PERCENT,INDIGO,LAVENDER,LEMON_CHIFFON,LIGHT_BLUE,LIGHT_CORNFLOWER_BLUE,LIGHT_GREEN,LIGHT_ORANGE,LIGHT_TURQUOISE,LIGHT_YELLOW,LIME,MAROON,OLIVE_GREEN,ORANGE,ORCHID,PALE_BLUE,PINK,PLUM,RED,ROSE,ROYAL_BLUE,SEA_GREEN,SKY_BLUE,TAN,TEAL,TURQUOISE,VIOLET,WHITE,YELLOW", ARGUMENTS.CSS[ "background-color" ] )){ // Set the background color. LOCAL.Style.SetFillForegroundColor( CreateObject( "java", "org.apache.poi.hssf.util.HSSFColor$#UCase( ARGUMENTS.CSS[ 'background-color' ] )#" ).GetIndex() ); // Check for background style. switch (ARGUMENTS.CSS[ "background-style" ]){ case "dots": LOCAL.Style.SetFillPattern( LOCAL.Style.FINE_DOTS ); break; case "vertical": LOCAL.Style.SetFillPattern( LOCAL.Style.THIN_VERT_BANDS ); break; case "horizontal": LOCAL.Style.SetFillPattern( LOCAL.Style.THIN_HORZ_BANDS ); break; default: LOCAL.Style.SetFillPattern( LOCAL.Style.SOLID_FOREGROUND ); break; } } // Check for the bottom border size. if (Val( ARGUMENTS.CSS[ "border-bottom-width" ] )){ // Check the type of border. switch (ARGUMENTS.CSS[ "border-bottom-style" ]){ // Figure out what kind of solid border we need. case "solid": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-bottom-width" ] )){ case 1: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_HAIR ); break; case 2: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_THIN ); break; case 3: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_MEDIUM ); break; default: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_THICK ); break; } break; // Figure out what kind of dotted border we need. case "dotted": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-bottom-width" ] )){ case 1: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_DOTTED ); break; case 2: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_DASH_DOT_DOT ); break; default: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_MEDIUM_DASH_DOT_DOT ); break; } break; // Figure out what kind of dashed border we need. case "dashed": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-bottom-width" ] )){ case 1: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_DASHED ); break; default: LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_MEDIUM_DASHED ); break; } break; // There is only one option for double border. case "double": LOCAL.Style.SetBorderBottom( LOCAL.Style.BORDER_DOUBLE ); break; } // Check for a border color. if (ListFindNoCase( "AQUA,BLACK,BLUE,BLUE_GREY,BRIGHT_GREEN,BROWN,CORAL,CORNFLOWER_BLUE,DARK_BLUE,DARK_GREEN,DARK_RED,DARK_TEAL,DARK_YELLOW,GOLD,GREEN,GREY_25_PERCENT,GREY_40_PERCENT,GREY_50_PERCENT,GREY_80_PERCENT,INDIGO,LAVENDER,LEMON_CHIFFON,LIGHT_BLUE,LIGHT_CORNFLOWER_BLUE,LIGHT_GREEN,LIGHT_ORANGE,LIGHT_TURQUOISE,LIGHT_YELLOW,LIME,MAROON,OLIVE_GREEN,ORANGE,ORCHID,PALE_BLUE,PINK,PLUM,RED,ROSE,ROYAL_BLUE,SEA_GREEN,SKY_BLUE,TAN,TEAL,TURQUOISE,VIOLET,WHITE,YELLOW", ARGUMENTS.CSS[ "border-bottom-color" ] )){ LOCAL.Style.SetBottomBorderColor( CreateObject( "java", "org.apache.poi.hssf.util.HSSFColor$#UCase( ARGUMENTS.CSS[ 'border-bottom-color' ] )#" ).GetIndex() ); } } // Check for the left border size. if (Val( ARGUMENTS.CSS[ "border-left-width" ] )){ // Check the type of border. switch (ARGUMENTS.CSS[ "border-left-style" ]){ // Figure out what kind of solid border we need. case "solid": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-left-width" ] )){ case 1: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_HAIR ); break; case 2: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_THIN ); break; case 3: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_MEDIUM ); break; default: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_THICK ); break; } break; // Figure out what kind of dotted border we need. case "dotted": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-left-width" ] )){ case 1: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_DOTTED ); break; case 2: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_DASH_DOT_DOT ); break; default: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_MEDIUM_DASH_DOT_DOT ); break; } break; // Figure out what kind of dashed border we need. case "dashed": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-left-width" ] )){ case 1: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_DASHED ); break; default: LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_MEDIUM_DASHED ); break; } break; // There is only one option for double border. case "double": LOCAL.Style.SetBorderLeft( LOCAL.Style.BORDER_DOUBLE ); break; } // Check for a border color. if (ListFindNoCase( "AQUA,BLACK,BLUE,BLUE_GREY,BRIGHT_GREEN,BROWN,CORAL,CORNFLOWER_BLUE,DARK_BLUE,DARK_GREEN,DARK_RED,DARK_TEAL,DARK_YELLOW,GOLD,GREEN,GREY_25_PERCENT,GREY_40_PERCENT,GREY_50_PERCENT,GREY_80_PERCENT,INDIGO,LAVENDER,LEMON_CHIFFON,LIGHT_BLUE,LIGHT_CORNFLOWER_BLUE,LIGHT_GREEN,LIGHT_ORANGE,LIGHT_TURQUOISE,LIGHT_YELLOW,LIME,MAROON,OLIVE_GREEN,ORANGE,ORCHID,PALE_BLUE,PINK,PLUM,RED,ROSE,ROYAL_BLUE,SEA_GREEN,SKY_BLUE,TAN,TEAL,TURQUOISE,VIOLET,WHITE,YELLOW", ARGUMENTS.CSS[ "border-left-color" ] )){ LOCAL.Style.SetLeftBorderColor( CreateObject( "java", "org.apache.poi.hssf.util.HSSFColor$#UCase( ARGUMENTS.CSS[ 'border-left-color' ] )#" ).GetIndex() ); } } // Check for the right border size. if (Val( ARGUMENTS.CSS[ "border-right-width" ] )){ // Check the type of border. switch (ARGUMENTS.CSS[ "border-right-style" ]){ // Figure out what kind of solid border we need. case "solid": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-right-width" ] )){ case 1: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_HAIR ); break; case 2: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_THIN ); break; case 3: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_MEDIUM ); break; default: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_THICK ); break; } break; // Figure out what kind of dotted border we need. case "dotted": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-right-width" ] )){ case 1: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_DOTTED ); break; case 2: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_DASH_DOT_DOT ); break; default: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_MEDIUM_DASH_DOT_DOT ); break; } break; // Figure out what kind of dashed border we need. case "dashed": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-right-width" ] )){ case 1: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_DASHED ); break; default: LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_MEDIUM_DASHED ); break; } break; // There is only one option for double border. case "double": LOCAL.Style.SetBorderRight( LOCAL.Style.BORDER_DOUBLE ); break; } // Check for a border color. if (ListFindNoCase( "AQUA,BLACK,BLUE,BLUE_GREY,BRIGHT_GREEN,BROWN,CORAL,CORNFLOWER_BLUE,DARK_BLUE,DARK_GREEN,DARK_RED,DARK_TEAL,DARK_YELLOW,GOLD,GREEN,GREY_25_PERCENT,GREY_40_PERCENT,GREY_50_PERCENT,GREY_80_PERCENT,INDIGO,LAVENDER,LEMON_CHIFFON,LIGHT_BLUE,LIGHT_CORNFLOWER_BLUE,LIGHT_GREEN,LIGHT_ORANGE,LIGHT_TURQUOISE,LIGHT_YELLOW,LIME,MAROON,OLIVE_GREEN,ORANGE,ORCHID,PALE_BLUE,PINK,PLUM,RED,ROSE,ROYAL_BLUE,SEA_GREEN,SKY_BLUE,TAN,TEAL,TURQUOISE,VIOLET,WHITE,YELLOW", ARGUMENTS.CSS[ "border-right-color" ] )){ LOCAL.Style.SetRightBorderColor( CreateObject( "java", "org.apache.poi.hssf.util.HSSFColor$#UCase( ARGUMENTS.CSS[ 'border-right-color' ] )#" ).GetIndex() ); } } // Check for the top border size. if (Val( ARGUMENTS.CSS[ "border-top-width" ] )){ // Check the type of border. switch (ARGUMENTS.CSS[ "border-top-style" ]){ // Figure out what kind of solid border we need. case "solid": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-top-width" ] )){ case 1: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_HAIR ); break; case 2: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_THIN ); break; case 3: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_MEDIUM ); break; default: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_THICK ); break; } break; // Figure out what kind of dotted border we need. case "dotted": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-top-width" ] )){ case 1: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_DOTTED ); break; case 2: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_DASH_DOT_DOT ); break; default: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_MEDIUM_DASH_DOT_DOT ); break; } break; // Figure out what kind of dashed border we need. case "dashed": // Check the width. switch(Val( ARGUMENTS.CSS[ "border-top-width" ] )){ case 1: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_DASHED ); break; default: LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_MEDIUM_DASHED ); break; } break; // There is only one option for double border. case "double": LOCAL.Style.SetBorderTop( LOCAL.Style.BORDER_DOUBLE ); break; } // Check for a border color. if (ListFindNoCase( "AQUA,BLACK,BLUE,BLUE_GREY,BRIGHT_GREEN,BROWN,CORAL,CORNFLOWER_BLUE,DARK_BLUE,DARK_GREEN,DARK_RED,DARK_TEAL,DARK_YELLOW,GOLD,GREEN,GREY_25_PERCENT,GREY_40_PERCENT,GREY_50_PERCENT,GREY_80_PERCENT,INDIGO,LAVENDER,LEMON_CHIFFON,LIGHT_BLUE,LIGHT_CORNFLOWER_BLUE,LIGHT_GREEN,LIGHT_ORANGE,LIGHT_TURQUOISE,LIGHT_YELLOW,LIME,MAROON,OLIVE_GREEN,ORANGE,ORCHID,PALE_BLUE,PINK,PLUM,RED,ROSE,ROYAL_BLUE,SEA_GREEN,SKY_BLUE,TAN,TEAL,TURQUOISE,VIOLET,WHITE,YELLOW", ARGUMENTS.CSS[ "border-top-color" ] )){ LOCAL.Style.SetTopBorderColor( CreateObject( "java", "org.apache.poi.hssf.util.HSSFColor$#UCase( ARGUMENTS.CSS[ 'border-top-color' ] )#" ).GetIndex() ); } } // Get a font object from the workbook. LOCAL.Font = ARGUMENTS.WorkBook.CreateFont(); // Check for color. if (ListFindNoCase( "AQUA,BLACK,BLUE,BLUE_GREY,BRIGHT_GREEN,BROWN,CORAL,CORNFLOWER_BLUE,DARK_BLUE,DARK_GREEN,DARK_RED,DARK_TEAL,DARK_YELLOW,GOLD,GREEN,GREY_25_PERCENT,GREY_40_PERCENT,GREY_50_PERCENT,GREY_80_PERCENT,INDIGO,LAVENDER,LEMON_CHIFFON,LIGHT_BLUE,LIGHT_CORNFLOWER_BLUE,LIGHT_GREEN,LIGHT_ORANGE,LIGHT_TURQUOISE,LIGHT_YELLOW,LIME,MAROON,OLIVE_GREEN,ORANGE,ORCHID,PALE_BLUE,PINK,PLUM,RED,ROSE,ROYAL_BLUE,SEA_GREEN,SKY_BLUE,TAN,TEAL,TURQUOISE,VIOLET,WHITE,YELLOW", ARGUMENTS.CSS[ "color" ] )){ LOCAL.Font.SetColor( CreateObject( "java", "org.apache.poi.hssf.util.HSSFColor$#UCase( ARGUMENTS.CSS[ 'color' ] )#" ).GetIndex() ); } // Check for font family. if (Len( ARGUMENTS.CSS[ "font-family" ] )){ LOCAL.Font.SetFontName( JavaCast( "string", ARGUMENTS.CSS[ "font-family" ] ) ); } // Check for font size. if (Val( ARGUMENTS.CSS[ "font-size" ] )){ LOCAL.Font.SetFontHeightInPoints( JavaCast( "int", Val( ARGUMENTS.CSS[ "font-size" ] ) ) ); } // Check for font style. if (Len( ARGUMENTS.CSS[ "font-style" ] )){ // Figure out which style we are talking about. switch (ARGUMENTS.CSS[ "font-style" ]){ case "italic": LOCAL.Font.SetItalic( JavaCast( "boolean", true ) ); break; } } // Check for font weight. if (Len( ARGUMENTS.CSS[ "font-weight" ] )){ // Figure out what font weight we are using. switch (ARGUMENTS.CSS[ "font-weight" ]){ case "bold": LOCAL.Font.SetBoldWeight( LOCAL.Font.BOLDWEIGHT_BOLD ); break; } } // Apply the font to the style object. LOCAL.Style.SetFont( LOCAL.Font ); // Check for cell text alignment. switch (ARGUMENTS.CSS[ "text-align" ]){ case "right": LOCAL.Style.SetAlignment( LOCAL.Style.ALIGN_RIGHT ); break; case "center": LOCAL.Style.SetAlignment( LOCAL.Style.ALIGN_CENTER ); break; case "justify": LOCAL.Style.SetAlignment( LOCAL.Style.ALIGN_JUSTIFY ); break; } // Cehck for cell vertical text alignment. switch (ARGUMENTS.CSS[ "vertical-align" ]){ case "bottom": LOCAL.Style.SetVerticalAlignment( LOCAL.Style.VERTICAL_BOTTOM ); break; case "middle": LOCAL.Style.SetVerticalAlignment( LOCAL.Style.VERTICAL_CENTER ); break; case "center": LOCAL.Style.SetVerticalAlignment( LOCAL.Style.VERTICAL_CENTER ); break; case "justify": LOCAL.Style.SetVerticalAlignment( LOCAL.Style.VERTICAL_JUSTIFY ); break; case "top": LOCAL.Style.SetVerticalAlignment( LOCAL.Style.VERTICAL_TOP ); break; } // Set the cell to wrap text. This will allow new lines to show // up properly in the text. LOCAL.Style.SetWrapText( JavaCast( "boolean", true ) ); // Return the style object. return( LOCAL.Style ); </cfscript> </cffunction> <cffunction name="GetNewSheetStruct" access="public" returntype="struct" output="false" hint="Returns a default structure of what this Component is expecting for a sheet definition when WRITING Excel files."> <!--- Define the local scope. ---> <cfset var LOCAL = StructNew() /> <cfscript> // This is the query that will hold the data. LOCAL.Query = ""; // THis is the list of columns (in a given order) that will be // used to output data. LOCAL.ColumnList = ""; // These are the names of the columns used when creating a header // row in the Excel file. LOCAL.ColumnNames = ""; // This is the name of the sheet as it appears in the bottom Excel tab. LOCAL.SheetName = ""; // Return the local structure containing the sheet info. return( LOCAL ); </cfscript> </cffunction> <cffunction name="ParseRawCSS" access="private" returntype="struct" output="false" hint="This takes raw HTML-style CSS and returns a default CSS structure with overwritten parsed values."> <!--- Define arguments. ---> <cfargument name="CSS" type="string" required="false" default="" /> <cfscript> // Define the local scope. var LOCAL = StructNew(); // Create a new CSS structure. LOCAL.CSS = StructNew(); // Set default values. LOCAL.CSS[ "background-color" ] = ""; LOCAL.CSS[ "background-style" ] = ""; LOCAL.CSS[ "border-bottom-color" ] = ""; LOCAL.CSS[ "border-bottom-style" ] = ""; LOCAL.CSS[ "border-bottom-width" ] = ""; LOCAL.CSS[ "border-left-color" ] = ""; LOCAL.CSS[ "border-left-style" ] = ""; LOCAL.CSS[ "border-left-width" ] = ""; LOCAL.CSS[ "border-right-color" ] = ""; LOCAL.CSS[ "border-right-style" ] = ""; LOCAL.CSS[ "border-right-width" ] = ""; LOCAL.CSS[ "border-top-color" ] = ""; LOCAL.CSS[ "border-top-style" ] = ""; LOCAL.CSS[ "border-top-width" ] = ""; LOCAL.CSS[ "color" ] = ""; LOCAL.CSS[ "font-family" ] = ""; LOCAL.CSS[ "font-size" ] = ""; LOCAL.CSS[ "font-style" ] = ""; LOCAL.CSS[ "font-weight" ] = ""; LOCAL.CSS[ "text-align" ] = ""; LOCAL.CSS[ "vertical-align" ] = ""; // Clean up the raw CSS values. We don't want to deal with complext CSS // delcarations like font: bold 12px verdana. We want each style to be // defined individually. Keep attacking the raw css and replacing in the // single-values. Clean the initial white space first. LOCAL.CleanCSS = ARGUMENTS.CSS.Trim().ToLowerCase().ReplaceAll( "\s+", " " // Make sure that all colons are right to the right of their types followed // by a single space to rhe right. ).ReplaceAll( "\s*:\s*", ": " // Break out the full font declaration into parts. ).ReplaceAll( "font: bold (\d+\w{2}) (\w+)", "font-size: $1 ; font-family: $2 ; font-weight: bold ;" // Break out the full font declaration into parts. ).ReplaceAll( "font: italic (\d+\w{2}) (\w+)", "font-size: $1 ; font-family: $2 ; font-style: italic ;" // Break out the partial font declaration into parts. ).ReplaceAll( "font: (\d+\w{2}) (\w+)", "font-size: $1 ; font-family: $2 ;" // Break out a font family name. ).ReplaceAll( "font: (\w+)", "font-family: $1 ;" // Break out the full border definition into single values for each of the // four possible borders. ).ReplaceAll( "border: (\d+\w{2}) (solid|dotted|dashed|double) (\w+)", "border-top-width: $1 ; border-top-style: $2 ; border-top-color: $3 ; border-right-width: $1 ; border-right-style: $2 ; border-right-color: $3 ; border-bottom-width: $1 ; border-bottom-style: $2 ; border-bottom-color: $3 ; border-left-width: $1 ; border-left-style: $2 ; border-left-color: $3 ;" // Break out a partial border definition into values for each of the four // possible borders. Set default color to black. ).ReplaceAll( "border: (\d+\w{2}) (solid|dotted|dashed|double)", "border-top-width: $1 ; border-top-style: $2 ; border-top-color: black ; border-right-width: $1 ; border-right-style: $2 ; border-right-color: black ; border-bottom-width: $1 ; border-bottom-style: $2 ; border-bottom-color: black ; border-left-width: $1 ; border-left-style: $2 ; border-left-color: black ;" // Break out a partial border definition into values for each of the four // possible borders. Set default color to black and width to 2px. ).ReplaceAll( "border: (solid|dotted|dashed|double)", "border-top-width: 2px ; border-top-style: $2 ; border-top-color: black ; border-right-width: 2px ; border-right-style: $2 ; border-right-color: black ; border-bottom-width: 2px ; border-bottom-style: $2 ; border-bottom-color: black ; border-left-width: 2px ; border-left-style: $2 ; border-left-color: black ;" // Break out full, single-border definitions into single values. ).ReplaceAll( "(border-(top|right|bottom|left)): (\d+\w{2}) (solid|dotted|dashed|double) (\w+)", "$1-width: $3 ; $1-style: $4 ; $1-color: $5 ;" // Break out partial bord to single values. Set default color to black. ).ReplaceAll( "(border-(top|right|bottom|left)): (\d+\w{2}) (solid|dotted|dashed|double)", "$1-width: $3 ; $1-style: $4 ; $1-color: black ;" // Break out partial bord to single values. Set default color to black and // default width to 2px. ).ReplaceAll( "(border-(top|right|bottom|left)): (solid|dotted|dashed|double)", "$1-width: 2px ; $1-style: $3 ; $1-color: black ;" // Break 4 part width definition into single width definitions to each of // the four possible borders. ).ReplaceAll( "border-width: (\d\w{2}) (\d\w{2}) (\d\w{2}) (\d\w{2})", "border-top-width: $1 ; border-right-width: $2 ; border-bottom-width: $3 ; border-left-width: $4 ;" // Break out full background in single values. ).ReplaceAll( "background: (solid|dots|vertical|horizontal) (\w+)", "background-style: $1 ; background-color: $2 ;" // Break out the partial background style into a single value style. ).ReplaceAll( "background: (solid|dots|vertical|horizontal)", "background-style: $1 ;" // Break out the partial background color into a single value style. ).ReplaceAll( "background: (\w+)", "background-color: $1 ;" // Clear out extra semi colons. ).ReplaceAll( "(\s*;\s*)+", " ; " ); // Break the clean CSS into name-value pairs. LOCAL.Pairs = ListToArray( LOCAL.CleanCSS, ";" ); // Loop over each CSS pair. for ( LOCAL.PairIterator = LOCAL.Pairs.Iterator() ; LOCAL.PairIterator.HasNext() ; ){ // Break out the name value pair. LOCAL.Pair = ToString(LOCAL.PairIterator.Next().Trim() & " : ").Split( ":" ); // Get the name and value values. LOCAL.Name = LOCAL.Pair[ 1 ].Trim(); LOCAL.Value = LOCAL.Pair[ 2 ].Trim(); // Check to see if the name exists in the CSS struct. Remember, we only // want to allow values that we KNOW how to handle. if (StructKeyExists( LOCAL.CSS, LOCAL.Name )){ // This is cool, overwrite it. At this point, however, we might // not have exactly proper values. Not sure if I want to deal with that here // or during the CSS application. LOCAL.CSS[ LOCAL.Name ] = LOCAL.Value; } } // Return the default CSS object. return( LOCAL.CSS ); </cfscript> </cffunction> <cffunction name="ReadExcel" access="public" returntype="any" output="false" hint="Reads an Excel file into an array of strutures that contains the Excel file information OR if a specific sheet index is passed in, only that sheet object is returned."> <!--- Define arguments. ---> <cfargument name="FilePath" type="string" required="true" hint="The expanded file path of the Excel file." /> <cfargument name="HasHeaderRow" type="boolean" required="false" default="false" hint="Flags the Excel files has using the first data row a header column. If so, this column will be excluded from the resultant query." /> <cfargument name="SheetIndex" type="numeric" required="false" default="-1" hint="If passed in, only that sheet object will be returned (not an array of sheet objects)." /> <cfscript> // Define the local scope. var LOCAL = StructNew(); // Create a file input stream to the given Excel file. LOCAL.FileInputStream = CreateObject( "java", "java.io.FileInputStream" ).Init( ARGUMENTS.FilePath ); // Create the Excel file system object. This object is responsible // for reading in the given Excel file. LOCAL.ExcelFileSystem = CreateObject( "java", "org.apache.poi.poifs.filesystem.POIFSFileSystem" ).Init( LOCAL.FileInputStream ); // Get the workbook from the Excel file system. LOCAL.WorkBook = CreateObject( "java", "org.apache.poi.hssf.usermodel.HSSFWorkbook" ).Init( LOCAL.ExcelFileSystem ); // Check to see if we are returning an array of sheets OR just // a given sheet. if (ARGUMENTS.SheetIndex GTE 0){ // Read the sheet data for a single sheet. LOCAL.Sheets = ReadExcelSheet( LOCAL.WorkBook, ARGUMENTS.SheetIndex, ARGUMENTS.HasHeaderRow ); } else { // No specific sheet was requested. We are going to return an array // of sheets within the Excel document. // Create an array to return. LOCAL.Sheets = ArrayNew( 1 ); // Loop over the sheets in the documnet. for ( LOCAL.SheetIndex = 0 ; LOCAL.SheetIndex LT LOCAL.WorkBook.GetNumberOfSheets() ; LOCAL.SheetIndex = (LOCAL.SheetIndex + 1) ){ // Add the sheet information. ArrayAppend( LOCAL.Sheets, ReadExcelSheet( LOCAL.WorkBook, LOCAL.SheetIndex, ARGUMENTS.HasHeaderRow ) ); } } // Now that we have crated the Excel file system, // and read in the sheet data, we can close the // input file stream so that it is not locked. LOCAL.FileInputStream.Close(); // Return the array of sheets. return( LOCAL.Sheets ); </cfscript> </cffunction> <cffunction name="ReadExcelSheet" access="public" returntype="struct" output="false" hint="Takes an Excel workbook and reads the given sheet (by index) into a structure."> <!--- Define arguments. ---> <cfargument name="WorkBook" type="any" required="true" hint="This is a workbook object created by the POI API." /> <cfargument name="SheetIndex" type="numeric" required="false" default="0" hint="This is the index of the sheet within the passed in workbook. This is a ZERO-based index (coming from a Java object)." /> <cfargument name="HasHeaderRow" type="boolean" required="false" default="false" hint="This flags the sheet as having a header row or not (if so, it will NOT be read into the query)." /> <cfscript> // Define the local scope. var LOCAL = StructNew(); // Set up the default return structure. LOCAL.SheetData = StructNew(); // This is the index of the sheet within the workbook. LOCAL.SheetData.Index = ARGUMENTS.SheetIndex; // This is the name of the sheet tab. LOCAL.SheetData.Name = ARGUMENTS.WorkBook.GetSheetName( JavaCast( "int", ARGUMENTS.SheetIndex ) ); // This is the query created from the sheet. LOCAL.SheetData.Query = QueryNew( "" ); // This is a flag for the header row. LOCAL.SheetData.HasHeaderRow = ARGUMENTS.HasHeaderRow; // This keeps track of the min number of data columns. LOCAL.SheetData.MinColumnCount = 0; // This keeps track of the max number of data columns. LOCAL.SheetData.MaxColumnCount = 0; // Get the sheet object at this index of the // workbook. This is based on the passed in data. LOCAL.Sheet = ARGUMENTS.WorkBook.GetSheetAt( JavaCast( "int", ARGUMENTS.SheetIndex ) ); // An array of header columns names. LOCAL.SheetData.ColumnNames = ArrayNew(1); LOCAL.SheetData.ColumnNames = getSheetColumnNames(Local.Sheet,Arguments.HasHeaderRow); // Loop over the rows in the Excel sheet. For each // row, we simply want to capture the number of // columns we are working with that are NOT blank. // We will then use that data to figure out how many // columns we should be using in our query. for ( LOCAL.RowIndex = 0 ; LOCAL.RowIndex LTE LOCAL.Sheet.GetLastRowNum() ; LOCAL.RowIndex = (LOCAL.RowIndex + 1) ){ // Get a reference to the current row. LOCAL.Row = LOCAL.Sheet.GetRow( JavaCast( "int", LOCAL.RowIndex ) ); // Check to see if we are at an undefined row. If we are, then // our ROW variable has been destroyed. if (StructKeyExists( LOCAL, "Row" )){ // Get the number of the last cell in the row. Since we // are in a defined row, we know that we must have at // least one row cell defined (and therefore, we must have // a defined cell number). LOCAL.ColumnCount = LOCAL.Row.GetLastCellNum(); // Update the running min column count. LOCAL.SheetData.MinColumnCount = Min( LOCAL.SheetData.MinColumnCount, LOCAL.ColumnCount ); // Update the running max column count. LOCAL.SheetData.MaxColumnCount = Max( LOCAL.SheetData.MaxColumnCount, LOCAL.ColumnCount ); } } // ASSERT: At this point, we know the min and max // number of columns that we will encounter in this // excel sheet. // Loop over the number of column to create the basic // column structure that we will use in our query. for ( LOCAL.ColumnIndex = 1 ; LOCAL.ColumnIndex LTE LOCAL.SheetData.MaxColumnCount ; LOCAL.ColumnIndex = (LOCAL.ColumnIndex + 1) ){ // Add the column. Notice that the name of the column is // the text "column" plus the column index. I am starting // my column indexes at ONE rather than ZERO to get it back // into a more ColdFusion standard notation. QueryAddColumn( LOCAL.SheetData.Query, local.SheetData.ColumnNames[local.ColumnIndex], "CF_SQL_VARCHAR", ArrayNew( 1 ) ); } // ASSERT: At this pointer, we have a properly defined // query that will be able to handle any standard row // data that we encouter. // Loop over the rows in the Excel sheet. This time, we // already have a query built, so we just want to start // capturing the cell data. for ( LOCAL.RowIndex = 0 ; LOCAL.RowIndex LTE LOCAL.Sheet.GetLastRowNum() ; LOCAL.RowIndex = (LOCAL.RowIndex + 1) ){ // Get a reference to the current row. LOCAL.Row = LOCAL.Sheet.GetRow( JavaCast( "int", LOCAL.RowIndex ) ); // We want to add a row to the query so that we can // store the Excel cell values. The only thing we need to // be careful of is that we DONT want to add a row if // we are dealing with a header row. if ( LOCAL.RowIndex OR ( (NOT ARGUMENTS.HasHeaderRow) AND StructKeyExists( LOCAL, "Row" ) )){ // We wither don't have a header row, or we are no // longer in the first row... add record. QueryAddRow( LOCAL.SheetData.Query ); } // Check to see if we have a row. If we requested an // undefined row, then the NULL value will have // destroyed our Row variable. if (StructKeyExists( LOCAL, "Row" )){ // Get the number of the last cell in the row. Since we // are in a defined row, we know that we must have at // least one row cell defined (and therefore, we must have // a defined cell number). LOCAL.ColumnCount = LOCAL.Row.GetLastCellNum(); // Now that we have an empty query, we are going to loop over // the cells COUNT for this data row and for each cell, we are // going to create a query column of type VARCHAR. I understand // that cells are going to have different data types, but I am // chosing to store everything as a string to make it easier. for ( LOCAL.ColumnIndex = 0 ; LOCAL.ColumnIndex LT LOCAL.ColumnCount ; LOCAL.ColumnIndex = (LOCAL.ColumnIndex + 1) ){ // Check to see if we might be dealing with a header row. // This will be true if we are in the first row AND if // the user had flagged the header row usage. if ( ARGUMENTS.HasHeaderRow AND (NOT LOCAL.RowIndex) ){ // Try to get a header column name (it might throw // an error). We want to take that cell value and // add it to the array of header values that we will // return with the sheet data. /*try { // Add the cell value to the column names. ArrayAppend( LOCAL.SheetData.ColumnNames, LOCAL.Row.GetCell( JavaCast( "int", LOCAL.ColumnIndex ) ).GetStringCellValue() ); } catch (any ErrorHeader){ // There was an error grabbing the text of the // header column type. Just add an empty string // to make up for it. ArrayAppend( LOCAL.SheetData.ColumnNames, "" ); } */ // We are either not using a Header row or we are no // longer dealing with the first row. In either case, // this data is standard cell data. } else { // When getting the value of a cell, it is important to know // what type of cell value we are dealing with. If you try // to grab the wrong value type, an error might be thrown. // For that reason, we must check to see what type of cell // we are working with. These are the cell types and they // are constants of the cell object itself: // // 0 - CELL_TYPE_NUMERIC // 1 - CELL_TYPE_STRING // 2 - CELL_TYPE_FORMULA // 3 - CELL_TYPE_BLANK // 4 - CELL_TYPE_BOOLEAN // 5 - CELL_TYPE_ERROR // Get the cell from the row object. LOCAL.Cell = LOCAL.Row.GetCell( JavaCast( "int", LOCAL.ColumnIndex ) ); // Check to see if we are dealing with a valid cell value. // If this was an undefined cell, the GetCell() will // have returned NULL which will have killed our Cell // variable. if (StructKeyExists( LOCAL, "Cell" )){ // ASSERT: We are definitely dealing with a valid // cell which has some sort of defined value. // Get the type of data in this cell. LOCAL.CellType = LOCAL.Cell.GetCellType(); // Get teh value of the cell based on the data type. The thing // to worry about here is cell forumlas and cell dates. Formulas // can be strange and dates are stored as numeric types. For // this demo, I am not going to worry about that at all. I will // just grab dates as floats and formulas I will try to grab as // numeric values. if (LOCAL.CellType EQ LOCAL.Cell.CELL_TYPE_NUMERIC) { // Get numeric cell data. This could be a standard number, // could also be a date value. I am going to leave it up to // the calling program to decide. LOCAL.CellValue = LOCAL.Cell.GetNumericCellValue(); } else if (LOCAL.CellType EQ LOCAL.Cell.CELL_TYPE_STRING){ LOCAL.CellValue = LOCAL.Cell.GetStringCellValue(); } else if (LOCAL.CellType EQ LOCAL.Cell.CELL_TYPE_FORMULA){ // Since most forumlas deal with numbers, I am going to try // to grab the value as a number. If that throws an error, I // will just grab it as a string value. try { LOCAL.CellValue = LOCAL.Cell.GetNumericCellValue(); } catch (any Error1){ // The numeric grab failed. Try to get the value as a // string. If this fails, just force the empty string. try { LOCAL.CellValue = LOCAL.Cell.GetStringCellValue(); } catch (any Error2){ // Force empty string. LOCAL.CellValue = ""; } } } else if (LOCAL.CellType EQ LOCAL.Cell.CELL_TYPE_BLANK){ LOCAL.CellValue = ""; } else if (LOCAL.CellType EQ LOCAL.Cell.CELL_TYPE_BOOLEAN){ LOCAL.CellValue = LOCAL.Cell.GetBooleanCellValue(); } else { // If all else fails, get empty string. LOCAL.CellValue = ""; } // ASSERT: At this point, we either got the cell value out of the // Excel data cell or we have thrown an error or didn't get a // matching type and just have the empty string by default. // No matter what, the object LOCAL.CellValue is defined and // has some sort of SIMPLE ColdFusion value in it. // Now that we have a value, store it as a string in the ColdFusion // query object. Remember again that my query names are ONE based // for ColdFusion standards. That is why I am adding 1 to the // cell index. LOCAL.SheetData.Query[ local.SheetData.ColumnNames[local.ColumnIndex+1] ][ LOCAL.SheetData.Query.RecordCount ] = JavaCast( "string", LOCAL.CellValue ); } } } } } // Return the sheet object that contains all the Excel data. return( LOCAL.SheetData ); </cfscript> </cffunction> <cffunction name="readExcelToArray" output="false" access="public" returntype="array" hint="returns a 2D array of data"> <cfargument name="filePath" required="true" type="string" hint="full path to file"> <cfargument name="hasHeaderRow" required="false" type="boolean" default="false" hint="whether the first row is a header row. If so, the values in the first row will be used as column names; otherwise, columns will be derived"> <cfargument name="sheetIndex" required="false" type="numeric" default="0"> <cfscript> var result = readExcel(filePath=arguments.filePath, hasHeaderRow=arguments.hasHeaderRow,sheetIndex=arguments.sheetIndex); var q = result.query; var cols = result.columnNames; var col = ""; var row = ""; var a = ArrayNew(2); for(row=1; row LTE q.RecordCount; row=row+1){ for(col=1; col LTE ArrayLen(cols); col=col+1){ a[row][col] = q[ cols[col] ][row]; } } return a; </cfscript> </cffunction> <cffunction name="WriteExcel" access="public" returntype="void" output="false" hint="Takes an array of 'Sheet' structure objects and writes each of them to a tab in the Excel file."> <!--- Define arguments. ---> <cfargument name="FilePath" type="string" required="true" hint="This is the expanded path of the Excel file." /> <cfargument name="Sheets" type="any" required="true" hint="This is an array of the data that is needed for each sheet of the excel OR it is a single Sheet object. Each 'Sheet' will be a structure containing the Query, ColumnList, ColumnNames, and SheetName." /> <cfargument name="Delimiters" type="string" required="false" default="," hint="The list of delimiters used for the column list and column name arguments." /> <cfargument name="HeaderCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the header row (if a header row is used)." /> <cfargument name="RowCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the non-header rows." /> <cfargument name="AltRowCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the alternate non-header rows. This style overwrites parts of the RowCSS." /> <cfscript> // Set up local scope. var LOCAL = StructNew(); // Create Excel workbook. LOCAL.WorkBook = CreateObject( "java", "org.apache.poi.hssf.usermodel.HSSFWorkbook" ).Init(); // Check to see if we are dealing with an array of sheets or if we were // passed in a single sheet. if (IsArray( ARGUMENTS.Sheets )){ // This is an array of sheets. We are going to write each one of them // as a tab to the Excel file. Loop over the sheet array to create each // sheet for the already created workbook. for ( LOCAL.SheetIndex = 1 ; LOCAL.SheetIndex LTE ArrayLen( ARGUMENTS.Sheets ) ; LOCAL.SheetIndex = (LOCAL.SheetIndex + 1) ){ // Create sheet for the given query information.. WriteExcelSheet( WorkBook = LOCAL.WorkBook, Query = ARGUMENTS.Sheets[ LOCAL.SheetIndex ].Query, ColumnList = ARGUMENTS.Sheets[ LOCAL.SheetIndex ].ColumnList, ColumnNames = ARGUMENTS.Sheets[ LOCAL.SheetIndex ].ColumnNames, SheetName = ARGUMENTS.Sheets[ LOCAL.SheetIndex ].SheetName, Delimiters = ARGUMENTS.Delimiters, HeaderCSS = ARGUMENTS.HeaderCSS, RowCSS = ARGUMENTS.RowCSS, AltRowCSS = ARGUMENTS.AltRowCSS ); } } else { // We were passed in a single sheet object. Write this sheet as the // first and only sheet in the already created workbook. WriteExcelSheet( WorkBook = LOCAL.WorkBook, Query = ARGUMENTS.Sheets.Query, ColumnList = ARGUMENTS.Sheets.ColumnList, ColumnNames = ARGUMENTS.Sheets.ColumnNames, SheetName = ARGUMENTS.Sheets.SheetName, Delimiters = ARGUMENTS.Delimiters, HeaderCSS = ARGUMENTS.HeaderCSS, RowCSS = ARGUMENTS.RowCSS, AltRowCSS = ARGUMENTS.AltRowCSS ); } // ASSERT: At this point, either we were passed a single Sheet object // or we were passed an array of sheets. Either way, we now have all // of sheets written to the WorkBook object. // Create a file based on the path that was passed in. We will stream // the work data to the file via a file output stream. LOCAL.FileOutputStream = CreateObject( "java", "java.io.FileOutputStream" ).Init( JavaCast( "string", ARGUMENTS.FilePath ) ); // Write the workout data to the file stream. LOCAL.WorkBook.Write( LOCAL.FileOutputStream ); // Close the file output stream. This will release any locks on // the file and finalize the process. LOCAL.FileOutputStream.Close(); // Return out. return; </cfscript> </cffunction> <cffunction name="WriteExcelSheet" access="public" returntype="void" output="false" hint="Writes the given 'Sheet' structure to the given workbook."> <!--- Define arguments. ---> <cfargument name="WorkBook" type="any" required="true" hint="This is the Excel workbook that will create the sheets." /> <cfargument name="Query" type="any" required="true" hint="This is the query from which we will get the data." /> <cfargument name="ColumnList" type="string" required="false" default="#ARGUMENTS.Query.ColumnList#" hint="This is list of columns provided in custom-ordered." /> <cfargument name="ColumnNames" type="string" required="false" default="" hint="This the the list of optional header-row column names. If this is not provided, no header row is used." /> <cfargument name="SheetName" type="string" required="false" default="Sheet #(ARGUMENTS.WorkBook.GetNumberOfSheets() + 1)#" hint="This is the optional name that appears in this sheet's tab." /> <cfargument name="Delimiters" type="string" required="false" default="," hint="The list of delimiters used for the column list and column name arguments." /> <cfargument name="HeaderCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the header row (if a header row is used)." /> <cfargument name="RowCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the non-header rows." /> <cfargument name="AltRowCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the alternate non-header rows. This style overwrites parts of the RowCSS." /> <cfscript> // Set up local scope. var LOCAL = StructNew(); // Set up data type map so that we can map each column name to // the type of data contained. LOCAL.DataMap = StructNew(); // Get the meta data of the query to help us create the data mappings. LOCAL.MetaData = GetMetaData( ARGUMENTS.Query ); // Loop over meta data values to set up the data mapping. for ( LOCAL.MetaIndex = 1 ; LOCAL.MetaIndex LTE ArrayLen( LOCAL.MetaData ) ; LOCAL.MetaIndex = (LOCAL.MetaIndex + 1) ){ // Map the column name to the data type. LOCAL.DataMap[ LOCAL.MetaData[ LOCAL.MetaIndex ].Name ] = LOCAL.MetaData[ LOCAL.MetaIndex ].TypeName; } // Create standardized header CSS by parsing the raw header css. LOCAL.HeaderCSS = ParseRawCSS( ARGUMENTS.HeaderCSS ); // Get the header style object based on the CSS. LOCAL.HeaderStyle = GetCellStyle( WorkBook = ARGUMENTS.WorkBook, CSS = LOCAL.HeaderCSS ); // Create standardized row CSS by parsing the raw row css. LOCAL.RowCSS = ParseRawCSS( ARGUMENTS.RowCSS ); // Get the row style object based on the CSS. LOCAL.RowStyle = GetCellStyle( WorkBook = ARGUMENTS.WorkBook, CSS = LOCAL.RowCSS ); // Create standardized alt-row CSS by parsing the raw alt-row css. LOCAL.AltRowCSS = ParseRawCSS( ARGUMENTS.AltRowCSS ); // Now, loop over alt row css and check for values. If there are not // values (no length), then overwrite the alt row with the standard // row. This is a round-about way of letting the alt row override // the standard row. for (LOCAL.Key in LOCAL.AltRowCSS){ // Check for value. if (NOT Len( LOCAL.AltRowCSS[ LOCAL.Key ] )){ // Since we don't have an alt row style, copy over the standard // row style's value for this key. LOCAL.AltRowCSS[ LOCAL.Key ] = LOCAL.RowCSS[ LOCAL.Key ]; } } // Get the alt-row style object based on the CSS. LOCAL.AltRowStyle = GetCellStyle( WorkBook = ARGUMENTS.WorkBook, CSS = LOCAL.AltRowCSS ); // Create the sheet in the workbook. LOCAL.Sheet = ARGUMENTS.WorkBook.CreateSheet( JavaCast( "string", ARGUMENTS.SheetName ) ); // Set the sheet's default column width. LOCAL.Sheet.SetDefaultColumnWidth( JavaCast( "int", 23 ) ); // Set a default row offset so that we can keep add the header // column without worrying about it later. LOCAL.RowOffset = -1; // Check to see if we have any column names. If we do, then we // are going to create a header row with these names in order // based on the passed in delimiter. if (Len( ARGUMENTS.ColumnNames )){ // Convert the column names to an array for easier // indexing and faster access. LOCAL.ColumnNames = ListToArray( ARGUMENTS.ColumnNames, ARGUMENTS.Delimiters ); // Create a header row. LOCAL.Row = LOCAL.Sheet.CreateRow( JavaCast( "int", 0 ) ); // Set the row height. /* LOCAL.Row.SetHeightInPoints( JavaCast( "float", 14 ) ); */ // Loop over the column names. for ( LOCAL.ColumnIndex = 1 ; LOCAL.ColumnIndex LTE ArrayLen( LOCAL.ColumnNames ) ; LOCAL.ColumnIndex = (LOCAL.ColumnIndex + 1) ){ // Create a cell for this column header. LOCAL.Cell = LOCAL.Row.CreateCell( JavaCast( "int", (LOCAL.ColumnIndex - 1) ) ); // Set the cell value. LOCAL.Cell.SetCellValue( JavaCast( "string", LOCAL.ColumnNames[ LOCAL.ColumnIndex ] ) ); // Set the header cell style. LOCAL.Cell.SetCellStyle( LOCAL.HeaderStyle ); } // Set the row offset to zero since this will take care of // the zero-based index for the rest of the query records. LOCAL.RowOffset = 0; } // Convert the list of columns to the an array for easier // indexing and faster access. LOCAL.Columns = ListToArray( ARGUMENTS.ColumnList, ARGUMENTS.Delimiters ); // Loop over the query records to add each one to the // current sheet. for ( LOCAL.RowIndex = 1 ; LOCAL.RowIndex LTE ARGUMENTS.Query.RecordCount ; LOCAL.RowIndex = (LOCAL.RowIndex + 1) ){ // Create a row for this query record. LOCAL.Row = LOCAL.Sheet.CreateRow( JavaCast( "int", (LOCAL.RowIndex + LOCAL.RowOffset) ) ); /* // Set the row height. LOCAL.Row.SetHeightInPoints( JavaCast( "float", 14 ) ); */ // Loop over the columns to create the individual data cells // and set the values. for ( LOCAL.ColumnIndex = 1 ; LOCAL.ColumnIndex LTE ArrayLen( LOCAL.Columns ) ; LOCAL.ColumnIndex = (LOCAL.ColumnIndex + 1) ){ // Create a cell for this query cell. LOCAL.Cell = LOCAL.Row.CreateCell( JavaCast( "int", (LOCAL.ColumnIndex - 1) ) ); // Get the generic cell value (short hand). LOCAL.CellValue = ARGUMENTS.Query[ LOCAL.Columns[ LOCAL.ColumnIndex ] ][ LOCAL.RowIndex ]; // Check to see how we want to set the value. Meaning, what // kind of data mapping do we want to apply? Get the data // mapping value. LOCAL.DataMapValue = LOCAL.DataMap[ LOCAL.Columns[ LOCAL.ColumnIndex ] ]; // Check to see what value type we are working with. I am // not sure what the set of values are, so trying to keep // it general. if (REFindNoCase( "int", LOCAL.DataMapValue )){ LOCAL.DataMapCast = "int"; } else if (REFindNoCase( "long", LOCAL.DataMapValue )){ LOCAL.DataMapCast = "long"; } else if (REFindNoCase( "double|decimal|numeric", LOCAL.DataMapValue )){ LOCAL.DataMapCast = "double"; } else if (REFindNoCase( "float|real|date|time", LOCAL.DataMapValue )){ LOCAL.DataMapCast = "float"; } else if (REFindNoCase( "bit", LOCAL.DataMapValue )){ LOCAL.DataMapCast = "boolean"; } else if (REFindNoCase( "char|text|memo", LOCAL.DataMapValue )){ LOCAL.DataMapCast = "string"; } else if (IsNumeric( LOCAL.CellValue )){ LOCAL.DataMapCast = "float"; } else { LOCAL.DataMapCast = "string"; } // Set the cell value using the data map casting that we // just determined and the value that we previously grabbed // (for short hand). // // NOTE: Only set the cell value if we have a length. This // will stop us from improperly attempting to cast NULL values. if (Len( LOCAL.CellValue )){ LOCAL.Cell.SetCellValue( JavaCast( LOCAL.DataMapCast, LOCAL.CellValue ) ); } // Get a pointer to the proper cell style. Check to see if we // are in an alternate row. if (LOCAL.RowIndex MOD 2){ // Set standard row style. LOCAL.Cell.SetCellStyle( LOCAL.RowStyle ); } else { // Set alternate row style. LOCAL.Cell.SetCellStyle( LOCAL.AltRowStyle ); } } } // Return out. return; </cfscript> </cffunction> <cffunction name="WriteSingleExcel" access="public" returntype="void" output="false" hint="Write the given query to an Excel file."> <!--- Define arguments. ---> <cfargument name="FilePath" type="string" required="true" hint="This is the expanded path of the Excel file." /> <cfargument name="Query" type="query" required="true" hint="This is the query from which we will get the data for the Excel file." /> <cfargument name="ColumnList" type="string" required="false" default="#ARGUMENTS.Query.ColumnList#" hint="This is list of columns provided in custom-order." /> <cfargument name="ColumnNames" type="string" required="false" default="" hint="This the the list of optional header-row column names. If this is not provided, no header row is used." /> <cfargument name="SheetName" type="string" required="false" default="Sheet 1" hint="This is the optional name that appears in the first (and only) workbook tab." /> <cfargument name="Delimiters" type="string" required="false" default="," hint="The list of delimiters used for the column list and column name arguments." /> <cfargument name="HeaderCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the header row (if a header row is used)." /> <cfargument name="RowCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the non-header rows." /> <cfargument name="AltRowCSS" type="string" required="false" default="" hint="Defines the limited CSS available for the alternate non-header rows. This style overwrites parts of the RowCSS." /> <cfscript> // Set up local scope. var LOCAL = StructNew(); // Get a new sheet object. LOCAL.Sheet = GetNewSheetStruct(); // Set the sheet properties. LOCAL.Sheet.Query = ARGUMENTS.Query; LOCAL.Sheet.ColumnList = ARGUMENTS.ColumnList; LOCAL.Sheet.ColumnNames = ARGUMENTS.ColumnNames; LOCAL.Sheet.SheetName = ARGUMENTS.SheetName; // Write this sheet to an Excel file. WriteExcel( FilePath = ARGUMENTS.FilePath, Sheets = LOCAL.Sheet, Delimiters = ARGUMENTS.Delimiters, HeaderCSS = ARGUMENTS.HeaderCSS, RowCSS = ARGUMENTS.RowCSS, AltRowCSS = ARGUMENTS.AltRowCSS ); // Return out. return; </cfscript> </cffunction> <cffunction name="getSheetColumnNames" access="private" hint="gets or derives the column names for the sheet"> <cfargument name="Sheet" type="any" required="true"/> <cfargument name="HasHeaderRow" type="boolean" required="true"/> <cfscript> var local = StructNew(); local.names = ArrayNew(1); local.columnName = ""; local.row = Sheet.GetRow(JavaCast( "int", 0 )); local.columnCount = LOCAL.Row.GetLastCellNum(); for(local.columnIndex = 0; local.columnIndex LT local.columnCount; local.columnIndex=local.columnIndex+1){ local.columnName = "column#local.columnIndex+1#"; if(arguments.HasHeaderRow){ try{ local.columnName = local.row.GetCell(JavaCast( "int", local.columnIndex )) .GetStringCellValue(); }catch(Any exception){ //whoopsie. we'll use the originally derived column name instead } } ArrayAppend(local.names,local.columnName); } return local.names; </cfscript> </cffunction> <cffunction name="Debug"> <cfdump var="#ARGUMENTS#" /> <cfabort /> </cffunction> </cfcomponent>
{ "pile_set_name": "Github" }
lf lf crlf lf lf
{ "pile_set_name": "Github" }
/* * Copyright (c) 2012 Justin Ruggles <[email protected]> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <stdint.h> #include "libavutil/common.h" #include "libavutil/libm.h" #include "libavutil/samplefmt.h" #include "avresample.h" #include "internal.h" #include "audio_data.h" #include "audio_mix.h" static const char *coeff_type_names[] = { "q8", "q15", "flt" }; struct AudioMix { AVAudioResampleContext *avr; enum AVSampleFormat fmt; enum AVMixCoeffType coeff_type; uint64_t in_layout; uint64_t out_layout; int in_channels; int out_channels; int ptr_align; int samples_align; int has_optimized_func; const char *func_descr; const char *func_descr_generic; mix_func *mix; mix_func *mix_generic; int in_matrix_channels; int out_matrix_channels; int output_zero[AVRESAMPLE_MAX_CHANNELS]; int input_skip[AVRESAMPLE_MAX_CHANNELS]; int output_skip[AVRESAMPLE_MAX_CHANNELS]; int16_t *matrix_q8[AVRESAMPLE_MAX_CHANNELS]; int32_t *matrix_q15[AVRESAMPLE_MAX_CHANNELS]; float *matrix_flt[AVRESAMPLE_MAX_CHANNELS]; void **matrix; }; void ff_audio_mix_set_func(AudioMix *am, enum AVSampleFormat fmt, enum AVMixCoeffType coeff_type, int in_channels, int out_channels, int ptr_align, int samples_align, const char *descr, void *mix_func) { if (fmt == am->fmt && coeff_type == am->coeff_type && ( in_channels == am->in_matrix_channels || in_channels == 0) && (out_channels == am->out_matrix_channels || out_channels == 0)) { char chan_str[16]; am->mix = mix_func; am->func_descr = descr; am->ptr_align = ptr_align; am->samples_align = samples_align; if (ptr_align == 1 && samples_align == 1) { am->mix_generic = mix_func; am->func_descr_generic = descr; } else { am->has_optimized_func = 1; } if (in_channels) { if (out_channels) snprintf(chan_str, sizeof(chan_str), "[%d to %d] ", in_channels, out_channels); else snprintf(chan_str, sizeof(chan_str), "[%d to any] ", in_channels); } else if (out_channels) { snprintf(chan_str, sizeof(chan_str), "[any to %d] ", out_channels); } else { snprintf(chan_str, sizeof(chan_str), "[any to any] "); } av_log(am->avr, AV_LOG_DEBUG, "audio_mix: found function: [fmt=%s] " "[c=%s] %s(%s)\n", av_get_sample_fmt_name(fmt), coeff_type_names[coeff_type], chan_str, descr); } } #define MIX_FUNC_NAME(fmt, cfmt) mix_any_ ## fmt ##_## cfmt ##_c #define MIX_FUNC_GENERIC(fmt, cfmt, stype, ctype, sumtype, expr) \ static void MIX_FUNC_NAME(fmt, cfmt)(stype **samples, ctype **matrix, \ int len, int out_ch, int in_ch) \ { \ int i, in, out; \ stype temp[AVRESAMPLE_MAX_CHANNELS]; \ for (i = 0; i < len; i++) { \ for (out = 0; out < out_ch; out++) { \ sumtype sum = 0; \ for (in = 0; in < in_ch; in++) \ sum += samples[in][i] * matrix[out][in]; \ temp[out] = expr; \ } \ for (out = 0; out < out_ch; out++) \ samples[out][i] = temp[out]; \ } \ } MIX_FUNC_GENERIC(FLTP, FLT, float, float, float, sum) MIX_FUNC_GENERIC(S16P, FLT, int16_t, float, float, av_clip_int16(lrintf(sum))) MIX_FUNC_GENERIC(S16P, Q15, int16_t, int32_t, int64_t, av_clip_int16(sum >> 15)) MIX_FUNC_GENERIC(S16P, Q8, int16_t, int16_t, int32_t, av_clip_int16(sum >> 8)) /* TODO: templatize the channel-specific C functions */ static void mix_2_to_1_fltp_flt_c(float **samples, float **matrix, int len, int out_ch, int in_ch) { float *src0 = samples[0]; float *src1 = samples[1]; float *dst = src0; float m0 = matrix[0][0]; float m1 = matrix[0][1]; while (len > 4) { *dst++ = *src0++ * m0 + *src1++ * m1; *dst++ = *src0++ * m0 + *src1++ * m1; *dst++ = *src0++ * m0 + *src1++ * m1; *dst++ = *src0++ * m0 + *src1++ * m1; len -= 4; } while (len > 0) { *dst++ = *src0++ * m0 + *src1++ * m1; len--; } } static void mix_2_to_1_s16p_flt_c(int16_t **samples, float **matrix, int len, int out_ch, int in_ch) { int16_t *src0 = samples[0]; int16_t *src1 = samples[1]; int16_t *dst = src0; float m0 = matrix[0][0]; float m1 = matrix[0][1]; while (len > 4) { *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); len -= 4; } while (len > 0) { *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); len--; } } static void mix_2_to_1_s16p_q8_c(int16_t **samples, int16_t **matrix, int len, int out_ch, int in_ch) { int16_t *src0 = samples[0]; int16_t *src1 = samples[1]; int16_t *dst = src0; int16_t m0 = matrix[0][0]; int16_t m1 = matrix[0][1]; while (len > 4) { *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; len -= 4; } while (len > 0) { *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; len--; } } static void mix_1_to_2_fltp_flt_c(float **samples, float **matrix, int len, int out_ch, int in_ch) { float v; float *dst0 = samples[0]; float *dst1 = samples[1]; float *src = dst0; float m0 = matrix[0][0]; float m1 = matrix[1][0]; while (len > 4) { v = *src++; *dst0++ = v * m0; *dst1++ = v * m1; v = *src++; *dst0++ = v * m0; *dst1++ = v * m1; v = *src++; *dst0++ = v * m0; *dst1++ = v * m1; v = *src++; *dst0++ = v * m0; *dst1++ = v * m1; len -= 4; } while (len > 0) { v = *src++; *dst0++ = v * m0; *dst1++ = v * m1; len--; } } static void mix_6_to_2_fltp_flt_c(float **samples, float **matrix, int len, int out_ch, int in_ch) { float v0, v1; float *src0 = samples[0]; float *src1 = samples[1]; float *src2 = samples[2]; float *src3 = samples[3]; float *src4 = samples[4]; float *src5 = samples[5]; float *dst0 = src0; float *dst1 = src1; float *m0 = matrix[0]; float *m1 = matrix[1]; while (len > 0) { v0 = *src0++; v1 = *src1++; *dst0++ = v0 * m0[0] + v1 * m0[1] + *src2 * m0[2] + *src3 * m0[3] + *src4 * m0[4] + *src5 * m0[5]; *dst1++ = v0 * m1[0] + v1 * m1[1] + *src2++ * m1[2] + *src3++ * m1[3] + *src4++ * m1[4] + *src5++ * m1[5]; len--; } } static void mix_2_to_6_fltp_flt_c(float **samples, float **matrix, int len, int out_ch, int in_ch) { float v0, v1; float *dst0 = samples[0]; float *dst1 = samples[1]; float *dst2 = samples[2]; float *dst3 = samples[3]; float *dst4 = samples[4]; float *dst5 = samples[5]; float *src0 = dst0; float *src1 = dst1; while (len > 0) { v0 = *src0++; v1 = *src1++; *dst0++ = v0 * matrix[0][0] + v1 * matrix[0][1]; *dst1++ = v0 * matrix[1][0] + v1 * matrix[1][1]; *dst2++ = v0 * matrix[2][0] + v1 * matrix[2][1]; *dst3++ = v0 * matrix[3][0] + v1 * matrix[3][1]; *dst4++ = v0 * matrix[4][0] + v1 * matrix[4][1]; *dst5++ = v0 * matrix[5][0] + v1 * matrix[5][1]; len--; } } static av_cold int mix_function_init(AudioMix *am) { am->func_descr = am->func_descr_generic = "n/a"; am->mix = am->mix_generic = NULL; /* no need to set a mix function when we're skipping mixing */ if (!am->in_matrix_channels || !am->out_matrix_channels) return 0; /* any-to-any C versions */ ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, 0, 0, 1, 1, "C", MIX_FUNC_NAME(FLTP, FLT)); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, 0, 0, 1, 1, "C", MIX_FUNC_NAME(S16P, FLT)); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q15, 0, 0, 1, 1, "C", MIX_FUNC_NAME(S16P, Q15)); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q8, 0, 0, 1, 1, "C", MIX_FUNC_NAME(S16P, Q8)); /* channel-specific C versions */ ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, 2, 1, 1, 1, "C", mix_2_to_1_fltp_flt_c); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, 2, 1, 1, 1, "C", mix_2_to_1_s16p_flt_c); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q8, 2, 1, 1, 1, "C", mix_2_to_1_s16p_q8_c); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, 1, 2, 1, 1, "C", mix_1_to_2_fltp_flt_c); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, 6, 2, 1, 1, "C", mix_6_to_2_fltp_flt_c); ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, 2, 6, 1, 1, "C", mix_2_to_6_fltp_flt_c); if (ARCH_X86) ff_audio_mix_init_x86(am); if (!am->mix) { av_log(am->avr, AV_LOG_ERROR, "audio_mix: NO FUNCTION FOUND: [fmt=%s] " "[c=%s] [%d to %d]\n", av_get_sample_fmt_name(am->fmt), coeff_type_names[am->coeff_type], am->in_channels, am->out_channels); return AVERROR_PATCHWELCOME; } return 0; } AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr) { AudioMix *am; int ret; am = av_mallocz(sizeof(*am)); if (!am) return NULL; am->avr = avr; if (avr->internal_sample_fmt != AV_SAMPLE_FMT_S16P && avr->internal_sample_fmt != AV_SAMPLE_FMT_FLTP) { av_log(avr, AV_LOG_ERROR, "Unsupported internal format for " "mixing: %s\n", av_get_sample_fmt_name(avr->internal_sample_fmt)); goto error; } am->fmt = avr->internal_sample_fmt; am->coeff_type = avr->mix_coeff_type; am->in_layout = avr->in_channel_layout; am->out_layout = avr->out_channel_layout; am->in_channels = avr->in_channels; am->out_channels = avr->out_channels; /* build matrix if the user did not already set one */ if (avr->mix_matrix) { ret = ff_audio_mix_set_matrix(am, avr->mix_matrix, avr->in_channels); if (ret < 0) goto error; av_freep(&avr->mix_matrix); } else { double *matrix_dbl = av_mallocz(avr->out_channels * avr->in_channels * sizeof(*matrix_dbl)); if (!matrix_dbl) goto error; ret = avresample_build_matrix(avr->in_channel_layout, avr->out_channel_layout, avr->center_mix_level, avr->surround_mix_level, avr->lfe_mix_level, avr->normalize_mix_level, matrix_dbl, avr->in_channels, avr->matrix_encoding); if (ret < 0) { av_free(matrix_dbl); goto error; } ret = ff_audio_mix_set_matrix(am, matrix_dbl, avr->in_channels); if (ret < 0) { av_log(avr, AV_LOG_ERROR, "error setting mix matrix\n"); av_free(matrix_dbl); goto error; } av_free(matrix_dbl); } return am; error: av_free(am); return NULL; } void ff_audio_mix_free(AudioMix **am_p) { AudioMix *am; if (!*am_p) return; am = *am_p; if (am->matrix) { av_free(am->matrix[0]); am->matrix = NULL; } memset(am->matrix_q8, 0, sizeof(am->matrix_q8 )); memset(am->matrix_q15, 0, sizeof(am->matrix_q15)); memset(am->matrix_flt, 0, sizeof(am->matrix_flt)); av_freep(am_p); } int ff_audio_mix(AudioMix *am, AudioData *src) { int use_generic = 1; int len = src->nb_samples; int i, j; /* determine whether to use the optimized function based on pointer and samples alignment in both the input and output */ if (am->has_optimized_func) { int aligned_len = FFALIGN(len, am->samples_align); if (!(src->ptr_align % am->ptr_align) && src->samples_align >= aligned_len) { len = aligned_len; use_generic = 0; } } av_dlog(am->avr, "audio_mix: %d samples - %d to %d channels (%s)\n", src->nb_samples, am->in_channels, am->out_channels, use_generic ? am->func_descr_generic : am->func_descr); if (am->in_matrix_channels && am->out_matrix_channels) { uint8_t **data; uint8_t *data0[AVRESAMPLE_MAX_CHANNELS] = { NULL }; if (am->out_matrix_channels < am->out_channels || am->in_matrix_channels < am->in_channels) { for (i = 0, j = 0; i < FFMAX(am->in_channels, am->out_channels); i++) { if (am->input_skip[i] || am->output_skip[i] || am->output_zero[i]) continue; data0[j++] = src->data[i]; } data = data0; } else { data = src->data; } if (use_generic) am->mix_generic(data, am->matrix, len, am->out_matrix_channels, am->in_matrix_channels); else am->mix(data, am->matrix, len, am->out_matrix_channels, am->in_matrix_channels); } if (am->out_matrix_channels < am->out_channels) { for (i = 0; i < am->out_channels; i++) if (am->output_zero[i]) av_samples_set_silence(&src->data[i], 0, len, 1, am->fmt); } ff_audio_data_set_channels(src, am->out_channels); return 0; } int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride) { int i, o, i0, o0; if ( am->in_channels <= 0 || am->in_channels > AVRESAMPLE_MAX_CHANNELS || am->out_channels <= 0 || am->out_channels > AVRESAMPLE_MAX_CHANNELS) { av_log(am->avr, AV_LOG_ERROR, "Invalid channel counts\n"); return AVERROR(EINVAL); } #define GET_MATRIX_CONVERT(suffix, scale) \ if (!am->matrix_ ## suffix[0]) { \ av_log(am->avr, AV_LOG_ERROR, "matrix is not set\n"); \ return AVERROR(EINVAL); \ } \ for (o = 0, o0 = 0; o < am->out_channels; o++) { \ for (i = 0, i0 = 0; i < am->in_channels; i++) { \ if (am->input_skip[i] || am->output_zero[o]) \ matrix[o * stride + i] = 0.0; \ else \ matrix[o * stride + i] = am->matrix_ ## suffix[o0][i0] * \ (scale); \ if (!am->input_skip[i]) \ i0++; \ } \ if (!am->output_zero[o]) \ o0++; \ } switch (am->coeff_type) { case AV_MIX_COEFF_TYPE_Q8: GET_MATRIX_CONVERT(q8, 1.0 / 256.0); break; case AV_MIX_COEFF_TYPE_Q15: GET_MATRIX_CONVERT(q15, 1.0 / 32768.0); break; case AV_MIX_COEFF_TYPE_FLT: GET_MATRIX_CONVERT(flt, 1.0); break; default: av_log(am->avr, AV_LOG_ERROR, "Invalid mix coeff type\n"); return AVERROR(EINVAL); } return 0; } static void reduce_matrix(AudioMix *am, const double *matrix, int stride) { int i, o; memset(am->output_zero, 0, sizeof(am->output_zero)); memset(am->input_skip, 0, sizeof(am->input_skip)); memset(am->output_skip, 0, sizeof(am->output_skip)); /* exclude output channels if they can be zeroed instead of mixed */ for (o = 0; o < am->out_channels; o++) { int zero = 1; /* check if the output is always silent */ for (i = 0; i < am->in_channels; i++) { if (matrix[o * stride + i] != 0.0) { zero = 0; break; } } /* check if the corresponding input channel makes a contribution to any output channel */ if (o < am->in_channels) { for (i = 0; i < am->out_channels; i++) { if (matrix[i * stride + o] != 0.0) { zero = 0; break; } } } if (zero) { am->output_zero[o] = 1; am->out_matrix_channels--; if (o < am->in_channels) am->in_matrix_channels--; } } if (am->out_matrix_channels == 0 || am->in_matrix_channels == 0) { am->out_matrix_channels = 0; am->in_matrix_channels = 0; return; } /* skip input channels that contribute fully only to the corresponding output channel */ for (i = 0; i < FFMIN(am->in_channels, am->out_channels); i++) { int skip = 1; for (o = 0; o < am->out_channels; o++) { int i0; if ((o != i && matrix[o * stride + i] != 0.0) || (o == i && matrix[o * stride + i] != 1.0)) { skip = 0; break; } /* if the input contributes fully to the output, also check that no other inputs contribute to this output */ if (o == i) { for (i0 = 0; i0 < am->in_channels; i0++) { if (i0 != i && matrix[o * stride + i0] != 0.0) { skip = 0; break; } } } } if (skip) { am->input_skip[i] = 1; am->in_matrix_channels--; } } /* skip input channels that do not contribute to any output channel */ for (; i < am->in_channels; i++) { int contrib = 0; for (o = 0; o < am->out_channels; o++) { if (matrix[o * stride + i] != 0.0) { contrib = 1; break; } } if (!contrib) { am->input_skip[i] = 1; am->in_matrix_channels--; } } if (am->in_matrix_channels == 0) { am->out_matrix_channels = 0; return; } /* skip output channels that only get full contribution from the corresponding input channel */ for (o = 0; o < FFMIN(am->in_channels, am->out_channels); o++) { int skip = 1; int o0; for (i = 0; i < am->in_channels; i++) { if ((o != i && matrix[o * stride + i] != 0.0) || (o == i && matrix[o * stride + i] != 1.0)) { skip = 0; break; } } /* check if the corresponding input channel makes a contribution to any other output channel */ i = o; for (o0 = 0; o0 < am->out_channels; o0++) { if (o0 != i && matrix[o0 * stride + i] != 0.0) { skip = 0; break; } } if (skip) { am->output_skip[o] = 1; am->out_matrix_channels--; } } if (am->out_matrix_channels == 0) { am->in_matrix_channels = 0; return; } } int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride) { int i, o, i0, o0, ret; char in_layout_name[128]; char out_layout_name[128]; if ( am->in_channels <= 0 || am->in_channels > AVRESAMPLE_MAX_CHANNELS || am->out_channels <= 0 || am->out_channels > AVRESAMPLE_MAX_CHANNELS) { av_log(am->avr, AV_LOG_ERROR, "Invalid channel counts\n"); return AVERROR(EINVAL); } if (am->matrix) { av_free(am->matrix[0]); am->matrix = NULL; } am->in_matrix_channels = am->in_channels; am->out_matrix_channels = am->out_channels; reduce_matrix(am, matrix, stride); #define CONVERT_MATRIX(type, expr) \ am->matrix_## type[0] = av_mallocz(am->out_matrix_channels * \ am->in_matrix_channels * \ sizeof(*am->matrix_## type[0])); \ if (!am->matrix_## type[0]) \ return AVERROR(ENOMEM); \ for (o = 0, o0 = 0; o < am->out_channels; o++) { \ if (am->output_zero[o] || am->output_skip[o]) \ continue; \ if (o0 > 0) \ am->matrix_## type[o0] = am->matrix_## type[o0 - 1] + \ am->in_matrix_channels; \ for (i = 0, i0 = 0; i < am->in_channels; i++) { \ double v; \ if (am->input_skip[i] || am->output_zero[i]) \ continue; \ v = matrix[o * stride + i]; \ am->matrix_## type[o0][i0] = expr; \ i0++; \ } \ o0++; \ } \ am->matrix = (void **)am->matrix_## type; if (am->in_matrix_channels && am->out_matrix_channels) { switch (am->coeff_type) { case AV_MIX_COEFF_TYPE_Q8: CONVERT_MATRIX(q8, av_clip_int16(lrint(256.0 * v))) break; case AV_MIX_COEFF_TYPE_Q15: CONVERT_MATRIX(q15, av_clipl_int32(llrint(32768.0 * v))) break; case AV_MIX_COEFF_TYPE_FLT: CONVERT_MATRIX(flt, v) break; default: av_log(am->avr, AV_LOG_ERROR, "Invalid mix coeff type\n"); return AVERROR(EINVAL); } } ret = mix_function_init(am); if (ret < 0) return ret; av_get_channel_layout_string(in_layout_name, sizeof(in_layout_name), am->in_channels, am->in_layout); av_get_channel_layout_string(out_layout_name, sizeof(out_layout_name), am->out_channels, am->out_layout); av_log(am->avr, AV_LOG_DEBUG, "audio_mix: %s to %s\n", in_layout_name, out_layout_name); av_log(am->avr, AV_LOG_DEBUG, "matrix size: %d x %d\n", am->in_matrix_channels, am->out_matrix_channels); for (o = 0; o < am->out_channels; o++) { for (i = 0; i < am->in_channels; i++) { if (am->output_zero[o]) av_log(am->avr, AV_LOG_DEBUG, " (ZERO)"); else if (am->input_skip[i] || am->output_zero[i] || am->output_skip[o]) av_log(am->avr, AV_LOG_DEBUG, " (SKIP)"); else av_log(am->avr, AV_LOG_DEBUG, " %0.3f ", matrix[o * am->in_channels + i]); } av_log(am->avr, AV_LOG_DEBUG, "\n"); } return 0; }
{ "pile_set_name": "Github" }
package com.shenjiajun.customizeviewdemo.views; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Shader; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.util.AttributeSet; import android.widget.ImageView; /** * Created by shenjiajun on 2016/4/8. */ public class CircleImageView extends ImageView { private Bitmap mBitmap; private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888; private static final int COLORDRAWABLE_DIMENSION = 2; private Paint mBitmapPaint; private BitmapShader mBitmapShader; public CircleImageView(Context context) { super(context); } public CircleImageView(Context context, AttributeSet attrs) { super(context, attrs); } public CircleImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } private void setUp() { mBitmapPaint = new Paint(); mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); mBitmapPaint.setAntiAlias(true); mBitmapPaint.setShader(mBitmapShader); invalidate(); } @Override protected void onDraw(Canvas canvas) { // super.onDraw(canvas); int radius = Math.min(getWidth() / 2, getHeight() / 2); canvas.drawCircle(getWidth() / 2, getHeight() / 2, radius, mBitmapPaint); } @Override public void setImageResource(int resId) { super.setImageResource(resId); mBitmap = getBitmapFromDrawable(getDrawable()); setUp(); } @Override public void setImageURI(Uri uri) { super.setImageURI(uri); mBitmap = uri != null ? getBitmapFromDrawable(getDrawable()) : null; setUp(); } @Override public void setImageDrawable(Drawable drawable) { super.setImageDrawable(drawable); mBitmap = getBitmapFromDrawable(drawable); setUp(); } private Bitmap getBitmapFromDrawable(Drawable drawable) { if (drawable == null) { return null; } if (drawable instanceof BitmapDrawable) { return ((BitmapDrawable) drawable).getBitmap(); } try { Bitmap bitmap; if (drawable instanceof ColorDrawable) { bitmap = Bitmap.createBitmap(COLORDRAWABLE_DIMENSION, COLORDRAWABLE_DIMENSION, BITMAP_CONFIG); } else { bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), BITMAP_CONFIG); } Canvas canvas = new Canvas(bitmap); drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); drawable.draw(canvas); return bitmap; } catch (Exception e) { e.printStackTrace(); return null; } } }
{ "pile_set_name": "Github" }
<?php /** * This file is part of prooph/proophessor-do. * (c) 2014-2018 prooph software GmbH <[email protected]> * (c) 2015-2018 Sascha-Oliver Prolic <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Prooph\ProophessorDo; /** * Local configuration overrides - make your adjustments here */ return [ // mail transport settings 'proophessor-do' => [ 'mail' => [ 'transport' => 'in_memory', // smtp or in_memory (default) // uncomment if you want to use smtp. Preset for gmail // 'smtp' => [ // 'name' => 'gmail.com', // 'host' => 'smtp.gmail.com', // 'port' => 587, // 'connection_class' => 'plain', // 'connection_config' => [ // 'username' => 'YOUR_USERNAME_HERE', // 'password' => 'YOUR_PASSWORD_HERE', // 'ssl' => 'tls', // ], // ], ], ], ];
{ "pile_set_name": "Github" }
module Concurrent module Synchronization if Concurrent.on_jruby? && Concurrent.java_extensions_loaded? # @!visibility private # @!macro internal_implementation_note class JRubyLockableObject < AbstractLockableObject end end end end
{ "pile_set_name": "Github" }
/* * 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.aliyuncs.dyvmsapi.model.v20170525; import com.aliyuncs.AcsResponse; import com.aliyuncs.dyvmsapi.transform.v20170525.SmartCallResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class SmartCallResponse extends AcsResponse { private String requestId; private String callId; private String code; private String message; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getCallId() { return this.callId; } public void setCallId(String callId) { this.callId = callId; } public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } @Override public SmartCallResponse getInstance(UnmarshallerContext context) { return SmartCallResponseUnmarshaller.unmarshall(this, context); } }
{ "pile_set_name": "Github" }
var bool: BOOL____00005 :: is_defined_var :: var_is_introduced; var 1..81: INT____00010 :: is_defined_var :: var_is_introduced; var 1..81: total_sum :: output_var = INT____00010; array [1..9] of var 0..9: x :: output_array([1..3, 1..3]); constraint int_eq(x[5], 0); constraint int_le_reif(1, x[1], true); constraint int_le_reif(1, x[2], true); constraint int_le_reif(1, x[3], true); constraint int_le_reif(1, x[4], true); constraint int_le_reif(1, x[5], BOOL____00005) :: defines_var(BOOL____00005); constraint int_le_reif(1, x[6], true); constraint int_le_reif(1, x[7], true); constraint int_le_reif(1, x[8], true); constraint int_le_reif(1, x[9], true); constraint int_lin_eq([1, 1, 1], [x[1], x[2], x[3]], 9); constraint int_lin_eq([1, 1, 1], [x[1], x[4], x[7]], 9); constraint int_lin_eq([1, 1, 1], [x[3], x[6], x[9]], 9); constraint int_lin_eq([1, 1, 1], [x[7], x[8], x[9]], 9); constraint int_lin_eq([-1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [INT____00010, x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9]], 0) :: defines_var(INT____00010); solve satisfy;
{ "pile_set_name": "Github" }
/******************************************************************************* * Copyright (c) 2019 Pivotal, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v10.html * * Contributors: * Pivotal, Inc. - initial API and implementation *******************************************************************************/ package org.springframework.ide.vscode.boot.java.livehover.v2; import java.util.Collection; import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CopyOnWriteArrayList; /** * @author Martin Lippert */ public class SpringProcessLiveDataProvider { private final ConcurrentMap<String, SpringProcessLiveData> liveData; private final List<SpringProcessLiveDataChangeListener> listeners; public SpringProcessLiveDataProvider() { this.liveData = new ConcurrentHashMap<>(); this.listeners = new CopyOnWriteArrayList<>(); } public SpringProcessLiveData[] getLatestLiveData() { Collection<SpringProcessLiveData> values = this.liveData.values(); return (SpringProcessLiveData[]) values.toArray(new SpringProcessLiveData[values.size()]); } /** * add the process live data, if there is not already process live data associated with the process key * @return true, if the data was added (and was new), otherwise false */ public boolean add(String processKey, SpringProcessLiveData liveData) { SpringProcessLiveData oldData = this.liveData.putIfAbsent(processKey, liveData); if (oldData == null) { announceChangedLiveData(); } return oldData == null; } public void remove(String processKey) { SpringProcessLiveData removed = this.liveData.remove(processKey); if (removed != null) { announceChangedLiveData(); } } public void update(String processKey, SpringProcessLiveData liveData) { this.liveData.put(processKey, liveData); announceChangedLiveData(); } public void addLiveDataChangeListener(SpringProcessLiveDataChangeListener listener) { this.listeners.add(listener); } public void removeLiveDataChangeListener(SpringProcessLiveDataChangeListener listener) { this.listeners.remove(listener); } private void announceChangedLiveData() { SpringProcessLiveData[] latestLiveData = getLatestLiveData(); SpringProcessLiveDataChangeEvent event = new SpringProcessLiveDataChangeEvent(latestLiveData); for (SpringProcessLiveDataChangeListener listener : this.listeners) { listener.liveDataChanged(event); } } }
{ "pile_set_name": "Github" }
import module namespace ddl = "http://zorba.io/modules/store/static/collections/ddl"; import module namespace dml = "http://zorba.io/modules/store/static/collections/dml"; import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata"; ddl:create(xs:QName("ns:collection_queue")); dml:insert-first(xs:QName("ns:collection_queue"), <a/>); dml:insert-before(xs:QName("ns:collection_queue"), <a/>, xs:QName("ns:collection_queue")[1]);
{ "pile_set_name": "Github" }
from pyomo.environ import * A = ['hammer', 'wrench', 'screwdriver', 'towel'] b = {'hammer':8, 'wrench':3, 'screwdriver':6, 'towel':11} w = {'hammer':5, 'wrench':7, 'screwdriver':4, 'towel':3} W_max = 14 model = ConcreteModel() model.x = Var( A, within=Binary ) model.obj = Objective( expr = sum( b[i]*model.x[i] for i in A ), sense = maximize ) model.weight_con = Constraint( expr = sum( w[i]*model.x[i] for i in A ) <= W_max ) opt = SolverFactory('glpk') opt_success = opt.solve(model) model.display()
{ "pile_set_name": "Github" }
# 1 "m.c" ! mmixal:= 8H LOC Data_Section .text ! mmixal:= 9H LOC 8B .p2align 2 LOC @+(4-@)&3 .global main main IS @ GET $0,rJ PUSHJ $1,bar PUSHJ $1,bar PUT rJ,$0 POP 1,0 .data ! mmixal:= 8H LOC 9B
{ "pile_set_name": "Github" }
// Copyright 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_ORDINAL_H_ #define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_ORDINAL_H_ #include <stddef.h> #include <stdint.h> #include "sync/base/sync_export.h" #include "sync/internal_api/public/base/ordinal.h" namespace syncer { // A NodeOrdinal is an Ordinal whose internal value comes from the // ordinal_in_parent field of SyncEntity (see sync.proto). It uses // the entire uint8_t range for backwards compatibility with the old // int64_t-based positioning. struct NodeOrdinalTraits { static const uint8_t kZeroDigit = 0; static const uint8_t kMaxDigit = UINT8_MAX; static const size_t kMinLength = 8; }; typedef Ordinal<NodeOrdinalTraits> NodeOrdinal; static_assert(static_cast<char>(NodeOrdinal::kZeroDigit) == '\x00', "NodeOrdinal has incorrect zero digit"); static_assert(static_cast<char>(NodeOrdinal::kOneDigit) == '\x01', "NodeOrdinal has incorrect one digit"); static_assert(static_cast<char>(NodeOrdinal::kMidDigit) == '\x80', "NodeOrdinal has incorrect mid digit"); static_assert(static_cast<char>(NodeOrdinal::kMaxDigit) == '\xff', "NodeOrdinal has incorrect max digit"); static_assert(NodeOrdinal::kMidDigitValue == 128, "NodeOrdinal has incorrect mid digit value"); static_assert(NodeOrdinal::kMaxDigitValue == 255, "NodeOrdinal has incorrect max digit value"); static_assert(NodeOrdinal::kRadix == 256, "NodeOrdinal has incorrect radix"); // Converts an int64_t position (usually from the position_in_parent // field of SyncEntity) to a NodeOrdinal. This transformation // preserves the ordering relation: a < b under integer ordering if // and only if Int64ToNodeOrdinal(a) < Int64ToNodeOrdinal(b). SYNC_EXPORT NodeOrdinal Int64ToNodeOrdinal(int64_t x); // The inverse of Int64ToNodeOrdinal. This conversion is, in general, // lossy: NodeOrdinals can have arbitrary fidelity, while numeric // positions contain only 64 bits of information (in fact, this is the // reason we've moved away from them). SYNC_EXPORT int64_t NodeOrdinalToInt64(const NodeOrdinal& ordinal); } // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_ORDINAL_H_
{ "pile_set_name": "Github" }
package swarm import ( "context" "fmt" "strings" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" ) type joinOptions struct { remote string listenAddr NodeAddrOption // Not a NodeAddrOption because it has no default port. advertiseAddr string dataPathAddr string token string availability string } func newJoinCommand(dockerCli command.Cli) *cobra.Command { opts := joinOptions{ listenAddr: NewListenAddrOption(), } cmd := &cobra.Command{ Use: "join [OPTIONS] HOST:PORT", Short: "Join a swarm as a node and/or manager", Args: cli.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { opts.remote = args[0] return runJoin(dockerCli, cmd.Flags(), opts) }, } flags := cmd.Flags() flags.Var(&opts.listenAddr, flagListenAddr, "Listen address (format: <ip|interface>[:port])") flags.StringVar(&opts.advertiseAddr, flagAdvertiseAddr, "", "Advertised address (format: <ip|interface>[:port])") flags.StringVar(&opts.dataPathAddr, flagDataPathAddr, "", "Address or interface to use for data path traffic (format: <ip|interface>)") flags.SetAnnotation(flagDataPathAddr, "version", []string{"1.31"}) flags.StringVar(&opts.token, flagToken, "", "Token for entry into the swarm") flags.StringVar(&opts.availability, flagAvailability, "active", `Availability of the node ("active"|"pause"|"drain")`) return cmd } func runJoin(dockerCli command.Cli, flags *pflag.FlagSet, opts joinOptions) error { client := dockerCli.Client() ctx := context.Background() req := swarm.JoinRequest{ JoinToken: opts.token, ListenAddr: opts.listenAddr.String(), AdvertiseAddr: opts.advertiseAddr, DataPathAddr: opts.dataPathAddr, RemoteAddrs: []string{opts.remote}, } if flags.Changed(flagAvailability) { availability := swarm.NodeAvailability(strings.ToLower(opts.availability)) switch availability { case swarm.NodeAvailabilityActive, swarm.NodeAvailabilityPause, swarm.NodeAvailabilityDrain: req.Availability = availability default: return errors.Errorf("invalid availability %q, only active, pause and drain are supported", opts.availability) } } err := client.SwarmJoin(ctx, req) if err != nil { return err } info, err := client.Info(ctx) if err != nil { return err } if info.Swarm.ControlAvailable { fmt.Fprintln(dockerCli.Out(), "This node joined a swarm as a manager.") } else { fmt.Fprintln(dockerCli.Out(), "This node joined a swarm as a worker.") } return nil }
{ "pile_set_name": "Github" }
{ "name": "Radar", "script": "Radar.js", "version": "0.1", "description": "The Radar script creates an animated wavefront from a selected token to reveal visible and invisible tokens on the map, with optional character or token property filters. Output including directional and distance information of qualifying tokens is whispered in the chat to the player calling the script, via the default template.", "authors": "David M.", "roll20userid": 3987469, "patreon": [], "useroptions": [], "dependencies": [], "modifies": { "character.*": "read", "path.*": "read", "graphic.*": "read,write", "player.displayname": "read" }, "conflicts": [], "previousversions": [ "0.1", "0.2" ] }
{ "pile_set_name": "Github" }
/* 哈希表 */ import "rhash.h" main { rhash<int> a a['abc']=3 a['121213']=4 a['1']=1 for i=1 to 1000 a[i.torstr]=i a['121213'].printl }
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Qsnh/meedu. * * (c) XiaoTeng <[email protected]> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace App\Http\Requests\Backend; class NavRequest extends BaseRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'sort' => 'required', 'name' => 'required', 'url' => 'required', 'platform' => 'required', ]; } public function messages() { return [ 'sort.required' => '请输入排序值', 'name.required' => '请输入链接名', 'url.required' => '请输入链接地址', 'platform.required' => '请选择平台', ]; } public function filldata() { return [ 'parent_id' => (int)$this->input('parent_id'), 'platform' => $this->input('platform'), 'sort' => $this->input('sort'), 'name' => $this->input('name'), 'url' => $this->input('url'), 'active_routes' => $this->input('active_routes', '') ?: '', ]; } }
{ "pile_set_name": "Github" }
import * as React from 'react'; import { Label } from '@fluentui/react-northstar'; import { CloseIcon } from '@fluentui/react-icons-northstar'; const LabelExampleRtl = () => ( <Label content="جين دو" circular image={{ src: 'https://fabricweb.azureedge.net/fabric-website/assets/images/avatar/small/matt.jpg', avatar: true }} icon={<CloseIcon {...{}} />} // TODO: it's a bummer that it looks like this, but it is correct :\ /> ); export default LabelExampleRtl;
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <title>DocumentHandler (Java SE 12 &amp; JDK 12 )</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="keywords" content="org.xml.sax.DocumentHandler interface"> <meta name="keywords" content="setDocumentLocator()"> <meta name="keywords" content="startDocument()"> <meta name="keywords" content="endDocument()"> <meta name="keywords" content="startElement()"> <meta name="keywords" content="endElement()"> <meta name="keywords" content="characters()"> <meta name="keywords" content="ignorableWhitespace()"> <meta name="keywords" content="processingInstruction()"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="DocumentHandler (Java SE 12 & JDK 12 )"; } } catch(err) { } //--> var data = {"i0":38,"i1":38,"i2":38,"i3":38,"i4":38,"i5":38,"i6":38,"i7":38}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; var pathtoroot = "../../../../"; var useModuleDirectories = true; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <header role="banner"> <nav role="navigation"> <div class="fixedNav"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a id="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../index.html">Overview</a></li> <li><a href="../../../module-summary.html">Module</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/DocumentHandler.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 class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div> </div> <div class="subNav"> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <ul class="navListSearch"> <li><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </li> </ul> </div> <a id="skip.navbar.top"> <!-- --> </a> <!-- ========= END OF TOP NAVBAR ========= --> </div> <div class="navPadding">&nbsp;</div> <script type="text/javascript"><!-- $('.navPadding').css('padding-top', $('.fixedNav').css("height")); //--> </script> </nav> </header> <!-- ======== START OF CLASS DATA ======== --> <main role="main"> <div class="header"> <div class="subTitle"><span class="moduleLabelInType">Module</span>&nbsp;<a href="../../../module-summary.html">java.xml</a></div> <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.xml.sax</a></div> <h2 title="Interface DocumentHandler" class="title">Interface DocumentHandler</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Known Implementing Classes:</dt> <dd><code><a href="HandlerBase.html" title="class in org.xml.sax">HandlerBase</a></code>, <code><a href="helpers/ParserAdapter.html" title="class in org.xml.sax.helpers">ParserAdapter</a></code></dd> </dl> <hr> <pre><a href="../../../../java.base/java/lang/Deprecated.html" title="annotation in java.lang">@Deprecated</a>(<a href="../../../../java.base/java/lang/Deprecated.html#since()">since</a>="1.5") public interface <span class="typeNameLabel">DocumentHandler</span></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> <div class="deprecationComment">This interface has been replaced by the SAX2 <a href="ContentHandler.html" title="interface in org.xml.sax"><code>ContentHandler</code></a> interface, which includes Namespace support.</div> </div> <div class="block">Receive notification of general document events. <blockquote> <em>This module, both source code and documentation, is in the Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> See <a href='http://www.saxproject.org'>http://www.saxproject.org</a> for further information. </blockquote> <p>This was the main event-handling interface for SAX1; in SAX2, it has been replaced by <a href="ContentHandler.html" title="interface in org.xml.sax"><code>ContentHandler</code></a>, which provides Namespace support and reporting of skipped entities. This interface is included in SAX2 only to support legacy SAX1 applications.</p> <p>The order of events in this interface is very important, and mirrors the order of information in the document itself. For example, all of an element's content (character data, processing instructions, and/or subelements) will appear, in order, between the startElement event and the corresponding endElement event.</p> <p>Application writers who do not want to implement the entire interface can derive a class from HandlerBase, which implements the default functionality; parser writers can instantiate HandlerBase to obtain a default handler. The application can find the location of any document event using the Locator interface supplied by the Parser through the setDocumentLocator method.</p></div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>1.4, SAX 1.0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="Parser.html#setDocumentHandler(org.xml.sax.DocumentHandler)"><code>Parser.setDocumentHandler(org.xml.sax.DocumentHandler)</code></a>, <a href="Locator.html" title="interface in org.xml.sax"><code>Locator</code></a>, <a href="HandlerBase.html" title="class in org.xml.sax"><code>HandlerBase</code></a></dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ========== METHOD SUMMARY =========== --> <section role="region"> <ul class="blockList"> <li class="blockList"><a id="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <div class="memberSummary"> <div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t6" class="tableTab" onclick="show(32);">Deprecated Methods</button></div> <div id="memberSummary_tabpanel" role="tabpanel"> <table aria-labelledby="t0"> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colSecond" scope="col">Method</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor" id="i0"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#characters(char%5B%5D,int,int)">characters</a></span>&#8203;(char[]&nbsp;ch, int&nbsp;start, int&nbsp;length)</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of character data.</div> </td> </tr> <tr class="rowColor" id="i1"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#endDocument()">endDocument</a></span>()</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the end of a document.</div> </td> </tr> <tr class="altColor" id="i2"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#endElement(java.lang.String)">endElement</a></span>&#8203;(<a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;name)</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the end of an element.</div> </td> </tr> <tr class="rowColor" id="i3"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ignorableWhitespace(char%5B%5D,int,int)">ignorableWhitespace</a></span>&#8203;(char[]&nbsp;ch, int&nbsp;start, int&nbsp;length)</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of ignorable whitespace in element content.</div> </td> </tr> <tr class="altColor" id="i4"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#processingInstruction(java.lang.String,java.lang.String)">processingInstruction</a></span>&#8203;(<a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;target, <a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;data)</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of a processing instruction.</div> </td> </tr> <tr class="rowColor" id="i5"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDocumentLocator(org.xml.sax.Locator)">setDocumentLocator</a></span>&#8203;(<a href="Locator.html" title="interface in org.xml.sax">Locator</a>&nbsp;locator)</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive an object for locating the origin of SAX document events.</div> </td> </tr> <tr class="altColor" id="i6"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#startDocument()">startDocument</a></span>()</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the beginning of a document.</div> </td> </tr> <tr class="rowColor" id="i7"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#startElement(java.lang.String,org.xml.sax.AttributeList)">startElement</a></span>&#8203;(<a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;name, <a href="AttributeList.html" title="interface in org.xml.sax">AttributeList</a>&nbsp;atts)</code></th> <td class="colLast"> <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the beginning of an element.</div> </td> </tr> </tbody> </table> </div> </div> </li> </ul> </section> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ METHOD DETAIL ========== --> <section role="region"> <ul class="blockList"> <li class="blockList"><a id="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a id="setDocumentLocator(org.xml.sax.Locator)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setDocumentLocator</h4> <pre class="methodSignature">void&nbsp;setDocumentLocator&#8203;(<a href="Locator.html" title="interface in org.xml.sax">Locator</a>&nbsp;locator)</pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive an object for locating the origin of SAX document events. <p>SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface.</p> <p>The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.</p> <p>Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time.</p></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>locator</code> - An object that can return the location of any SAX document event.</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="Locator.html" title="interface in org.xml.sax"><code>Locator</code></a></dd> </dl> </li> </ul> <a id="startDocument()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startDocument</h4> <pre class="methodSignature">void&nbsp;startDocument() throws <a href="SAXException.html" title="class in org.xml.sax">SAXException</a></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the beginning of a document. <p>The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).</p></div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="SAXException.html" title="class in org.xml.sax">SAXException</a></code> - Any SAX exception, possibly wrapping another exception.</dd> </dl> </li> </ul> <a id="endDocument()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>endDocument</h4> <pre class="methodSignature">void&nbsp;endDocument() throws <a href="SAXException.html" title="class in org.xml.sax">SAXException</a></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the end of a document. <p>The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.</p></div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="SAXException.html" title="class in org.xml.sax">SAXException</a></code> - Any SAX exception, possibly wrapping another exception.</dd> </dl> </li> </ul> <a id="startElement(java.lang.String,org.xml.sax.AttributeList)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startElement</h4> <pre class="methodSignature">void&nbsp;startElement&#8203;(<a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;name, <a href="AttributeList.html" title="interface in org.xml.sax">AttributeList</a>&nbsp;atts) throws <a href="SAXException.html" title="class in org.xml.sax">SAXException</a></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the beginning of an element. <p>The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement() event.</p> <p>If the element name has a namespace prefix, the prefix will still be attached. Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted.</p></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>name</code> - The element type name.</dd> <dd><code>atts</code> - The attributes attached to the element, if any.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="SAXException.html" title="class in org.xml.sax">SAXException</a></code> - Any SAX exception, possibly wrapping another exception.</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#endElement(java.lang.String)"><code>endElement(java.lang.String)</code></a>, <a href="AttributeList.html" title="interface in org.xml.sax"><code>AttributeList</code></a></dd> </dl> </li> </ul> <a id="endElement(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>endElement</h4> <pre class="methodSignature">void&nbsp;endElement&#8203;(<a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;name) throws <a href="SAXException.html" title="class in org.xml.sax">SAXException</a></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of the end of an element. <p>The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).</p> <p>If the element name has a namespace prefix, the prefix will still be attached to the name.</p></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>name</code> - The element type name</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="SAXException.html" title="class in org.xml.sax">SAXException</a></code> - Any SAX exception, possibly wrapping another exception.</dd> </dl> </li> </ul> <a id="characters(char[],int,int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>characters</h4> <pre class="methodSignature">void&nbsp;characters&#8203;(char[]&nbsp;ch, int&nbsp;start, int&nbsp;length) throws <a href="SAXException.html" title="class in org.xml.sax">SAXException</a></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of character data. <p>The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.</p> <p>The application must not attempt to read from the array outside of the specified range.</p> <p>Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).</p></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>ch</code> - The characters from the XML document.</dd> <dd><code>start</code> - The start position in the array.</dd> <dd><code>length</code> - The number of characters to read from the array.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="SAXException.html" title="class in org.xml.sax">SAXException</a></code> - Any SAX exception, possibly wrapping another exception.</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#ignorableWhitespace(char%5B%5D,int,int)"><code>ignorableWhitespace(char[], int, int)</code></a>, <a href="Locator.html" title="interface in org.xml.sax"><code>Locator</code></a></dd> </dl> </li> </ul> <a id="ignorableWhitespace(char[],int,int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>ignorableWhitespace</h4> <pre class="methodSignature">void&nbsp;ignorableWhitespace&#8203;(char[]&nbsp;ch, int&nbsp;start, int&nbsp;length) throws <a href="SAXException.html" title="class in org.xml.sax">SAXException</a></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of ignorable whitespace in element content. <p>Validating Parsers must use this method to report each chunk of ignorable whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.</p> <p>SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.</p> <p>The application must not attempt to read from the array outside of the specified range.</p></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>ch</code> - The characters from the XML document.</dd> <dd><code>start</code> - The start position in the array.</dd> <dd><code>length</code> - The number of characters to read from the array.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="SAXException.html" title="class in org.xml.sax">SAXException</a></code> - Any SAX exception, possibly wrapping another exception.</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#characters(char%5B%5D,int,int)"><code>characters(char[], int, int)</code></a></dd> </dl> </li> </ul> <a id="processingInstruction(java.lang.String,java.lang.String)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>processingInstruction</h4> <pre class="methodSignature">void&nbsp;processingInstruction&#8203;(<a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;target, <a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a>&nbsp;data) throws <a href="SAXException.html" title="class in org.xml.sax">SAXException</a></pre> <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> <div class="block">Receive notification of a processing instruction. <p>The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.</p> <p>A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.</p></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>target</code> - The processing instruction target.</dd> <dd><code>data</code> - The processing instruction data, or null if none was supplied.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="SAXException.html" title="class in org.xml.sax">SAXException</a></code> - Any SAX exception, possibly wrapping another exception.</dd> </dl> </li> </ul> </li> </ul> </section> </li> </ul> </div> </div> </main> <!-- ========= END OF CLASS DATA ========= --> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../index.html">Overview</a></li> <li><a href="../../../module-summary.html">Module</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/DocumentHandler.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 class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div> </div> <div class="subNav"> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> </div> <a id="skip.navbar.bottom"> <!-- --> </a> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small><a href="https://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> For further API reference and developer documentation see the <a href="https://docs.oracle.com/pls/topic/lookup?ctx=javase12.0.2&amp;id=homepage" target="_blank">Java SE Documentation</a>, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.<br> <a href="../../../../../legal/copyright.html">Copyright</a> &copy; 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.<br>All rights reserved. Use is subject to <a href="https://www.oracle.com/technetwork/java/javase/terms/license/java12.0.2speclicense.html">license terms</a> and the <a href="https://www.oracle.com/technetwork/java/redist-137594.html">documentation redistribution policy</a>. <!-- Version 12.0.2+10 --></small></p> </footer> </body> </html>
{ "pile_set_name": "Github" }
#include "script_component.hpp" class CfgPatches { class ADDON { name = CSTRING(component); units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"cba_common"}; author = "$STR_CBA_Author"; authors[] = {"Spooner"}; url = "$STR_CBA_URL"; VERSION_CONFIG; }; }; #include "CfgFunctions.hpp"
{ "pile_set_name": "Github" }
(* Copyright (c) 2014, TrustInSoft * All rights reserved. *) (* See end of file for a HOWTO. *) type 'a flamegraph = ((int * 'a) list * float) list module Flamegraph(Key : Datatype.S) : Datatype.S with type t = Key.t flamegraph module type S = sig type key type data = private { mutable count : int; mutable self : int; } type status = | Broken | Stopped | Started of bool module Measures : sig type t (** [final measures] tells if [measures] are final or partial. *) val final : t -> bool (** [enabled measures] tells if [measures] were enabled. *) val enabled : t -> bool (** [conv measures] converts from RDTSC to seconds. *) val conv : t -> int -> float (** [iter measures push pop] iterates over [measures]. The function [push] is called each time we go deeper in the stack, while [pop] is called with the total time when we leave a frame. Does nothing if measurement were disabled. *) val iter : t -> (key -> data -> unit) -> (int -> unit) -> unit (** [fullprint measures] prints [measures] for reading. Does nothing if measurement were disabled. *) val fullprint : t -> Format.formatter -> unit (** [flamegraph measures keep] prints [measures] for FlameGraph keeping only a subset of keys according to [keep]. Does nothing if measurement were disabled. FlameGraph: https://github.com/brendangregg/FlameGraph *) val flamegraph : t -> (key -> 'a option) -> 'a flamegraph end (** [status ()] returns the current status. The possible values are: [Broken]: Someone broke the API. [Stopped]: The measurement is stopped. [Started true]: The measurement is started and enabled. [Started false]: The measurement is started but disabled. *) val status : unit -> status (** [start enabled] starts the measurement. Requires [Stopped]. Sets [Started enabled]. *) val start : bool -> unit (** [measure key thunk] behaves as [thunk ()] (even if [Broken] or [Stopped]) and adds measurement to [key] if [Started true]. Requires [Started _]. *) val measure : key -> (unit -> 'a) -> 'a (** [dump ()] dumps current measurements. Should not be called too often. Requires [Started _]. *) val dump : unit -> Measures.t (** [stop ()] stops the measurement and returns the final measures. Requires [Started _]. *) val stop : unit -> Measures.t end module type Key = sig type t module Hashtbl : sig type key type 'a t val create : int -> 'a t val add : 'a t -> key -> 'a -> unit val find : 'a t -> key -> 'a val iter : (key -> 'a -> unit) -> 'a t -> unit val length : 'a t -> int end with type key = t val pretty : Format.formatter -> t -> unit val size : int end (** Create a measurement module from a Datatype with collections. *) module Make(Key : Key) : S with type key = Key.t module Helpers : sig (** [FastString] provides abstract keys: - internally represented as [int] - externally printed as [string] *) module FastString : sig include Key val register : string -> t end (** [to_file printer filename] writes the content of [printer] in [filename] (which is truncated if it exists). Returns [None] for success and [Some e] otherwise. *) val to_file : (Format.formatter -> unit) -> string -> exn option (** [pp_flamegraph pp_key fmt flamegraph] prints [flamegraph]. *) val pp_flamegraph : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a flamegraph -> unit end (* * HOWTO * ===== * * How to measure * -------------- * * You first need to create the measurement module: * * module MyStat = Statistics.Make(Statistics.Helpers.FastString) * * * You then need to start and stop your the measurement period: * * + MyStat.start (EnableStatOption.get ()); * ... * + let final_measures = MyStat.stop () in * * * You can then measure each function you are interested in: * * - let f x y z = * + let do_f x y z () = * <body> * .. * <body> * * + let key_f = Statistics.Helpers.FastString.register "f" * + let f x y z = * + MyStat.measure key_f (do_f x y z) * + * * * During the measurement period, you may dump the current * measurements: * * + let partial_measures = MyStat.dump () in * * * You may print the measurements (partial or final) with: * * + MyStat.Measures.fullprint Format.std_formatter measures; * * * How it works * ------------ * * The measures are well-parenthesized by construction and all * measures are between the [start] and [stop] functions: * * start(....................................................)stop * (k1.....) (k2...............)(k1...) (k3.....) * (k3.) (k1....) (k2.) (k4..) * (k4)(k4) * * For each callstack, the measures contain: * - the number of calls * - the cumulative self time * *)
{ "pile_set_name": "Github" }
package com.boardgamegeek.sorter import android.content.Context import android.database.Cursor import androidx.annotation.StringRes import com.boardgamegeek.R import com.boardgamegeek.extensions.asMinutes import com.boardgamegeek.extensions.getInt import com.boardgamegeek.provider.BggContract.Collection abstract class PlayTimeSorter(context: Context) : CollectionSorter(context) { private val defaultValue = context.resources.getString(R.string.text_unknown) @StringRes override val descriptionResId = R.string.collection_sort_play_time override val sortColumn = Collection.PLAYING_TIME public override fun getHeaderText(cursor: Cursor): String { val minutes = cursor.getInt(sortColumn) if (minutes == 0) return defaultValue return if (minutes >= 120) { val hours = minutes / 60 "$hours ${context.getString(R.string.hours_abbr)}" } else { "$minutes ${context.getString(R.string.minutes_abbr)}" } } override fun getDisplayInfo(cursor: Cursor) = cursor.getInt(sortColumn).asMinutes(context) }
{ "pile_set_name": "Github" }
/****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * ******************************************************************************/ /****************************************************************************** * MUSB.TXT ******************************************************************************/ u2Byte EFUSE_GetArrayLen_MP_8821A_MUSB(VOID); VOID EFUSE_GetMaskArray_MP_8821A_MUSB( IN OUT pu1Byte Array ); BOOLEAN EFUSE_IsAddressMasked_MP_8821A_MUSB( // TC: Test Chip, MP: MP Chip IN u2Byte Offset );
{ "pile_set_name": "Github" }
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. // +build aix,ppc64 package unix import ( "unsafe" ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimes(path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callutimes(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callutimensat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), flag) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getcwd(buf []byte) (err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } _, e1 := callgetcwd(uintptr(unsafe.Pointer(_p0)), len(buf)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { r0, e1 := callaccept(s, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getdirent(fd int, buf []byte) (n int, err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } r0, e1 := callgetdirent(fd, uintptr(unsafe.Pointer(_p0)), len(buf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) { r0, e1 := callwait4(int(pid), uintptr(unsafe.Pointer(status)), options, uintptr(unsafe.Pointer(rusage))) wpid = Pid_t(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, e1 := callioctl(fd, int(req), arg) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) { r0, e1 := callfcntl(fd, cmd, uintptr(arg)) r = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) { _, e1 := callfcntl(fd, cmd, uintptr(unsafe.Pointer(lk))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (val int, err error) { r0, e1 := callfcntl(uintptr(fd), cmd, uintptr(arg)) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Acct(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callacct(uintptr(unsafe.Pointer(_p0))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chdir(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callchdir(uintptr(unsafe.Pointer(_p0))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chroot(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callchroot(uintptr(unsafe.Pointer(_p0))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, e1 := callclose(fd) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(oldfd int) (fd int, err error) { r0, e1 := calldup(oldfd) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { callexit(code) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callfaccessat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, e1 := callfchdir(fd) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, e1 := callfchmod(fd, mode) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callfchmodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callfchownat(dirfd, uintptr(unsafe.Pointer(_p0)), uid, gid, flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fdatasync(fd int) (err error) { _, e1 := callfdatasync(fd) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, e1 := callfsync(fd) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, e1 := callgetpgid(pid) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pid int) { r0, _ := callgetpgrp() pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _ := callgetpid() pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _ := callgetppid() ppid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpriority(which int, who int) (prio int, err error) { r0, e1 := callgetpriority(which, who) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, e1 := callgetrusage(who, uintptr(unsafe.Pointer(rusage))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, e1 := callgetsid(pid) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, sig Signal) (err error) { _, e1 := callkill(pid, int(sig)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Klogctl(typ int, buf []byte) (n int, err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } r0, e1 := callsyslog(typ, uintptr(unsafe.Pointer(_p0)), len(buf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdir(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callmkdir(dirfd, uintptr(unsafe.Pointer(_p0)), mode) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdirat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callmkdirat(dirfd, uintptr(unsafe.Pointer(_p0)), mode) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callmkfifo(uintptr(unsafe.Pointer(_p0)), mode) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callmknod(uintptr(unsafe.Pointer(_p0)), mode, dev) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callmknodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, dev) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, e1 := callnanosleep(uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Open(path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, e1 := callopen64(uintptr(unsafe.Pointer(_p0)), mode, perm) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, e1 := callopenat(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mode) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func read(fd int, p []byte) (n int, err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callread(fd, uintptr(unsafe.Pointer(_p0)), len(p)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlink(path string, buf []byte) (n int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte if len(buf) > 0 { _p1 = &buf[0] } r0, e1 := callreadlink(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), len(buf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(newpath) if err != nil { return } _, e1 := callrenameat(olddirfd, uintptr(unsafe.Pointer(_p0)), newdirfd, uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setdomainname(p []byte) (err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } _, e1 := callsetdomainname(uintptr(unsafe.Pointer(_p0)), len(p)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sethostname(p []byte) (err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } _, e1 := callsethostname(uintptr(unsafe.Pointer(_p0)), len(p)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, e1 := callsetpgid(pid, pgid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, e1 := callsetsid() pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tv *Timeval) (err error) { _, e1 := callsettimeofday(uintptr(unsafe.Pointer(tv))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, e1 := callsetuid(uid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(uid int) (err error) { _, e1 := callsetgid(uid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { _, e1 := callsetpriority(which, who, prio) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callstatx(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mask, uintptr(unsafe.Pointer(stat))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() { callsync() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Times(tms *Tms) (ticks uintptr, err error) { r0, e1 := calltimes(uintptr(unsafe.Pointer(tms))) ticks = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { r0, _ := callumask(mask) oldmask = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Uname(buf *Utsname) (err error) { _, e1 := calluname(uintptr(unsafe.Pointer(buf))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlink(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callunlink(uintptr(unsafe.Pointer(_p0))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlinkat(dirfd int, path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callunlinkat(dirfd, uintptr(unsafe.Pointer(_p0)), flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ustat(dev int, ubuf *Ustat_t) (err error) { _, e1 := callustat(dev, uintptr(unsafe.Pointer(ubuf))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func write(fd int, p []byte) (n int, err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(_p0)), len(p)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readlen(fd int, p *byte, np int) (n int, err error) { r0, e1 := callread(fd, uintptr(unsafe.Pointer(p)), np) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func writelen(fd int, p *byte, np int) (n int, err error) { r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(p)), np) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(oldfd int, newfd int) (err error) { _, e1 := calldup2(oldfd, newfd) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fadvise(fd int, offset int64, length int64, advice int) (err error) { _, e1 := callposix_fadvise64(fd, offset, length, advice) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchown(fd int, uid int, gid int) (err error) { _, e1 := callfchown(fd, uid, gid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstat(fd int, stat *Stat_t) (err error) { _, e1 := callfstat(fd, uintptr(unsafe.Pointer(stat))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callfstatat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, buf *Statfs_t) (err error) { _, e1 := callfstatfs(fd, uintptr(unsafe.Pointer(buf))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, e1 := callftruncate(fd, length) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _ := callgetegid() egid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { r0, _ := callgeteuid() euid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _ := callgetgid() gid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _ := callgetuid() uid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lchown(path string, uid int, gid int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := calllchown(uintptr(unsafe.Pointer(_p0)), uid, gid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, n int) (err error) { _, e1 := calllisten(s, n) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func lstat(path string, stat *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := calllstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pause() (err error) { _, e1 := callpause() if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pread(fd int, p []byte, offset int64) (n int, err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callpread64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pwrite(fd int, p []byte, offset int64) (n int, err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callpwrite64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { r0, e1 := callselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, e1 := callpselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, e1 := callsetregid(rgid, egid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, e1 := callsetreuid(ruid, euid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(fd int, how int) (err error) { _, e1 := callshutdown(fd, how) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { r0, e1 := callsplice(rfd, uintptr(unsafe.Pointer(roff)), wfd, uintptr(unsafe.Pointer(woff)), len, flags) n = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func stat(path string, statptr *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statptr))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statfs(path string, buf *Statfs_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callstatfs(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Truncate(path string, length int64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := calltruncate(uintptr(unsafe.Pointer(_p0)), length) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { _, e1 := callbind(s, uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { _, e1 := callconnect(s, uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getgroups(n int, list *_Gid_t) (nn int, err error) { r0, e1 := callgetgroups(n, uintptr(unsafe.Pointer(list))) nn = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(n int, list *_Gid_t) (err error) { _, e1 := callsetgroups(n, uintptr(unsafe.Pointer(list))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { _, e1 := callgetsockopt(s, level, name, uintptr(val), uintptr(unsafe.Pointer(vallen))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { _, e1 := callsetsockopt(s, level, name, uintptr(val), vallen) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socket(domain int, typ int, proto int) (fd int, err error) { r0, e1 := callsocket(domain, typ, proto) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { _, e1 := callsocketpair(domain, typ, proto, uintptr(unsafe.Pointer(fd))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, e1 := callgetpeername(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, e1 := callgetsockname(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callrecvfrom(fd, uintptr(unsafe.Pointer(_p0)), len(p), flags, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } _, e1 := callsendto(s, uintptr(unsafe.Pointer(_p0)), len(buf), flags, uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { r0, e1 := callnrecvmsg(s, uintptr(unsafe.Pointer(msg)), flags) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { r0, e1 := callnsendmsg(s, uintptr(unsafe.Pointer(msg)), flags) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, e1 := callmunmap(addr, length) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, advice int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmadvise(uintptr(unsafe.Pointer(_p0)), len(b), advice) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mprotect(b []byte, prot int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmprotect(uintptr(unsafe.Pointer(_p0)), len(b), prot) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlock(b []byte) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmlock(uintptr(unsafe.Pointer(_p0)), len(b)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, e1 := callmlockall(flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmsync(uintptr(unsafe.Pointer(_p0)), len(b), flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlock(b []byte) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmunlock(uintptr(unsafe.Pointer(_p0)), len(b)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, e1 := callmunlockall() if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe(p *[2]_C_int) (err error) { _, e1 := callpipe(uintptr(unsafe.Pointer(p))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, e1 := callpoll(uintptr(unsafe.Pointer(fds)), nfds, timeout) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func gettimeofday(tv *Timeval, tzp *Timezone) (err error) { _, e1 := callgettimeofday(uintptr(unsafe.Pointer(tv)), uintptr(unsafe.Pointer(tzp))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Time(t *Time_t) (tt Time_t, err error) { r0, e1 := calltime(uintptr(unsafe.Pointer(t))) tt = Time_t(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Utime(path string, buf *Utimbuf) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callutime(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsystemcfg(label int) (n uint64) { r0, _ := callgetsystemcfg(label) n = uint64(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func umount(target string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(target) if err != nil { return } _, e1 := callumount(uintptr(unsafe.Pointer(_p0))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(resource int, rlim *Rlimit) (err error) { _, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrlimit(resource int, rlim *Rlimit) (err error) { _, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seek(fd int, offset int64, whence int) (off int64, err error) { r0, e1 := calllseek(fd, offset, whence) off = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { r0, e1 := callmmap64(addr, length, prot, flags, fd, offset) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return }
{ "pile_set_name": "Github" }
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.commerce.iot.mdeviceprod.device.unbind response. * * @author auto create * @since 1.0, 2019-09-17 15:22:37 */ public class AlipayCommerceIotMdeviceprodDeviceUnbindResponse extends AlipayResponse { private static final long serialVersionUID = 8481726572138497864L; }
{ "pile_set_name": "Github" }
{ "short_name": "microenvi", "name": "microenvi", "start_url": "/?utm_source=homescreen", "icons": [ { "src": "/images/favicon.png", "type": "image/png", "sizes": "192x192" }, { "src": "/images/icon.png", "type": "image/png", "sizes": "512x512" } ], "background_color": "#ffffff", "theme_color": "#ffffff", "display": "standalone", "orientation": "portrait" }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2013-2020 Cinchapi 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. */ package com.cinchapi.concourse.server.aop; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Indicates that a method should have its context captured. * * @author Jeff Nelson */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Internal {}
{ "pile_set_name": "Github" }
// Copyright 2014 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. /** * @fileoverview A class for speaking navigation information. */ goog.provide('cvox.NavigationSpeaker'); goog.require('cvox.NavDescription'); /** * @constructor */ cvox.NavigationSpeaker = function() { /** * This member indicates to this speaker to cancel any pending callbacks. * This is needed primarily to support cancelling a chain of callbacks by an * outside caller. There's currently no way to cancel a chain of callbacks in * any other way. Consider removing this if we ever get silence at the tts * layer. * @type {boolean} */ this.stopReading = false; /** * An identifier that tracks the calls to speakDescriptionArray. Used to * cancel a chain of callbacks that is stale. * @type {number} * @private */ this.id_ = 1; }; /** * Speak all of the NavDescriptions in the given array (as returned by * getDescription), including playing earcons. * * @param {Array<cvox.NavDescription>} descriptionArray The array of * NavDescriptions to speak. * @param {number} initialQueueMode The initial queue mode. * @param {Function} completionFunction Function to call when finished speaking. */ cvox.NavigationSpeaker.prototype.speakDescriptionArray = function( descriptionArray, initialQueueMode, completionFunction) { descriptionArray = this.reorderAnnotations(descriptionArray); this.stopReading = false; this.id_ = (this.id_ + 1) % 10000; // Using self rather than goog.bind in order to get debug symbols. var self = this; var speakDescriptionChain = function(i, queueMode, id) { var description = descriptionArray[i]; if (!description || self.stopReading || self.id_ != id) { return; } var startCallback = function() { for (var j = 0; j < description.earcons.length; j++) { cvox.ChromeVox.earcons.playEarcon(description.earcons[j]); } }; var endCallbackHelper = function() { speakDescriptionChain(i + 1, cvox.QueueMode.QUEUE, id); }; var endCallback = function() { // We process content-script specific properties here for now. if (description.personality && description.personality[cvox.AbstractTts.PAUSE] && typeof(description.personality[cvox.AbstractTts.PAUSE]) == 'number') { setTimeout( endCallbackHelper, description.personality[cvox.AbstractTts.PAUSE]); } else { endCallbackHelper(); } if ((i == descriptionArray.length - 1) && completionFunction) { completionFunction(); } }; if (!description.isEmpty()) { description.speak(queueMode, startCallback, endCallback); } else { startCallback(); endCallback(); return; } if (!cvox.ChromeVox.host.hasTtsCallback()) { startCallback(); endCallback(); } }; speakDescriptionChain(0, initialQueueMode, this.id_); if ((descriptionArray.length == 0) && completionFunction) { completionFunction(); } }; /** * Checks for an annotation of a structured elements. * @param {string} annon The annotation. * @return {boolean} True if annotating a structured element. */ cvox.NavigationSpeaker.structuredElement = function(annon) { // TODO(dtseng, sorge): This doesn't work for languages other than English. switch (annon) { case 'table': case 'Math': return true; } return false; }; /** * Reorder special annotations for structured elements to be spoken first. * @param {Array<cvox.NavDescription>} descriptionArray The array of * NavDescriptions to speak. * @return {Array<cvox.NavDescription>} The reordered array. */ cvox.NavigationSpeaker.prototype.reorderAnnotations = function( descriptionArray) { var descs = new Array; for (var i = 0; i < descriptionArray.length; i++) { var descr = descriptionArray[i]; if (cvox.NavigationSpeaker.structuredElement(descr.annotation)) { descs.push(new cvox.NavDescription({ text: '', annotation: descr.annotation })); descr.annotation = ''; } descs.push(descr); } return descs; };
{ "pile_set_name": "Github" }
<?php /** * @copyright (c) 2014 Valery Fremaux * @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html * @author Valery Fremaux <[email protected]> */ $strings['archiverealroot'] = 'Archive container real root (no symlinks here)'; $strings['backtoindex'] = 'Back to instance index'; $strings['badconnection'] = 'Connection FAILED'; $strings['cancel'] = 'Cancel'; $strings['choose'] = 'choose...'; $strings['clearcache'] = 'Clear Twig cache'; $strings['clearmastercache'] = 'Clear Twig cache for master'; $strings['closewindow'] = 'Close this window'; $strings['connectionok'] = 'Connection OK'; $strings['continue'] = 'Continue'; $strings['coursefolder'] = 'Physical dir'; $strings['courserealroot'] = 'Course container real root (no symlinks here)'; $strings['datalocation'] = 'Data location'; $strings['datapathavailable'] = 'Data path is available and ready to be used as : <br/>'; $strings['datapathnotavailable'] = 'Data path exists but has already files in it at <br/>'; $strings['datapathcreated'] = 'Data path has been created as :<br/>'; $strings['dbgroup'] = 'Database Settings'; $strings['dbhost'] = 'Database Host'; $strings['dbpassword'] = 'Password'; $strings['dbprefix'] = 'Database prefix'; $strings['dbuser'] = 'Username'; $strings['deleteifempty'] = 'Delete if empty'; $strings['deleteinstances'] = 'Remove instance'; $strings['destroyinstances'] = 'Full delete instance'; $strings['distributevalue'] = 'Distribute configuration value'; $strings['edit'] = 'Edit instance info'; $strings['emptysite'] = 'New empty site'; $strings['enable_virtualisation'] = 'Enable'; $strings['enabled'] = 'enabled'; $strings['enableinstances'] = 'Enable'; $strings['enabling'] = 'General enabling'; $strings['errormuststartwithcourses'] = 'the course folder MUST start with \'courses_\' to avoid directory conflicts'; $strings['homerealroot'] = 'Home container real root (no symlinks here)'; $strings['hostdefinition'] = 'Host definition'; $strings['hostlist'] = 'Other hosts'; $strings['institution'] = 'Institution'; $strings['lastcron'] = 'Last cron'; $strings['maindatabase'] = 'Database name'; $strings['manage_instances'] = 'Go to instance manager'; $strings['newinstance'] = 'Add new instance'; $strings['no'] = 'No'; $strings['plugin_comment'] = 'Allows virtualizing chamilo.'; $strings['plugin_title'] = 'Virtual Chamilo'; $strings['proxysettings'] = 'Proxy settings'; $strings['registerinstance'] = 'Register an instance'; $strings['rootweb'] = 'Web root'; $strings['savechanges'] = 'Save changes'; $strings['selectall'] = 'Select all'; $strings['selectnone'] = 'Deselect all'; $strings['sendconfigvalue'] = 'Distribute a configuration value'; $strings['setconfigvalue'] = 'Set a configuration value'; $strings['singledatabase'] = 'Single database'; $strings['sitename'] = 'Site Name'; $strings['snapshotinstance'] = 'Snapshot'; $strings['snapshotmaster'] = 'Snapshot master Chamilo'; $strings['statisticsdatabase'] = 'Statistics database'; $strings['successfinishedcapture'] = 'Snapshot of chamilo is finished'; $strings['sync_settings'] = 'Synchronize settings'; $strings['tableprefix'] = 'Table prefix'; $strings['template'] = 'Template'; $strings['templating'] = 'Templating'; $strings['testconnection'] = 'Test database connexion'; $strings['testdatapath'] = 'Test data location'; $strings['userpersonaldatabase'] = 'User personal database'; $strings['vchamilo'] = 'Virtual Chamilo'; $strings['vchamilosnapshot1'] = 'STEP 1 OF 3 : Directories for snapshot have been created. Continue with database backup ...'; $strings['vchamilosnapshot2'] = 'STEP 2 OF 3 : Databases have been backed up. Continue with saving files... beware this step can be long if a lot of content resides in the instance...'; $strings['vchamilosnapshot3'] = 'STEP 3 OF 3 : Files saved.'; $strings['withselection'] = 'With selection: '; $strings['yes'] = 'Yes'; $strings['mysqlcmds'] = 'Mysql commands location'; $strings['mysqlcmd'] = 'Full path to mysql client command'; $strings['mysqldumpcms'] = 'Full path to mysqldump command'; $strings['sitenameinputerror'] = 'Site Name is empty or invalid'; $strings['institutioninputerror'] = 'Institution is empty or invalid'; $strings['rootwebinputerror'] = 'Root web is empty or invalid'; $strings['databaseinputerror'] = 'Database empty'; $strings['coursefolderinputerror'] = 'Data location is empty'; $strings['httpproxyhost'] = 'HTTP proxy host'; $strings['httpproxyport'] = 'HTTP proxy port'; $strings['httpproxybypass'] = 'HTTP proxy URL bypass'; $strings['httpproxyuser'] = 'HTTP proxy user'; $strings['httpproxypassword'] = 'HTTP proxy password'; $strings['variable'] = 'Variable'; $strings['subkey'] = 'Subkey'; $strings['category'] = 'Category'; $strings['accessurl'] = 'Access URL'; $strings['value'] = 'Value'; $strings['syncall'] = 'Sync all the selection'; $strings['syncthis'] = 'Sync this setting'; $strings['SiteNameExample'] = 'Example: Chamilo'; $strings['InstitutionExample'] = 'Example: Chamilo Association'; $strings['RootWebExample'] = 'Example: http://www.chamilo.org/ (with final slash)'; $strings['DatabaseDescription'] = 'A new database will be created with that name.'; $strings['RootWebExists'] = 'An instance with the same root web exists.'; $strings['ImportInstance'] = 'Import instance'; $strings['ConfigurationPath'] = 'Chamilo configuration path'; $strings['UploadRealRoot'] = 'Upload files'; $strings['DatabaseAccessShouldBeDifferentThanMasterChamilo'] = 'Database server should be different than the Chamilo master'; $strings['UrlAppendExample'] = 'Example: /chamilo_v1 (with first slash)'; $strings['FromVersion'] = 'From version'; $strings['CoursePath'] = 'Path to courses directory'; $strings['HomePath'] = 'Path to home directory'; $strings['UploadPath'] = 'Path to upload directory'; $strings['ArchiveUrl'] = 'Archive URL'; $strings['HomeUrl'] = 'Home URL'; $strings['UploadUrl'] = 'Upload URL'; $strings['CourseUrl'] = 'Course URL'; $strings['ThemeFolder'] = 'Theme folder'; $strings['ThemeFolderExplanation'] = 'Theme folder should be located inside the web/css/themes/ folder';
{ "pile_set_name": "Github" }
require('../../modules/es7.object.values'); module.exports = require('../../modules/_core').Object.values;
{ "pile_set_name": "Github" }
#include "shader_codeword.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <direct.h> #include <windows.h> #include "gpu_som.h" #include "shader_som.h" GPUSom::GPUSom() { memset( this, 0, sizeof(GPUSom) ); } void GPUSom::init() { gpulbg_j = 0; gpulbg_gpubook.load( gpulbg_srcbook.w, gpulbg_srcbook.h, gpulbg_srcbook.fm ); gpu_codebook2codeword( vis_src_id, gpulbg_srcbook, vis_ucodeword_id ); gpu_subidx_projection( vis_src_id, vis_des_id, vis_ucodeword_id, vis_vcodeword_id, vis_codebook_id ); } void GPUSom::set_info( int max_cycles, int cbw, int cdh ) { gpulbg_max_cycles = max_cycles; codebook_w = cbw; codebook_h = cdh; } void GPUSom::prepare_codebook() { int i, *idx; FLOAT3 cc; gpulbg_srcbook.load( codebook_w, codebook_h ); idx = (int*) malloc( codebook_w*codebook_h*sizeof(int) ); random_index( idx, gpu_src.w*gpu_src.h, codebook_w*codebook_h ); for( i=0; i<codebook_w*codebook_h; i++ ) { vperturb( (float*)&gpu_src.fm[idx[i]], (float*)&cc, 3, .1f ); cc = f3abs(cc); gpulbg_srcbook.fm[i] = cc; } free(idx); } void GPUSom::prepare( const char *spath ) { GPfm src; src.load( spath ); prepare( src ); } void GPUSom::gpulbg_iterate() { //for( j=0; j<gpulbg_max_cycles; j++ ) int &j = gpulbg_j; if( j<gpulbg_max_cycles ) { int i; GPfm &desbook = gpulbg_gpubook; int codebook_size = desbook.w*desbook.h; glPushAttrib( GL_VIEWPORT_BIT ); glViewport( 0,0, desbook.w,desbook.h ); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D( 0,1,0,1 ); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, vis_tbook_fbo ); glClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, GL_FALSE); glClearColor(0,0,0,0); glPointSize(1); glEnable( GL_BLEND ); glBlendFunc( GL_ONE, GL_ONE ); glClear( GL_COLOR_BUFFER_BIT ); if ( j>=(gpulbg_max_cycles-1-20) ) glPointSize(1); else { if ( j<(gpulbg_max_cycles>>3) ) { if ( (desbook.w>>1)>5 ) glPointSize(5); else glPointSize( float(desbook.w>>1) ); } else { if ( (desbook.w>>1)>3 ) glPointSize(3); else glPointSize(1); } } shader_som_begin(desbook); glCallList( vis_src_list ); shader_som_end(); GPf4 tbook; tbook.load( desbook.w, desbook.h ); glReadPixels( 0,0, desbook.w,desbook.h, GL_RGBA, GL_FLOAT, tbook.fm ); for( i=0; i<codebook_size; i++ ) { if( tbook.fm[i].w>0.5 ) desbook.fm[i] = (FLOAT3(tbook.fm[i].x,tbook.fm[i].y,tbook.fm[i].z))/tbook.fm[i].w; } glPopAttrib(); glDisable( GL_BLEND ); glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); gpulbg_j++; } } void GPUSom::update_codeword() { gpu_codebook2codeword( vis_src_id, gpulbg_gpubook, vis_ucodeword_id ); gpu_subidx_projection( vis_src_id, vis_des_id, vis_ucodeword_id, vis_vcodeword_id, vis_codebook_id ); } void GPUSom::clear() { if( vis_src_list!=0 ) glDeleteLists( vis_src_list, 1 ); if( vis_tbook_id!=0 ) glDeleteTextures( 1, &vis_tbook_id ); if( vis_tbook_fbo!=0 ) glDeleteFramebuffersEXT( 1, &vis_tbook_fbo ); if( vis_codebook_id!=0 ) glDeleteTextures( 1, &vis_codebook_id ); if( vis_src_id!=0 ) glDeleteTextures( 1, &vis_src_id ); if( vis_des_id!=0 ) glDeleteTextures( 1, &vis_des_id ); if( vis_ucodeword_id!=0 ) glDeleteTextures( 1, &vis_ucodeword_id ); if( vis_vcodeword_id!=0 ) glDeleteTextures( 1, &vis_vcodeword_id ); } GPUSom::~GPUSom() { clear(); } void GPUSom::prepare( const GPfm &src ) { clear(); int i; gpu_src.load( src.w, src.h, src.fm ); prepare_codebook(); GPfm &srcbook = gpulbg_srcbook; glGenTextures( 1, &vis_src_id ); glBindTexture(GL_TEXTURE_2D, vis_src_id ); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); gpu_src.flip_vertical(); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB32F_ARB, gpu_src.w, gpu_src.h, 0, GL_RGB, GL_FLOAT, gpu_src.fm ); gpu_src.flip_vertical(); glGenTextures( 1, &vis_des_id ); glBindTexture(GL_TEXTURE_2D, vis_des_id ); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB32F_ARB, gpu_src.w, gpu_src.h, 0, GL_RGB, GL_FLOAT, 0 ); glGenTextures( 1, &vis_ucodeword_id ); glBindTexture(GL_TEXTURE_2D, vis_ucodeword_id ); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB32F_ARB, gpu_src.w, gpu_src.h, 0, GL_RGB, GL_FLOAT, 0 ); glGenTextures( 1, &vis_vcodeword_id ); glBindTexture(GL_TEXTURE_2D, vis_vcodeword_id ); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB32F_ARB, gpu_src.w, gpu_src.h, 0, GL_RGB, GL_FLOAT, 0 ); glGenTextures( 1, &vis_codebook_id ); glBindTexture(GL_TEXTURE_2D, vis_codebook_id ); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB32F_ARB, srcbook.w, srcbook.h, 0, GL_RGB, GL_FLOAT, srcbook.fm ); glGenTextures( 1, &vis_tbook_id ); glBindTexture(GL_TEXTURE_2D, vis_tbook_id ); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, srcbook.w, srcbook.h, 0, GL_RGBA, GL_FLOAT, 0 ); glGenFramebuffersEXT( 1, &vis_tbook_fbo ); glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, vis_tbook_fbo ); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, vis_tbook_id, 0); glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); vis_src_list = glGenLists(1); glNewList(vis_src_list, GL_COMPILE); glBegin( GL_POINTS ); for( i=0; i<src.w*src.h; i++ ) glVertex3fv( (float*)&src.fm[i] ); glEnd(); glEndList(); }
{ "pile_set_name": "Github" }
// torridgristle CRT - Brighten pass // by torridgristle // license: public domain #pragma parameter BrightenLevel "Brighten Level" 2.0 1.0 10.0 1.0 #pragma parameter BrightenAmount "Brighten Amount" 0.1 0.0 1.0 0.1 #if defined(VERTEX) #if __VERSION__ >= 130 #define COMPAT_VARYING out #define COMPAT_ATTRIBUTE in #define COMPAT_TEXTURE texture #else #define COMPAT_VARYING varying #define COMPAT_ATTRIBUTE attribute #define COMPAT_TEXTURE texture2D #endif #ifdef GL_ES #define COMPAT_PRECISION mediump #else #define COMPAT_PRECISION #endif COMPAT_ATTRIBUTE vec4 VertexCoord; COMPAT_ATTRIBUTE vec4 COLOR; COMPAT_ATTRIBUTE vec4 TexCoord; COMPAT_VARYING vec4 COL0; COMPAT_VARYING vec4 TEX0; vec4 _oPosition1; uniform mat4 MVPMatrix; uniform COMPAT_PRECISION int FrameDirection; uniform COMPAT_PRECISION int FrameCount; uniform COMPAT_PRECISION vec2 OutputSize; uniform COMPAT_PRECISION vec2 TextureSize; uniform COMPAT_PRECISION vec2 InputSize; // compatibility #defines #define vTexCoord TEX0.xy #define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize #define OutSize vec4(OutputSize, 1.0 / OutputSize) void main() { gl_Position = MVPMatrix * VertexCoord; TEX0.xy = TexCoord.xy; } #elif defined(FRAGMENT) #ifdef GL_ES #ifdef GL_FRAGMENT_PRECISION_HIGH precision highp float; #else precision mediump float; #endif #define COMPAT_PRECISION mediump #else #define COMPAT_PRECISION #endif #if __VERSION__ >= 130 #define COMPAT_VARYING in #define COMPAT_TEXTURE texture out COMPAT_PRECISION vec4 FragColor; #else #define COMPAT_VARYING varying #define FragColor gl_FragColor #define COMPAT_TEXTURE texture2D #endif uniform COMPAT_PRECISION int FrameDirection; uniform COMPAT_PRECISION int FrameCount; uniform COMPAT_PRECISION vec2 OutputSize; uniform COMPAT_PRECISION vec2 TextureSize; uniform COMPAT_PRECISION vec2 InputSize; uniform sampler2D Texture; COMPAT_VARYING vec4 TEX0; // compatibility #defines #define Source Texture #define vTexCoord TEX0.xy #define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize #define OutSize vec4(OutputSize, 1.0 / OutputSize) #ifdef PARAMETER_UNIFORM uniform COMPAT_PRECISION float BrightenLevel, BrightenAmount; #else #define BrightenLevel 2.0 #define BrightenAmount 0.1 #endif void main() { vec3 Picture = COMPAT_TEXTURE(Source, vTexCoord).xyz; Picture = clamp(Picture,0.0,1.0); FragColor = vec4(mix(Picture,1.0-pow(1.0-Picture,vec3(BrightenLevel)),BrightenAmount),1.0); } #endif
{ "pile_set_name": "Github" }
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin dragonfly freebsd netbsd openbsd // BSD system call wrappers shared by *BSD based systems // including OS X (Darwin) and FreeBSD. Like the other // syscall_*.go files it is compiled as Go code but also // used as input to mksyscall which parses the //sys // lines and generates system call stubs. package unix import ( "runtime" "syscall" "unsafe" ) /* * Wrapped */ //sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error) //sysnb setgroups(ngid int, gid *_Gid_t) (err error) func Getgroups() (gids []int, err error) { n, err := getgroups(0, nil) if err != nil { return nil, err } if n == 0 { return nil, nil } // Sanity check group count. Max is 16 on BSD. if n < 0 || n > 1000 { return nil, EINVAL } a := make([]_Gid_t, n) n, err = getgroups(n, &a[0]) if err != nil { return nil, err } gids = make([]int, n) for i, v := range a[0:n] { gids[i] = int(v) } return } func Setgroups(gids []int) (err error) { if len(gids) == 0 { return setgroups(0, nil) } a := make([]_Gid_t, len(gids)) for i, v := range gids { a[i] = _Gid_t(v) } return setgroups(len(a), &a[0]) } func ReadDirent(fd int, buf []byte) (n int, err error) { // Final argument is (basep *uintptr) and the syscall doesn't take nil. // 64 bits should be enough. (32 bits isn't even on 386). Since the // actual system call is getdirentries64, 64 is a good guess. // TODO(rsc): Can we use a single global basep for all calls? var base = (*uintptr)(unsafe.Pointer(new(uint64))) return Getdirentries(fd, buf, base) } // Wait status is 7 bits at bottom, either 0 (exited), // 0x7F (stopped), or a signal number that caused an exit. // The 0x80 bit is whether there was a core dump. // An extra number (exit code, signal causing a stop) // is in the high bits. type WaitStatus uint32 const ( mask = 0x7F core = 0x80 shift = 8 exited = 0 stopped = 0x7F ) func (w WaitStatus) Exited() bool { return w&mask == exited } func (w WaitStatus) ExitStatus() int { if w&mask != exited { return -1 } return int(w >> shift) } func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 } func (w WaitStatus) Signal() syscall.Signal { sig := syscall.Signal(w & mask) if sig == stopped || sig == 0 { return -1 } return sig } func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP } func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP } func (w WaitStatus) StopSignal() syscall.Signal { if !w.Stopped() { return -1 } return syscall.Signal(w>>shift) & 0xFF } func (w WaitStatus) TrapCause() int { return -1 } //sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { var status _C_int wpid, err = wait4(pid, &status, options, rusage) if wstatus != nil { *wstatus = WaitStatus(status) } return } //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sysnb socket(domain int, typ int, proto int) (fd int, err error) //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) //sys Shutdown(s int, how int) (err error) func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Port < 0 || sa.Port > 0xFFFF { return nil, 0, EINVAL } sa.raw.Len = SizeofSockaddrInet4 sa.raw.Family = AF_INET p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p[0] = byte(sa.Port >> 8) p[1] = byte(sa.Port) for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr[i] = sa.Addr[i] } return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil } func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Port < 0 || sa.Port > 0xFFFF { return nil, 0, EINVAL } sa.raw.Len = SizeofSockaddrInet6 sa.raw.Family = AF_INET6 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p[0] = byte(sa.Port >> 8) p[1] = byte(sa.Port) sa.raw.Scope_id = sa.ZoneId for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr[i] = sa.Addr[i] } return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil } func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { name := sa.Name n := len(name) if n >= len(sa.raw.Path) || n == 0 { return nil, 0, EINVAL } sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL sa.raw.Family = AF_UNIX for i := 0; i < n; i++ { sa.raw.Path[i] = int8(name[i]) } return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil } func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Index == 0 { return nil, 0, EINVAL } sa.raw.Len = sa.Len sa.raw.Family = AF_LINK sa.raw.Index = sa.Index sa.raw.Type = sa.Type sa.raw.Nlen = sa.Nlen sa.raw.Alen = sa.Alen sa.raw.Slen = sa.Slen for i := 0; i < len(sa.raw.Data); i++ { sa.raw.Data[i] = sa.Data[i] } return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil } func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { switch rsa.Addr.Family { case AF_LINK: pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa)) sa := new(SockaddrDatalink) sa.Len = pp.Len sa.Family = pp.Family sa.Index = pp.Index sa.Type = pp.Type sa.Nlen = pp.Nlen sa.Alen = pp.Alen sa.Slen = pp.Slen for i := 0; i < len(sa.Data); i++ { sa.Data[i] = pp.Data[i] } return sa, nil case AF_UNIX: pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) if pp.Len < 2 || pp.Len > SizeofSockaddrUnix { return nil, EINVAL } sa := new(SockaddrUnix) // Some BSDs include the trailing NUL in the length, whereas // others do not. Work around this by subtracting the leading // family and len. The path is then scanned to see if a NUL // terminator still exists within the length. n := int(pp.Len) - 2 // subtract leading Family, Len for i := 0; i < n; i++ { if pp.Path[i] == 0 { // found early NUL; assume Len included the NUL // or was overestimating. n = i break } } bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(bytes) return sa, nil case AF_INET: pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) sa := new(SockaddrInet4) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) for i := 0; i < len(sa.Addr); i++ { sa.Addr[i] = pp.Addr[i] } return sa, nil case AF_INET6: pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) sa := new(SockaddrInet6) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) sa.ZoneId = pp.Scope_id for i := 0; i < len(sa.Addr); i++ { sa.Addr[i] = pp.Addr[i] } return sa, nil } return nil, EAFNOSUPPORT } func Accept(fd int) (nfd int, sa Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny nfd, err = accept(fd, &rsa, &len) if err != nil { return } if runtime.GOOS == "darwin" && len == 0 { // Accepted socket has no address. // This is likely due to a bug in xnu kernels, // where instead of ECONNABORTED error socket // is accepted, but has no address. Close(nfd) return 0, nil, ECONNABORTED } sa, err = anyToSockaddr(&rsa) if err != nil { Close(nfd) nfd = 0 } return } func Getsockname(fd int) (sa Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny if err = getsockname(fd, &rsa, &len); err != nil { return } // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be // reported upstream. if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 { rsa.Addr.Family = AF_UNIX rsa.Addr.Len = SizeofSockaddrUnix } return anyToSockaddr(&rsa) } //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) func GetsockoptByte(fd, level, opt int) (value byte, err error) { var n byte vallen := _Socklen(1) err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) return n, err } func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { vallen := _Socklen(4) err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) return value, err } func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { var value IPMreq vallen := _Socklen(SizeofIPMreq) err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) return &value, err } func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { var value IPv6Mreq vallen := _Socklen(SizeofIPv6Mreq) err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) return &value, err } func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { var value IPv6MTUInfo vallen := _Socklen(SizeofIPv6MTUInfo) err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) return &value, err } func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { var value ICMPv6Filter vallen := _Socklen(SizeofICMPv6Filter) err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) return &value, err } //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { var msg Msghdr var rsa RawSockaddrAny msg.Name = (*byte)(unsafe.Pointer(&rsa)) msg.Namelen = uint32(SizeofSockaddrAny) var iov Iovec if len(p) > 0 { iov.Base = (*byte)(unsafe.Pointer(&p[0])) iov.SetLen(len(p)) } var dummy byte if len(oob) > 0 { // receive at least one normal byte if len(p) == 0 { iov.Base = &dummy iov.SetLen(1) } msg.Control = (*byte)(unsafe.Pointer(&oob[0])) msg.SetControllen(len(oob)) } msg.Iov = &iov msg.Iovlen = 1 if n, err = recvmsg(fd, &msg, flags); err != nil { return } oobn = int(msg.Controllen) recvflags = int(msg.Flags) // source address is only specified if the socket is unconnected if rsa.Addr.Family != AF_UNSPEC { from, err = anyToSockaddr(&rsa) } return } //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { _, err = SendmsgN(fd, p, oob, to, flags) return } func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { var ptr unsafe.Pointer var salen _Socklen if to != nil { ptr, salen, err = to.sockaddr() if err != nil { return 0, err } } var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(ptr)) msg.Namelen = uint32(salen) var iov Iovec if len(p) > 0 { iov.Base = (*byte)(unsafe.Pointer(&p[0])) iov.SetLen(len(p)) } var dummy byte if len(oob) > 0 { // send at least one normal byte if len(p) == 0 { iov.Base = &dummy iov.SetLen(1) } msg.Control = (*byte)(unsafe.Pointer(&oob[0])) msg.SetControllen(len(oob)) } msg.Iov = &iov msg.Iovlen = 1 if n, err = sendmsg(fd, &msg, flags); err != nil { return 0, err } if len(oob) > 0 && len(p) == 0 { n = 0 } return n, nil } //sys kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) { var change, event unsafe.Pointer if len(changes) > 0 { change = unsafe.Pointer(&changes[0]) } if len(events) > 0 { event = unsafe.Pointer(&events[0]) } return kevent(kq, change, len(changes), event, len(events), timeout) } //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL func Sysctl(name string) (value string, err error) { // Translate name to mib number. mib, err := nametomib(name) if err != nil { return "", err } // Find size. n := uintptr(0) if err = sysctl(mib, nil, &n, nil, 0); err != nil { return "", err } if n == 0 { return "", nil } // Read into buffer of that size. buf := make([]byte, n) if err = sysctl(mib, &buf[0], &n, nil, 0); err != nil { return "", err } // Throw away terminating NUL. if n > 0 && buf[n-1] == '\x00' { n-- } return string(buf[0:n]), nil } func SysctlUint32(name string) (value uint32, err error) { // Translate name to mib number. mib, err := nametomib(name) if err != nil { return 0, err } // Read into buffer of that size. n := uintptr(4) buf := make([]byte, 4) if err = sysctl(mib, &buf[0], &n, nil, 0); err != nil { return 0, err } if n != 4 { return 0, EIO } return *(*uint32)(unsafe.Pointer(&buf[0])), nil } //sys utimes(path string, timeval *[2]Timeval) (err error) func Utimes(path string, tv []Timeval) error { if tv == nil { return utimes(path, nil) } if len(tv) != 2 { return EINVAL } return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } func UtimesNano(path string, ts []Timespec) error { if ts == nil { return utimes(path, nil) } // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it // isn't supported by darwin so this uses utimes instead if len(ts) != 2 { return EINVAL } // Not as efficient as it could be because Timespec and // Timeval have different types in the different OSes tv := [2]Timeval{ NsecToTimeval(TimespecToNsec(ts[0])), NsecToTimeval(TimespecToNsec(ts[1])), } return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } //sys futimes(fd int, timeval *[2]Timeval) (err error) func Futimes(fd int, tv []Timeval) error { if tv == nil { return futimes(fd, nil) } if len(tv) != 2 { return EINVAL } return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } //sys fcntl(fd int, cmd int, arg int) (val int, err error) // TODO: wrap // Acct(name nil-string) (err error) // Gethostuuid(uuid *byte, timeout *Timespec) (err error) // Madvise(addr *byte, len int, behav int) (err error) // Mprotect(addr *byte, len int, prot int) (err error) // Msync(addr *byte, len int, flags int) (err error) // Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error) var mapper = &mmapper{ active: make(map[*byte][]byte), mmap: mmap, munmap: munmap, } func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { return mapper.Mmap(fd, offset, length, prot, flags) } func Munmap(b []byte) (err error) { return mapper.Munmap(b) }
{ "pile_set_name": "Github" }
#include "tommath_private.h" #ifdef BN_MP_OR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * * LibTomMath is a library that provides multiple-precision * integer arithmetic as well as number theoretic functionality. * * The library was designed directly after the MPI library by * Michael Fromberger but has been written from scratch with * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. */ /* OR two ints together */ int mp_or(const mp_int *a, const mp_int *b, mp_int *c) { int res, ix, px; mp_int t; const mp_int *x; if (a->used > b->used) { if ((res = mp_init_copy(&t, a)) != MP_OKAY) { return res; } px = b->used; x = b; } else { if ((res = mp_init_copy(&t, b)) != MP_OKAY) { return res; } px = a->used; x = a; } for (ix = 0; ix < px; ix++) { t.dp[ix] |= x->dp[ix]; } mp_clamp(&t); mp_exch(c, &t); mp_clear(&t); return MP_OKAY; } #endif /* ref: HEAD -> develop */ /* git commit: 8b9f98baa16b21e1612ac6746273febb74150a6f */ /* commit time: 2018-09-23 21:37:58 +0200 */
{ "pile_set_name": "Github" }
# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-07-20 13:28+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc <[email protected]>\n" "Language-Team: Indonesian (Indonesia) (http://www.transifex.com/projects/p/" "xadmin/language/id_ID/)\n" "Language: id_ID\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: adminx.py:19 msgid "Admin Object" msgstr "" #: apps.py:11 msgid "Administration" msgstr "" #: filters.py:159 filters.py:191 filters.py:407 filters.py:493 filters.py:531 msgid "All" msgstr "" #: filters.py:160 plugins/export.py:165 msgid "Yes" msgstr "" #: filters.py:161 plugins/export.py:165 msgid "No" msgstr "" #: filters.py:175 msgid "Unknown" msgstr "" #: filters.py:267 msgid "Any date" msgstr "" #: filters.py:268 msgid "Has date" msgstr "" #: filters.py:271 msgid "Has no date" msgstr "" #: filters.py:274 widgets.py:30 msgid "Today" msgstr "" #: filters.py:278 msgid "Past 7 days" msgstr "" #: filters.py:282 msgid "This month" msgstr "" #: filters.py:286 msgid "This year" msgstr "" #: forms.py:10 msgid "" "Please enter the correct username and password for a staff account. Note " "that both fields are case-sensitive." msgstr "" #: forms.py:21 msgid "Please log in again, because your session has expired." msgstr "" #: forms.py:41 #, python-format msgid "Your e-mail address is not your username. Try '%s' instead." msgstr "" #: models.py:48 msgid "Title" msgstr "" #: models.py:49 models.py:88 models.py:107 models.py:149 msgid "user" msgstr "" #: models.py:50 msgid "Url Name" msgstr "" #: models.py:52 msgid "Query String" msgstr "" #: models.py:53 msgid "Is Shared" msgstr "" #: models.py:66 plugins/bookmark.py:50 plugins/bookmark.py:180 msgid "Bookmark" msgstr "" #: models.py:67 msgid "Bookmarks" msgstr "" #: models.py:89 msgid "Settings Key" msgstr "" #: models.py:90 msgid "Settings Content" msgstr "" #: models.py:102 msgid "User Setting" msgstr "" #: models.py:103 msgid "User Settings" msgstr "" #: models.py:108 msgid "Page" msgstr "" #: models.py:109 views/dashboard.py:82 views/dashboard.py:92 msgid "Widget Type" msgstr "" #: models.py:110 views/dashboard.py:83 msgid "Widget Params" msgstr "" #: models.py:137 msgid "User Widget" msgstr "" #: models.py:138 msgid "User Widgets" msgstr "" #: models.py:142 msgid "action time" msgstr "" #: models.py:151 msgid "action ip" msgstr "" #: models.py:155 msgid "content type" msgstr "" #: models.py:158 msgid "object id" msgstr "" #: models.py:159 msgid "object repr" msgstr "" #: models.py:160 msgid "action flag" msgstr "" #: models.py:161 msgid "change message" msgstr "" #: models.py:164 msgid "log entry" msgstr "" #: models.py:165 msgid "log entries" msgstr "" #: models.py:173 #, python-format msgid "Added \"%(object)s\"." msgstr "" #: models.py:175 #, python-format msgid "Changed \"%(object)s\" - %(changes)s" msgstr "" #: models.py:180 #, python-format msgid "Deleted \"%(object)s.\"" msgstr "" #: plugins/actions.py:57 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "" #: plugins/actions.py:72 #, python-format msgid "Batch delete %(count)d %(items)s." msgstr "" #: plugins/actions.py:78 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "" #: plugins/actions.py:110 views/delete.py:70 #, python-format msgid "Cannot delete %(name)s" msgstr "" #: plugins/actions.py:112 views/delete.py:73 msgid "Are you sure?" msgstr "" #: plugins/actions.py:158 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "" #: plugins/actions.py:162 #, python-format msgid "0 of %(cnt)s selected" msgstr "" #: plugins/actions.py:179 plugins/actions.py:189 msgid "" "Items must be selected in order to perform actions on them. No items have " "been changed." msgstr "" #: plugins/aggregation.py:14 msgid "Min" msgstr "" #: plugins/aggregation.py:14 msgid "Max" msgstr "" #: plugins/aggregation.py:14 msgid "Avg" msgstr "" #: plugins/aggregation.py:14 msgid "Sum" msgstr "" #: plugins/aggregation.py:14 msgid "Count" msgstr "" #: plugins/auth.py:21 #, python-format msgid "Can add %s" msgstr "" #: plugins/auth.py:22 #, python-format msgid "Can change %s" msgstr "" #: plugins/auth.py:23 #, python-format msgid "Can edit %s" msgstr "" #: plugins/auth.py:24 #, python-format msgid "Can delete %s" msgstr "" #: plugins/auth.py:25 #, python-format msgid "Can view %s" msgstr "" #: plugins/auth.py:87 msgid "Personal info" msgstr "" #: plugins/auth.py:91 msgid "Permissions" msgstr "" #: plugins/auth.py:94 msgid "Important dates" msgstr "" #: plugins/auth.py:99 msgid "Status" msgstr "" #: plugins/auth.py:111 msgid "Permission Name" msgstr "" #: plugins/auth.py:167 msgid "Change Password" msgstr "" #: plugins/auth.py:198 #, python-format msgid "Change password: %s" msgstr "" #: plugins/auth.py:223 plugins/auth.py:255 msgid "Password changed successfully." msgstr "" #: plugins/auth.py:242 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" msgstr "" #: plugins/batch.py:44 msgid "Change this field" msgstr "" #: plugins/batch.py:65 #, python-format msgid "Batch Change selected %(verbose_name_plural)s" msgstr "" #: plugins/batch.py:89 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" #: plugins/batch.py:138 #, python-format msgid "Batch change %s" msgstr "" #: plugins/bookmark.py:173 msgid "bookmark" msgstr "" #: plugins/bookmark.py:176 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" #: plugins/chart.py:25 msgid "Show models simple chart." msgstr "" #: plugins/chart.py:51 #, python-format msgid "%s Charts" msgstr "" #: plugins/comments.py:33 msgid "Metadata" msgstr "" #: plugins/comments.py:60 msgid "flagged" msgid_plural "flagged" msgstr[0] "" #: plugins/comments.py:61 msgid "Flag selected comments" msgstr "" #: plugins/comments.py:66 msgid "approved" msgid_plural "approved" msgstr[0] "" #: plugins/comments.py:67 msgid "Approve selected comments" msgstr "" #: plugins/comments.py:72 msgid "removed" msgid_plural "removed" msgstr[0] "" #: plugins/comments.py:73 msgid "Remove selected comments" msgstr "" #: plugins/comments.py:86 #, python-format msgid "1 comment was successfully %(action)s." msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" #: plugins/details.py:52 views/list.py:578 #, python-format msgid "Details of %s" msgstr "" #: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "" #: plugins/editable.py:73 views/dashboard.py:649 views/delete.py:27 #: views/detail.py:145 views/edit.py:454 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "" #: plugins/export.py:98 plugins/export.py:135 msgid "Sheet" msgstr "" #: plugins/filters.py:133 plugins/quickfilter.py:141 #, python-format msgid "<b>Filtering error:</b> %s" msgstr "" #: plugins/images.py:29 msgid "Previous" msgstr "" #: plugins/images.py:29 msgid "Next" msgstr "" #: plugins/images.py:29 msgid "Slideshow" msgstr "" #: plugins/images.py:29 msgid "Download" msgstr "" #: plugins/images.py:50 msgid "Change:" msgstr "" #: plugins/layout.py:16 msgid "Table" msgstr "" #: plugins/layout.py:22 msgid "Thumbnails" msgstr "" #: plugins/passwords.py:64 msgid "Forgotten your password or username?" msgstr "" #: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" #: plugins/relate.py:104 msgid "Related Objects" msgstr "" #: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "" #: plugins/relfield.py:67 #, python-format msgid "Select %s" msgstr "" #: plugins/themes.py:47 msgid "Default" msgstr "" #: plugins/themes.py:48 msgid "Default bootstrap theme" msgstr "" #: plugins/themes.py:49 msgid "Bootstrap2" msgstr "" #: plugins/themes.py:49 msgid "Bootstrap 2.x theme" msgstr "" #: plugins/topnav.py:62 views/dashboard.py:465 views/edit.py:387 #: views/edit.py:396 #, python-format msgid "Add %s" msgstr "" #: plugins/xversion.py:106 msgid "Initial version." msgstr "" #: plugins/xversion.py:108 msgid "Change version." msgstr "" #: plugins/xversion.py:110 msgid "Revert version." msgstr "" #: plugins/xversion.py:112 msgid "Rercover version." msgstr "" #: plugins/xversion.py:114 #, python-format msgid "Deleted %(verbose_name)s." msgstr "" #: plugins/xversion.py:127 templates/xadmin/views/recover_form.html:26 msgid "Recover" msgstr "" #: plugins/xversion.py:143 templates/xadmin/views/model_history.html:11 #: templates/xadmin/views/revision_diff.html:11 #: templates/xadmin/views/revision_form.html:15 msgid "History" msgstr "" #: plugins/xversion.py:194 templates/xadmin/views/recover_form.html:14 #: templates/xadmin/views/recover_list.html:10 #, python-format msgid "Recover deleted %(name)s" msgstr "" #: plugins/xversion.py:238 #, python-format msgid "Change history: %s" msgstr "" #: plugins/xversion.py:288 msgid "Must select two versions." msgstr "" #: plugins/xversion.py:296 msgid "Please select two different versions." msgstr "" #: plugins/xversion.py:383 plugins/xversion.py:500 #, python-format msgid "Current: %s" msgstr "" #: plugins/xversion.py:424 #, python-format msgid "Revert %s" msgstr "" #: plugins/xversion.py:440 #, python-format msgid "" "The %(model)s \"%(name)s\" was reverted successfully. You may edit it again " "below." msgstr "" #: plugins/xversion.py:461 #, python-format msgid "Recover %s" msgstr "" #: plugins/xversion.py:477 #, python-format msgid "" "The %(model)s \"%(name)s\" was recovered successfully. You may edit it again " "below." msgstr "" #: templates/xadmin/404.html:4 templates/xadmin/404.html:8 msgid "Page not found" msgstr "" #: templates/xadmin/404.html:10 msgid "We're sorry, but the requested page could not be found." msgstr "" #: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 #: templates/xadmin/base_site.html:53 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 #: templates/xadmin/views/invalid_setup.html:7 #: templates/xadmin/views/model_dashboard.html:7 #: templates/xadmin/views/model_delete_selected_confirm.html:8 #: templates/xadmin/views/model_history.html:8 #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 #: templates/xadmin/views/revision_form.html:8 views/base.py:473 msgid "Home" msgstr "" #: templates/xadmin/500.html:8 msgid "Server error" msgstr "" #: templates/xadmin/500.html:12 msgid "Server error (500)" msgstr "" #: templates/xadmin/500.html:15 msgid "Server Error <em>(500)</em>" msgstr "" #: templates/xadmin/500.html:16 msgid "" "There's been an error. It's been reported to the site administrators via e-" "mail and should be fixed shortly. Thanks for your patience." msgstr "" #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" msgstr "" #: templates/xadmin/auth/password_reset/complete.html:14 msgid "Your password has been set. You may go ahead and log in now." msgstr "" #: templates/xadmin/auth/password_reset/complete.html:15 msgid "Log in" msgstr "" #: templates/xadmin/auth/password_reset/confirm.html:12 msgid "Enter new password" msgstr "" #: templates/xadmin/auth/password_reset/confirm.html:17 msgid "" "Please enter your new password twice so we can verify you typed it in " "correctly." msgstr "" #: templates/xadmin/auth/password_reset/confirm.html:19 msgid "Change my password" msgstr "" #: templates/xadmin/auth/password_reset/confirm.html:24 msgid "Password reset unsuccessful" msgstr "" #: templates/xadmin/auth/password_reset/confirm.html:27 msgid "" "The password reset link was invalid, possibly because it has already been " "used. Please request a new password reset." msgstr "" #: templates/xadmin/auth/password_reset/done.html:14 msgid "" "We've e-mailed you instructions for setting your password to the e-mail " "address you submitted. You should be receiving it shortly." msgstr "" #: templates/xadmin/auth/password_reset/email.html:2 #, python-format msgid "" "You're receiving this e-mail because you requested a password reset for your " "user account at %(site_name)s." msgstr "" #: templates/xadmin/auth/password_reset/email.html:4 msgid "Please go to the following page and choose a new password:" msgstr "" #: templates/xadmin/auth/password_reset/email.html:8 msgid "Your username, in case you've forgotten:" msgstr "" #: templates/xadmin/auth/password_reset/email.html:10 msgid "Thanks for using our site!" msgstr "" #: templates/xadmin/auth/password_reset/email.html:12 #, python-format msgid "The %(site_name)s team" msgstr "" #: templates/xadmin/auth/password_reset/form.html:13 msgid "Password reset" msgstr "" #: templates/xadmin/auth/password_reset/form.html:17 msgid "" "Forgotten your password? Enter your e-mail address below, and we'll e-mail " "instructions for setting a new one." msgstr "" #: templates/xadmin/auth/password_reset/form.html:25 msgid "E-mail address:" msgstr "" #: templates/xadmin/auth/password_reset/form.html:33 msgid "Reset my password" msgstr "" #: templates/xadmin/auth/user/add_form.html:6 msgid "" "First, enter a username and password. Then, you'll be able to edit more user " "options." msgstr "" #: templates/xadmin/auth/user/add_form.html:8 msgid "Enter a username and password." msgstr "" #: templates/xadmin/auth/user/change_password.html:31 #: templates/xadmin/views/batch_change_form.html:24 #: templates/xadmin/views/form.html:18 #: templates/xadmin/views/model_form.html:20 msgid "Please correct the error below." msgid_plural "Please correct the errors below." msgstr[0] "" #: templates/xadmin/auth/user/change_password.html:38 msgid "Enter your new password." msgstr "" #: templates/xadmin/auth/user/change_password.html:40 #, python-format msgid "Enter a new password for the user <strong>%(username)s</strong>." msgstr "" #: templates/xadmin/base_site.html:18 msgid "Welcome," msgstr "" #: templates/xadmin/base_site.html:24 msgid "Log out" msgstr "" #: templates/xadmin/base_site.html:36 msgid "You don't have permission to edit anything." msgstr "" #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:9 #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:16 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:23 msgid "Add" msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:9 #: templates/xadmin/blocks/model_form.submit_line.wizard.html:26 msgid "Prev step" msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:13 #: templates/xadmin/blocks/model_form.submit_line.wizard.html:29 msgid "Next step" msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:15 #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 #: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:7 msgid "Clean Bookmarks" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:18 msgid "No Bookmarks" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:22 msgid "New Bookmark" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:26 msgid "Save current page as Bookmark" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:32 msgid "Enter bookmark title" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:33 msgid "Waiting" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.bookmarks.html:33 msgid "Save Bookmark" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.filters.html:4 msgid "Filters" msgstr "" #: templates/xadmin/blocks/model_list.nav_menu.filters.html:8 msgid "Clean Filters" msgstr "" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 msgid "Click here to select the objects across all pages" msgstr "" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 #, python-format msgid "Select all %(total_count)s %(model_name)s" msgstr "" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:20 msgid "Clear selection" msgstr "" #: templates/xadmin/blocks/model_list.results_top.charts.html:4 msgid "Charts" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 #: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.layouts.html:4 msgid "Layout" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.refresh.html:8 msgid "Clean Refresh" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.refresh.html:14 #, python-format msgid "Every %(t)s seconds" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.saveorder.html:4 msgid "Save Order" msgstr "" #: templates/xadmin/edit_inline/blank.html:5 views/detail.py:23 #: views/edit.py:102 views/list.py:29 msgid "Null" msgstr "" #: templates/xadmin/filters/char.html:13 msgid "Enter" msgstr "" #: templates/xadmin/filters/date.html:10 templates/xadmin/filters/date.html:13 msgid "Choice Date" msgstr "" #: templates/xadmin/filters/date.html:18 msgid "YY" msgstr "" #: templates/xadmin/filters/date.html:19 msgid "year" msgstr "" #: templates/xadmin/filters/date.html:22 msgid "MM" msgstr "" #: templates/xadmin/filters/date.html:23 msgid "month" msgstr "" #: templates/xadmin/filters/date.html:26 msgid "DD" msgstr "" #: templates/xadmin/filters/date.html:27 msgid "day" msgstr "" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 #: templates/xadmin/filters/fk_search.html:24 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "" #: templates/xadmin/filters/date.html:34 msgid "Date Range" msgstr "" #: templates/xadmin/filters/date.html:41 msgid "Select Date" msgstr "" #: templates/xadmin/filters/date.html:42 msgid "From" msgstr "" #: templates/xadmin/filters/date.html:44 msgid "To" msgstr "" #: templates/xadmin/filters/fk_search.html:14 msgid "Select" msgstr "" #: templates/xadmin/filters/fk_search.html:26 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "" #: templates/xadmin/filters/number.html:17 #: templates/xadmin/filters/number.html:25 #: templates/xadmin/filters/number.html:33 msgid "Enter Number" msgstr "" #: templates/xadmin/filters/rel.html:3 #, python-format msgid " By %(filter_title)s " msgstr "" #: templates/xadmin/forms/transfer.html:4 msgid "Available" msgstr "" #: templates/xadmin/forms/transfer.html:12 msgid "Click to choose all at once." msgstr "" #: templates/xadmin/forms/transfer.html:12 msgid "Choose all" msgstr "" #: templates/xadmin/forms/transfer.html:16 msgid "Choose" msgstr "" #: templates/xadmin/forms/transfer.html:19 #: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "" #: templates/xadmin/forms/transfer.html:23 msgid "Chosen" msgstr "" #: templates/xadmin/forms/transfer.html:27 msgid "Click to remove all chosen at once." msgstr "" #: templates/xadmin/forms/transfer.html:27 msgid "Remove all" msgstr "" #: templates/xadmin/includes/pagination.html:9 msgid "Show all" msgstr "" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 #: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" #: templates/xadmin/includes/submit_line.html:17 msgid "Save as new" msgstr "" #: templates/xadmin/includes/submit_line.html:18 msgid "Save and add another" msgstr "" #: templates/xadmin/includes/submit_line.html:19 msgid "Save and continue editing" msgstr "" #: templates/xadmin/includes/submit_line.html:24 #: templates/xadmin/views/model_detail.html:28 views/delete.py:93 msgid "Delete" msgstr "" #: templates/xadmin/views/app_index.html:13 #, python-format msgid "%(name)s" msgstr "" #: templates/xadmin/views/batch_change_form.html:11 msgid "Change multiple objects" msgstr "" #: templates/xadmin/views/batch_change_form.html:16 #, python-format msgid "Change one %(objects_name)s" msgid_plural "Batch change %(counter)s %(objects_name)s" msgstr[0] "" #: templates/xadmin/views/batch_change_form.html:38 msgid "Change Multiple" msgstr "" #: templates/xadmin/views/dashboard.html:15 #: templates/xadmin/views/dashboard.html:22 #: templates/xadmin/views/dashboard.html:23 msgid "Add Widget" msgstr "" #: templates/xadmin/views/invalid_setup.html:13 msgid "" "Something's wrong with your database installation. Make sure the appropriate " "database tables have been created, and make sure the database is readable by " "the appropriate user." msgstr "" #: templates/xadmin/views/logged_out.html:16 msgid "Logout Success" msgstr "" #: templates/xadmin/views/logged_out.html:17 msgid "Thanks for spending some quality time with the Web site today." msgstr "" #: templates/xadmin/views/logged_out.html:19 msgid "Close Window" msgstr "" #: templates/xadmin/views/logged_out.html:20 msgid "Log in again" msgstr "" #: templates/xadmin/views/login.html:39 views/website.py:38 msgid "Please Login" msgstr "" #: templates/xadmin/views/login.html:52 msgid "Username" msgstr "" #: templates/xadmin/views/login.html:64 msgid "Password" msgstr "" #: templates/xadmin/views/login.html:75 msgid "log in" msgstr "" #: templates/xadmin/views/model_dashboard.html:26 #: templates/xadmin/views/model_detail.html:25 msgid "Edit" msgstr "" #: templates/xadmin/views/model_delete_confirm.html:11 #, python-format msgid "" "Deleting the %(verbose_name)s '%(escaped_object)s' would result in deleting " "related objects, but your account doesn't have permission to delete the " "following types of objects:" msgstr "" #: templates/xadmin/views/model_delete_confirm.html:19 #, python-format msgid "" "Deleting the %(verbose_name)s '%(escaped_object)s' would require deleting " "the following protected related objects:" msgstr "" #: templates/xadmin/views/model_delete_confirm.html:27 #, python-format msgid "" "Are you sure you want to delete the %(verbose_name)s \"%(escaped_object)s\"? " "All of the following related items will be deleted:" msgstr "" #: templates/xadmin/views/model_delete_confirm.html:34 #: templates/xadmin/views/model_delete_selected_confirm.html:49 msgid "Yes, I'm sure" msgstr "" #: templates/xadmin/views/model_delete_confirm.html:35 #: templates/xadmin/views/model_delete_selected_confirm.html:50 msgid "Cancel" msgstr "" #: templates/xadmin/views/model_delete_selected_confirm.html:10 msgid "Delete multiple objects" msgstr "" #: templates/xadmin/views/model_delete_selected_confirm.html:18 #, python-format msgid "" "Deleting the selected %(objects_name)s would result in deleting related " "objects, but your account doesn't have permission to delete the following " "types of objects:" msgstr "" #: templates/xadmin/views/model_delete_selected_confirm.html:26 #, python-format msgid "" "Deleting the selected %(objects_name)s would require deleting the following " "protected related objects:" msgstr "" #: templates/xadmin/views/model_delete_selected_confirm.html:34 #, python-format msgid "" "Are you sure you want to delete the selected %(objects_name)s? All of the " "following objects and their related items will be deleted:" msgstr "" #: templates/xadmin/views/model_history.html:26 msgid "Diff" msgstr "" #: templates/xadmin/views/model_history.html:27 #: templates/xadmin/views/recover_list.html:25 msgid "Date/time" msgstr "" #: templates/xadmin/views/model_history.html:28 msgid "User" msgstr "" #: templates/xadmin/views/model_history.html:29 msgid "Comment" msgstr "" #: templates/xadmin/views/model_history.html:54 msgid "Diff Select Versions" msgstr "" #: templates/xadmin/views/model_history.html:58 msgid "" "This object doesn't have a change history. It probably wasn't added via this " "admin site." msgstr "" #: templates/xadmin/views/model_list.html:29 #, python-format msgid "Add %(name)s" msgstr "" #: templates/xadmin/views/model_list.html:39 msgid "Columns" msgstr "" #: templates/xadmin/views/model_list.html:42 msgid "Restore Selected" msgstr "" #: templates/xadmin/views/model_list.html:147 #: templates/xadmin/widgets/list.html:33 msgid "Empty list" msgstr "" #: templates/xadmin/views/recover_form.html:20 msgid "Press the recover button below to recover this version of the object." msgstr "" #: templates/xadmin/views/recover_list.html:19 msgid "" "Choose a date from the list below to recover a deleted version of an object." msgstr "" #: templates/xadmin/views/recover_list.html:39 msgid "There are no deleted objects to recover." msgstr "" #: templates/xadmin/views/revision_diff.html:12 #: templates/xadmin/views/revision_diff.html:17 #, python-format msgid "Diff %(verbose_name)s" msgstr "" #: templates/xadmin/views/revision_diff.html:25 msgid "Field" msgstr "" #: templates/xadmin/views/revision_diff.html:26 msgid "Version A" msgstr "" #: templates/xadmin/views/revision_diff.html:27 msgid "Version B" msgstr "" #: templates/xadmin/views/revision_diff.html:39 msgid "Revert to" msgstr "" #: templates/xadmin/views/revision_diff.html:40 #: templates/xadmin/views/revision_diff.html:41 msgid "Revert" msgstr "" #: templates/xadmin/views/revision_form.html:16 #, python-format msgid "Revert %(verbose_name)s" msgstr "" #: templates/xadmin/views/revision_form.html:21 msgid "Press the revert button below to revert to this version of the object." msgstr "" #: templates/xadmin/views/revision_form.html:27 msgid "Revert this revision" msgstr "" #: templates/xadmin/widgets/addform.html:14 msgid "Success" msgstr "" #: templates/xadmin/widgets/addform.html:14 msgid "Add success, click <a id='change-link'>edit</a> to edit." msgstr "" #: templates/xadmin/widgets/addform.html:17 msgid "Quick Add" msgstr "" #: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "" #: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "" #: views/base.py:315 msgid "Django Xadmin" msgstr "" #: views/base.py:316 msgid "my-company.inc" msgstr "" #: views/dashboard.py:186 msgid "Widget ID" msgstr "" #: views/dashboard.py:187 msgid "Widget Title" msgstr "" #: views/dashboard.py:252 msgid "Html Content Widget, can write any html content in widget." msgstr "" #: views/dashboard.py:255 msgid "Html Content" msgstr "" #: views/dashboard.py:318 msgid "Target Model" msgstr "" #: views/dashboard.py:369 msgid "Quick button Widget, quickly open any page." msgstr "" #: views/dashboard.py:371 msgid "Quick Buttons" msgstr "" #: views/dashboard.py:416 msgid "Any Objects list Widget." msgstr "" #: views/dashboard.py:456 msgid "Add any model object Widget." msgstr "" #: views/dashboard.py:492 msgid "Dashboard" msgstr "" #: views/dashboard.py:633 #, python-format msgid "%s Dashboard" msgstr "" #: views/delete.py:103 #, python-format msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" #: views/detail.py:173 views/edit.py:211 views/form.py:72 msgid "Other Fields" msgstr "" #: views/detail.py:235 #, python-format msgid "%s Detail" msgstr "" #: views/edit.py:253 msgid "Added." msgstr "" #: views/edit.py:255 #, python-format msgid "Changed %s." msgstr "" #: views/edit.py:255 msgid "and" msgstr "" #: views/edit.py:258 msgid "No fields changed." msgstr "" #: views/edit.py:420 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "" #: views/edit.py:425 views/edit.py:520 msgid "You may edit it again below." msgstr "" #: views/edit.py:429 views/edit.py:523 #, python-format msgid "You may add another %s below." msgstr "" #: views/edit.py:471 #, python-format msgid "Change %s" msgstr "" #: views/edit.py:516 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" #: views/form.py:165 #, python-format msgid "The %s was changed successfully." msgstr "" #: views/list.py:199 msgid "Database error" msgstr "" #: views/list.py:373 #, python-format msgid "%s List" msgstr "" #: views/list.py:499 msgid "Sort ASC" msgstr "" #: views/list.py:500 msgid "Sort DESC" msgstr "" #: views/list.py:504 msgid "Cancel Sort" msgstr "" #: views/website.py:16 msgid "Main Dashboard" msgstr "" #: widgets.py:48 msgid "Now" msgstr ""
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="bot"> <xsd:annotation> <xsd:documentation>Root element describing an bot instance</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="memory"> <xsd:annotation> <xsd:documentation>Element describing configuration of memory</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="mind"> <xsd:annotation> <xsd:documentation>Element describing configuration of mind</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="thoughts"> <xsd:annotation> <xsd:documentation>Sequence of thoughts</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="thought" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Element describing a thought</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="mood"> <xsd:annotation> <xsd:documentation>Element describing configuration of mood</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="emotions"> <xsd:annotation> <xsd:documentation>Sequence of emotions</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="emotion" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Element describing an emotion</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="avatar"> <xsd:annotation> <xsd:documentation>Element describing configuration of avatar</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="awareness"> <xsd:annotation> <xsd:documentation>Element describing configuration of awareness</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="senses"> <xsd:annotation> <xsd:documentation>Sequence of senses</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="sense" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Element describing a sense</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="tools"> <xsd:annotation> <xsd:documentation>Sequence of senses</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="tool" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Element describing a tool</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="implementation-class" type="xsd:string"/> <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="property"> <xsd:attribute name="name" type="xsd:string"/> <xsd:attribute name="value" type="xsd:string"/> </xsd:complexType> </xsd:schema>
{ "pile_set_name": "Github" }
version: "3.6" services: flask: build : . volumes : - ../scripts:/scripts ports: - 8080:5000
{ "pile_set_name": "Github" }
#fullForm token general features UF0:%x[0,0] UF1:%x[0,1] UF2:%x[0,2] UF3:%x[0,3] UF4:%x[0,4] UF5:%x[0,5] UF6:%x[0,6] UF7:%x[0,7] UF8:%x[0,8] UF9:%x[0,9] UF10:%x[0,10] UF11:%x[0,11] UF12:%x[0,12] UF13:%x[0,13] UF14:%x[0,14] UF15:%x[0,15] UF16:%x[0,16] UF17:%x[0,17] UF18:%x[0,18] UF19:%x[0,19] UF20:%x[0,20] UF21:%x[0,21] #first token general features U00:%x[0,22] U01:%x[0,23] U02:%x[0,24] U03:%x[0,25] U04:%x[0,26] U05:%x[0,27] U06:%x[0,28] U07:%x[0,29] U08:%x[0,30] U09:%x[0,31] U010:%x[0,32] U011:%x[0,33] U012:%x[0,34] U013:%x[0,35] U014:%x[0,36] U015:%x[0,37] U016:%x[0,38] U017:%x[0,39] U018:%x[0,40] U019:%x[0,41] U020:%x[0,42] #first token keyword features U10:%x[0,43] U11:%x[0,44] U12:%x[0,45] U13:%x[0,46] U14:%x[0,47] U15:%x[0,48] U16:%x[0,49] U17:%x[0,50] U18:%x[0,51] U19:%x[0,52] #second token general features U20:%x[0,53] U21:%x[0,54] U22:%x[0,55] U23:%x[0,56] U24:%x[0,57] U25:%x[0,58] U26:%x[0,59] U27:%x[0,60] U28:%x[0,61] U29:%x[0,62] U210:%x[0,63] U211:%x[0,64] U212:%x[0,65] U213:%x[0,66] U214:%x[0,67] U215:%x[0,68] U216:%x[0,69] U217:%x[0,70] U218:%x[0,71] U219:%x[0,72] U220:%x[0,73] #second last token general features U70:%x[0,74] U71:%x[0,75] U72:%x[0,76] U73:%x[0,77] U74:%x[0,78] U75:%x[0,79] U76:%x[0,80] U77:%x[0,81] U78:%x[0,82] U79:%x[0,83] U710:%x[0,84] U711:%x[0,85] U712:%x[0,86] U713:%x[0,87] U714:%x[0,88] U715:%x[0,89] U716:%x[0,90] U717:%x[0,91] U718:%x[0,92] U719:%x[0,93] U720:%x[0,94] #last token general features U80:%x[0,95] U81:%x[0,96] U82:%x[0,97] U83:%x[0,98] U84:%x[0,99] U85:%x[0,100] U86:%x[0,101] U87:%x[0,102] U88:%x[0,103] U89:%x[0,104] U810:%x[0,105] U811:%x[0,106] U812:%x[0,107] U813:%x[0,108] U814:%x[0,109] U815:%x[0,110] U816:%x[0,111] U817:%x[0,112] U818:%x[0,113] U819:%x[0,114] U820:%x[0,115] #constraint on last token features at -1 relative position UA0:%x[-1,95] UA1:%x[-1,96] UA2:%x[-1,97] UA3:%x[-1,98] UA4:%x[-1,99] UA5:%x[-1,100] UA6:%x[-1,101] UA7:%x[-1,102] UA8:%x[-1,103] UA9:%x[-1,104] UA10:%x[-1,105] UA11:%x[-1,106] UA12:%x[-1,107] UA13:%x[-1,108] UA14:%x[-1,109] UA15:%x[-1,110] UA16:%x[-1,111] UA17:%x[-1,112] UA18:%x[-1,113] UA19:%x[-1,114] UA20:%x[-1,115] #constraint on first token features at 1 relative position UB0:%x[1,22] UB1:%x[1,23] UB2:%x[1,24] UB3:%x[1,25] UB4:%x[1,26] UB5:%x[1,27] UB6:%x[1,28] UB7:%x[1,29] UB8:%x[1,30] UB9:%x[1,31] UB10:%x[1,32] UB11:%x[1,33] UB12:%x[1,34] UB13:%x[1,35] UB14:%x[1,36] UB15:%x[1,37] UB16:%x[1,38] UB17:%x[1,39] UB18:%x[1,40] UB19:%x[1,41] UB20:%x[1,42] # Output B0
{ "pile_set_name": "Github" }
{ "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "idiom" : "universal", "filename" : "[email protected]", "scale" : "2x" }, { "idiom" : "universal", "filename" : "[email protected]", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } }
{ "pile_set_name": "Github" }
 Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26430.15 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Fluent", "src\ResourceManagement\Azure.Fluent\Microsoft.Azure.Management.Fluent.csproj", "{63C863DD-68A6-461D-8BA8-4A1E8EB85D0D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.AppService.Fluent", "src\ResourceManagement\AppService\Microsoft.Azure.Management.AppService.Fluent.csproj", "{CB108B98-864B-4FEA-B3F4-BF85D546FF5A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Cdn.Fluent", "src\ResourceManagement\Cdn\Microsoft.Azure.Management.Cdn.Fluent.csproj", "{2A73AEBF-2AAE-48C5-AB42-35EECF2D95C2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Compute.Fluent", "src\ResourceManagement\Compute\Microsoft.Azure.Management.Compute.Fluent.csproj", "{6E37CD3E-0651-4C1A-91AB-9EB6BDFB5145}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ContainerRegistry.Fluent", "src\ResourceManagement\ContainerRegistry\Microsoft.Azure.Management.ContainerRegistry.Fluent.csproj", "{83885411-39AF-4BC0-82D0-E0FDE250A14A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Dns.Fluent", "src\ResourceManagement\Dns\Microsoft.Azure.Management.Dns.Fluent.csproj", "{48CCF7A7-1F38-4681-9311-E8FCB1A0EB18}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.CosmosDB.Fluent", "src\ResourceManagement\CosmosDB\Microsoft.Azure.Management.CosmosDB.Fluent.csproj", "{1D87885A-C7DB-4DB8-8572-F0DFC53318AE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Graph.RBAC.Fluent", "src\ResourceManagement\Graph.RBAC\Microsoft.Azure.Management.Graph.RBAC.Fluent.csproj", "{CDBF2958-1079-4F67-9E89-A3612D7E3A42}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.KeyVault.Fluent", "src\ResourceManagement\KeyVault\Microsoft.Azure.Management.KeyVault.Fluent.csproj", "{1911A39E-FA13-48F6-A7DD-98B0A7EE973B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.PrivateDns.Fluent", "src\ResourceManagement\PrivateDns\Microsoft.Azure.Management.PrivateDns.Fluent.csproj", "{CEC27EF8-F20B-421D-A429-0EC438E57630}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Redis.Fluent", "src\ResourceManagement\RedisCache\Microsoft.Azure.Management.Redis.Fluent.csproj", "{399E50C9-629E-4FD3-9F19-B7DFA64C9E40}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ResourceManager.Fluent", "src\ResourceManagement\ResourceManager\Microsoft.Azure.Management.ResourceManager.Fluent.csproj", "{E5C3B599-F17E-4BE2-9E67-97246EB14162}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ServiceBus.Fluent", "src\ResourceManagement\ServiceBus\Microsoft.Azure.Management.ServiceBus.Fluent.csproj", "{3B963B22-1122-411A-AF0A-FD7FF560E082}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Sql.Fluent", "src\ResourceManagement\Sql\Microsoft.Azure.Management.Sql.Fluent.csproj", "{00072C5F-599E-4C4F-BC3E-AABAEBD14175}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Storage.Fluent", "src\ResourceManagement\Storage\Microsoft.Azure.Management.Storage.Fluent.csproj", "{C80B079C-3D5C-4D04-B8BF-2894946AD00F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.TrafficManager.Fluent", "src\ResourceManagement\TrafficManager\Microsoft.Azure.Management.TrafficManager.Fluent.csproj", "{33D9AAF3-9BCE-49BC-8D9F-B400C53C934F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Search.Fluent", "src\ResourceManagement\Search\Microsoft.Azure.Management.Search.Fluent.csproj", "{579A3DAC-2247-45E1-B6B3-55A8EA17DF05}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.EventHub.Fluent", "src\ResourceManagement\EventHub\Microsoft.Azure.Management.EventHub.Fluent.csproj", "{6E9CB016-8636-406A-85F8-68A4C8F4E016}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Network.Fluent", "src\ResourceManagement\Network\Microsoft.Azure.Management.Network.Fluent.csproj", "{88481C19-87BA-4746-BFB3-FAB663434EB8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Monitor.Fluent", "src\ResourceManagement\Monitor\Microsoft.Azure.Management.Monitor.Fluent.csproj", "{FE9EBCC4-C26F-4197-A4E0-E6FDDDC4F1F0}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ContainerInstance.Fluent", "src\ResourceManagement\ContainerInstance\Microsoft.Azure.Management.ContainerInstance.Fluent.csproj", "{0F35F73F-C8FD-4F2B-8089-C7205D641EE2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.BatchAI.Fluent", "src\ResourceManagement\BatchAI\Microsoft.Azure.Management.BatchAI.Fluent.csproj", "{AE561553-8DB6-45F8-BD11-2AF917AFB00A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Locks.Fluent", "src\ResourceManagement\Locks\Microsoft.Azure.Management.Locks.Fluent.csproj", "{73E55121-398C-4194-808E-18665C3E3820}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ContainerService.Fluent", "src\ResourceManagement\ContainerService\Microsoft.Azure.Management.ContainerService.Fluent.csproj", "{4EE8090D-E266-4746-88DF-630FC2D4045B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Msi.Fluent", "src\ResourceManagement\Msi\Microsoft.Azure.Management.Msi.Fluent.csproj", "{9ECDF976-7806-4DD0-A781-2F8B5EB67054}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {63C863DD-68A6-461D-8BA8-4A1E8EB85D0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {63C863DD-68A6-461D-8BA8-4A1E8EB85D0D}.Debug|Any CPU.Build.0 = Debug|Any CPU {63C863DD-68A6-461D-8BA8-4A1E8EB85D0D}.Release|Any CPU.ActiveCfg = Release|Any CPU {63C863DD-68A6-461D-8BA8-4A1E8EB85D0D}.Release|Any CPU.Build.0 = Release|Any CPU {CB108B98-864B-4FEA-B3F4-BF85D546FF5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB108B98-864B-4FEA-B3F4-BF85D546FF5A}.Debug|Any CPU.Build.0 = Debug|Any CPU {CB108B98-864B-4FEA-B3F4-BF85D546FF5A}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB108B98-864B-4FEA-B3F4-BF85D546FF5A}.Release|Any CPU.Build.0 = Release|Any CPU {2A73AEBF-2AAE-48C5-AB42-35EECF2D95C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A73AEBF-2AAE-48C5-AB42-35EECF2D95C2}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A73AEBF-2AAE-48C5-AB42-35EECF2D95C2}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A73AEBF-2AAE-48C5-AB42-35EECF2D95C2}.Release|Any CPU.Build.0 = Release|Any CPU {6E37CD3E-0651-4C1A-91AB-9EB6BDFB5145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E37CD3E-0651-4C1A-91AB-9EB6BDFB5145}.Debug|Any CPU.Build.0 = Debug|Any CPU {6E37CD3E-0651-4C1A-91AB-9EB6BDFB5145}.Release|Any CPU.ActiveCfg = Release|Any CPU {6E37CD3E-0651-4C1A-91AB-9EB6BDFB5145}.Release|Any CPU.Build.0 = Release|Any CPU {83885411-39AF-4BC0-82D0-E0FDE250A14A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {83885411-39AF-4BC0-82D0-E0FDE250A14A}.Debug|Any CPU.Build.0 = Debug|Any CPU {83885411-39AF-4BC0-82D0-E0FDE250A14A}.Release|Any CPU.ActiveCfg = Release|Any CPU {83885411-39AF-4BC0-82D0-E0FDE250A14A}.Release|Any CPU.Build.0 = Release|Any CPU {48CCF7A7-1F38-4681-9311-E8FCB1A0EB18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {48CCF7A7-1F38-4681-9311-E8FCB1A0EB18}.Debug|Any CPU.Build.0 = Debug|Any CPU {48CCF7A7-1F38-4681-9311-E8FCB1A0EB18}.Release|Any CPU.ActiveCfg = Release|Any CPU {48CCF7A7-1F38-4681-9311-E8FCB1A0EB18}.Release|Any CPU.Build.0 = Release|Any CPU {CEC27EF8-F20B-421D-A429-0EC438E57630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CEC27EF8-F20B-421D-A429-0EC438E57630}.Debug|Any CPU.Build.0 = Debug|Any CPU {CEC27EF8-F20B-421D-A429-0EC438E57630}.Release|Any CPU.ActiveCfg = Release|Any CPU {CEC27EF8-F20B-421D-A429-0EC438E57630}.Release|Any CPU.Build.0 = Release|Any CPU {1D87885A-C7DB-4DB8-8572-F0DFC53318AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1D87885A-C7DB-4DB8-8572-F0DFC53318AE}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D87885A-C7DB-4DB8-8572-F0DFC53318AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {1D87885A-C7DB-4DB8-8572-F0DFC53318AE}.Release|Any CPU.Build.0 = Release|Any CPU {CDBF2958-1079-4F67-9E89-A3612D7E3A42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CDBF2958-1079-4F67-9E89-A3612D7E3A42}.Debug|Any CPU.Build.0 = Debug|Any CPU {CDBF2958-1079-4F67-9E89-A3612D7E3A42}.Release|Any CPU.ActiveCfg = Release|Any CPU {CDBF2958-1079-4F67-9E89-A3612D7E3A42}.Release|Any CPU.Build.0 = Release|Any CPU {1911A39E-FA13-48F6-A7DD-98B0A7EE973B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1911A39E-FA13-48F6-A7DD-98B0A7EE973B}.Debug|Any CPU.Build.0 = Debug|Any CPU {1911A39E-FA13-48F6-A7DD-98B0A7EE973B}.Release|Any CPU.ActiveCfg = Release|Any CPU {1911A39E-FA13-48F6-A7DD-98B0A7EE973B}.Release|Any CPU.Build.0 = Release|Any CPU {399E50C9-629E-4FD3-9F19-B7DFA64C9E40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {399E50C9-629E-4FD3-9F19-B7DFA64C9E40}.Debug|Any CPU.Build.0 = Debug|Any CPU {399E50C9-629E-4FD3-9F19-B7DFA64C9E40}.Release|Any CPU.ActiveCfg = Release|Any CPU {399E50C9-629E-4FD3-9F19-B7DFA64C9E40}.Release|Any CPU.Build.0 = Release|Any CPU {E5C3B599-F17E-4BE2-9E67-97246EB14162}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E5C3B599-F17E-4BE2-9E67-97246EB14162}.Debug|Any CPU.Build.0 = Debug|Any CPU {E5C3B599-F17E-4BE2-9E67-97246EB14162}.Release|Any CPU.ActiveCfg = Release|Any CPU {E5C3B599-F17E-4BE2-9E67-97246EB14162}.Release|Any CPU.Build.0 = Release|Any CPU {3B963B22-1122-411A-AF0A-FD7FF560E082}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3B963B22-1122-411A-AF0A-FD7FF560E082}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B963B22-1122-411A-AF0A-FD7FF560E082}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B963B22-1122-411A-AF0A-FD7FF560E082}.Release|Any CPU.Build.0 = Release|Any CPU {00072C5F-599E-4C4F-BC3E-AABAEBD14175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {00072C5F-599E-4C4F-BC3E-AABAEBD14175}.Debug|Any CPU.Build.0 = Debug|Any CPU {00072C5F-599E-4C4F-BC3E-AABAEBD14175}.Release|Any CPU.ActiveCfg = Release|Any CPU {00072C5F-599E-4C4F-BC3E-AABAEBD14175}.Release|Any CPU.Build.0 = Release|Any CPU {C80B079C-3D5C-4D04-B8BF-2894946AD00F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C80B079C-3D5C-4D04-B8BF-2894946AD00F}.Debug|Any CPU.Build.0 = Debug|Any CPU {C80B079C-3D5C-4D04-B8BF-2894946AD00F}.Release|Any CPU.ActiveCfg = Release|Any CPU {C80B079C-3D5C-4D04-B8BF-2894946AD00F}.Release|Any CPU.Build.0 = Release|Any CPU {33D9AAF3-9BCE-49BC-8D9F-B400C53C934F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {33D9AAF3-9BCE-49BC-8D9F-B400C53C934F}.Debug|Any CPU.Build.0 = Debug|Any CPU {33D9AAF3-9BCE-49BC-8D9F-B400C53C934F}.Release|Any CPU.ActiveCfg = Release|Any CPU {33D9AAF3-9BCE-49BC-8D9F-B400C53C934F}.Release|Any CPU.Build.0 = Release|Any CPU {579A3DAC-2247-45E1-B6B3-55A8EA17DF05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {579A3DAC-2247-45E1-B6B3-55A8EA17DF05}.Debug|Any CPU.Build.0 = Debug|Any CPU {579A3DAC-2247-45E1-B6B3-55A8EA17DF05}.Release|Any CPU.ActiveCfg = Release|Any CPU {579A3DAC-2247-45E1-B6B3-55A8EA17DF05}.Release|Any CPU.Build.0 = Release|Any CPU {6E9CB016-8636-406A-85F8-68A4C8F4E016}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E9CB016-8636-406A-85F8-68A4C8F4E016}.Debug|Any CPU.Build.0 = Debug|Any CPU {6E9CB016-8636-406A-85F8-68A4C8F4E016}.Release|Any CPU.ActiveCfg = Release|Any CPU {6E9CB016-8636-406A-85F8-68A4C8F4E016}.Release|Any CPU.Build.0 = Release|Any CPU {88481C19-87BA-4746-BFB3-FAB663434EB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {88481C19-87BA-4746-BFB3-FAB663434EB8}.Debug|Any CPU.Build.0 = Debug|Any CPU {88481C19-87BA-4746-BFB3-FAB663434EB8}.Release|Any CPU.ActiveCfg = Release|Any CPU {88481C19-87BA-4746-BFB3-FAB663434EB8}.Release|Any CPU.Build.0 = Release|Any CPU {FE9EBCC4-C26F-4197-A4E0-E6FDDDC4F1F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FE9EBCC4-C26F-4197-A4E0-E6FDDDC4F1F0}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE9EBCC4-C26F-4197-A4E0-E6FDDDC4F1F0}.Release|Any CPU.ActiveCfg = Release|Any CPU {FE9EBCC4-C26F-4197-A4E0-E6FDDDC4F1F0}.Release|Any CPU.Build.0 = Release|Any CPU {0F35F73F-C8FD-4F2B-8089-C7205D641EE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0F35F73F-C8FD-4F2B-8089-C7205D641EE2}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F35F73F-C8FD-4F2B-8089-C7205D641EE2}.Release|Any CPU.ActiveCfg = Release|Any CPU {0F35F73F-C8FD-4F2B-8089-C7205D641EE2}.Release|Any CPU.Build.0 = Release|Any CPU {AE561553-8DB6-45F8-BD11-2AF917AFB00A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AE561553-8DB6-45F8-BD11-2AF917AFB00A}.Debug|Any CPU.Build.0 = Debug|Any CPU {AE561553-8DB6-45F8-BD11-2AF917AFB00A}.Release|Any CPU.ActiveCfg = Release|Any CPU {AE561553-8DB6-45F8-BD11-2AF917AFB00A}.Release|Any CPU.Build.0 = Release|Any CPU {73E55121-398C-4194-808E-18665C3E3820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {73E55121-398C-4194-808E-18665C3E3820}.Debug|Any CPU.Build.0 = Debug|Any CPU {73E55121-398C-4194-808E-18665C3E3820}.Release|Any CPU.ActiveCfg = Release|Any CPU {73E55121-398C-4194-808E-18665C3E3820}.Release|Any CPU.Build.0 = Release|Any CPU {4EE8090D-E266-4746-88DF-630FC2D4045B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4EE8090D-E266-4746-88DF-630FC2D4045B}.Debug|Any CPU.Build.0 = Debug|Any CPU {4EE8090D-E266-4746-88DF-630FC2D4045B}.Release|Any CPU.ActiveCfg = Release|Any CPU {4EE8090D-E266-4746-88DF-630FC2D4045B}.Release|Any CPU.Build.0 = Release|Any CPU {9ECDF976-7806-4DD0-A781-2F8B5EB67054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9ECDF976-7806-4DD0-A781-2F8B5EB67054}.Debug|Any CPU.Build.0 = Debug|Any CPU {9ECDF976-7806-4DD0-A781-2F8B5EB67054}.Release|Any CPU.ActiveCfg = Release|Any CPU {9ECDF976-7806-4DD0-A781-2F8B5EB67054}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CD321CC7-8204-43CD-B838-3806887A40E7} EndGlobalSection EndGlobal
{ "pile_set_name": "Github" }
require('./_typed-array')('Int32', 4, function (init) { return function Int32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; });
{ "pile_set_name": "Github" }
ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = function(textClass) { if (!textClass) textClass = "text"; this.$rules = { "start" : [ { token : "comment", regex : "%.*$" }, { token : textClass, // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", next : "nospell" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])}]" }, { token : textClass, regex : "\\s+" } ], "nospell" : [ { token : "comment", regex : "%.*$", next : "start" }, { token : "nospell." + textClass, // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", next : "start" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])]" }, { token : "paren.keyword.operator", regex : "}", next : "start" }, { token : "nospell." + textClass, regex : "\\s+" }, { token : "nospell." + textClass, regex : "\\w+" } ] }; }; oop.inherits(TexHighlightRules, TextHighlightRules); exports.TexHighlightRules = TexHighlightRules; }); ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Mode = function(suppressHighlighting) { if (suppressHighlighting) this.HighlightRules = TextHighlightRules; else this.HighlightRules = TexHighlightRules; this.$outdent = new MatchingBraceOutdent(); }; oop.inherits(Mode, TextMode); (function() { this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.allowAutoInsert = function() { return false; }; this.$id = "ace/mode/tex"; }).call(Mode.prototype); exports.Mode = Mode; });
{ "pile_set_name": "Github" }
/** * TestCase * * Embryonic unit test support class. * Copyright (c) 2007 Henri Torgemane * * See LICENSE.txt for full license information. */ package com.hurlant.crypto.tests { public class TestCase { public var harness:ITestHarness; public function TestCase(h:ITestHarness, title:String) { harness = h; harness.beginTestCase(title); } public function assert(msg:String, value:Boolean):void { if (value) { // TestHarness.print("+ ",msg); return; } throw new Error("Test Failure:"+msg); } public function runTest(f:Function, title:String):void { harness.beginTest(title); try { f(); } catch (e:Error) { trace("EXCEPTION THROWN: "+e); trace(e.getStackTrace()); harness.failTest(e.toString()); return; } harness.passTest(); } } }
{ "pile_set_name": "Github" }
// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o // RUN: %test_debuginfo %s %t.o // Radar 9440721 // If debug info for my_number() is emitted outside function foo's scope // then a debugger may not be able to handle it. At least one version of // gdb crashes in such cases. // DEBUGGER: ptype foo // CHECK: int (void) int foo() { struct Local { static int my_number() { return 42; } }; int i = 0; i = Local::my_number(); return i + 1; }
{ "pile_set_name": "Github" }
<?php /** * Copyright (c) Enalean, 2016-Present. All Rights Reserved. * * This file is a part of Tuleap. * * Tuleap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Tuleap 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 Tuleap. If not, see <http://www.gnu.org/licenses/>. */ namespace Tuleap\User\Admin; use PFUser; class UserListSearchFieldsPresenter { private static $ANY = 'ANY'; public $name; public $name_label; public $status_label; public $status_values; public $search; public function __construct($name, $status_values) { $this->name = $name; $this->name_label = $GLOBALS['Language']->getText('admin_userlist', 'filter_name'); $this->status_label = $GLOBALS['Language']->getText("admin_userlist", "status"); $this->status_values = $this->getListOfStatusValuePresenter($status_values); $this->title = $GLOBALS['Language']->getText('global', 'search_title'); $this->search = $GLOBALS['Language']->getText('global', 'btn_search'); } private function getListOfStatusValuePresenter($status_values) { return [ $this->getStatusValuePresenter(self::$ANY, $status_values, $GLOBALS['Language']->getText("admin_userlist", "any")), $this->getStatusValuePresenter(PFUser::STATUS_ACTIVE, $status_values, $GLOBALS['Language']->getText("admin_userlist", "active")), $this->getStatusValuePresenter(PFUser::STATUS_RESTRICTED, $status_values, $GLOBALS['Language']->getText("admin_userlist", "restricted")), $this->getStatusValuePresenter(PFUser::STATUS_DELETED, $status_values, $GLOBALS['Language']->getText("admin_userlist", "deleted")), $this->getStatusValuePresenter(PFUser::STATUS_SUSPENDED, $status_values, $GLOBALS['Language']->getText("admin_userlist", "suspended")), $this->getStatusValuePresenter(PFUser::STATUS_PENDING, $status_values, $GLOBALS['Language']->getText("admin_userlist", "pending")), $this->getStatusValuePresenter(PFUser::STATUS_VALIDATED, $status_values, $GLOBALS['Language']->getText("admin_userlist", "validated")), $this->getStatusValuePresenter(PFUser::STATUS_VALIDATED_RESTRICTED, $status_values, $GLOBALS['Language']->getText("admin_userlist", "validated_restricted")) ]; } private function getStatusValuePresenter($status, $status_values, $label) { $selected = false; if ($status === self::$ANY) { $selected = count($status_values) === 0; } else { $selected = in_array($status, $status_values); } return [ 'value' => $status, 'is_selected' => $selected, 'label' => $label ]; } }
{ "pile_set_name": "Github" }
ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}); (function() { ace.require(["ace/mode/properties"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })();
{ "pile_set_name": "Github" }
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./app.ts"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./app.ts": /*!****************!*\ !*** ./app.ts ***! \****************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), /***/ "./lib/index.ts": /*!**********************!*\ !*** ./lib/index.ts ***! \**********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) /******/ });
{ "pile_set_name": "Github" }
#include <cassert> #include <iomanip> #include <iostream> #include <sstream> #include <lithium_json.hh> using namespace li; struct R { void append(uint8_t c) { s.append(1, c); } std::string s; }; void test_ascii(uint16_t c) { R ref; ref.append('"'); switch (c) { case '"': ref.append('\\'); ref.append('"'); break; case '\\': ref.append('\\'); ref.append('\\'); break; // case '/': ref.append('/'); break; // Not escaped. case '\n': ref.append('\\'); ref.append('n'); break; case '\r': ref.append('\\'); ref.append('r'); break; case '\t': ref.append('\\'); ref.append('t'); break; case '\b': ref.append('\\'); ref.append('b'); break; case '\f': ref.append('\\'); ref.append('f'); break; default: ref.append(char(c)); } ref.append('"'); { std::string out; std::stringstream stream; stream << std::string(1, char(c)); // c should convert to "c" auto err = utf8_to_json(stream, out); assert(err == 0); assert(out == ref.s); // and convert back to c without quote. stream.clear(); stream.str(ref.s); out = ""; err = json_to_utf8(stream, out); assert(err == 0); assert(out[0] == c and out.size() == 1); } // unicode c (\uXXXX) should convert to "c" { std::string out; std::stringstream stream; stream << "\"\\u" << std::hex << std::setfill('0') << std::setw(4) << c << '"'; auto err = json_to_utf8(stream, out); assert(err == 0); assert(out[0] == c and out.size() == 1); } } std::string json_to_utf8(std::string s) { std::string out; std::stringstream stream; stream << s; // c should convert to "c" // auto err = li::json_to_utf8(stream, out); auto err = json_to_utf8(stream, out); // if (err.code) // std::cerr << err.what << std::endl; assert(err == 0); return out; } std::string utf8_to_json(std::string s) { std::string out; std::stringstream stream; stream << s; // c should convert to "c" auto err = utf8_to_json(stream, out); // if (err) // std::cerr << err.what << std::endl; assert(err == 0); return out; } void test_BMP(uint16_t c) // Basic Multilingual Plane U+0000 ... U+FFFF { // Convect c to "\uXXXX" // Convert it to utf8 li::json_to_utf8 // Convert it back to "\uXXXX" with li::utf8_to_json and check the result. std::stringstream stream; stream << "\"\\u" << std::hex << std::setfill('0') << std::setw(4) << std::uppercase << c << '"'; std::string ref = stream.str(); auto utf8 = json_to_utf8(ref); if (c >= 0x0080 and c <= 0x07FF) assert(utf8.size() == 2); else if (c >= 0x0800 and c <= 0xFFFF) assert(utf8.size() == 3); assert(utf8_to_json(utf8) == ref); } void test_SP(uint32_t c) // Supplementary Planes 0x10000 ... 0x10FFFF { c -= 0x10000; uint16_t H = (c >> 10) + 0xD800; uint16_t L = (c & 0x3FF) + 0xDC00; // Convect c to "\uXXXX" // Convert it to utf8 li::json_to_utf8 // Convert it back to "\uXXXX" with li::utf8_to_json and check the result. std::stringstream stream; stream << "\"\\u" << std::hex << std::setfill('0') << std::setw(4) << std::uppercase << H << "\\u" << std::hex << std::setfill('0') << std::setw(4) << std::uppercase << L << '"'; std::string ref = stream.str(); auto utf8 = json_to_utf8(ref); assert(utf8.size() == 4); assert(utf8_to_json(utf8) == ref); } int main() { { assert(utf8_to_json("\xF0\x9D\x84\x9E") == "\"\\uD834\\uDD1E\""); auto r = json_to_utf8("\"\\uD834\\uDD1E\""); assert(json_to_utf8("\"\\uD834\\uDD1E\"") == "\xF0\x9D\x84\x9E"); } { // Mix 7bits, 11bits, 16bits and 20bits (surrogate pair) codepoints. std::string out; std::istringstream stream("abc\xC2\xA2\xE2\x82\xAC\xF0\x90\x80\x81"); auto err = utf8_to_json(stream, out); // FIXNE assert(out == R"("abc\u00A2\u20AC\uD800\uDC01")"); } { // Empty string. std::string out; std::istringstream stream(""); auto err = utf8_to_json(stream, out); assert(out == "\"\""); } { // Empty string. std::string out; std::istringstream stream(R"("")"); auto err = json_to_utf8(stream, out); assert(out == ""); } // lowercase in unicode sequences. { std::string out; std::istringstream stream(R"("\u000a")"); auto err = json_to_utf8(stream, out); assert(err == 0); assert(out == "\x0a"); } // uppercase in unicode sequences. { std::string out; std::istringstream stream(R"("\u000A")"); auto err = json_to_utf8(stream, out); assert(err == 0); assert(out == "\x0a"); } { // Test all characters. for (uint32_t c = 1; c <= 0x10FFFF; c++) { if (c < 0x0080) test_ascii(c); else if (c >= 0x0080 and c <= 0xFFFF and (c < 0xD800 or c > 0xDBFF)) test_BMP(c); else if (c >= 0x10000 and c <= 0x10FFFF) test_SP(c); } } }
{ "pile_set_name": "Github" }
{ "CVE_data_meta": { "ASSIGNER": "[email protected]", "ID": "CVE-2008-1399", "STATE": "PUBLIC" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "n/a", "version": { "version_data": [ { "version_value": "n/a" } ] } } ] }, "vendor_name": "n/a" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "Multiple cross-site scripting (XSS) vulnerabilities in index.php in Clansphere 2008 allow remote attackers to inject arbitrary web script or HTML via unspecified vectors. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "n/a" } ] } ] }, "references": { "reference_data": [ { "name": "clansphere-index-xss(41190)", "refsource": "XF", "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/41190" }, { "name": "28224", "refsource": "BID", "url": "http://www.securityfocus.com/bid/28224" }, { "name": "29534", "refsource": "SECUNIA", "url": "http://secunia.com/advisories/29534" } ] } }
{ "pile_set_name": "Github" }
@echo off SET EXPECT_OUTPUT= SET WAIT= SET PSARGS=%* SET ELECTRON_ENABLE_LOGGING= SET ATOM_ADD= SET ATOM_NEW_WINDOW= FOR %%a IN (%*) DO ( IF /I "%%a"=="-f" SET EXPECT_OUTPUT=YES IF /I "%%a"=="--foreground" SET EXPECT_OUTPUT=YES IF /I "%%a"=="-h" SET EXPECT_OUTPUT=YES IF /I "%%a"=="--help" SET EXPECT_OUTPUT=YES IF /I "%%a"=="-t" SET EXPECT_OUTPUT=YES IF /I "%%a"=="--test" SET EXPECT_OUTPUT=YES IF /I "%%a"=="--benchmark" SET EXPECT_OUTPUT=YES IF /I "%%a"=="--benchmark-test" SET EXPECT_OUTPUT=YES IF /I "%%a"=="-v" SET EXPECT_OUTPUT=YES IF /I "%%a"=="--version" SET EXPECT_OUTPUT=YES IF /I "%%a"=="--enable-electron-logging" SET ELECTRON_ENABLE_LOGGING=YES IF /I "%%a"=="-a" SET ATOM_ADD=YES IF /I "%%a"=="--add" SET ATOM_ADD=YES IF /I "%%a"=="-n" SET ATOM_NEW_WINDOW=YES IF /I "%%a"=="--new-window" SET ATOM_NEW_WINDOW=YES IF /I "%%a"=="-w" ( SET EXPECT_OUTPUT=YES SET WAIT=YES ) IF /I "%%a"=="--wait" ( SET EXPECT_OUTPUT=YES SET WAIT=YES ) ) IF "%ATOM_ADD%"=="YES" ( IF "%ATOM_NEW_WINDOW%"=="YES" ( SET EXPECT_OUTPUT=YES ) ) IF "%EXPECT_OUTPUT%"=="YES" ( IF "%WAIT%"=="YES" ( powershell -noexit "Start-Process -FilePath \"%~dp0\..\..\<%= atomExeName %>\" -ArgumentList \"--pid=$pid $env:PSARGS\" ; wait-event" exit 0 ) ELSE ( "%~dp0\..\..\<%= atomExeName %>" %* ) ) ELSE ( "%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" "<%= atomExeName %>" %* )
{ "pile_set_name": "Github" }
/* Copyright 2020 Rancher Labs. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by main. DO NOT EDIT. package fake import ( v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" ) // FakeVirtualServices implements VirtualServiceInterface type FakeVirtualServices struct { Fake *FakeNetworkingV1alpha3 ns string } var virtualservicesResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "virtualservices"} var virtualservicesKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "VirtualService"} // Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any. func (c *FakeVirtualServices) Get(name string, options v1.GetOptions) (result *v1alpha3.VirtualService, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{}) if obj == nil { return nil, err } return obj.(*v1alpha3.VirtualService), err } // List takes label and field selectors, and returns the list of VirtualServices that match those selectors. func (c *FakeVirtualServices) List(opts v1.ListOptions) (result *v1alpha3.VirtualServiceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(virtualservicesResource, virtualservicesKind, c.ns, opts), &v1alpha3.VirtualServiceList{}) if obj == nil { return nil, err } label, _, _ := testing.ExtractFromListOptions(opts) if label == nil { label = labels.Everything() } list := &v1alpha3.VirtualServiceList{ListMeta: obj.(*v1alpha3.VirtualServiceList).ListMeta} for _, item := range obj.(*v1alpha3.VirtualServiceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } } return list, err } // Watch returns a watch.Interface that watches the requested virtualServices. func (c *FakeVirtualServices) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(virtualservicesResource, c.ns, opts)) } // Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any. func (c *FakeVirtualServices) Create(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{}) if obj == nil { return nil, err } return obj.(*v1alpha3.VirtualService), err } // Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any. func (c *FakeVirtualServices) Update(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{}) if obj == nil { return nil, err } return obj.(*v1alpha3.VirtualService), err } // Delete takes name of the virtualService and deletes it. Returns an error if one occurs. func (c *FakeVirtualServices) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{}) return err } // DeleteCollection deletes a collection of objects. func (c *FakeVirtualServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(virtualservicesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1alpha3.VirtualServiceList{}) return err } // Patch applies the patch and returns the patched virtualService. func (c *FakeVirtualServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(virtualservicesResource, c.ns, name, pt, data, subresources...), &v1alpha3.VirtualService{}) if obj == nil { return nil, err } return obj.(*v1alpha3.VirtualService), err }
{ "pile_set_name": "Github" }
{ "ammo": { "description": "returns amount of ammo held for currently selected weapon", "teamplay-restricted": true, "type": "integer" }, "armor": { "description": "returns current armor value", "teamplay-restricted": true, "type": "integer" }, "armortype": { "description": "returns current armor type", "related-cvars": [ "tp_name_armortype_ga", "tp_name_armortype_ya", "tp_name_armortype_ra", "tp_name_armortype_none" ], "teamplay-restricted": true, "type": "string" }, "bestammo": { "description": "returns ammo held for the 'best' weapon", "related-cvars": [ "tp_weapon_order" ], "teamplay-restricted": true, "type": "integer" }, "bestweapon": { "description": "returns name of best weapon in inventory", "related-cvars": [ "tp_weapon_order", "tp_name_sg", "tp_name_ssg", "tp_name_ng", "tp_name_sng", "tp_name_gl", "tp_name_rl", "tp_name_lg" ], "teamplay-restricted": true, "type": "string" }, "cam_angles": { "description": "returns current camera angles, in format that can be passed to /cam_angles command.", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "string" }, "cam_angles_pitch": { "description": "returns current camera pitch (vertical angle).", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "float" }, "cam_angles_roll": { "description": "returns current camera roll (not used).", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "float" }, "cam_angles_yaw": { "description": "returns current camera yaw (horizontal angle).", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "float" }, "cam_pos": { "description": "returns current camera position, in format that can be passed to /cam_pos command.", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "string" }, "cam_pos_x": { "description": "returns one component of current camera position.", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "float" }, "cam_pos_y": { "description": "returns one component of current camera position.", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "float" }, "cam_pos_z": { "description": "returns one component of current camera position.", "flags": [ "spectator-only" ], "teamplay-restricted": true, "type": "float" }, "cells": { "description": "returns number of cells held, regardless of weapon selected", "teamplay-restricted": true, "type": "integer" }, "colored_armor": { "description": "returns $armor, surrounded by color codes so it is displayed in &c0b0red&r, &cff0yellow&r, &e00green&r or &cfffwhite&r", "teamplay-restricted": true, "type": "string" }, "colored_powerups": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "colored_short_powerups": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "conheight": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "connectiontype": { "description": "returns the current type of the connection", "enum": [ { "description": "client is disconnected from the server", "value": "disconnected" }, { "description": "client is connected as a spectator", "value": "spectator" }, { "description": "client is connected as a player", "value": "player" } ], "teamplay-restricted": true, "type": "string" }, "conwidth": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "date": { "description": "returns the current date in the format <day>.<month>.<year>", "teamplay-restricted": true, "type": "string" }, "deathloc": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "demolength": { "description": "returns the expected length of the current demo, in seconds", "teamplay-restricted": true, "type": "integer" }, "demoname": { "description": "returns the name of the current demo, minus extension", "teamplay-restricted": true, "type": "string" }, "demoplayback": { "description": "returns whether or not the client is current watching a demo", "teamplay-restricted": true, "type": "boolean" }, "demotime": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "droploc": { "description": "returns the name of the location where the last backpack was dropped by the current player.", "teamplay-restricted": true, "type": "string" }, "droptime": { "description": "returns the number of seconds since the last backpack was dropped by the current player.", "teamplay-restricted": true, "type": "integer" }, "gamedir": { "description": "returns the current gamedir, which is often set when a server is running a mod.\ne.g: 'fortress' for Team Fortress mods", "teamplay-restricted": true, "type": "string" }, "health": { "description": "the current player's health (0 - 250)", "teamplay-restricted": true }, "lastip": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "lastloc": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "lastpowerup": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "latency": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "ledpoint": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "ledstatus": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "location": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "matchname": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "matchstatus": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "matchtype": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "mp3_volume": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "mp3info": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "nails": { "description": "returns number of nails held, regardless of weapon selected", "teamplay-restricted": true, "type": "integer" }, "need": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "ping": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "point": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "pointatloc": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "pointloc": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "powerups": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "qt": { "description": "returns \" - useful to clear cvars in scripts", "teamplay-restricted": true }, "rand": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "rockets": { "description": "returns number of rockets held, regardless of weapon selected", "teamplay-restricted": true, "type": "integer" }, "serverip": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "shells": { "description": "returns number of shells held, regardless of weapon selected", "teamplay-restricted": true, "type": "integer" }, "tf_skin": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "time": { "description": "returns the local time in the format <hours>:<minutes>", "teamplay-restricted": true, "type": "string" }, "took": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "tookatloc": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "tookloc": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "triggermatch": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "weapon": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "weaponnum": { "flags": [ "incomplete" ], "teamplay-restricted": true }, "weapons": { "flags": [ "incomplete" ], "teamplay-restricted": true } }
{ "pile_set_name": "Github" }
/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'pagebreak', 'fa', { alt: 'شکستن صفحه', toolbar: 'گنجاندن شکستگی پایان برگه' } );
{ "pile_set_name": "Github" }
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled correctly. """ import TestGyp import re import subprocess import sys if sys.platform == 'darwin': test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) CHDIR = 'rpath' test.run_gyp('test.gyp', chdir=CHDIR) test.build('test.gyp', test.ALL, chdir=CHDIR) def GetRpaths(p): p = test.built_file_path(p, chdir=CHDIR) r = re.compile(r'cmd LC_RPATH.*?path (.*?) \(offset \d+\)', re.DOTALL) proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE) o = proc.communicate()[0] assert not proc.returncode return r.findall(o) if GetRpaths('libdefault_rpath.dylib') != []: test.fail_test() if GetRpaths('libexplicit_rpath.dylib') != ['@executable_path/.']: test.fail_test() if (GetRpaths('libexplicit_rpaths_escaped.dylib') != ['First rpath', 'Second rpath']): test.fail_test() if GetRpaths('My Framework.framework/My Framework') != ['@loader_path/.']: test.fail_test() if GetRpaths('executable') != ['@executable_path/.']: test.fail_test() test.pass_test()
{ "pile_set_name": "Github" }
package toml_test import ( "bytes" "strings" "testing" "time" "github.com/BurntSushi/toml" "github.com/influxdata/influxdb/cmd/influxd/run" itoml "github.com/influxdata/influxdb/toml" ) // Ensure that megabyte sizes can be parsed. func TestSize_UnmarshalText_MB(t *testing.T) { var s itoml.Size if err := s.UnmarshalText([]byte("200m")); err != nil { t.Fatalf("unexpected error: %s", err) } else if s != 200*(1<<20) { t.Fatalf("unexpected size: %d", s) } } // Ensure that gigabyte sizes can be parsed. func TestSize_UnmarshalText_GB(t *testing.T) { var s itoml.Size if err := s.UnmarshalText([]byte("1g")); err != nil { t.Fatalf("unexpected error: %s", err) } else if s != 1073741824 { t.Fatalf("unexpected size: %d", s) } } func TestConfig_Encode(t *testing.T) { var c run.Config c.Coordinator.WriteTimeout = itoml.Duration(time.Minute) buf := new(bytes.Buffer) if err := toml.NewEncoder(buf).Encode(&c); err != nil { t.Fatal("Failed to encode: ", err) } got, search := buf.String(), `write-timeout = "1m0s"` if !strings.Contains(got, search) { t.Fatalf("Encoding config failed.\nfailed to find %s in:\n%s\n", search, got) } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <title>EmptyState Struct Reference</title> <link rel="stylesheet" type="text/css" href="../css/jazzy.css" /> <link rel="stylesheet" type="text/css" href="../css/highlight.css" /> <meta charset='utf-8'> <script src="../js/jquery.min.js" defer></script> <script src="../js/jazzy.js" defer></script> </head> <body> <a name="//apple_ref/swift/Struct/EmptyState" class="dashAnchor"></a> <a title="EmptyState Struct Reference"></a> <header> <div class="content-wrapper"> <p><a href="../index.html">Katana Docs</a> (100% documented)</p> <p class="header-right"><a href="https://github.com/BendingSpoons/katana-swift"><img src="../img/gh.png"/>View on GitHub</a></p> </div> </header> <div class="content-wrapper"> <p id="breadcrumbs"> <a href="../index.html">Katana Reference</a> <img id="carat" src="../img/carat.png" /> EmptyState Struct Reference </p> </div> <div class="content-wrapper"> <nav class="sidebar"> <ul class="nav-groups"> <li class="nav-group-name"> <a href="../Classes.html">Classes</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="../Classes/Node.html">Node</a> </li> <li class="nav-group-task"> <a href="../Classes/PlasticNode.html">PlasticNode</a> </li> <li class="nav-group-task"> <a href="../Classes/PlasticView.html">PlasticView</a> </li> <li class="nav-group-task"> <a href="../Classes/Renderer.html">Renderer</a> </li> <li class="nav-group-task"> <a href="../Classes/Store.html">Store</a> </li> <li class="nav-group-task"> <a href="../Classes/ViewsContainer.html">ViewsContainer</a> </li> </ul> </li> <li class="nav-group-name"> <a href="../Enums.html">Enums</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="../Enums/AnimationType.html">AnimationType</a> </li> <li class="nav-group-task"> <a href="../Enums/AsyncActionState.html">AsyncActionState</a> </li> <li class="nav-group-task"> <a href="../Enums.html#/s:O6Katana9EmptyKeys">EmptyKeys</a> </li> </ul> </li> <li class="nav-group-name"> <a href="../Extensions.html">Extensions</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="../Extensions/Array.html">Array</a> </li> <li class="nav-group-task"> <a href="../Extensions/CGSize.html">CGSize</a> </li> <li class="nav-group-task"> <a href="../Extensions/UIView.html">UIView</a> </li> </ul> </li> <li class="nav-group-name"> <a href="../Protocols.html">Protocols</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="../Protocols/Action.html">Action</a> </li> <li class="nav-group-task"> <a href="../Protocols/ActionWithSideEffect.html">ActionWithSideEffect</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyAsyncAction.html">AnyAsyncAction</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyConnectedNodeDescription.html">AnyConnectedNodeDescription</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyNode.html">AnyNode</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyNodeDescription.html">AnyNodeDescription</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyNodeDescriptionProps.html">AnyNodeDescriptionProps</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyNodeDescriptionWithChildren.html">AnyNodeDescriptionWithChildren</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyPlasticNodeDescription.html">AnyPlasticNodeDescription</a> </li> <li class="nav-group-task"> <a href="../Protocols/AnyStore.html">AnyStore</a> </li> <li class="nav-group-task"> <a href="../Protocols/AsyncAction.html">AsyncAction</a> </li> <li class="nav-group-task"> <a href="../Protocols/Childrenable.html">Childrenable</a> </li> <li class="nav-group-task"> <a href="../Protocols/ConnectedNodeDescription.html">ConnectedNodeDescription</a> </li> <li class="nav-group-task"> <a href="../Protocols/LinkeableAction.html">LinkeableAction</a> </li> <li class="nav-group-task"> <a href="../Protocols/NodeDescription.html">NodeDescription</a> </li> <li class="nav-group-task"> <a href="../Protocols/NodeDescriptionProps.html">NodeDescriptionProps</a> </li> <li class="nav-group-task"> <a href="../Protocols/NodeDescriptionState.html">NodeDescriptionState</a> </li> <li class="nav-group-task"> <a href="../Protocols/NodeDescriptionWithChildren.html">NodeDescriptionWithChildren</a> </li> <li class="nav-group-task"> <a href="../Protocols/PlasticNodeDescription.html">PlasticNodeDescription</a> </li> <li class="nav-group-task"> <a href="../Protocols/PlasticReferenceSizeable.html">PlasticReferenceSizeable</a> </li> <li class="nav-group-task"> <a href="../Protocols/PlatformNativeView.html">PlatformNativeView</a> </li> <li class="nav-group-task"> <a href="../Protocols/SideEffectDependencyContainer.html">SideEffectDependencyContainer</a> </li> <li class="nav-group-task"> <a href="../Protocols/State.html">State</a> </li> </ul> </li> <li class="nav-group-name"> <a href="../Structs.html">Structs</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="../Structs/ActionLinker.html">ActionLinker</a> </li> <li class="nav-group-task"> <a href="../Structs/ActionLinks.html">ActionLinks</a> </li> <li class="nav-group-task"> <a href="../Structs/Anchor.html">Anchor</a> </li> <li class="nav-group-task"> <a href="../Structs/Anchor/Kind.html">– Kind</a> </li> <li class="nav-group-task"> <a href="../Structs/Animation.html">Animation</a> </li> <li class="nav-group-task"> <a href="../Structs/AnimationContainer.html">AnimationContainer</a> </li> <li class="nav-group-task"> <a href="../Structs/AnimationOptions.html">AnimationOptions</a> </li> <li class="nav-group-task"> <a href="../Structs/AnimationProps.html">AnimationProps</a> </li> <li class="nav-group-task"> <a href="../Structs/ChildrenAnimations.html">ChildrenAnimations</a> </li> <li class="nav-group-task"> <a href="../Structs/EdgeInsets.html">EdgeInsets</a> </li> <li class="nav-group-task"> <a href="../Structs/EmptyProps.html">EmptyProps</a> </li> <li class="nav-group-task"> <a href="../Structs/EmptySideEffectDependencyContainer.html">EmptySideEffectDependencyContainer</a> </li> <li class="nav-group-task"> <a href="../Structs/EmptyState.html">EmptyState</a> </li> <li class="nav-group-task"> <a href="../Structs/Size.html">Size</a> </li> <li class="nav-group-task"> <a href="../Structs/Value.html">Value</a> </li> </ul> </li> <li class="nav-group-name"> <a href="../Typealiases.html">Typealiases</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="../Typealiases.html#/s:6Katana25AnimationPropsTransformer">AnimationPropsTransformer</a> </li> <li class="nav-group-task"> <a href="../Typealiases.html#/s:6Katana20NodeUpdateCompletion">NodeUpdateCompletion</a> </li> </ul> </li> <li class="nav-group-name"> <a href="../Associated Types.html">Associated Types</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="../Associated Types.html#/s:P6Katana27NodeDescriptionWithChildren9PropsType">PropsType</a> </li> </ul> </li> </ul> </nav> <article class="main-content"> <section> <section class="section"> <h1>EmptyState</h1> <div class="declaration"> <div class="language"> <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">EmptyState</span><span class="p">:</span> <span class="kt"><a href="../Protocols/NodeDescriptionState.html">NodeDescriptionState</a></span></code></pre> </div> </div> <p>The default state for a <code><a href="../Protocols/NodeDescription.html">NodeDescription</a></code>. This struct is basically empty</p> </section> <section class="section task-group-section"> <div class="task-group"> <ul> <li class="item"> <div> <code> <a name="/s:ZFV6Katana10EmptyStateoi2eeFTS0_S0__Sb"></a> <a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a> <a class="token" href="#/s:ZFV6Katana10EmptyStateoi2eeFTS0_S0__Sb">==(_:_:)</a> </code> </div> <div class="height-container"> <div class="pointer-container"></div> <section class="section"> <div class="pointer"></div> <div class="abstract"> <p>Implementation of the <code>Equatable</code> protocol</p> </div> <div class="declaration"> <h4>Declaration</h4> <div class="language"> <p class="aside-title">Swift</p> <pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="o">==</span> <span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">EmptyState</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">EmptyState</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre> </div> </div> <div> <h4>Parameters</h4> <table class="graybox"> <tbody> <tr> <td> <code> <em>lhs</em> </code> </td> <td> <div> <p>the first state</p> </div> </td> </tr> <tr> <td> <code> <em>rhs</em> </code> </td> <td> <div> <p>the second state</p> </div> </td> </tr> </tbody> </table> </div> <div> <h4>Return Value</h4> <p>true</p> </div> <div class="slightly-smaller"> <a href="https://github.com/BendingSpoons/katana-swift/tree/0.6.0/Katana/Core/NodeDescription/Commons.swift#L52-L54">Show on GitHub</a> </div> </section> </div> </li> <li class="item"> <div> <code> <a name="/s:FV6Katana10EmptyStatecFT_S0_"></a> <a name="//apple_ref/swift/Method/init()" class="dashAnchor"></a> <a class="token" href="#/s:FV6Katana10EmptyStatecFT_S0_">init()</a> </code> </div> <div class="height-container"> <div class="pointer-container"></div> <section class="section"> <div class="pointer"></div> <div class="abstract"> <p>Default initializer of the struct - returns: a valid instance of EmptyState</p> </div> <div class="declaration"> <h4>Declaration</h4> <div class="language"> <p class="aside-title">Swift</p> <pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">()</span></code></pre> </div> </div> <div> <h4>Return Value</h4> <p>a valid instance of EmptyState</p> </div> <div class="slightly-smaller"> <a href="https://github.com/BendingSpoons/katana-swift/tree/0.6.0/Katana/Core/NodeDescription/Commons.swift#L60">Show on GitHub</a> </div> </section> </div> </li> </ul> </div> </section> </section> <section id="footer"> <p>&copy; 2017 <a class="link" href="http://bendingspoons.com" target="_blank" rel="external">Bending Spoons Team</a>. All rights reserved. (Last updated: 2017-01-27)</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> </section> </article> </div> </body> </div> </html>
{ "pile_set_name": "Github" }
#include "WindowCommand.h" class WindowResize : public WindowCommand { Q_OBJECT public: WindowResize(WebPageManager *, QStringList &arguments, QObject *parent = 0); protected: virtual void windowFound(WebPage *); };
{ "pile_set_name": "Github" }
/** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray;
{ "pile_set_name": "Github" }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <meta charset="UTF-8"> <body> <script> console.log(new Array(10)) </script> </body> </html>
{ "pile_set_name": "Github" }
require File.dirname(__FILE__) + '/../test_helper' require 'pictures_controller' # Re-raise errors caught by the controller. class PicturesController; def rescue_action(e) raise e end; end class PicturesControllerTest < Test::Unit::TestCase def setup @controller = PicturesController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @account = Account.find(:first) end def test_show_pictures_for_current_account_only @alt_account = Account.new; @alt_account.expires_at = 5.minutes.from_now; @alt_account.save! picture = returning(Picture.build(uploaded_file('1.jpg'))) do |pict| pict.update_attributes(:account => @alt_account, :public => true) end assert_raises(ActiveRecord::RecordNotFound) do get :retrieve, :id => picture.id, :mime_type => 'image/jpeg', :format => 'JPEG' end end def test_show_public_picture_to_anyone p = Picture.build_picture_from_local_file(File.join(RAILS_ROOT, 'test', 'fixtures', 'pictures', '1.jpg')) p.update_attributes!(:account => @account, :public => true) get :retrieve, :id => p.id, :mime_type => 'image/jpeg', :format => 'JPEG' assert_response :success assert_match %r{image/jpeg}, @response.headers['Content-Type'] assert_match /^public/, @response.headers['Cache-Control'] assert_match /inline/, @response.headers['Content-Disposition'] assert_match /#{p.filename}/, @response.headers['Content-Disposition'] end def test_allow_retrieve_private_picture_to_authenticated_user p = Picture.build_picture_from_local_file(File.join(RAILS_ROOT, 'test', 'fixtures', 'pictures', '1.jpg')) p.update_attributes!(:account => @account) login!(:bob) get :retrieve, :id => p.id, :mime_type => 'image/jpeg', :format => 'JPEG' assert_response :success assert_match %r{image/jpeg}, @response.headers['Content-Type'] assert_match /^private/, @response.headers['Cache-Control'] assert_match /inline/, @response.headers['Content-Disposition'] assert_match /#{p.filename}/, @response.headers['Content-Disposition'] end def test_dont_show_private_picture_to_unauthenticated_user p = Picture.build_picture_from_local_file(File.join(RAILS_ROOT, 'test', 'fixtures', 'pictures', '1.jpg')) p.update_attributes!(:account => @account) assert !p.public?, 'Picture should be private by default' get :retrieve, :id => p.id, :mime_type => 'image/jpeg', :format => 'JPEG' assert_match /not found/i, @response.body assert_response :missing end end
{ "pile_set_name": "Github" }
define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { "use strict"; var ElasticTabstopsLite = function(editor) { this.$editor = editor; var self = this; var changedRows = []; var recordChanges = false; this.onAfterExec = function() { recordChanges = false; self.processRows(changedRows); changedRows = []; }; this.onExec = function() { recordChanges = true; }; this.onChange = function(e) { var range = e.data.range if (recordChanges) { if (changedRows.indexOf(range.start.row) == -1) changedRows.push(range.start.row); if (range.end.row != range.start.row) changedRows.push(range.end.row); } }; }; (function() { this.processRows = function(rows) { this.$inChange = true; var checkedRows = []; for (var r = 0, rowCount = rows.length; r < rowCount; r++) { var row = rows[r]; if (checkedRows.indexOf(row) > -1) continue; var cellWidthObj = this.$findCellWidthsForBlock(row); var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths); var rowIndex = cellWidthObj.firstRow; for (var w = 0, l = cellWidths.length; w < l; w++) { var widths = cellWidths[w]; checkedRows.push(rowIndex); this.$adjustRow(rowIndex, widths); rowIndex++; } } this.$inChange = false; }; this.$findCellWidthsForBlock = function(row) { var cellWidths = [], widths; var rowIter = row; while (rowIter >= 0) { widths = this.$cellWidthsForRow(rowIter); if (widths.length == 0) break; cellWidths.unshift(widths); rowIter--; } var firstRow = rowIter + 1; rowIter = row; var numRows = this.$editor.session.getLength(); while (rowIter < numRows - 1) { rowIter++; widths = this.$cellWidthsForRow(rowIter); if (widths.length == 0) break; cellWidths.push(widths); } return { cellWidths: cellWidths, firstRow: firstRow }; }; this.$cellWidthsForRow = function(row) { var selectionColumns = this.$selectionColumnsForRow(row); var tabs = [-1].concat(this.$tabsForRow(row)); var widths = tabs.map(function(el) { return 0; } ).slice(1); var line = this.$editor.session.getLine(row); for (var i = 0, len = tabs.length - 1; i < len; i++) { var leftEdge = tabs[i]+1; var rightEdge = tabs[i+1]; var rightmostSelection = this.$rightmostSelectionInCell(selectionColumns, rightEdge); var cell = line.substring(leftEdge, rightEdge); widths[i] = Math.max(cell.replace(/\s+$/g,'').length, rightmostSelection - leftEdge); } return widths; }; this.$selectionColumnsForRow = function(row) { var selections = [], cursor = this.$editor.getCursorPosition(); if (this.$editor.session.getSelection().isEmpty()) { if (row == cursor.row) selections.push(cursor.column); } return selections; }; this.$setBlockCellWidthsToMax = function(cellWidths) { var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth; var columnInfo = this.$izip_longest(cellWidths); for (var c = 0, l = columnInfo.length; c < l; c++) { var column = columnInfo[c]; if (!column.push) { console.error(column); continue; } column.push(NaN); for (var r = 0, s = column.length; r < s; r++) { var width = column[r]; if (startingNewBlock) { blockStartRow = r; maxWidth = 0; startingNewBlock = false; } if (isNaN(width)) { blockEndRow = r; for (var j = blockStartRow; j < blockEndRow; j++) { cellWidths[j][c] = maxWidth; } startingNewBlock = true; } maxWidth = Math.max(maxWidth, width); } } return cellWidths; }; this.$rightmostSelectionInCell = function(selectionColumns, cellRightEdge) { var rightmost = 0; if (selectionColumns.length) { var lengths = []; for (var s = 0, length = selectionColumns.length; s < length; s++) { if (selectionColumns[s] <= cellRightEdge) lengths.push(s); else lengths.push(0); } rightmost = Math.max.apply(Math, lengths); } return rightmost; }; this.$tabsForRow = function(row) { var rowTabs = [], line = this.$editor.session.getLine(row), re = /\t/g, match; while ((match = re.exec(line)) != null) { rowTabs.push(match.index); } return rowTabs; }; this.$adjustRow = function(row, widths) { var rowTabs = this.$tabsForRow(row); if (rowTabs.length == 0) return; var bias = 0, location = -1; var expandedSet = this.$izip(widths, rowTabs); for (var i = 0, l = expandedSet.length; i < l; i++) { var w = expandedSet[i][0], it = expandedSet[i][1]; location += 1 + w; it += bias; var difference = location - it; if (difference == 0) continue; var partialLine = this.$editor.session.getLine(row).substr(0, it ); var strippedPartialLine = partialLine.replace(/\s*$/g, ""); var ispaces = partialLine.length - strippedPartialLine.length; if (difference > 0) { this.$editor.session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference + 1).join(" ") + "\t"); this.$editor.session.getDocument().removeInLine(row, it, it + 1); bias += difference; } if (difference < 0 && ispaces >= -difference) { this.$editor.session.getDocument().removeInLine(row, it + difference, it); bias += difference; } } }; this.$izip_longest = function(iterables) { if (!iterables[0]) return []; var longest = iterables[0].length; var iterablesLength = iterables.length; for (var i = 1; i < iterablesLength; i++) { var iLength = iterables[i].length; if (iLength > longest) longest = iLength; } var expandedSet = []; for (var l = 0; l < longest; l++) { var set = []; for (var i = 0; i < iterablesLength; i++) { if (iterables[i][l] === "") set.push(NaN); else set.push(iterables[i][l]); } expandedSet.push(set); } return expandedSet; }; this.$izip = function(widths, tabs) { var size = widths.length >= tabs.length ? tabs.length : widths.length; var expandedSet = []; for (var i = 0; i < size; i++) { var set = [ widths[i], tabs[i] ]; expandedSet.push(set); } return expandedSet; }; }).call(ElasticTabstopsLite.prototype); exports.ElasticTabstopsLite = ElasticTabstopsLite; var Editor = require("../editor").Editor; require("../config").defineOptions(Editor.prototype, "editor", { useElasticTabstops: { set: function(val) { if (val) { if (!this.elasticTabstops) this.elasticTabstops = new ElasticTabstopsLite(this); this.commands.on("afterExec", this.elasticTabstops.onAfterExec); this.commands.on("exec", this.elasticTabstops.onExec); this.on("change", this.elasticTabstops.onChange); } else if (this.elasticTabstops) { this.commands.removeListener("afterExec", this.elasticTabstops.onAfterExec); this.commands.removeListener("exec", this.elasticTabstops.onExec); this.removeListener("change", this.elasticTabstops.onChange); } } } }); }); (function() { window.require(["ace/ext/elastic_tabstops_lite"], function() {}); })();
{ "pile_set_name": "Github" }
<!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_45) on Sun Sep 08 19:26:32 EDT 2013 --> <TITLE> BoxHolder (JHOVE Documentation) </TITLE> <META NAME="date" CONTENT="2013-09-08"> <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="BoxHolder (JHOVE Documentation)"; } } </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>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHeader.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BPCCBox.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../index.html?edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="BoxHolder.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> edu.harvard.hul.ois.jhove.module.jpeg2000</FONT> <BR> Class BoxHolder</H2> <PRE> java.lang.Object <IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by "><B>edu.harvard.hul.ois.jhove.module.jpeg2000.BoxHolder</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.util.Iterator&lt;java.lang.Object&gt;</DD> </DL> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/JP2Box.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000">JP2Box</A>, <A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/TopLevelBoxHolder.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000">TopLevelBoxHolder</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>BoxHolder</B><DT>extends java.lang.Object<DT>implements java.util.Iterator&lt;java.lang.Object&gt;</DL> </PRE> <P> A BoxHolder is a container for JPEG 2000 boxes. <P> <P> <DL> <DT><B>Author:</B></DT> <DD>Gary McGath</DD> </DL> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHeader.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000">BoxHeader</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#_boxHeader">_boxHeader</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;java.io.DataInputStream</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#_dstrm">_dstrm</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/Jpeg2000Module.html" title="class in edu.harvard.hul.ois.jhove.module">Jpeg2000Module</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#_module">_module</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/JP2Box.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000">JP2Box</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#_parentBox">_parentBox</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;java.io.RandomAccessFile</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#_raf">_raf</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/RepInfo.html" title="class in edu.harvard.hul.ois.jhove">RepInfo</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#_repInfo">_repInfo</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#bytesLeft">bytesLeft</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#filePos">filePos</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#hasBoxes">hasBoxes</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#BoxHolder(java.io.RandomAccessFile)">BoxHolder</A></B>(java.io.RandomAccessFile&nbsp;raf)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#getFilePos()">getFilePos</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the file position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#getSelfPropName()">getSelfPropName</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the BoxHolder.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#hasNext()">hasNext</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if any more subboxes are available.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#next()">next</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#remove()">remove</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Always throws UnsupportedOperationException.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#superboxOverrun()">superboxOverrun</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility error reporting function for a subbox overrunning its superbox.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html#superboxUnderrun()">superboxUnderrun</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility error reporting function for a subbox underrunning its superbox.</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="_module"><!-- --></A><H3> _module</H3> <PRE> protected <A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/Jpeg2000Module.html" title="class in edu.harvard.hul.ois.jhove.module">Jpeg2000Module</A> <B>_module</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="_parentBox"><!-- --></A><H3> _parentBox</H3> <PRE> protected <A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/JP2Box.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000">JP2Box</A> <B>_parentBox</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="_raf"><!-- --></A><H3> _raf</H3> <PRE> protected java.io.RandomAccessFile <B>_raf</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="_dstrm"><!-- --></A><H3> _dstrm</H3> <PRE> protected java.io.DataInputStream <B>_dstrm</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="_boxHeader"><!-- --></A><H3> _boxHeader</H3> <PRE> protected <A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHeader.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000">BoxHeader</A> <B>_boxHeader</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="_repInfo"><!-- --></A><H3> _repInfo</H3> <PRE> protected <A HREF="../../../../../../../edu/harvard/hul/ois/jhove/RepInfo.html" title="class in edu.harvard.hul.ois.jhove">RepInfo</A> <B>_repInfo</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="bytesLeft"><!-- --></A><H3> bytesLeft</H3> <PRE> protected long <B>bytesLeft</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="filePos"><!-- --></A><H3> filePos</H3> <PRE> protected long <B>filePos</B></PRE> <DL> <DL> </DL> </DL> <HR> <A NAME="hasBoxes"><!-- --></A><H3> hasBoxes</H3> <PRE> protected boolean <B>hasBoxes</B></PRE> <DL> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="BoxHolder(java.io.RandomAccessFile)"><!-- --></A><H3> BoxHolder</H3> <PRE> public <B>BoxHolder</B>(java.io.RandomAccessFile&nbsp;raf)</PRE> <DL> <DD>Constructor. <P> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getFilePos()"><!-- --></A><H3> getFilePos</H3> <PRE> protected long <B>getFilePos</B>()</PRE> <DL> <DD>Returns the file position. In practice, this means returning the beginning of the Box. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="hasNext()"><!-- --></A><H3> hasNext</H3> <PRE> public boolean <B>hasNext</B>()</PRE> <DL> <DD>Checks if any more subboxes are available. This class doesn't fully conform to the Iterator interface, as there are some cases where the lack of more boxes won't be detected till an EOF is encounterd. So callers should call <code>hasNext</code> to avoid reading overruns, and then test the value returned by <code>next</code> for nullity. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>hasNext</CODE> in interface <CODE>java.util.Iterator&lt;java.lang.Object&gt;</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="next()"><!-- --></A><H3> next</H3> <PRE> public java.lang.Object <B>next</B>()</PRE> <DL> <DD><DL> <DT><B>Specified by:</B><DD><CODE>next</CODE> in interface <CODE>java.util.Iterator&lt;java.lang.Object&gt;</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="remove()"><!-- --></A><H3> remove</H3> <PRE> public void <B>remove</B>() throws java.lang.UnsupportedOperationException</PRE> <DL> <DD>Always throws UnsupportedOperationException. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>remove</CODE> in interface <CODE>java.util.Iterator&lt;java.lang.Object&gt;</CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.UnsupportedOperationException</CODE></DL> </DD> </DL> <HR> <A NAME="superboxOverrun()"><!-- --></A><H3> superboxOverrun</H3> <PRE> protected void <B>superboxOverrun</B>()</PRE> <DL> <DD>Utility error reporting function for a subbox overrunning its superbox. Sets the RepInfo's wellFormed flag to <code>false</code>. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="superboxUnderrun()"><!-- --></A><H3> superboxUnderrun</H3> <PRE> protected void <B>superboxUnderrun</B>()</PRE> <DL> <DD>Utility error reporting function for a subbox underrunning its superbox. Sets the RepInfo's wellFormed flag to <code>false</code>. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getSelfPropName()"><!-- --></A><H3> getSelfPropName</H3> <PRE> protected java.lang.String <B>getSelfPropName</B>()</PRE> <DL> <DD>Returns the name of the BoxHolder. All subclasses should override this. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <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>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHeader.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../../../edu/harvard/hul/ois/jhove/module/jpeg2000/BPCCBox.html" title="class in edu.harvard.hul.ois.jhove.module.jpeg2000"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../index.html?edu/harvard/hul/ois/jhove/module/jpeg2000/BoxHolder.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="BoxHolder.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
{ "pile_set_name": "Github" }
/** ****************************************************************************** * @file stm32f10x_exti.c * @author MCD Application Team * @version V3.6.1 * @date 05-March-2012 * @brief This file provides all the EXTI firmware functions. ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2> * * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 * * 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. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "stm32f10x_exti.h" /** @addtogroup STM32F10x_StdPeriph_Driver * @{ */ /** @defgroup EXTI * @brief EXTI driver modules * @{ */ /** @defgroup EXTI_Private_TypesDefinitions * @{ */ /** * @} */ /** @defgroup EXTI_Private_Defines * @{ */ #define EXTI_LINENONE ((uint32_t)0x00000) /* No interrupt selected */ /** * @} */ /** @defgroup EXTI_Private_Macros * @{ */ /** * @} */ /** @defgroup EXTI_Private_Variables * @{ */ /** * @} */ /** @defgroup EXTI_Private_FunctionPrototypes * @{ */ /** * @} */ /** @defgroup EXTI_Private_Functions * @{ */ /** * @brief Deinitializes the EXTI peripheral registers to their default reset values. * @param None * @retval None */ void EXTI_DeInit(void) { EXTI->IMR = 0x00000000; EXTI->EMR = 0x00000000; EXTI->RTSR = 0x00000000; EXTI->FTSR = 0x00000000; EXTI->PR = 0x000FFFFF; } /** * @brief Initializes the EXTI peripheral according to the specified * parameters in the EXTI_InitStruct. * @param EXTI_InitStruct: pointer to a EXTI_InitTypeDef structure * that contains the configuration information for the EXTI peripheral. * @retval None */ void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct) { uint32_t tmp = 0; /* Check the parameters */ assert_param(IS_EXTI_MODE(EXTI_InitStruct->EXTI_Mode)); assert_param(IS_EXTI_TRIGGER(EXTI_InitStruct->EXTI_Trigger)); assert_param(IS_EXTI_LINE(EXTI_InitStruct->EXTI_Line)); assert_param(IS_FUNCTIONAL_STATE(EXTI_InitStruct->EXTI_LineCmd)); tmp = (uint32_t)EXTI_BASE; if (EXTI_InitStruct->EXTI_LineCmd != DISABLE) { /* Clear EXTI line configuration */ EXTI->IMR &= ~EXTI_InitStruct->EXTI_Line; EXTI->EMR &= ~EXTI_InitStruct->EXTI_Line; tmp += EXTI_InitStruct->EXTI_Mode; *(__IO uint32_t *) tmp |= EXTI_InitStruct->EXTI_Line; /* Clear Rising Falling edge configuration */ EXTI->RTSR &= ~EXTI_InitStruct->EXTI_Line; EXTI->FTSR &= ~EXTI_InitStruct->EXTI_Line; /* Select the trigger for the selected external interrupts */ if (EXTI_InitStruct->EXTI_Trigger == EXTI_Trigger_Rising_Falling) { /* Rising Falling edge */ EXTI->RTSR |= EXTI_InitStruct->EXTI_Line; EXTI->FTSR |= EXTI_InitStruct->EXTI_Line; } else { tmp = (uint32_t)EXTI_BASE; tmp += EXTI_InitStruct->EXTI_Trigger; *(__IO uint32_t *) tmp |= EXTI_InitStruct->EXTI_Line; } } else { tmp += EXTI_InitStruct->EXTI_Mode; /* Disable the selected external lines */ *(__IO uint32_t *) tmp &= ~EXTI_InitStruct->EXTI_Line; } } /** * @brief Fills each EXTI_InitStruct member with its reset value. * @param EXTI_InitStruct: pointer to a EXTI_InitTypeDef structure which will * be initialized. * @retval None */ void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct) { EXTI_InitStruct->EXTI_Line = EXTI_LINENONE; EXTI_InitStruct->EXTI_Mode = EXTI_Mode_Interrupt; EXTI_InitStruct->EXTI_Trigger = EXTI_Trigger_Falling; EXTI_InitStruct->EXTI_LineCmd = DISABLE; } /** * @brief Generates a Software interrupt. * @param EXTI_Line: specifies the EXTI lines to be enabled or disabled. * This parameter can be any combination of EXTI_Linex where x can be (0..19). * @retval None */ void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line) { /* Check the parameters */ assert_param(IS_EXTI_LINE(EXTI_Line)); EXTI->SWIER |= EXTI_Line; } /** * @brief Checks whether the specified EXTI line flag is set or not. * @param EXTI_Line: specifies the EXTI line flag to check. * This parameter can be: * @arg EXTI_Linex: External interrupt line x where x(0..19) * @retval The new state of EXTI_Line (SET or RESET). */ FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line) { FlagStatus bitstatus = RESET; /* Check the parameters */ assert_param(IS_GET_EXTI_LINE(EXTI_Line)); if ((EXTI->PR & EXTI_Line) != (uint32_t)RESET) { bitstatus = SET; } else { bitstatus = RESET; } return bitstatus; } /** * @brief Clears the EXTI's line pending flags. * @param EXTI_Line: specifies the EXTI lines flags to clear. * This parameter can be any combination of EXTI_Linex where x can be (0..19). * @retval None */ void EXTI_ClearFlag(uint32_t EXTI_Line) { /* Check the parameters */ assert_param(IS_EXTI_LINE(EXTI_Line)); EXTI->PR = EXTI_Line; } /** * @brief Checks whether the specified EXTI line is asserted or not. * @param EXTI_Line: specifies the EXTI line to check. * This parameter can be: * @arg EXTI_Linex: External interrupt line x where x(0..19) * @retval The new state of EXTI_Line (SET or RESET). */ ITStatus EXTI_GetITStatus(uint32_t EXTI_Line) { ITStatus bitstatus = RESET; uint32_t enablestatus = 0; /* Check the parameters */ assert_param(IS_GET_EXTI_LINE(EXTI_Line)); enablestatus = EXTI->IMR & EXTI_Line; if (((EXTI->PR & EXTI_Line) != (uint32_t)RESET) && (enablestatus != (uint32_t)RESET)) { bitstatus = SET; } else { bitstatus = RESET; } return bitstatus; } /** * @brief Clears the EXTI's line pending bits. * @param EXTI_Line: specifies the EXTI lines to clear. * This parameter can be any combination of EXTI_Linex where x can be (0..19). * @retval None */ void EXTI_ClearITPendingBit(uint32_t EXTI_Line) { /* Check the parameters */ assert_param(IS_EXTI_LINE(EXTI_Line)); EXTI->PR = EXTI_Line; } /** * @} */ /** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
{ "pile_set_name": "Github" }
.Dd April 27, 2012 .Dt MK-CA-BUNDLE 1 .Os .Sh NAME .Nm mk-ca-bundle .Nd create a new ca-bundle.crt from mozilla's certdata.txt .Sh SYNOPSIS .Nm .Op Fl bilnqtuv .Or outputfile .Sh DESCRIPTION The .Nm tool downloads the certdata.txt file from Mozilla's source tree, then parses certdata.txt and extracts CA Root Certificates into PEM format. These are then processed with the OpenSSL commandline tool to produce the final ca-bundle.crt file. .Sh OPTIONS The following options are supported by .Nm : .Bl -tag -width _h .It Fl b backup an existing version of ca-bundle.crt .It Fl i print version info about used modules .It Fl l print license info about certdata.txt .It Fl n no download of certdata.txt (to use existing) .It Fl q be really quiet (no progress output at all) .It Fl t include plain text listing of certificates .It Fl u unlink (remove) certdata.txt after processing .It Fl v be verbose and print out processed CAs .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr curl 1 .Sh HISTORY .Nm was based on the parse-certs script written by .An Roland Krikava and hacked by .An Guenter Knauf . This manual page was written by .An Jan Schaumann .Aq [email protected] .
{ "pile_set_name": "Github" }
config SCSI_CXGB4_ISCSI tristate "Chelsio T4 iSCSI support" depends on PCI && INET && (IPV6 || IPV6=n) select NETDEVICES select ETHERNET select NET_VENDOR_CHELSIO select CHELSIO_T4 select SCSI_ISCSI_ATTRS ---help--- This driver supports iSCSI offload for the Chelsio T4 devices.
{ "pile_set_name": "Github" }
/* Copyright (C) 2015-2020, Wazuh Inc. * Copyright (C) 2009 Trend Micro Inc. * All right reserved. * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public * License (version 2) as published by the FSF - Free Software * Foundation */ /* Functions to handle signal manipulation */ #ifndef WIN32 #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <string.h> #include "shared.h" #include "sig_op.h" #include "file_op.h" #include "debug_op.h" #include "error_messages/error_messages.h" #include "error_messages/debug_messages.h" static const char *pidfile = NULL; /* To avoid hp-ux requirement of strsignal */ #ifdef __hpux char* strsignal(int sig) { static char str[12]; sprintf(str, "%d", sig); return str; } #endif void HandleExit() { DeletePID(pidfile); if (strcmp(__local_name, "unset")) { DeleteState(); } } void HandleSIG(int sig) { minfo(SIGNAL_RECV, sig, strsignal(sig)); exit(1); } /* To avoid client-server communication problems */ void HandleSIGPIPE(__attribute__((unused)) int sig) { return; } void StartSIG(const char *process_name) { pidfile = process_name; signal(SIGHUP, SIG_IGN); signal(SIGINT, HandleSIG); signal(SIGQUIT, HandleSIG); signal(SIGTERM, HandleSIG); signal(SIGALRM, HandleSIG); signal(SIGPIPE, HandleSIGPIPE); atexit(HandleExit); } void StartSIG2(const char *process_name, void (*func)(int)) { pidfile = process_name; signal(SIGHUP, SIG_IGN); signal(SIGINT, func); signal(SIGQUIT, func); signal(SIGTERM, func); signal(SIGALRM, func); signal(SIGPIPE, HandleSIGPIPE); atexit(HandleExit); } #endif /* !WIN32 */
{ "pile_set_name": "Github" }
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18444 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace TrackBallSyncedCharts.Properties { /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if ((resourceMan == null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TrackBallSyncedCharts.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } } }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 05631ea81b09d1f4fa8885bd25ecd4ce ShaderImporter: externalObjects: {} defaultTextures: [] nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
FROM node:6 WORKDIR /app ADD . /app RUN npm install EXPOSE 3000 CMD ["npm", "run", "serve"]
{ "pile_set_name": "Github" }
const basicHTML = require('../basichtml.js'); const {Document} = basicHTML; const {document} = basicHTML.init(); const html = "<!DOCTYPE html><html lang='fr'><body><p>Hello</p></body></html>"; const tmp = document.createElement('div'); tmp.innerHTML = html; const {attributes, children} = tmp.firstElementChild; document.documentElement.textContent = ''; document.documentElement.attributes = attributes; document.documentElement.append(...children); console.assert(document.toString() === createDocumentFromHTML(html).toString()); // const {Document} = require('../basichtml.js'); function createDocumentFromHTML(html, customElements) { const document = new Document(customElements); const tmp = document.createElement('div'); tmp.innerHTML = html; const {attributes, children} = tmp.firstElementChild; document.documentElement.attributes = attributes; document.documentElement.append(...children); return document; }
{ "pile_set_name": "Github" }
#name : until ... end #group: control structure # -- until ${condition} $0 end
{ "pile_set_name": "Github" }
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package resourceconfig import ( "fmt" "strconv" "strings" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" serverstore "k8s.io/apiserver/pkg/server/storage" cliflag "k8s.io/component-base/cli/flag" "k8s.io/klog" ) // GroupVersionRegistry provides access to registered group versions. type GroupVersionRegistry interface { // IsGroupRegistered returns true if given group is registered. IsGroupRegistered(group string) bool // IsVersionRegistered returns true if given version is registered. IsVersionRegistered(v schema.GroupVersion) bool // PrioritizedVersionsAllGroups returns all registered group versions. PrioritizedVersionsAllGroups() []schema.GroupVersion } // MergeResourceEncodingConfigs merges the given defaultResourceConfig with specific GroupVersionResource overrides. func MergeResourceEncodingConfigs( defaultResourceEncoding *serverstore.DefaultResourceEncodingConfig, resourceEncodingOverrides []schema.GroupVersionResource, ) *serverstore.DefaultResourceEncodingConfig { resourceEncodingConfig := defaultResourceEncoding for _, gvr := range resourceEncodingOverrides { resourceEncodingConfig.SetResourceEncoding(gvr.GroupResource(), gvr.GroupVersion(), schema.GroupVersion{Group: gvr.Group, Version: runtime.APIVersionInternal}) } return resourceEncodingConfig } // MergeAPIResourceConfigs merges the given defaultAPIResourceConfig with the given resourceConfigOverrides. // Exclude the groups not registered in registry, and check if version is // not registered in group, then it will fail. func MergeAPIResourceConfigs( defaultAPIResourceConfig *serverstore.ResourceConfig, resourceConfigOverrides cliflag.ConfigurationMap, registry GroupVersionRegistry, ) (*serverstore.ResourceConfig, error) { resourceConfig := defaultAPIResourceConfig overrides := resourceConfigOverrides // "api/all=false" allows users to selectively enable specific api versions. allAPIFlagValue, ok := overrides["api/all"] if ok { if allAPIFlagValue == "false" { // Disable all group versions. resourceConfig.DisableAll() } else if allAPIFlagValue == "true" { resourceConfig.EnableAll() } } // "<resourceSpecifier>={true|false} allows users to enable/disable API. // This takes preference over api/all, if specified. // Iterate through all group/version overrides specified in runtimeConfig. for key := range overrides { // Have already handled them above. Can skip them here. if key == "api/all" { continue } tokens := strings.Split(key, "/") if len(tokens) < 2 { continue } groupVersionString := tokens[0] + "/" + tokens[1] groupVersion, err := schema.ParseGroupVersion(groupVersionString) if err != nil { return nil, fmt.Errorf("invalid key %s", key) } // individual resource enablement/disablement is only supported in the extensions/v1beta1 API group for legacy reasons. // all other API groups are expected to contain coherent sets of resources that are enabled/disabled together. if len(tokens) > 2 && (groupVersion != schema.GroupVersion{Group: "extensions", Version: "v1beta1"}) { klog.Warningf("ignoring invalid key %s, individual resource enablement/disablement is not supported in %s, and will prevent starting in future releases", key, groupVersion.String()) continue } // Exclude group not registered into the registry. if !registry.IsGroupRegistered(groupVersion.Group) { continue } // Verify that the groupVersion is registered into registry. if !registry.IsVersionRegistered(groupVersion) { return nil, fmt.Errorf("group version %s that has not been registered", groupVersion.String()) } enabled, err := getRuntimeConfigValue(overrides, key, false) if err != nil { return nil, err } if enabled { // enable the groupVersion for "group/version=true" and "group/version/resource=true" resourceConfig.EnableVersions(groupVersion) } else if len(tokens) == 2 { // disable the groupVersion only for "group/version=false", not "group/version/resource=false" resourceConfig.DisableVersions(groupVersion) } if len(tokens) < 3 { continue } groupVersionResource := groupVersion.WithResource(tokens[2]) if enabled { resourceConfig.EnableResources(groupVersionResource) } else { resourceConfig.DisableResources(groupVersionResource) } } return resourceConfig, nil } func getRuntimeConfigValue(overrides cliflag.ConfigurationMap, apiKey string, defaultValue bool) (bool, error) { flagValue, ok := overrides[apiKey] if ok { if flagValue == "" { return true, nil } boolValue, err := strconv.ParseBool(flagValue) if err != nil { return false, fmt.Errorf("invalid value of %s: %s, err: %v", apiKey, flagValue, err) } return boolValue, nil } return defaultValue, nil } // ParseGroups takes in resourceConfig and returns parsed groups. func ParseGroups(resourceConfig cliflag.ConfigurationMap) ([]string, error) { groups := []string{} for key := range resourceConfig { if key == "api/all" { continue } tokens := strings.Split(key, "/") if len(tokens) != 2 && len(tokens) != 3 { return groups, fmt.Errorf("runtime-config invalid key %s", key) } groupVersionString := tokens[0] + "/" + tokens[1] groupVersion, err := schema.ParseGroupVersion(groupVersionString) if err != nil { return nil, fmt.Errorf("runtime-config invalid key %s", key) } groups = append(groups, groupVersion.Group) } return groups, nil }
{ "pile_set_name": "Github" }
ace.define("ace/snippets/dockerfile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="dockerfile"}); (function() { ace.require(["ace/snippets/dockerfile"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })();
{ "pile_set_name": "Github" }
/* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Sets the type of metadata to use. Metadata is encoded in JSON, and each property * in the JSON will become a property of the element itself. * * There are three supported types of metadata storage: * * attr: Inside an attribute. The name parameter indicates *which* attribute. * * class: Inside the class attribute, wrapped in curly braces: { } * * elem: Inside a child element (e.g. a script tag). The * name parameter indicates *which* element. * * The metadata for an element is loaded the first time the element is accessed via jQuery. * * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements * matched by expr, then redefine the metadata type and run another $(expr) for other elements. * * @name $.metadata.setType * * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p> * @before $.metadata.setType("class") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from the class attribute * * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p> * @before $.metadata.setType("attr", "data") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from a "data" attribute * * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p> * @before $.metadata.setType("elem", "script") * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" * @desc Reads metadata from a nested script element * * @param String type The encoding type * @param String name The name of the attribute to be used to get metadata (optional) * @cat Plugins/Metadata * @descr Sets the type of encoding to be used when loading metadata for the first time * @type undefined * @see metadata() */ (function($) { $.extend({ metadata : { defaults : { type: 'class', name: 'metadata', cre: /(\{.*\})/, single: 'metadata' }, setType: function( type, name ){ this.defaults.type = type; this.defaults.name = name; }, get: function( elem, opts ){ var data, m, e, attr, settings = $.extend({},this.defaults,opts); // check for empty string in single property if ( !settings.single.length ) { settings.single = 'metadata'; } data = $.data(elem, settings.single); // returned cached data if it already exists if ( data ) { return data; } data = "{}"; if ( settings.type === "class" ) { m = settings.cre.exec( elem.className ); if ( m ) { data = m[1]; } } else if ( settings.type === "elem" ) { if( !elem.getElementsByTagName ) { return undefined; } e = elem.getElementsByTagName(settings.name); if ( e.length ) { data = $.trim(e[0].innerHTML); } } else if ( elem.getAttribute !== undefined ) { attr = elem.getAttribute( settings.name ); if ( attr ) { data = attr; } } if ( data.indexOf( '{' ) <0 ) { data = "{" + data + "}"; } /*jshint evil:true */ data = eval("(" + data + ")"); $.data( elem, settings.single, data ); return data; } } }); /** * Returns the metadata object for the first member of the jQuery object. * * @name metadata * @descr Returns element's metadata object * @param Object opts An object contianing settings to override the defaults * @type jQuery * @cat Plugins/Metadata */ $.fn.metadata = function( opts ){ return $.metadata.get( this[0], opts ); }; })(jQuery);
{ "pile_set_name": "Github" }
/* [auto_generated] boost/numeric/odeint/external/compute/compute_resize.hpp [begin_description] Enable resizing for Boost.Compute vector [end_description] Copyright 2009-2011 Karsten Ahnert Copyright 2009-2011 Mario Mulansky 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) */ #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_COMPUTE_COMPUTE_RESIZE_HPP_DEFINED #define BOOST_NUMERIC_ODEINT_EXTERNAL_COMPUTE_COMPUTE_RESIZE_HPP_DEFINED #include <boost/compute/container/vector.hpp> #include <boost/numeric/odeint/util/copy.hpp> namespace boost { namespace numeric { namespace odeint { template< class T, class A > struct is_resizeable< boost::compute::vector< T , A > > { struct type : public boost::true_type { }; const static bool value = type::value; }; template< class T, class A > struct same_size_impl< boost::compute::vector< T, A > , boost::compute::vector< T, A > > { static bool same_size( const boost::compute::vector< T, A > &x , const boost::compute::vector< T, A > &y ) { return x.size() == y.size(); } }; template< class T, class A > struct resize_impl< boost::compute::vector< T, A > , boost::compute::vector< T, A > > { static void resize( boost::compute::vector< T, A > &x , const boost::compute::vector< T, A > &y ) { x.resize( y.size() ); } }; template< class Container1, class T, class A > struct copy_impl< Container1 , boost::compute::vector< T, A > > { static void copy( const Container1 &from , boost::compute::vector< T, A > &to ) { boost::compute::copy( boost::begin( from ) , boost::end( from ) , boost::begin( to ) ); } }; template< class T, class A, class Container2 > struct copy_impl< boost::compute::vector< T, A > , Container2 > { static void copy( const boost::compute::vector< T, A > &from , Container2 &to ) { boost::compute::copy( boost::begin( from ) , boost::end( from ) , boost::begin( to ) ); } }; template< class T, class A > struct copy_impl< boost::compute::vector< T, A > , boost::compute::vector< T, A > > { static void copy( const boost::compute::vector< T, A > &from , boost::compute::vector< T, A > &to ) { boost::compute::copy( boost::begin( from ) , boost::end( from ) , boost::begin( to ) ); } }; } // odeint } // numeric } // boost #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_COMPUTE_COMPUTE_RESIZE_HPP_DEFINED
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0+ /* * Freescale QUICC Engine USB Host Controller Driver * * Copyright (c) Freescale Semicondutor, Inc. 2006. * Shlomi Gridish <[email protected]> * Jerry Huang <[email protected]> * Copyright (c) Logic Product Development, Inc. 2007 * Peter Barada <[email protected]> * Copyright (c) MontaVista Software, Inc. 2008. * Anton Vorontsov <[email protected]> */ #include <linux/kernel.h> #include <linux/types.h> #include <linux/spinlock.h> #include <linux/delay.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/usb.h> #include <linux/usb/hcd.h> #include <linux/gpio.h> #include <soc/fsl/qe/qe.h> #include "fhci.h" /* virtual root hub specific descriptor */ static u8 root_hub_des[] = { 0x09, /* blength */ USB_DT_HUB, /* bDescriptorType;hub-descriptor */ 0x01, /* bNbrPorts */ HUB_CHAR_INDV_PORT_LPSM | HUB_CHAR_NO_OCPM, /* wHubCharacteristics */ 0x00, /* per-port power, no overcurrent */ 0x01, /* bPwrOn2pwrGood;2ms */ 0x00, /* bHubContrCurrent;0mA */ 0x00, /* DeviceRemoveable */ 0xff, /* PortPwrCtrlMask */ }; static void fhci_gpio_set_value(struct fhci_hcd *fhci, int gpio_nr, bool on) { int gpio = fhci->gpios[gpio_nr]; bool alow = fhci->alow_gpios[gpio_nr]; if (!gpio_is_valid(gpio)) return; gpio_set_value(gpio, on ^ alow); mdelay(5); } void fhci_config_transceiver(struct fhci_hcd *fhci, enum fhci_port_status status) { fhci_dbg(fhci, "-> %s: %d\n", __func__, status); switch (status) { case FHCI_PORT_POWER_OFF: fhci_gpio_set_value(fhci, GPIO_POWER, false); break; case FHCI_PORT_DISABLED: case FHCI_PORT_WAITING: fhci_gpio_set_value(fhci, GPIO_POWER, true); break; case FHCI_PORT_LOW: fhci_gpio_set_value(fhci, GPIO_SPEED, false); break; case FHCI_PORT_FULL: fhci_gpio_set_value(fhci, GPIO_SPEED, true); break; default: WARN_ON(1); break; } fhci_dbg(fhci, "<- %s: %d\n", __func__, status); } /* disable the USB port by clearing the EN bit in the USBMOD register */ void fhci_port_disable(struct fhci_hcd *fhci) { struct fhci_usb *usb = (struct fhci_usb *)fhci->usb_lld; enum fhci_port_status port_status; fhci_dbg(fhci, "-> %s\n", __func__); fhci_stop_sof_timer(fhci); fhci_flush_all_transmissions(usb); fhci_usb_disable_interrupt((struct fhci_usb *)fhci->usb_lld); port_status = usb->port_status; usb->port_status = FHCI_PORT_DISABLED; /* Enable IDLE since we want to know if something comes along */ usb->saved_msk |= USB_E_IDLE_MASK; out_be16(&usb->fhci->regs->usb_usbmr, usb->saved_msk); /* check if during the disconnection process attached new device */ if (port_status == FHCI_PORT_WAITING) fhci_device_connected_interrupt(fhci); usb->vroot_hub->port.wPortStatus &= ~USB_PORT_STAT_ENABLE; usb->vroot_hub->port.wPortChange |= USB_PORT_STAT_C_ENABLE; fhci_usb_enable_interrupt((struct fhci_usb *)fhci->usb_lld); fhci_dbg(fhci, "<- %s\n", __func__); } /* enable the USB port by setting the EN bit in the USBMOD register */ void fhci_port_enable(void *lld) { struct fhci_usb *usb = (struct fhci_usb *)lld; struct fhci_hcd *fhci = usb->fhci; fhci_dbg(fhci, "-> %s\n", __func__); fhci_config_transceiver(fhci, usb->port_status); if ((usb->port_status != FHCI_PORT_FULL) && (usb->port_status != FHCI_PORT_LOW)) fhci_start_sof_timer(fhci); usb->vroot_hub->port.wPortStatus |= USB_PORT_STAT_ENABLE; usb->vroot_hub->port.wPortChange |= USB_PORT_STAT_C_ENABLE; fhci_dbg(fhci, "<- %s\n", __func__); } void fhci_io_port_generate_reset(struct fhci_hcd *fhci) { fhci_dbg(fhci, "-> %s\n", __func__); gpio_direction_output(fhci->gpios[GPIO_USBOE], 0); gpio_direction_output(fhci->gpios[GPIO_USBTP], 0); gpio_direction_output(fhci->gpios[GPIO_USBTN], 0); mdelay(5); qe_pin_set_dedicated(fhci->pins[PIN_USBOE]); qe_pin_set_dedicated(fhci->pins[PIN_USBTP]); qe_pin_set_dedicated(fhci->pins[PIN_USBTN]); fhci_dbg(fhci, "<- %s\n", __func__); } /* generate the RESET condition on the bus */ void fhci_port_reset(void *lld) { struct fhci_usb *usb = (struct fhci_usb *)lld; struct fhci_hcd *fhci = usb->fhci; u8 mode; u16 mask; fhci_dbg(fhci, "-> %s\n", __func__); fhci_stop_sof_timer(fhci); /* disable the USB controller */ mode = in_8(&fhci->regs->usb_usmod); out_8(&fhci->regs->usb_usmod, mode & (~USB_MODE_EN)); /* disable idle interrupts */ mask = in_be16(&fhci->regs->usb_usbmr); out_be16(&fhci->regs->usb_usbmr, mask & (~USB_E_IDLE_MASK)); fhci_io_port_generate_reset(fhci); /* enable interrupt on this endpoint */ out_be16(&fhci->regs->usb_usbmr, mask); /* enable the USB controller */ mode = in_8(&fhci->regs->usb_usmod); out_8(&fhci->regs->usb_usmod, mode | USB_MODE_EN); fhci_start_sof_timer(fhci); fhci_dbg(fhci, "<- %s\n", __func__); } int fhci_hub_status_data(struct usb_hcd *hcd, char *buf) { struct fhci_hcd *fhci = hcd_to_fhci(hcd); int ret = 0; unsigned long flags; fhci_dbg(fhci, "-> %s\n", __func__); spin_lock_irqsave(&fhci->lock, flags); if (fhci->vroot_hub->port.wPortChange & (USB_PORT_STAT_C_CONNECTION | USB_PORT_STAT_C_ENABLE | USB_PORT_STAT_C_SUSPEND | USB_PORT_STAT_C_RESET | USB_PORT_STAT_C_OVERCURRENT)) { *buf = 1 << 1; ret = 1; fhci_dbg(fhci, "-- %s\n", __func__); } spin_unlock_irqrestore(&fhci->lock, flags); fhci_dbg(fhci, "<- %s\n", __func__); return ret; } int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength) { struct fhci_hcd *fhci = hcd_to_fhci(hcd); int retval = 0; struct usb_hub_status *hub_status; struct usb_port_status *port_status; unsigned long flags; spin_lock_irqsave(&fhci->lock, flags); fhci_dbg(fhci, "-> %s\n", __func__); switch (typeReq) { case ClearHubFeature: switch (wValue) { case C_HUB_LOCAL_POWER: case C_HUB_OVER_CURRENT: break; default: goto error; } break; case ClearPortFeature: fhci->vroot_hub->feature &= (1 << wValue); switch (wValue) { case USB_PORT_FEAT_ENABLE: fhci->vroot_hub->port.wPortStatus &= ~USB_PORT_STAT_ENABLE; fhci_port_disable(fhci); break; case USB_PORT_FEAT_C_ENABLE: fhci->vroot_hub->port.wPortChange &= ~USB_PORT_STAT_C_ENABLE; break; case USB_PORT_FEAT_SUSPEND: fhci->vroot_hub->port.wPortStatus &= ~USB_PORT_STAT_SUSPEND; fhci_stop_sof_timer(fhci); break; case USB_PORT_FEAT_C_SUSPEND: fhci->vroot_hub->port.wPortChange &= ~USB_PORT_STAT_C_SUSPEND; break; case USB_PORT_FEAT_POWER: fhci->vroot_hub->port.wPortStatus &= ~USB_PORT_STAT_POWER; fhci_config_transceiver(fhci, FHCI_PORT_POWER_OFF); break; case USB_PORT_FEAT_C_CONNECTION: fhci->vroot_hub->port.wPortChange &= ~USB_PORT_STAT_C_CONNECTION; break; case USB_PORT_FEAT_C_OVER_CURRENT: fhci->vroot_hub->port.wPortChange &= ~USB_PORT_STAT_C_OVERCURRENT; break; case USB_PORT_FEAT_C_RESET: fhci->vroot_hub->port.wPortChange &= ~USB_PORT_STAT_C_RESET; break; default: goto error; } break; case GetHubDescriptor: memcpy(buf, root_hub_des, sizeof(root_hub_des)); break; case GetHubStatus: hub_status = (struct usb_hub_status *)buf; hub_status->wHubStatus = cpu_to_le16(fhci->vroot_hub->hub.wHubStatus); hub_status->wHubChange = cpu_to_le16(fhci->vroot_hub->hub.wHubChange); break; case GetPortStatus: port_status = (struct usb_port_status *)buf; port_status->wPortStatus = cpu_to_le16(fhci->vroot_hub->port.wPortStatus); port_status->wPortChange = cpu_to_le16(fhci->vroot_hub->port.wPortChange); break; case SetHubFeature: switch (wValue) { case C_HUB_OVER_CURRENT: case C_HUB_LOCAL_POWER: break; default: goto error; } break; case SetPortFeature: fhci->vroot_hub->feature |= (1 << wValue); switch (wValue) { case USB_PORT_FEAT_ENABLE: fhci->vroot_hub->port.wPortStatus |= USB_PORT_STAT_ENABLE; fhci_port_enable(fhci->usb_lld); break; case USB_PORT_FEAT_SUSPEND: fhci->vroot_hub->port.wPortStatus |= USB_PORT_STAT_SUSPEND; fhci_stop_sof_timer(fhci); break; case USB_PORT_FEAT_RESET: fhci->vroot_hub->port.wPortStatus |= USB_PORT_STAT_RESET; fhci_port_reset(fhci->usb_lld); fhci->vroot_hub->port.wPortStatus |= USB_PORT_STAT_ENABLE; fhci->vroot_hub->port.wPortStatus &= ~USB_PORT_STAT_RESET; break; case USB_PORT_FEAT_POWER: fhci->vroot_hub->port.wPortStatus |= USB_PORT_STAT_POWER; fhci_config_transceiver(fhci, FHCI_PORT_WAITING); break; default: goto error; } break; default: error: retval = -EPIPE; } fhci_dbg(fhci, "<- %s\n", __func__); spin_unlock_irqrestore(&fhci->lock, flags); return retval; }
{ "pile_set_name": "Github" }
'use strict' const webpack = require('webpack') const LodashModuleReplacementPlugin = require('lodash-webpack-plugin') const env = process.env.NODE_ENV module.exports = { externals: { react: { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' }, redux: { root: 'Redux', commonjs2: 'redux', commonjs: 'redux', amd: 'redux' }, 'react-redux': { root: 'ReactRedux', commonjs2: 'react-redux', commonjs: 'react-redux', amd: 'react-redux' }, immutable: { root: 'Immutable', commonjs2: 'immutable', commonjs: 'immutable', amd: 'immutable' } }, devtool: env === 'production' ? 'source-map' : false, mode: env === 'production' ? 'production' : 'development', module: { rules: [ { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ } ] }, output: { library: 'ReduxForm', libraryTarget: 'umd' }, plugins: [ new LodashModuleReplacementPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(env) }) ] }
{ "pile_set_name": "Github" }
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #ifndef BT_SPHERE_MINKOWSKI_H #define BT_SPHERE_MINKOWSKI_H #include "btConvexInternalShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types ///The btSphereShape implements an implicit sphere, centered around a local origin with radius. ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexInternalShape { public: BT_DECLARE_ALIGNED_ALLOCATOR(); btSphereShape (btScalar radius) : btConvexInternalShape () { m_shapeType = SPHERE_SHAPE_PROXYTYPE; m_implicitShapeDimensions.setX(radius); m_collisionMargin = radius; } virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; //notice that the vectors should be unit length virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; btScalar getRadius() const { return m_implicitShapeDimensions.getX() * m_localScaling.getX();} void setUnscaledRadius(btScalar radius) { m_implicitShapeDimensions.setX(radius); btConvexInternalShape::setMargin(radius); } //debugging virtual const char* getName()const {return "SPHERE";} virtual void setMargin(btScalar margin) { btConvexInternalShape::setMargin(margin); } virtual btScalar getMargin() const { //to improve gjk behaviour, use radius+margin as the full margin, so never get into the penetration case //this means, non-uniform scaling is not supported anymore return getRadius(); } }; #endif //BT_SPHERE_MINKOWSKI_H
{ "pile_set_name": "Github" }
/* * Copyright 2010-2013 Eric Kok et al. * * Transdroid 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. * * Transdroid 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 Transdroid. If not, see <http://www.gnu.org/licenses/>. */ package org.transdroid.util; import java.security.cert.X509Certificate; import javax.net.ssl.X509TrustManager; public class IgnoreSSLTrustManager implements X509TrustManager { @Override public void checkClientTrusted(X509Certificate[] chain, String authType) { // Perform no check whatsoever on the validity of the SSL certificate } @Override public void checkServerTrusted(X509Certificate[] chain, String authType) { // Perform no check whatsoever on the validity of the SSL certificate } @Override public X509Certificate[] getAcceptedIssuers() { return null; } }
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-07-26 07:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('document', '0051_auto_20180718_0713'), ] operations = [ migrations.AddField( model_name='documentfield', name='description', field=models.CharField(blank=True, max_length=1024, null=True), ), ]
{ "pile_set_name": "Github" }
from net.common import * def rcnn_loss(scores, deltas, rcnn_labels, rcnn_targets): def modified_smooth_l1( deltas, targets, sigma=3.0): ''' ResultLoss = outside_weights * SmoothL1(inside_weights * (box_pred - box_targets)) SmoothL1(x) = 0.5 * (sigma * x)^2, if |x| < 1 / sigma^2 |x| - 0.5 / sigma^2, otherwise ''' sigma2 = sigma * sigma diffs = tf.subtract(deltas, targets) smooth_l1_signs = tf.cast(tf.less(tf.abs(diffs), 1.0 / sigma2), tf.float32) smooth_l1_option1 = tf.multiply(diffs, diffs) * 0.5 * sigma2 smooth_l1_option2 = tf.abs(diffs) - 0.5 / sigma2 smooth_l1_add = tf.multiply(smooth_l1_option1, smooth_l1_signs) + tf.multiply(smooth_l1_option2, 1-smooth_l1_signs) smooth_l1 = smooth_l1_add return smooth_l1 _, num_class = scores.get_shape().as_list() dim = np.prod(deltas.get_shape().as_list()[1:])//num_class rcnn_scores = tf.reshape(scores,[-1, num_class]) rcnn_cls_loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits=rcnn_scores, labels=rcnn_labels)) num = tf.shape(deltas)[0] idx = tf.range(num)*num_class + rcnn_labels deltas1 = tf.reshape(deltas,[-1, dim]) rcnn_deltas = tf.gather(deltas1, idx) # remove ignore label rcnn_targets = tf.reshape(rcnn_targets,[-1, dim]) rcnn_smooth_l1 = modified_smooth_l1(rcnn_deltas, rcnn_targets, sigma=3.0) rcnn_reg_loss = tf.reduce_mean(tf.reduce_sum(rcnn_smooth_l1, axis=1)) return rcnn_cls_loss, rcnn_reg_loss
{ "pile_set_name": "Github" }
#!/usr/bin/env bash heroku features:enable -a code-fund-ads preboot
{ "pile_set_name": "Github" }
/* * 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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.vision.v1.model; /** * A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative * to the original image and range from 0 to 1. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Vision API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class GoogleCloudVisionV1p6beta1NormalizedVertex extends com.google.api.client.json.GenericJson { /** * X coordinate. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Float x; /** * Y coordinate. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Float y; /** * X coordinate. * @return value or {@code null} for none */ public java.lang.Float getX() { return x; } /** * X coordinate. * @param x x or {@code null} for none */ public GoogleCloudVisionV1p6beta1NormalizedVertex setX(java.lang.Float x) { this.x = x; return this; } /** * Y coordinate. * @return value or {@code null} for none */ public java.lang.Float getY() { return y; } /** * Y coordinate. * @param y y or {@code null} for none */ public GoogleCloudVisionV1p6beta1NormalizedVertex setY(java.lang.Float y) { this.y = y; return this; } @Override public GoogleCloudVisionV1p6beta1NormalizedVertex set(String fieldName, Object value) { return (GoogleCloudVisionV1p6beta1NormalizedVertex) super.set(fieldName, value); } @Override public GoogleCloudVisionV1p6beta1NormalizedVertex clone() { return (GoogleCloudVisionV1p6beta1NormalizedVertex) super.clone(); } }
{ "pile_set_name": "Github" }
@import 'reset.less'; @import '1px.less'; @import 'center.less'; @import 'reddot.less'; @import 'transition.less'; @import 'loading.less'; @import 'close.less'; @import 'tap.less';
{ "pile_set_name": "Github" }
<VirtualHost *:80> DocumentRoot %TRAVIS_BUILD_DIR% <Directory "%TRAVIS_BUILD_DIR%"> Options FollowSymLinks MultiViews ExecCGI AllowOverride All Order deny,allow Allow from all </Directory> # Wire up Apache to use Travis CI's php-fpm. <IfModule mod_fastcgi.c> AddHandler php5-fcgi .php Action php5-fcgi /php5-fcgi Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization </IfModule> </VirtualHost>
{ "pile_set_name": "Github" }
<!-- <ng-template [ngTemplateOutlet]="templateTop" [ngTemplateOutletContext]="this"></ng-template> --> <mat-card class="card"> <div class="center"> <mat-icon class="icon" role="img" fontSet="mdi-set" fontIcon="mdi-tools" ></mat-icon> <h1>Coming soon!</h1> <a [href]="helpurl" target="_blank">Click to learn more.</a> </div> </mat-card>
{ "pile_set_name": "Github" }
package plugin import ( "net/rpc" "github.com/hashicorp/terraform/terraform" ) // UIOutput is an implementatin of terraform.UIOutput that communicates // over RPC. type UIOutput struct { Client *rpc.Client } func (o *UIOutput) Output(v string) { o.Client.Call("Plugin.Output", v, new(interface{})) } // UIOutputServer is the RPC server for serving UIOutput. type UIOutputServer struct { UIOutput terraform.UIOutput } func (s *UIOutputServer) Output( v string, reply *interface{}) error { s.UIOutput.Output(v) return nil }
{ "pile_set_name": "Github" }
package me.yokeyword.sample.demo_flow; import android.content.Intent; import android.os.Bundle; import com.google.android.material.navigation.NavigationView; import androidx.core.view.GravityCompat; import androidx.drawerlayout.widget.DrawerLayout; import androidx.appcompat.app.ActionBarDrawerToggle; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import me.yokeyword.fragmentation.ISupportFragment; import me.yokeyword.fragmentation.SupportFragment; import me.yokeyword.fragmentation.anim.FragmentAnimator; import me.yokeyword.sample.R; import me.yokeyword.sample.demo_flow.base.BaseMainFragment; import me.yokeyword.sample.demo_flow.base.MySupportActivity; import me.yokeyword.sample.demo_flow.base.MySupportFragment; import me.yokeyword.sample.demo_flow.ui.fragment.account.LoginFragment; import me.yokeyword.sample.demo_flow.ui.fragment.discover.DiscoverFragment; import me.yokeyword.sample.demo_flow.ui.fragment.home.HomeFragment; import me.yokeyword.sample.demo_flow.ui.fragment.shop.ShopFragment; /** * 流程式demo tip: 多使用右上角的"查看栈视图" * Created by YoKeyword on 16/1/29. */ public class MainActivity extends MySupportActivity implements NavigationView.OnNavigationItemSelectedListener, BaseMainFragment.OnFragmentOpenDrawerListener , LoginFragment.OnLoginSuccessListener { public static final String TAG = MainActivity.class.getSimpleName(); // 再点一次退出程序时间设置 private static final long WAIT_TIME = 2000L; private long TOUCH_TIME = 0; private DrawerLayout mDrawer; private NavigationView mNavigationView; private TextView mTvName; // NavigationView上的名字 private ImageView mImgNav; // NavigationView上的头像 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); MySupportFragment fragment = findFragment(HomeFragment.class); if (fragment == null) { loadRootFragment(R.id.fl_container, HomeFragment.newInstance()); } initView(); } /** * 设置动画,也可以使用setFragmentAnimator()设置 */ @Override public FragmentAnimator onCreateFragmentAnimator() { // 设置默认Fragment动画 默认竖向(和安卓5.0以上的动画相同) return super.onCreateFragmentAnimator(); // 设置横向(和安卓4.x动画相同) // return new DefaultHorizontalAnimator(); // 设置自定义动画 // return new FragmentAnimator(enter,exit,popEnter,popExit); } private void initView() { mDrawer = (DrawerLayout) findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, mDrawer, R.string.navigation_drawer_open, R.string.navigation_drawer_close); // mDrawer.setDrawerListener(toggle); toggle.syncState(); mNavigationView = (NavigationView) findViewById(R.id.nav_view); mNavigationView.setNavigationItemSelectedListener(this); mNavigationView.setCheckedItem(R.id.nav_home); LinearLayout llNavHeader = (LinearLayout) mNavigationView.getHeaderView(0); mTvName = (TextView) llNavHeader.findViewById(R.id.tv_name); mImgNav = (ImageView) llNavHeader.findViewById(R.id.img_nav); llNavHeader.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mDrawer.closeDrawer(GravityCompat.START); mDrawer.postDelayed(new Runnable() { @Override public void run() { goLogin(); } }, 250); } }); } @Override public void onBackPressedSupport() { if (mDrawer.isDrawerOpen(GravityCompat.START)) { mDrawer.closeDrawer(GravityCompat.START); } else { ISupportFragment topFragment = getTopFragment(); // 主页的Fragment if (topFragment instanceof BaseMainFragment) { mNavigationView.setCheckedItem(R.id.nav_home); } if (getSupportFragmentManager().getBackStackEntryCount() > 1) { pop(); } else { if (System.currentTimeMillis() - TOUCH_TIME < WAIT_TIME) { finish(); } else { TOUCH_TIME = System.currentTimeMillis(); Toast.makeText(this, R.string.press_again_exit, Toast.LENGTH_SHORT).show(); } } } } /** * 打开抽屉 */ @Override public void onOpenDrawer() { if (!mDrawer.isDrawerOpen(GravityCompat.START)) { mDrawer.openDrawer(GravityCompat.START); } } @Override public boolean onNavigationItemSelected(final MenuItem item) { mDrawer.closeDrawer(GravityCompat.START); mDrawer.postDelayed(new Runnable() { @Override public void run() { int id = item.getItemId(); final ISupportFragment topFragment = getTopFragment(); MySupportFragment myHome = (MySupportFragment) topFragment; if (id == R.id.nav_home) { HomeFragment fragment = findFragment(HomeFragment.class); Bundle newBundle = new Bundle(); newBundle.putString("from", "From:" + topFragment.getClass().getSimpleName()); fragment.putNewBundle(newBundle); myHome.start(fragment, SupportFragment.SINGLETASK); } else if (id == R.id.nav_discover) { DiscoverFragment fragment = findFragment(DiscoverFragment.class); if (fragment == null) { myHome.startWithPopTo(DiscoverFragment.newInstance(), HomeFragment.class, false); } else { // 如果已经在栈内,则以SingleTask模式start myHome.start(fragment, SupportFragment.SINGLETASK); } } else if (id == R.id.nav_shop) { ShopFragment fragment = findFragment(ShopFragment.class); if (fragment == null) { myHome.startWithPopTo(ShopFragment.newInstance(), HomeFragment.class, false); } else { // 如果已经在栈内,则以SingleTask模式start,也可以用popTo // start(fragment, SupportFragment.SINGLETASK); myHome.popTo(ShopFragment.class, false); } } else if (id == R.id.nav_login) { goLogin(); } else if (id == R.id.nav_swipe_back) { startActivity(new Intent(MainActivity.this, SwipeBackSampleActivity.class)); } } }, 300); return true; } private void goLogin() { start(LoginFragment.newInstance()); } @Override public void onLoginSuccess(String account) { mTvName.setText(account); mImgNav.setImageResource(R.drawable.ic_account_circle_white_48dp); Toast.makeText(this, R.string.sign_in_success, Toast.LENGTH_SHORT).show(); } }
{ "pile_set_name": "Github" }
/* dialog_information.png - 863 bytes */ static const unsigned char dialog_information_16x16_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x43, 0xbb, 0x7f, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xd5, 0x03, 0x02, 0x06, 0x20, 0x32, 0x3a, 0x50, 0x9c, 0xf7, 0x00, 0x00, 0x00, 0x35, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x30, 0x34, 0x20, 0x4a, 0x61, 0x6b, 0x75, 0x62, 0x20, 0x53, 0x74, 0x65, 0x69, 0x6e, 0x65, 0x72, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x54, 0x68, 0x65, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x90, 0xd9, 0x8b, 0x6f, 0x00, 0x00, 0x02, 0xab, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x95, 0x92, 0x4b, 0x48, 0x54, 0x71, 0x14, 0xc6, 0xbf, 0xff, 0xdc, 0x3b, 0xe3, 0xbd, 0x3a, 0xd7, 0x47, 0x26, 0x59, 0x6a, 0x66, 0x52, 0x3e, 0x08, 0x45, 0x22, 0x13, 0xc4, 0xa1, 0x06, 0x25, 0xd4, 0xa4, 0xa2, 0x90, 0x6c, 0x62, 0xca, 0x70, 0x61, 0xb4, 0x08, 0x13, 0xb2, 0x45, 0xcb, 0x10, 0x31, 0xaa, 0x45, 0x8f, 0x4d, 0xa2, 0x8b, 0x88, 0xa0, 0x02, 0x03, 0x03, 0x25, 0xc8, 0x10, 0x49, 0x74, 0x26, 0x4a, 0x4a, 0xcd, 0x8a, 0x34, 0x95, 0x4c, 0x9d, 0x71, 0x74, 0x9c, 0xb9, 0x77, 0xae, 0xf7, 0xf5, 0x6f, 0xe5, 0xa0, 0x35, 0x11, 0x7e, 0xab, 0x73, 0xe0, 0xfb, 0x7e, 0x9c, 0x73, 0x38, 0x04, 0x11, 0x54, 0x5c, 0xd9, 0xd4, 0x4c, 0x29, 0x1c, 0x06, 0x25, 0x29, 0x20, 0x84, 0x98, 0x88, 0x31, 0xcb, 0x10, 0xfa, 0xb4, 0xff, 0x65, 0x6b, 0xe3, 0x9f, 0x5e, 0x76, 0x7d, 0x53, 0x54, 0xde, 0x94, 0xc1, 0x30, 0xa4, 0xef, 0x62, 0x6d, 0x65, 0x5a, 0xb9, 0xbd, 0x00, 0x71, 0x02, 0x0f, 0x55, 0x37, 0xe0, 0xf1, 0x05, 0x53, 0x7b, 0x7a, 0x3f, 0x5c, 0x21, 0x26, 0xe6, 0x2c, 0xa5, 0x7a, 0x49, 0x7f, 0x57, 0xeb, 0xd7, 0x88, 0x00, 0x96, 0x25, 0x6f, 0xef, 0xb5, 0xd4, 0x6f, 0xdf, 0x93, 0xb9, 0x63, 0x2c, 0x10, 0x52, 0x46, 0x67, 0x7d, 0x92, 0x12, 0x5a, 0x55, 0x59, 0x45, 0xd3, 0xa3, 0x6d, 0x25, 0xf9, 0x59, 0xe9, 0xe9, 0xc9, 0x7b, 0x5b, 0x6e, 0x3d, 0x76, 0x01, 0x88, 0x5f, 0xcb, 0x30, 0x6b, 0x45, 0x49, 0xd5, 0xd5, 0xdb, 0xf5, 0xe7, 0x8f, 0x96, 0x15, 0x1f, 0xcc, 0xf9, 0xac, 0xa8, 0xba, 0x9b, 0xb7, 0x98, 0x15, 0x00, 0x44, 0xa7, 0x20, 0xaa, 0x4e, 0x0d, 0xef, 0x4a, 0x68, 0x96, 0x8b, 0xe6, 0x10, 0xcd, 0x73, 0x3b, 0x75, 0x26, 0x25, 0x73, 0x72, 0xfc, 0x6d, 0x27, 0x00, 0x98, 0xc2, 0x24, 0x86, 0x3d, 0x57, 0x6e, 0x2f, 0x40, 0x20, 0xa4, 0x8e, 0xb1, 0x2c, 0x43, 0x2d, 0x66, 0xc6, 0x20, 0x84, 0x50, 0x50, 0x18, 0x9a, 0x6e, 0x28, 0x94, 0xc2, 0xe8, 0x1a, 0x9c, 0xec, 0x2e, 0x2a, 0xcc, 0x01, 0xc3, 0x72, 0xa7, 0xd6, 0x72, 0x61, 0xc0, 0xaa, 0x42, 0xe3, 0x05, 0x2b, 0x0f, 0x59, 0xd1, 0x57, 0x55, 0xcd, 0x48, 0x34, 0x33, 0xa6, 0x0b, 0x89, 0xb1, 0x9c, 0x73, 0x57, 0xb2, 0xe0, 0xc8, 0xdf, 0xbd, 0xd5, 0x01, 0x25, 0x90, 0x3a, 0xe5, 0x11, 0xfd, 0x3c, 0xcf, 0x21, 0x20, 0xa9, 0x5c, 0x6d, 0x5d, 0x83, 0x69, 0xc3, 0x0d, 0x08, 0x21, 0x44, 0xd1, 0x74, 0x48, 0xb2, 0x6a, 0x32, 0x0c, 0x2a, 0x26, 0x58, 0xa3, 0xe0, 0xf5, 0x4b, 0x2e, 0x51, 0x0a, 0x31, 0x2b, 0x41, 0x49, 0x1b, 0x9e, 0x96, 0x86, 0x15, 0x45, 0x37, 0xa9, 0xaa, 0xb1, 0x16, 0xe1, 0x01, 0x88, 0x61, 0x40, 0x0c, 0xcf, 0x4a, 0x5e, 0x5f, 0x20, 0x46, 0x94, 0x55, 0xcb, 0x8a, 0xa4, 0xfa, 0x33, 0x92, 0x63, 0x31, 0xfa, 0xc3, 0xf7, 0x5e, 0x54, 0x74, 0x3a, 0xb7, 0x24, 0x29, 0xee, 0x6f, 0x8b, 0x1e, 0xc1, 0x6a, 0x49, 0xf0, 0xfa, 0x83, 0x88, 0x13, 0x78, 0xb5, 0xa3, 0xad, 0x59, 0xdc, 0xb0, 0x82, 0x99, 0xd1, 0x06, 0x7a, 0xde, 0x0c, 0x83, 0x8f, 0x62, 0x73, 0x27, 0x7e, 0x2d, 0x8b, 0x00, 0xf0, 0xd3, 0x27, 0xea, 0x1f, 0x27, 0xbc, 0xfe, 0xde, 0xe1, 0x99, 0x85, 0x25, 0x51, 0x36, 0x57, 0xec, 0x4f, 0xab, 0x18, 0x72, 0x8d, 0xc1, 0xca, 0x61, 0xe2, 0xaf, 0x1b, 0x6c, 0x13, 0x42, 0xc7, 0x3b, 0xbb, 0xfa, 0xe5, 0x99, 0xe9, 0xf9, 0xec, 0xb4, 0x24, 0xeb, 0xa1, 0x6b, 0xed, 0x03, 0x37, 0xcf, 0x1c, 0xce, 0xba, 0xe4, 0xfe, 0x32, 0x1f, 0x62, 0x58, 0x92, 0xe8, 0xb4, 0x67, 0x55, 0xfb, 0x17, 0x97, 0x72, 0xdc, 0x83, 0x23, 0xaa, 0xc0, 0xfa, 0x4a, 0xc3, 0xab, 0xaf, 0xff, 0x83, 0x63, 0xa7, 0x1b, 0xab, 0x64, 0x2a, 0x3c, 0x2f, 0x2b, 0x2d, 0xb2, 0x14, 0x1e, 0xc8, 0x46, 0x34, 0xcf, 0x41, 0xd5, 0x75, 0xf8, 0x96, 0x45, 0x0c, 0xb9, 0xc6, 0xf1, 0xce, 0x35, 0xa2, 0xc5, 0x71, 0xd2, 0xe5, 0x27, 0xed, 0x37, 0x1e, 0x44, 0x04, 0x00, 0x40, 0x6d, 0x5d, 0x43, 0x62, 0x88, 0x6e, 0x71, 0x05, 0x64, 0xa4, 0x3b, 0x4e, 0x24, 0x31, 0x84, 0x00, 0x2c, 0x0b, 0x74, 0x75, 0xcf, 0x05, 0x19, 0xcd, 0xbf, 0xaf, 0xa3, 0xed, 0xce, 0x14, 0xfe, 0xa7, 0x9a, 0x1a, 0xbb, 0xd5, 0xe9, 0xb4, 0x51, 0xcf, 0x62, 0x1f, 0x15, 0x65, 0x17, 0xfd, 0x3e, 0xf9, 0x8c, 0x3a, 0x9d, 0x36, 0x1a, 0xc9, 0xcb, 0xfe, 0x83, 0xa1, 0x02, 0xc0, 0xfd, 0xbb, 0x0f, 0x91, 0x9d, 0x9b, 0x8d, 0xe9, 0xa9, 0x69, 0x6c, 0x5a, 0x4e, 0xa7, 0x8d, 0xce, 0xcc, 0xbe, 0x32, 0x02, 0xd2, 0x10, 0xfd, 0x34, 0xfa, 0xc2, 0xd8, 0xec, 0x04, 0x00, 0x50, 0x55, 0x7d, 0xf2, 0x7a, 0x8d, 0x20, 0xc4, 0x1f, 0x59, 0x58, 0x58, 0x78, 0x9d, 0x97, 0x17, 0xfb, 0x28, 0x92, 0xe9, 0x37, 0x56, 0x4c, 0x36, 0x5e, 0x7c, 0x8a, 0x1d, 0x04, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82}; /* dialog_information.png - 2022 bytes */ static const unsigned char dialog_information_24x24_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x10, 0x06, 0x00, 0x00, 0x00, 0xb0, 0xe7, 0xe1, 0xbb, 0x00, 0x00, 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x43, 0xbb, 0x7f, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x09, 0x76, 0x70, 0x41, 0x67, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x78, 0x4c, 0xa5, 0xa6, 0x00, 0x00, 0x07, 0x71, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0xd5, 0x97, 0x5f, 0x4c, 0x1c, 0xd5, 0x17, 0xc7, 0xcf, 0x9d, 0x3b, 0x7f, 0x76, 0x87, 0x59, 0xd8, 0xff, 0x05, 0x8a, 0xa2, 0x82, 0x2d, 0x01, 0x6a, 0x11, 0x68, 0x42, 0x8a, 0x56, 0xb0, 0x16, 0xa3, 0xa2, 0x09, 0xc6, 0xc2, 0x43, 0xf5, 0xc1, 0xc4, 0x07, 0x35, 0x31, 0x8d, 0x51, 0x1f, 0x6c, 0xa2, 0x0f, 0x3e, 0x19, 0x23, 0xa9, 0x06, 0xa3, 0x26, 0xad, 0x25, 0x0a, 0x89, 0x69, 0x0d, 0x31, 0x56, 0xab, 0x8d, 0x0f, 0xd5, 0x8a, 0x69, 0x00, 0x53, 0x28, 0x74, 0xa9, 0x29, 0x8d, 0x2b, 0xff, 0x97, 0x5d, 0xf6, 0xff, 0xcc, 0xce, 0xce, 0xce, 0xcc, 0x9d, 0xeb, 0xc3, 0xb8, 0xf1, 0xd7, 0xfc, 0x7e, 0x09, 0x14, 0xf1, 0x97, 0x78, 0x1e, 0xe6, 0x9b, 0xc9, 0xdc, 0xb9, 0xf7, 0x7c, 0xee, 0x39, 0xe7, 0xde, 0x1c, 0x80, 0x7f, 0xb9, 0xa1, 0xad, 0xfe, 0xf8, 0xec, 0xb3, 0xcf, 0x3d, 0xf7, 0xf2, 0xcb, 0x2c, 0x0b, 0x00, 0x80, 0xd0, 0xf3, 0xcf, 0x23, 0x84, 0x31, 0xcf, 0x3f, 0xfe, 0x38, 0xa5, 0x94, 0x52, 0xda, 0xd8, 0x08, 0x60, 0x59, 0x86, 0x11, 0x0c, 0x02, 0x30, 0x0c, 0xc7, 0xc5, 0x62, 0x08, 0x21, 0x84, 0x50, 0x28, 0x44, 0x29, 0x21, 0xba, 0xfe, 0xf5, 0xd7, 0x00, 0x00, 0x94, 0x7e, 0xfc, 0xf1, 0xe0, 0xe0, 0xc9, 0x93, 0xc7, 0x8f, 0x9b, 0xe6, 0xff, 0x0d, 0xc0, 0x76, 0xfc, 0xfe, 0xfb, 0x6d, 0xc7, 0x3e, 0xfb, 0xec, 0xc0, 0x81, 0xce, 0xce, 0x83, 0x07, 0x2b, 0x2a, 0x6a, 0x6b, 0x77, 0xef, 0x6e, 0x68, 0x10, 0x04, 0x49, 0x92, 0x24, 0x51, 0x04, 0x10, 0x04, 0x9e, 0xe7, 0x38, 0x00, 0x45, 0xc9, 0xe5, 0x34, 0x0d, 0x20, 0x1e, 0x4f, 0x26, 0x33, 0x19, 0x80, 0xdf, 0x7f, 0xbf, 0x71, 0xe3, 0xda, 0x35, 0x4d, 0x9b, 0x9c, 0x9c, 0x98, 0xb8, 0x74, 0x29, 0x1a, 0xb5, 0x2c, 0xd3, 0x2c, 0x14, 0x9e, 0x79, 0xc6, 0x06, 0x19, 0x1d, 0xfd, 0xc7, 0x00, 0x6c, 0xc7, 0x1f, 0x78, 0xc0, 0xef, 0x0f, 0x06, 0xcb, 0xcb, 0xbf, 0xfd, 0xf6, 0xd0, 0xa1, 0xee, 0xee, 0xbe, 0x3e, 0x51, 0x34, 0x0c, 0x8c, 0x1d, 0x0e, 0x80, 0x50, 0x68, 0x61, 0x21, 0x9d, 0x06, 0x90, 0x24, 0xa7, 0x13, 0x00, 0x80, 0x10, 0x4a, 0x09, 0xb1, 0xac, 0x42, 0xc1, 0x30, 0x4c, 0xd3, 0x34, 0x2d, 0xcb, 0xb2, 0x10, 0xa2, 0xb4, 0xae, 0xae, 0xaa, 0xca, 0xe3, 0x61, 0xd9, 0xaa, 0xaa, 0xb2, 0x32, 0x9e, 0xc7, 0x78, 0x64, 0xe4, 0xf4, 0xe9, 0xe1, 0xe1, 0x7c, 0x3e, 0x12, 0x59, 0x59, 0x59, 0x5e, 0x7e, 0xe4, 0x11, 0x1b, 0xe4, 0xe2, 0xc5, 0x6d, 0x03, 0xb0, 0x1d, 0xaf, 0xa8, 0x00, 0x60, 0x18, 0x96, 0x0d, 0x85, 0x5e, 0x78, 0xe1, 0xe8, 0xd1, 0xd7, 0x5e, 0xf3, 0x7a, 0xe7, 0xe6, 0x22, 0x11, 0x5d, 0x07, 0x98, 0x9f, 0x5f, 0x5f, 0x4f, 0x26, 0x01, 0x9a, 0x9b, 0x6b, 0x6b, 0x3d, 0x1e, 0xcb, 0x92, 0x24, 0x87, 0x83, 0x65, 0x09, 0xa1, 0x14, 0x80, 0x52, 0xd3, 0xa4, 0x94, 0x52, 0x00, 0xcb, 0x8a, 0xc7, 0xb3, 0xd9, 0x42, 0x41, 0xd3, 0x42, 0xa1, 0x85, 0x85, 0x54, 0x4a, 0xd7, 0x7d, 0x3e, 0x97, 0xcb, 0xe1, 0x90, 0xa4, 0x83, 0x07, 0x1b, 0x1b, 0x2b, 0x2a, 0x24, 0x69, 0x60, 0xe0, 0xbd, 0xf7, 0xfa, 0xfb, 0xd3, 0x69, 0x4d, 0x53, 0xd5, 0x5c, 0xae, 0xa1, 0xc1, 0x06, 0x89, 0x44, 0x36, 0xf2, 0x8f, 0xd9, 0x04, 0x23, 0x62, 0x98, 0xa3, 0x47, 0x7b, 0x7a, 0x0e, 0x1f, 0x3e, 0x72, 0xa4, 0xac, 0x2c, 0x1e, 0x57, 0x14, 0x4a, 0x01, 0x42, 0xa1, 0xc5, 0xc5, 0xf5, 0x75, 0x80, 0xce, 0xce, 0x7b, 0xee, 0x09, 0x06, 0x09, 0x09, 0x04, 0xca, 0xca, 0x04, 0x41, 0xd3, 0x4a, 0x4a, 0x1c, 0x0e, 0x96, 0xcd, 0xe5, 0x24, 0xc9, 0xe9, 0xe4, 0xf9, 0x5c, 0xce, 0xe5, 0x72, 0x3a, 0x39, 0x4e, 0x96, 0xab, 0xaa, 0xfc, 0x7e, 0x51, 0x2c, 0x14, 0xbc, 0x5e, 0x97, 0x8b, 0xe7, 0x13, 0x89, 0x44, 0x22, 0x9b, 0xcd, 0xe7, 0x15, 0x65, 0x76, 0x76, 0x79, 0x39, 0x93, 0x51, 0xd5, 0x87, 0x1f, 0xee, 0xee, 0xee, 0xe9, 0x91, 0xa4, 0xe2, 0x7a, 0x9b, 0x8d, 0xc0, 0x86, 0x00, 0x08, 0x31, 0x0c, 0xc7, 0x75, 0x75, 0xb9, 0xdd, 0x7e, 0x7f, 0x30, 0x88, 0xf1, 0xf4, 0xf4, 0xfc, 0x7c, 0x3a, 0x0d, 0x50, 0x55, 0x15, 0x0c, 0xf2, 0xbc, 0x61, 0x60, 0x8c, 0x31, 0x42, 0x9a, 0x66, 0x17, 0x69, 0x3e, 0xcf, 0x30, 0x0c, 0x83, 0x50, 0x2e, 0x87, 0x31, 0x42, 0x08, 0xc9, 0xb2, 0xfd, 0x3d, 0x9b, 0xe5, 0x38, 0x96, 0x65, 0x98, 0x6c, 0xb6, 0xa4, 0x44, 0x10, 0x58, 0x36, 0x1e, 0x77, 0xb9, 0x44, 0x91, 0xe3, 0xd6, 0xd7, 0xd7, 0xd6, 0xd2, 0x69, 0x55, 0xcd, 0x64, 0x6a, 0x6a, 0xee, 0xbc, 0xb3, 0xba, 0x9a, 0x52, 0x84, 0x30, 0x66, 0xd9, 0x43, 0x87, 0x36, 0x0b, 0xc0, 0x6e, 0x34, 0x80, 0x52, 0xcb, 0x32, 0xcd, 0xdd, 0xbb, 0x1d, 0x0e, 0x87, 0xc3, 0xe1, 0x00, 0x88, 0xc5, 0x32, 0x99, 0xc5, 0x45, 0x00, 0x86, 0x61, 0x18, 0xa7, 0x53, 0x96, 0xed, 0x51, 0x96, 0x85, 0x10, 0x42, 0x00, 0xaa, 0x6a, 0x03, 0xa8, 0xaa, 0x0d, 0x50, 0x04, 0xd3, 0xf5, 0x74, 0x5a, 0x51, 0x0a, 0x85, 0x44, 0x42, 0x92, 0x9c, 0x4e, 0x8e, 0x53, 0x14, 0xcb, 0xa2, 0x14, 0xc0, 0x34, 0xb3, 0x59, 0x55, 0xd5, 0x75, 0x86, 0x09, 0x04, 0x3c, 0x9e, 0xd2, 0xd2, 0x60, 0x90, 0x52, 0x42, 0x4c, 0xb3, 0xae, 0x6e, 0xdb, 0x00, 0xec, 0xdc, 0x8f, 0x44, 0x52, 0xa9, 0x6c, 0x56, 0x96, 0x6b, 0x6a, 0x4a, 0x4b, 0x45, 0x91, 0xe7, 0x55, 0xd5, 0x34, 0x2d, 0x8b, 0xd2, 0x4c, 0x26, 0x1a, 0x4d, 0xa7, 0xf3, 0x79, 0x4d, 0x2b, 0x2f, 0xf7, 0x78, 0x44, 0xd1, 0x30, 0x38, 0x0e, 0x63, 0x84, 0x54, 0x95, 0x10, 0x4a, 0x29, 0x4d, 0xa7, 0x15, 0x45, 0x55, 0x0d, 0x23, 0x12, 0xd1, 0x75, 0xd3, 0x24, 0x44, 0x96, 0x5d, 0x2e, 0xa7, 0x93, 0xe7, 0x79, 0xde, 0x34, 0x09, 0xa1, 0x14, 0x21, 0x86, 0x01, 0x40, 0xc8, 0xe7, 0xcb, 0xe5, 0xf2, 0x79, 0x4d, 0x2b, 0x14, 0x18, 0x06, 0x63, 0x8c, 0x57, 0x57, 0xb7, 0x2d, 0x85, 0xec, 0x28, 0x8c, 0x8e, 0x26, 0x93, 0x89, 0x44, 0x2c, 0x46, 0xe9, 0x8e, 0x1d, 0x6e, 0xb7, 0xd3, 0xa9, 0xeb, 0x0e, 0x07, 0xc7, 0x61, 0x9c, 0xcb, 0x35, 0x37, 0xd7, 0xd4, 0xf8, 0xfd, 0x5e, 0x6f, 0x20, 0x50, 0x56, 0xe6, 0x70, 0xb0, 0x6c, 0x32, 0xa9, 0x28, 0x85, 0xc2, 0xf5, 0xeb, 0xa9, 0x94, 0xa2, 0xe8, 0xfa, 0x95, 0x2b, 0xc5, 0x94, 0x69, 0x69, 0xa9, 0xad, 0xf5, 0xfb, 0x9b, 0x9a, 0xee, 0xbb, 0xaf, 0xbe, 0x7e, 0xc7, 0x8e, 0x03, 0x07, 0x34, 0x4d, 0xd7, 0x09, 0xc1, 0x78, 0xe7, 0x4e, 0xbf, 0x5f, 0x92, 0x30, 0x5e, 0x5b, 0x8b, 0x46, 0x63, 0x31, 0x4d, 0xb3, 0x57, 0x1c, 0x1b, 0xdb, 0xc6, 0x08, 0x10, 0xa2, 0xeb, 0xc7, 0x8f, 0x4f, 0x4f, 0x5f, 0xba, 0xf4, 0xc3, 0x0f, 0x7d, 0x7d, 0x8f, 0x3e, 0xda, 0xdb, 0xfb, 0xf4, 0xd3, 0x2c, 0x7b, 0xed, 0xda, 0xd2, 0x52, 0x26, 0xa3, 0xeb, 0x18, 0x33, 0x0c, 0x42, 0x84, 0x04, 0x83, 0x6e, 0xb7, 0x28, 0x56, 0x57, 0x57, 0x57, 0x07, 0x02, 0x92, 0x54, 0x5b, 0x0b, 0x80, 0x10, 0x40, 0xf1, 0x69, 0x59, 0x76, 0xca, 0xe4, 0xf3, 0xba, 0x6e, 0x18, 0x84, 0x2c, 0x2c, 0xdc, 0x7e, 0x7b, 0x20, 0x20, 0x49, 0x6b, 0x6b, 0x4d, 0x4d, 0x77, 0xdc, 0x11, 0x0c, 0x3e, 0xf4, 0xd0, 0xc0, 0xc0, 0xc0, 0xc0, 0x07, 0x1f, 0x58, 0x96, 0x65, 0x99, 0xa6, 0x61, 0x7c, 0xf4, 0xd1, 0x66, 0x01, 0xf0, 0x46, 0x03, 0xae, 0x5c, 0x99, 0x9c, 0x1c, 0x1b, 0x8b, 0x46, 0xef, 0xbe, 0xbb, 0xae, 0xae, 0xa9, 0x29, 0x18, 0xc4, 0x18, 0x80, 0xd2, 0xbd, 0x7b, 0xdb, 0xda, 0x5a, 0x5a, 0x1a, 0x1b, 0x59, 0x36, 0x95, 0x52, 0x94, 0x42, 0x61, 0x61, 0xc1, 0xe7, 0x2b, 0x2d, 0x15, 0x04, 0x51, 0x9c, 0x9e, 0x0e, 0x87, 0x93, 0xc9, 0xfe, 0x7e, 0xfb, 0xec, 0xff, 0xfe, 0x7b, 0x59, 0xd6, 0x34, 0xc3, 0x18, 0x1a, 0x2a, 0x2d, 0x15, 0x45, 0x8e, 0x6b, 0x6d, 0x55, 0x14, 0x4d, 0x33, 0xcd, 0x8b, 0x17, 0x45, 0x91, 0xe3, 0x1c, 0x8e, 0xee, 0xee, 0x89, 0x89, 0xf1, 0xf1, 0xb1, 0x31, 0x5d, 0xbf, 0x7c, 0x79, 0x72, 0x72, 0x72, 0xf2, 0xec, 0xd9, 0x53, 0xa7, 0x4e, 0x9c, 0xe8, 0xef, 0xff, 0xf0, 0xc3, 0x6d, 0x4d, 0x21, 0xdb, 0x2c, 0xcb, 0x34, 0x5f, 0x7d, 0x75, 0x72, 0xf2, 0x97, 0x5f, 0xc6, 0xc7, 0x6f, 0xdc, 0x48, 0x26, 0xa3, 0xd1, 0x95, 0x15, 0xa7, 0x93, 0x10, 0xcb, 0x42, 0xc8, 0x34, 0x55, 0xb5, 0x50, 0x20, 0x64, 0x75, 0x55, 0x92, 0x9c, 0x4e, 0x96, 0x45, 0xc8, 0xde, 0xfb, 0xd5, 0x55, 0xb7, 0x5b, 0x14, 0x79, 0xde, 0x30, 0xec, 0x39, 0x42, 0x21, 0x00, 0x4a, 0x59, 0xb6, 0xb2, 0x32, 0x95, 0x8a, 0xc7, 0x23, 0x11, 0x5d, 0x3f, 0x77, 0xee, 0xdc, 0xb9, 0x6f, 0xbe, 0x59, 0x5b, 0xb3, 0x2c, 0x42, 0x4c, 0xf3, 0xa5, 0x97, 0x36, 0xef, 0xcf, 0x2d, 0x02, 0xd8, 0x17, 0x8b, 0x61, 0xd8, 0xa7, 0x44, 0x6f, 0xef, 0x57, 0x5f, 0x8d, 0x8c, 0x8c, 0x8c, 0x70, 0x9c, 0xdf, 0xef, 0x72, 0x39, 0x9d, 0xe5, 0xe5, 0x33, 0x33, 0xbf, 0xfe, 0xfa, 0xdb, 0x6f, 0xe1, 0x70, 0x36, 0x9b, 0x4c, 0xae, 0xaf, 0x7b, 0xbd, 0x76, 0x6a, 0x99, 0xe6, 0xe2, 0xe2, 0xc2, 0x42, 0x38, 0xec, 0xf3, 0x85, 0x42, 0xa1, 0xd0, 0xec, 0xec, 0x8f, 0x3f, 0x62, 0x8c, 0x10, 0xc3, 0xec, 0xdf, 0x3f, 0x3c, 0x3c, 0x34, 0x34, 0x3c, 0xec, 0xf5, 0x5a, 0x16, 0x21, 0x84, 0xf4, 0xf5, 0xd9, 0xf3, 0x17, 0x6b, 0xe0, 0x1f, 0x00, 0xb8, 0x19, 0x24, 0x1c, 0x56, 0xd5, 0x7c, 0x3e, 0x9f, 0x8f, 0x44, 0x56, 0x57, 0x57, 0x57, 0x97, 0x96, 0x4a, 0x4a, 0x30, 0x06, 0x50, 0xd5, 0x07, 0x1f, 0xbc, 0x7c, 0x79, 0x7c, 0xfc, 0xbb, 0xef, 0x5e, 0x7c, 0x51, 0x51, 0xd2, 0xe9, 0xa9, 0xa9, 0xcf, 0x3f, 0x9f, 0x9a, 0x9a, 0x9a, 0xba, 0x70, 0xe1, 0xfd, 0xf7, 0x45, 0xb1, 0xa4, 0x84, 0x65, 0x5f, 0x7f, 0x5d, 0x96, 0x15, 0x25, 0x95, 0xd2, 0x34, 0x59, 0x96, 0x65, 0x59, 0x8e, 0x44, 0x8a, 0xf3, 0xdd, 0xaa, 0x1f, 0x5b, 0x06, 0x28, 0x9a, 0x5d, 0x6c, 0xaf, 0xbc, 0x72, 0xf6, 0xec, 0xc8, 0xc8, 0xe9, 0xd3, 0x95, 0x95, 0x0c, 0x43, 0x29, 0xc6, 0x3e, 0x5f, 0x57, 0x57, 0x57, 0xd7, 0x93, 0x4f, 0xf2, 0xbc, 0xcf, 0xe7, 0xf1, 0xec, 0xdd, 0xcb, 0x30, 0x1d, 0x1d, 0x9d, 0x9d, 0x4f, 0x3d, 0xe5, 0x70, 0x10, 0x42, 0x08, 0xc7, 0xed, 0xdc, 0x79, 0xea, 0xd4, 0xe0, 0xe0, 0xa7, 0x9f, 0xde, 0x76, 0x1b, 0x21, 0x84, 0x10, 0xf2, 0xc6, 0x1b, 0x5b, 0x5d, 0xbf, 0x68, 0x9b, 0x38, 0x85, 0xfe, 0xb7, 0xcd, 0xce, 0x2e, 0x2f, 0x0b, 0x42, 0x3c, 0x5e, 0x5e, 0xae, 0x28, 0x89, 0x04, 0x42, 0xd7, 0xaf, 0xcf, 0xcd, 0x5d, 0xb8, 0x00, 0xa0, 0xaa, 0xb2, 0xac, 0xeb, 0xff, 0xb1, 0x43, 0x0c, 0xc3, 0x00, 0x00, 0xac, 0xad, 0xc5, 0x62, 0x00, 0x00, 0x2b, 0x2b, 0x2b, 0x2b, 0xf3, 0xf3, 0x0c, 0x33, 0x38, 0x78, 0xf2, 0xe4, 0x89, 0x13, 0x5f, 0x7e, 0xf9, 0x77, 0x01, 0xb6, 0x1c, 0x81, 0x89, 0x89, 0xf3, 0xe7, 0xdf, 0x7e, 0x7b, 0x7c, 0xbc, 0xbd, 0xfd, 0xde, 0x7b, 0x0b, 0x05, 0x00, 0x97, 0x4b, 0x10, 0x42, 0x21, 0x4a, 0xdb, 0xdb, 0xdb, 0xdb, 0xbb, 0xbb, 0x01, 0x3a, 0x3a, 0x3a, 0x3a, 0x1e, 0x7b, 0x0c, 0xa0, 0xbe, 0xbe, 0xbe, 0x7e, 0xcf, 0x1e, 0x00, 0x9f, 0xcf, 0xed, 0xc6, 0x18, 0xa0, 0xa6, 0xa6, 0xba, 0x1a, 0x6d, 0xb9, 0x0b, 0xf9, 0x6f, 0xdb, 0xf0, 0x18, 0xdd, 0xc8, 0x2a, 0x2b, 0x2b, 0x2b, 0x3d, 0x1e, 0x55, 0x15, 0x04, 0x41, 0x08, 0x04, 0xba, 0xba, 0x58, 0x16, 0xe3, 0xa5, 0x25, 0x00, 0x9e, 0x17, 0x04, 0x9e, 0x07, 0xc8, 0xe5, 0x14, 0x25, 0x93, 0x01, 0xf8, 0xf9, 0xe7, 0xd1, 0xd1, 0x99, 0x19, 0x80, 0xab, 0x57, 0xaf, 0x5e, 0x0d, 0x87, 0xdf, 0x7c, 0x73, 0x66, 0x66, 0x66, 0x26, 0x1c, 0xfe, 0xe9, 0xa7, 0xbf, 0xbb, 0xfe, 0x96, 0x53, 0xe8, 0x4f, 0x7e, 0xdc, 0xd0, 0xd0, 0xd0, 0x70, 0xd7, 0x5d, 0xef, 0xbc, 0xd3, 0xd6, 0xd6, 0xd6, 0x56, 0x5e, 0x0e, 0xd0, 0xd4, 0xd4, 0xdc, 0xfc, 0xc4, 0x13, 0x7f, 0x01, 0x70, 0x1c, 0xc7, 0xc5, 0xe3, 0x00, 0x2d, 0x2d, 0x2d, 0x2d, 0x9a, 0x46, 0xa9, 0xfd, 0xdf, 0x5b, 0x6f, 0xd9, 0xfa, 0xee, 0xbb, 0xb6, 0x16, 0x93, 0x8e, 0x90, 0x5b, 0xf5, 0xe0, 0x16, 0x83, 0x29, 0x08, 0xb6, 0x8a, 0x62, 0x51, 0x5b, 0x5b, 0x5b, 0x5b, 0x77, 0xed, 0xda, 0xb3, 0xa7, 0xa7, 0xa7, 0xa7, 0x67, 0xff, 0xfe, 0xa1, 0xa1, 0xe9, 0xe9, 0xe9, 0xe9, 0x5c, 0xce, 0xef, 0xf7, 0xfb, 0x03, 0x81, 0xb2, 0x32, 0x80, 0x58, 0x2c, 0x1a, 0x4d, 0x24, 0x14, 0x65, 0xdf, 0xbe, 0x7d, 0xfb, 0x02, 0x01, 0x49, 0x3a, 0x76, 0xec, 0xd8, 0xb1, 0x4f, 0x3e, 0x69, 0x6b, 0xb3, 0x8b, 0x38, 0x91, 0xb0, 0xe7, 0xc9, 0xe7, 0x6d, 0x55, 0x55, 0x5b, 0x73, 0xb9, 0x9b, 0xc1, 0xb6, 0x0d, 0xa0, 0xa4, 0xe4, 0x66, 0x2d, 0x82, 0x78, 0xbd, 0xb6, 0x06, 0x02, 0xbd, 0xbd, 0xbd, 0xbd, 0x87, 0x0f, 0x9f, 0x3f, 0x9f, 0x4a, 0xa5, 0x52, 0xe9, 0xf4, 0xdc, 0x9c, 0xc7, 0xe3, 0xf1, 0xb8, 0xdd, 0xbb, 0x76, 0x9d, 0x39, 0x73, 0xe6, 0xcc, 0x17, 0x5f, 0x1c, 0x39, 0x62, 0x8f, 0x8b, 0xc7, 0x6d, 0x5d, 0x5f, 0xb7, 0x35, 0x95, 0xba, 0x19, 0x20, 0x99, 0xb4, 0x75, 0xe3, 0x5e, 0x79, 0x8b, 0xe5, 0xc4, 0xfc, 0x59, 0xfc, 0x3c, 0x6f, 0xab, 0xdd, 0x46, 0xfe, 0xf5, 0xce, 0x71, 0x37, 0x6b, 0x31, 0x35, 0x8a, 0x0e, 0x15, 0x6f, 0xe6, 0xe2, 0xce, 0x17, 0x2f, 0xb0, 0xad, 0x37, 0xf7, 0xff, 0x5a, 0xfb, 0x03, 0x24, 0x50, 0xc3, 0x51, 0x78, 0x54, 0xe6, 0x96, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82};
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('throttle', require('../throttle')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
https://files.pythonhosted.org/packages/source/c/certifi/certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d https://files.pythonhosted.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2
{ "pile_set_name": "Github" }
define({ name: 'real' });
{ "pile_set_name": "Github" }
// This file is part of meshoptimizer library; see meshoptimizer.h for version/license details #include "meshoptimizer.h" #include <assert.h> #include <limits.h> #include <string.h> // This work is based on: // Francine Evans, Steven Skiena and Amitabh Varshney. Optimizing Triangle Strips for Fast Rendering. 1996 namespace meshopt { static unsigned int findStripFirst(const unsigned int buffer[][3], unsigned int buffer_size, const unsigned int* valence) { unsigned int index = 0; unsigned int iv = ~0u; for (size_t i = 0; i < buffer_size; ++i) { unsigned int va = valence[buffer[i][0]], vb = valence[buffer[i][1]], vc = valence[buffer[i][2]]; unsigned int v = (va < vb && va < vc) ? va : (vb < vc) ? vb : vc; if (v < iv) { index = unsigned(i); iv = v; } } return index; } static int findStripNext(const unsigned int buffer[][3], unsigned int buffer_size, unsigned int e0, unsigned int e1) { for (size_t i = 0; i < buffer_size; ++i) { unsigned int a = buffer[i][0], b = buffer[i][1], c = buffer[i][2]; if (e0 == a && e1 == b) return (int(i) << 2) | 2; else if (e0 == b && e1 == c) return (int(i) << 2) | 0; else if (e0 == c && e1 == a) return (int(i) << 2) | 1; } return -1; } } // namespace meshopt size_t meshopt_stripify(unsigned int* destination, const unsigned int* indices, size_t index_count, size_t vertex_count, unsigned int restart_index) { assert(destination != indices); assert(index_count % 3 == 0); using namespace meshopt; meshopt_Allocator allocator; const size_t buffer_capacity = 8; unsigned int buffer[buffer_capacity][3] = {}; unsigned int buffer_size = 0; size_t index_offset = 0; unsigned int strip[2] = {}; unsigned int parity = 0; size_t strip_size = 0; // compute vertex valence; this is used to prioritize starting triangle for strips unsigned int* valence = allocator.allocate<unsigned int>(vertex_count); memset(valence, 0, vertex_count * sizeof(unsigned int)); for (size_t i = 0; i < index_count; ++i) { unsigned int index = indices[i]; assert(index < vertex_count); valence[index]++; } int next = -1; while (buffer_size > 0 || index_offset < index_count) { assert(next < 0 || (size_t(next >> 2) < buffer_size && (next & 3) < 3)); // fill triangle buffer while (buffer_size < buffer_capacity && index_offset < index_count) { buffer[buffer_size][0] = indices[index_offset + 0]; buffer[buffer_size][1] = indices[index_offset + 1]; buffer[buffer_size][2] = indices[index_offset + 2]; buffer_size++; index_offset += 3; } assert(buffer_size > 0); if (next >= 0) { unsigned int i = next >> 2; unsigned int a = buffer[i][0], b = buffer[i][1], c = buffer[i][2]; unsigned int v = buffer[i][next & 3]; // ordered removal from the buffer memmove(buffer[i], buffer[i + 1], (buffer_size - i - 1) * sizeof(buffer[0])); buffer_size--; // update vertex valences for strip start heuristic valence[a]--; valence[b]--; valence[c]--; // find next triangle (note that edge order flips on every iteration) // in some cases we need to perform a swap to pick a different outgoing triangle edge // for [a b c], the default strip edge is [b c], but we might want to use [a c] int cont = findStripNext(buffer, buffer_size, parity ? strip[1] : v, parity ? v : strip[1]); int swap = cont < 0 ? findStripNext(buffer, buffer_size, parity ? v : strip[0], parity ? strip[0] : v) : -1; if (cont < 0 && swap >= 0) { // [a b c] => [a b a c] destination[strip_size++] = strip[0]; destination[strip_size++] = v; // next strip has same winding // ? a b => b a v strip[1] = v; next = swap; } else { // emit the next vertex in the strip destination[strip_size++] = v; // next strip has flipped winding strip[0] = strip[1]; strip[1] = v; parity ^= 1; next = cont; } } else { // if we didn't find anything, we need to find the next new triangle // we use a heuristic to maximize the strip length unsigned int i = findStripFirst(buffer, buffer_size, &valence[0]); unsigned int a = buffer[i][0], b = buffer[i][1], c = buffer[i][2]; // ordered removal from the buffer memmove(buffer[i], buffer[i + 1], (buffer_size - i - 1) * sizeof(buffer[0])); buffer_size--; // update vertex valences for strip start heuristic valence[a]--; valence[b]--; valence[c]--; // we need to pre-rotate the triangle so that we will find a match in the existing buffer on the next iteration int ea = findStripNext(buffer, buffer_size, c, b); int eb = findStripNext(buffer, buffer_size, a, c); int ec = findStripNext(buffer, buffer_size, b, a); // in some cases we can have several matching edges; since we can pick any edge, we pick the one with the smallest // triangle index in the buffer. this reduces the effect of stripification on ACMR and additionally - for unclear // reasons - slightly improves the stripification efficiency int mine = INT_MAX; mine = (ea >= 0 && mine > ea) ? ea : mine; mine = (eb >= 0 && mine > eb) ? eb : mine; mine = (ec >= 0 && mine > ec) ? ec : mine; if (ea == mine) { // keep abc next = ea; } else if (eb == mine) { // abc -> bca unsigned int t = a; a = b, b = c, c = t; next = eb; } else if (ec == mine) { // abc -> cab unsigned int t = c; c = b, b = a, a = t; next = ec; } if (restart_index) { if (strip_size) destination[strip_size++] = restart_index; destination[strip_size++] = a; destination[strip_size++] = b; destination[strip_size++] = c; // new strip always starts with the same edge winding strip[0] = b; strip[1] = c; parity = 1; } else { if (strip_size) { // connect last strip using degenerate triangles destination[strip_size++] = strip[1]; destination[strip_size++] = a; } // note that we may need to flip the emitted triangle based on parity // we always end up with outgoing edge "cb" in the end unsigned int e0 = parity ? c : b; unsigned int e1 = parity ? b : c; destination[strip_size++] = a; destination[strip_size++] = e0; destination[strip_size++] = e1; strip[0] = e0; strip[1] = e1; parity ^= 1; } } } return strip_size; } size_t meshopt_stripifyBound(size_t index_count) { assert(index_count % 3 == 0); // worst case without restarts is 2 degenerate indices and 3 indices per triangle // worst case with restarts is 1 restart index and 3 indices per triangle return (index_count / 3) * 5; } size_t meshopt_unstripify(unsigned int* destination, const unsigned int* indices, size_t index_count, unsigned int restart_index) { assert(destination != indices); size_t offset = 0; size_t start = 0; for (size_t i = 0; i < index_count; ++i) { if (restart_index && indices[i] == restart_index) { start = i + 1; } else if (i - start >= 2) { unsigned int a = indices[i - 2], b = indices[i - 1], c = indices[i]; // flip winding for odd triangles if ((i - start) & 1) { unsigned int t = a; a = b, b = t; } // although we use restart indices, strip swaps still produce degenerate triangles, so skip them if (a != b && a != c && b != c) { destination[offset + 0] = a; destination[offset + 1] = b; destination[offset + 2] = c; offset += 3; } } } return offset; } size_t meshopt_unstripifyBound(size_t index_count) { assert(index_count == 0 || index_count >= 3); return (index_count == 0) ? 0 : (index_count - 2) * 3; }
{ "pile_set_name": "Github" }
#define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Security" #define REACTOS_STR_INTERNAL_NAME "secur32" #define REACTOS_STR_ORIGINAL_FILENAME "secur32.dll" #include <reactos/version.rc>
{ "pile_set_name": "Github" }