code
stringlengths
73
34.1k
label
stringclasses
1 value
public static base_response unset(nitro_service client, dnssoarec resource, String[] args) throws Exception{ dnssoarec unsetresource = new dnssoarec(); unsetresource.domain = resource.domain; return unsetresource.unset_resource(client,args); }
java
public static base_responses unset(nitro_service client, String domain[], String args[]) throws Exception { base_responses result = null; if (domain != null && domain.length > 0) { dnssoarec unsetresources[] = new dnssoarec[domain.length]; for (int i=0;i<domain.length;i++){ unsetresources[i] = new dnssoar...
java
public static dnssoarec[] get(nitro_service service) throws Exception{ dnssoarec obj = new dnssoarec(); dnssoarec[] response = (dnssoarec[])obj.get_resources(service); return response; }
java
public static dnssoarec[] get(nitro_service service, dnssoarec_args args) throws Exception{ dnssoarec obj = new dnssoarec(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); dnssoarec[] response = (dnssoarec[])obj.get_resources(service, option); return response...
java
public static dnssoarec get(nitro_service service, String domain) throws Exception{ dnssoarec obj = new dnssoarec(); obj.set_domain(domain); dnssoarec response = (dnssoarec) obj.get_resource(service); return response; }
java
public static vpnglobal_domain_binding[] get(nitro_service service) throws Exception{ vpnglobal_domain_binding obj = new vpnglobal_domain_binding(); vpnglobal_domain_binding response[] = (vpnglobal_domain_binding[]) obj.get_resources(service); return response; }
java
public static base_response add(nitro_service client, cachepolicy resource) throws Exception { cachepolicy addresource = new cachepolicy(); addresource.policyname = resource.policyname; addresource.rule = resource.rule; addresource.action = resource.action; addresource.storeingroup = resource.storeingroup; ...
java
public static base_responses add(nitro_service client, cachepolicy resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { cachepolicy addresources[] = new cachepolicy[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new cach...
java
public static base_response update(nitro_service client, cachepolicy resource) throws Exception { cachepolicy updateresource = new cachepolicy(); updateresource.policyname = resource.policyname; updateresource.rule = resource.rule; updateresource.action = resource.action; updateresource.storeingroup = resourc...
java
public static base_responses update(nitro_service client, cachepolicy resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { cachepolicy updateresources[] = new cachepolicy[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] =...
java
public static base_responses unset(nitro_service client, String policyname[], String args[]) throws Exception { base_responses result = null; if (policyname != null && policyname.length > 0) { cachepolicy unsetresources[] = new cachepolicy[policyname.length]; for (int i=0;i<policyname.length;i++){ unsetre...
java
public static base_response rename(nitro_service client, cachepolicy resource, String new_policyname) throws Exception { cachepolicy renameresource = new cachepolicy(); renameresource.policyname = resource.policyname; return renameresource.rename_resource(client,new_policyname); }
java
public static cachepolicy[] get(nitro_service service) throws Exception{ cachepolicy obj = new cachepolicy(); cachepolicy[] response = (cachepolicy[])obj.get_resources(service); return response; }
java
public static cachepolicy get(nitro_service service, String policyname) throws Exception{ cachepolicy obj = new cachepolicy(); obj.set_policyname(policyname); cachepolicy response = (cachepolicy) obj.get_resource(service); return response; }
java
public static authorizationpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ authorizationpolicy_lbvserver_binding obj = new authorizationpolicy_lbvserver_binding(); obj.set_name(name); authorizationpolicy_lbvserver_binding response[] = (authorizationpolicy_lbvserver_binding[]) ...
java
private String getNext() { StringBuilder result = new StringBuilder(); try { XMLUtils.XMLTag tag; do { // String text = XMLUtils.readUntilTag(inputReader); // there may or may not be text before the next tag, but we discard it // System.out.println("out...
java
public List<E> tokenize() { // System.out.println("tokenize called"); List<E> result = new ArrayList<E>(); while (hasNext()) { result.add(next()); } return result; }
java
public static IteratorFromReaderFactory<String> getFactory(String tag) { return new XMLBeginEndIterator.XMLBeginEndIteratorFactory<String>(tag, new IdentityFunction<String>(), false, false); }
java
public static lbvserver_service_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_service_binding obj = new lbvserver_service_binding(); obj.set_name(name); lbvserver_service_binding response[] = (lbvserver_service_binding[]) obj.get_resources(service); return response; }
java
public static base_response update(nitro_service client, sslservicegroup resource) throws Exception { sslservicegroup updateresource = new sslservicegroup(); updateresource.servicegroupname = resource.servicegroupname; updateresource.sessreuse = resource.sessreuse; updateresource.sesstimeout = resource.sesstime...
java
public static base_responses update(nitro_service client, sslservicegroup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslservicegroup updateresources[] = new sslservicegroup[resources.length]; for (int i=0;i<resources.length;i++){ updatere...
java
public static base_response unset(nitro_service client, sslservicegroup resource, String[] args) throws Exception{ sslservicegroup unsetresource = new sslservicegroup(); unsetresource.servicegroupname = resource.servicegroupname; return unsetresource.unset_resource(client,args); }
java
public static base_responses unset(nitro_service client, String servicegroupname[], String args[]) throws Exception { base_responses result = null; if (servicegroupname != null && servicegroupname.length > 0) { sslservicegroup unsetresources[] = new sslservicegroup[servicegroupname.length]; for (int i=0;i<ser...
java
public static sslservicegroup[] get(nitro_service service) throws Exception{ sslservicegroup obj = new sslservicegroup(); sslservicegroup[] response = (sslservicegroup[])obj.get_resources(service); return response; }
java
public static sslservicegroup[] get(nitro_service service, sslservicegroup_args args) throws Exception{ sslservicegroup obj = new sslservicegroup(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); sslservicegroup[] response = (sslservicegroup[])obj.get_resources...
java
public static sslservicegroup get(nitro_service service, String servicegroupname) throws Exception{ sslservicegroup obj = new sslservicegroup(); obj.set_servicegroupname(servicegroupname); sslservicegroup response = (sslservicegroup) obj.get_resource(service); return response; }
java
public static authenticationsamlpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationsamlpolicy_authenticationvserver_binding obj = new authenticationsamlpolicy_authenticationvserver_binding(); obj.set_name(name); authenticationsamlpolicy_authenticationvse...
java
public static base_response add(nitro_service client, servicegroup resource) throws Exception { servicegroup addresource = new servicegroup(); addresource.servicegroupname = resource.servicegroupname; addresource.servicetype = resource.servicetype; addresource.cachetype = resource.cachetype; addresource.td = ...
java
public static base_response delete(nitro_service client, String servicegroupname) throws Exception { servicegroup deleteresource = new servicegroup(); deleteresource.servicegroupname = servicegroupname; return deleteresource.delete_resource(client); }
java
public static base_responses delete(nitro_service client, servicegroup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { servicegroup deleteresources[] = new servicegroup[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i...
java
public static base_response update(nitro_service client, servicegroup resource) throws Exception { servicegroup updateresource = new servicegroup(); updateresource.servicegroupname = resource.servicegroupname; updateresource.servername = resource.servername; updateresource.port = resource.port; updateresource...
java
public static base_response unset(nitro_service client, servicegroup resource, String[] args) throws Exception{ servicegroup unsetresource = new servicegroup(); unsetresource.servicegroupname = resource.servicegroupname; unsetresource.servername = resource.servername; unsetresource.port = resource.port; unset...
java
public static base_responses unset(nitro_service client, servicegroup resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { servicegroup unsetresources[] = new servicegroup[resources.length]; for (int i=0;i<resources.length;i++){ uns...
java
public static base_response enable(nitro_service client, String servicegroupname) throws Exception { servicegroup enableresource = new servicegroup(); enableresource.servicegroupname = servicegroupname; return enableresource.perform_operation(client,"enable"); }
java
public static base_response enable(nitro_service client, servicegroup resource) throws Exception { servicegroup enableresource = new servicegroup(); enableresource.servicegroupname = resource.servicegroupname; enableresource.servername = resource.servername; enableresource.port = resource.port; return enabler...
java
public static base_responses enable(nitro_service client, String servicegroupname[]) throws Exception { base_responses result = null; if (servicegroupname != null && servicegroupname.length > 0) { servicegroup enableresources[] = new servicegroup[servicegroupname.length]; for (int i=0;i<servicegroupname.lengt...
java
public static base_responses enable(nitro_service client, servicegroup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { servicegroup enableresources[] = new servicegroup[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i...
java
public static base_response disable(nitro_service client, String servicegroupname) throws Exception { servicegroup disableresource = new servicegroup(); disableresource.servicegroupname = servicegroupname; return disableresource.perform_operation(client,"disable"); }
java
public static base_response disable(nitro_service client, servicegroup resource) throws Exception { servicegroup disableresource = new servicegroup(); disableresource.servicegroupname = resource.servicegroupname; disableresource.servername = resource.servername; disableresource.port = resource.port; disablere...
java
public static base_responses disable(nitro_service client, String servicegroupname[]) throws Exception { base_responses result = null; if (servicegroupname != null && servicegroupname.length > 0) { servicegroup disableresources[] = new servicegroup[servicegroupname.length]; for (int i=0;i<servicegroupname.len...
java
public static base_responses disable(nitro_service client, servicegroup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { servicegroup disableresources[] = new servicegroup[resources.length]; for (int i=0;i<resources.length;i++){ disableresource...
java
public static base_response rename(nitro_service client, servicegroup resource, String new_servicegroupname) throws Exception { servicegroup renameresource = new servicegroup(); renameresource.servicegroupname = resource.servicegroupname; return renameresource.rename_resource(client,new_servicegroupname); }
java
public static servicegroup[] get(nitro_service service) throws Exception{ servicegroup obj = new servicegroup(); servicegroup[] response = (servicegroup[])obj.get_resources(service); return response; }
java
public static servicegroup[] get(nitro_service service, servicegroup_args args) throws Exception{ servicegroup obj = new servicegroup(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); servicegroup[] response = (servicegroup[])obj.get_resources(service, option);...
java
public static servicegroup get(nitro_service service, String servicegroupname) throws Exception{ servicegroup obj = new servicegroup(); obj.set_servicegroupname(servicegroupname); servicegroup response = (servicegroup) obj.get_resource(service); return response; }
java
public static base_response flush(nitro_service client) throws Exception { dnsproxyrecords flushresource = new dnsproxyrecords(); return flushresource.perform_operation(client,"flush"); }
java
public static transformpolicy_transformpolicylabel_binding[] get(nitro_service service, String name) throws Exception{ transformpolicy_transformpolicylabel_binding obj = new transformpolicy_transformpolicylabel_binding(); obj.set_name(name); transformpolicy_transformpolicylabel_binding response[] = (transformpoli...
java
public static base_response update(nitro_service client, arpparam resource) throws Exception { arpparam updateresource = new arpparam(); updateresource.timeout = resource.timeout; updateresource.spoofvalidation = resource.spoofvalidation; return updateresource.update_resource(client); }
java
public static base_response unset(nitro_service client, arpparam resource, String[] args) throws Exception{ arpparam unsetresource = new arpparam(); return unsetresource.unset_resource(client,args); }
java
public static arpparam get(nitro_service service) throws Exception{ arpparam obj = new arpparam(); arpparam[] response = (arpparam[])obj.get_resources(service); return response[0]; }
java
public static int getInt(Properties props, String key, int defaultValue) { String value = props.getProperty(key); if (value != null) { return Integer.parseInt(value); } else { return defaultValue; } }
java
public static double getDouble(Properties props, String key, double defaultValue) { String value = props.getProperty(key); if (value != null) { return Double.parseDouble(value); } else { return defaultValue; } }
java
public static boolean getBool(Properties props, String key, boolean defaultValue) { String value = props.getProperty(key); if (value != null) { return Boolean.parseBoolean(value); } else { return defaultValue; } }
java
public static int[] getIntArray(Properties props, String key) { Integer[] result = MetaClass.cast(props.getProperty(key), Integer [].class); return ArrayUtils.toPrimitive(result); }
java
public static double[] getDoubleArray(Properties props, String key) { Double[] result = MetaClass.cast(props.getProperty(key), Double [].class); return ArrayUtils.toPrimitive(result); }
java
public static int invertedCompare(Solution s1, Solution s2) { int flag = InvertedCompareUtils.ConstraintCompare(s1, s2); if (flag == 0) { flag = InvertedCompareUtils.ParetoObjectiveCompare(s1, s2); } return flag; }
java
@Override public boolean add(Solution solution_to_add) { List<Solution> solutions_to_remove = new ArrayList<>(); boolean should_add = true; for (Solution solution : solutions) { int flag = invertedCompare(solution_to_add, solution); if (flag < 0) // solution_to_add is b...
java
public static vpntrafficpolicy[] get(nitro_service service) throws Exception{ vpntrafficpolicy obj = new vpntrafficpolicy(); vpntrafficpolicy[] response = (vpntrafficpolicy[])obj.get_resources(service); return response; }
java
public static vpntrafficpolicy get(nitro_service service, String name) throws Exception{ vpntrafficpolicy obj = new vpntrafficpolicy(); obj.set_name(name); vpntrafficpolicy response = (vpntrafficpolicy) obj.get_resource(service); return response; }
java
public int numFeatureTokens() { int x = 0; for (int i = 0, m = size; i < m; i++) { x += data[i].length; } return x; }
java
public void addAll(Iterable<? extends Datum<L,F>> data) { for (Datum<L, F> d : data) { add(d); } }
java
public String[] makeSvmLabelMap() { String[] labelMap = new String[numClasses()]; if (numClasses() > 2) { for (int i = 0; i < labelMap.length; i++) { labelMap[i] = String.valueOf((i + 1)); } } else { labelMap = new String[]{"+1", "-1"}; } return labelMap; }
java
public void printSVMLightFormat(PrintWriter pw) { //assumes each data item has a few features on, and sorts the feature keys while collecting the values in a counter // old comment: // the following code commented out by Ramesh (nmramesh@cs.stanford.edu) 12/17/2009. // why not simply print the exa...
java
public static tmglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{ tmglobal_auditnslogpolicy_binding obj = new tmglobal_auditnslogpolicy_binding(); tmglobal_auditnslogpolicy_binding response[] = (tmglobal_auditnslogpolicy_binding[]) obj.get_resources(service); return response; }
java
public static cachepolicylabel_cachepolicy_binding[] get(nitro_service service, String labelname) throws Exception{ cachepolicylabel_cachepolicy_binding obj = new cachepolicylabel_cachepolicy_binding(); obj.set_labelname(labelname); cachepolicylabel_cachepolicy_binding response[] = (cachepolicylabel_cachepolicy_b...
java
public static base_response add(nitro_service client, sslcrl resource) throws Exception { sslcrl addresource = new sslcrl(); addresource.crlname = resource.crlname; addresource.crlpath = resource.crlpath; addresource.inform = resource.inform; addresource.refresh = resource.refresh; addresource.cacert = reso...
java
public static base_responses add(nitro_service client, sslcrl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslcrl addresources[] = new sslcrl[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new sslcrl(); addre...
java
public static base_response create(nitro_service client, sslcrl resource) throws Exception { sslcrl createresource = new sslcrl(); createresource.cacertfile = resource.cacertfile; createresource.cakeyfile = resource.cakeyfile; createresource.indexfile = resource.indexfile; createresource.revoke = resource.rev...
java
public static base_responses create(nitro_service client, sslcrl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslcrl createresources[] = new sslcrl[resources.length]; for (int i=0;i<resources.length;i++){ createresources[i] = new sslcrl(); ...
java
public static base_response delete(nitro_service client, String crlname) throws Exception { sslcrl deleteresource = new sslcrl(); deleteresource.crlname = crlname; return deleteresource.delete_resource(client); }
java
public static base_responses delete(nitro_service client, String crlname[]) throws Exception { base_responses result = null; if (crlname != null && crlname.length > 0) { sslcrl deleteresources[] = new sslcrl[crlname.length]; for (int i=0;i<crlname.length;i++){ deleteresources[i] = new sslcrl(); delete...
java
public static base_response update(nitro_service client, sslcrl resource) throws Exception { sslcrl updateresource = new sslcrl(); updateresource.crlname = resource.crlname; updateresource.refresh = resource.refresh; updateresource.cacert = resource.cacert; updateresource.server = resource.server; updateres...
java
public static base_responses update(nitro_service client, sslcrl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslcrl updateresources[] = new sslcrl[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new sslcrl(); ...
java
public static base_response unset(nitro_service client, sslcrl resource, String[] args) throws Exception{ sslcrl unsetresource = new sslcrl(); unsetresource.crlname = resource.crlname; return unsetresource.unset_resource(client,args); }
java
public static base_responses unset(nitro_service client, String crlname[], String args[]) throws Exception { base_responses result = null; if (crlname != null && crlname.length > 0) { sslcrl unsetresources[] = new sslcrl[crlname.length]; for (int i=0;i<crlname.length;i++){ unsetresources[i] = new sslcrl()...
java
public static sslcrl[] get(nitro_service service) throws Exception{ sslcrl obj = new sslcrl(); sslcrl[] response = (sslcrl[])obj.get_resources(service); return response; }
java
public static sslcrl get(nitro_service service, String crlname) throws Exception{ sslcrl obj = new sslcrl(); obj.set_crlname(crlname); sslcrl response = (sslcrl) obj.get_resource(service); return response; }
java
public static sslcrl[] get(nitro_service service, String crlname[]) throws Exception{ if (crlname !=null && crlname.length>0) { sslcrl response[] = new sslcrl[crlname.length]; sslcrl obj[] = new sslcrl[crlname.length]; for (int i=0;i<crlname.length;i++) { obj[i] = new sslcrl(); obj[i].set_crlname(crl...
java
public static base_response update(nitro_service client, l3param resource) throws Exception { l3param updateresource = new l3param(); updateresource.srcnat = resource.srcnat; updateresource.icmpgenratethreshold = resource.icmpgenratethreshold; updateresource.overridernat = resource.overridernat; updateresourc...
java
public static base_response unset(nitro_service client, l3param resource, String[] args) throws Exception{ l3param unsetresource = new l3param(); return unsetresource.unset_resource(client,args); }
java
public static l3param get(nitro_service service) throws Exception{ l3param obj = new l3param(); l3param[] response = (l3param[])obj.get_resources(service); return response[0]; }
java
public static responderpolicy_responderpolicylabel_binding[] get(nitro_service service, String name) throws Exception{ responderpolicy_responderpolicylabel_binding obj = new responderpolicy_responderpolicylabel_binding(); obj.set_name(name); responderpolicy_responderpolicylabel_binding response[] = (responderpoli...
java
public static appflowpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ appflowpolicy_lbvserver_binding obj = new appflowpolicy_lbvserver_binding(); obj.set_name(name); appflowpolicy_lbvserver_binding response[] = (appflowpolicy_lbvserver_binding[]) obj.get_resources(service); ...
java
public static base_response enable(nitro_service client) throws Exception { ntpsync enableresource = new ntpsync(); return enableresource.perform_operation(client,"enable"); }
java
public static base_response disable(nitro_service client) throws Exception { ntpsync disableresource = new ntpsync(); return disableresource.perform_operation(client,"disable"); }
java
public static ntpsync get(nitro_service service) throws Exception{ ntpsync obj = new ntpsync(); ntpsync[] response = (ntpsync[])obj.get_resources(service); return response[0]; }
java
public static vlan_stats[] get(nitro_service service) throws Exception{ vlan_stats obj = new vlan_stats(); vlan_stats[] response = (vlan_stats[])obj.stat_resources(service); return response; }
java
public static vlan_stats get(nitro_service service, Long id) throws Exception{ vlan_stats obj = new vlan_stats(); obj.set_id(id); vlan_stats response = (vlan_stats) obj.stat_resource(service); return response; }
java
protected static void checkRangeFromTo(int from, int to, int theSize) { if (to==from-1) return; if (from<0 || from>to || to>=theSize) throw new IndexOutOfBoundsException("from: "+from+", to: "+to+", size="+theSize); }
java
public static lbvserver_authorizationpolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_authorizationpolicy_binding obj = new lbvserver_authorizationpolicy_binding(); obj.set_name(name); lbvserver_authorizationpolicy_binding response[] = (lbvserver_authorizationpolicy_binding[]) ...
java
public static base_response add(nitro_service client, vpntrafficaction resource) throws Exception { vpntrafficaction addresource = new vpntrafficaction(); addresource.name = resource.name; addresource.qual = resource.qual; addresource.apptimeout = resource.apptimeout; addresource.sso = resource.sso; addreso...
java
public static base_responses add(nitro_service client, vpntrafficaction resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpntrafficaction addresources[] = new vpntrafficaction[resources.length]; for (int i=0;i<resources.length;i++){ addresource...
java
public static base_response update(nitro_service client, vpntrafficaction resource) throws Exception { vpntrafficaction updateresource = new vpntrafficaction(); updateresource.name = resource.name; updateresource.apptimeout = resource.apptimeout; updateresource.sso = resource.sso; updateresource.formssoaction...
java
public static base_responses update(nitro_service client, vpntrafficaction resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpntrafficaction updateresources[] = new vpntrafficaction[resources.length]; for (int i=0;i<resources.length;i++){ updat...
java
public static vpntrafficaction[] get(nitro_service service) throws Exception{ vpntrafficaction obj = new vpntrafficaction(); vpntrafficaction[] response = (vpntrafficaction[])obj.get_resources(service); return response; }
java
public static vpntrafficaction get(nitro_service service, String name) throws Exception{ vpntrafficaction obj = new vpntrafficaction(); obj.set_name(name); vpntrafficaction response = (vpntrafficaction) obj.get_resource(service); return response; }
java
public static tmtrafficpolicy[] get(nitro_service service, options option) throws Exception{ tmtrafficpolicy obj = new tmtrafficpolicy(); tmtrafficpolicy[] response = (tmtrafficpolicy[])obj.get_resources(service,option); return response; }
java
public static tmtrafficpolicy get(nitro_service service, String name) throws Exception{ tmtrafficpolicy obj = new tmtrafficpolicy(); obj.set_name(name); tmtrafficpolicy response = (tmtrafficpolicy) obj.get_resource(service); return response; }
java
public static aaagroup_tmsessionpolicy_binding[] get(nitro_service service, String groupname) throws Exception{ aaagroup_tmsessionpolicy_binding obj = new aaagroup_tmsessionpolicy_binding(); obj.set_groupname(groupname); aaagroup_tmsessionpolicy_binding response[] = (aaagroup_tmsessionpolicy_binding[]) obj.get_re...
java
public static sslcrl_binding get(nitro_service service, String crlname) throws Exception{ sslcrl_binding obj = new sslcrl_binding(); obj.set_crlname(crlname); sslcrl_binding response = (sslcrl_binding) obj.get_resource(service); return response; }
java