idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
3,800 | public void closeSegmentKeyValueRegistration ( ) throws IOException { if ( ! closed ) { if ( segmentRegistration != null ) { Map < String , T1 > keyValueList = segmentKeyValueList . get ( segmentName ) ; T1 tmpSegmentValueBoundary = segmentValuesBoundary . get ( segmentName ) ; for ( Entry < String , T1 > entry : keyVa... | Close segment key value registration . |
3,801 | public void recomputeSegmentKeys ( ) throws IOException { if ( ! closed && segmentRegistration != null ) { if ( segmentRegistration . equals ( SEGMENT_SORT_ASC ) || segmentRegistration . equals ( SEGMENT_SORT_DESC ) || segmentRegistration . equals ( SEGMENT_BOUNDARY_ASC ) || segmentRegistration . equals ( SEGMENT_BOUND... | Recompute segment keys . |
3,802 | protected boolean validateWithSegmentBoundary ( T1 value ) throws IOException { if ( ! closed && segmentRegistration != null ) { T1 tmpSegmentValueBoundary = segmentValuesBoundary . get ( segmentName ) ; if ( tmpSegmentValueBoundary == null || compareWithBoundary ( value , tmpSegmentValueBoundary ) ) { return true ; } ... | Validate with segment boundary . |
3,803 | private boolean sortedAndUnique ( String [ ] keyList , int size ) throws IOException { if ( ! closed ) { for ( int i = 1 ; i < size ; i ++ ) { if ( keyList [ ( i - 1 ) ] . compareTo ( keyList [ i ] ) >= 0 ) { return false ; } } return true ; } else { throw new IOException ( "already closed" ) ; } } | Sorted and unique . |
3,804 | private int [ ] [ ] computeSortAndUniqueMapping ( String [ ] keyList , int size ) throws IOException { if ( ! closed ) { if ( size > 0 ) { SortedMap < String , int [ ] > sortedMap = new TreeMap < > ( ) ; for ( int i = 0 ; i < size ; i ++ ) { if ( sortedMap . containsKey ( keyList [ i ] ) ) { int [ ] previousList = sort... | Compute sort and unique mapping . |
3,805 | public void closeNewList ( ) throws IOException { if ( ! closed ) { if ( segmentRegistration != null ) { this . segmentName = null ; } if ( newSize > 0 ) { while ( position < getSize ( ) ) { if ( newPosition == newSize ) { increaseNewListSize ( ) ; } newKeyList [ newPosition ] = keyList [ position ] ; newSourceNumberLi... | Close new list . |
3,806 | public void setWithTotal ( ) throws IOException { if ( collectorType . equals ( DataCollector . COLLECTOR_TYPE_LIST ) ) { if ( segmentName != null ) { throw new IOException ( "can't get total with segmentRegistration" ) ; } else { withTotal = true ; } } else { throw new IOException ( "can't get total for dataCollector ... | Sets the with total . |
3,807 | public static dnsrecords_stats [ ] get ( nitro_service service ) throws Exception { dnsrecords_stats obj = new dnsrecords_stats ( ) ; dnsrecords_stats [ ] response = ( dnsrecords_stats [ ] ) obj . stat_resources ( service ) ; return response ; } | Use this API to fetch the statistics of all dnsrecords_stats resources that are configured on netscaler . |
3,808 | public static dnsrecords_stats get ( nitro_service service , String dnsrecordtype ) throws Exception { dnsrecords_stats obj = new dnsrecords_stats ( ) ; obj . set_dnsrecordtype ( dnsrecordtype ) ; dnsrecords_stats response = ( dnsrecords_stats ) obj . stat_resource ( service ) ; return response ; } | Use this API to fetch statistics of dnsrecords_stats resource of given name . |
3,809 | public static lbvserver_tmtrafficpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { lbvserver_tmtrafficpolicy_binding obj = new lbvserver_tmtrafficpolicy_binding ( ) ; obj . set_name ( name ) ; lbvserver_tmtrafficpolicy_binding response [ ] = ( lbvserver_tmtrafficpolicy_binding [ ] ) obj ... | Use this API to fetch lbvserver_tmtrafficpolicy_binding resources of given name . |
3,810 | public static base_response update ( nitro_service client , gslbparameter resource ) throws Exception { gslbparameter updateresource = new gslbparameter ( ) ; updateresource . ldnsentrytimeout = resource . ldnsentrytimeout ; updateresource . rtttolerance = resource . rtttolerance ; updateresource . ldnsmask = resource ... | Use this API to update gslbparameter . |
3,811 | public static base_response unset ( nitro_service client , gslbparameter resource , String [ ] args ) throws Exception { gslbparameter unsetresource = new gslbparameter ( ) ; return unsetresource . unset_resource ( client , args ) ; } | Use this API to unset the properties of gslbparameter resource . Properties that need to be unset are specified in args array . |
3,812 | public static gslbparameter get ( nitro_service service ) throws Exception { gslbparameter obj = new gslbparameter ( ) ; gslbparameter [ ] response = ( gslbparameter [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; } | Use this API to fetch all the gslbparameter resources that are configured on netscaler . |
3,813 | public void setList ( long now , List < SimpleOrderedMap < Object > > list ) throws IOException { if ( action . equals ( ComponentCollection . ACTION_LIST ) ) { this . now = now ; this . list = list ; } else { throw new IOException ( "not allowed with action '" + action + "'" ) ; } } | Sets the list . |
3,814 | public void setCheck ( long now , SimpleOrderedMap < Object > status ) throws IOException { if ( action . equals ( ComponentCollection . ACTION_CHECK ) ) { this . now = now ; this . status = status ; } else { throw new IOException ( "not allowed with action '" + action + "'" ) ; } } | Sets the check . |
3,815 | public void setGet ( long now , SimpleOrderedMap < Object > status , HashSet < String > stringValues ) throws IOException { if ( action . equals ( ComponentCollection . ACTION_GET ) ) { this . now = now ; this . status = status ; this . values = stringValues ; } else { throw new IOException ( "not allowed with action '... | Sets the get . |
3,816 | public void setPost ( long now , SimpleOrderedMap < Object > status ) throws IOException { if ( action . equals ( ComponentCollection . ACTION_POST ) ) { this . now = now ; this . status = status ; } else { throw new IOException ( "not allowed with action '" + action + "'" ) ; } } | Sets the post . |
3,817 | public void setImport ( long now , SimpleOrderedMap < Object > status ) throws IOException { if ( action . equals ( ComponentCollection . ACTION_IMPORT ) ) { this . now = now ; this . status = status ; } else { throw new IOException ( "not allowed with action '" + action + "'" ) ; } } | Sets the import . |
3,818 | public void setCreate ( long now , SimpleOrderedMap < Object > status ) throws IOException { if ( action . equals ( ComponentCollection . ACTION_CREATE ) ) { this . now = now ; this . status = status ; } else { throw new IOException ( "not allowed with action '" + action + "'" ) ; } } | Sets the create . |
3,819 | public static sslservicegroup_binding get ( nitro_service service , String servicegroupname ) throws Exception { sslservicegroup_binding obj = new sslservicegroup_binding ( ) ; obj . set_servicegroupname ( servicegroupname ) ; sslservicegroup_binding response = ( sslservicegroup_binding ) obj . get_resource ( service )... | Use this API to fetch sslservicegroup_binding resource of given name . |
3,820 | public static sslservicegroup_binding [ ] get ( nitro_service service , String servicegroupname [ ] ) throws Exception { if ( servicegroupname != null && servicegroupname . length > 0 ) { sslservicegroup_binding response [ ] = new sslservicegroup_binding [ servicegroupname . length ] ; sslservicegroup_binding obj [ ] =... | Use this API to fetch sslservicegroup_binding resources of given names . |
3,821 | public static aaagroup_intranetip_binding [ ] get ( nitro_service service , String groupname ) throws Exception { aaagroup_intranetip_binding obj = new aaagroup_intranetip_binding ( ) ; obj . set_groupname ( groupname ) ; aaagroup_intranetip_binding response [ ] = ( aaagroup_intranetip_binding [ ] ) obj . get_resources... | Use this API to fetch aaagroup_intranetip_binding resources of given name . |
3,822 | public void addItem ( String term , Integer offsetStart , Integer offsetEnd , Integer posIncr , BytesRef payload , Integer flags ) { if ( ! closed ) { tokenNumber ++ ; MtasUpdateRequestProcessorResultItem item = new MtasUpdateRequestProcessorResultItem ( term , offsetStart , offsetEnd , posIncr , payload , flags ) ; tr... | Adds the item . |
3,823 | public void forceCloseAndDelete ( ) { try { if ( objectOutputStream != null ) { objectOutputStream . close ( ) ; objectOutputStream = null ; } if ( fileOutputStream != null ) { fileOutputStream . close ( ) ; fileOutputStream = null ; } } catch ( IOException e ) { log . debug ( e ) ; } closed = true ; tokenNumber = 0 ; ... | Force close and delete . |
3,824 | public static clusternodegroup_streamidentifier_binding [ ] get ( nitro_service service , String name ) throws Exception { clusternodegroup_streamidentifier_binding obj = new clusternodegroup_streamidentifier_binding ( ) ; obj . set_name ( name ) ; clusternodegroup_streamidentifier_binding response [ ] = ( clusternodeg... | Use this API to fetch clusternodegroup_streamidentifier_binding resources of given name . |
3,825 | public static qos_stats get ( nitro_service service ) throws Exception { qos_stats obj = new qos_stats ( ) ; qos_stats [ ] response = ( qos_stats [ ] ) obj . stat_resources ( service ) ; return response [ 0 ] ; } | Use this API to fetch the statistics of all qos_stats resources that are configured on netscaler . |
3,826 | public static appflowpolicy_csvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { appflowpolicy_csvserver_binding obj = new appflowpolicy_csvserver_binding ( ) ; obj . set_name ( name ) ; appflowpolicy_csvserver_binding response [ ] = ( appflowpolicy_csvserver_binding [ ] ) obj . get_reso... | Use this API to fetch appflowpolicy_csvserver_binding resources of given name . |
3,827 | public static vpnvserver_sharefileserver_binding [ ] get ( nitro_service service , String name ) throws Exception { vpnvserver_sharefileserver_binding obj = new vpnvserver_sharefileserver_binding ( ) ; obj . set_name ( name ) ; vpnvserver_sharefileserver_binding response [ ] = ( vpnvserver_sharefileserver_binding [ ] )... | Use this API to fetch vpnvserver_sharefileserver_binding resources of given name . |
3,828 | private static String capitalise ( String s ) { if ( s . length ( ) == 0 ) { return s ; } StringBuilder s1 = new StringBuilder ( s ) ; if ( Character . isLowerCase ( s1 . charAt ( 0 ) ) ) { s1 . setCharAt ( 0 , Character . toUpperCase ( s1 . charAt ( 0 ) ) ) ; } for ( int j = 1 ; j < s1 . length ( ) ; j ++ ) { if ( Cha... | Capitalizes the first letter and lower - cases every consecutive letter . |
3,829 | private Set < String > loadVerbStemSet ( String [ ] verbStems ) { HashSet < String > set = new HashSet < String > ( verbStems . length ) ; for ( String stem : verbStems ) { set . add ( stem ) ; } return set ; } | Loads a list of words from the array and stores them in a HashSet . |
3,830 | private String stem ( int del , String add , String affix ) { int stem_length = yylength ( ) - del ; int i = 0 ; String result = yytext ( ) . substring ( 0 , stem_length ) ; if ( option ( change_case ) ) { result = result . toLowerCase ( ) ; } if ( ! ( add . length ( ) == 0 ) ) result += add ; if ( option ( print_affix... | Delete del letters from end of token and append string add to give stem . Return affix as the affix of the word . |
3,831 | public boolean crosses ( Constituent c ) { return ( start ( ) < c . start ( ) && c . start ( ) < end ( ) && end ( ) < c . end ( ) ) || ( c . start ( ) < start ( ) && start ( ) < c . end ( ) && c . end ( ) < end ( ) ) ; } | Detects whether this constituent overlaps a constituent without nesting that is whether they cross . |
3,832 | public boolean crosses ( Collection < Constituent > constColl ) { for ( Constituent c : constColl ) { if ( crosses ( c ) ) { return true ; } } return false ; } | Detects whether this constituent overlaps any of a Collection of Constituents without nesting that is whether it crosses any of them . |
3,833 | public MtasSpanQuery getPositiveQuery ( int index ) { if ( ( index >= 0 ) && ( index < positiveQueryList . size ( ) ) ) { return positiveQueryList . get ( index ) ; } else { return null ; } } | Gets the positive query . |
3,834 | public MtasSpanQuery getNegativeQuery ( int index ) { if ( ( index >= 0 ) && ( index < negativeQueryList . size ( ) ) ) { return negativeQueryList . get ( index ) ; } else { return null ; } } | Gets the negative query . |
3,835 | public boolean isSingle ( ) { if ( ( positiveQueryList . size ( ) == 1 ) && ( negativeQueryList . size ( ) == 0 ) ) { return true ; } else if ( ( positiveQueryList . size ( ) == 0 ) && ( negativeQueryList . size ( ) == 1 ) ) { return true ; } return false ; } | Checks if is single . |
3,836 | public void swapType ( ) { if ( type . equals ( TYPE_AND ) ) { type = TYPE_OR ; } else if ( type . equals ( TYPE_OR ) ) { type = TYPE_AND ; } else { throw new Error ( "unknown type" ) ; } swapNot ( ) ; List < MtasSpanQuery > queryList = positiveQueryList ; positiveQueryList = negativeQueryList ; negativeQueryList = que... | Swap type . |
3,837 | public static base_response add ( nitro_service client , nsacl resource ) throws Exception { nsacl addresource = new nsacl ( ) ; addresource . aclname = resource . aclname ; addresource . aclaction = resource . aclaction ; addresource . td = resource . td ; addresource . srcip = resource . srcip ; addresource . srcipop... | Use this API to add nsacl . |
3,838 | public static base_responses add ( nitro_service client , nsacl resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nsacl addresources [ ] = new nsacl [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new ... | Use this API to add nsacl resources . |
3,839 | public static base_response update ( nitro_service client , nsacl resource ) throws Exception { nsacl updateresource = new nsacl ( ) ; updateresource . aclname = resource . aclname ; updateresource . aclaction = resource . aclaction ; updateresource . srcip = resource . srcip ; updateresource . srcipop = resource . src... | Use this API to update nsacl . |
3,840 | public static base_responses update ( nitro_service client , nsacl resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nsacl updateresources [ ] = new nsacl [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i... | Use this API to update nsacl resources . |
3,841 | public static base_response unset ( nitro_service client , nsacl resource , String [ ] args ) throws Exception { nsacl unsetresource = new nsacl ( ) ; unsetresource . aclname = resource . aclname ; return unsetresource . unset_resource ( client , args ) ; } | Use this API to unset the properties of nsacl resource . Properties that need to be unset are specified in args array . |
3,842 | public static base_responses unset ( nitro_service client , String aclname [ ] , String args [ ] ) throws Exception { base_responses result = null ; if ( aclname != null && aclname . length > 0 ) { nsacl unsetresources [ ] = new nsacl [ aclname . length ] ; for ( int i = 0 ; i < aclname . length ; i ++ ) { unsetresourc... | Use this API to unset the properties of nsacl resources . Properties that need to be unset are specified in args array . |
3,843 | public static base_response enable ( nitro_service client , String aclname ) throws Exception { nsacl enableresource = new nsacl ( ) ; enableresource . aclname = aclname ; return enableresource . perform_operation ( client , "enable" ) ; } | Use this API to enable nsacl of given name . |
3,844 | public static base_responses enable ( nitro_service client , nsacl resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nsacl enableresources [ ] = new nsacl [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { enableresources [ i... | Use this API to enable nsacl resources . |
3,845 | public static base_response disable ( nitro_service client , String aclname ) throws Exception { nsacl disableresource = new nsacl ( ) ; disableresource . aclname = aclname ; return disableresource . perform_operation ( client , "disable" ) ; } | Use this API to disable nsacl of given name . |
3,846 | public static base_responses disable ( nitro_service client , String aclname [ ] ) throws Exception { base_responses result = null ; if ( aclname != null && aclname . length > 0 ) { nsacl disableresources [ ] = new nsacl [ aclname . length ] ; for ( int i = 0 ; i < aclname . length ; i ++ ) { disableresources [ i ] = n... | Use this API to disable nsacl resources of given names . |
3,847 | public static base_response rename ( nitro_service client , nsacl resource , String new_aclname ) throws Exception { nsacl renameresource = new nsacl ( ) ; renameresource . aclname = resource . aclname ; return renameresource . rename_resource ( client , new_aclname ) ; } | Use this API to rename a nsacl resource . |
3,848 | public static nsacl [ ] get ( nitro_service service , options option ) throws Exception { nsacl obj = new nsacl ( ) ; nsacl [ ] response = ( nsacl [ ] ) obj . get_resources ( service , option ) ; return response ; } | Use this API to fetch all the nsacl resources that are configured on netscaler . |
3,849 | public static nsacl get ( nitro_service service , String aclname ) throws Exception { nsacl obj = new nsacl ( ) ; obj . set_aclname ( aclname ) ; nsacl response = ( nsacl ) obj . get_resource ( service ) ; return response ; } | Use this API to fetch nsacl resource of given name . |
3,850 | public void printAnswers ( List < CoreLabel > doc , PrintWriter out ) { for ( CoreLabel wi : doc ) { String answer = wi . get ( AnswerAnnotation . class ) ; String goldAnswer = wi . get ( GoldAnswerAnnotation . class ) ; out . println ( wi . word ( ) + "\t" + goldAnswer + "\t" + answer ) ; } out . println ( ) ; } | end class ColumnDocParser |
3,851 | public static base_response Force ( nitro_service client , hasync resource ) throws Exception { hasync Forceresource = new hasync ( ) ; Forceresource . force = resource . force ; Forceresource . save = resource . save ; return Forceresource . perform_operation ( client , "Force" ) ; } | Use this API to Force hasync . |
3,852 | public boolean isAncestor ( GrammaticalRelation gr ) { while ( gr != null ) { if ( this . equals ( gr ) ) { return true ; } gr = gr . parent ; } return false ; } | Returns whether this is equal to or an ancestor of gr in the grammatical relations hierarchy . |
3,853 | public static clusterinstance_clusternode_binding [ ] get ( nitro_service service , Long clid ) throws Exception { clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding ( ) ; obj . set_clid ( clid ) ; clusterinstance_clusternode_binding response [ ] = ( clusterinstance_clusternode_binding [ ... | Use this API to fetch clusterinstance_clusternode_binding resources of given name . |
3,854 | public static long count ( nitro_service service , Long clid ) throws Exception { clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding ( ) ; obj . set_clid ( clid ) ; options option = new options ( ) ; option . set_count ( true ) ; clusterinstance_clusternode_binding response [ ] = ( cluste... | Use this API to count clusterinstance_clusternode_binding resources configued on NetScaler . |
3,855 | public static rewritepolicylabel_stats [ ] get ( nitro_service service ) throws Exception { rewritepolicylabel_stats obj = new rewritepolicylabel_stats ( ) ; rewritepolicylabel_stats [ ] response = ( rewritepolicylabel_stats [ ] ) obj . stat_resources ( service ) ; return response ; } | Use this API to fetch the statistics of all rewritepolicylabel_stats resources that are configured on netscaler . |
3,856 | public static rewritepolicylabel_stats get ( nitro_service service , String labelname ) throws Exception { rewritepolicylabel_stats obj = new rewritepolicylabel_stats ( ) ; obj . set_labelname ( labelname ) ; rewritepolicylabel_stats response = ( rewritepolicylabel_stats ) obj . stat_resource ( service ) ; return respo... | Use this API to fetch statistics of rewritepolicylabel_stats resource of given name . |
3,857 | public static cachepolicy_lbvserver_binding [ ] get ( nitro_service service , String policyname ) throws Exception { cachepolicy_lbvserver_binding obj = new cachepolicy_lbvserver_binding ( ) ; obj . set_policyname ( policyname ) ; cachepolicy_lbvserver_binding response [ ] = ( cachepolicy_lbvserver_binding [ ] ) obj . ... | Use this API to fetch cachepolicy_lbvserver_binding resources of given name . |
3,858 | public static systemgroup_binding get ( nitro_service service , String groupname ) throws Exception { systemgroup_binding obj = new systemgroup_binding ( ) ; obj . set_groupname ( groupname ) ; systemgroup_binding response = ( systemgroup_binding ) obj . get_resource ( service ) ; return response ; } | Use this API to fetch systemgroup_binding resource of given name . |
3,859 | public void addSentenceAsFirstOption ( MtasCQLParserSentenceCondition s ) throws ParseException { if ( ! simplified ) { MtasCQLParserSentenceCondition sentenceCurrent ; List < MtasCQLParserSentenceCondition > sentenceSequence ; if ( isBasic ( ) ) { if ( basicSentence == null ) { sentenceSequence = new ArrayList < MtasC... | Adds the sentence as first option . |
3,860 | private void simplifySequence ( List < MtasCQLParserSentenceCondition > sequence ) throws ParseException { List < MtasCQLParserSentenceCondition > newSequence = new ArrayList < MtasCQLParserSentenceCondition > ( ) ; MtasCQLParserSentenceCondition lastSentence = null ; for ( MtasCQLParserSentenceCondition sentence : seq... | Simplify sequence . |
3,861 | public PrintWriter pw ( OutputStream o ) { String encoding = outputEncoding ; if ( ! java . nio . charset . Charset . isSupported ( encoding ) ) { System . out . println ( "Warning: desired encoding " + encoding + " not accepted. " ) ; System . out . println ( "Using UTF-8 to construct PrintWriter" ) ; encoding = "UTF-... | The PrintWriter used to print output . It s the responsibility of pw to deal properly with character encodings for the relevant treebank . |
3,862 | public static Collection < List < String > > untypedDependencyObjectify ( Tree t , HeadFinder hf , TreeTransformer collinizer ) { return dependencyObjectify ( t , hf , collinizer , new UntypedDependencyTyper ( hf ) ) ; } | Returns a collection of untyped word - word dependencies for the tree . |
3,863 | public static Collection < List < String > > typedDependencyObjectify ( Tree t , HeadFinder hf , TreeTransformer collinizer ) { return dependencyObjectify ( t , hf , collinizer , new TypedDependencyTyper ( hf ) ) ; } | Returns a collection of word - word dependencies typed by mother head daughter node syntactic categories . |
3,864 | public static EquivalenceClasser < List < String > , String > typedDependencyClasser ( ) { return new EquivalenceClasser < List < String > , String > ( ) { public String equivalenceClass ( List < String > s ) { if ( s . get ( 5 ) . equals ( leftHeaded ) ) return s . get ( 2 ) + '(' + s . get ( 3 ) + "->" + s . get ( 4 ... | Returns an EquivalenceClasser that classes typed dependencies by the syntactic categories of mother head and daughter plus direction . |
3,865 | public static netbridge_nsip_binding [ ] get ( nitro_service service , String name ) throws Exception { netbridge_nsip_binding obj = new netbridge_nsip_binding ( ) ; obj . set_name ( name ) ; netbridge_nsip_binding response [ ] = ( netbridge_nsip_binding [ ] ) obj . get_resources ( service ) ; return response ; } | Use this API to fetch netbridge_nsip_binding resources of given name . |
3,866 | public static transformprofile_transformaction_binding [ ] get ( nitro_service service , String name ) throws Exception { transformprofile_transformaction_binding obj = new transformprofile_transformaction_binding ( ) ; obj . set_name ( name ) ; transformprofile_transformaction_binding response [ ] = ( transformprofile... | Use this API to fetch transformprofile_transformaction_binding resources of given name . |
3,867 | public static < E > Distribution < E > getDistributionFromLogValues ( Counter < E > counter ) { ClassicCounter < E > c = new ClassicCounter < E > ( ) ; double max = Counters . max ( counter ) ; for ( E key : counter . keySet ( ) ) { double count = Math . exp ( counter . getCount ( key ) - max ) ; c . setCount ( key , c... | Creates a Distribution from the given counter ie makes an internal copy of the counter and divides all counts by the total count . |
3,868 | public static < E > Distribution < E > laplaceSmoothedDistribution ( Counter < E > counter , int numberOfKeys ) { return laplaceSmoothedDistribution ( counter , numberOfKeys , 1.0 ) ; } | Creates an Laplace smoothed Distribution from the given counter ie adds one count to every item including unseen ones and divides by the total count . |
3,869 | public static < E > Distribution < E > laplaceWithExplicitUnknown ( Counter < E > counter , double lambda , E UNK ) { Distribution < E > norm = new Distribution < E > ( ) ; norm . counter = new ClassicCounter < E > ( ) ; double total = counter . totalCount ( ) + ( lambda * ( counter . size ( ) - 1 ) ) ; norm . numberOf... | Creates a smoothed Distribution with Laplace smoothing but assumes an explicit count of UNKNOWN items . Thus anything not in the original counter will have probability zero . |
3,870 | public static < E > Distribution < E > goodTuringSmoothedCounter ( Counter < E > counter , int numberOfKeys ) { int [ ] countCounts = getCountCounts ( counter ) ; for ( int i = 1 ; i <= 10 ; i ++ ) { if ( countCounts [ i ] < 3 ) { return laplaceSmoothedDistribution ( counter , numberOfKeys , 0.5 ) ; } } double observed... | Creates a Good - Turing smoothed Distribution from the given counter . |
3,871 | public static < E > Distribution < E > simpleGoodTuring ( Counter < E > counter , int numberOfKeys ) { validateCounter ( counter ) ; int numUnseen = numberOfKeys - counter . size ( ) ; if ( numUnseen < 1 ) throw new IllegalArgumentException ( String . format ( "ERROR: numberOfKeys %d must be > size of counter %d!" , nu... | Creates a Distribution from the given counter using Gale & ; Sampsons simple Good - Turing smoothing . |
3,872 | public static < E > Distribution < E > dynamicCounterWithDirichletPrior ( Counter < E > c , Distribution < E > prior , double weight ) { double totalWeight = c . totalCount ( ) + weight ; Distribution < E > norm = new DynamicDistribution < E > ( prior , weight / totalWeight ) ; norm . counter = new ClassicCounter < E >... | Like normalizedCounterWithDirichletPrior except probabilities are computed dynamically from the counter and prior instead of all at once up front . The main advantage of this is if you are making many distributions from relatively sparse counters using the same relatively dense prior the prior is only represented once ... |
3,873 | public static < E > Distribution < E > distributionFromLogisticCounter ( Counter < E > cntr ) { double expSum = 0.0 ; int numKeys = 0 ; for ( E key : cntr . keySet ( ) ) { expSum += Math . exp ( cntr . getCount ( key ) ) ; numKeys ++ ; } Distribution < E > probs = new Distribution < E > ( ) ; probs . counter = new Clas... | Maps a counter representing the linear weights of a multiclass logistic regression model to the probabilities of each class . |
3,874 | public double probabilityOf ( E key ) { if ( counter . containsKey ( key ) ) { return counter . getCount ( key ) ; } else { int remainingKeys = numberOfKeys - counter . size ( ) ; if ( remainingKeys <= 0 ) { return 0.0 ; } else { return ( reservedMass / remainingKeys ) ; } } } | Returns the normalized count of the given object . |
3,875 | public static appfwprofile_contenttype_binding [ ] get ( nitro_service service , String name ) throws Exception { appfwprofile_contenttype_binding obj = new appfwprofile_contenttype_binding ( ) ; obj . set_name ( name ) ; appfwprofile_contenttype_binding response [ ] = ( appfwprofile_contenttype_binding [ ] ) obj . get... | Use this API to fetch appfwprofile_contenttype_binding resources of given name . |
3,876 | public static appflowglobal_appflowpolicy_binding [ ] get ( nitro_service service ) throws Exception { appflowglobal_appflowpolicy_binding obj = new appflowglobal_appflowpolicy_binding ( ) ; appflowglobal_appflowpolicy_binding response [ ] = ( appflowglobal_appflowpolicy_binding [ ] ) obj . get_resources ( service ) ; ... | Use this API to fetch a appflowglobal_appflowpolicy_binding resources . |
3,877 | public static base_response clear ( nitro_service client ) throws Exception { locationdata clearresource = new locationdata ( ) ; return clearresource . perform_operation ( client , "clear" ) ; } | Use this API to clear locationdata . |
3,878 | public static base_response create ( nitro_service client , ssldsakey resource ) throws Exception { ssldsakey createresource = new ssldsakey ( ) ; createresource . keyfile = resource . keyfile ; createresource . bits = resource . bits ; createresource . keyform = resource . keyform ; createresource . des = resource . d... | Use this API to create ssldsakey . |
3,879 | public static base_response update ( nitro_service client , lacp resource ) throws Exception { lacp updateresource = new lacp ( ) ; updateresource . syspriority = resource . syspriority ; updateresource . ownernode = resource . ownernode ; return updateresource . update_resource ( client ) ; } | Use this API to update lacp . |
3,880 | public static base_responses update ( nitro_service client , lacp resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { lacp updateresources [ ] = new lacp [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] ... | Use this API to update lacp resources . |
3,881 | public static lacp [ ] get ( nitro_service service ) throws Exception { lacp obj = new lacp ( ) ; lacp [ ] response = ( lacp [ ] ) obj . get_resources ( service ) ; return response ; } | Use this API to fetch all the lacp resources that are configured on netscaler . |
3,882 | public static lacp get ( nitro_service service , Long ownernode ) throws Exception { lacp obj = new lacp ( ) ; obj . set_ownernode ( ownernode ) ; lacp response = ( lacp ) obj . get_resource ( service ) ; return response ; } | Use this API to fetch lacp resource of given name . |
3,883 | public static GrammaticalRelation getConj ( String conjunctionString ) { GrammaticalRelation result = conjs . get ( conjunctionString ) ; if ( result == null ) { synchronized ( conjs ) { result = conjs . get ( conjunctionString ) ; if ( result == null ) { result = new GrammaticalRelation ( Language . English , "conj" ,... | The conj grammatical relation . Used to collapse conjunct relations . They will be turned into conj_word where word is a conjunction . |
3,884 | public static base_response add ( nitro_service client , nat64 resource ) throws Exception { nat64 addresource = new nat64 ( ) ; addresource . name = resource . name ; addresource . acl6name = resource . acl6name ; addresource . netprofile = resource . netprofile ; return addresource . add_resource ( client ) ; } | Use this API to add nat64 . |
3,885 | public static base_responses add ( nitro_service client , nat64 resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nat64 addresources [ ] = new nat64 [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new ... | Use this API to add nat64 resources . |
3,886 | public static base_response update ( nitro_service client , nat64 resource ) throws Exception { nat64 updateresource = new nat64 ( ) ; updateresource . name = resource . name ; updateresource . acl6name = resource . acl6name ; updateresource . netprofile = resource . netprofile ; return updateresource . update_resource... | Use this API to update nat64 . |
3,887 | public static nat64 [ ] get ( nitro_service service ) throws Exception { nat64 obj = new nat64 ( ) ; nat64 [ ] response = ( nat64 [ ] ) obj . get_resources ( service ) ; return response ; } | Use this API to fetch all the nat64 resources that are configured on netscaler . |
3,888 | public static nat64 get ( nitro_service service , String name ) throws Exception { nat64 obj = new nat64 ( ) ; obj . set_name ( name ) ; nat64 response = ( nat64 ) obj . get_resource ( service ) ; return response ; } | Use this API to fetch nat64 resource of given name . |
3,889 | public static base_response add ( nitro_service client , nstimer resource ) throws Exception { nstimer addresource = new nstimer ( ) ; addresource . name = resource . name ; addresource . interval = resource . interval ; addresource . unit = resource . unit ; addresource . comment = resource . comment ; return addresou... | Use this API to add nstimer . |
3,890 | public static base_responses add ( nitro_service client , nstimer resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nstimer addresources [ ] = new nstimer [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] ... | Use this API to add nstimer resources . |
3,891 | public static base_response update ( nitro_service client , nstimer resource ) throws Exception { nstimer updateresource = new nstimer ( ) ; updateresource . name = resource . name ; updateresource . interval = resource . interval ; updateresource . unit = resource . unit ; updateresource . comment = resource . comment... | Use this API to update nstimer . |
3,892 | public static base_responses update ( nitro_service client , nstimer resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nstimer updateresources [ ] = new nstimer [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresourc... | Use this API to update nstimer resources . |
3,893 | public static base_response unset ( nitro_service client , nstimer resource , String [ ] args ) throws Exception { nstimer unsetresource = new nstimer ( ) ; unsetresource . name = resource . name ; unsetresource . interval = resource . interval ; unsetresource . unit = resource . unit ; unsetresource . comment = resour... | Use this API to unset the properties of nstimer resource . Properties that need to be unset are specified in args array . |
3,894 | public static base_responses unset ( nitro_service client , nstimer resources [ ] , String [ ] args ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nstimer unsetresources [ ] = new nstimer [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ )... | Use this API to unset the properties of nstimer resources . Properties that need to be unset are specified in args array . |
3,895 | public static nstimer [ ] get ( nitro_service service ) throws Exception { nstimer obj = new nstimer ( ) ; nstimer [ ] response = ( nstimer [ ] ) obj . get_resources ( service ) ; return response ; } | Use this API to fetch all the nstimer resources that are configured on netscaler . |
3,896 | public static nstimer get ( nitro_service service , String name ) throws Exception { nstimer obj = new nstimer ( ) ; obj . set_name ( name ) ; nstimer response = ( nstimer ) obj . get_resource ( service ) ; return response ; } | Use this API to fetch nstimer resource of given name . |
3,897 | public static appfwpolicylabel_appfwpolicy_binding [ ] get ( nitro_service service , String labelname ) throws Exception { appfwpolicylabel_appfwpolicy_binding obj = new appfwpolicylabel_appfwpolicy_binding ( ) ; obj . set_labelname ( labelname ) ; appfwpolicylabel_appfwpolicy_binding response [ ] = ( appfwpolicylabel_... | Use this API to fetch appfwpolicylabel_appfwpolicy_binding resources of given name . |
3,898 | public static auditnslogpolicy_binding get ( nitro_service service , String name ) throws Exception { auditnslogpolicy_binding obj = new auditnslogpolicy_binding ( ) ; obj . set_name ( name ) ; auditnslogpolicy_binding response = ( auditnslogpolicy_binding ) obj . get_resource ( service ) ; return response ; } | Use this API to fetch auditnslogpolicy_binding resource of given name . |
3,899 | public static base_response add ( nitro_service client , filterhtmlinjectionvariable resource ) throws Exception { filterhtmlinjectionvariable addresource = new filterhtmlinjectionvariable ( ) ; addresource . variable = resource . variable ; addresource . value = resource . value ; return addresource . add_resource ( c... | Use this API to add filterhtmlinjectionvariable . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.