idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
23,200 | public void add ( String str ) { curr . next = new Entry ( str , Entry . NUL ) ; curr = curr . next ; count ++ ; } | adds a element to the list |
23,201 | public Expression string ( Factory f , SourceCode cfml ) throws TemplateException { cfml . removeSpace ( ) ; char quoter = cfml . getCurrentLower ( ) ; if ( quoter != '"' && quoter != '\'' ) return null ; StringBuffer str = new StringBuffer ( ) ; boolean insideSpecial = false ; Position line = cfml . getPosition ( ) ; ... | Liest den String ein |
23,202 | public void release ( ) { super . release ( ) ; action = "list" ; path = null ; collection = null ; name = null ; language = "english" ; } | private boolean categories = false ; |
23,203 | public void setPath ( String strPath ) throws PageException { if ( strPath == null ) return ; this . path = ResourceUtil . toResourceNotExisting ( pageContext , strPath . trim ( ) ) ; pageContext . getConfig ( ) . getSecurityManager ( ) . checkFileLocation ( this . path ) ; if ( ! this . path . exists ( ) ) { Resource ... | set the value path |
23,204 | private void doList ( ) throws PageException , SearchException { required ( "collection" , action , "name" , name ) ; pageContext . setVariable ( name , getSearchEngine ( ) . getCollectionsAsQuery ( ) ) ; } | Creates a query in the PageContext containing all available Collections of the current searchStorage |
23,205 | private void doCreate ( ) throws SearchException , PageException { required ( "collection" , action , "collection" , collection ) ; required ( "collection" , action , "path" , path ) ; getSearchEngine ( ) . createCollection ( collection , path , language , SearchEngine . DENY_OVERWRITE ) ; } | Creates a new collection |
23,206 | public static boolean isBytecode ( InputStream is ) throws IOException { if ( ! is . markSupported ( ) ) throw new IOException ( "can only read input streams that support mark/reset" ) ; is . mark ( - 1 ) ; int first = is . read ( ) ; int second = is . read ( ) ; boolean rtn = ( first == ICA && second == IFE && is . re... | check if given stream is a bytecode stream if yes remove bytecode mark |
23,207 | public static String [ ] getFieldNames ( Class clazz ) { Field [ ] fields = clazz . getFields ( ) ; String [ ] names = new String [ fields . length ] ; for ( int i = 0 ; i < names . length ; i ++ ) { names [ i ] = fields [ i ] . getName ( ) ; } return names ; } | return all field names as String array |
23,208 | public static String getSourcePathForClass ( Class clazz , String defaultValue ) { try { String result = clazz . getProtectionDomain ( ) . getCodeSource ( ) . getLocation ( ) . getPath ( ) ; result = URLDecoder . decode ( result , CharsetUtil . UTF8 . name ( ) ) ; result = SystemUtil . fixWindowsPath ( result ) ; retur... | returns the path to the directory or jar file that the class was loaded from |
23,209 | public static String getSourcePathForClass ( String className , String defaultValue ) { try { return getSourcePathForClass ( ClassUtil . loadClass ( className ) , defaultValue ) ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; } return defaultValue ; } | tries to load the class and returns the path that it was loaded from |
23,210 | public static String extractPackage ( String className ) { if ( className == null ) return null ; int index = className . lastIndexOf ( '.' ) ; if ( index != - 1 ) return className . substring ( 0 , index ) ; return null ; } | extracts the package from a className return null if there is none . |
23,211 | public static String extractName ( String className ) { if ( className == null ) return null ; int index = className . lastIndexOf ( '.' ) ; if ( index != - 1 ) return className . substring ( index + 1 ) ; return className ; } | extracts the class name of a classname with package |
23,212 | public static Class loadClass ( String className , String bundleName , String bundleVersion , Identification id ) throws ClassException , BundleException { if ( StringUtil . isEmpty ( bundleName ) ) return loadClass ( className ) ; return loadClassByBundle ( className , bundleName , bundleVersion , id ) ; } | if no bundle is defined it is loaded the old way |
23,213 | public Collection getScopeFor ( Collection . Key key , Scope defaultValue ) { Object rtn = null ; if ( checkArguments ) { rtn = local . get ( key , NullSupportHelper . NULL ( ) ) ; if ( rtn != NullSupportHelper . NULL ( ) ) return local ; rtn = argument . getFunctionArgument ( key , NullSupportHelper . NULL ( ) ) ; if ... | returns the scope that contains a specific key |
23,214 | public List < String > getScopeNames ( ) { List < String > scopeNames = new ArrayList < String > ( ) ; if ( checkArguments ) { scopeNames . add ( "local" ) ; scopeNames . add ( "arguments" ) ; } scopeNames . add ( "variables" ) ; if ( pc . hasFamily ( ) ) { String [ ] names = pc . getThreadScopeNames ( ) ; for ( int i ... | return a list of String with the scope names |
23,215 | private boolean isReadOnlyKey ( Collection . Key key ) { return ( key . equals ( KeyConstants . _java ) || key . equals ( KeyConstants . _separator ) || key . equals ( KeyConstants . _os ) || key . equals ( KeyConstants . _coldfusion ) || key . equals ( KeyConstants . _lucee ) ) ; } | returns if the key is a readonly key |
23,216 | private FDThreadImpl getByNativeIdentifier ( String name , CFMLFactoryImpl factory , String id ) { Map < Integer , PageContextImpl > pcs = factory . getActivePageContexts ( ) ; Iterator < PageContextImpl > it = pcs . values ( ) . iterator ( ) ; PageContextImpl pc ; while ( it . hasNext ( ) ) { pc = it . next ( ) ; if (... | checks a single CFMLFactory for the thread |
23,217 | public static MimeType getInstance ( String strMimeType ) { if ( strMimeType == null ) return ALL ; strMimeType = strMimeType . trim ( ) ; if ( "*" . equals ( strMimeType ) || strMimeType . length ( ) == 0 ) return ALL ; String [ ] arr = ListUtil . listToStringArray ( strMimeType , ';' ) ; if ( arr . length == 0 ) retu... | returns a mimetype that match given string |
23,218 | public boolean match ( MimeType other ) { if ( this == other ) return true ; if ( type != null && other . type != null && ! type . equals ( other . type ) ) return false ; if ( subtype != null && other . subtype != null && ! subtype . equals ( other . subtype ) ) return false ; return true ; } | checks if given mimetype is covered by current mimetype |
23,219 | public Set < String > getInvokedTables ( ) throws ParseException { ZStatement st ; Set < String > tables = new HashSet < String > ( ) ; while ( ( st = parser . readStatement ( ) ) != null ) { this . sql = st . toString ( ) ; if ( st instanceof ZQuery ) { getInvokedTables ( ( ZQuery ) st , tables ) ; } break ; } return ... | return all invoked tables by a sql statement |
23,220 | public static Resource toExactResource ( Resource res ) { res = getCanonicalResourceEL ( res ) ; if ( res . getResourceProvider ( ) . isCaseSensitive ( ) ) { if ( res . exists ( ) ) return res ; return _check ( res ) ; } return res ; } | translate the path of the file to a existing file path by changing case of letters Works only on Linux because |
23,221 | public static Resource createResource ( Resource res , short level , short type ) { boolean asDir = type == TYPE_DIR ; if ( level >= LEVEL_FILE && res . exists ( ) && ( ( res . isDirectory ( ) && asDir ) || ( res . isFile ( ) && ! asDir ) ) ) { return getCanonicalResourceEL ( res ) ; } Resource parent = res . getParent... | create a file if possible return file if ok otherwise return null |
23,222 | public static String translateAttribute ( String attributes ) throws IOException { short [ ] flags = strAttrToBooleanFlags ( attributes ) ; StringBuilder sb = new StringBuilder ( ) ; if ( flags [ READ_ONLY ] == YES ) sb . append ( " +R" ) ; else if ( flags [ READ_ONLY ] == NO ) sb . append ( " -R" ) ; if ( flags [ HIDD... | sets attributes of a file on Windows system |
23,223 | public static String merge ( String parent , String child ) { if ( child . length ( ) <= 2 ) { if ( child . length ( ) == 0 ) return parent ; if ( child . equals ( "." ) ) return parent ; if ( child . equals ( ".." ) ) child = "../" ; } parent = translatePath ( parent , true , false ) ; child = prettifyPath ( child ) ;... | merge to path parts to one |
23,224 | public static String getCanonicalPathEL ( Resource res ) { try { return res . getCanonicalPath ( ) ; } catch ( IOException e ) { return res . toString ( ) ; } } | Returns the canonical form of this abstract pathname . |
23,225 | public static boolean createNewResourceEL ( Resource res ) { try { res . createFile ( false ) ; return true ; } catch ( IOException e ) { return false ; } } | creates a new File |
23,226 | public static void touch ( Resource res ) throws IOException { if ( res . exists ( ) ) { res . setLastModified ( System . currentTimeMillis ( ) ) ; } else { res . createFile ( true ) ; } } | similar to linux bash function touch create file if not exist otherwise change last modified date |
23,227 | public static boolean isChildOf ( Resource file , Resource dir ) { while ( file != null ) { if ( file . equals ( dir ) ) return true ; file = file . getParentResource ( ) ; } return false ; } | check if file is a child of given directory |
23,228 | public static String getPathToChild ( Resource file , Resource dir ) { if ( dir == null || ! file . getResourceProvider ( ) . getScheme ( ) . equals ( dir . getResourceProvider ( ) . getScheme ( ) ) ) return null ; boolean isFile = file . isFile ( ) ; String str = "/" ; while ( file != null ) { if ( file . equals ( dir... | return diffrents of one file to a other if first is child of second otherwise return null |
23,229 | public static String [ ] splitFileName ( String fileName ) { int pos = fileName . lastIndexOf ( '.' ) ; if ( pos == - 1 ) { return new String [ ] { fileName } ; } return new String [ ] { fileName . substring ( 0 , pos ) , fileName . substring ( pos + 1 ) } ; } | split a FileName in Parts |
23,230 | public static Resource changeExtension ( Resource file , String newExtension ) { String ext = getExtension ( file , null ) ; if ( ext == null ) return file . getParentResource ( ) . getRealResource ( file . getName ( ) + '.' + newExtension ) ; String name = file . getName ( ) ; return file . getParentResource ( ) . get... | change extension of file and return new file |
23,231 | private static boolean parentExists ( Resource res ) { res = res . getParentResource ( ) ; return res != null && res . exists ( ) ; } | return if parent file exists |
23,232 | public static long getRealSize ( Resource res , ResourceFilter filter ) { if ( res . isFile ( ) ) { return res . length ( ) ; } else if ( res . isDirectory ( ) ) { long size = 0 ; Resource [ ] children = filter == null ? res . listResources ( ) : res . listResources ( filter ) ; for ( int i = 0 ; i < children . length ... | return the size of the Resource other than method length of Resource this method return the size of all files in a directory |
23,233 | public static boolean isEmptyDirectory ( Resource res , ResourceFilter filter ) { if ( res . isDirectory ( ) ) { Resource [ ] children = filter == null ? res . listResources ( ) : res . listResources ( filter ) ; if ( children == null || children . length == 0 ) return true ; for ( int i = 0 ; i < children . length ; i... | return Boolean . True when directory is empty Boolean . FALSE when directory s not empty and null if directory does not exists |
23,234 | public static Resource [ ] listResources ( Resource [ ] resources , ResourceFilter filter ) { int count = 0 ; Resource [ ] children ; ArrayList < Resource [ ] > list = new ArrayList < Resource [ ] > ( ) ; for ( int i = 0 ; i < resources . length ; i ++ ) { children = filter == null ? resources [ i ] . listResources ( )... | list children of all given resources |
23,235 | public static void checkCreateDirectoryOK ( Resource resource , boolean createParentWhenNotExists ) throws IOException { if ( resource . exists ( ) ) { if ( resource . isFile ( ) ) throw new IOException ( "can't create directory [" + resource . getPath ( ) + "], resource already exists as a file" ) ; if ( resource . is... | check if directory creation is ok with the rules for the Resource interface to not change this rules . |
23,236 | public static void checkCopyToOK ( Resource source , Resource target ) throws IOException { if ( ! source . isFile ( ) ) { if ( source . isDirectory ( ) ) throw new IOException ( "can't copy [" + source . getPath ( ) + "] to [" + target . getPath ( ) + "], source is a directory" ) ; throw new IOException ( "can't copy ... | check if copying a file is ok with the rules for the Resource interface to not change this rules . |
23,237 | public static void checkMoveToOK ( Resource source , Resource target ) throws IOException { if ( ! source . exists ( ) ) { throw new IOException ( "can't move [" + source . getPath ( ) + "] to [" + target . getPath ( ) + "], source file does not exist" ) ; } if ( source . isDirectory ( ) && target . isFile ( ) ) throw ... | check if moveing a file is ok with the rules for the Resource interface to not change this rules . |
23,238 | public static void checkGetInputStreamOK ( Resource resource ) throws IOException { if ( ! resource . exists ( ) ) throw new IOException ( "file [" + resource . getPath ( ) + "] does not exist" ) ; if ( resource . isDirectory ( ) ) throw new IOException ( "can't read directory [" + resource . getPath ( ) + "] as a file... | check if getting a inputstream of the file is ok with the rules for the Resource interface to not change this rules . |
23,239 | public static void checkGetOutputStreamOK ( Resource resource ) throws IOException { if ( resource . exists ( ) && ! resource . isWriteable ( ) ) { throw new IOException ( "can't write to file [" + resource . getPath ( ) + "],file is readonly" ) ; } if ( resource . isDirectory ( ) ) throw new IOException ( "can't write... | check if getting a outputstream of the file is ok with the rules for the Resource interface to not change this rules . |
23,240 | public static void checkRemoveOK ( Resource resource ) throws IOException { if ( ! resource . exists ( ) ) throw new IOException ( "can't delete resource " + resource + ", resource does not exist" ) ; if ( ! resource . canWrite ( ) ) throw new IOException ( "can't delete resource " + resource + ", no access" ) ; } | check if removing the file is ok with the rules for the Resource interface to not change this rules . |
23,241 | public void setTimeout ( Object timeout ) throws PageException { if ( timeout instanceof TimeSpan ) this . timeout = ( TimeSpan ) timeout ; else { int i = Caster . toIntValue ( timeout ) ; if ( i < 0 ) throw new ApplicationException ( "invalid value [" + i + "] for attribute timeout, value must be a positive integer gr... | set the value timeout |
23,242 | public void setColumns ( String columns ) throws PageException { this . columns = ListUtil . toStringArray ( ListUtil . listToArrayRemoveEmpty ( columns , "," ) ) ; } | set the value columns |
23,243 | public void setMethod ( String method ) throws ApplicationException { method = method . toLowerCase ( ) . trim ( ) ; if ( method . equals ( "post" ) ) this . method = METHOD_POST ; else if ( method . equals ( "get" ) ) this . method = METHOD_GET ; else if ( method . equals ( "head" ) ) this . method = METHOD_HEAD ; els... | set the value method GET or POST . Use GET to download a text or binary file or to create a query from the contents of a text file . Use POST to send information to a server page or a CGI program for processing . POST requires the use of a cfhttpparam tag . |
23,244 | static boolean isRedirect ( int status ) { return status == STATUS_REDIRECT_FOUND || status == STATUS_REDIRECT_MOVED_PERMANENTLY || status == STATUS_REDIRECT_SEE_OTHER || status == STATUS_REDIRECT_TEMPORARY_REDIRECT ; } | checks if status code is a redirect |
23,245 | public static String mergePath ( String current , String realPath ) throws MalformedURLException { String currDir ; if ( current == null || current . indexOf ( '/' ) == - 1 ) currDir = "/" ; else if ( current . endsWith ( "/" ) ) currDir = current ; else currDir = current . substring ( 0 , current . lastIndexOf ( '/' )... | merge to pathes to one |
23,246 | public void setAdditional ( Collection . Key key , Object value ) { additional . setEL ( key , StringUtil . toStringEmptyIfNull ( value ) ) ; } | set a additional key value |
23,247 | public static long byteArrayToLong ( byte [ ] buffer , int nStartIndex ) { return ( ( ( long ) buffer [ nStartIndex ] ) << 56 ) | ( ( buffer [ nStartIndex + 1 ] & 0x0ffL ) << 48 ) | ( ( buffer [ nStartIndex + 2 ] & 0x0ffL ) << 40 ) | ( ( buffer [ nStartIndex + 3 ] & 0x0ffL ) << 32 ) | ( ( buffer [ nStartIndex + 4 ] & 0... | gets bytes from an array into a long |
23,248 | public static void longToByteArray ( long lValue , byte [ ] buffer , int nStartIndex ) { buffer [ nStartIndex ] = ( byte ) ( lValue >>> 56 ) ; buffer [ nStartIndex + 1 ] = ( byte ) ( ( lValue >>> 48 ) & 0x0ff ) ; buffer [ nStartIndex + 2 ] = ( byte ) ( ( lValue >>> 40 ) & 0x0ff ) ; buffer [ nStartIndex + 3 ] = ( byte )... | converts a long o bytes which are put into a given array |
23,249 | public static void longToIntArray ( long lValue , int [ ] buffer , int nStartIndex ) { buffer [ nStartIndex ] = ( int ) ( lValue >>> 32 ) ; buffer [ nStartIndex + 1 ] = ( int ) lValue ; } | converts a long to integers which are put into a given array |
23,250 | public static String byteArrayToUNCString ( byte [ ] data , int nStartPos , int nNumOfBytes ) { nNumOfBytes &= ~ 1 ; int nAvailCapacity = data . length - nStartPos ; if ( nAvailCapacity < nNumOfBytes ) nNumOfBytes = nAvailCapacity ; StringBuilder sbuf = new StringBuilder ( ) ; sbuf . setLength ( nNumOfBytes >> 1 ) ; in... | converts a byte array into an UNICODE string |
23,251 | public FunctionLib duplicate ( boolean deepCopy ) { FunctionLib fl = new FunctionLib ( ) ; fl . description = this . description ; fl . displayName = this . displayName ; fl . functions = duplicate ( this . functions , deepCopy ) ; fl . shortName = this . shortName ; fl . uri = this . uri ; fl . version = this . versio... | duplicate this FunctionLib |
23,252 | private HashMap duplicate ( HashMap funcs , boolean deepCopy ) { if ( deepCopy ) throw new PageRuntimeException ( new ExpressionException ( "deep copy not supported" ) ) ; Iterator it = funcs . entrySet ( ) . iterator ( ) ; Map . Entry entry ; HashMap cm = new HashMap ( ) ; while ( it . hasNext ( ) ) { entry = ( Entry ... | duplcate a hashmap with FunctionLibFunction s |
23,253 | public static Version toVersion ( String version , final Version defaultValue ) { final int rIndex = version . lastIndexOf ( ".lco" ) ; if ( rIndex != - 1 ) version = version . substring ( 0 , rIndex ) ; try { return Version . parseVersion ( version ) ; } catch ( final IllegalArgumentException iae ) { return defaultVal... | cast a lucee string version to a int version |
23,254 | public static File getTempDirectory ( ) { if ( tempFile != null ) return tempFile ; final String tmpStr = System . getProperty ( "java.io.tmpdir" ) ; if ( tmpStr != null ) { tempFile = new File ( tmpStr ) ; if ( tempFile . exists ( ) ) { tempFile = getCanonicalFileEL ( tempFile ) ; return tempFile ; } } try { final Fil... | returns the Temp Directory of the System |
23,255 | public static URL toURL ( String strUrl , int port , boolean encodeIfNecessary ) throws MalformedURLException { URL url ; try { url = new URL ( strUrl ) ; } catch ( MalformedURLException mue ) { url = new URL ( "http://" + strUrl ) ; } if ( ! encodeIfNecessary ) return url ; return encodeURL ( url , port ) ; } | cast a string to a url |
23,256 | public static String encode ( String realpath ) { int qIndex = realpath . indexOf ( '?' ) ; if ( qIndex == - 1 ) return realpath ; String file = realpath . substring ( 0 , qIndex ) ; String query = realpath . substring ( qIndex + 1 ) ; int sIndex = query . indexOf ( '#' ) ; String anker = null ; if ( sIndex != - 1 ) { ... | merge them somehow |
23,257 | public static long length ( URL url ) throws IOException { HTTPResponse http = HTTPEngine . head ( url , null , null , - 1 , true , null , Constants . NAME , null , null ) ; long len = http . getContentLength ( ) ; HTTPEngine . closeEL ( http ) ; return len ; } | return the length of a file defined by a url . |
23,258 | public static String self ( HttpServletRequest req ) { StringBuffer sb = new StringBuffer ( req . getServletPath ( ) ) ; String qs = req . getQueryString ( ) ; if ( ! StringUtil . isEmpty ( qs ) ) sb . append ( '?' ) . append ( qs ) ; return sb . toString ( ) ; } | return path to itself |
23,259 | public static Object getRequestBody ( PageContext pc , boolean deserialized , Object defaultValue ) { HttpServletRequest req = pc . getHttpServletRequest ( ) ; MimeType contentType = getContentType ( pc ) ; String strContentType = contentType == MimeType . ALL ? null : contentType . toString ( ) ; Charset cs = getChara... | returns the body of the request |
23,260 | public static String getRequestURL ( HttpServletRequest req , boolean includeQueryString ) { StringBuffer sb = req . getRequestURL ( ) ; int maxpos = sb . indexOf ( "/" , 8 ) ; if ( maxpos > - 1 ) { if ( req . isSecure ( ) ) { if ( sb . substring ( maxpos - 4 , maxpos ) . equals ( ":443" ) ) sb . delete ( maxpos - 4 , ... | returns the full request URL |
23,261 | public static String encodeRedirectURLEL ( HttpServletResponse rsp , String url ) { try { return rsp . encodeRedirectURL ( url ) ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; return url ; } } | if encodings fails the given url is returned |
23,262 | public void setStartdate ( Object objStartDate ) throws PageException { if ( StringUtil . isEmpty ( objStartDate ) ) return ; this . startdate = new DateImpl ( DateCaster . toDateAdvanced ( objStartDate , pageContext . getTimeZone ( ) ) ) ; } | set the value startdate Required when action = update . The date when scheduling of the task should start . |
23,263 | public void setEnddate ( Object enddate ) throws PageException { if ( StringUtil . isEmpty ( enddate ) ) return ; this . enddate = new DateImpl ( DateCaster . toDateAdvanced ( enddate , pageContext . getTimeZone ( ) ) ) ; } | set the value enddate The date when the scheduled task ends . |
23,264 | public void setStarttime ( Object starttime ) throws PageException { if ( StringUtil . isEmpty ( starttime ) ) return ; this . starttime = DateCaster . toTime ( pageContext . getTimeZone ( ) , starttime ) ; } | set the value starttime Required when creating tasks with action = update . Enter a value in seconds . The time when scheduling of the task starts . |
23,265 | public void setProxyport ( Object oProxyport ) throws PageException { if ( StringUtil . isEmpty ( oProxyport ) ) return ; this . proxyport = Caster . toIntValue ( oProxyport ) ; } | set the value proxyport The port number on the proxy server from which the task is being requested . Default is 80 . When used with resolveURL the URLs of retrieved documents that specify a port number are automatically resolved to preserve links in the retrieved document . |
23,266 | public void setPort ( Object oPort ) throws PageException { if ( StringUtil . isEmpty ( oPort ) ) return ; this . port = Caster . toIntValue ( oPort ) ; } | set the value port The port number on the server from which the task is being scheduled . Default is 80 . When used with resolveURL the URLs of retrieved documents that specify a port number are automatically resolved to preserve links in the retrieved document . |
23,267 | public void setEndtime ( Object endtime ) throws PageException { if ( StringUtil . isEmpty ( endtime ) ) return ; this . endtime = DateCaster . toTime ( pageContext . getTimeZone ( ) , endtime ) ; } | set the value endtime The time when the scheduled task ends . Enter a value in seconds . |
23,268 | public void setOperation ( String operation ) throws ApplicationException { if ( StringUtil . isEmpty ( operation ) ) return ; operation = operation . toLowerCase ( ) . trim ( ) ; if ( ! operation . equals ( "httprequest" ) ) throw new ApplicationException ( "attribute operation must have the value [HTTPRequest]" ) ; } | set the value operation The type of operation the scheduler performs when executing this task . |
23,269 | public void setInterval ( String interval ) { if ( StringUtil . isEmpty ( interval ) ) return ; interval = interval . trim ( ) . toLowerCase ( ) ; if ( interval . equals ( "week" ) ) this . interval = "weekly" ; else if ( interval . equals ( "day" ) ) this . interval = "daily" ; else if ( interval . equals ( "month" ) ... | set the value interval Required when creating tasks with action = update . Interval at which task should be scheduled . Can be set in seconds or as Once Daily Weekly and Monthly . The default interval is one hour . The minimum interval is one minute . |
23,270 | public void setRequesttimeout ( Object oRequesttimeout ) throws PageException { if ( StringUtil . isEmpty ( oRequesttimeout ) ) return ; this . requesttimeout = Caster . toLongValue ( oRequesttimeout ) * 1000L ; } | set the value requesttimeout Customizes the requestTimeOut for the task operation . Can be used to extend the default timeout for operations that require more time to execute . |
23,271 | private Ref negateMinusOp ( ) throws PageException { if ( cfml . forwardIfCurrent ( '-' ) ) { if ( cfml . forwardIfCurrent ( '-' ) ) { cfml . removeSpace ( ) ; Ref expr = clip ( ) ; Ref res = preciseMath ? new BigMinus ( expr , new LNumber ( new Double ( 1 ) ) , limited ) : new Minus ( expr , new LNumber ( new Double (... | Liest die Vordlobe einer Zahl ein |
23,272 | public static String encode ( byte [ ] data ) { StringBuilder builder = new StringBuilder ( ) ; for ( int position = 0 ; position < data . length ; position += 3 ) { builder . append ( encodeGroup ( data , position ) ) ; } return builder . toString ( ) ; } | Translates the specified byte array into Base64 string . |
23,273 | private static char [ ] encodeGroup ( byte [ ] data , int position ) { final char [ ] c = new char [ ] { '=' , '=' , '=' , '=' } ; int b1 = 0 , b2 = 0 , b3 = 0 ; int length = data . length - position ; if ( length == 0 ) return c ; if ( length >= 1 ) { b1 = ( data [ position ] ) & 0xFF ; } if ( length >= 2 ) { b2 = ( d... | Encode three bytes of data into four characters . |
23,274 | public static void deploy ( Config config ) { if ( ! contextIsValid ( config ) ) return ; synchronized ( config ) { Resource dir = config . getDeployDirectory ( ) ; if ( ! dir . exists ( ) ) dir . mkdirs ( ) ; Resource [ ] children = dir . listResources ( ALL_EXT ) ; Resource child ; String ext ; for ( int i = 0 ; i < ... | deploys all files found |
23,275 | public BufferedImage generate ( String text , int width , int height , String [ ] fonts , boolean useAntiAlias , Color fontColor , int fontSize , int difficulty ) throws CaptchaException { if ( difficulty == DIFFICULTY_LOW ) { return generate ( text , width , height , fonts , useAntiAlias , fontColor , fontSize , 0 , 0... | generates a Captcha as a Buffered Image file |
23,276 | public Object getE ( int intKey ) throws PageException { Iterator it = valueIterator ( ) ; int count = 0 ; Object o ; while ( it . hasNext ( ) ) { o = it . next ( ) ; if ( ( ++ count ) == intKey ) { return o ; } } throw new ExpressionException ( "invalid index [" + intKey + "] for argument scope" ) ; } | return a value matching to key |
23,277 | public static Struct toStruct ( Argument arg ) { Struct trg = new StructImpl ( ) ; StructImpl . copy ( arg , trg , false ) ; return trg ; } | converts a argument scope to a regular struct |
23,278 | public static Array toArray ( Argument arg ) { ArrayImpl trg = new ArrayImpl ( ) ; int [ ] keys = arg . intKeys ( ) ; for ( int i = 0 ; i < keys . length ; i ++ ) { trg . setEL ( keys [ i ] , arg . get ( keys [ i ] , null ) ) ; } return trg ; } | converts a argument scope to a regular array |
23,279 | public static ExpressionException invalidKey ( Config config , Struct sct , Key key , String in ) { String appendix = StringUtil . isEmpty ( in , true ) ? "" : " in the " + in ; Iterator < Key > it = sct . keyIterator ( ) ; Key k ; while ( it . hasNext ( ) ) { k = it . next ( ) ; if ( k . equals ( key ) ) return new Ex... | throw exception for invalid key |
23,280 | public static void dumpTo ( Resource res , boolean live ) throws IOException { MBeanServer mbserver = ManagementFactory . getPlatformMBeanServer ( ) ; HotSpotDiagnosticMXBean mxbean = ManagementFactory . newPlatformMXBeanProxy ( mbserver , "com.sun.management:type=HotSpotDiagnostic" , HotSpotDiagnosticMXBean . class ) ... | Dumps the heap to the outputFile file in the same format as the hprof heap dump . If this method is called remotely from another process the heap dump output is written to a file named outputFile on the machine where the target VM is running . If outputFile is a relative path it is relative to the working directory whe... |
23,281 | public static HTTPResponse get ( URL url , String username , String password , long timeout , boolean redirect , String charset , String useragent , ProxyData proxy , lucee . commons . net . http . Header [ ] headers ) throws IOException { HttpGet get = new HttpGet ( url . toExternalForm ( ) ) ; return _invoke ( url , ... | does a http get request |
23,282 | public static HTTPResponse put ( URL url , String username , String password , long timeout , boolean redirect , String mimetype , String charset , String useragent , ProxyData proxy , lucee . commons . net . http . Header [ ] headers , Object body ) throws IOException { HttpPut put = new HttpPut ( url . toExternalForm... | does a http put request |
23,283 | private static HttpEntity toHttpEntity ( Object value , String mimetype , String charset ) throws IOException { if ( value instanceof HttpEntity ) return ( HttpEntity ) value ; ContentType ct = HTTPEngine . toContentType ( mimetype , charset ) ; try { if ( value instanceof TemporaryStream ) { if ( ct != null ) return n... | convert input to HTTP Entity |
23,284 | public void setArguments ( Object args ) { if ( args instanceof lucee . runtime . type . Collection ) { StringBuilder sb = new StringBuilder ( ) ; lucee . runtime . type . Collection coll = ( lucee . runtime . type . Collection ) args ; Iterator < Object > it = coll . valueIterator ( ) ; while ( it . hasNext ( ) ) { sb... | set the value arguments Command - line arguments passed to the application . |
23,285 | public void setTimeout ( double timeout ) throws ApplicationException { if ( timeout < 0 ) throw new ApplicationException ( "value must be a positive number now [" + Caster . toString ( timeout ) + "]" ) ; this . timeout = ( long ) ( timeout * 1000L ) ; } | set the value timeout Indicates how long in seconds the CFML executing thread waits for the spawned process . A timeout of 0 is equivalent to the non - blocking mode of executing . A very high timeout value is equivalent to a blocking mode of execution . The default is 0 ; therefore the CFML thread spawns a process and... |
23,286 | public void setOutputfile ( String outputfile ) { try { this . outputfile = ResourceUtil . toResourceExistingParent ( pageContext , outputfile ) ; pageContext . getConfig ( ) . getSecurityManager ( ) . checkFileLocation ( this . outputfile ) ; } catch ( PageException e ) { this . outputfile = pageContext . getConfig ( ... | set the value outputfile The file to which to direct the output of the program . If not specified the output is displayed on the page from which it was called . |
23,287 | public static boolean isFSCaseSensitive ( ) { if ( isFSCaseSensitive == null ) { try { _isFSCaseSensitive ( File . createTempFile ( "abcx" , "txt" ) ) ; } catch ( IOException e ) { File f = new File ( "abcx.txt" ) . getAbsoluteFile ( ) ; try { f . createNewFile ( ) ; _isFSCaseSensitive ( f ) ; } catch ( IOException e1 ... | returns if the file system case sensitive or not |
23,288 | public static Resource getHomeDirectory ( ) { if ( homeFile != null ) return homeFile ; ResourceProvider frp = ResourcesImpl . getFileResourceProvider ( ) ; String homeStr = System . getProperty ( "user.home" ) ; if ( homeStr != null ) { homeFile = frp . getResource ( homeStr ) ; homeFile = ResourceUtil . getCanonicalR... | returns the Hoome Directory of the System |
23,289 | public static int getOSArch ( ) { if ( osArch == - 1 ) { osArch = toIntArch ( System . getProperty ( "os.arch.data.model" ) ) ; if ( osArch == ARCH_UNKNOW ) osArch = toIntArch ( System . getProperty ( "os.arch" ) ) ; } return osArch ; } | return the operating system architecture |
23,290 | public static String getSystemPropOrEnvVar ( String name , String defaultValue ) { String value = System . getenv ( name ) ; if ( ! StringUtil . isEmpty ( value ) ) return value ; value = System . getProperty ( name ) ; if ( ! StringUtil . isEmpty ( value ) ) return value ; name = convertSystemPropToEnvVar ( name ) ; v... | returns a system setting by either a Java property name or a System environment variable |
23,291 | public static boolean arePathsSame ( String path1 , String path2 ) { if ( StringUtil . isEmpty ( path1 , true ) || StringUtil . isEmpty ( path2 , true ) ) return false ; String p1 = path1 . replace ( '\\' , '/' ) ; String p2 = path2 . replace ( '\\' , '/' ) ; if ( p1 . endsWith ( "/" ) && ! p2 . endsWith ( "/" ) ) p2 =... | checks if both paths are the same ignoring CaSe file separator type and whether one path ends with a separator while the other does not . if either path is empty then false is returned . |
23,292 | public ExprTransformer getExprTransfomer ( ) throws TagLibException { if ( exprTransformer != null ) return exprTransformer ; try { exprTransformer = ( ExprTransformer ) ClassUtil . loadInstance ( ELClass . getClazz ( ) ) ; } catch ( Exception e ) { throw new TagLibException ( e ) ; } return exprTransformer ; } | Laedt den innerhalb der TagLib definierten ExprTransfomer und gibt diesen zurueck . Load Expression Transfomer defined in the tag library and return it . |
23,293 | public void setTag ( TagLibTag tag ) { tag . setTagLib ( this ) ; tags . put ( tag . getName ( ) , tag ) ; if ( tag . hasAppendix ( ) ) appendixTags . put ( tag . getName ( ) , tag ) ; else if ( appendixTags . containsKey ( tag . getName ( ) ) ) appendixTags . remove ( tag . getName ( ) ) ; } | Fuegt der TagLib einen weiteren Tag hinzu . Diese Methode wird durch die Klasse TagLibFactory verwendet . |
23,294 | protected void setELClass ( String eLClass , Identification id , Attributes attributes ) { this . ELClass = ClassDefinitionImpl . toClassDefinition ( eLClass , id , attributes ) ; } | Fuegt der TagLib die Evaluator Klassendefinition als Zeichenkette hinzu . Diese Methode wird durch die Klasse TagLibFactory verwendet . |
23,295 | public TagLib duplicate ( boolean deepCopy ) { TagLib tl = new TagLib ( isCore ) ; tl . appendixTags = duplicate ( this . appendixTags , deepCopy ) ; tl . displayName = this . displayName ; tl . ELClass = this . ELClass ; tl . exprTransformer = this . exprTransformer ; tl . isCore = this . isCore ; tl . nameSpace = thi... | duplicate the taglib does not |
23,296 | private HashMap < String , TagLibTag > duplicate ( HashMap < String , TagLibTag > tags , boolean deepCopy ) { if ( deepCopy ) throw new PageRuntimeException ( new ExpressionException ( "deep copy not supported" ) ) ; Iterator < Entry < String , TagLibTag > > it = tags . entrySet ( ) . iterator ( ) ; HashMap < String , ... | duplcate a hashmap with TagLibTag s |
23,297 | public static String similarKeyMessage ( Collection . Key [ ] _keys , String keySearched , String keyLabel , String keyLabels , String in , boolean listAll ) { String inThe = StringUtil . isEmpty ( in , true ) ? "" : " in the " + in ; boolean empty = _keys . length == 0 ; if ( listAll && ( _keys . length > 50 || empty ... | creates a message for key not found with soundex check for similar key |
23,298 | public Constructor [ ] getConstructors ( Class clazz , int count ) { Array con ; Object o ; synchronized ( map ) { o = map . get ( clazz ) ; if ( o == null ) { con = store ( clazz ) ; } else con = ( Array ) o ; } o = con . get ( count + 1 , null ) ; if ( o == null ) return null ; return ( Constructor [ ] ) o ; } | returns a constructor matching given criteria or null if Constructor doesn t exist |
23,299 | private Array store ( Class clazz ) { Constructor [ ] conArr = clazz . getConstructors ( ) ; Array args = new ArrayImpl ( ) ; for ( int i = 0 ; i < conArr . length ; i ++ ) { storeArgs ( conArr [ i ] , args ) ; } map . put ( clazz , args ) ; return args ; } | stores the constructors for a Class |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.