idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
5,800 | public PendingCall present ( ) { logDialogActivity ( activity , fragment , getEventName ( appCall . getRequestIntent ( ) ) , AnalyticsEvents . PARAMETER_DIALOG_OUTCOME_VALUE_COMPLETED ) ; if ( onPresentCallback != null ) { try { onPresentCallback . onPresent ( activity ) ; } catch ( Exception e ) { throw new FacebookException ( e ) ; } } if ( fragment != null ) { fragment . startActivityForResult ( appCall . getRequestIntent ( ) , appCall . getRequestCode ( ) ) ; } else { activity . startActivityForResult ( appCall . getRequestIntent ( ) , appCall . getRequestCode ( ) ) ; } return appCall ; } | Launches an activity in the Facebook application to present the desired dialog . This method returns a PendingCall that contains a unique ID associated with this call to the Facebook application . In general a calling Activity should use UiLifecycleHelper to handle incoming activity results in order to ensure proper processing of the results from this dialog . | 161 | 66 |
5,801 | public static boolean handleActivityResult ( Context context , PendingCall appCall , int requestCode , Intent data , Callback callback ) { if ( requestCode != appCall . getRequestCode ( ) ) { return false ; } if ( attachmentStore != null ) { attachmentStore . cleanupAttachmentsForCall ( context , appCall . getCallId ( ) ) ; } if ( callback != null ) { if ( NativeProtocol . isErrorResult ( data ) ) { Exception error = NativeProtocol . getErrorFromResult ( data ) ; // TODO - data.getExtras() doesn't work for the bucketed protocol. callback . onError ( appCall , error , data . getExtras ( ) ) ; } else { callback . onComplete ( appCall , NativeProtocol . getSuccessResultsFromIntent ( data ) ) ; } } return true ; } | Parses the results of a dialog activity and calls the appropriate method on the provided Callback . | 183 | 20 |
5,802 | public static boolean canPresentShareDialog ( Context context , ShareDialogFeature ... features ) { return handleCanPresent ( context , EnumSet . of ( ShareDialogFeature . SHARE_DIALOG , features ) ) ; } | Determines whether the version of the Facebook application installed on the user s device is recent enough to support specific features of the native Share dialog which in turn may be used to determine which UI etc . to present to the user . | 47 | 46 |
5,803 | public static boolean canPresentMessageDialog ( Context context , MessageDialogFeature ... features ) { return handleCanPresent ( context , EnumSet . of ( MessageDialogFeature . MESSAGE_DIALOG , features ) ) ; } | Determines whether the version of the Facebook application installed on the user s device is recent enough to support specific features of the native Message dialog which in turn may be used to determine which UI etc . to present to the user . | 49 | 46 |
5,804 | public static boolean canPresentOpenGraphActionDialog ( Context context , OpenGraphActionDialogFeature ... features ) { return handleCanPresent ( context , EnumSet . of ( OpenGraphActionDialogFeature . OG_ACTION_DIALOG , features ) ) ; } | Determines whether the version of the Facebook application installed on the user s device is recent enough to support specific features of the native Open Graph action dialog which in turn may be used to determine which UI etc . to present to the user . | 54 | 48 |
5,805 | public static boolean canPresentOpenGraphMessageDialog ( Context context , OpenGraphMessageDialogFeature ... features ) { return handleCanPresent ( context , EnumSet . of ( OpenGraphMessageDialogFeature . OG_MESSAGE_DIALOG , features ) ) ; } | Determines whether the version of the Facebook application installed on the user s device is recent enough to support specific features of the native Open Graph Message dialog which in turn may be used to determine which UI etc . to present to the user . | 57 | 48 |
5,806 | private static String reduceVariant ( final String variant ) { if ( isEmpty ( variant ) ) throw new AssertionError ( "Shouldn't happen, can't reduce non existent variant" ) ; int indexOfUnderscore = variant . lastIndexOf ( ' ' ) ; if ( indexOfUnderscore == - 1 ) return "" ; return variant . substring ( 0 , indexOfUnderscore ) ; } | This function is used internally to reduce the variant - > a_b_c - > a_b . | 90 | 22 |
5,807 | @ SuppressWarnings ( { "unchecked" } ) public static < V > V associate ( Associator associator , Serializable id , V value ) { associator . setAssociated ( new TypedIdKey < V > ( ( Class < V > ) value . getClass ( ) , id ) , value ) ; return value ; } | Associates the given value s type and the id with the given value using the given associator . | 73 | 21 |
5,808 | @ SuppressWarnings ( { "unchecked" } ) public static < V > V put ( Map < ? super TypedIdKey < V > , ? super V > map , Serializable id , V value ) { map . put ( new TypedIdKey < V > ( ( Class < V > ) value . getClass ( ) , id ) , value ) ; return value ; } | Associates the given value s type and the id with the given value using the given map . | 84 | 20 |
5,809 | public static < V > Optional < V > associated ( Associator associator , Class < V > type , Serializable id ) { return associator . associated ( new TypedIdKey <> ( type , id ) , type ) ; } | Retrieves a value with the given type and id from the given associator . | 50 | 17 |
5,810 | @ SuppressWarnings ( { "unchecked" } ) public static < V > Optional < V > get ( Map < ? , ? > map , Class < V > type , Serializable id ) { return Optional . ofNullable ( ( V ) map . get ( new TypedIdKey <> ( type , id ) ) ) ; } | Retrieves a value with the given type and id from the given map . | 74 | 16 |
5,811 | public static BaseFolder with ( String first , String ... more ) { return new BaseFolder ( Paths . get ( first , more ) ) ; } | Creates a new base folder at the specified location . | 31 | 11 |
5,812 | @ SuppressWarnings ( { "PMD.GuardLogStatement" , "PMD.AvoidDuplicateLiterals" } ) public void add ( Object obj ) { synchronized ( this ) { running += 1 ; if ( generators != null ) { generators . put ( obj , null ) ; generatorTracking . finest ( ( ) -> "Added generator " + obj + ", " + generators . size ( ) + " generators registered: " + generators . keySet ( ) ) ; } if ( running == 1 ) { // NOPMD, no, not using a constant for this. keepAlive = new Thread ( "GeneratorRegistry" ) { @ Override public void run ( ) { try { while ( true ) { Thread . sleep ( Long . MAX_VALUE ) ; } } catch ( InterruptedException e ) { // Okay, then stop } } } ; keepAlive . start ( ) ; } } } | Adds a generator . | 196 | 4 |
5,813 | @ SuppressWarnings ( "PMD.GuardLogStatement" ) public void remove ( Object obj ) { synchronized ( this ) { running -= 1 ; if ( generators != null ) { generators . remove ( obj ) ; generatorTracking . finest ( ( ) -> "Removed generator " + obj + ", " + generators . size ( ) + " generators registered: " + generators . keySet ( ) ) ; } if ( running == 0 ) { generatorTracking . finest ( ( ) -> "Zero generators, notifying all." ) ; keepAlive . interrupt ( ) ; notifyAll ( ) ; } } } | Removes the generator . | 129 | 5 |
5,814 | @ SuppressWarnings ( { "PMD.CollapsibleIfStatements" , "PMD.GuardLogStatement" } ) public void awaitExhaustion ( ) throws InterruptedException { synchronized ( this ) { if ( generators != null ) { if ( running != generators . size ( ) ) { generatorTracking . severe ( ( ) -> "Generator count doesn't match tracked." ) ; } } while ( running > 0 ) { if ( generators != null ) { generatorTracking . fine ( ( ) -> "Thread " + Thread . currentThread ( ) . getName ( ) + " is waiting, " + generators . size ( ) + " generators registered: " + generators . keySet ( ) ) ; } wait ( ) ; } generatorTracking . finest ( "Thread " + Thread . currentThread ( ) . getName ( ) + " continues." ) ; } } | Await exhaustion . | 188 | 4 |
5,815 | @ SuppressWarnings ( { "PMD.CollapsibleIfStatements" , "PMD.GuardLogStatement" } ) public boolean awaitExhaustion ( long timeout ) throws InterruptedException { synchronized ( this ) { if ( generators != null ) { if ( running != generators . size ( ) ) { generatorTracking . severe ( "Generator count doesn't match tracked." ) ; } } if ( isExhausted ( ) ) { return true ; } if ( generators != null ) { generatorTracking . fine ( ( ) -> "Waiting, generators: " + generators . keySet ( ) ) ; } wait ( timeout ) ; if ( generators != null ) { generatorTracking . fine ( ( ) -> "Waited, generators: " + generators . keySet ( ) ) ; } return isExhausted ( ) ; } } | Await exhaustion with a timeout . | 182 | 7 |
5,816 | public boolean matchesLocale ( String loc ) { return getLocale ( ) == null || ( getLocale ( ) . isPresent ( ) && getLocale ( ) . get ( ) . startsWith ( loc ) ) ; } | Returns true if the information matches the specified locale . | 49 | 10 |
5,817 | public static Request newPostRequest ( Session session , String graphPath , GraphObject graphObject , Callback callback ) { Request request = new Request ( session , graphPath , null , HttpMethod . POST , callback ) ; request . setGraphObject ( graphObject ) ; return request ; } | Creates a new Request configured to post a GraphObject to a particular graph path to either create or update the object at that path . | 60 | 27 |
5,818 | public static Request newMeRequest ( Session session , final GraphUserCallback callback ) { Callback wrapper = new Callback ( ) { @ Override public void onCompleted ( Response response ) { if ( callback != null ) { callback . onCompleted ( response . getGraphObjectAs ( GraphUser . class ) , response ) ; } } } ; return new Request ( session , ME , null , null , wrapper ) ; } | Creates a new Request configured to retrieve a user s own profile . | 87 | 14 |
5,819 | public static Request newMyFriendsRequest ( Session session , final GraphUserListCallback callback ) { Callback wrapper = new Callback ( ) { @ Override public void onCompleted ( Response response ) { if ( callback != null ) { callback . onCompleted ( typedListFromResponse ( response , GraphUser . class ) , response ) ; } } } ; return new Request ( session , MY_FRIENDS , null , null , wrapper ) ; } | Creates a new Request configured to retrieve a user s friend list . | 94 | 14 |
5,820 | public static Request newUploadPhotoRequest ( Session session , Bitmap image , Callback callback ) { Bundle parameters = new Bundle ( 1 ) ; parameters . putParcelable ( PICTURE_PARAM , image ) ; return new Request ( session , MY_PHOTOS , parameters , HttpMethod . POST , callback ) ; } | Creates a new Request configured to upload a photo to the user s default photo album . | 68 | 18 |
5,821 | public static Request newUploadPhotoRequest ( Session session , File file , Callback callback ) throws FileNotFoundException { ParcelFileDescriptor descriptor = ParcelFileDescriptor . open ( file , ParcelFileDescriptor . MODE_READ_ONLY ) ; Bundle parameters = new Bundle ( 1 ) ; parameters . putParcelable ( PICTURE_PARAM , descriptor ) ; return new Request ( session , MY_PHOTOS , parameters , HttpMethod . POST , callback ) ; } | Creates a new Request configured to upload a photo to the user s default photo album . The photo will be read from the specified stream . | 107 | 28 |
5,822 | public static Request newUploadVideoRequest ( Session session , File file , Callback callback ) throws FileNotFoundException { ParcelFileDescriptor descriptor = ParcelFileDescriptor . open ( file , ParcelFileDescriptor . MODE_READ_ONLY ) ; Bundle parameters = new Bundle ( 1 ) ; parameters . putParcelable ( file . getName ( ) , descriptor ) ; return new Request ( session , MY_VIDEOS , parameters , HttpMethod . POST , callback ) ; } | Creates a new Request configured to upload a photo to the user s default photo album . The photo will be read from the specified file descriptor . | 109 | 29 |
5,823 | public static Request newGraphPathRequest ( Session session , String graphPath , Callback callback ) { return new Request ( session , graphPath , null , null , callback ) ; } | Creates a new Request configured to retrieve a particular graph path . | 37 | 13 |
5,824 | public static Request newPlacesSearchRequest ( Session session , Location location , int radiusInMeters , int resultsLimit , String searchText , final GraphPlaceListCallback callback ) { if ( location == null && Utility . isNullOrEmpty ( searchText ) ) { throw new FacebookException ( "Either location or searchText must be specified." ) ; } Bundle parameters = new Bundle ( 5 ) ; parameters . putString ( "type" , "place" ) ; parameters . putInt ( "limit" , resultsLimit ) ; if ( location != null ) { parameters . putString ( "center" , String . format ( Locale . US , "%f,%f" , location . getLatitude ( ) , location . getLongitude ( ) ) ) ; parameters . putInt ( "distance" , radiusInMeters ) ; } if ( ! Utility . isNullOrEmpty ( searchText ) ) { parameters . putString ( "q" , searchText ) ; } Callback wrapper = new Callback ( ) { @ Override public void onCompleted ( Response response ) { if ( callback != null ) { callback . onCompleted ( typedListFromResponse ( response , GraphPlace . class ) , response ) ; } } } ; return new Request ( session , SEARCH , parameters , HttpMethod . GET , wrapper ) ; } | Creates a new Request that is configured to perform a search for places near a specified location via the Graph API . At least one of location or searchText must be specified . | 279 | 35 |
5,825 | public static Request newPostOpenGraphActionRequest ( Session session , OpenGraphAction openGraphAction , Callback callback ) { if ( openGraphAction == null ) { throw new FacebookException ( "openGraphAction cannot be null" ) ; } if ( Utility . isNullOrEmpty ( openGraphAction . getType ( ) ) ) { throw new FacebookException ( "openGraphAction must have non-null 'type' property" ) ; } String path = String . format ( MY_ACTION_FORMAT , openGraphAction . getType ( ) ) ; return newPostRequest ( session , path , openGraphAction , callback ) ; } | Creates a new Request configured to publish an Open Graph action . | 133 | 13 |
5,826 | public static Request newDeleteObjectRequest ( Session session , String id , Callback callback ) { return new Request ( session , id , null , HttpMethod . DELETE , callback ) ; } | Creates a new Request configured to delete a resource through the Graph API . | 41 | 15 |
5,827 | public static final ConfigurationSourceKey propertyFile ( final String name ) { return new ConfigurationSourceKey ( Type . FILE , Format . PROPERTIES , name ) ; } | Creates a new configuration source key for property files . | 35 | 11 |
5,828 | public static final ConfigurationSourceKey xmlFile ( final String name ) { return new ConfigurationSourceKey ( Type . FILE , Format . XML , name ) ; } | Creates a new configuration source key for xml files . | 32 | 11 |
5,829 | public static final ConfigurationSourceKey jsonFile ( final String name ) { return new ConfigurationSourceKey ( Type . FILE , Format . JSON , name ) ; } | Creates a new configuration source key for json files . | 32 | 11 |
5,830 | public static < T > boolean isSubset ( Collection < T > subset , Collection < T > superset ) { if ( ( superset == null ) || ( superset . size ( ) == 0 ) ) { return ( ( subset == null ) || ( subset . size ( ) == 0 ) ) ; } HashSet < T > hash = new HashSet < T > ( superset ) ; for ( T t : subset ) { if ( ! hash . contains ( t ) ) { return false ; } } return true ; } | the same . | 111 | 3 |
5,831 | static InputStream getCachedImageStream ( URI url , Context context ) { InputStream imageStream = null ; if ( url != null ) { if ( isCDNURL ( url ) ) { try { FileLruCache cache = getCache ( context ) ; imageStream = cache . get ( url . toString ( ) ) ; } catch ( IOException e ) { Logger . log ( LoggingBehavior . CACHE , Log . WARN , TAG , e . toString ( ) ) ; } } } return imageStream ; } | Does not throw if there was an error . | 114 | 9 |
5,832 | public void reduceThis ( ) { if ( elements == null || elements . isEmpty ( ) ) throw new AssertionError ( "Can't reduce this environment" ) ; elements . remove ( elements . size ( ) - 1 ) ; } | Reduces current environment . Modifies current object hence NOT THREADSAFE . | 50 | 16 |
5,833 | public static Environment parse ( final String s ) { if ( s == null || s . isEmpty ( ) || s . trim ( ) . isEmpty ( ) ) return GlobalEnvironment . INSTANCE ; final String [ ] tokens = StringUtils . tokenize ( s , ' ' ) ; final DynamicEnvironment env = new DynamicEnvironment ( ) ; for ( final String t : tokens ) { env . add ( t ) ; } return env ; } | Parses a string and creates a new Environment which corresponds the string . | 92 | 15 |
5,834 | public static void downloadAsync ( ImageRequest request ) { if ( request == null ) { return ; } // NOTE: This is the ONLY place where the original request's Url is read. From here on, // we will keep track of the Url separately. This is because we might be dealing with a // redirect response and the Url might change. We can't create our own new ImageRequests // for these changed Urls since the caller might be doing some book-keeping with the request's // object reference. So we keep the old references and just map them to new urls in the downloader RequestKey key = new RequestKey ( request . getImageUri ( ) , request . getCallerTag ( ) ) ; synchronized ( pendingRequests ) { DownloaderContext downloaderContext = pendingRequests . get ( key ) ; if ( downloaderContext != null ) { downloaderContext . request = request ; downloaderContext . isCancelled = false ; downloaderContext . workItem . moveToFront ( ) ; } else { enqueueCacheRead ( request , key , request . isCachedRedirectAllowed ( ) ) ; } } } | Downloads the image specified in the passed in request . If a callback is specified it is guaranteed to be invoked on the calling thread . | 244 | 27 |
5,835 | public static AppEventsLogger newLogger ( Context context , String applicationId ) { return new AppEventsLogger ( context , applicationId , null ) ; } | Build an AppEventsLogger instance to log events that are attributed to the application but not to any particular Session . | 34 | 23 |
5,836 | public void logEvent ( String eventName , Bundle parameters ) { logEvent ( eventName , null , parameters , false ) ; } | Log an app event with the specified name and set of parameters . | 27 | 13 |
5,837 | public void logEvent ( String eventName , double valueToSum , Bundle parameters ) { logEvent ( eventName , valueToSum , parameters , false ) ; } | Log an app event with the specified name supplied value and set of parameters . | 34 | 15 |
5,838 | public void logPurchase ( BigDecimal purchaseAmount , Currency currency , Bundle parameters ) { if ( purchaseAmount == null ) { notifyDeveloperError ( "purchaseAmount cannot be null" ) ; return ; } else if ( currency == null ) { notifyDeveloperError ( "currency cannot be null" ) ; return ; } if ( parameters == null ) { parameters = new Bundle ( ) ; } parameters . putString ( AppEventsConstants . EVENT_PARAM_CURRENCY , currency . getCurrencyCode ( ) ) ; logEvent ( AppEventsConstants . EVENT_NAME_PURCHASED , purchaseAmount . doubleValue ( ) , parameters ) ; eagerFlush ( ) ; } | Logs a purchase event with Facebook in the specified amount and with the specified currency . Additional detail about the purchase can be passed in through the parameters bundle . | 145 | 31 |
5,839 | public void logSdkEvent ( String eventName , Double valueToSum , Bundle parameters ) { logEvent ( eventName , valueToSum , parameters , true ) ; } | This method is intended only for internal use by the Facebook SDK and other use is unsupported . | 36 | 18 |
5,840 | private static SessionEventsState getSessionEventsState ( Context context , AccessTokenAppIdPair accessTokenAppId ) { // Do this work outside of the lock to prevent deadlocks in implementation of // AdvertisingIdClient.getAdvertisingIdInfo, because that implementation blocks waiting on the main thread, // which may also grab this staticLock. SessionEventsState state = stateMap . get ( accessTokenAppId ) ; AttributionIdentifiers attributionIdentifiers = null ; if ( state == null ) { // Retrieve attributionId, but we will only send it if attribution is supported for the app. attributionIdentifiers = AttributionIdentifiers . getAttributionIdentifiers ( context ) ; } synchronized ( staticLock ) { // Check state again while we're locked. state = stateMap . get ( accessTokenAppId ) ; if ( state == null ) { state = new SessionEventsState ( attributionIdentifiers , context . getPackageName ( ) , hashedDeviceAndAppId ) ; stateMap . put ( accessTokenAppId , state ) ; } return state ; } } | Creates a new SessionEventsState if not already in the map . | 221 | 14 |
5,841 | private static void setSourceApplication ( Activity activity ) { ComponentName callingApplication = activity . getCallingActivity ( ) ; if ( callingApplication != null ) { String callingApplicationPackage = callingApplication . getPackageName ( ) ; if ( callingApplicationPackage . equals ( activity . getPackageName ( ) ) ) { // open by own app. resetSourceApplication ( ) ; return ; } sourceApplication = callingApplicationPackage ; } // Tap icon to open an app will still get the old intent if the activity was opened by an intent before. // Introduce an extra field in the intent to force clear the sourceApplication. Intent openIntent = activity . getIntent ( ) ; if ( openIntent == null || openIntent . getBooleanExtra ( SOURCE_APPLICATION_HAS_BEEN_SET_BY_THIS_INTENT , false ) ) { resetSourceApplication ( ) ; return ; } Bundle applinkData = AppLinks . getAppLinkData ( openIntent ) ; if ( applinkData == null ) { resetSourceApplication ( ) ; return ; } isOpenedByApplink = true ; Bundle applinkReferrerData = applinkData . getBundle ( "referer_app_link" ) ; if ( applinkReferrerData == null ) { sourceApplication = null ; return ; } String applinkReferrerPackage = applinkReferrerData . getString ( "package" ) ; sourceApplication = applinkReferrerPackage ; // Mark this intent has been used to avoid use this intent again and again. openIntent . putExtra ( SOURCE_APPLICATION_HAS_BEEN_SET_BY_THIS_INTENT , true ) ; return ; } | Source Application setters and getters | 361 | 7 |
5,842 | private Pair < List < BooleanExpression > , Optional < BooleanExpression > > extractWhereConditions ( SelectQueryAware selectQueryAware ) { List < BooleanExpression > whereConditions = new ArrayList <> ( ) ; Optional < BooleanExpression > whereExpressionCandidate = selectQueryAware . getWhereExpression ( ) ; if ( whereExpressionCandidate . isPresent ( ) ) { whereConditions . add ( whereExpressionCandidate . get ( ) ) ; } boolean noGroupByTaskExists = selectQueryAware . getGroupByExpressions ( ) . isEmpty ( ) ; Optional < BooleanExpression > havingExpressionCandidate = selectQueryAware . getHavingExpression ( ) ; if ( havingExpressionCandidate . isPresent ( ) && noGroupByTaskExists ) { whereConditions . add ( havingExpressionCandidate . get ( ) ) ; return new Pair <> ( whereConditions , Optional . empty ( ) ) ; } else { return new Pair <> ( whereConditions , havingExpressionCandidate ) ; } } | Deciding whether having clause can be moved to where clause | 233 | 11 |
5,843 | private Pair < DataSource , Optional < BooleanExpression > > optimizeDataSource ( DataSource originalDataSource , List < BooleanExpression > originalWhereConditions , Map < String , Object > selectionMap , Map < String , String > tableAliases ) { OptimizationContext optimizationContext = analyzeOriginalData ( originalDataSource , originalWhereConditions , tableAliases ) ; DataSource optimizedDataSource = createOptimizedDataSource ( originalDataSource , optimizationContext , selectionMap , tableAliases ) ; Optional < BooleanExpression > optimizedWhereCondition = createOptimizedWhereCondition ( optimizationContext ) ; return new Pair <> ( optimizedDataSource , optimizedWhereCondition ) ; } | Deciding whether parts of where clause can be moved to data sources | 143 | 13 |
5,844 | public static ReplyObject success ( final String name , final Object result ) { final ReplyObject ret = new ReplyObject ( name , result ) ; ret . success = true ; return ret ; } | Factory method that creates a new reply object for successful request . | 39 | 12 |
5,845 | public final void close ( ) { synchronized ( this . lock ) { final SessionState oldState = this . state ; switch ( this . state ) { case CREATED : case OPENING : this . state = SessionState . CLOSED_LOGIN_FAILED ; postStateChange ( oldState , this . state , new FacebookException ( "Log in attempt aborted." ) ) ; break ; case CREATED_TOKEN_LOADED : case OPENED : case OPENED_TOKEN_UPDATED : this . state = SessionState . CLOSED ; postStateChange ( oldState , this . state , null ) ; break ; case CLOSED : case CLOSED_LOGIN_FAILED : break ; } } } | Closes the local in - memory Session object but does not clear the persisted token cache . | 152 | 18 |
5,846 | public final void closeAndClearTokenInformation ( ) { if ( this . tokenCachingStrategy != null ) { this . tokenCachingStrategy . clear ( ) ; } Utility . clearFacebookCookies ( staticContext ) ; Utility . clearCaches ( staticContext ) ; close ( ) ; } | Closes the local in - memory Session object and clears any persisted token cache related to the Session . | 63 | 20 |
5,847 | public final void addCallback ( StatusCallback callback ) { synchronized ( callbacks ) { if ( callback != null && ! callbacks . contains ( callback ) ) { callbacks . add ( callback ) ; } } } | Adds a callback that will be called when the state of this Session changes . | 44 | 15 |
5,848 | public static final void saveSession ( Session session , Bundle bundle ) { if ( bundle != null && session != null && ! bundle . containsKey ( SESSION_BUNDLE_SAVE_KEY ) ) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream ( ) ; try { new ObjectOutputStream ( outputStream ) . writeObject ( session ) ; } catch ( IOException e ) { throw new FacebookException ( "Unable to save session." , e ) ; } bundle . putByteArray ( SESSION_BUNDLE_SAVE_KEY , outputStream . toByteArray ( ) ) ; bundle . putBundle ( AUTH_BUNDLE_SAVE_KEY , session . authorizationBundle ) ; } } | Save the Session object into the supplied Bundle . This method is intended to be called from an Activity or Fragment s onSaveInstanceState method in order to preserve Sessions across Activity lifecycle events . | 158 | 39 |
5,849 | public static final Session restoreSession ( Context context , TokenCachingStrategy cachingStrategy , StatusCallback callback , Bundle bundle ) { if ( bundle == null ) { return null ; } byte [ ] data = bundle . getByteArray ( SESSION_BUNDLE_SAVE_KEY ) ; if ( data != null ) { ByteArrayInputStream is = new ByteArrayInputStream ( data ) ; try { Session session = ( Session ) ( new ObjectInputStream ( is ) ) . readObject ( ) ; initializeStaticContext ( context ) ; if ( cachingStrategy != null ) { session . tokenCachingStrategy = cachingStrategy ; } else { session . tokenCachingStrategy = new SharedPreferencesTokenCachingStrategy ( context ) ; } if ( callback != null ) { session . addCallback ( callback ) ; } session . authorizationBundle = bundle . getBundle ( AUTH_BUNDLE_SAVE_KEY ) ; return session ; } catch ( ClassNotFoundException e ) { Log . w ( TAG , "Unable to restore session" , e ) ; } catch ( IOException e ) { Log . w ( TAG , "Unable to restore session." , e ) ; } } return null ; } | Restores the saved session from a Bundle if any . Returns the restored Session or null if it could not be restored . This method is intended to be called from an Activity or Fragment s onCreate method when a Session has previously been saved into a Bundle via saveState to preserve a Session across Activity lifecycle events . | 263 | 64 |
5,850 | public Node getConfigurationOption ( String optionName ) { NodeList children = configuration . getChildNodes ( ) ; Node configurationOption = null ; for ( int childIndex = 0 ; childIndex < children . getLength ( ) ; childIndex ++ ) { if ( children . item ( childIndex ) . getNodeName ( ) . equals ( optionName ) ) { configurationOption = children . item ( childIndex ) ; break ; } } return configurationOption ; } | Get a configuration option of this configurator . | 96 | 10 |
5,851 | public String getConfigurationOptionValue ( String optionName , String defaultValue ) { String optionValue ; Node configurationOption = this . getConfigurationOption ( optionName ) ; if ( configurationOption != null ) { optionValue = configurationOption . getTextContent ( ) ; } else { optionValue = defaultValue ; } return optionValue ; } | Get a configuration option value as String . | 69 | 8 |
5,852 | public InputStream interceptAndPut ( String key , InputStream input ) throws IOException { OutputStream output = openPutStream ( key ) ; return new CopyingInputStream ( input , output ) ; } | copy of input and associate that data with key . | 42 | 10 |
5,853 | public void configure ( ) { ServletContext servletContext = ServletActionContext . getServletContext ( ) ; ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver ( servletContext ) ; templateResolver . setTemplateMode ( templateMode ) ; templateResolver . setCharacterEncoding ( characterEncoding ) ; templateResolver . setPrefix ( prefix ) ; templateResolver . setSuffix ( suffix ) ; templateResolver . setCacheable ( cacheable ) ; templateResolver . setCacheTTLMs ( cacheTtlMillis ) ; templateEngine . setTemplateResolver ( templateResolver ) ; StrutsMessageResolver messageResolver = new StrutsMessageResolver ( ) ; templateEngine . setMessageResolver ( new StrutsMessageResolver ( ) ) ; if ( templateEngine instanceof SpringTemplateEngine ) { ( ( SpringTemplateEngine ) templateEngine ) . setMessageSource ( messageResolver . getMessageSource ( ) ) ; } // extension diarects. FieldDialect fieldDialect = new FieldDialect ( TemplateMode . HTML , "sth" ) ; templateEngine . addDialect ( fieldDialect ) ; } | Configure settings from the struts . xml or struts . properties using sensible defaults if values are not provided . | 254 | 23 |
5,854 | public void setContainer ( Container container ) { this . container = container ; Map < String , TemplateEngine > map = new HashMap < String , TemplateEngine > ( ) ; // loading TemplateEngine class from DI Container. Set < String > prefixes = container . getInstanceNames ( TemplateEngine . class ) ; for ( String prefix : prefixes ) { TemplateEngine engine = ( TemplateEngine ) container . getInstance ( TemplateEngine . class , prefix ) ; map . put ( prefix , engine ) ; } this . templateEngines = Collections . unmodifiableMap ( map ) ; } | loading di container configulation from struts - plugin . xml choise thymeleaf template engine . | 121 | 20 |
5,855 | public static boolean hasTokenInformation ( Bundle bundle ) { if ( bundle == null ) { return false ; } String token = bundle . getString ( TOKEN_KEY ) ; if ( ( token == null ) || ( token . length ( ) == 0 ) ) { return false ; } long expiresMilliseconds = bundle . getLong ( EXPIRATION_DATE_KEY , 0L ) ; if ( expiresMilliseconds == 0L ) { return false ; } return true ; } | Returns a boolean indicating whether a Bundle contains properties that could be a valid saved token . | 102 | 17 |
5,856 | public static String getToken ( Bundle bundle ) { Validate . notNull ( bundle , "bundle" ) ; return bundle . getString ( TOKEN_KEY ) ; } | Gets the cached token value from a Bundle . | 37 | 10 |
5,857 | public static void putToken ( Bundle bundle , String value ) { Validate . notNull ( bundle , "bundle" ) ; Validate . notNull ( value , "value" ) ; bundle . putString ( TOKEN_KEY , value ) ; } | Puts the token value into a Bundle . | 54 | 9 |
5,858 | public static Date getExpirationDate ( Bundle bundle ) { Validate . notNull ( bundle , "bundle" ) ; return getDate ( bundle , EXPIRATION_DATE_KEY ) ; } | Gets the cached expiration date from a Bundle . | 43 | 10 |
5,859 | public static List < String > getPermissions ( Bundle bundle ) { Validate . notNull ( bundle , "bundle" ) ; return bundle . getStringArrayList ( PERMISSIONS_KEY ) ; } | Gets the cached list of permissions from a Bundle . | 45 | 11 |
5,860 | public static void putPermissions ( Bundle bundle , List < String > value ) { Validate . notNull ( bundle , "bundle" ) ; Validate . notNull ( value , "value" ) ; ArrayList < String > arrayList ; if ( value instanceof ArrayList < ? > ) { arrayList = ( ArrayList < String > ) value ; } else { arrayList = new ArrayList < String > ( value ) ; } bundle . putStringArrayList ( PERMISSIONS_KEY , arrayList ) ; } | Puts the list of permissions into a Bundle . | 112 | 10 |
5,861 | public static void putDeclinedPermissions ( Bundle bundle , List < String > value ) { Validate . notNull ( bundle , "bundle" ) ; Validate . notNull ( value , "value" ) ; ArrayList < String > arrayList ; if ( value instanceof ArrayList < ? > ) { arrayList = ( ArrayList < String > ) value ; } else { arrayList = new ArrayList < String > ( value ) ; } bundle . putStringArrayList ( DECLINED_PERMISSIONS_KEY , arrayList ) ; } | Puts the list of declined permissions into a Bundle . | 118 | 11 |
5,862 | public static AccessTokenSource getSource ( Bundle bundle ) { Validate . notNull ( bundle , "bundle" ) ; if ( bundle . containsKey ( TokenCachingStrategy . TOKEN_SOURCE_KEY ) ) { return ( AccessTokenSource ) bundle . getSerializable ( TokenCachingStrategy . TOKEN_SOURCE_KEY ) ; } else { boolean isSSO = bundle . getBoolean ( TokenCachingStrategy . IS_SSO_KEY ) ; return isSSO ? AccessTokenSource . FACEBOOK_APPLICATION_WEB : AccessTokenSource . WEB_VIEW ; } } | Gets the cached enum indicating the source of the token from the Bundle . | 132 | 15 |
5,863 | public static void putSource ( Bundle bundle , AccessTokenSource value ) { Validate . notNull ( bundle , "bundle" ) ; bundle . putSerializable ( TOKEN_SOURCE_KEY , value ) ; } | Puts the enum indicating the source of the token into a Bundle . | 46 | 14 |
5,864 | public static Date getLastRefreshDate ( Bundle bundle ) { Validate . notNull ( bundle , "bundle" ) ; return getDate ( bundle , LAST_REFRESH_DATE_KEY ) ; } | Gets the cached last refresh date from a Bundle . | 46 | 11 |
5,865 | public Builder newCopyBuilder ( ) { return new Builder ( getInputFormat ( ) , getOutputFormat ( ) , getActivity ( ) ) . locale ( getLocale ( ) ) . setRequiredOptions ( keys ) ; } | Creates a new builder with the same settings as this information . | 47 | 13 |
5,866 | public static Builder newConvertBuilder ( String input , String output ) { return new Builder ( input , output , TaskGroupActivity . CONVERT ) ; } | Creates a new builder of convert type with the specified parameters . | 32 | 13 |
5,867 | @ SuppressWarnings ( { "PMD.DataflowAnomalyAnalysis" , "PMD.AvoidCatchingGenericException" , "PMD.UseStringBufferForStringAppends" , "PMD.SystemPrintln" } ) public void printError ( Error event ) { String msg = "Unhandled " + event ; System . err . println ( msg ) ; if ( event . throwable ( ) == null ) { System . err . println ( "No stack trace available." ) ; } else { event . throwable ( ) . printStackTrace ( ) ; } } | Prints the error . | 126 | 5 |
5,868 | protected List < Segment > segment ( ) { List < Segment > segments = new ArrayList <> ( ) ; List < Recipe > recipeStack = new ArrayList <> ( ) ; recipeStack . add ( this ) ; _segment ( new Recipe ( ) , recipeStack , null , segments ) ; return segments ; } | original recipe but more efficient for sending payloads of ingredients to different services . | 69 | 15 |
5,869 | @ RequestHandler ( patterns = "/ws/echo" , priority = 100 ) public void onGet ( Request . In . Get event , IOSubchannel channel ) throws InterruptedException { final HttpRequest request = event . httpRequest ( ) ; if ( ! request . findField ( HttpField . UPGRADE , Converters . STRING_LIST ) . map ( f -> f . value ( ) . containsIgnoreCase ( "websocket" ) ) . orElse ( false ) ) { return ; } openChannels . add ( channel ) ; channel . respond ( new ProtocolSwitchAccepted ( event , "websocket" ) ) ; event . stop ( ) ; } | Handle GET requests . | 147 | 4 |
5,870 | @ Handler public void onUpgraded ( Upgraded event , IOSubchannel channel ) { if ( ! openChannels . contains ( channel ) ) { return ; } channel . respond ( Output . from ( "/Greetings!" , true ) ) ; } | Handle upgrade confirmation . | 53 | 4 |
5,871 | @ Handler public void onOutput ( Output < ByteBuffer > event , PlainChannel plainChannel ) throws InterruptedException , SSLException , ExecutionException { if ( plainChannel . hub ( ) != this ) { return ; } plainChannel . sendUpstream ( event ) ; } | Sends decrypted data through the engine and then upstream . | 58 | 12 |
5,872 | @ Handler public void onClose ( Close event , PlainChannel plainChannel ) throws InterruptedException , SSLException { if ( plainChannel . hub ( ) != this ) { return ; } plainChannel . close ( event ) ; } | Forwards a close event upstream . | 49 | 7 |
5,873 | @ Handler public void onInput ( Input < ByteBuffer > event , Channel channel ) { Writer writer = inputWriters . get ( channel ) ; if ( writer != null ) { writer . write ( event . buffer ( ) ) ; } } | Handle input by writing it to the file if a channel exists . | 50 | 13 |
5,874 | @ Handler public void onClose ( Close event , Channel channel ) throws InterruptedException { Writer writer = inputWriters . get ( channel ) ; if ( writer != null ) { writer . close ( event ) ; } writer = outputWriters . get ( channel ) ; if ( writer != null ) { writer . close ( event ) ; } } | Handle close by closing the file associated with the channel . | 72 | 11 |
5,875 | @ Handler ( priority = - 1000 ) public void onStop ( Stop event ) throws InterruptedException { while ( ! inputWriters . isEmpty ( ) ) { Writer handler = inputWriters . entrySet ( ) . iterator ( ) . next ( ) . getValue ( ) ; handler . close ( event ) ; } while ( ! outputWriters . isEmpty ( ) ) { Writer handler = outputWriters . entrySet ( ) . iterator ( ) . next ( ) . getValue ( ) ; handler . close ( event ) ; } } | Handle stop by closing all files . | 114 | 7 |
5,876 | private String data ( ) { if ( datasets . isEmpty ( ) ) { return "" ; } else { final StringBuilder ret = new StringBuilder ( ) ; int biggestSize = 0 ; for ( final Dataset dataset : datasets ) { biggestSize = Math . max ( biggestSize , dataset . numPoints ( ) ) ; } for ( int row = 0 ; row < biggestSize ; ++ row ) { ret . append ( valueOrBlank ( datasets . get ( 0 ) , row ) ) ; // all dataset vlaues but first are prefixed with tab for ( final Dataset dataset : Iterables . skip ( datasets , 1 ) ) { ret . append ( "\t" ) ; ret . append ( valueOrBlank ( dataset , row ) ) ; } ret . append ( "\n" ) ; } return ret . toString ( ) ; } } | gnuplot annoyingly requires data to be written in columns | 183 | 11 |
5,877 | private String valueOrBlank ( Dataset dataset , int idx ) { if ( idx < dataset . numPoints ( ) ) { return Double . toString ( dataset . get ( idx ) ) ; } else { return "" ; } } | used by writeData | 53 | 4 |
5,878 | public static void main ( String [ ] argv ) throws IOException { final File outputDir = new File ( argv [ 0 ] ) ; final Random rand = new Random ( ) ; final double mean1 = 5.0 ; final double mean2 = 7.0 ; final double dev1 = 2.0 ; final double dev2 = 4.0 ; final double [ ] data1 = new double [ 100 ] ; final double [ ] data2 = new double [ 100 ] ; for ( int i = 0 ; i < 100 ; ++ i ) { data1 [ i ] = rand . nextGaussian ( ) * dev1 + mean1 ; data2 [ i ] = rand . nextGaussian ( ) * dev2 + mean2 ; } BoxPlot . builder ( ) . addDataset ( Dataset . createAdoptingData ( "A" , data1 ) ) . addDataset ( Dataset . createAdoptingData ( "B" , data2 ) ) . setTitle ( "A vs B" ) . setXAxis ( Axis . xAxis ( ) . setLabel ( "FooCategory" ) . build ( ) ) . setYAxis ( Axis . yAxis ( ) . setLabel ( "FooValue" ) . setRange ( Range . closed ( 0.0 , 15.0 ) ) . build ( ) ) . hideKey ( ) . build ( ) . renderToEmptyDirectory ( outputDir ) ; } | Little test program | 314 | 3 |
5,879 | @ Override public void setFirstAxis ( double x , double y , double z , double extent , CoordinateSystem3D system ) { this . axis1 . set ( x , y , z ) ; assert ( this . axis1 . isUnitVector ( ) ) ; if ( system . isLeftHanded ( ) ) { this . axis3 . set ( this . axis1 . crossLeftHand ( this . axis2 ) ) ; } else { this . axis3 . set ( this . axis3 . crossRightHand ( this . axis2 ) ) ; } this . extent1 = extent ; } | Set the first axis of the second . The third axis is updated to be perpendicular to the two other axis . | 128 | 22 |
5,880 | public ObjectProperty < PathWindingRule > windingRuleProperty ( ) { if ( this . windingRule == null ) { this . windingRule = new SimpleObjectProperty <> ( this , MathFXAttributeNames . WINDING_RULE , DEFAULT_WINDING_RULE ) ; } return this . windingRule ; } | Replies the windingRule property . | 69 | 7 |
5,881 | public BooleanProperty isPolylineProperty ( ) { if ( this . isPolyline == null ) { this . isPolyline = new ReadOnlyBooleanWrapper ( this , MathFXAttributeNames . IS_POLYLINE , false ) ; this . isPolyline . bind ( Bindings . createBooleanBinding ( ( ) -> { boolean first = true ; boolean hasOneLine = false ; for ( final PathElementType type : innerTypesProperty ( ) ) { if ( first ) { if ( type != PathElementType . MOVE_TO ) { return false ; } first = false ; } else if ( type != PathElementType . LINE_TO ) { return false ; } else { hasOneLine = true ; } } return hasOneLine ; } , innerTypesProperty ( ) ) ) ; } return this . isPolyline ; } | Replies the isPolyline property . | 179 | 8 |
5,882 | public BooleanProperty isCurvedProperty ( ) { if ( this . isCurved == null ) { this . isCurved = new ReadOnlyBooleanWrapper ( this , MathFXAttributeNames . IS_CURVED , false ) ; this . isCurved . bind ( Bindings . createBooleanBinding ( ( ) -> { for ( final PathElementType type : innerTypesProperty ( ) ) { if ( type == PathElementType . CURVE_TO || type == PathElementType . QUAD_TO ) { return true ; } } return false ; } , innerTypesProperty ( ) ) ) ; } return this . isCurved ; } | Replies the isCurved property . | 141 | 8 |
5,883 | public BooleanProperty isPolygonProperty ( ) { if ( this . isPolygon == null ) { this . isPolygon = new ReadOnlyBooleanWrapper ( this , MathFXAttributeNames . IS_POLYGON , false ) ; this . isPolygon . bind ( Bindings . createBooleanBinding ( ( ) -> { boolean first = true ; boolean lastIsClose = false ; for ( final PathElementType type : innerTypesProperty ( ) ) { lastIsClose = false ; if ( first ) { if ( type != PathElementType . MOVE_TO ) { return false ; } first = false ; } else if ( type == PathElementType . MOVE_TO ) { return false ; } else if ( type == PathElementType . CLOSE ) { lastIsClose = true ; } } return lastIsClose ; } , innerTypesProperty ( ) ) ) ; } return this . isPolygon ; } | Replies the isPolygon property . | 198 | 8 |
5,884 | protected ReadOnlyListWrapper < PathElementType > innerTypesProperty ( ) { if ( this . types == null ) { this . types = new ReadOnlyListWrapper <> ( this , MathFXAttributeNames . TYPES , FXCollections . observableList ( new ArrayList <> ( ) ) ) ; } return this . types ; } | Replies the private types property . | 74 | 7 |
5,885 | protected void setMapLayerAt ( int index , L layer ) { this . subLayers . set ( index , layer ) ; layer . setContainer ( this ) ; resetBoundingBox ( ) ; } | Put the given layer at the given index but do not fire any event . | 43 | 15 |
5,886 | protected void fireLayerAddedEvent ( MapLayer layer , int index ) { fireLayerHierarchyChangedEvent ( new MapLayerHierarchyEvent ( this , layer , Type . ADD_CHILD , index , layer . isTemporaryLayer ( ) ) ) ; } | Fire the event that indicates a layer was added . | 56 | 10 |
5,887 | protected void fireLayerRemovedEvent ( MapLayer layer , int oldChildIndex ) { fireLayerHierarchyChangedEvent ( new MapLayerHierarchyEvent ( this , layer , Type . REMOVE_CHILD , oldChildIndex , layer . isTemporaryLayer ( ) ) ) ; } | Fire the event that indicates a layer was removed . | 62 | 10 |
5,888 | protected void fireLayerMovedUpEvent ( MapLayer layer , int newIndex ) { fireLayerHierarchyChangedEvent ( new MapLayerHierarchyEvent ( this , layer , Type . MOVE_CHILD_UP , newIndex , layer . isTemporaryLayer ( ) ) ) ; } | Fire the event that indicates a layer was moved up . | 63 | 11 |
5,889 | protected void fireLayerMovedDownEvent ( MapLayer layer , int newIndex ) { fireLayerHierarchyChangedEvent ( new MapLayerHierarchyEvent ( this , layer , Type . MOVE_CHILD_DOWN , newIndex , layer . isTemporaryLayer ( ) ) ) ; } | Fire the event that indicates a layer was moved down . | 63 | 11 |
5,890 | protected void fireLayerRemoveAllEvent ( List < ? extends L > removedObjects ) { fireLayerHierarchyChangedEvent ( new MapLayerHierarchyEvent ( this , removedObjects , Type . REMOVE_ALL_CHILDREN , - 1 , isTemporaryLayer ( ) ) ) ; } | Fire the event that indicates all the layers were removed . | 67 | 11 |
5,891 | public static Vector2dfx convert ( Tuple2D < ? > tuple ) { if ( tuple instanceof Vector2dfx ) { return ( Vector2dfx ) tuple ; } return new Vector2dfx ( tuple . getX ( ) , tuple . getY ( ) ) ; } | Convert the given tuple to a real Vector2dfx . | 58 | 12 |
5,892 | public static Point2d convert ( Tuple2D < ? > tuple ) { if ( tuple instanceof Point2d ) { return ( Point2d ) tuple ; } return new Point2d ( tuple . getX ( ) , tuple . getY ( ) ) ; } | Convert the given tuple to a real Point2d . | 58 | 12 |
5,893 | public static < R , C , V , C2 > ImmutableTable < R , C2 , V > columnTransformerByCell ( final Table < R , C , V > table , final Function < Table . Cell < R , C , V > , C2 > columnTransformer ) { final ImmutableTable . Builder < R , C2 , V > newTable = ImmutableTable . builder ( ) ; for ( Table . Cell < R , C , V > cell : table . cellSet ( ) ) { C2 col = columnTransformer . apply ( cell ) ; newTable . put ( cell . getRowKey ( ) , col , cell . getValue ( ) ) ; } return newTable . build ( ) ; } | columnTransformer has access to Key Value information in each Table . Cell | 155 | 14 |
5,894 | public static double setDistanceEpsilon ( double newPrecisionValue ) { if ( ( newPrecisionValue >= 1 ) || ( newPrecisionValue <= 0 ) ) { throw new IllegalArgumentException ( ) ; } final double old = distancePrecision ; distancePrecision = newPrecisionValue ; return old ; } | Replies the precision used to test a distance value . | 68 | 11 |
5,895 | @ Pure public static boolean epsilonEqualsDistance ( double value1 , double value2 ) { return value1 >= ( value2 - distancePrecision ) && value1 <= ( value2 + distancePrecision ) ; } | Replies if the specified distances are approximatively equal . | 47 | 12 |
5,896 | @ Pure public static int epsilonCompareToDistance ( double distance1 , double distance2 ) { final double min = distance2 - distancePrecision ; final double max = distance2 + distancePrecision ; if ( distance1 >= min && distance1 <= max ) { return 0 ; } if ( distance1 < min ) { return - 1 ; } return 1 ; } | Replies if the specified distances are approximatively equal less or greater than . | 77 | 16 |
5,897 | @ Pure public static String makeInternalId ( float x , float y ) { final StringBuilder buf = new StringBuilder ( "point" ) ; //$NON-NLS-1$ buf . append ( x ) ; buf . append ( ' ' ) ; buf . append ( y ) ; return Encryption . md5 ( buf . toString ( ) ) ; } | Compute and replies the internal identifier that may be used to create a GeoId from the given point . | 78 | 21 |
5,898 | @ Pure public static String makeInternalId ( UUID uid ) { final StringBuilder buf = new StringBuilder ( "nowhere(?" ) ; //$NON-NLS-1$ buf . append ( uid . toString ( ) ) ; buf . append ( "?)" ) ; //$NON-NLS-1$ return Encryption . md5 ( buf . toString ( ) ) ; } | Compute and replies the internal identifier that may be used to create a GeoId from the given identifier . The replied identifier is not geolocalized . | 89 | 31 |
5,899 | @ Pure public static String makeInternalId ( float minx , float miny , float maxx , float maxy ) { final StringBuilder buf = new StringBuilder ( "rectangle" ) ; //$NON-NLS-1$ buf . append ( ' ' ) ; buf . append ( minx ) ; buf . append ( ' ' ) ; buf . append ( miny ) ; buf . append ( ")-(" ) ; //$NON-NLS-1$ buf . append ( maxx ) ; buf . append ( ' ' ) ; buf . append ( maxy ) ; buf . append ( ' ' ) ; return Encryption . md5 ( buf . toString ( ) ) ; } | Compute and replies the internal identifier that may be used to create a GeoId from the given rectangle . | 150 | 21 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.