idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
3,000
public static base_response update ( nitro_service client , snmpmib resource ) throws Exception { snmpmib updateresource = new snmpmib ( ) ; updateresource . contact = resource . contact ; updateresource . name = resource . name ; updateresource . location = resource . location ; updateresource . customid = resource . customid ; return updateresource . update_resource ( client ) ; }
Use this API to update snmpmib .
3,001
public static base_response unset ( nitro_service client , snmpmib resource , String [ ] args ) throws Exception { snmpmib unsetresource = new snmpmib ( ) ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of snmpmib resource . Properties that need to be unset are specified in args array .
3,002
public static snmpmib get ( nitro_service service , options option ) throws Exception { snmpmib obj = new snmpmib ( ) ; snmpmib [ ] response = ( snmpmib [ ] ) obj . get_resources ( service , option ) ; return response [ 0 ] ; }
Use this API to fetch all the snmpmib resources that are configured on netscaler .
3,003
public static base_response add ( nitro_service client , systemgroup resource ) throws Exception { systemgroup addresource = new systemgroup ( ) ; addresource . groupname = resource . groupname ; addresource . promptstring = resource . promptstring ; addresource . timeout = resource . timeout ; return addresource . add_resource ( client ) ; }
Use this API to add systemgroup .
3,004
public static base_responses add ( nitro_service client , systemgroup resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { systemgroup addresources [ ] = new systemgroup [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new systemgroup ( ) ; addresources [ i ] . groupname = resources [ i ] . groupname ; addresources [ i ] . promptstring = resources [ i ] . promptstring ; addresources [ i ] . timeout = resources [ i ] . timeout ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
Use this API to add systemgroup resources .
3,005
public static base_response delete ( nitro_service client , String groupname ) throws Exception { systemgroup deleteresource = new systemgroup ( ) ; deleteresource . groupname = groupname ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete systemgroup of given name .
3,006
public static base_response update ( nitro_service client , systemgroup resource ) throws Exception { systemgroup updateresource = new systemgroup ( ) ; updateresource . groupname = resource . groupname ; updateresource . promptstring = resource . promptstring ; updateresource . timeout = resource . timeout ; return updateresource . update_resource ( client ) ; }
Use this API to update systemgroup .
3,007
public static base_responses update ( nitro_service client , systemgroup resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { systemgroup updateresources [ ] = new systemgroup [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new systemgroup ( ) ; updateresources [ i ] . groupname = resources [ i ] . groupname ; updateresources [ i ] . promptstring = resources [ i ] . promptstring ; updateresources [ i ] . timeout = resources [ i ] . timeout ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
Use this API to update systemgroup resources .
3,008
public static base_response unset ( nitro_service client , systemgroup resource , String [ ] args ) throws Exception { systemgroup unsetresource = new systemgroup ( ) ; unsetresource . groupname = resource . groupname ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of systemgroup resource . Properties that need to be unset are specified in args array .
3,009
public static base_responses unset ( nitro_service client , String groupname [ ] , String args [ ] ) throws Exception { base_responses result = null ; if ( groupname != null && groupname . length > 0 ) { systemgroup unsetresources [ ] = new systemgroup [ groupname . length ] ; for ( int i = 0 ; i < groupname . length ; i ++ ) { unsetresources [ i ] = new systemgroup ( ) ; unsetresources [ i ] . groupname = groupname [ i ] ; } result = unset_bulk_request ( client , unsetresources , args ) ; } return result ; }
Use this API to unset the properties of systemgroup resources . Properties that need to be unset are specified in args array .
3,010
public static systemgroup [ ] get ( nitro_service service ) throws Exception { systemgroup obj = new systemgroup ( ) ; systemgroup [ ] response = ( systemgroup [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the systemgroup resources that are configured on netscaler .
3,011
public static systemgroup get ( nitro_service service , String groupname ) throws Exception { systemgroup obj = new systemgroup ( ) ; obj . set_groupname ( groupname ) ; systemgroup response = ( systemgroup ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch systemgroup resource of given name .
3,012
public static systemgroup [ ] get ( nitro_service service , String groupname [ ] ) throws Exception { if ( groupname != null && groupname . length > 0 ) { systemgroup response [ ] = new systemgroup [ groupname . length ] ; systemgroup obj [ ] = new systemgroup [ groupname . length ] ; for ( int i = 0 ; i < groupname . length ; i ++ ) { obj [ i ] = new systemgroup ( ) ; obj [ i ] . set_groupname ( groupname [ i ] ) ; response [ i ] = ( systemgroup ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
Use this API to fetch systemgroup resources of given names .
3,013
public static base_response join ( nitro_service client , cluster resource ) throws Exception { cluster joinresource = new cluster ( ) ; joinresource . clip = resource . clip ; joinresource . password = resource . password ; return joinresource . perform_operation ( client , "join" ) ; }
Use this API to join cluster .
3,014
public void beforeRecover ( ) { if ( data . getPeriod ( ) > 0 ) { final long now = System . currentTimeMillis ( ) ; long startTime = data . getStartTime ( ) ; while ( startTime <= now ) { startTime += data . getPeriod ( ) ; data . setStartTime ( startTime ) ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Task with id " + data . getTaskID ( ) + " start time reset to " + data . getStartTime ( ) ) ; } } }
Invoked before a task is recovered after fail over by default simply adjust start time if it is a periodic timer .
3,015
public static tunnelglobal_binding get ( nitro_service service ) throws Exception { tunnelglobal_binding obj = new tunnelglobal_binding ( ) ; tunnelglobal_binding response = ( tunnelglobal_binding ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch a tunnelglobal_binding resource .
3,016
public static base_response add ( nitro_service client , snmpview resource ) throws Exception { snmpview addresource = new snmpview ( ) ; addresource . name = resource . name ; addresource . subtree = resource . subtree ; addresource . type = resource . type ; return addresource . add_resource ( client ) ; }
Use this API to add snmpview .
3,017
public static base_response delete ( nitro_service client , snmpview resource ) throws Exception { snmpview deleteresource = new snmpview ( ) ; deleteresource . name = resource . name ; deleteresource . subtree = resource . subtree ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete snmpview .
3,018
public static base_response update ( nitro_service client , snmpview resource ) throws Exception { snmpview updateresource = new snmpview ( ) ; updateresource . name = resource . name ; updateresource . subtree = resource . subtree ; updateresource . type = resource . type ; return updateresource . update_resource ( client ) ; }
Use this API to update snmpview .
3,019
public static base_responses update ( nitro_service client , snmpview resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { snmpview updateresources [ ] = new snmpview [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new snmpview ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . subtree = resources [ i ] . subtree ; updateresources [ i ] . type = resources [ i ] . type ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
Use this API to update snmpview resources .
3,020
public static snmpview [ ] get ( nitro_service service , options option ) throws Exception { snmpview obj = new snmpview ( ) ; snmpview [ ] response = ( snmpview [ ] ) obj . get_resources ( service , option ) ; return response ; }
Use this API to fetch all the snmpview resources that are configured on netscaler .
3,021
public static void endDoing ( ) { long elapsed = System . currentTimeMillis ( ) - startTime ; System . err . println ( "done [" + nf . format ( ( ( double ) elapsed ) / 1000 ) + " sec]." ) ; }
Finish the line from startDoing with the end of the timing done message and elapsed time in x . y seconds .
3,022
public static inatsession_stats get ( nitro_service service , String name ) throws Exception { inatsession_stats obj = new inatsession_stats ( ) ; obj . set_name ( name ) ; inatsession_stats response = ( inatsession_stats ) obj . stat_resource ( service ) ; return response ; }
Use this API to fetch statistics of inatsession_stats resource of given name .
3,023
public static inatsession_stats get ( nitro_service service , inatsession_stats obj ) throws Exception { options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( obj ) ) ; inatsession_stats response = ( inatsession_stats ) obj . stat_resource ( service , option ) ; return response ; }
Use this API to fetch statistics of inatsession_stats resource of the given information .
3,024
public static responderpolicy_responderglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { responderpolicy_responderglobal_binding obj = new responderpolicy_responderglobal_binding ( ) ; obj . set_name ( name ) ; responderpolicy_responderglobal_binding response [ ] = ( responderpolicy_responderglobal_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch responderpolicy_responderglobal_binding resources of given name .
3,025
public static base_response update ( nitro_service client , ip6tunnelparam resource ) throws Exception { ip6tunnelparam updateresource = new ip6tunnelparam ( ) ; updateresource . srcip = resource . srcip ; updateresource . dropfrag = resource . dropfrag ; updateresource . dropfragcputhreshold = resource . dropfragcputhreshold ; updateresource . srciproundrobin = resource . srciproundrobin ; return updateresource . update_resource ( client ) ; }
Use this API to update ip6tunnelparam .
3,026
public static base_response unset ( nitro_service client , ip6tunnelparam resource , String [ ] args ) throws Exception { ip6tunnelparam unsetresource = new ip6tunnelparam ( ) ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of ip6tunnelparam resource . Properties that need to be unset are specified in args array .
3,027
public static ip6tunnelparam get ( nitro_service service ) throws Exception { ip6tunnelparam obj = new ip6tunnelparam ( ) ; ip6tunnelparam [ ] response = ( ip6tunnelparam [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; }
Use this API to fetch all the ip6tunnelparam resources that are configured on netscaler .
3,028
public static base_response add ( nitro_service client , appflowaction resource ) throws Exception { appflowaction addresource = new appflowaction ( ) ; addresource . name = resource . name ; addresource . collectors = resource . collectors ; addresource . comment = resource . comment ; return addresource . add_resource ( client ) ; }
Use this API to add appflowaction .
3,029
public static base_response update ( nitro_service client , appflowaction resource ) throws Exception { appflowaction updateresource = new appflowaction ( ) ; updateresource . name = resource . name ; updateresource . collectors = resource . collectors ; updateresource . comment = resource . comment ; return updateresource . update_resource ( client ) ; }
Use this API to update appflowaction .
3,030
public static base_responses update ( nitro_service client , appflowaction resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { appflowaction updateresources [ ] = new appflowaction [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new appflowaction ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . collectors = resources [ i ] . collectors ; updateresources [ i ] . comment = resources [ i ] . comment ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
Use this API to update appflowaction resources .
3,031
public static appflowaction [ ] get ( nitro_service service , options option ) throws Exception { appflowaction obj = new appflowaction ( ) ; appflowaction [ ] response = ( appflowaction [ ] ) obj . get_resources ( service , option ) ; return response ; }
Use this API to fetch all the appflowaction resources that are configured on netscaler .
3,032
public static appflowaction get ( nitro_service service , String name ) throws Exception { appflowaction obj = new appflowaction ( ) ; obj . set_name ( name ) ; appflowaction response = ( appflowaction ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch appflowaction resource of given name .
3,033
public static base_response create ( nitro_service client , sslcert resource ) throws Exception { sslcert createresource = new sslcert ( ) ; createresource . certfile = resource . certfile ; createresource . reqfile = resource . reqfile ; createresource . certtype = resource . certtype ; createresource . keyfile = resource . keyfile ; createresource . keyform = resource . keyform ; createresource . pempassphrase = resource . pempassphrase ; createresource . days = resource . days ; createresource . certform = resource . certform ; createresource . cacert = resource . cacert ; createresource . cacertform = resource . cacertform ; createresource . cakey = resource . cakey ; createresource . cakeyform = resource . cakeyform ; createresource . caserial = resource . caserial ; return createresource . perform_operation ( client , "create" ) ; }
Use this API to create sslcert .
3,034
public static techsupport get ( nitro_service service ) throws Exception { techsupport obj = new techsupport ( ) ; techsupport [ ] response = ( techsupport [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; }
Use this API to fetch all the techsupport resources that are configured on netscaler .
3,035
public static techsupport [ ] get ( nitro_service service , techsupport_args args ) throws Exception { techsupport obj = new techsupport ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; techsupport [ ] response = ( techsupport [ ] ) obj . get_resources ( service , option ) ; return response ; }
Use this API to fetch all the techsupport resources that are configured on netscaler . This uses techsupport_args which is a way to provide additional arguments while fetching the resources .
3,036
public static vrid_nsip_binding [ ] get ( nitro_service service , Long id ) throws Exception { vrid_nsip_binding obj = new vrid_nsip_binding ( ) ; obj . set_id ( id ) ; vrid_nsip_binding response [ ] = ( vrid_nsip_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch vrid_nsip_binding resources of given name .
3,037
public static crvserver_stats [ ] get ( nitro_service service ) throws Exception { crvserver_stats obj = new crvserver_stats ( ) ; crvserver_stats [ ] response = ( crvserver_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
Use this API to fetch the statistics of all crvserver_stats resources that are configured on netscaler .
3,038
public static crvserver_stats get ( nitro_service service , String name ) throws Exception { crvserver_stats obj = new crvserver_stats ( ) ; obj . set_name ( name ) ; crvserver_stats response = ( crvserver_stats ) obj . stat_resource ( service ) ; return response ; }
Use this API to fetch statistics of crvserver_stats resource of given name .
3,039
public static authorizationaction [ ] get ( nitro_service service ) throws Exception { authorizationaction obj = new authorizationaction ( ) ; authorizationaction [ ] response = ( authorizationaction [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the authorizationaction resources that are configured on netscaler .
3,040
public static authorizationaction get ( nitro_service service , String name ) throws Exception { authorizationaction obj = new authorizationaction ( ) ; obj . set_name ( name ) ; authorizationaction response = ( authorizationaction ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch authorizationaction resource of given name .
3,041
public static nstrafficdomain_stats [ ] get ( nitro_service service , options option ) throws Exception { nstrafficdomain_stats obj = new nstrafficdomain_stats ( ) ; nstrafficdomain_stats [ ] response = ( nstrafficdomain_stats [ ] ) obj . stat_resources ( service , option ) ; return response ; }
Use this API to fetch the statistics of all nstrafficdomain_stats resources that are configured on netscaler .
3,042
public static nstrafficdomain_stats get ( nitro_service service , Long td ) throws Exception { nstrafficdomain_stats obj = new nstrafficdomain_stats ( ) ; obj . set_td ( td ) ; nstrafficdomain_stats response = ( nstrafficdomain_stats ) obj . stat_resource ( service ) ; return response ; }
Use this API to fetch statistics of nstrafficdomain_stats resource of given name .
3,043
public static netbridge_iptunnel_binding [ ] get ( nitro_service service , String name ) throws Exception { netbridge_iptunnel_binding obj = new netbridge_iptunnel_binding ( ) ; obj . set_name ( name ) ; netbridge_iptunnel_binding response [ ] = ( netbridge_iptunnel_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch netbridge_iptunnel_binding resources of given name .
3,044
public static crvserver_lbvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { crvserver_lbvserver_binding obj = new crvserver_lbvserver_binding ( ) ; obj . set_name ( name ) ; crvserver_lbvserver_binding response [ ] = ( crvserver_lbvserver_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch crvserver_lbvserver_binding resources of given name .
3,045
public static base_response add ( nitro_service client , dnsaction resource ) throws Exception { dnsaction addresource = new dnsaction ( ) ; addresource . actionname = resource . actionname ; addresource . actiontype = resource . actiontype ; addresource . ipaddress = resource . ipaddress ; addresource . ttl = resource . ttl ; addresource . viewname = resource . viewname ; addresource . preferredloclist = resource . preferredloclist ; return addresource . add_resource ( client ) ; }
Use this API to add dnsaction .
3,046
public static base_responses add ( nitro_service client , dnsaction resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { dnsaction addresources [ ] = new dnsaction [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new dnsaction ( ) ; addresources [ i ] . actionname = resources [ i ] . actionname ; addresources [ i ] . actiontype = resources [ i ] . actiontype ; addresources [ i ] . ipaddress = resources [ i ] . ipaddress ; addresources [ i ] . ttl = resources [ i ] . ttl ; addresources [ i ] . viewname = resources [ i ] . viewname ; addresources [ i ] . preferredloclist = resources [ i ] . preferredloclist ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
Use this API to add dnsaction resources .
3,047
public static base_responses delete ( nitro_service client , String actionname [ ] ) throws Exception { base_responses result = null ; if ( actionname != null && actionname . length > 0 ) { dnsaction deleteresources [ ] = new dnsaction [ actionname . length ] ; for ( int i = 0 ; i < actionname . length ; i ++ ) { deleteresources [ i ] = new dnsaction ( ) ; deleteresources [ i ] . actionname = actionname [ i ] ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; }
Use this API to delete dnsaction resources of given names .
3,048
public static base_response update ( nitro_service client , dnsaction resource ) throws Exception { dnsaction updateresource = new dnsaction ( ) ; updateresource . actionname = resource . actionname ; updateresource . ipaddress = resource . ipaddress ; updateresource . ttl = resource . ttl ; updateresource . viewname = resource . viewname ; updateresource . preferredloclist = resource . preferredloclist ; return updateresource . update_resource ( client ) ; }
Use this API to update dnsaction .
3,049
public static base_responses update ( nitro_service client , dnsaction resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { dnsaction updateresources [ ] = new dnsaction [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new dnsaction ( ) ; updateresources [ i ] . actionname = resources [ i ] . actionname ; updateresources [ i ] . ipaddress = resources [ i ] . ipaddress ; updateresources [ i ] . ttl = resources [ i ] . ttl ; updateresources [ i ] . viewname = resources [ i ] . viewname ; updateresources [ i ] . preferredloclist = resources [ i ] . preferredloclist ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
Use this API to update dnsaction resources .
3,050
public static base_response unset ( nitro_service client , dnsaction resource , String [ ] args ) throws Exception { dnsaction unsetresource = new dnsaction ( ) ; unsetresource . actionname = resource . actionname ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of dnsaction resource . Properties that need to be unset are specified in args array .
3,051
public static dnsaction [ ] get ( nitro_service service ) throws Exception { dnsaction obj = new dnsaction ( ) ; dnsaction [ ] response = ( dnsaction [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the dnsaction resources that are configured on netscaler .
3,052
public static dnsaction get ( nitro_service service , String actionname ) throws Exception { dnsaction obj = new dnsaction ( ) ; obj . set_actionname ( actionname ) ; dnsaction response = ( dnsaction ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch dnsaction resource of given name .
3,053
public static crvserver_cmppolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { crvserver_cmppolicy_binding obj = new crvserver_cmppolicy_binding ( ) ; obj . set_name ( name ) ; crvserver_cmppolicy_binding response [ ] = ( crvserver_cmppolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch crvserver_cmppolicy_binding resources of given name .
3,054
public static Dataset < String , String > readSVMLightFormat ( String filename ) { return readSVMLightFormat ( filename , new HashIndex < String > ( ) , new HashIndex < String > ( ) ) ; }
Constructs a Dataset by reading in a file in SVM light format .
3,055
public Counter < F > getFeatureCounter ( ) { Counter < F > featureCounts = new ClassicCounter < F > ( ) ; for ( int i = 0 ; i < this . size ( ) ; i ++ ) { BasicDatum < L , F > datum = ( BasicDatum < L , F > ) getDatum ( i ) ; Set < F > featureSet = new HashSet < F > ( datum . asFeatures ( ) ) ; for ( F key : featureSet ) { featureCounts . incrementCount ( key , 1.0 ) ; } } return featureCounts ; }
Get Number of datums a given feature appears in .
3,056
public RVFDatum < L , F > getL1NormalizedTFIDFDatum ( Datum < L , F > datum , Counter < F > featureDocCounts ) { Counter < F > tfidfFeatures = new ClassicCounter < F > ( ) ; for ( F feature : datum . asFeatures ( ) ) { if ( featureDocCounts . containsKey ( feature ) ) tfidfFeatures . incrementCount ( feature , 1.0 ) ; } double l1norm = 0 ; for ( F feature : tfidfFeatures . keySet ( ) ) { double idf = Math . log ( ( ( double ) ( this . size ( ) + 1 ) ) / ( featureDocCounts . getCount ( feature ) + 0.5 ) ) ; double tf = tfidfFeatures . getCount ( feature ) ; tfidfFeatures . setCount ( feature , tf * idf ) ; l1norm += tf * idf ; } for ( F feature : tfidfFeatures . keySet ( ) ) { double tfidf = tfidfFeatures . getCount ( feature ) ; tfidfFeatures . setCount ( feature , tfidf / l1norm ) ; } RVFDatum < L , F > rvfDatum = new RVFDatum < L , F > ( tfidfFeatures , datum . label ( ) ) ; return rvfDatum ; }
Method to convert features from counts to L1 - normalized TFIDF based features
3,057
public RVFDataset < L , F > getL1NormalizedTFIDFDataset ( ) { RVFDataset < L , F > rvfDataset = new RVFDataset < L , F > ( this . size ( ) , this . featureIndex , this . labelIndex ) ; Counter < F > featureDocCounts = getFeatureCounter ( ) ; for ( int i = 0 ; i < this . size ( ) ; i ++ ) { Datum < L , F > datum = this . getDatum ( i ) ; RVFDatum < L , F > rvfDatum = getL1NormalizedTFIDFDatum ( datum , featureDocCounts ) ; rvfDataset . add ( rvfDatum ) ; } return rvfDataset ; }
Method to convert this dataset to RVFDataset using L1 - normalized TF - IDF features
3,058
public void printFullFeatureMatrix ( PrintWriter pw ) { String sep = "\t" ; for ( int i = 0 ; i < featureIndex . size ( ) ; i ++ ) { pw . print ( sep + featureIndex . get ( i ) ) ; } pw . println ( ) ; for ( int i = 0 ; i < labels . length ; i ++ ) { pw . print ( labelIndex . get ( i ) ) ; Set < Integer > feats = new HashSet < Integer > ( ) ; for ( int j = 0 ; j < data [ i ] . length ; j ++ ) { int feature = data [ i ] [ j ] ; feats . add ( Integer . valueOf ( feature ) ) ; } for ( int j = 0 ; j < featureIndex . size ( ) ; j ++ ) { if ( feats . contains ( Integer . valueOf ( j ) ) ) { pw . print ( sep + '1' ) ; } else { pw . print ( sep + '0' ) ; } } } }
prints the full feature matrix in tab - delimited form . These can be BIG matrices so be careful!
3,059
public void selectFeatures ( int numFeatures , double [ ] scores ) { List < ScoredObject < F > > scoredFeatures = new ArrayList < ScoredObject < F > > ( ) ; for ( int i = 0 ; i < scores . length ; i ++ ) { scoredFeatures . add ( new ScoredObject < F > ( featureIndex . get ( i ) , scores [ i ] ) ) ; } Collections . sort ( scoredFeatures , ScoredComparator . DESCENDING_COMPARATOR ) ; Index < F > newFeatureIndex = new HashIndex < F > ( ) ; for ( int i = 0 ; i < scoredFeatures . size ( ) && i < numFeatures ; i ++ ) { newFeatureIndex . add ( scoredFeatures . get ( i ) . object ( ) ) ; } for ( int i = 0 ; i < size ; i ++ ) { int [ ] newData = new int [ data [ i ] . length ] ; int curIndex = 0 ; for ( int j = 0 ; j < data [ i ] . length ; j ++ ) { int index ; if ( ( index = newFeatureIndex . indexOf ( featureIndex . get ( data [ i ] [ j ] ) ) ) != - 1 ) { newData [ curIndex ++ ] = index ; } } int [ ] newDataTrimmed = new int [ curIndex ] ; System . arraycopy ( newData , 0 , newDataTrimmed , 0 , curIndex ) ; data [ i ] = newDataTrimmed ; } featureIndex = newFeatureIndex ; }
Generic method to select features based on the feature scores vector provided as an argument .
3,060
public static void printSVMLightFormat ( PrintWriter pw , ClassicCounter < Integer > c , int classNo ) { Integer [ ] features = c . keySet ( ) . toArray ( new Integer [ c . keySet ( ) . size ( ) ] ) ; Arrays . sort ( features ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( classNo ) ; sb . append ( ' ' ) ; for ( int f : features ) { sb . append ( f + 1 ) . append ( ':' ) . append ( c . getCount ( f ) ) . append ( ' ' ) ; } pw . println ( sb . toString ( ) ) ; }
Need to sort the counter by feature keys and dump it
3,061
public static systemglobaldata [ ] get ( nitro_service service , systemglobaldata_args args ) throws Exception { systemglobaldata obj = new systemglobaldata ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; systemglobaldata [ ] response = ( systemglobaldata [ ] ) obj . get_resources ( service , option ) ; return response ; }
Use this API to fetch all the systemglobaldata resources that are configured on netscaler . This uses systemglobaldata_args which is a way to provide additional arguments while fetching the resources .
3,062
public static lbvserver_copolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { lbvserver_copolicy_binding obj = new lbvserver_copolicy_binding ( ) ; obj . set_name ( name ) ; lbvserver_copolicy_binding response [ ] = ( lbvserver_copolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch lbvserver_copolicy_binding resources of given name .
3,063
public static auditsyslogpolicy_aaagroup_binding [ ] get ( nitro_service service , String name ) throws Exception { auditsyslogpolicy_aaagroup_binding obj = new auditsyslogpolicy_aaagroup_binding ( ) ; obj . set_name ( name ) ; auditsyslogpolicy_aaagroup_binding response [ ] = ( auditsyslogpolicy_aaagroup_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch auditsyslogpolicy_aaagroup_binding resources of given name .
3,064
public static sslcertkey_binding get ( nitro_service service , String certkey ) throws Exception { sslcertkey_binding obj = new sslcertkey_binding ( ) ; obj . set_certkey ( certkey ) ; sslcertkey_binding response = ( sslcertkey_binding ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch sslcertkey_binding resource of given name .
3,065
public static nslimitidentifier_nslimitsessions_binding [ ] get ( nitro_service service , String limitidentifier ) throws Exception { nslimitidentifier_nslimitsessions_binding obj = new nslimitidentifier_nslimitsessions_binding ( ) ; obj . set_limitidentifier ( limitidentifier ) ; nslimitidentifier_nslimitsessions_binding response [ ] = ( nslimitidentifier_nslimitsessions_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch nslimitidentifier_nslimitsessions_binding resources of given name .
3,066
public static nslimitidentifier_nslimitsessions_binding [ ] get_filtered ( nitro_service service , String limitidentifier , filtervalue [ ] filter ) throws Exception { nslimitidentifier_nslimitsessions_binding obj = new nslimitidentifier_nslimitsessions_binding ( ) ; obj . set_limitidentifier ( limitidentifier ) ; options option = new options ( ) ; option . set_filter ( filter ) ; nslimitidentifier_nslimitsessions_binding [ ] response = ( nslimitidentifier_nslimitsessions_binding [ ] ) obj . getfiltered ( service , option ) ; return response ; }
Use this API to fetch filtered set of nslimitidentifier_nslimitsessions_binding resources . set the filter parameter values in filtervalue object .
3,067
public static long count ( nitro_service service , String limitidentifier ) throws Exception { nslimitidentifier_nslimitsessions_binding obj = new nslimitidentifier_nslimitsessions_binding ( ) ; obj . set_limitidentifier ( limitidentifier ) ; options option = new options ( ) ; option . set_count ( true ) ; nslimitidentifier_nslimitsessions_binding response [ ] = ( nslimitidentifier_nslimitsessions_binding [ ] ) obj . get_resources ( service , option ) ; if ( response != null ) { return response [ 0 ] . __count ; } return 0 ; }
Use this API to count nslimitidentifier_nslimitsessions_binding resources configued on NetScaler .
3,068
public static base_response add ( nitro_service client , cacheforwardproxy resource ) throws Exception { cacheforwardproxy addresource = new cacheforwardproxy ( ) ; addresource . ipaddress = resource . ipaddress ; addresource . port = resource . port ; return addresource . add_resource ( client ) ; }
Use this API to add cacheforwardproxy .
3,069
public static base_responses add ( nitro_service client , cacheforwardproxy resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { cacheforwardproxy addresources [ ] = new cacheforwardproxy [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new cacheforwardproxy ( ) ; addresources [ i ] . ipaddress = resources [ i ] . ipaddress ; addresources [ i ] . port = resources [ i ] . port ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
Use this API to add cacheforwardproxy resources .
3,070
public static base_response delete ( nitro_service client , String ipaddress ) throws Exception { cacheforwardproxy deleteresource = new cacheforwardproxy ( ) ; deleteresource . ipaddress = ipaddress ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete cacheforwardproxy of given name .
3,071
public static base_response delete ( nitro_service client , cacheforwardproxy resource ) throws Exception { cacheforwardproxy deleteresource = new cacheforwardproxy ( ) ; deleteresource . ipaddress = resource . ipaddress ; deleteresource . port = resource . port ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete cacheforwardproxy .
3,072
public static base_responses delete ( nitro_service client , String ipaddress [ ] ) throws Exception { base_responses result = null ; if ( ipaddress != null && ipaddress . length > 0 ) { cacheforwardproxy deleteresources [ ] = new cacheforwardproxy [ ipaddress . length ] ; for ( int i = 0 ; i < ipaddress . length ; i ++ ) { deleteresources [ i ] = new cacheforwardproxy ( ) ; deleteresources [ i ] . ipaddress = ipaddress [ i ] ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; }
Use this API to delete cacheforwardproxy resources of given names .
3,073
public static base_responses delete ( nitro_service client , cacheforwardproxy resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { cacheforwardproxy deleteresources [ ] = new cacheforwardproxy [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { deleteresources [ i ] = new cacheforwardproxy ( ) ; deleteresources [ i ] . ipaddress = resources [ i ] . ipaddress ; deleteresources [ i ] . port = resources [ i ] . port ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; }
Use this API to delete cacheforwardproxy resources .
3,074
public static cacheforwardproxy [ ] get ( nitro_service service ) throws Exception { cacheforwardproxy obj = new cacheforwardproxy ( ) ; cacheforwardproxy [ ] response = ( cacheforwardproxy [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the cacheforwardproxy resources that are configured on netscaler .
3,075
public static autoscalepolicy_nstimer_binding [ ] get ( nitro_service service , String name ) throws Exception { autoscalepolicy_nstimer_binding obj = new autoscalepolicy_nstimer_binding ( ) ; obj . set_name ( name ) ; autoscalepolicy_nstimer_binding response [ ] = ( autoscalepolicy_nstimer_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch autoscalepolicy_nstimer_binding resources of given name .
3,076
public static cmppolicy_cmpglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { cmppolicy_cmpglobal_binding obj = new cmppolicy_cmpglobal_binding ( ) ; obj . set_name ( name ) ; cmppolicy_cmpglobal_binding response [ ] = ( cmppolicy_cmpglobal_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch cmppolicy_cmpglobal_binding resources of given name .
3,077
public static appfwglobal_binding get ( nitro_service service ) throws Exception { appfwglobal_binding obj = new appfwglobal_binding ( ) ; appfwglobal_binding response = ( appfwglobal_binding ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch a appfwglobal_binding resource .
3,078
public static base_response delete ( nitro_service client , String monitorname ) throws Exception { lbmonitor deleteresource = new lbmonitor ( ) ; deleteresource . monitorname = monitorname ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete lbmonitor of given name .
3,079
public static base_response delete ( nitro_service client , lbmonitor resource ) throws Exception { lbmonitor deleteresource = new lbmonitor ( ) ; deleteresource . monitorname = resource . monitorname ; deleteresource . type = resource . type ; deleteresource . respcode = resource . respcode ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete lbmonitor .
3,080
public static base_responses delete ( nitro_service client , String monitorname [ ] ) throws Exception { base_responses result = null ; if ( monitorname != null && monitorname . length > 0 ) { lbmonitor deleteresources [ ] = new lbmonitor [ monitorname . length ] ; for ( int i = 0 ; i < monitorname . length ; i ++ ) { deleteresources [ i ] = new lbmonitor ( ) ; deleteresources [ i ] . monitorname = monitorname [ i ] ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; }
Use this API to delete lbmonitor resources of given names .
3,081
public static base_responses delete ( nitro_service client , lbmonitor resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { lbmonitor deleteresources [ ] = new lbmonitor [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { deleteresources [ i ] = new lbmonitor ( ) ; deleteresources [ i ] . monitorname = resources [ i ] . monitorname ; deleteresources [ i ] . type = resources [ i ] . type ; deleteresources [ i ] . respcode = resources [ i ] . respcode ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; }
Use this API to delete lbmonitor resources .
3,082
public static base_response unset ( nitro_service client , lbmonitor resource , String [ ] args ) throws Exception { lbmonitor unsetresource = new lbmonitor ( ) ; unsetresource . monitorname = resource . monitorname ; unsetresource . type = resource . type ; unsetresource . ipaddress = resource . ipaddress ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of lbmonitor resource . Properties that need to be unset are specified in args array .
3,083
public static base_responses unset ( nitro_service client , lbmonitor resources [ ] , String [ ] args ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { lbmonitor unsetresources [ ] = new lbmonitor [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { unsetresources [ i ] = new lbmonitor ( ) ; unsetresources [ i ] . monitorname = resources [ i ] . monitorname ; unsetresources [ i ] . type = resources [ i ] . type ; unsetresources [ i ] . ipaddress = resources [ i ] . ipaddress ; } result = unset_bulk_request ( client , unsetresources , args ) ; } return result ; }
Use this API to unset the properties of lbmonitor resources . Properties that need to be unset are specified in args array .
3,084
public static base_response enable ( nitro_service client , String monitorname ) throws Exception { lbmonitor enableresource = new lbmonitor ( ) ; enableresource . monitorname = monitorname ; return enableresource . perform_operation ( client , "enable" ) ; }
Use this API to enable lbmonitor of given name .
3,085
public static base_response enable ( nitro_service client , lbmonitor resource ) throws Exception { lbmonitor enableresource = new lbmonitor ( ) ; enableresource . servicename = resource . servicename ; enableresource . servicegroupname = resource . servicegroupname ; enableresource . monitorname = resource . monitorname ; return enableresource . perform_operation ( client , "enable" ) ; }
Use this API to enable lbmonitor .
3,086
public static base_responses enable ( nitro_service client , String monitorname [ ] ) throws Exception { base_responses result = null ; if ( monitorname != null && monitorname . length > 0 ) { lbmonitor enableresources [ ] = new lbmonitor [ monitorname . length ] ; for ( int i = 0 ; i < monitorname . length ; i ++ ) { enableresources [ i ] = new lbmonitor ( ) ; enableresources [ i ] . monitorname = monitorname [ i ] ; } result = perform_operation_bulk_request ( client , enableresources , "enable" ) ; } return result ; }
Use this API to enable lbmonitor resources of given names .
3,087
public static base_responses enable ( nitro_service client , lbmonitor resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { lbmonitor enableresources [ ] = new lbmonitor [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { enableresources [ i ] = new lbmonitor ( ) ; enableresources [ i ] . servicename = resources [ i ] . servicename ; enableresources [ i ] . servicegroupname = resources [ i ] . servicegroupname ; enableresources [ i ] . monitorname = resources [ i ] . monitorname ; } result = perform_operation_bulk_request ( client , enableresources , "enable" ) ; } return result ; }
Use this API to enable lbmonitor resources .
3,088
public static base_response disable ( nitro_service client , String monitorname ) throws Exception { lbmonitor disableresource = new lbmonitor ( ) ; disableresource . monitorname = monitorname ; return disableresource . perform_operation ( client , "disable" ) ; }
Use this API to disable lbmonitor of given name .
3,089
public static base_response disable ( nitro_service client , lbmonitor resource ) throws Exception { lbmonitor disableresource = new lbmonitor ( ) ; disableresource . servicename = resource . servicename ; disableresource . servicegroupname = resource . servicegroupname ; disableresource . monitorname = resource . monitorname ; return disableresource . perform_operation ( client , "disable" ) ; }
Use this API to disable lbmonitor .
3,090
public static base_responses disable ( nitro_service client , String monitorname [ ] ) throws Exception { base_responses result = null ; if ( monitorname != null && monitorname . length > 0 ) { lbmonitor disableresources [ ] = new lbmonitor [ monitorname . length ] ; for ( int i = 0 ; i < monitorname . length ; i ++ ) { disableresources [ i ] = new lbmonitor ( ) ; disableresources [ i ] . monitorname = monitorname [ i ] ; } result = perform_operation_bulk_request ( client , disableresources , "disable" ) ; } return result ; }
Use this API to disable lbmonitor resources of given names .
3,091
public static base_responses disable ( nitro_service client , lbmonitor resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { lbmonitor disableresources [ ] = new lbmonitor [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { disableresources [ i ] = new lbmonitor ( ) ; disableresources [ i ] . servicename = resources [ i ] . servicename ; disableresources [ i ] . servicegroupname = resources [ i ] . servicegroupname ; disableresources [ i ] . monitorname = resources [ i ] . monitorname ; } result = perform_operation_bulk_request ( client , disableresources , "disable" ) ; } return result ; }
Use this API to disable lbmonitor resources .
3,092
public static lbmonitor [ ] get ( nitro_service service ) throws Exception { lbmonitor obj = new lbmonitor ( ) ; lbmonitor [ ] response = ( lbmonitor [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the lbmonitor resources that are configured on netscaler .
3,093
public static lbmonitor [ ] get ( nitro_service service , lbmonitor_args args ) throws Exception { lbmonitor obj = new lbmonitor ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; lbmonitor [ ] response = ( lbmonitor [ ] ) obj . get_resources ( service , option ) ; return response ; }
Use this API to fetch all the lbmonitor resources that are configured on netscaler . This uses lbmonitor_args which is a way to provide additional arguments while fetching the resources .
3,094
public static lbmonitor get ( nitro_service service , String monitorname ) throws Exception { lbmonitor obj = new lbmonitor ( ) ; obj . set_monitorname ( monitorname ) ; lbmonitor response = ( lbmonitor ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch lbmonitor resource of given name .
3,095
public static lbvserver_spilloverpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { lbvserver_spilloverpolicy_binding obj = new lbvserver_spilloverpolicy_binding ( ) ; obj . set_name ( name ) ; lbvserver_spilloverpolicy_binding response [ ] = ( lbvserver_spilloverpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch lbvserver_spilloverpolicy_binding resources of given name .
3,096
public static base_response clear ( nitro_service client , nsstats resource ) throws Exception { nsstats clearresource = new nsstats ( ) ; clearresource . cleanuplevel = resource . cleanuplevel ; return clearresource . perform_operation ( client , "clear" ) ; }
Use this API to clear nsstats .
3,097
public static base_response Import ( nitro_service client , appqoecustomresp resource ) throws Exception { appqoecustomresp Importresource = new appqoecustomresp ( ) ; Importresource . src = resource . src ; Importresource . name = resource . name ; return Importresource . perform_operation ( client , "Import" ) ; }
Use this API to Import appqoecustomresp .
3,098
public static base_responses Import ( nitro_service client , appqoecustomresp resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { appqoecustomresp Importresources [ ] = new appqoecustomresp [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { Importresources [ i ] = new appqoecustomresp ( ) ; Importresources [ i ] . src = resources [ i ] . src ; Importresources [ i ] . name = resources [ i ] . name ; } result = perform_operation_bulk_request ( client , Importresources , "Import" ) ; } return result ; }
Use this API to Import appqoecustomresp resources .
3,099
public static base_responses change ( nitro_service client , appqoecustomresp resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { appqoecustomresp updateresources [ ] = new appqoecustomresp [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new appqoecustomresp ( ) ; updateresources [ i ] . name = resources [ i ] . name ; } result = perform_operation_bulk_request ( client , updateresources , "update" ) ; } return result ; }
Use this API to change appqoecustomresp resources .