private static void populateFileExtensionMimeTypeMapping  ( ) { FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "3gp" , Collections . singletonList ( "video/3gpp" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "7z" , Collections . singletonList ( "application/x-7z-compressed" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "accdb" , Collections . singletonList ( "application/msaccess" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ai" , Collections . singletonList ( "application/illustrator" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "apk" , Collections . singletonList ( "application/vnd.android.package-archive" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "arw" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "avi" , Collections . singletonList ( "video/x-msvideo" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "bash" , Collections . singletonList ( "text/x-shellscript" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "blend" , Collections . singletonList ( "application/x-blender" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "bin" , Collections . singletonList ( "application/x-bin" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "bmp" , Collections . singletonList ( "image/bmp" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "bpg" , Collections . singletonList ( "image/bpg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cb7" , Collections . singletonList ( "application/x-cbr" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cba" , Collections . singletonList ( "application/x-cbr" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cbr" , Collections . singletonList ( "application/x-cbr" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cbt" , Collections . singletonList ( "application/x-cbr" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cbtc" , Collections . singletonList ( "application/x-cbr" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cbz" , Collections . singletonList ( "application/x-cbr" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cc" , Collections . singletonList ( "text/x-c" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cdr" , Collections . singletonList ( "application/coreldraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cnf" , Collections . singletonList ( "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "conf" , Collections . singletonList ( "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cpp" , Collections . singletonList ( "text/x-c++src" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cr2" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "css" , Collections . singletonList ( "text/css" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "csv" , Collections . singletonList ( "text/csv" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "cvbdl" , Collections . singletonList ( "application/x-cbr" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "c" , Collections . singletonList ( "text/x-c" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "c++" , Collections . singletonList ( "text/x-c++src" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "dcr" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "deb" , Collections . singletonList ( "application/x-deb" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "dng" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "doc" , Collections . singletonList ( "application/msword" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "docm" , Collections . singletonList ( "application/vnd.ms-word.document.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "docx" , Collections . singletonList ( "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "dot" , Collections . singletonList ( "application/msword" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "dotx" , Collections . singletonList ( "application/vnd.openxmlformats-officedocument.wordprocessingml.template" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "dv" , Collections . singletonList ( "video/dv" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "eot" , Collections . singletonList ( "application/vnd.ms-fontobject" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "epub" , Collections . singletonList ( "application/epub+zip" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "eps" , Collections . singletonList ( "application/postscript" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "erf" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "exe" , Collections . singletonList ( "application/x-ms-dos-executable" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "flac" , Collections . singletonList ( "audio/flac" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "flv" , Collections . singletonList ( "video/x-flv" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "gif" , Collections . singletonList ( "image/gif" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "gz" , Collections . singletonList ( "application/x-gzip" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "gzip" , Collections . singletonList ( "application/x-gzip" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "h" , Collections . singletonList ( "text/x-h" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "hh" , Collections . singletonList ( "text/x-h" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "html" , Arrays . asList ( "text/html" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "htm" , Arrays . asList ( "text/html" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ical" , Collections . singletonList ( "text/calendar" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ics" , Collections . singletonList ( "text/calendar" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "iiq" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "impress" , Collections . singletonList ( "text/impress" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "jpeg" , Collections . singletonList ( "image/jpeg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "jpg" , Collections . singletonList ( "image/jpeg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "jps" , Collections . singletonList ( "image/jpeg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "js" , Arrays . asList ( "application/javascript" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "json" , Arrays . asList ( "application/json" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "k25" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "kdc" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "key" , Collections . singletonList ( "application/x-iwork-keynote-sffkey" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "keynote" , Collections . singletonList ( "application/x-iwork-keynote-sffkey" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "kra" , Collections . singletonList ( "application/x-krita" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "m2t" , Collections . singletonList ( "video/mp2t" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "m4v" , Collections . singletonList ( "video/mp4" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "markdown" , Collections . singletonList ( "text/markdown" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mdown" , Collections . singletonList ( "text/markdown" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "md" , Collections . singletonList ( "text/markdown" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mdb" , Collections . singletonList ( "application/msaccess" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mdwn" , Collections . singletonList ( "text/markdown" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mkd" , Collections . singletonList ( "text/markdown" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mef" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mkv" , Collections . singletonList ( "video/x-matroska" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mobi" , Collections . singletonList ( "application/x-mobipocket-ebook" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mov" , Collections . singletonList ( "video/quicktime" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mp3" , Collections . singletonList ( "audio/mpeg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mp4" , Collections . singletonList ( "video/mp4" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mpeg" , Collections . singletonList ( "video/mpeg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mpg" , Collections . singletonList ( "video/mpeg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mpo" , Collections . singletonList ( "image/jpeg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "msi" , Collections . singletonList ( "application/x-msi" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mts" , Collections . singletonList ( "video/MP2T" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "mt2s" , Collections . singletonList ( "video/MP2T" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "nef" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "numbers" , Collections . singletonList ( "application/x-iwork-numbers-sffnumbers" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "odf" , Collections . singletonList ( "application/vnd.oasis.opendocument.formula" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "odg" , Collections . singletonList ( "application/vnd.oasis.opendocument.graphics" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "odp" , Collections . singletonList ( "application/vnd.oasis.opendocument.presentation" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ods" , Collections . singletonList ( "application/vnd.oasis.opendocument.spreadsheet" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "odt" , Collections . singletonList ( "application/vnd.oasis.opendocument.text" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "oga" , Collections . singletonList ( "audio/ogg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ogg" , Collections . singletonList ( "audio/ogg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ogv" , Collections . singletonList ( "video/ogg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "opus" , Collections . singletonList ( "audio/ogg" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "orf" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "otf" , Collections . singletonList ( "application/font-sfnt" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pages" , Collections . singletonList ( "application/x-iwork-pages-sffpages" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pdf" , Collections . singletonList ( "application/pdf" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pfb" , Collections . singletonList ( "application/x-font" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pef" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "php" , Collections . singletonList ( "application/x-php" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pl" , Collections . singletonList ( "application/x-perl" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "png" , Collections . singletonList ( "image/png" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pot" , Collections . singletonList ( "application/vnd.ms-powerpoint" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "potm" , Collections . singletonList ( "application/vnd.ms-powerpoint.template.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "potx" , Collections . singletonList ( "application/vnd.openxmlformats-officedocument.presentationml.template" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ppa" , Collections . singletonList ( "application/vnd.ms-powerpoint" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ppam" , Collections . singletonList ( "application/vnd.ms-powerpoint.addin.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pps" , Collections . singletonList ( "application/vnd.ms-powerpoint" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ppsm" , Collections . singletonList ( "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ppsx" , Collections . singletonList ( "application/vnd.openxmlformats-officedocument.presentationml.slideshow" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ppt" , Collections . singletonList ( "application/vnd.ms-powerpoint" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pptm" , Collections . singletonList ( "application/vnd.ms-powerpoint.presentation.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "pptx" , Collections . singletonList ( "application/vnd.openxmlformats-officedocument.presentationml.presentation" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ps" , Collections . singletonList ( "application/postscript" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "psd" , Collections . singletonList ( "application/x-photoshop" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "py" , Collections . singletonList ( "text/x-python" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "raf" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "rar" , Collections . singletonList ( "application/x-rar-compressed" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "reveal" , Collections . singletonList ( "text/reveal" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "rtf" , Collections . singletonList ( "application/rtf" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "rw2" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "sgf" , Collections . singletonList ( "application/sgf" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "sh-lib" , Collections . singletonList ( "text/x-shellscript" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "sh" , Collections . singletonList ( "text/x-shellscript" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "srf" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "sr2" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "svg" , Arrays . asList ( "image/svg+xml" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "swf" , Arrays . asList ( "application/x-shockwave-flash" , "application/octet-stream" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "tar" , Collections . singletonList ( "application/x-tar" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "gz" , Collections . singletonList ( "application/x-compressed" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "tex" , Collections . singletonList ( "application/x-tex" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "tgz" , Collections . singletonList ( "application/x-compressed" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "tiff" , Collections . singletonList ( "image/tiff" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "tif" , Collections . singletonList ( "image/tiff" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "ttf" , Collections . singletonList ( "application/font-sfnt" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "txt" , Collections . singletonList ( "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "vcard" , Collections . singletonList ( "text/vcard" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "vcf" , Collections . singletonList ( "text/vcard" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "vob" , Collections . singletonList ( "video/dvd" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "wav" , Collections . singletonList ( "audio/wav" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "webm" , Collections . singletonList ( "video/webm" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "woff" , Collections . singletonList ( "application/font-woff" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "wmv" , Collections . singletonList ( "video/x-ms-wmv" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xcf" , Collections . singletonList ( "application/x-gimp" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xla" , Collections . singletonList ( "application/vnd.ms-excel" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xlam" , Collections . singletonList ( "application/vnd.ms-excel.addin.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xls" , Collections . singletonList ( "application/vnd.ms-excel" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xlsb" , Collections . singletonList ( "application/vnd.ms-excel.sheet.binary.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xlsm" , Collections . singletonList ( "application/vnd.ms-excel.sheet.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xlsx" , Collections . singletonList ( "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xlt" , Collections . singletonList ( "application/vnd.ms-excel" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xltm" , Collections . singletonList ( "application/vnd.ms-excel.template.macroEnabled.12" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xltx" , Collections . singletonList ( "application/vnd.openxmlformats-officedocument.spreadsheetml.template" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xml" , Arrays . asList ( "application/xml" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "xrf" , Collections . singletonList ( "image/x-dcraw" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "yaml" , Arrays . asList ( "application/yaml" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "yml" , Arrays . asList ( "application/yaml" , "text/plain" ) ) ; FILE_EXTENSION_TO_MIMETYPE_MAPPING . put ( "zip" , Collections . singletonList ( "application/zip" ) ) ; }

Rellena la lista de Mapeo: Extensión de archivo -> Tipo MIME.


public boolean isApplicable  ( ) { InspectorWindow inspectorWindow = ( InspectorWindow ) getViewer ( ) ; return inspectorWindow != null && inspectorWindow . getDataTree ( ) != null && inspectorWindow . getDataTree ( ) . getModel ( ) . getRoot ( ) != null && inspectorWindow . getDataTree ( ) . getModel ( ) . getChildCount ( inspectorWindow . getDataTree ( ) . getModel ( ) . getRoot ( ) ) > 0 ; }

¿El comando es actualmente aplicable?Utilizado para establecer habilitar el estado de comando


public static void noSpace  ( String string ) throws JSONException { int i , length = string . length ( ) ; if ( length == 0 ) { throw new JSONException ( "Empty string." ) ; } for ( i = 0 ; i < length ; i += 1 ) { if ( Character . isWhitespace ( string . charAt ( i ) ) ) { throw new JSONException ( "'" + string + "' contains a space character." ) ; } } }

Lanzar una excepción si la cadena contiene espacios en blanco.El espacio en blanco no está permitido en los nombres de etiquetas y atributos.


private InputStream toBufferedInputStream  ( ) { int remaining = count ; if ( remaining == 0 ) { return new ClosedInputStream ( ) ; } List < ByteArrayInputStream > list = new ArrayList < ByteArrayInputStream > ( buffers . size ( ) ) ; for ( byte [ ] buf : buffers ) { int c = Math . min ( buf . length , remaining ) ; list . add ( new ByteArrayInputStream ( buf , 0 , c ) ) ; remaining -= c ; if ( remaining == 0 ) { break ; } } return new SequenceInputStream ( Collections . enumeration ( list ) ) ; }

Obtiene los contenidos actuales de este flujo de bytes como un flujo de entrada.La corriente devuelta está respaldada por búferes de <código> este flujo </ código>, evitando la asignación de memoria y la copia, ahorrando así el espacio y la hora. <br>


public RMA2Creator ( File file , TextStoragePolicy textStoragePolicy , LocationManager locationManager ) throws IOException { rma2File = new RMA2File ( file ) ; this . textStoragePolicy = textStoragePolicy ; this . locationManager = locationManager ; infoSection = rma2File . getInfoSection ( ) ; rma2Formatter = infoSection . getRMA2Formatter ( ) ; infoSection . setTextStoragePolicy ( textStoragePolicy ) ; switch ( textStoragePolicy ) { case Embed : infoSection . setTextFileNames ( new String [ 0 ] ) ; infoSection . setTextFileSizes ( new Long [ 0 ] ) ; fileWriter = rma2File . getFileWriter ( ) ; tmpWriter = rma2File . getTmpIndexFileWriter ( ) ; dumpWriter = null ; infoSection . setDataDumpSectionStart ( fileWriter . getPosition ( ) ) ; break ; case InRMAZ : if ( locationManager . getFiles ( ) . size ( ) != 1 ) throw new IOException ( "Wrong number of dump-file names: " + locationManager . getFileNames ( ) . length ) ; infoSection . setTextFileNames ( locationManager . getFileNames ( ) ) ; infoSection . setTextFileSizes ( new Long [ 0 ] ) ; File dumpFile = locationManager . getFile ( 0 ) ; fileWriter = rma2File . getFileWriter ( ) ; dumpWriter = rma2File . getDataDumpWriter ( dumpFile ) ; tmpWriter = null ; infoSection . setDataIndexSectionStart ( fileWriter . getPosition ( ) ) ; fileWriter . write ( RMA2File . CHECK_BYTE ) ; break ; case Reference : infoSection . setTextFileNames ( locationManager . getFileNames ( ) ) ; infoSection . setTextFileSizes ( locationManager . getFileSizes ( ) ) ; fileWriter = rma2File . getFileWriter ( ) ; dumpWriter = null ; tmpWriter = null ; infoSection . setDataIndexSectionStart ( fileWriter . getPosition ( ) ) ; fileWriter . write ( RMA2File . CHECK_BYTE ) ; break ; default : throw new IOException ( "Unknown textStoragePolicy: " + textStoragePolicy ) ; } }


Context ( Map < SnippetKey , Snippet > snippets )  { this ( snippets , ImmutableMap . < String , Object > of ( ) ) ; }

Construir un contexto con fragmentos dados.


public void init$Children  ( ) { children = new ASTNode [ 3 ] ; setChild ( new List ( ) , 1 ) ; setChild ( new List ( ) , 2 ) ; }

Inicializa la matriz de niños al tamaño correcto.Inicializa la lista y opta a los niños NTA.


static String _targetSoFile  ( String libName , int version ) { Context context = mContext ; if ( null == context ) { return "" ; } String path = "/data/data/" + context . getPackageName ( ) + "/files" ; File f = context . getFilesDir ( ) ; if ( f != null ) { path = f . getPath ( ) ; } return path + "/lib" + libName + "bk" + version + ".so" ; }

Concatenar el camino de la biblioteca así, incluido el directorio.


public NicknamePokemonResponse . Result renamePokemon  ( String nickname ) throws LoginFailedException , RemoteServerException  { NicknamePokemonMessage reqMsg = NicknamePokemonMessage . newBuilder ( ) . setPokemonId ( getId ( ) ) . setNickname ( nickname ) . build ( ) ; ServerRequest serverRequest = new ServerRequest ( RequestType . NICKNAME_POKEMON , reqMsg ) ; api . getRequestHandler ( ) . sendServerRequests ( serverRequest ) ; NicknamePokemonResponse response ; try { response = NicknamePokemonResponse . parseFrom ( serverRequest . getData ( ) ) ; } catch ( InvalidProtocolBufferException e ) { throw new RemoteServerException ( e ) ; } api . getInventories ( ) . getPokebank ( ) . removePokemon ( this ) ; api . getInventories ( ) . updateInventories ( ) ; return response . getResult ( ) ; }

Cambie el nombre Pokemon Apodo Pokémon Respuesta.resultado.


public void testTypesHashMapField  ( ) throws Exception  { AnObject empty = new AnObject ( ) ; AnObject full = helper . fill ( new AnObject ( ) ) ; Object value = getPropertyValue ( full , "mapField" ) ; assertTrue ( value instanceof HashMap ) ; assertTrue ( helper . areEquals ( full , full ) ) ; assertFalse ( helper . areEquals ( empty , full ) ) ; }


protected AbstractFormat ( final NumberFormat numeratorFormat , final NumberFormat denominatorFormat ) { this . numeratorFormat = numeratorFormat ; this . denominatorFormat = denominatorFormat ; }

Cree una instancia de formato incorrecto con un formato de número personalizado para el numerador y un formato de número personalizado para el denominador.


public void init$Children  ( ) { children = new ASTNode [ 4 ] ; setChild ( new List ( ) , 1 ) ; setChild ( new List ( ) , 2 ) ; setChild ( new List ( ) , 3 ) ; }


public boolean isApplicable  ( ) { return true ; }


public GSBytesMessageImpl ( ) throws JMSException  { super ( ) ; }

Instantánea un nuevo <código> gsbytesmessageimpl </ code>.


static void usage  ( String voices ) { System . out . println ( VERSION ) ; System . out . println ( "Usage:" ) ; System . out . println ( "    -detailedMetrics: turn on detailed metrics" ) ; System . out . println ( "    -dumpAudio file : dump audio to file " ) ; System . out . println ( "    -dumpAudioTypes : dump the possible" + " output types" ) ; System . out . println ( "    -dumpMultiAudio file : dump audio to file " ) ; System . out . println ( "    -dumpRelations  : dump the relations " ) ; System . out . println ( "    -dumpUtterance  : dump the final utterance" ) ; System . out . println ( "    -dumpASCII file : dump the final wave to file as ASCII" ) ; System . out . println ( "    -file file      : speak text from given file" ) ; System . out . println ( "    -lines file     : render lines from a file" ) ; System . out . println ( "    -help           : shows usage information" ) ; System . out . println ( "    -voiceInfo      : print detailed voice info" ) ; System . out . println ( "    -metrics        : turn on metrics" ) ; System . out . println ( "    -run  name      : sets the name of the run" ) ; System . out . println ( "    -silent         : don't say anything" ) ; System . out . println ( "    -streaming      : use streaming audio player" ) ; System . out . println ( "    -text say me    : speak given text" ) ; System . out . println ( "    -url path       : speak text from given URL" ) ; System . out . println ( "    -verbose        : verbose output" ) ; System . out . println ( "    -version        : shows version number" ) ; System . out . println ( "    -voice VOICE    : " + voices ) ; }


public boolean isGlobalFindable  ( ) { return classificationViewer . getTree ( ) . getNumberOfNodes ( ) > 0 ; }


public synchronized void activityStop  ( ) { if ( this . spinnerDialog != null ) { this . spinnerDialog . dismiss ( ) ; this . spinnerDialog = null ; } }


@ Override public int hashCode  ( ) { final int prime = 31 ; int result = 1 ; result = prime * result + ( ( left == null ) ? 0 : left . hashCode ( ) ) ; result = prime * result + ( ( right == null ) ? 0 : right . hashCode ( ) ) ; return result ; }


public static String geFileFromAssets  ( Context context , String fileName ) { if ( context == null || StringUtil . isEmpty ( fileName ) ) { return null ; } StringBuilder s = new StringBuilder ( "" ) ; try { InputStreamReader in = new InputStreamReader ( context . getResources ( ) . getAssets ( ) . open ( fileName ) ) ; BufferedReader br = new BufferedReader ( in ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { s . append ( line ) ; } return s . toString ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return null ; } }

Obtenga un activo con el modo Access_Streaming.Esto proporciona acceso a los archivos que se han incluido con una aplicación como activos, es decir, archivos colocados en el directorio "Activos".


public static boolean isSignedDouble  ( String s ) { if ( isEmpty ( s ) ) return defaultEmptyOK ; try { Double . parseDouble ( s ) ; return true ; } catch ( Exception e ) { return false ; } }

Verdadero Si la cadena S es un número de punto flotante (real) firmado o sin firmar.El primer carácter se le permite ser + o -.También devuelve verdadero para enteros sin firmar.Si desea distinguir entre enteros y números de puntos flotantes, primero llame a ISSIGNEDEGEGER, luego llame a IssignedFloat.


public void testAddBroadcastReceiver  ( ) throws Exception  { final VirtualFile file = myFixture . copyFileToProject ( "intentions/DummyReceiver.java" , "src/com/example/DummyReceiver.java" ) ; myFixture . configureFromExistingVirtualFile ( file ) ; final IntentionAction action = AndroidTestUtils . getIntentionAction ( myFixture , "Add broadcast receiver to manifest" ) ; assertNotNull ( action ) ; action . invoke ( getProject ( ) , myFixture . getEditor ( ) , myFixture . getFile ( ) ) ; myFixture . checkResultByFile ( "AndroidManifest.xml" , "intentions/DummyReceiver_manifest_after.xml" , true ) ; }

Prueba que "agregar el receptor de difusión" se muestra una intención rápida y funciona


private T [ ] mat2quat  ( final T [ ] [ ] ort ) { final T [ ] quat = MathArrays . buildArray ( ort [ 0 ] [ 0 ] . getField ( ) , 4 ) ; T s = ort [ 0 ] [ 0 ] . add ( ort [ 1 ] [ 1 ] ) . add ( ort [ 2 ] [ 2 ] ) ; if ( s . getReal ( ) > - 0.19 ) { quat [ 0 ] = s . add ( 1.0 ) . sqrt ( ) . multiply ( 0.5 ) ; T inv = quat [ 0 ] . reciprocal ( ) . multiply ( 0.25 ) ; quat [ 1 ] = inv . multiply ( ort [ 1 ] [ 2 ] . subtract ( ort [ 2 ] [ 1 ] ) ) ; quat [ 2 ] = inv . multiply ( ort [ 2 ] [ 0 ] . subtract ( ort [ 0 ] [ 2 ] ) ) ; quat [ 3 ] = inv . multiply ( ort [ 0 ] [ 1 ] . subtract ( ort [ 1 ] [ 0 ] ) ) ; } else { s = ort [ 0 ] [ 0 ] . subtract ( ort [ 1 ] [ 1 ] ) . subtract ( ort [ 2 ] [ 2 ] ) ; if ( s . getReal ( ) > - 0.19 ) { quat [ 1 ] = s . add ( 1.0 ) . sqrt ( ) . multiply ( 0.5 ) ; T inv = quat [ 1 ] . reciprocal ( ) . multiply ( 0.25 ) ; quat [ 0 ] = inv . multiply ( ort [ 1 ] [ 2 ] . subtract ( ort [ 2 ] [ 1 ] ) ) ; quat [ 2 ] = inv . multiply ( ort [ 0 ] [ 1 ] . add ( ort [ 1 ] [ 0 ] ) ) ; quat [ 3 ] = inv . multiply ( ort [ 0 ] [ 2 ] . add ( ort [ 2 ] [ 0 ] ) ) ; } else { s = ort [ 1 ] [ 1 ] . subtract ( ort [ 0 ] [ 0 ] ) . subtract ( ort [ 2 ] [ 2 ] ) ; if ( s . getReal ( ) > - 0.19 ) { quat [ 2 ] = s . add ( 1.0 ) . sqrt ( ) . multiply ( 0.5 ) ; T inv = quat [ 2 ] . reciprocal ( ) . multiply ( 0.25 ) ; quat [ 0 ] = inv . multiply ( ort [ 2 ] [ 0 ] . subtract ( ort [ 0 ] [ 2 ] ) ) ; quat [ 1 ] = inv . multiply ( ort [ 0 ] [ 1 ] . add ( ort [ 1 ] [ 0 ] ) ) ; quat [ 3 ] = inv . multiply ( ort [ 2 ] [ 1 ] . add ( ort [ 1 ] [ 2 ] ) ) ; } else { s = ort [ 2 ] [ 2 ] . subtract ( ort [ 0 ] [ 0 ] ) . subtract ( ort [ 1 ] [ 1 ] ) ; quat [ 3 ] = s . add ( 1.0 ) . sqrt ( ) . multiply ( 0.5 ) ; T inv = quat [ 3 ] . reciprocal ( ) . multiply ( 0.25 ) ; quat [ 0 ] = inv . multiply ( ort [ 0 ] [ 1 ] . subtract ( ort [ 1 ] [ 0 ] ) ) ; quat [ 1 ] = inv . multiply ( ort [ 0 ] [ 2 ] . add ( ort [ 2 ] [ 0 ] ) ) ; quat [ 2 ] = inv . multiply ( ort [ 2 ] [ 1 ] . add ( ort [ 1 ] [ 2 ] ) ) ; } } } return quat ; }

Convertir una matriz de rotación ortogonal a un cuaternión.


@ Override public void startDocument  ( XMLLocator locator , String encoding , NamespaceContext namespaceContext , Augmentations augs ) throws XNIException { }


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_DispelDeBuffPhysical_ME_TO_SELF  ( String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200358 , skillname ) ; }

Eliminó las condiciones físicas anormales utilizando [% de habilidad].


public void addFilter  ( ) { if ( filterConfig != null ) { FilterName filterName = filterConfig . getFilterConfiguration ( ) ; setFilterParameter ( null , filterName . getParameter ( 0 ) ) ; } }


@ Override @ Transactional public void run  ( ) { try { runInternal ( ) ; } catch ( RuntimeException ex ) { log . error ( DebugUtils . getStackTrace ( ex ) ) ; throw ex ; } }

Evalúa las reglas de validación para una unidad de una sola organización.Este es el método central en la evaluación de la regla de validación.


public int compareTo  ( cp_info constant_pool [ ] , cp_info cp , cp_info cp_constant_pool [ ] ) { int i ; if ( tag != cp . tag ) return tag - cp . tag ; CONSTANT_Methodref_info cu = ( CONSTANT_Methodref_info ) cp ; i = constant_pool [ class_index ] . compareTo ( constant_pool , cp_constant_pool [ cu . class_index ] , cp_constant_pool ) ; if ( i != 0 ) return i ; return constant_pool [ name_and_type_index ] . compareTo ( constant_pool , cp_constant_pool [ cu . name_and_type_index ] , cp_constant_pool ) ; }

Compara esta entrada con otro objeto CP_INFO (que puede residir en una piscina constante diferente).


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_SummonTrap_A_TO_ME  ( String skillcaster , String value0 , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200733 , skillcaster , value0 , skillname ) ; }

[% Skillcaster] le ha causado convocar% 0 usando [% SkillName].


public EarliestnessComputation ( UnitGraph unitGraph , UpSafetyAnalysis upSafe , DownSafetyAnalysis downSafe , SideEffectTester sideEffect ) { this ( unitGraph , upSafe , downSafe , sideEffect , new ArraySparseSet < EquivalentValue > ( ) ) ; }

Dado un upsafetyanalysis y un descompuesto, realiza el cálculo más antiguo. <br>


private static String [ ] splitWorker  ( String str , char separatorChar , boolean preserveAllTokens ) { if ( str == null ) { return null ; } int len = str . length ( ) ; if ( len == 0 ) { return EMPTY_STRING_ARRAY ; } List list = new ArrayList ( ) ; int i = 0 , start = 0 ; boolean match = false ; boolean lastMatch = false ; while ( i < len ) { if ( str . charAt ( i ) == separatorChar ) { if ( match || preserveAllTokens ) { list . add ( str . substring ( start , i ) ) ; match = false ; lastMatch = true ; } start = ++ i ; continue ; } lastMatch = false ; match = true ; i ++ ; } if ( match || ( preserveAllTokens && lastMatch ) ) { list . add ( str . substring ( start , i ) ) ; } return ( String [ ] ) list . toArray ( new String [ list . size ( ) ] ) ; }

Realiza la lógica para el <código> Split </ Code> y <Code> SplitPreservealLtokens </ Code> Métodos que no devuelven una longitud máxima de matriz.


public static SM_SYSTEM_MESSAGE STR_MSG_DONT_USE_ITEM_BY_NOT_MENTOR  ( String value1 ) { return new SM_SYSTEM_MESSAGE ( 1400773 , value1 ) ; }


@ Override public void redoAction  ( UndoInterface undoRedoObject ) { if ( comboBox != null ) { String newValue = ( String ) undoRedoObject . getNewValue ( ) ; comboBox . setSelectValueKey ( newValue ) ; } }


public static InputStream wrapAndCheckCompressionFormat  ( InputStream in ) throws IOException { BufferedInputStream bufferedIn = new BufferedInputStream ( in ) ; if ( isZip ( bufferedIn ) ) { ZipInputStream zipIn = new ZipInputStream ( bufferedIn ) ; zipIn . getNextEntry ( ) ; return zipIn ; } else if ( isGZip ( bufferedIn ) ) { GZIPInputStream gzipIn = new GZIPInputStream ( bufferedIn ) ; return gzipIn ; } return bufferedIn ; }

Prueba para la firma de la secuencia ZIP / GZIP.Envuelve la corriente de entrada en un tampocoTRUEÑO.Si la prueba ZIP / GZIP es verdadera envuelve nuevamente en ZiplyputStream / GzipInputStream.


@ Override protected synchronized void afterRead  ( int n ) { if ( n != - 1 ) { this . count += n ; } }

Agrega el número de bytes de lectura al conteo.


public void switchHands  ( ) { Item mainHandItem = equipment . get ( ItemSlot . MAIN_HAND . getSlotIdMask ( ) ) ; Item subHandItem = equipment . get ( ItemSlot . SUB_HAND . getSlotIdMask ( ) ) ; Item mainOffHandItem = equipment . get ( ItemSlot . MAIN_OFF_HAND . getSlotIdMask ( ) ) ; Item subOffHandItem = equipment . get ( ItemSlot . SUB_OFF_HAND . getSlotIdMask ( ) ) ; List < Item > equippedWeapon = new ArrayList < Item > ( ) ; if ( mainHandItem != null ) { equippedWeapon . add ( mainHandItem ) ; } if ( subHandItem != null && subHandItem != mainHandItem ) { equippedWeapon . add ( subHandItem ) ; } if ( mainOffHandItem != null ) { equippedWeapon . add ( mainOffHandItem ) ; } if ( subOffHandItem != null && subOffHandItem != mainOffHandItem ) { equippedWeapon . add ( subOffHandItem ) ; } for ( Item item : equippedWeapon ) { if ( item . getItemTemplate ( ) . isTwoHandWeapon ( ) ) { ItemSlot [ ] slots = ItemSlot . getSlotsFor ( item . getEquipmentSlot ( ) ) ; for ( ItemSlot slot : slots ) { equipment . remove ( slot . getSlotIdMask ( ) ) ; } } else { equipment . remove ( item . getEquipmentSlot ( ) ) ; } item . setEquipped ( false ) ; PacketSendUtility . sendPacket ( owner , new SM_INVENTORY_UPDATE_ITEM ( owner , item , ItemUpdateType . EQUIP_UNEQUIP ) ) ; if ( owner . getGameStats ( ) != null ) { if ( ( item . getEquipmentSlot ( ) & ItemSlot . MAIN_HAND . getSlotIdMask ( ) ) != 0 || ( item . getEquipmentSlot ( ) & ItemSlot . SUB_HAND . getSlotIdMask ( ) ) != 0 ) { notifyItemUnequip ( item ) ; } } } for ( Item item : equippedWeapon ) { long oldSlots = item . getEquipmentSlot ( ) ; if ( ( oldSlots & ItemSlot . RIGHT_HAND . getSlotIdMask ( ) ) != 0 ) { oldSlots ^= ItemSlot . RIGHT_HAND . getSlotIdMask ( ) ; } if ( ( oldSlots & ItemSlot . LEFT_HAND . getSlotIdMask ( ) ) != 0 ) { oldSlots ^= ItemSlot . LEFT_HAND . getSlotIdMask ( ) ; } item . setEquipmentSlot ( oldSlots ) ; } for ( Item item : equippedWeapon ) { if ( item . getItemTemplate ( ) . isTwoHandWeapon ( ) ) { ItemSlot [ ] slots = ItemSlot . getSlotsFor ( item . getEquipmentSlot ( ) ) ; for ( ItemSlot slot : slots ) { equipment . put ( slot . getSlotIdMask ( ) , item ) ; } } else { equipment . put ( item . getEquipmentSlot ( ) , item ) ; } item . setEquipped ( true ) ; ItemPacketService . updateItemAfterEquip ( owner , item ) ; } if ( owner . getGameStats ( ) != null ) { for ( Item item : equippedWeapon ) { if ( ( item . getEquipmentSlot ( ) & ItemSlot . MAIN_HAND . getSlotIdMask ( ) ) != 0 || ( item . getEquipmentSlot ( ) & ItemSlot . SUB_HAND . getSlotIdMask ( ) ) != 0 ) { notifyItemEquipped ( item ) ; } } } owner . getLifeStats ( ) . updateCurrentStats ( ) ; owner . getGameStats ( ) . updateStatsAndSpeedVisually ( ) ; setPersistentState ( PersistentState . UPDATE_REQUIRED ) ; }


public void moveArea  ( Point topLeft , Point bottomRight , int col , int row , Function < Point , Void > action ) { if ( col < 1 || row < 1 ) { return ; } Point current = new Point ( topLeft . x , topLeft . y ) ; int xIncrement = ( bottomRight . x - topLeft . x ) / col ; int yIncrement = ( bottomRight . y - topLeft . y ) / row ; for ( int i = 0 ; i < row ; i ++ ) { for ( int j = 0 ; j < col ; j ++ ) { move ( current ) ; action . apply ( current ) ; current . x += xIncrement ; if ( current . x > bottomRight . x ) { current . x = topLeft . x ; current . y += yIncrement ; } } } }

No es totalmente compatible.Use en su propio riesgo Mouse Mouse en una cuadrícula (definida por Topleft, BotterRight, número de columna y número de fila) y realice una acción en cada punto de la cuadrícula


@ VisibleForTesting public static boolean createGradleWrapper  ( @ NotNull File projectDirPath , @ NotNull String gradleVersion ) throws IOException { File projectWrapperDirPath = new File ( projectDirPath , FD_GRADLE_WRAPPER ) ; if ( ! projectWrapperDirPath . isDirectory ( ) ) { File wrapperSrcDirPath = new File ( TemplateManager . getTemplateRootFolder ( ) , FD_GRADLE_WRAPPER ) ; if ( ! wrapperSrcDirPath . exists ( ) ) { for ( File root : TemplateManager . getExtraTemplateRootFolders ( ) ) { wrapperSrcDirPath = new File ( root , FD_GRADLE_WRAPPER ) ; if ( wrapperSrcDirPath . exists ( ) ) { break ; } else { wrapperSrcDirPath = null ; } } } if ( wrapperSrcDirPath == null ) { return false ; } copyDirContent ( wrapperSrcDirPath , projectDirPath ) ; } File wrapperPropertiesFile = getGradleWrapperPropertiesFilePath ( projectDirPath ) ; updateGradleDistributionUrl ( gradleVersion , wrapperPropertiesFile ) ; return true ; }

Crea la envoltura de gráficas en el proyecto en el directorio dado.


public void resetOriginals  ( ) { mStartingStartTrim = 0 ; mStartingEndTrim = 0 ; mStartingRotation = 0 ; setStartTrim ( 0 ) ; setEndTrim ( 0 ) ; setRotation ( 0 ) ; }

Restablecer el Spinner de progreso a la rotación predeterminada, los ángulos de inicio y finalización.


public Builder zkServers  ( String zkServers ) { this . _zkHost = zkServers ; return this ; }

Servidor de Zookeeper para ejecutar.Por defecto se ejecuta localmente en '127.0.0.1'.


public Future < ProcessResult > startDetached  ( ) throws RabbitMqCommandException  { return execute ( "-detached" ) ; }

Inicie el servidor de RabbitMQ en un estado separado.<p> Esto significa que el proceso saldrá inmediatamente y no se escribirá un archivo PID para archivar.


public static String decodePassword  ( String value ) { return new String ( Base64 . base64ToByteArray ( value ) ) ; }

Decodifica la cadena dada utilizando la codificación base64.


private double interpolateXAtY  ( WeightedObservedPoint [ ] points , int startIdx , int idxStep , double y ) throws MathIllegalArgumentException { if ( idxStep == 0 ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . ZERO_NOT_ALLOWED ) ; } final WeightedObservedPoint [ ] twoPoints = getInterpolationPointsForY ( points , startIdx , idxStep , y ) ; final WeightedObservedPoint p1 = twoPoints [ 0 ] ; final WeightedObservedPoint p2 = twoPoints [ 1 ] ; if ( p1 . getY ( ) == y ) { return p1 . getX ( ) ; } if ( p2 . getY ( ) == y ) { return p2 . getX ( ) ; } return p1 . getX ( ) + ( ( ( y - p1 . getY ( ) ) * ( p2 . getX ( ) - p1 . getX ( ) ) ) / ( p2 . getY ( ) - p1 . getY ( ) ) ) ; }

Interpolan el uso de los puntos especificados para determinar x en la Y especificada


private String fetchTableName  ( String query ) { for ( String tableName : mTableNames ) { if ( query . contains ( tableName ) ) { return tableName ; } } return "" ; }

Getche el nombre de la tabla de la consulta


public final void addIDConstraintDecl  ( XSElementDecl elmDecl , IdentityConstraint decl ) { elmDecl . addIDConstraint ( decl ) ; fGlobalIDConstraintDecls . put ( decl . getIdentityConstraintName ( ) , decl ) ; }


public SearchResult search  ( String queryString , int page ) { SearchResult searchResult = new SearchResult ( ) ; statsService . incrementSearchCount ( ) ; try { IndexReader reader = DirectoryReader . open ( FSDirectory . open ( Paths . get ( this . INDEXPATH ) ) ) ; IndexSearcher searcher = new IndexSearcher ( reader ) ; Analyzer analyzer = new CodeAnalyzer ( ) ; QueryParser parser = new QueryParser ( CODEFIELD , analyzer ) ; Query query = parser . parse ( queryString ) ; LOGGER . info ( "Searching for: " + query . toString ( CODEFIELD ) ) ; searchResult = this . doPagingSearch ( reader , searcher , query , page ) ; reader . close ( ) ; } catch ( Exception ex ) { LOGGER . warning ( " caught a " + ex . getClass ( ) + "\n with message: " + ex . getMessage ( ) ) ; } return searchResult ; }

Dada una consulta y qué página de resultados estamos de devolución los resultados coincidentes para esa búsqueda


public static boolean removeFromCache  ( String imageUri , DiskCache diskCache ) { File image = diskCache . get ( imageUri ) ; return image != null && image . exists ( ) && image . delete ( ) ; }

Se eliminó el archivo de imagen en caché desde el caché de disco (si la imagen se almacenó en caché en el caché de disco antes)


@ Override public void dropByOffset  ( int x , int y ) { switcher . switchTo ( getFramePath ( ) ) ; try { actions . clickAndHold ( webElement ) . perform ( ) ; performMovement ( x , Orientantion . HORIZONTAL , actions ) ; performMovement ( y , Orientantion . VERTICAL , actions ) ; waitForElementsToBeReady ( ) ; actions . release ( ) . perform ( ) ; } finally { switcher . switchBack ( ) ; } }

Realiza el arrastrar y soltar: <ul> <li> cambia al marco que contiene elemento de origen, <li> agarra el elemento de origen haciendo clic en él, <li> se mueve lentamente hacia el área de gota, <li> libera el botón del mouseCuando llega al centro del área de gota.</ ul>


public static < T > List < T > stringToList  ( String val , Class < T > type ) { String [ ] tokens = trim ( val ) . split ( "," ) ; return Arrays . stream ( tokens ) . map ( null ) . collect ( Collectors . toList ( ) ) ; }

Convierte la cadena separada por comas en la lista


public Role toEntity  ( RoleDTO dto ) { return toEntity ( dto , 1 ) ; }

Convierte a la DTO pasada a un papel.Conveniente para la consulta por ejemplo.


private boolean isViewWasReused  ( ) { String currentCacheKey = engine . getLoadingUriForView ( imageAware ) ; return ! memoryCacheKey . equals ( currentCacheKey ) ; }

Comprueba si la tecla de caché de memoria (IRI de imagen) para la imagen de imagen actual es real


public synchronized void closeDriver  ( ) { if ( camera != null ) { camera . getCamera ( ) . release ( ) ; camera = null ; framingRect = null ; framingRectInPreview = null ; } }

Cierra el controlador de la cámara si aún está en uso.


public JSlider createSlider  ( ) { JSlider slider = new JSlider ( m_model ) ; slider . addFocusListener ( getSliderAdjuster ( ) ) ; return slider ; }

Cree un nuevo control deslizante regular (no rango) para interactuar con la consulta.Esto le permite seleccionar un solo valor a la vez.


public GroupsEditQuery marketCountry  ( List < Integer > value ) { return unsafeParam ( "market_country" , value ) ; }


public float parseFloat  ( ) { int mant = 0 ; int mantDig = 0 ; boolean mantPos = true ; boolean mantRead = false ; int exp = 0 ; int expDig = 0 ; int expAdj = 0 ; boolean expPos = true ; switch ( current ) { case '-' : mantPos = false ; case '+' : current = read ( ) ; } m1 : switch ( current ) { default : return Float . NaN ; case '.' : break ; case '0' : mantRead = true ; l : for ( ; ; ) { current = read ( ) ; switch ( current ) { case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : break l ; case '.' : case 'e' : case 'E' : break m1 ; default : return 0.0f ; case '0' : } } case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : mantRead = true ; l : for ( ; ; ) { if ( mantDig < 9 ) { mantDig ++ ; mant = mant * 10 + ( current - '0' ) ; } else { expAdj ++ ; } current = read ( ) ; switch ( current ) { default : break l ; case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : } } } if ( current == '.' ) { current = read ( ) ; m2 : switch ( current ) { default : case 'e' : case 'E' : if ( ! mantRead ) { reportUnexpectedCharacterError ( current ) ; } break ; case '0' : if ( mantDig == 0 ) { l : for ( ; ; ) { current = read ( ) ; expAdj -- ; switch ( current ) { case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : break l ; default : if ( ! mantRead ) { return 0.0f ; } break m2 ; case '0' : } } } case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : l : for ( ; ; ) { if ( mantDig < 9 ) { mantDig ++ ; mant = mant * 10 + ( current - '0' ) ; expAdj -- ; } current = read ( ) ; switch ( current ) { default : break l ; case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : } } } } switch ( current ) { case 'e' : case 'E' : current = read ( ) ; switch ( current ) { default : reportUnexpectedCharacterError ( current ) ; case '-' : expPos = false ; case '+' : current = read ( ) ; switch ( current ) { default : reportUnexpectedCharacterError ( current ) ; case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : } case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : } en : switch ( current ) { case '0' : l : for ( ; ; ) { current = read ( ) ; switch ( current ) { case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : break l ; default : break en ; case '0' : } } case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : l : for ( ; ; ) { if ( expDig < 3 ) { expDig ++ ; exp = exp * 10 + ( current - '0' ) ; } current = read ( ) ; switch ( current ) { default : break l ; case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : } } } default : } if ( ! expPos ) { exp = - exp ; } exp += expAdj ; if ( ! mantPos ) { mant = - mant ; } return buildFloat ( mant , exp ) ; }

Analiza el contenido del búfer y lo convierte en un flotador.


private void checkMatrixDimensions  ( Matrix B ) { if ( B . m != m || B . n != n ) { throw new IllegalArgumentException ( "Matrix dimensions must agree." ) ; } }


public static void closeStreams  ( Closeable ... streams ) { if ( null != streams ) { for ( Closeable stream : streams ) { if ( null != stream ) { try { stream . close ( ) ; } catch ( IOException e ) { LOGGER . error ( "Error while closing stream" + stream ) ; } } } } }


public void queryLatestVersion  ( ) { final String callUrl = LATEST_VERSION_URL + VERSION_FILENAME ; try { final URL url = new URL ( callUrl ) ; final String latestVersionString = FileHelper . readFile ( url . openStream ( ) ) ; latestStable = new ComparableVersion ( latestVersionString ) ; System . out . println ( "Latest version from server: " + latestVersionString ) ; } catch ( IOException ex ) { System . out . println ( "Could not get latest version from Server. Reason: " + ex . toString ( ) ) ; System . out . println ( "File URL: " + callUrl ) ; System . out . println ( "If that problem persists, post your issue on GitHub and check for newer versions manually." ) ; } }

Consulta la última versión de GitHub.Trata de salvarlo localmente bajo lastimable.


protected void init_actions  ( ) { action_obj = new CUP$parser$actions ( this ) ; }

Inicializador de objetos de encapsulación de acción.


@ Override public long skip  ( long n ) throws IOException  { return fInputStream . skip ( n ) ; }

Omitir personajes.Este método bloqueará hasta que se disponga de algunos caracteres, se produce un error de E / S, o se alcanza el extremo del flujo.


public UniqueRowIterator ( IntIterator iter ) { m_iter = iter ; m_visited = new BitSet ( ) ; advance ( ) ; }


@ RequestMapping ( value = "/race-participants/{id}" , method = RequestMethod . DELETE , produces = MediaType . APPLICATION_JSON_VALUE ) @ Timed public ResponseEntity < Void > deleteRaceParticipant  ( @ PathVariable String id ) { log . debug ( "REST request to delete RaceParticipant : {}" , id ) ; raceParticipantRepository . delete ( UUID . fromString ( id ) ) ; return ResponseEntity . ok ( ) . headers ( HeaderUtil . createEntityDeletionAlert ( "raceParticipant" , id . toString ( ) ) ) . build ( ) ; }

Eliminar / participantes de la carrera /: ID: elimine el competidor "ID".


public SegmentTemplateParameterContext addSegmentParameter  ( SegmentUUID uuid , SegmentContextParameters paramName , String paramValue ) { initSegment ( uuid ) ; doAddParameter ( uuid , paramName , paramValue ) ; return this ; }


@ Override protected void scanStartElementName  ( ) throws IOException , XNIException  { fEntityScanner . scanQName ( fElementQName ) ; fSawSpace = fEntityScanner . skipSpaces ( ) ; }

Escanea el nombre de un elemento en una etiqueta de inicio o vacía.


public static final Optional < File > findSteamVRSettings  ( final ArrayList < File > indexedSteamFolders ) { for ( final File f : indexedSteamFolders ) { final File currentFile = new File ( f . getAbsolutePath ( ) + SteamConstants . STEAM_VR_SETTINGS_LOCATION ) ; if ( currentFile . exists ( ) ) return Optional . ofNullable ( currentFile ) ; } return Optional . empty ( ) ; }

Intenta encontrar la configuración de STEAMVR dentro de las ubicaciones dadas.El archivo de configuración de SteamVR contiene las configuraciones de VR, como RENDERTARGETMULTETPLIER y PROWNEPROPROPRAYITY.


@ SuppressWarnings ( { "unchecked" , "cast" } ) public PlusExpr fullCopy  ( ) { PlusExpr tree = ( PlusExpr ) copy ( ) ; if ( children != null ) { for ( int i = 0 ; i < children . length ; ++ i ) { ASTNode child = ( ASTNode ) children [ i ] ; if ( child != null ) { child = child . fullCopy ( ) ; tree . setChild ( child , i ) ; } } } return tree ; }

Cree una copia profunda del subárbol AST en este nodo.La copia está colgando, es decir, no tiene padre.


private String checkAndCreateCarbonStoreLocation  ( String factStoreLocation , String databaseName , String tableName , String partitionId , String segmentId ) { String carbonStorePath = factStoreLocation ; CarbonTable carbonTable = CarbonMetadata . getInstance ( ) . getCarbonTable ( databaseName + CarbonCommonConstants . UNDERSCORE + tableName ) ; CarbonTableIdentifier carbonTableIdentifier = carbonTable . getCarbonTableIdentifier ( ) ; CarbonTablePath carbonTablePath = CarbonStorePath . getCarbonTablePath ( carbonStorePath , carbonTableIdentifier ) ; String carbonDataDirectoryPath = carbonTablePath . getCarbonDataDirectoryPath ( partitionId , segmentId ) ; CarbonUtil . checkAndCreateFolder ( carbonDataDirectoryPath ) ; return carbonDataDirectoryPath ; }

Este método obtendrá la ubicación de la tienda para la ruta dada, la identificación del segmento y la identificación de la partición


public static JavaRDD < List < Writable > > normalize  ( Schema schema , JavaRDD < List < Writable > > data ) { return normalize ( schema , data , 0 , 1 , Collections . < String > emptyList ( ) ) ; }


public boolean forEachKey  ( TLongProcedure procedure ) { return forEach ( procedure ) ; }

Ejecuta <tt> procedimiento </ tt> para cada clave en el mapa.


private MessageDigest cloneMessageDigest  ( ) { try { return ( MessageDigest ) messageDigest . clone ( ) ; } catch ( CloneNotSupportedException e ) { return getMessageDigest ( ) ; } }

Clonar Message Digest para admitir solicitudes simultáneas.


@ Override public int compare  ( PhysicalTable left , PhysicalTable right ) { long leftVolatileDataDuration = getAvailableVolatileDataDuration ( left ) ; long rightVolatileDataDuration = getAvailableVolatileDataDuration ( right ) ; long mostCompleteVolatile = rightVolatileDataDuration - leftVolatileDataDuration ; return ( int ) Math . max ( Math . min ( Integer . MAX_VALUE , mostCompleteVolatile ) , Integer . MIN_VALUE ) ; }

Realiza una comparación basada en la cantidad de datos que tiene cada tabla dentro de sus intervalos volátiles.


private int string_index_  ( dictionary_delta dict_delta , MetricValue str ) { assert ( str . getStrValue ( ) != null ) ; final BiMap < MetricValue , Integer > dict = from_ . getStrvalDict ( ) . inverse ( ) ; final Integer resolved = dict . get ( str ) ; if ( resolved != null ) return resolved ; final int allocated = allocate_index_ ( dict ) ; dict . put ( str , allocated ) ; strval_dictionary_delta sdd = new strval_dictionary_delta ( ) ; sdd . id = allocated ; sdd . value = str . getStrValue ( ) ; dict_delta . sdd = Stream . concat ( Arrays . stream ( dict_delta . sdd ) , Stream . of ( sdd ) ) . toArray ( null ) ; LOG . log ( Level . FINE , "dict_delta.sdd: {0} items (added {1})" , new Object [ ] { dict_delta . sdd . length , quotedString ( sdd . value ) } ) ; return allocated ; }

Busque el índice para el argumento, o si no está presente, cree uno.


public Builder delayBeforeLoading  ( int delayInMillis ) { this . delayBeforeLoading = delayInMillis ; return this ; }

Establece el tiempo de retardo antes de comenzar la tarea de carga.Predeterminado - Sin demora.


@ Override protected FieldConfigBase createCopy  ( FieldConfigBase fieldConfigBase ) { FieldConfigFontPreview copy = null ; if ( fieldConfigBase != null ) { copy = new FieldConfigFontPreview ( fieldConfigBase . getCommonData ( ) ) ; } return copy ; }


public OrExtended ( List < Filter > children ) { super ( children ) ; }


public void updateDuration  ( ) { if ( ! Double . isNaN ( getXmin ( ) ) && ! Double . isNaN ( getXmax ( ) ) ) { setDuration ( getXmax ( ) - getXmin ( ) ) ; } }

Recalcule y establece la duración basada en los tiempos de inicio y finalización actuales


public Tailer ( File file , TailerListener listener , long delayMillis , boolean end , int bufSize ) { this ( file , listener , delayMillis , end , false , bufSize ) ; }

Crea un remolque para el archivo dado, con un tamaño de búfer especificado.


public boolean equalTo  ( Entry e ) { if ( e == null ) return false ; if ( e . mData != this . mData ) return false ; if ( e . mXIndex != this . mXIndex ) return false ; if ( Math . abs ( e . mVal - this . mVal ) > 0.00001f ) return false ; return true ; }

Compara el valor, Xindex y los datos de las entradas.Devuelve VERDADERO si las entradas son iguales en esos puntos, Falso si no.No se verifica por el código de hash como está hecho por el método "iguales".


public boolean isUncertain  ( ) { return myStatus == Status . UNCERTAIN || ( myStatus == Status . INVALID && myErrorNode == null ) ; }

Devuelve verdadero si el resultado actual es incierto.Un resultado será incierto si el resultado no es válido o no válido.Un resultado puede ser también incierto cuando, incluso siendo inválido, todavía no se le ha asignado una ubicación de error.


public static void logPromoTapsBeforeFirstOpen  ( int promoTaps ) { RecordHistogram . recordCountHistogram ( "Search.ContextualSearchPromoTapsBeforeFirstOpen" , promoTaps ) ; }

Registre la cantidad histórica de veces que un gesto de grifo provocó la promoción de escape antes de que el usuario abriera el panel.Esto debe llamarse periódicamente para todos los usuarios.


private void updateSymbol  ( ) { if ( ! Controller . getInstance ( ) . isPopulating ( ) ) { StandardData standardData = getStandardData ( ) ; boolean isDefault = fieldConfigVisitor . getBoolean ( FieldIdEnum . DEFAULT_STYLE ) ; Style existingStyle = SelectedSymbol . getInstance ( ) . getStyle ( ) ; if ( existingStyle != null ) { List < org . opengis . style . FeatureTypeStyle > newFTSList = new ArrayList < org . opengis . style . FeatureTypeStyle > ( ) ; for ( org . opengis . style . FeatureTypeStyle fts : existingStyle . featureTypeStyles ( ) ) { newFTSList . add ( fts ) ; } Symbolizer defaultSymbolizer = null ; Style newStyle = ( Style ) getStyleFactory ( ) . style ( standardData . name , standardData . description , isDefault , newFTSList , defaultSymbolizer ) ; SelectedSymbol . getInstance ( ) . replaceStyle ( newStyle ) ; this . fireUpdateSymbol ( ) ; } } }


private String readLatestStash  ( ) { return readFirstLineFromS3File ( _bucket , String . format ( "%s/%s" , _rootPath , StashUtil . LATEST_FILE ) ) ; }

Método interno para buscar el archivo "Último" de S3 y devolver su contenido.


@ Override public Dfp subtract  ( final Dfp x ) { return add ( x . negate ( ) ) ; }


public int minEffectiveTotalRange  ( ) { if ( fCompositor == MODELGROUP_CHOICE ) return minEffectiveTotalRangeChoice ( ) ; else return minEffectiveTotalRangeAllSeq ( ) ; }

3.8.6 Rango total efectivo (todo y secuencia) y rango total efectivo (elección) Los siguientes métodos se utilizan para devolver el rango MIN / MAX para una partícula.No son exactamente lo mismo que se describe en la especificación, pero todos los valores de la especificación son recuperables por estos métodos.


public static boolean equals  ( Entry e1 , Entry e2 ) { if ( e1 == e2 ) return true ; if ( e1 == null || e2 == null ) return false ; if ( e1 . getClass ( ) != e2 . getClass ( ) ) return false ; Field [ ] fields = fieldInfo ( e1 ) ; try { for ( int i = 0 ; i < fields . length ; i ++ ) { Field f = fields [ i ] ; Object ov = f . get ( e1 ) ; Object tv = f . get ( e2 ) ; if ( tv == ov ) continue ; if ( tv == null || ov == null ) return false ; if ( ! tv . equals ( ov ) ) return false ; } return true ; } catch ( IllegalAccessException e ) { throw new AssertionError ( e ) ; } }

Devuelve <código> Verdadero </ código> Si los dos argumentos son de la misma clase y para cada campo de entrada <EM> F </ EM>, los valores de los argumentos para <EM> F </ EM> son ambos <código> NULUL </ CODE> o la invocación de <código> es igual a </ code> en el valor de un argumento para <em> f </ em> con el valor de otro argumento para <em> f </ em> como su parámetro devuelve <Código> Verdadero </ código>.También devolverá <código> true </ code> si ambos argumentos son <código> null </ code>.En todos los demás casos, una invocación de este método devolverá <CÓDIGO> FALSO </ CODE>. <P>


public static void clear  ( EntityPlayer player ) { SimpleCoord at = new SimpleCoord ( player . worldObj , new BlockPos ( player ) ) ; NotifyImplementation . instance . doSend ( player , at , player . worldObj , EnumSet . of ( Style . CLEAR ) , null , "" , emptyStringArray ) ; }

Borra todas las notificaciones que tiene un jugador.


public PanControl ( boolean panOverItem ) { this ( LEFT_MOUSE_BUTTON , panOverItem ) ; }


public static void main  ( String sArgs [ ] ) { DocumentNGramGraph g1 = new DocumentNGramGraph ( ) ; g1 . setDataString ( "This is a serious test..." ) ; DocumentNGramGraph g2 = new DocumentNGramGraph ( 1 , 3 , 3 ) ; g2 . setDataString ( "This is a test..." ) ; DocumentNGramGraph g3 = new DocumentNGramGraph ( 1 , 3 , 3 ) ; g3 . setDataString ( "This is serious for a test." ) ; NGramGraphEuclidianComparator c = new NGramGraphEuclidianComparator ( ) ; System . err . println ( "Value Similarity of g1, g2 to g3:" ) ; System . err . println ( c . getSimilarityBetween ( g1 , g3 ) . ValueSimilarity ) ; System . err . println ( c . getSimilarityBetween ( g2 , g3 ) . ValueSimilarity ) ; System . err . println ( "Euclidian Similarity of g1, g2 to g3:" ) ; System . err . println ( c . getEuclidianSimilarityBetween ( g1 , g3 , false ) . getOverallSimilarity ( ) ) ; System . err . println ( c . getEuclidianSimilarityBetween ( g2 , g3 , false ) . getOverallSimilarity ( ) ) ; System . err . println ( "Euclidian Distance of g1, g2 to g3:" ) ; System . err . println ( c . getEuclidianSimilarityBetween ( g1 , g3 , false ) . asDistance ( ) ) ; System . err . println ( c . getEuclidianSimilarityBetween ( g2 , g3 , false ) . asDistance ( ) ) ; System . err . println ( "Self-Euclidian Similarity of g1:" ) ; System . err . println ( c . getEuclidianSimilarityBetween ( g1 , g1 , false ) . getOverallSimilarity ( ) ) ; System . err . println ( c . getEuclidianSimilarityBetween ( g1 , g1 , false ) . asDistance ( ) ) ; }

Método de utilidad utilizado para fines de prueba.


public boolean ContainsFunction  ( PetFunctionType type ) { if ( type . getId ( ) < 0 ) { return false ; } for ( PetFunction t : getPetFunctions ( ) ) { if ( t . getPetFunctionType ( ) == type ) { return true ; } } return false ; }

Utilizado para escribir en paquete SM_PET, por lo que los controles solo se necesitan


@ SuppressWarnings ( "unchecked" ) public void add  ( String key , String value ) { if ( key != null && value != null ) { Object params = urlParamsWithObjects . get ( key ) ; if ( params == null ) { params = new HashSet < String > ( ) ; this . put ( key , params ) ; } if ( params instanceof List ) { ( ( List < Object > ) params ) . add ( value ) ; } else if ( params instanceof Set ) { ( ( Set < Object > ) params ) . add ( value ) ; } } }

Agrega valor de cadena a param que puede tener más de un valor.


public static String stripFileProtocol  ( String uriString ) { if ( uriString . startsWith ( "file://" ) ) { return Uri . parse ( uriString ) . getPath ( ) ; } return uriString ; }

Elimina el prefijo "Archivo: //" de la cadena URI dada, si corresponde.Si la cadena URI dada no tiene un prefijo "//" ", se devuelve sin cambios.


public static boolean extractTimeZoneAndTestDate  ( Date date , String filter ) { String [ ] timezoneAndFilter = extractTimeZone ( filter ) ; return StringUtils . containsIgnoreCase ( formatDateTimeAsUI ( convertDateToOffsetDateTime ( date ) , timezoneAndFilter [ 1 ] ) , timezoneAndFilter [ 0 ] ) ; }

Extrae la cadena de filtro TimeZone y Original y realiza una comprobación parcial de coincidencia en la fecha.


public MethodDesc ( InvocationConstraints constraints ) { this . name = null ; this . types = null ; if ( constraints != null && constraints . isEmpty ( ) ) { constraints = null ; } this . constraints = constraints ; }

Crea un descriptor predeterminado que coincide con todos los métodos.Las restricciones pueden ser <código> NULL </ CODE>, que se trata de la misma manera que una instancia vacía.


private void writeEscUTF16  ( String s , int start , int length , boolean isAttVal ) throws SAXException { String subString = s . substring ( start , start + length ) ; write ( StringEscapeUtils . escapeHtml4 ( subString ) ) ; }

Escriba una serie de caracteres de datos con escapar.


public static < T > Type < T > limitedValueOf  ( final ParameterizedType type , final Set < java . lang . reflect . Type > recursiveBounds ) { return limitedValueOf ( ( Class < T > ) type . getRawType ( ) , recursiveBounds , type . getActualTypeArguments ( ) ) ; }

Devuelva el tipo para el parametrizado dado, resolviendo los argumentos de tipo real cuando sea posible;Utiliza recursiveBOunds para limitar la recursión.


public void storeOriginals  ( ) { mStartingStartTrim = mStartTrim ; mStartingEndTrim = mEndTrim ; mStartingRotation = mRotation ; }

Si el ajuste de inicio / extremo se desplaza para comenzar, guárdelos para que la animación comience desde ese desplazamiento.


public void Times  ( int i , Z z ) { double t ; t = re [ i ] * z . re - im [ i ] * z . im ; im [ i ] = re [ i ] * z . im + im [ i ] * z . re ; re [ i ] = t ; }

Multiplica el elemento i de un Z1 por un Z.


public static int dpToPx  ( float dp , Resources resources ) { float px = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , dp , resources . getDisplayMetrics ( ) ) ; return ( int ) px ; }


public boolean canLookup  ( DestinationName destination , String role ) { return canProduce ( destination , role ) || canConsume ( destination , role ) ; }

Compruebe si la función especificada puede realizar una búsqueda para el destino especificado.Para que la persona que llama necesita tener permiso productor o consumidor.


private DataApprovalPermissionsEvaluator makePermissionsEvaluator  ( ) { return DataApprovalPermissionsEvaluator . makePermissionsEvaluator ( currentUserService , organisationUnitService , systemSettingManager , dataApprovalLevelService ) ; }

Hace un objeto DataPralperMissionseValuator para el usuario actual.


public static ThrowAnalysis checkInitThrowAnalysis  ( ) { switch ( Options . v ( ) . check_init_throw_analysis ( ) ) { case soot . options . Options . check_init_throw_analysis_auto : if ( ! Options . v ( ) . android_jars ( ) . equals ( "" ) || ! Options . v ( ) . force_android_jar ( ) . equals ( "" ) ) { return DalvikThrowAnalysis . v ( ) ; } else { return PedanticThrowAnalysis . v ( ) ; } case soot . options . Options . check_init_throw_analysis_pedantic : return PedanticThrowAnalysis . v ( ) ; case soot . options . Options . check_init_throw_analysis_unit : return UnitThrowAnalysis . v ( ) ; case soot . options . Options . check_init_throw_analysis_dalvik : return DalvikThrowAnalysis . v ( ) ; default : assert false ; return PedanticThrowAnalysis . v ( ) ; } }

Resuelva el lideroalisis que se utilizará para la verificación de la inicialización (por ejemplo, el hollín.body.Checkinit ())


public void addSample  ( String sample , DataTable source ) { DataTable target = this ; if ( ! Arrays . asList ( target . getSampleNames ( ) ) . contains ( sample ) ) { int srcId = Basic . getIndex ( sample , source . sampleNames ) ; target . sampleSizes . add ( source . sampleSizes . get ( srcId ) ) ; target . sampleNames . add ( sample ) ; target . sampleUIds . add ( System . currentTimeMillis ( ) ) ; if ( srcId < blastModes . size ( ) ) target . blastModes . add ( blastModes . get ( srcId ) ) ; int tarId = Basic . getIndex ( sample , target . sampleNames ) ; for ( String classification : source . classification2class2counts . keySet ( ) ) { Map < Integer , Integer [ ] > sourceClass2counts = source . classification2class2counts . get ( classification ) ; Map < Integer , Integer [ ] > targetClass2counts = target . classification2class2counts . get ( classification ) ; if ( targetClass2counts == null ) { targetClass2counts = new HashMap < > ( ) ; target . classification2class2counts . put ( classification , targetClass2counts ) ; } for ( Integer classId : sourceClass2counts . keySet ( ) ) { Integer [ ] sourceCounts = sourceClass2counts . get ( classId ) ; if ( sourceCounts != null && srcId < sourceCounts . length && sourceCounts [ srcId ] != null ) { Integer [ ] targetCounts = targetClass2counts . get ( classId ) ; Integer [ ] newCounts = new Integer [ tarId + 1 ] ; if ( targetCounts != null ) { System . arraycopy ( targetCounts , 0 , newCounts , 0 , targetCounts . length ) ; } newCounts [ tarId ] = sourceCounts [ srcId ] ; targetClass2counts . put ( classId , newCounts ) ; } } } if ( target . totalReads > 0 ) target . totalReads += source . sampleSizes . get ( srcId ) ; else target . totalReads = source . sampleSizes . get ( srcId ) ; } }

Añadir la muestra con nombre de la fuente dada


SecurityContext trust  ( SecurityContext securityContext ) { TrustedSecurityContext trustedContext = new TrustedSecurityContext ( securityContext ) ; return trustedContext ; }

Envuelve el contexto de seguridad con un fideicomiso.


public static Value noInvoke  ( Value val ) { if ( val == null || isInvoke ( val ) ) return null ; else return val ; }

Filtros de salida invocaciones. <br> Devuelve <código> null </ code> Si <code> val </ code> es nulo.


public static boolean isAssignableValue  ( Class type , Object value ) { Assert . notNull ( type , "Type must not be null" ) ; return ( value != null ? isAssignable ( type , value . getClass ( ) ) : ! type . isPrimitive ( ) ) ; }

Determine si el tipo dado es asignable del valor dado, asumiendo la configuración por reflexión.Considera las clases de envoltura primitivas como asignables a los tipos primitivos correspondientes.


public StaticScript name  ( String name ) { this . name = name ; return this ; }


public static ContainerStats calculateStatsValues  ( String statsJson ) { ContainerStats state = new ContainerStats ( ) ; if ( statsJson == null || statsJson . isEmpty ( ) ) { return state ; } Map < String , JsonElement > stats = parseStats ( statsJson ) ; calculateCpuUsage ( state , stats ) ; setMemoryUsage ( state , stats ) ; setNetworkUsage ( state , stats ) ; setContainerStopped ( state , stats ) ; return state ; }

Analice el valor de Json Stats y devuelva el estado de contenedores con los valores calculados del campo JSON.


@ Override public void removeRaster  ( Symbolizer symbolizer ) { }


@ Deployment public void testActivityMessageEvents  ( ) throws Exception  { ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "messageProcess" ) ; assertNotNull ( processInstance ) ; Execution executionWithMessage = runtimeService . createExecutionQuery ( ) . activityId ( "shipOrder" ) . singleResult ( ) ; assertNotNull ( executionWithMessage ) ; runtimeService . messageEventReceived ( "messageName" , executionWithMessage . getId ( ) ) ; assertEquals ( 2 , listener . getEventsReceived ( ) . size ( ) ) ; assertTrue ( listener . getEventsReceived ( ) . get ( 0 ) instanceof ActivitiMessageEvent ) ; ActivitiMessageEvent messageEvent = ( ActivitiMessageEvent ) listener . getEventsReceived ( ) . get ( 0 ) ; assertEquals ( ActivitiEventType . ACTIVITY_MESSAGE_WAITING , messageEvent . getType ( ) ) ; assertEquals ( "shipOrder" , messageEvent . getActivityId ( ) ) ; assertEquals ( executionWithMessage . getId ( ) , messageEvent . getExecutionId ( ) ) ; assertEquals ( executionWithMessage . getProcessInstanceId ( ) , messageEvent . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , messageEvent . getProcessDefinitionId ( ) ) ; assertEquals ( "messageName" , messageEvent . getMessageName ( ) ) ; assertNull ( messageEvent . getMessageData ( ) ) ; assertTrue ( listener . getEventsReceived ( ) . get ( 1 ) instanceof ActivitiMessageEvent ) ; messageEvent = ( ActivitiMessageEvent ) listener . getEventsReceived ( ) . get ( 1 ) ; assertEquals ( ActivitiEventType . ACTIVITY_MESSAGE_RECEIVED , messageEvent . getType ( ) ) ; assertEquals ( "shipOrder" , messageEvent . getActivityId ( ) ) ; assertEquals ( executionWithMessage . getId ( ) , messageEvent . getExecutionId ( ) ) ; assertEquals ( executionWithMessage . getProcessInstanceId ( ) , messageEvent . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , messageEvent . getProcessDefinitionId ( ) ) ; assertEquals ( "messageName" , messageEvent . getMessageName ( ) ) ; assertNull ( messageEvent . getMessageData ( ) ) ; assertDatabaseEventPresent ( ActivitiEventType . ACTIVITY_MESSAGE_RECEIVED ) ; }

Eventos de prueba relacionados con los eventos de mensajes, llamados desde la API.


public NetworkResponse ( int statusCode , byte [ ] data , Map < String , String > headers , boolean notModified , long networkTimeMs ) { this . statusCode = statusCode ; this . data = data ; this . headers = headers ; this . notModified = notModified ; this . networkTimeMs = networkTimeMs ; }


public GrimpBody newBody  ( SootMethod m ) { return new GrimpBody ( m ) ; }

Devuelve una grimpbody vacía asociada con el Método M.


public void spin  ( ) { lastTimeAnimated = SystemClock . uptimeMillis ( ) ; isSpinning = true ; invalidate ( ) ; }


@ TargetApi ( 24 ) public static boolean isInsideMultiWindow  ( Activity activity ) { return Build . VERSION . SDK_INT >= Build . VERSION_CODES . N && activity . isInMultiWindowMode ( ) ; }

Esta función se puede utilizar con cualquier nivel de API y devolverá FALSO si no se admite la función Multi Window.


protected static Map < String , String > convertHeaders  ( Header [ ] headers ) { Map < String , String > result = new TreeMap < String , String > ( String . CASE_INSENSITIVE_ORDER ) ; for ( int i = 0 ; i < headers . length ; i ++ ) { result . put ( headers [ i ] . getName ( ) , headers [ i ] . getValue ( ) ) ; } return result ; }

Convierte los encabezados [] a MAP <STRING, STRING>.


public static SM_SYSTEM_MESSAGE STR_MSG_TOYPET_PET_CANT_EAT  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1400702 , value0 ) ; }


@ Override public void run  ( ) { if ( sourceDataTags == null ) { LOGGER . error ( "Tried to add a new tag while field dataTagTable was null." ) ; return ; } LOGGER . debug ( "Printing current Tag stats." ) ; for ( Entry < Long , SourceDataTag > entry : getDataTagMap ( ) . entrySet ( ) ) { SourceDataTag tag = entry . getValue ( ) ; DataTagAddress address = tag . getAddress ( ) ; long tagID = tag . getId ( ) ; CounterMovingAverage counterMovingAverage = movingAverages . get ( tagID ) ; if ( counterMovingAverage == null ) { counterMovingAverage = new CounterMovingAverage ( numberOfCounters ) ; movingAverages . put ( tagID , counterMovingAverage ) ; } if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Tag '" + tag . getId ( ) + "' average incoming tags: " + counterMovingAverage . getCurrentAverage ( ) + " - Array: " + counterMovingAverage ) ; } if ( address . isTimeDeadbandEnabled ( ) ) { if ( counterMovingAverage . getCurrentAverage ( ) < deactivationNumberOfTags ) { address . setTimeDeadband ( 0 ) ; LOGGER . info ( "Tag '" + tag . getId ( ) + "' removed from dynamic timedeadband filter." ) ; } } else { if ( counterMovingAverage . getCurrentAverage ( ) > maxTagsPerTime ) { LOGGER . info ( "Tag '" + tag . getId ( ) + "' added to dynamic timedeadband filter." ) ; tag . getAddress ( ) . setTimeDeadband ( timeDeadbandTime ) ; } } counterMovingAverage . switchCurrentCounter ( ) ; } LOGGER . debug ( "Finished printing current Tag stats.\n" ) ; }

El método de ejecución de la tarea del temporizador.


public NGramHistoDocument ( ) { Graph = new DocumentNGramGraph ( ) ; Histogram = new DocumentNGramHistogram ( ) ; }

Crea una nueva instancia de ngrhistodocument.


public void disableDashedLine  ( ) { mDashPathEffect = null ; }

Desactiva que la línea se dibuje en modo discontinuo.


public static SM_SYSTEM_MESSAGE STR_BUDDY_REQUEST_ADD  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1390224 , value0 ) ; }

Has enviado una solicitud de amistad a% 0.


public static short intToUshort  ( int i ) { if ( i < 0 || i > MAX_USHORT ) { throw new IllegalArgumentException ( "invalid value: " + i ) ; } return ( short ) i ; }

Devuelve el valor entero dado como un corto sin firmar, lanzando una excepción ilegalArgentException si el valor es negativo o demasiado grande.


public AemRichText typeLine  ( CharSequence text ) { return type ( text ) . typeNewLine ( ) ; }

Tipos El texto proporcionado en el área de texto de RichText y luego los tipos "Enter".


public void init$Children  ( ) { children = new ASTNode [ 3 ] ; setChild ( new List ( ) , 1 ) ; setChild ( new List ( ) , 2 ) ; }

Inicializa la matriz de niños al tamaño correcto.Inicializa la lista y opta a los niños NTA.


private ResponsePacket executeDelete  ( QueryTemplatePacket template , ISpaceProxy space , Transaction txn ) throws RemoteException , TransactionException , UnusableEntryException , InterruptedException { ResponsePacket packet = new ResponsePacket ( ) ; template . setOperationID ( getOperationID ( ) ) ; template . setExplainPlan ( getExplainPlan ( ) ) ; if ( isReturnResult ( ) ) { int max = getRownumLimit ( ) ; ArrayList < IEntryPacket > entries = template . take ( space , getRouting ( ) , getProjectionTemplate ( ) , txn , getTimeout ( ) , getReadModifier ( ) , getIfExists ( ) , max , getMinEntriesToWaitFor ( ) , getQueryResultType ( ) ) ; packet . setResultSet ( entries ) ; packet . setIntResult ( entries . size ( ) ) ; } else { template . setRouting ( getRouting ( ) ) ; int cleared = _executor . clear ( template , space , txn , getReadModifier ( ) ) ; packet . setIntResult ( cleared ) ; } return packet ; }

Ejecutar eliminar operación con plantilla dada


public void release  ( ) { if ( eGLDisplay != EGL14 . EGL_NO_DISPLAY ) { EGL14 . eglMakeCurrent ( eGLDisplay , EGL14 . EGL_NO_SURFACE , EGL14 . EGL_NO_SURFACE , EGL14 . EGL_NO_CONTEXT ) ; EGL14 . eglDestroyContext ( eGLDisplay , eGLContext ) ; EGL14 . eglReleaseThread ( ) ; EGL14 . eglTerminate ( eGLDisplay ) ; } eGLDisplay = EGL14 . EGL_NO_DISPLAY ; eGLContext = EGL14 . EGL_NO_CONTEXT ; eGLConfig = null ; }

Descarta todos los recursos mantenidos por esta clase, en particular el contexto EGL.Esto debe ser llamado desde el hilo donde se creó el contexto.<P /> Al finalizar, ningún contexto será actual.


@ Inject public DefaultConfigSource ( final PropertiesConfigSource propertiesConfigSource , final SystemPropertiesConfigSource systemPropertiesConfigSource ) { super ( propertiesConfigSource , systemPropertiesConfigSource ) ; }

Proporcionar la lista de fuentes de configuración para verificar las propiedades (también conocidas como propiedades rápidas o FP).


@ SuppressWarnings ( "deprecation" ) public void exit  ( Context context , boolean isClearCache ) { try { finishAllActivity ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }


public boolean copyReference  ( ) { final SelectedBlock selectedBlock = getSelectedBlock ( ) ; if ( selectedBlock . isSelected ( ) ) { StringSelection ss = new StringSelection ( getSelectedReference ( ) ) ; Toolkit . getDefaultToolkit ( ) . getSystemClipboard ( ) . setContents ( ss , null ) ; return true ; } return false ; }

Copie la referencia seleccionada para Clip-Board


public boolean declaresField  ( String subsignature ) { checkLevel ( SIGNATURES ) ; for ( SootField field : fields ) if ( field . getSubSignature ( ) . equals ( subsignature ) ) return true ; return false ; }

¿Esta clase declara un campo con el subsignature dado?


@ Override public void onClick  ( View view ) { int id = view . getId ( ) ; if ( id == R . id . btn_send ) { if ( listener != null ) { String s = editText . getText ( ) . toString ( ) ; editText . setText ( "" ) ; listener . onSendBtnClicked ( s ) ; } } else if ( id == R . id . btn_set_mode_voice ) { setModeVoice ( ) ; showNormalFaceImage ( ) ; if ( listener != null ) listener . onToggleVoiceBtnClicked ( ) ; } else if ( id == R . id . btn_set_mode_keyboard ) { setModeKeyboard ( ) ; showNormalFaceImage ( ) ; if ( listener != null ) listener . onToggleVoiceBtnClicked ( ) ; } else if ( id == R . id . btn_more ) { buttonSetModeVoice . setVisibility ( View . VISIBLE ) ; buttonSetModeKeyboard . setVisibility ( View . GONE ) ; edittext_layout . setVisibility ( View . VISIBLE ) ; buttonPressToSpeak . setVisibility ( View . GONE ) ; showNormalFaceImage ( ) ; if ( listener != null ) listener . onToggleExtendClicked ( ) ; } else if ( id == R . id . et_sendmessage ) { edittext_layout . setBackgroundResource ( R . drawable . ease_input_bar_bg_active ) ; faceNormal . setVisibility ( View . VISIBLE ) ; faceChecked . setVisibility ( View . INVISIBLE ) ; if ( listener != null ) listener . onEditTextClicked ( ) ; } else if ( id == R . id . rl_face ) { toggleFaceImage ( ) ; if ( listener != null ) { listener . onToggleEmojiconClicked ( ) ; } } else { } }


public Vector midpoint  ( Vector other ) { x = ( x + other . x ) / 2 ; y = ( y + other . y ) / 2 ; z = ( z + other . z ) / 2 ; return this ; }

Establece este vector en el punto medio entre este vector y otro.


public UtilsGetServerTimeQuery ( VkApiClient client , UserActor actor ) { super ( client , "utils.getServerTime" , Integer . class ) ; accessToken ( actor . getAccessToken ( ) ) ; }

Crea una instancia abstractQueryBuilder que se puede usar para construir una solicitud API con varios parámetros


public long optLong  ( String key ) { LazyNode token = getOptionalFieldToken ( key ) ; if ( token == null ) return 0l ; if ( token . type == LazyNode . VALUE_NULL ) return 0l ; return token . getLongValue ( cbuf ) ; }

Devuelve el valor largo almacenado en este objeto para la clave dada.Devuelve 0 si no hay tal clave.


public static String parseCharset  ( Map < String , String > headers ) { return parseCharset ( headers , HTTP . DEFAULT_CONTENT_CHARSET ) ; }

Devuelve el accidente especificado en el tipo de contenido de este encabezado, o el valor predeterminado HTTP (ISO-8859-1) si no se puede encontrar ninguno.


public String typeName  ( ) { return "fieldref" ; }

Devuelve una cadena Descripción de qué tipo de entrada es esto.


public ByteArrayOutputStream ( ) { this  ( 1024 ) ; }

Crea un nuevo flujo de salida de matriz de bytes.La capacidad de amortiguamiento es inicialmente de 1024 bytes, aunque su tamaño aumenta si es necesario.


public static String updateAllContentKeywords  ( HttpServletRequest request , HttpServletResponse response ) { Delegator delegator = ( Delegator ) request . getAttribute ( "delegator" ) ; Security security = ( Security ) request . getAttribute ( "security" ) ; String updateMode = "CREATE" ; String errMsg = null ; String doAll = request . getParameter ( "doAll" ) ; if ( ! security . hasEntityPermission ( "CONTENTMGR" , "_" + updateMode , request . getSession ( ) ) ) { Map < String , String > messageMap = UtilMisc . toMap ( "updateMode" , updateMode ) ; errMsg = UtilProperties . getMessage ( resource , "contentevents.not_sufficient_permissions" , messageMap , UtilHttp . getLocale ( request ) ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errMsg ) ; return "error" ; } EntityListIterator entityListIterator = null ; int numConts = 0 ; int errConts = 0 ; boolean beganTx = false ; try { beganTx = TransactionUtil . begin ( 7200 ) ; try { EntityQuery contentQuery = EntityQuery . use ( delegator ) . from ( "Content" ) ; if ( Debug . infoOn ( ) ) { long count = contentQuery . queryCount ( ) ; Debug . logInfo ( "========== Found " + count + " contents to index ==========" , module ) ; } entityListIterator = contentQuery . queryIterator ( ) ; } catch ( GenericEntityException gee ) { Debug . logWarning ( gee , gee . getMessage ( ) , module ) ; Map < String , String > messageMap = UtilMisc . toMap ( "gee" , gee . toString ( ) ) ; errMsg = UtilProperties . getMessage ( resource , "contentevents.error_getting_content_list" , messageMap , UtilHttp . getLocale ( request ) ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errMsg ) ; throw gee ; } GenericValue content ; while ( ( content = entityListIterator . next ( ) ) != null ) { try { ContentKeywordIndex . indexKeywords ( content , "Y" . equals ( doAll ) ) ; } catch ( GenericEntityException e ) { Debug . logWarning ( "[ContentEvents.updateAllContentKeywords] Could not create content-keyword (write error); message: " + e . getMessage ( ) , module ) ; errConts ++ ; } numConts ++ ; if ( numConts % 500 == 0 ) { Debug . logInfo ( "Keywords indexed for " + numConts + " so far" , module ) ; } } } catch ( GenericEntityException e ) { try { TransactionUtil . rollback ( beganTx , e . getMessage ( ) , e ) ; } catch ( Exception e1 ) { Debug . logError ( e1 , module ) ; } return "error" ; } catch ( Throwable t ) { Debug . logError ( t , module ) ; request . setAttribute ( "_ERROR_MESSAGE_" , t . getMessage ( ) ) ; try { TransactionUtil . rollback ( beganTx , t . getMessage ( ) , t ) ; } catch ( Exception e2 ) { Debug . logError ( e2 , module ) ; } return "error" ; } finally { if ( entityListIterator != null ) { try { entityListIterator . close ( ) ; } catch ( GenericEntityException gee ) { Debug . logError ( gee , "Error closing EntityListIterator when indexing content keywords." , module ) ; } } try { TransactionUtil . commit ( beganTx ) ; } catch ( Exception e ) { Debug . logError ( e , module ) ; } } if ( errConts == 0 ) { Map < String , String > messageMap = UtilMisc . toMap ( "numConts" , Integer . toString ( numConts ) ) ; errMsg = UtilProperties . getMessage ( resource , "contentevents.keyword_creation_complete_for_contents" , messageMap , UtilHttp . getLocale ( request ) ) ; request . setAttribute ( "_EVENT_MESSAGE_" , errMsg ) ; return "success" ; } else { Map < String , String > messageMap = UtilMisc . toMap ( "numConts" , Integer . toString ( numConts ) ) ; messageMap . put ( "errConts" , Integer . toString ( errConts ) ) ; errMsg = UtilProperties . getMessage ( resource , "contentevents.keyword_creation_complete_for_contents_with_errors" , messageMap , UtilHttp . getLocale ( request ) ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errMsg ) ; return "error" ; } }

Actualizaciones / Agrega palabras clave para todos los contenidos


private static int [ ] computeCoreBiomeRec  ( BitSet sampleIds , boolean asUpperBound , int numberOfSamples , int samplesThreshold , int [ ] detectionThreshold , Node v , Map < Integer , Integer [ ] > srcClass2counts , Map < Integer , Integer [ ] > tarClass2counts ) { final int [ ] summarized = new int [ numberOfSamples ] ; final int classId = ( Integer ) v . getInfo ( ) ; if ( classId == - 1 || classId == - 2 || classId == - 3 ) return summarized ; final Integer [ ] countsV = srcClass2counts . get ( classId ) ; if ( countsV != null ) { for ( int i = 0 ; i < countsV . length ; i ++ ) { if ( countsV [ i ] != null && sampleIds . get ( i ) ) summarized [ i ] = countsV [ i ] ; } } for ( Edge e = v . getFirstOutEdge ( ) ; e != null ; e = v . getNextOutEdge ( e ) ) { final Node w = e . getTarget ( ) ; final int [ ] countsBelow = computeCoreBiomeRec ( sampleIds , asUpperBound , numberOfSamples , samplesThreshold , detectionThreshold , w , srcClass2counts , tarClass2counts ) ; for ( int i = 0 ; i < numberOfSamples ; i ++ ) { if ( sampleIds . get ( i ) ) { summarized [ i ] += countsBelow [ i ] ; } } } int numberOfSamplesWithClass = 0 ; int value = 0 ; for ( int i = 0 ; i < numberOfSamples ; i ++ ) { if ( sampleIds . get ( i ) ) { if ( summarized [ i ] >= detectionThreshold [ i ] ) numberOfSamplesWithClass ++ ; if ( countsV != null && i < countsV . length && countsV [ i ] != null && sampleIds . get ( i ) ) value += countsV [ i ] ; } } if ( countsV != null && ( ( ! asUpperBound && numberOfSamplesWithClass >= samplesThreshold ) || ( asUpperBound && numberOfSamplesWithClass <= samplesThreshold ) ) ) { tarClass2counts . put ( classId , new Integer [ ] { value } ) ; } return summarized ; }

Computar recursivamente el bioma central


private void drStToWords  ( String drStString ) { String street = null ; String saint = null ; char c0 = drStString . charAt ( 0 ) ; if ( c0 == 's' || c0 == 'S' ) { street = "street" ; saint = "saint" ; } else { street = "drive" ; saint = "doctor" ; } FeatureSet featureSet = tokenItem . getFeatures ( ) ; String punctuation = featureSet . getString ( "punc" ) ; String featPunctuation = ( String ) tokenItem . findFeature ( "punc" ) ; if ( tokenItem . getNext ( ) == null || punctuation . indexOf ( ',' ) != - 1 ) { wordRelation . addWord ( street ) ; } else if ( featPunctuation . equals ( "," ) ) { wordRelation . addWord ( saint ) ; } else { String pName = ( String ) tokenItem . findFeature ( "p.name" ) ; String nName = ( String ) tokenItem . findFeature ( "n.name" ) ; char p0 = pName . charAt ( 0 ) ; char n0 = nName . charAt ( 0 ) ; if ( isUppercaseLetter ( p0 ) && isLowercaseLetter ( n0 ) ) { wordRelation . addWord ( street ) ; } else if ( NumberExpander . isDigit ( p0 ) && isLowercaseLetter ( n0 ) ) { wordRelation . addWord ( street ) ; } else if ( isLowercaseLetter ( p0 ) && isUppercaseLetter ( n0 ) ) { wordRelation . addWord ( saint ) ; } else { String whitespace = ( String ) tokenItem . findFeature ( "n.whitespace" ) ; if ( whitespace . equals ( " " ) ) { wordRelation . addWord ( saint ) ; } else { wordRelation . addWord ( street ) ; } } } if ( punctuation != null && punctuation . equals ( "." ) ) { featureSet . setString ( "punc" , "" ) ; } }

Convierte la cadena dada que contiene los elementos de "ST" y "DR" a (Word) en la palabraRelación.


public static boolean hasValidCredentials  ( ) { return apiKey != null && ! apiKey . isEmpty ( ) && authToken != null && ! authToken . isEmpty ( ) && hasValidAuthenticatedUser ( ) ; }

Compruebe si la tecla API y el token de autenticación son válidos


@ Override public void apply  ( NexusStreamParser np ) throws Exception { }


public SyncHttpClient ( SchemeRegistry schemeRegistry ) { super ( schemeRegistry ) ; }


@ Override public Set < BeanDefinitionHolder > doScan  ( String ... basePackages ) { Set < BeanDefinitionHolder > beanDefinitions = super . doScan ( basePackages ) ; if ( beanDefinitions . isEmpty ( ) ) { logger . warn ( "No MyBatis mapper was found in '" + Arrays . toString ( basePackages ) + "' package. Please check your configuration." ) ; } else { for ( BeanDefinitionHolder holder : beanDefinitions ) { GenericBeanDefinition definition = ( GenericBeanDefinition ) holder . getBeanDefinition ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Creating MapperFactoryBean with name '" + holder . getBeanName ( ) + "' and '" + definition . getBeanClassName ( ) + "' mapperInterface" ) ; } definition . getPropertyValues ( ) . add ( "mapperInterface" , definition . getBeanClassName ( ) ) ; definition . setBeanClass ( ZebraMapperFactoryBean . class ) ; definition . getPropertyValues ( ) . add ( "addToConfig" , this . addToConfig ) ; boolean explicitFactoryUsed = false ; if ( StringUtils . hasText ( this . sqlSessionFactoryBeanName ) ) { definition . getPropertyValues ( ) . add ( "sqlSessionFactory" , new RuntimeBeanReference ( this . sqlSessionFactoryBeanName ) ) ; explicitFactoryUsed = true ; } else if ( this . sqlSessionFactory != null ) { definition . getPropertyValues ( ) . add ( "sqlSessionFactory" , this . sqlSessionFactory ) ; explicitFactoryUsed = true ; } if ( StringUtils . hasText ( this . sqlSessionTemplateBeanName ) ) { if ( explicitFactoryUsed ) { logger . warn ( "Cannot use both: sqlSessionTemplate and sqlSessionFactory together. sqlSessionFactory is ignored." ) ; } definition . getPropertyValues ( ) . add ( "sqlSessionTemplate" , new RuntimeBeanReference ( this . sqlSessionTemplateBeanName ) ) ; explicitFactoryUsed = true ; } else if ( this . sqlSessionTemplate != null ) { if ( explicitFactoryUsed ) { logger . warn ( "Cannot use both: sqlSessionTemplate and sqlSessionFactory together. sqlSessionFactory is ignored." ) ; } definition . getPropertyValues ( ) . add ( "sqlSessionTemplate" , this . sqlSessionTemplate ) ; explicitFactoryUsed = true ; } if ( ! explicitFactoryUsed ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Enabling autowire by type for MapperFactoryBean with name '" + holder . getBeanName ( ) + "'." ) ; } definition . setAutowireMode ( AbstractBeanDefinition . AUTOWIRE_BY_TYPE ) ; } } } return beanDefinitions ; }

Llama a la búsqueda de los padres que buscará y registrará a todos los candidatos.Luego, los objetos registrados se procesan publicados para configurarlos como MapperFactoryBeans


@ Override @ Test public void testInsufficientData  ( ) { double [ ] one = new double [ ] { 1 } ; double [ ] two = new double [ ] { 2 } ; try { new SpearmansCorrelation ( ) . correlation ( one , two ) ; Assert . fail ( "Expecting MathIllegalArgumentException" ) ; } catch ( MathIllegalArgumentException ex ) { } RealMatrix matrix = new BlockRealMatrix ( new double [ ] [ ] { { 0 } , { 1 } } ) ; try { new SpearmansCorrelation ( matrix ) ; Assert . fail ( "Expecting MathIllegalArgumentException" ) ; } catch ( MathIllegalArgumentException ex ) { } }


public IEntryCacheInfo safeInsertEntryToCache  ( Context context , IEntryHolder entryHolder , boolean newEntry , TypeData pType , boolean pin ) { _engine . getMemoryManager ( ) . monitorMemoryUsage ( true ) ; return insertEntryToCache ( context , entryHolder , newEntry , pType , pin ) ; }

Inserta la entrada especificada en caché, realice la verificación del administrador de memoria.


public CredentialEncrypter ( byte [ ] initializationBytes ) { checkNotNull ( initializationBytes , "initializationBytes" ) ; _key = createKey ( initializationBytes ) ; _iv = createInitializationVector ( initializationBytes ) ; }

Crea una nueva instancia inicializada desde una matriz de bytes.Dos instancias creadas con los mismos bytes de inicialización siempre producirán los mismos valores cifrados cuando se le dio la misma entrada.


public WorldEvent ( World world ) { this . world = world ; }

Crea un evento del Nuevo Mundo.Solo para uso por subclases.


private Object readResolve  ( ) { return val ? YES : NO ; }

Canonicalize para que <código> == </ código> se pueda utilizar.


private void init  ( String containerName ) { if ( filterInfo != null ) { if ( filterInfo . userDefinedRoles != null ) { for ( int i = 0 ; i < filterInfo . userDefinedRoles . length ; i ++ ) { m_userDefinedRoles . put ( filterInfo . userDefinedRoles [ i ] . name , filterInfo . userDefinedRoles [ i ] ) ; } } if ( filterInfo . usersInfo != null ) { for ( int i = 0 ; i < filterInfo . usersInfo . length ; i ++ ) { GenericPrincipal userInfo = filterInfo . usersInfo [ i ] ; userInfo . writeEntries = new HashMap < String , List < GenericPrincipal . Attribute > > ( ) ; userInfo . readEntries = new HashMap < String , List < GenericPrincipal . Attribute > > ( ) ; userInfo . executeTasks = new HashMap < String , List < GenericPrincipal . Attribute > > ( ) ; for ( Iterator < String > iter = userInfo . userDefinedRoles . iterator ( ) ; iter . hasNext ( ) ; ) { String roleName = iter . next ( ) ; UserDefinedRole userRole = m_userDefinedRoles . get ( roleName ) ; if ( userRole != null && userRole . restrictedEntries != null ) { for ( Iterator < String > it = userRole . restrictedEntries . keySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { String entryType = it . next ( ) ; List < GenericPrincipal . Attribute > newAttributes = userRole . restrictedEntries . get ( entryType ) ; if ( userRole . inheritRoles . contains ( String . valueOf ( SecurityContext . PERMISSION_WRITE ) ) ) { List < GenericPrincipal . Attribute > attributes = userInfo . writeEntries . get ( entryType ) ; if ( attributes == null ) { attributes = new ArrayList < GenericPrincipal . Attribute > ( ) ; userInfo . writeEntries . put ( entryType , attributes ) ; } for ( int j = 0 ; j < newAttributes . size ( ) ; j ++ ) attributes . add ( newAttributes . get ( j ) ) ; } if ( userRole . inheritRoles . contains ( String . valueOf ( SecurityContext . PERMISSION_READ ) ) ) { List < GenericPrincipal . Attribute > attributes = userInfo . readEntries . get ( entryType ) ; if ( attributes == null ) { attributes = new ArrayList < GenericPrincipal . Attribute > ( ) ; userInfo . readEntries . put ( entryType , attributes ) ; } for ( int j = 0 ; j < newAttributes . size ( ) ; j ++ ) attributes . add ( newAttributes . get ( j ) ) ; } if ( userRole . inheritRoles . contains ( String . valueOf ( SecurityContext . PERMISSION_EXECUTE ) ) ) { List < GenericPrincipal . Attribute > attributes = userInfo . executeTasks . get ( entryType ) ; if ( attributes == null ) { attributes = new ArrayList < GenericPrincipal . Attribute > ( ) ; userInfo . executeTasks . put ( entryType , attributes ) ; } for ( int j = 0 ; j < newAttributes . size ( ) ; j ++ ) attributes . add ( newAttributes . get ( j ) ) ; } } } } m_userPrincipal . put ( userInfo . getUserName ( ) , userInfo ) ; } } } setSystemUserAccount ( ) ; }

Re / Inicializar el controlador de la cuenta de usuario procesando un nuevo objeto <código> filtersinfo </ code>.En el caso de <CÓDIGO> FILTRESINFO </ CODE> es igual a NULL, solo se inicializará el administrador del contenedor.


public static void main  ( String [ ] sArgs ) { DUC2006TopicFileSet t = null ; t = new DUC2006TopicFileSet ( "/usr/misc/Corpora/DUC2006/duc2006_topics.sgml" , "/usr/misc/Corpora/DUC2006/duc2006_docs/" ) ; if ( t == null ) return ; t . createSets ( ) ; System . err . println ( "Training set:" ) ; System . err . println ( utils . printIterable ( t . getTrainingSet ( ) , "\n" ) ) ; System . err . println ( "Training set:" ) ; System . err . println ( utils . printIterable ( t . getTestSet ( ) , "\n" ) ) ; System . err . println ( "Per category:" ) ; for ( String sCategory : ( List < String > ) t . getCategories ( ) ) { System . err . println ( utils . printIterable ( t . getFilesFromCategory ( sCategory ) , "\n" ) ) ; } System . err . flush ( ) ; String sLastCat = ( String ) t . getCategories ( ) . get ( t . getCategories ( ) . size ( ) - 1 ) ; String sFile = ( ( CategorizedFileEntry ) t . getFilesFromCategory ( sLastCat ) . get ( 0 ) ) . getFileName ( ) ; System . out . println ( t . loadFile ( sFile ) ) ; }


public static void d  ( String tag , String msg , Throwable throwable ) { if ( sLevel > LEVEL_DEBUG ) { return ; } Log . d ( tag , msg , throwable ) ; }

Enviar un mensaje de registro de depuración


public Builder zoomAnimation  ( Boolean zoomAnimation ) { this . zoomAnimation = zoomAnimation ; return this ; }

Ya sea para animar la ventana emergente en el zoom.Desactízalo si tiene problemas con el contenido flash dentro de las ventanas emergentes.


public MessagesGetChatUsersQueryWithChatIds ( VkApiClient client , UserActor actor , Integer ... chatIds ) { super ( client , "messages.getChatUsers" , GetChatUsersChatIdsResponse . class ) ; accessToken ( actor . getAccessToken ( ) ) ; chatIds ( chatIds ) ; }

Crea una instancia abstractQueryBuilder que se puede usar para construir una solicitud API con varios parámetros


public VideoGetCommentsQueryWithExtended startCommentId  ( Integer value ) { return unsafeParam ( "start_comment_id" , value ) ; }