idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
23,100 | public String getFullName ( ) { String fullName ; if ( tagLib != null ) { fullName = tagLib . getNameSpaceAndSeparator ( ) + name ; } else { fullName = name ; } return fullName ; } | Gibt den kompletten Namen des Tag zurueck inkl . Name - Space und Trenner . |
23,101 | public TagDependentBodyTransformer getBodyTransformer ( ) throws TagLibException { if ( ! hasTDBTClassDefinition ( ) ) return null ; if ( tdbt != null ) return tdbt ; try { tdbt = ( TagDependentBodyTransformer ) tdbtCD . getClazz ( ) . newInstance ( ) ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t )... | Gibt den TagDependentBodyTransformer dieser Klasse zurueck . Falls kein TagDependentBodyTransformer definiert ist wird null zurueckgegeben . |
23,102 | public void setBodyContent ( String value ) { value = value . toLowerCase ( ) . trim ( ) ; this . hasBody = ! value . equals ( "empty" ) ; this . isBodyReq = ! value . equals ( "free" ) ; this . isTagDependent = value . equals ( "tagdependent" ) ; bodyFree = value . equals ( "free" ) ; } | Setzt die Information was fuer ein BodyContent das Tag haben kann . Diese Methode wird durch die Klasse TagLibFactory verwendet . |
23,103 | public void setTDBTClassDefinition ( String tdbtClass , Identification id , Attributes attr ) { this . tdbtCD = ClassDefinitionImpl . toClassDefinition ( tdbtClass , id , attr ) ; this . tdbt = null ; } | Setzt die implementierende Klassendefinition des TagDependentBodyTransformer . Diese Methode wird durch die Klasse TagLibFactory verwendet . |
23,104 | public void setAttributeEvaluatorClassDefinition ( String className , Identification id , Attributes attr ) { cdAttributeEvaluator = ClassDefinitionImpl . toClassDefinition ( className , id , attr ) ; ; } | Setzt den Namen der Klasse welche einen AttributeEvaluator implementiert . |
23,105 | public Tag getTag ( Factory f , Position start , Position end ) throws TagLibException { if ( StringUtil . isEmpty ( tttCD ) ) return new TagOther ( f , start , end ) ; try { return _getTag ( f , start , end ) ; } catch ( ClassException e ) { throw new TagLibException ( e . getMessage ( ) ) ; } catch ( NoSuchMethodExce... | return ASM Tag for this tag |
23,106 | public Expression getAttributeUndefinedValue ( Factory factory ) { if ( attrUndefinedValue == null ) return factory . TRUE ( ) ; return factory . createLiteral ( attrUndefinedValue , factory . TRUE ( ) ) ; } | attribute value set if the attribute has no value defined |
23,107 | public PageContextImpl initialize ( HttpServlet servlet , HttpServletRequest req , HttpServletResponse rsp , String errorPageURL , boolean needsSession , int bufferSize , boolean autoFlush , boolean isChild , boolean ignoreScopes ) { parent = null ; requestId = counter ++ ; appListenerType = ApplicationListener . TYPE_... | initialize a existing page context |
23,108 | public void writeEncodeFor ( String value , String encodeType ) throws IOException , PageException { write ( ESAPIUtil . esapiEncode ( this , encodeType , value ) ) ; } | FUTURE add both method to interface |
23,109 | public void doInclude ( String realPath , boolean runOnce , Object cachedWithin ) throws PageException { if ( cachedWithin == null ) cachedWithin = getCachedWithin ( ConfigWeb . CACHEDWITHIN_INCLUDE ) ; _doInclude ( getRelativePageSources ( realPath ) , runOnce , cachedWithin ) ; } | used by the transformer |
23,110 | public void _doInclude ( PageSource [ ] sources , boolean runOnce , Object cachedWithin ) throws PageException { if ( cachedWithin == null ) { _doInclude ( sources , runOnce ) ; return ; } if ( runOnce ) { Page currentPage = PageSourceImpl . loadPage ( this , sources ) ; if ( runOnce && includeOnce . contains ( current... | calling this method and in this case it should not be used |
23,111 | public void subparam ( String type , String name , final Object value , double min , double max , String strPattern , int maxLength , final boolean isNew ) throws PageException { if ( type == null ) type = "any" ; else type = type . trim ( ) . toLowerCase ( ) ; if ( ! "any" . equals ( type ) ) { if ( "range" . equals (... | used by generated code FUTURE add to interface |
23,112 | private void initIdAndToken ( ) { boolean setCookie = true ; Object oCfid = urlScope ( ) . get ( KeyConstants . _cfid , null ) ; Object oCftoken = urlScope ( ) . get ( KeyConstants . _cftoken , null ) ; if ( oCfid != null ) { if ( Decision . isGUIdSimple ( oCfid ) ) { if ( ! scopeContext . hasExistingCFID ( this , Cast... | initialize the cfid and the cftoken |
23,113 | private static boolean _full ( PageContext pc ) { pc = ThreadLocalPageContext . get ( pc ) ; if ( pc == null ) return false ; return pc . getCurrentTemplateDialect ( ) != CFMLEngine . DIALECT_CFML || ( ( PageContextImpl ) pc ) . getFullNullSupport ( ) ; } | protected static boolean simpleMode ; |
23,114 | public static void register ( PageContext pc ) { if ( pc == null ) return ; Thread t = Thread . currentThread ( ) ; t . setContextClassLoader ( ( ( ConfigImpl ) pc . getConfig ( ) ) . getClassLoaderEnv ( ) ) ; ( ( PageContextImpl ) pc ) . setThread ( t ) ; pcThreadLocal . set ( pc ) ; } | register a pagecontext for he current thread |
23,115 | public static Reference getInstance ( Object o , String key ) { if ( o instanceof Reference ) { return new ReferenceReference ( ( Reference ) o , key ) ; } Collection coll = Caster . toCollection ( o , null ) ; if ( coll != null ) return new VariableReference ( coll , key ) ; return new NativeReference ( o , key ) ; } | returns a Reference Instance |
23,116 | private Map < String , Scope > getSubMap ( Map < String , Map < String , Scope > > parent , String key ) { Map < String , Scope > context = parent . get ( key ) ; if ( context != null ) return context ; context = MapFactory . < String , Scope > getConcurrentMap ( ) ; parent . put ( key , context ) ; return context ; } | return a map matching key from given map |
23,117 | public static Server getServerScope ( PageContext pc , boolean jsr223 ) { if ( server == null ) { server = new ServerImpl ( pc , jsr223 ) ; } return server ; } | return the server Scope for this context |
23,118 | public static Cluster getClusterScope ( Config config , boolean create ) throws PageException { if ( cluster == null && create ) { cluster = ( ( ConfigImpl ) config ) . createClusterScope ( ) ; } return cluster ; } | Returns the current Cluster Scope if there is no current Cluster Scope and create is true returns a new Cluster Scope . If create is false and the request has no valid Cluster Scope this method returns null . |
23,119 | public int getAppContextSessionCount ( PageContext pc ) { ApplicationContext appContext = pc . getApplicationContext ( ) ; if ( pc . getSessionType ( ) == Config . SESSION_TYPE_JEE ) return 0 ; Map < String , Scope > context = getSubMap ( cfSessionContexts , appContext . getName ( ) ) ; return getCount ( context ) ; } | return the session count of this application context |
23,120 | public long getScopesSize ( int scope ) throws ExpressionException { if ( scope == Scope . SCOPE_APPLICATION ) return SizeOf . size ( applicationContexts ) ; if ( scope == Scope . SCOPE_CLUSTER ) return SizeOf . size ( cluster ) ; if ( scope == Scope . SCOPE_SERVER ) return SizeOf . size ( server ) ; if ( scope == Scop... | return the size in bytes of all session contexts |
23,121 | private Session getJSessionScope ( PageContext pc , RefBoolean isNew ) throws PageException { HttpSession httpSession = pc . getSession ( ) ; ApplicationContext appContext = pc . getApplicationContext ( ) ; Object session = null ; int s = ( int ) appContext . getSessionTimeout ( ) . getSeconds ( ) ; if ( maxSessionTime... | return j session scope |
23,122 | public void clearUnused ( ) { Log log = getLog ( ) ; try { if ( session == null ) session = new StorageScopeEngine ( factory , log , new StorageScopeCleaner [ ] { new FileStorageScopeCleaner ( Scope . SCOPE_SESSION , null ) , new DatasourceStorageScopeCleaner ( Scope . SCOPE_SESSION , null ) } ) ; if ( client == null )... | remove all unused scope objects |
23,123 | public void clear ( ) { try { Scope scope ; Iterator < Entry < String , Map < String , Scope > > > sit = cfSessionContexts . entrySet ( ) . iterator ( ) ; Entry < String , Map < String , Scope > > sentry ; Map < String , Scope > context ; Iterator < Entry < String , Scope > > itt ; Entry < String , Scope > e ; PageCont... | remove all scope objects |
23,124 | public boolean equalTo ( CFMLEngine other , final boolean checkReferenceEqualityOnly ) { while ( other instanceof CFMLEngineWrapper ) other = ( ( CFMLEngineWrapper ) other ) . engine ; if ( checkReferenceEqualityOnly ) return engine == other ; return engine . equals ( other ) ; } | this interface is new to this class and not officially part of Lucee 3 . x do not use outside the loader |
23,125 | public void cleanUp ( ) { int nI ; for ( nI = 0 ; nI < PBOX_ENTRIES ; nI ++ ) m_pbox [ nI ] = 0 ; for ( nI = 0 ; nI < SBOX_ENTRIES ; nI ++ ) m_sbox1 [ nI ] = m_sbox2 [ nI ] = m_sbox3 [ nI ] = m_sbox4 [ nI ] = 0 ; } | to clear data in the boxes before an instance is freed |
23,126 | private static String toVariableName ( String str ) { StringBuffer rtn = new StringBuffer ( ) ; char [ ] chars = str . toCharArray ( ) ; long changes = 0 ; boolean doCorrect = true ; for ( int i = 0 ; i < chars . length ; i ++ ) { char c = chars [ i ] ; if ( i == 0 && ( c >= '0' && c <= '9' ) ) rtn . append ( "_" + c )... | translate a string to a valid variable string |
23,127 | public static String toClassName ( String str ) { StringBuffer javaName = new StringBuffer ( ) ; String [ ] arr = lucee . runtime . type . util . ListUtil . listToStringArray ( str , '/' ) ; for ( int i = 0 ; i < arr . length ; i ++ ) { if ( i == ( arr . length - 1 ) ) arr [ i ] = replaceLast ( arr [ i ] , '.' , '$' ) ... | creates a classbane from give source path |
23,128 | public void setType ( String type ) { property . setType ( type ) ; setDynamicAttribute ( null , KeyConstants . _type , type ) ; } | set the value type A string ; a property type name ; data type . |
23,129 | public void setName ( String name ) { property . setName ( name ) ; setDynamicAttribute ( null , KeyConstants . _name , name ) ; } | set the value name A string ; a property name . Must be a static value . |
23,130 | public static void deploy ( Resource dir , boolean doNew ) { String path = "/resource/component/" + ( Constants . DEFAULT_PACKAGE . replace ( '.' , '/' ) ) + "/" ; deploy ( dir , path , doNew , "Base" ) ; deploy ( dir , path , doNew , "Feed" ) ; deploy ( dir , path , doNew , "Ftp" ) ; deploy ( dir , path , doNew , "Htt... | this method deploy all components for org . lucee . cfml |
23,131 | public static final File URLToFile ( URL url ) throws MalformedURLException { if ( ! "file" . equals ( url . getProtocol ( ) ) ) throw new MalformedURLException ( "URL protocol must be 'file'." ) ; return new File ( URIToFilename ( url . getFile ( ) ) ) ; } | translate a URL to a File Object |
23,132 | public static final String URIToFilename ( String str ) { if ( str . length ( ) >= 3 ) { if ( str . charAt ( 0 ) == '/' && str . charAt ( 2 ) == ':' ) { char ch1 = Character . toUpperCase ( str . charAt ( 1 ) ) ; if ( ch1 >= 'A' && ch1 <= 'Z' ) str = str . substring ( 1 ) ; } } str = str . replace ( '/' , java . io . F... | Fixes a platform dependent filename to standard URI form . |
23,133 | private void connect ( ) throws IOException { client = AFTPClient . getInstance ( conn . secure ( ) , address , conn . getPort ( ) , conn . getUsername ( ) , conn . getPassword ( ) , conn . getFingerprint ( ) , conn . getStopOnError ( ) ) ; if ( client instanceof SFTPClientImpl && conn . getKey ( ) != null ) { ( ( SFTP... | connects the client |
23,134 | public static Session getInstance ( PageContext pc , RefBoolean isNew , Log log ) { isNew . setValue ( true ) ; return new SessionMemory ( pc , log ) ; } | load a new instance of the class |
23,135 | public static String [ ] toRole ( Object oRoles ) throws PageException { if ( oRoles instanceof String ) { oRoles = ListUtil . listToArrayRemoveEmpty ( oRoles . toString ( ) , "," ) ; } if ( oRoles instanceof Array ) { Array arrRoles = ( Array ) oRoles ; String [ ] roles = new String [ arrRoles . size ( ) ] ; for ( int... | convert a Object to a String Array of Roles |
23,136 | public static Credential decode ( Object encoded , Resource rolesDir ) throws PageException { String dec ; try { dec = Base64Coder . decodeToString ( Caster . toString ( encoded ) , "UTF-8" ) ; } catch ( Exception e ) { throw Caster . toPageException ( e ) ; } Array arr = ListUtil . listToArray ( dec , "" + ONE ) ; int... | decode the Credential form a Base64 String value |
23,137 | public static String decodeToString ( String encoded , String charset ) throws CoderException , UnsupportedEncodingException { byte [ ] dec = decode ( Caster . toString ( encoded , null ) ) ; return new String ( dec , charset ) ; } | decodes a Base64 String to a Plain String |
23,138 | public static String encodeFromString ( String plain , String charset ) throws CoderException , UnsupportedEncodingException { return encode ( plain . getBytes ( charset ) ) ; } | encodes a String to Base64 String |
23,139 | public static Object duplicate ( Object object , boolean deepCopy ) { if ( object == null ) return null ; if ( object instanceof Number ) return object ; if ( object instanceof String ) return object ; if ( object instanceof Date ) return ( ( Date ) object ) . clone ( ) ; if ( object instanceof Boolean ) return object ... | reference type value duplication |
23,140 | public static Map duplicateMap ( Map map , boolean doKeysLower , boolean deepCopy ) throws PageException { if ( doKeysLower ) { Map newMap ; try { newMap = ( Map ) ClassUtil . loadInstance ( map . getClass ( ) ) ; } catch ( ClassException e ) { newMap = new HashMap ( ) ; } boolean inside = ThreadLocalDuplication . set ... | duplicate a map |
23,141 | public void setType ( String type ) throws ExpressionException { type = type . toLowerCase ( ) . trim ( ) ; if ( type . equals ( "exception" ) ) { errorPage . setType ( ErrorPage . TYPE_EXCEPTION ) ; } else if ( type . equals ( "request" ) ) { errorPage . setType ( ErrorPage . TYPE_REQUEST ) ; } else throw new Expressi... | set the value type The type of error that the custom error page handles . |
23,142 | public void setTemplate ( String template ) throws MissingIncludeException { PageSource ps = pageContext . getCurrentPageSource ( ) . getRealPage ( template ) ; if ( ! ps . exists ( ) ) throw new MissingIncludeException ( ps ) ; errorPage . setTemplate ( ps ) ; } | set the value template The relative path to the custom error page . |
23,143 | public OutputStream getOutputStream ( ) throws IOException { if ( ! _file . isWriteable ( ) ) { throw new IOException ( "Cannot write" ) ; } return IOUtil . toBufferedOutputStream ( _file . getOutputStream ( ) ) ; } | Get output stream . |
23,144 | public final void writeOut ( Context c ) throws TransformerException { BytecodeContext bc = ( BytecodeContext ) c ; ExpressionUtil . visitLine ( bc , start ) ; _writeOut ( bc ) ; ExpressionUtil . visitLine ( bc , end ) ; } | write out the statement to adapter |
23,145 | public boolean forwardIfCurrent ( String first , char second ) { int start = pos ; if ( ! forwardIfCurrent ( first ) ) return false ; removeSpace ( ) ; boolean rtn = forwardIfCurrent ( second ) ; if ( ! rtn ) pos = start ; return rtn ; } | Gibt zurueck ob first den folgenden Zeichen entspricht gefolgt von Leerzeichen und second wenn ja wird der Zeiger um die Laenge der uebereinstimmung nach vorne gestellt . |
23,146 | public boolean forwardIfCurrent ( short before , String val , short after ) { int start = pos ; if ( before == AT_LEAST_ONE_SPACE ) { if ( ! removeSpace ( ) ) return false ; } else removeSpace ( ) ; if ( ! forwardIfCurrent ( val ) ) { setPos ( start ) ; return false ; } if ( after == AT_LEAST_ONE_SPACE ) { if ( ! remov... | Gibt zurueck ob ein Wert folgt und vor und hinterher Leerzeichen folgen . |
23,147 | public SourceCode subCFMLString ( int start , int count ) { return new SourceCode ( String . valueOf ( text , start , count ) , writeLog , dialect ) ; } | return a subset of the current SourceCode |
23,148 | public int getLine ( int pos ) { for ( int i = 0 ; i < lines . length ; i ++ ) { if ( pos <= lines [ i ] . intValue ( ) ) return i + 1 ; } return lines . length ; } | Gibt zurueck in welcher Zeile die angegebene Position ist . |
23,149 | public int getColumn ( int pos ) { int line = getLine ( pos ) - 1 ; if ( line == 0 ) return pos + 1 ; return pos - lines [ line - 1 ] . intValue ( ) ; } | Gibt die Stelle in der Zeile auf die pos zeigt zurueck . |
23,150 | public String getLineAsString ( int line ) { int index = line - 1 ; if ( lines . length <= index ) return null ; int max = lines [ index ] . intValue ( ) ; int min = 0 ; if ( index != 0 ) min = lines [ index - 1 ] . intValue ( ) + 1 ; if ( min < max && max - 1 < lcText . length ) return this . substring ( min , max - m... | Gibt die angegebene Zeile als String zurueck . |
23,151 | public int indexOfNext ( char c ) { for ( int i = pos ; i < lcText . length ; i ++ ) { if ( lcText [ i ] == c ) return i ; } return - 1 ; } | Gibt zurueck ausgehend von der aktuellen Position wann das naechste Zeichen folgt das gleich ist wie die Eingabe falls keines folgt wird - 1 zurueck gegeben . Gross - und Kleinschreibung der Zeichen werden igoriert . |
23,152 | public String lastWord ( ) { int size = 1 ; while ( pos - size > 0 && lcText [ pos - size ] == ' ' ) { size ++ ; } while ( pos - size > 0 && lcText [ pos - size ] != ' ' && lcText [ pos - size ] != ';' ) { size ++ ; } return this . substring ( ( pos - size + 1 ) , ( pos - 1 ) ) ; } | Gibt das letzte Wort das sich vor dem aktuellen Zeigerstand befindet zurueck falls keines existiert wird null zurueck gegeben . |
23,153 | protected void closeFile ( ) { if ( this . qw != null ) { try { this . qw . close ( ) ; } catch ( java . io . IOException e ) { LogLog . error ( "Could not close " + qw , e ) ; } } } | Closes the previously opened file . |
23,154 | private static void removeTable ( Connection conn , String name ) throws SQLException { name = name . replace ( '.' , '_' ) ; Statement stat = conn . createStatement ( ) ; stat . execute ( "DROP TABLE " + name ) ; DBUtil . commitEL ( conn ) ; } | remove a table from the memory database |
23,155 | private static void removeAll ( Connection conn , ArrayList < String > usedTables ) { int len = usedTables . size ( ) ; for ( int i = 0 ; i < len ; i ++ ) { String tableName = usedTables . get ( i ) . toString ( ) ; try { removeTable ( conn , tableName ) ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( ... | remove all table inside the memory database |
23,156 | public Query execute ( PageContext pc , SQL sql , int maxrows , int fetchsize , TimeSpan timeout ) throws PageException { Stopwatch stopwatch = new Stopwatch ( Stopwatch . UNIT_NANO ) ; stopwatch . start ( ) ; String prettySQL = null ; Selects selects = null ; try { SelectParser parser = new SelectParser ( ) ; selects ... | executes a query on the queries inside the cld fusion enviroment |
23,157 | final Entry < K , V > getEntry ( Object key ) { int hash = ( key == null ) ? 0 : hash ( key ) ; for ( Entry < K , V > e = table [ indexFor ( hash , table . length ) ] ; e != null ; e = e . next ) { if ( e . hash == hash && ( ( e . key ) == key || ( key != null && key . equals ( e . key ) ) ) ) return e ; } return null ... | Returns the entry associated with the specified key in the HashMap . Returns null if the HashMap contains no mapping for the key . |
23,158 | private V putForNullKey ( V value ) { for ( Entry < K , V > e = table [ 0 ] ; e != null ; e = e . next ) { if ( e . key == null ) { V oldValue = e . value ; e . value = value ; e . recordAccess ( this ) ; return oldValue ; } } modCount ++ ; addEntry ( 0 , null , value , 0 ) ; return null ; } | Offloaded version of put for null keys |
23,159 | public static String getFolderName ( String name , String cfid , boolean addExtension ) { if ( addExtension ) return getFolderName ( name , cfid , false ) + ".scpt" ; if ( ! StringUtil . isEmpty ( name ) ) name = encode ( name ) ; else name = "__empty__" ; return name + "/" + cfid . substring ( 0 , 2 ) + "/" + cfid . s... | return a folder name that match given input |
23,160 | public static Clob toClob ( Object value ) throws PageException { if ( value instanceof Clob ) return ( Clob ) value ; else if ( value instanceof char [ ] ) return toClob ( new String ( ( char [ ] ) value ) ) ; else if ( value instanceof Reader ) { StringWriter sw = new StringWriter ( ) ; try { IOUtil . copy ( ( Reader... | cast given value to a clob |
23,161 | public static final String crypt ( String original ) { java . util . Random randomGenerator = new java . util . Random ( ) ; int numSaltChars = saltChars . length ; String salt ; salt = ( new StringBuffer ( ) ) . append ( saltChars [ Math . abs ( randomGenerator . nextInt ( ) ) % numSaltChars ] ) . append ( saltChars [... | Encrypt a password given the cleartext password . This method generates a random salt using the java . util . Random class . |
23,162 | public void setKeyValue ( String strSection , String key , String value ) { Map section = getSectionEL ( strSection ) ; if ( section == null ) { section = newMap ( ) ; sections . put ( strSection . toLowerCase ( ) , section ) ; } section . put ( key . toLowerCase ( ) , value ) ; } | Sets the KeyValue attribute of the IniFile object |
23,163 | public Map getSection ( String strSection ) throws IOException { Object o = sections . get ( strSection . toLowerCase ( ) ) ; if ( o == null ) throw new IOException ( "section with name " + strSection + " does not exist" ) ; return ( Map ) o ; } | Gets the Section attribute of the IniFile object |
23,164 | public Map getSectionEL ( String strSection ) { Object o = sections . get ( strSection . toLowerCase ( ) ) ; if ( o == null ) return null ; return ( Map ) o ; } | Gets the Section attribute of the IniFile object return null if section not exist |
23,165 | public boolean isNullOrEmpty ( String section , String key ) { String value = getKeyValueEL ( section , key ) ; return ( value == null || value . length ( ) == 0 ) ; } | Gets the NullOrEmpty attribute of the IniFile object |
23,166 | public String getKeyValue ( String strSection , String key ) throws IOException { Object o = getSection ( strSection ) . get ( key . toLowerCase ( ) ) ; if ( o == null ) throw new IOException ( "key " + key + " doesn't exist in section " + strSection ) ; return ( String ) o ; } | Gets the KeyValue attribute of the IniFile object |
23,167 | public String getKeyValueEL ( String strSection , String key ) { Map map = getSectionEL ( strSection ) ; if ( map == null ) return null ; Object o = map . get ( key . toLowerCase ( ) ) ; if ( o == null ) return null ; return ( String ) o ; } | Gets the KeyValue attribute of the IniFile object if not exist return null |
23,168 | public void load ( InputStream in ) throws IOException { BufferedReader input = IOUtil . toBufferedReader ( new InputStreamReader ( in ) ) ; String read ; Map section = null ; String sectionName ; while ( ( read = input . readLine ( ) ) != null ) { if ( read . startsWith ( ";" ) || read . startsWith ( "#" ) ) { continu... | loads the ini file |
23,169 | public void save ( ) throws IOException { if ( ! file . exists ( ) ) file . createFile ( true ) ; OutputStream out = IOUtil . toBufferedOutputStream ( file . getOutputStream ( ) ) ; Iterator it = sections . keySet ( ) . iterator ( ) ; PrintWriter output = new PrintWriter ( out ) ; try { while ( it . hasNext ( ) ) { Str... | save back content to ini file |
23,170 | private final Switch switchStatement ( Data data ) throws TemplateException { if ( ! data . srcCode . forwardIfCurrent ( "switch" , '(' ) ) return null ; Position line = data . srcCode . getPosition ( ) ; comments ( data ) ; Expression expr = super . expression ( data ) ; comments ( data ) ; if ( ! data . srcCode . for... | Liest ein switch Statment ein |
23,171 | private final boolean caseStatement ( Data data , Switch swit ) throws TemplateException { if ( ! data . srcCode . forwardIfCurrentAndNoWordAfter ( "case" ) ) return false ; comments ( data ) ; Expression expr = super . expression ( data ) ; comments ( data ) ; if ( ! data . srcCode . forwardIfCurrent ( ':' ) ) throw n... | Liest ein Case Statement ein |
23,172 | private final boolean defaultStatement ( Data data , Switch swit ) throws TemplateException { if ( ! data . srcCode . forwardIfCurrent ( "default" , ':' ) ) return false ; Body body = new BodyBase ( data . factory ) ; swit . setDefaultCase ( body ) ; switchBlock ( data , body ) ; return true ; } | Liest ein default Statement ein |
23,173 | private final void switchBlock ( Data data , Body body ) throws TemplateException { while ( data . srcCode . isValidIndex ( ) ) { comments ( data ) ; if ( data . srcCode . isCurrent ( "case " ) || data . srcCode . isCurrent ( "default" , ':' ) || data . srcCode . isCurrent ( '}' ) ) return ; Body prior = data . setPare... | Liest ein Switch Block ein |
23,174 | private final boolean isFinish ( Data data ) throws TemplateException { comments ( data ) ; if ( data . tagName == null ) return false ; return data . srcCode . isCurrent ( "</" , data . tagName ) ; } | Prueft ob sich der Zeiger am Ende eines Script Blockes befindet |
23,175 | public List < URL > getURLS ( String html , URL url ) { List < URL > urls = new ArrayList < URL > ( ) ; SourceCode cfml = new SourceCode ( html , false , CFMLEngine . DIALECT_CFML ) ; while ( ! cfml . isAfterLast ( ) ) { if ( cfml . forwardIfCurrent ( '<' ) ) { for ( int i = 0 ; i < tags . length ; i ++ ) { if ( cfml .... | returns all urls in a html String |
23,176 | public static boolean isCfmxCompat ( String algorithm ) { if ( StringUtil . isEmpty ( algorithm , true ) ) return true ; return algorithm . equalsIgnoreCase ( CFMXCompat . ALGORITHM_NAME ) ; } | returns true if the passed value is empty or is CFMX_COMPAT |
23,177 | public static TagLib [ ] loadFromDirectory ( Resource dir , Identification id ) throws TagLibException { if ( ! dir . isDirectory ( ) ) return new TagLib [ 0 ] ; ArrayList < TagLib > arr = new ArrayList < TagLib > ( ) ; Resource [ ] files = dir . listResources ( new ExtensionResourceFilter ( new String [ ] { "tld" , "t... | Laedt mehrere TagLib s die innerhalb eines Verzeichnisses liegen . |
23,178 | private static TagLib [ ] loadFromSystem ( Identification id ) throws TagLibException { if ( systemTLDs [ CFMLEngine . DIALECT_CFML ] == null ) { TagLib cfml = new TagLibFactory ( null , TLD_BASE , id ) . getLib ( ) ; TagLib lucee = cfml . duplicate ( false ) ; systemTLDs [ CFMLEngine . DIALECT_CFML ] = new TagLibFacto... | Laedt die Systeminterne TLD . |
23,179 | public void setProxyport ( double proxyport ) throws ApplicationException { try { smtp . getProxyData ( ) . setPort ( ( int ) proxyport ) ; } catch ( Exception e ) { throw new ApplicationException ( "attribute [proxyport] of the tag [mail] is invalid" , e . getMessage ( ) ) ; } } | set the value proxyport The port number on the proxy server from which the object is 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,180 | public void setProxyuser ( String proxyuser ) throws ApplicationException { try { smtp . getProxyData ( ) . setUsername ( proxyuser ) ; } catch ( Exception e ) { throw new ApplicationException ( "attribute [proxyuser] of the tag [mail] is invalid" , e . getMessage ( ) ) ; } } | set the value username When required by a proxy server a valid username . |
23,181 | public void setProxypassword ( String proxypassword ) throws ApplicationException { try { smtp . getProxyData ( ) . setPassword ( proxypassword ) ; } catch ( Exception e ) { throw new ApplicationException ( "attribute [proxypassword] of the tag [mail] is invalid" , e . getMessage ( ) ) ; } } | set the value password When required by a proxy server a valid password . |
23,182 | public void setFrom ( Object from ) throws PageException { if ( StringUtil . isEmpty ( from , true ) ) throw new ApplicationException ( "attribute [from] cannot be empty" ) ; try { smtp . setFrom ( from ) ; } catch ( Exception e ) { throw Caster . toPageException ( e ) ; } } | set the value from The sender of the e - mail message . |
23,183 | public void setTo ( Object to ) throws ApplicationException { if ( StringUtil . isEmpty ( to ) ) return ; try { smtp . addTo ( to ) ; } catch ( Exception e ) { throw new ApplicationException ( "attribute [to] of the tag [mail] is invalid" , e . getMessage ( ) ) ; } } | set the value to The name of the e - mail message recipient . |
23,184 | public void setCc ( Object cc ) throws ApplicationException { if ( StringUtil . isEmpty ( cc ) ) return ; try { smtp . addCC ( cc ) ; } catch ( Exception e ) { throw new ApplicationException ( "attribute [cc] of the tag [mail] is invalid" , e . getMessage ( ) ) ; } } | set the value cc Indicates addresses to copy the e - mail message to ; cc stands for carbon copy . |
23,185 | public void setBcc ( Object bcc ) throws ApplicationException { if ( StringUtil . isEmpty ( bcc ) ) return ; try { smtp . addBCC ( bcc ) ; } catch ( Exception e ) { throw new ApplicationException ( "attribute [bcc] of the tag [mail] is invalid" , e . getMessage ( ) ) ; } } | set the value bcc Indicates addresses to copy the e - mail message to without listing them in the message header . bcc stands for blind carbon copy . |
23,186 | public void setType ( String type ) throws ApplicationException { type = type . toLowerCase ( ) . trim ( ) ; if ( type . equals ( "text/plain" ) || type . equals ( "plain" ) || type . equals ( "text" ) ) getPart ( ) . isHTML ( false ) ; else if ( type . equals ( "text/html" ) || type . equals ( "html" ) || type . equal... | set the value type Specifies extended type attributes for the message . |
23,187 | public void setMimeattach ( String strMimeattach , String fileName , String type , String disposition , String contentID , boolean removeAfterSend ) throws PageException { Resource file = ResourceUtil . toResourceNotExisting ( pageContext , strMimeattach ) ; pageContext . getConfig ( ) . getSecurityManager ( ) . checkF... | set the value mimeattach Specifies the path of the file to be attached to the e - mail message . An attached file is MIME - encoded . |
23,188 | public void setParam ( String type , String file , String fileName , String name , String value , String disposition , String contentID , Boolean oRemoveAfterSend ) throws PageException { if ( file != null ) { boolean removeAfterSend = ( oRemoveAfterSend == null ) ? remove : oRemoveAfterSend . booleanValue ( ) ; setMim... | sets a mail param |
23,189 | public Method [ ] getMethods ( Class clazz , Collection . Key methodName , int count ) { Map < Key , Array > methodsMap = map . get ( clazz ) ; if ( methodsMap == null ) methodsMap = store ( clazz ) ; Array methods = methodsMap . get ( methodName ) ; if ( methods == null ) return null ; Object o = methods . get ( count... | returns a methods matching given criteria or null if method doesn t exist |
23,190 | private void storeArgs ( Method method , Array methodArgs ) { Class [ ] pmt = method . getParameterTypes ( ) ; Method [ ] args ; synchronized ( methodArgs ) { Object o = methodArgs . get ( pmt . length + 1 , null ) ; if ( o == null ) { args = new Method [ 1 ] ; methodArgs . setEL ( pmt . length + 1 , args ) ; } else { ... | stores arguments of a method |
23,191 | public Mapping getApplicationMapping ( String virtual , String physical ) { return getApplicationMapping ( "application" , virtual , physical , null , true , false ) ; } | FYI used by Extensions do not remove |
23,192 | StringBuilder fwdQuote ( char q ) { StringBuilder sb = new StringBuilder ( ) ; while ( hasNext ( ) ) { next ( ) ; sb . append ( buffer [ pos ] ) ; if ( isCurr ( q ) ) { if ( isNext ( q ) ) { next ( ) ; } else { break ; } } } if ( sb . length ( ) > 0 ) sb . setLength ( sb . length ( ) - 1 ) ; return sb ; } | forward pos until the end of quote |
23,193 | public static String getMD5Checksum ( Resource res ) throws Exception { byte [ ] b = createChecksum ( res ) ; String result = "" ; for ( int i = 0 ; i < b . length ; i ++ ) { result += Integer . toString ( ( b [ i ] & 0xff ) + 0x100 , 16 ) . substring ( 1 ) ; } return result ; } | a byte array to a HEX string |
23,194 | protected FTPWrap _get ( FTPConnection conn ) throws IOException , ApplicationException { FTPWrap wrap = null ; if ( ! conn . hasLoginData ( ) ) { if ( StringUtil . isEmpty ( conn . getName ( ) ) ) { throw new ApplicationException ( "can't connect ftp server, missing connection definition" ) ; } wrap = wraps . get ( co... | returns a client from given connection |
23,195 | private void disconnect ( AFTPClient client ) { try { if ( client != null && client . isConnected ( ) ) { client . quit ( ) ; client . disconnect ( ) ; } } catch ( IOException ioe ) { } } | disconnect a client |
23,196 | static void createConfigFile ( String xmlName , Resource configFile ) throws IOException { configFile . createFile ( true ) ; createFileFromResource ( "/resource/config/" + xmlName + ".xml" , configFile . getAbsoluteResource ( ) ) ; } | creates the Config File if File not exist |
23,197 | static Element getChildByName ( Node parent , String nodeName ) { return getChildByName ( parent , nodeName , false ) ; } | return first direct child Elements of a Element with given Name |
23,198 | public static Key [ ] getColumnNames ( Query qry ) { Query qp = Caster . toQuery ( qry , null ) ; if ( qp != null ) return qp . getColumnNames ( ) ; String [ ] strNames = qry . getColumns ( ) ; Key [ ] names = new Key [ strNames . length ] ; for ( int i = 0 ; i < names . length ; i ++ ) { names [ i ] = KeyImpl . getIns... | return column names as Key from a query |
23,199 | public static void checkSQLRestriction ( DatasourceConnection dc , SQL sql ) throws PageException { Array sqlparts = ListUtil . listToArrayRemoveEmpty ( SQLUtil . removeLiterals ( sql . getSQLString ( ) ) , " \t" + System . getProperty ( "line.separator" ) ) ; DataSource ds = dc . getDatasource ( ) ; if ( ! ds . hasAll... | check if there is a sql restriction |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.