_id
stringlengths
2
7
title
stringlengths
3
140
partition
stringclasses
3 values
text
stringlengths
73
34.1k
language
stringclasses
1 value
meta_information
dict
q12700
dnskey.add
train
public static base_responses add(nitro_service client, dnskey resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnskey addresources[] = new dnskey[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnskey(); addresources[i].keyname = resources[i].keyname; addresources[i].publickey = resources[i].publickey; addresources[i].privatekey = resources[i].privatekey; addresources[i].expires = resources[i].expires; addresources[i].units1 = resources[i].units1; addresources[i].notificationperiod = resources[i].notificationperiod; addresources[i].units2 = resources[i].units2; addresources[i].ttl = resources[i].ttl; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12701
dnskey.create
train
public static base_response create(nitro_service client, dnskey resource) throws Exception { dnskey createresource = new dnskey(); createresource.zonename = resource.zonename; createresource.keytype = resource.keytype; createresource.algorithm = resource.algorithm; createresource.keysize = resource.keysize; createresource.filenameprefix = resource.filenameprefix; return createresource.perform_operation(client,"create"); }
java
{ "resource": "" }
q12702
dnskey.create
train
public static base_responses create(nitro_service client, dnskey resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnskey createresources[] = new dnskey[resources.length]; for (int i=0;i<resources.length;i++){ createresources[i] = new dnskey(); createresources[i].zonename = resources[i].zonename; createresources[i].keytype = resources[i].keytype; createresources[i].algorithm = resources[i].algorithm; createresources[i].keysize = resources[i].keysize; createresources[i].filenameprefix = resources[i].filenameprefix; } result = perform_operation_bulk_request(client, createresources,"create"); } return result; }
java
{ "resource": "" }
q12703
dnskey.update
train
public static base_response update(nitro_service client, dnskey resource) throws Exception { dnskey updateresource = new dnskey(); updateresource.keyname = resource.keyname; updateresource.expires = resource.expires; updateresource.units1 = resource.units1; updateresource.notificationperiod = resource.notificationperiod; updateresource.units2 = resource.units2; updateresource.ttl = resource.ttl; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12704
dnskey.update
train
public static base_responses update(nitro_service client, dnskey resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnskey updateresources[] = new dnskey[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new dnskey(); updateresources[i].keyname = resources[i].keyname; updateresources[i].expires = resources[i].expires; updateresources[i].units1 = resources[i].units1; updateresources[i].notificationperiod = resources[i].notificationperiod; updateresources[i].units2 = resources[i].units2; updateresources[i].ttl = resources[i].ttl; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12705
dnskey.unset
train
public static base_response unset(nitro_service client, dnskey resource, String[] args) throws Exception{ dnskey unsetresource = new dnskey(); unsetresource.keyname = resource.keyname; return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q12706
dnskey.unset
train
public static base_responses unset(nitro_service client, String keyname[], String args[]) throws Exception { base_responses result = null; if (keyname != null && keyname.length > 0) { dnskey unsetresources[] = new dnskey[keyname.length]; for (int i=0;i<keyname.length;i++){ unsetresources[i] = new dnskey(); unsetresources[i].keyname = keyname[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
{ "resource": "" }
q12707
dnskey.delete
train
public static base_response delete(nitro_service client, String keyname) throws Exception { dnskey deleteresource = new dnskey(); deleteresource.keyname = keyname; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q12708
dnskey.delete
train
public static base_responses delete(nitro_service client, dnskey resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnskey deleteresources[] = new dnskey[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new dnskey(); deleteresources[i].keyname = resources[i].keyname; } result = delete_bulk_request(client, deleteresources); } return result; }
java
{ "resource": "" }
q12709
dnskey.get
train
public static dnskey[] get(nitro_service service) throws Exception{ dnskey obj = new dnskey(); dnskey[] response = (dnskey[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12710
dnskey.get
train
public static dnskey get(nitro_service service, String keyname) throws Exception{ dnskey obj = new dnskey(); obj.set_keyname(keyname); dnskey response = (dnskey) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12711
dnskey.get
train
public static dnskey[] get(nitro_service service, String keyname[]) throws Exception{ if (keyname !=null && keyname.length>0) { dnskey response[] = new dnskey[keyname.length]; dnskey obj[] = new dnskey[keyname.length]; for (int i=0;i<keyname.length;i++) { obj[i] = new dnskey(); obj[i].set_keyname(keyname[i]); response[i] = (dnskey) obj[i].get_resource(service); } return response; } return null; }
java
{ "resource": "" }
q12712
systemcmdpolicy.add
train
public static base_response add(nitro_service client, systemcmdpolicy resource) throws Exception { systemcmdpolicy addresource = new systemcmdpolicy(); addresource.policyname = resource.policyname; addresource.action = resource.action; addresource.cmdspec = resource.cmdspec; return addresource.add_resource(client); }
java
{ "resource": "" }
q12713
systemcmdpolicy.add
train
public static base_responses add(nitro_service client, systemcmdpolicy resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { systemcmdpolicy addresources[] = new systemcmdpolicy[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new systemcmdpolicy(); addresources[i].policyname = resources[i].policyname; addresources[i].action = resources[i].action; addresources[i].cmdspec = resources[i].cmdspec; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12714
systemcmdpolicy.update
train
public static base_response update(nitro_service client, systemcmdpolicy resource) throws Exception { systemcmdpolicy updateresource = new systemcmdpolicy(); updateresource.policyname = resource.policyname; updateresource.action = resource.action; updateresource.cmdspec = resource.cmdspec; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12715
systemcmdpolicy.update
train
public static base_responses update(nitro_service client, systemcmdpolicy resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { systemcmdpolicy updateresources[] = new systemcmdpolicy[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new systemcmdpolicy(); updateresources[i].policyname = resources[i].policyname; updateresources[i].action = resources[i].action; updateresources[i].cmdspec = resources[i].cmdspec; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12716
systemcmdpolicy.get
train
public static systemcmdpolicy[] get(nitro_service service) throws Exception{ systemcmdpolicy obj = new systemcmdpolicy(); systemcmdpolicy[] response = (systemcmdpolicy[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12717
systemcmdpolicy.get
train
public static systemcmdpolicy get(nitro_service service, String policyname) throws Exception{ systemcmdpolicy obj = new systemcmdpolicy(); obj.set_policyname(policyname); systemcmdpolicy response = (systemcmdpolicy) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12718
dnsptrrec.add
train
public static base_response add(nitro_service client, dnsptrrec resource) throws Exception { dnsptrrec addresource = new dnsptrrec(); addresource.reversedomain = resource.reversedomain; addresource.domain = resource.domain; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
java
{ "resource": "" }
q12719
dnsptrrec.add
train
public static base_responses add(nitro_service client, dnsptrrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsptrrec addresources[] = new dnsptrrec[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnsptrrec(); addresources[i].reversedomain = resources[i].reversedomain; addresources[i].domain = resources[i].domain; addresources[i].ttl = resources[i].ttl; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12720
dnsptrrec.delete
train
public static base_response delete(nitro_service client, String reversedomain) throws Exception { dnsptrrec deleteresource = new dnsptrrec(); deleteresource.reversedomain = reversedomain; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q12721
dnsptrrec.delete
train
public static base_response delete(nitro_service client, dnsptrrec resource) throws Exception { dnsptrrec deleteresource = new dnsptrrec(); deleteresource.reversedomain = resource.reversedomain; deleteresource.domain = resource.domain; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q12722
dnsptrrec.delete
train
public static base_responses delete(nitro_service client, String reversedomain[]) throws Exception { base_responses result = null; if (reversedomain != null && reversedomain.length > 0) { dnsptrrec deleteresources[] = new dnsptrrec[reversedomain.length]; for (int i=0;i<reversedomain.length;i++){ deleteresources[i] = new dnsptrrec(); deleteresources[i].reversedomain = reversedomain[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
{ "resource": "" }
q12723
dnsptrrec.get
train
public static dnsptrrec[] get(nitro_service service) throws Exception{ dnsptrrec obj = new dnsptrrec(); dnsptrrec[] response = (dnsptrrec[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12724
dnsptrrec.get
train
public static dnsptrrec[] get(nitro_service service, dnsptrrec_args args) throws Exception{ dnsptrrec obj = new dnsptrrec(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); dnsptrrec[] response = (dnsptrrec[])obj.get_resources(service, option); return response; }
java
{ "resource": "" }
q12725
dnsptrrec.get
train
public static dnsptrrec get(nitro_service service, String reversedomain) throws Exception{ dnsptrrec obj = new dnsptrrec(); obj.set_reversedomain(reversedomain); dnsptrrec response = (dnsptrrec) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12726
dnsptrrec.get
train
public static dnsptrrec[] get(nitro_service service, String reversedomain[]) throws Exception{ if (reversedomain !=null && reversedomain.length>0) { dnsptrrec response[] = new dnsptrrec[reversedomain.length]; dnsptrrec obj[] = new dnsptrrec[reversedomain.length]; for (int i=0;i<reversedomain.length;i++) { obj[i] = new dnsptrrec(); obj[i].set_reversedomain(reversedomain[i]); response[i] = (dnsptrrec) obj[i].get_resource(service); } return response; } return null; }
java
{ "resource": "" }
q12727
vpnvserver_vpnintranetapplication_binding.get
train
public static vpnvserver_vpnintranetapplication_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_vpnintranetapplication_binding obj = new vpnvserver_vpnintranetapplication_binding(); obj.set_name(name); vpnvserver_vpnintranetapplication_binding response[] = (vpnvserver_vpnintranetapplication_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12728
cmppolicylabel_binding.get
train
public static cmppolicylabel_binding get(nitro_service service, String labelname) throws Exception{ cmppolicylabel_binding obj = new cmppolicylabel_binding(); obj.set_labelname(labelname); cmppolicylabel_binding response = (cmppolicylabel_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12729
cmppolicylabel_binding.get
train
public static cmppolicylabel_binding[] get(nitro_service service, String labelname[]) throws Exception{ if (labelname !=null && labelname.length>0) { cmppolicylabel_binding response[] = new cmppolicylabel_binding[labelname.length]; cmppolicylabel_binding obj[] = new cmppolicylabel_binding[labelname.length]; for (int i=0;i<labelname.length;i++) { obj[i] = new cmppolicylabel_binding(); obj[i].set_labelname(labelname[i]); response[i] = (cmppolicylabel_binding) obj[i].get_resource(service); } return response; } return null; }
java
{ "resource": "" }
q12730
ResettableReaderIteratorFactory.iterator
train
@Override public Iterator<Reader> iterator() { Collection<Object> newCollection = new ArrayList<Object>(); for (Object o : c) { if (o instanceof Reader) { String name = o.toString()+".tmp"; File tmpFile; try { tmpFile = File.createTempFile(name,""); } catch (Exception e) { throw new RuntimeException(e.getMessage()); } tmpFile.deleteOnExit(); StringUtils.printToFile(tmpFile, IOUtils.slurpReader((Reader)o), false, false, enc); newCollection.add(tmpFile); } else { newCollection.add(o); } } c = newCollection; return new ReaderIterator(); }
java
{ "resource": "" }
q12731
rewritepolicy_lbvserver_binding.get
train
public static rewritepolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ rewritepolicy_lbvserver_binding obj = new rewritepolicy_lbvserver_binding(); obj.set_name(name); rewritepolicy_lbvserver_binding response[] = (rewritepolicy_lbvserver_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12732
lbmonbindings.get
train
public static lbmonbindings get(nitro_service service, String monitorname) throws Exception{ lbmonbindings obj = new lbmonbindings(); obj.set_monitorname(monitorname); lbmonbindings response = (lbmonbindings) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12733
netprofile.add
train
public static base_response add(nitro_service client, netprofile resource) throws Exception { netprofile addresource = new netprofile(); addresource.name = resource.name; addresource.td = resource.td; addresource.srcip = resource.srcip; return addresource.add_resource(client); }
java
{ "resource": "" }
q12734
netprofile.update
train
public static base_response update(nitro_service client, netprofile resource) throws Exception { netprofile updateresource = new netprofile(); updateresource.name = resource.name; updateresource.srcip = resource.srcip; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12735
netprofile.update
train
public static base_responses update(nitro_service client, netprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { netprofile updateresources[] = new netprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new netprofile(); updateresources[i].name = resources[i].name; updateresources[i].srcip = resources[i].srcip; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12736
netprofile.get
train
public static netprofile[] get(nitro_service service, options option) throws Exception{ netprofile obj = new netprofile(); netprofile[] response = (netprofile[])obj.get_resources(service,option); return response; }
java
{ "resource": "" }
q12737
netprofile.get
train
public static netprofile get(nitro_service service, String name) throws Exception{ netprofile obj = new netprofile(); obj.set_name(name); netprofile response = (netprofile) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12738
MtasUpdateRequestProcessorResultReader.forceClose
train
private void forceClose() { if (file != null) { if (file.exists() && file.canWrite() && !file.delete()) { log.debug("couldn't delete " + file.getName()); } file = null; } try { objectInputStream.close(); } catch (IOException e) { log.debug(e); } closed = true; }
java
{ "resource": "" }
q12739
RestRunner.loadAuth
train
private ModuleFields loadAuth(URI relativeURI, String httpMethod) { ModuleFields authFields = new ModuleFields(); for (PipeModule module : modules) { ModuleFields moduleFields = module.loadModule(relativeURI, httpMethod, new byte[] {}); if (!moduleFields.getHeaders().isEmpty()) { for (Pair<String, String> header : moduleFields.getHeaders()) { authFields.addHeader(header.first, header.second); } } if (!moduleFields.getQueryParameters().isEmpty()) { for (Pair<String, String> header : moduleFields.getQueryParameters()) { authFields.addQueryParameter(header.first, header.second); } } } return authFields; }
java
{ "resource": "" }
q12740
appfwxmlerrorpage.get
train
public static appfwxmlerrorpage get(nitro_service service) throws Exception{ appfwxmlerrorpage obj = new appfwxmlerrorpage(); appfwxmlerrorpage[] response = (appfwxmlerrorpage[])obj.get_resources(service); return response[0]; }
java
{ "resource": "" }
q12741
appfwxmlerrorpage.get
train
public static appfwxmlerrorpage get(nitro_service service, String name) throws Exception{ appfwxmlerrorpage obj = new appfwxmlerrorpage(); obj.set_name(name); appfwxmlerrorpage response = (appfwxmlerrorpage) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12742
appfwprofile_fieldformat_binding.get
train
public static appfwprofile_fieldformat_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_fieldformat_binding obj = new appfwprofile_fieldformat_binding(); obj.set_name(name); appfwprofile_fieldformat_binding response[] = (appfwprofile_fieldformat_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12743
nsacls6.clear
train
public static base_response clear(nitro_service client) throws Exception { nsacls6 clearresource = new nsacls6(); return clearresource.perform_operation(client,"clear"); }
java
{ "resource": "" }
q12744
nsacls6.apply
train
public static base_response apply(nitro_service client) throws Exception { nsacls6 applyresource = new nsacls6(); return applyresource.perform_operation(client,"apply"); }
java
{ "resource": "" }
q12745
nsacls6.renumber
train
public static base_response renumber(nitro_service client) throws Exception { nsacls6 renumberresource = new nsacls6(); return renumberresource.perform_operation(client,"renumber"); }
java
{ "resource": "" }
q12746
vpn_stats.get
train
public static vpn_stats get(nitro_service service) throws Exception{ vpn_stats obj = new vpn_stats(); vpn_stats[] response = (vpn_stats[])obj.stat_resources(service); return response[0]; }
java
{ "resource": "" }
q12747
vlan_binding.get
train
public static vlan_binding get(nitro_service service, Long id) throws Exception{ vlan_binding obj = new vlan_binding(); obj.set_id(id); vlan_binding response = (vlan_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12748
ADMath.logSum
train
public static DoubleAD logSum(DoubleAD[] logInputs, int fromIndex, int toIndex) { if (logInputs.length == 0) throw new IllegalArgumentException(); if(fromIndex >= 0 && toIndex < logInputs.length && fromIndex >= toIndex) return new DoubleAD(Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY); int maxIdx = fromIndex; double max = logInputs[fromIndex].getval(); double maxdot = logInputs[fromIndex].getdot(); for (int i = fromIndex+1; i < toIndex; i++) { if (logInputs[i].getval() > max) { maxIdx = i; maxdot = logInputs[i].getdot(); max = logInputs[i].getval(); } } DoubleAD ret = new DoubleAD(); boolean haveTerms = false; double intermediate = 0.0; double intermediateDot = 0.0; double curEXP; double cutoff = max - SloppyMath.LOGTOLERANCE; // we avoid rearranging the array and so test indices each time! for (int i = fromIndex; i < toIndex; i++) { if (i != maxIdx && logInputs[i].getval() > cutoff) { haveTerms = true; curEXP = Math.exp(logInputs[i].getval() - max); intermediate += curEXP; intermediateDot += curEXP*logInputs[i].getdot(); } } if (haveTerms) { ret.setval(max + Math.log(1.0 + intermediate)); ret.setdot((maxdot + intermediateDot)/(1.0 + intermediate)); } else { ret.setval(max); ret.setdot(maxdot); } return ret; }
java
{ "resource": "" }
q12749
sslvserver.update
train
public static base_response update(nitro_service client, sslvserver resource) throws Exception { sslvserver updateresource = new sslvserver(); updateresource.vservername = resource.vservername; updateresource.cleartextport = resource.cleartextport; updateresource.dh = resource.dh; updateresource.dhfile = resource.dhfile; updateresource.dhcount = resource.dhcount; updateresource.ersa = resource.ersa; updateresource.ersacount = resource.ersacount; updateresource.sessreuse = resource.sessreuse; updateresource.sesstimeout = resource.sesstimeout; updateresource.cipherredirect = resource.cipherredirect; updateresource.cipherurl = resource.cipherurl; updateresource.sslv2redirect = resource.sslv2redirect; updateresource.sslv2url = resource.sslv2url; updateresource.clientauth = resource.clientauth; updateresource.clientcert = resource.clientcert; updateresource.sslredirect = resource.sslredirect; updateresource.redirectportrewrite = resource.redirectportrewrite; updateresource.nonfipsciphers = resource.nonfipsciphers; updateresource.ssl2 = resource.ssl2; updateresource.ssl3 = resource.ssl3; updateresource.tls1 = resource.tls1; updateresource.tls11 = resource.tls11; updateresource.tls12 = resource.tls12; updateresource.snienable = resource.snienable; updateresource.pushenctrigger = resource.pushenctrigger; updateresource.sendclosenotify = resource.sendclosenotify; updateresource.dtlsprofilename = resource.dtlsprofilename; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12750
sslvserver.update
train
public static base_responses update(nitro_service client, sslvserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslvserver updateresources[] = new sslvserver[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new sslvserver(); updateresources[i].vservername = resources[i].vservername; updateresources[i].cleartextport = resources[i].cleartextport; updateresources[i].dh = resources[i].dh; updateresources[i].dhfile = resources[i].dhfile; updateresources[i].dhcount = resources[i].dhcount; updateresources[i].ersa = resources[i].ersa; updateresources[i].ersacount = resources[i].ersacount; updateresources[i].sessreuse = resources[i].sessreuse; updateresources[i].sesstimeout = resources[i].sesstimeout; updateresources[i].cipherredirect = resources[i].cipherredirect; updateresources[i].cipherurl = resources[i].cipherurl; updateresources[i].sslv2redirect = resources[i].sslv2redirect; updateresources[i].sslv2url = resources[i].sslv2url; updateresources[i].clientauth = resources[i].clientauth; updateresources[i].clientcert = resources[i].clientcert; updateresources[i].sslredirect = resources[i].sslredirect; updateresources[i].redirectportrewrite = resources[i].redirectportrewrite; updateresources[i].nonfipsciphers = resources[i].nonfipsciphers; updateresources[i].ssl2 = resources[i].ssl2; updateresources[i].ssl3 = resources[i].ssl3; updateresources[i].tls1 = resources[i].tls1; updateresources[i].tls11 = resources[i].tls11; updateresources[i].tls12 = resources[i].tls12; updateresources[i].snienable = resources[i].snienable; updateresources[i].pushenctrigger = resources[i].pushenctrigger; updateresources[i].sendclosenotify = resources[i].sendclosenotify; updateresources[i].dtlsprofilename = resources[i].dtlsprofilename; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12751
sslvserver.unset
train
public static base_response unset(nitro_service client, sslvserver resource, String[] args) throws Exception{ sslvserver unsetresource = new sslvserver(); unsetresource.vservername = resource.vservername; return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q12752
sslvserver.unset
train
public static base_responses unset(nitro_service client, String vservername[], String args[]) throws Exception { base_responses result = null; if (vservername != null && vservername.length > 0) { sslvserver unsetresources[] = new sslvserver[vservername.length]; for (int i=0;i<vservername.length;i++){ unsetresources[i] = new sslvserver(); unsetresources[i].vservername = vservername[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
{ "resource": "" }
q12753
sslvserver.get
train
public static sslvserver[] get(nitro_service service) throws Exception{ sslvserver obj = new sslvserver(); sslvserver[] response = (sslvserver[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12754
sslvserver.get
train
public static sslvserver[] get(nitro_service service, sslvserver_args args) throws Exception{ sslvserver obj = new sslvserver(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); sslvserver[] response = (sslvserver[])obj.get_resources(service, option); return response; }
java
{ "resource": "" }
q12755
sslvserver.get
train
public static sslvserver get(nitro_service service, String vservername) throws Exception{ sslvserver obj = new sslvserver(); obj.set_vservername(vservername); sslvserver response = (sslvserver) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12756
sslvserver.get_filtered
train
public static sslvserver[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ sslvserver obj = new sslvserver(); options option = new options(); option.set_filter(filter); sslvserver[] response = (sslvserver[]) obj.getfiltered(service, option); return response; }
java
{ "resource": "" }
q12757
protocolhttp_stats.get
train
public static protocolhttp_stats get(nitro_service service, options option) throws Exception{ protocolhttp_stats obj = new protocolhttp_stats(); protocolhttp_stats[] response = (protocolhttp_stats[])obj.stat_resources(service,option); return response[0]; }
java
{ "resource": "" }
q12758
dnsnameserver.add
train
public static base_response add(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver addresource = new dnsnameserver(); addresource.ip = resource.ip; addresource.dnsvservername = resource.dnsvservername; addresource.local = resource.local; addresource.state = resource.state; addresource.type = resource.type; return addresource.add_resource(client); }
java
{ "resource": "" }
q12759
dnsnameserver.add
train
public static base_responses add(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver addresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnsnameserver(); addresources[i].ip = resources[i].ip; addresources[i].dnsvservername = resources[i].dnsvservername; addresources[i].local = resources[i].local; addresources[i].state = resources[i].state; addresources[i].type = resources[i].type; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12760
dnsnameserver.delete
train
public static base_response delete(nitro_service client, String ip) throws Exception { dnsnameserver deleteresource = new dnsnameserver(); deleteresource.ip = ip; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q12761
dnsnameserver.delete
train
public static base_response delete(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver deleteresource = new dnsnameserver(); deleteresource.ip = resource.ip; deleteresource.dnsvservername = resource.dnsvservername; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q12762
dnsnameserver.delete
train
public static base_responses delete(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver deleteresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ deleteresources[i] = new dnsnameserver(); deleteresources[i].ip = ip[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
{ "resource": "" }
q12763
dnsnameserver.delete
train
public static base_responses delete(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver deleteresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new dnsnameserver(); deleteresources[i].ip = resources[i].ip; deleteresources[i].dnsvservername = resources[i].dnsvservername; } result = delete_bulk_request(client, deleteresources); } return result; }
java
{ "resource": "" }
q12764
dnsnameserver.enable
train
public static base_response enable(nitro_service client, String ip) throws Exception { dnsnameserver enableresource = new dnsnameserver(); enableresource.ip = ip; return enableresource.perform_operation(client,"enable"); }
java
{ "resource": "" }
q12765
dnsnameserver.enable
train
public static base_response enable(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver enableresource = new dnsnameserver(); enableresource.ip = resource.ip; enableresource.dnsvservername = resource.dnsvservername; return enableresource.perform_operation(client,"enable"); }
java
{ "resource": "" }
q12766
dnsnameserver.enable
train
public static base_responses enable(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver enableresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ enableresources[i] = new dnsnameserver(); enableresources[i].ip = ip[i]; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
java
{ "resource": "" }
q12767
dnsnameserver.enable
train
public static base_responses enable(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver enableresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i] = new dnsnameserver(); enableresources[i].ip = resources[i].ip; enableresources[i].dnsvservername = resources[i].dnsvservername; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
java
{ "resource": "" }
q12768
dnsnameserver.disable
train
public static base_response disable(nitro_service client, String ip) throws Exception { dnsnameserver disableresource = new dnsnameserver(); disableresource.ip = ip; return disableresource.perform_operation(client,"disable"); }
java
{ "resource": "" }
q12769
dnsnameserver.disable
train
public static base_response disable(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver disableresource = new dnsnameserver(); disableresource.ip = resource.ip; disableresource.dnsvservername = resource.dnsvservername; return disableresource.perform_operation(client,"disable"); }
java
{ "resource": "" }
q12770
dnsnameserver.disable
train
public static base_responses disable(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver disableresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ disableresources[i] = new dnsnameserver(); disableresources[i].ip = ip[i]; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
java
{ "resource": "" }
q12771
dnsnameserver.disable
train
public static base_responses disable(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver disableresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ disableresources[i] = new dnsnameserver(); disableresources[i].ip = resources[i].ip; disableresources[i].dnsvservername = resources[i].dnsvservername; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
java
{ "resource": "" }
q12772
dnsnameserver.get
train
public static dnsnameserver[] get(nitro_service service) throws Exception{ dnsnameserver obj = new dnsnameserver(); dnsnameserver[] response = (dnsnameserver[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12773
authenticationnegotiatepolicy_authenticationvserver_binding.get
train
public static authenticationnegotiatepolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationnegotiatepolicy_authenticationvserver_binding obj = new authenticationnegotiatepolicy_authenticationvserver_binding(); obj.set_name(name); authenticationnegotiatepolicy_authenticationvserver_binding response[] = (authenticationnegotiatepolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12774
transformpolicylabel_policybinding_binding.get
train
public static transformpolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{ transformpolicylabel_policybinding_binding obj = new transformpolicylabel_policybinding_binding(); obj.set_labelname(labelname); transformpolicylabel_policybinding_binding response[] = (transformpolicylabel_policybinding_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12775
policyhttpcallout.update
train
public static base_response update(nitro_service client, policyhttpcallout resource) throws Exception { policyhttpcallout updateresource = new policyhttpcallout(); updateresource.name = resource.name; updateresource.ipaddress = resource.ipaddress; updateresource.port = resource.port; updateresource.vserver = resource.vserver; updateresource.returntype = resource.returntype; updateresource.httpmethod = resource.httpmethod; updateresource.hostexpr = resource.hostexpr; updateresource.urlstemexpr = resource.urlstemexpr; updateresource.headers = resource.headers; updateresource.parameters = resource.parameters; updateresource.bodyexpr = resource.bodyexpr; updateresource.fullreqexpr = resource.fullreqexpr; updateresource.scheme = resource.scheme; updateresource.resultexpr = resource.resultexpr; updateresource.cacheforsecs = resource.cacheforsecs; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12776
policyhttpcallout.update
train
public static base_responses update(nitro_service client, policyhttpcallout resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { policyhttpcallout updateresources[] = new policyhttpcallout[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new policyhttpcallout(); updateresources[i].name = resources[i].name; updateresources[i].ipaddress = resources[i].ipaddress; updateresources[i].port = resources[i].port; updateresources[i].vserver = resources[i].vserver; updateresources[i].returntype = resources[i].returntype; updateresources[i].httpmethod = resources[i].httpmethod; updateresources[i].hostexpr = resources[i].hostexpr; updateresources[i].urlstemexpr = resources[i].urlstemexpr; updateresources[i].headers = resources[i].headers; updateresources[i].parameters = resources[i].parameters; updateresources[i].bodyexpr = resources[i].bodyexpr; updateresources[i].fullreqexpr = resources[i].fullreqexpr; updateresources[i].scheme = resources[i].scheme; updateresources[i].resultexpr = resources[i].resultexpr; updateresources[i].cacheforsecs = resources[i].cacheforsecs; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12777
policyhttpcallout.get
train
public static policyhttpcallout[] get(nitro_service service) throws Exception{ policyhttpcallout obj = new policyhttpcallout(); policyhttpcallout[] response = (policyhttpcallout[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12778
policyhttpcallout.get
train
public static policyhttpcallout get(nitro_service service, String name) throws Exception{ policyhttpcallout obj = new policyhttpcallout(); obj.set_name(name); policyhttpcallout response = (policyhttpcallout) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12779
DiskTreebank.loadPath
train
@Override public void loadPath(File path, FileFilter filt) { if(path.exists()) { filePaths.add(path); fileFilters.add(filt); } else { System.err.printf("%s: File/path %s does not exist. Skipping.\n" , this.getClass().getName(), path.getPath()); } }
java
{ "resource": "" }
q12780
dnsview_gslbservice_binding.get
train
public static dnsview_gslbservice_binding[] get(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12781
dnsview_gslbservice_binding.count
train
public static long count(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_count(true); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
java
{ "resource": "" }
q12782
LineIterator.getFactory
train
public static <X> IteratorFromReaderFactory<X> getFactory(Function<String,X> op) { return new LineIteratorFactory<X>(op); }
java
{ "resource": "" }
q12783
vpnclientlessaccessprofile.add
train
public static base_response add(nitro_service client, vpnclientlessaccessprofile resource) throws Exception { vpnclientlessaccessprofile addresource = new vpnclientlessaccessprofile(); addresource.profilename = resource.profilename; return addresource.add_resource(client); }
java
{ "resource": "" }
q12784
vpnclientlessaccessprofile.add
train
public static base_responses add(nitro_service client, vpnclientlessaccessprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile addresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vpnclientlessaccessprofile(); addresources[i].profilename = resources[i].profilename; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12785
vpnclientlessaccessprofile.delete
train
public static base_response delete(nitro_service client, String profilename) throws Exception { vpnclientlessaccessprofile deleteresource = new vpnclientlessaccessprofile(); deleteresource.profilename = profilename; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q12786
vpnclientlessaccessprofile.delete
train
public static base_responses delete(nitro_service client, String profilename[]) throws Exception { base_responses result = null; if (profilename != null && profilename.length > 0) { vpnclientlessaccessprofile deleteresources[] = new vpnclientlessaccessprofile[profilename.length]; for (int i=0;i<profilename.length;i++){ deleteresources[i] = new vpnclientlessaccessprofile(); deleteresources[i].profilename = profilename[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
{ "resource": "" }
q12787
vpnclientlessaccessprofile.update
train
public static base_response update(nitro_service client, vpnclientlessaccessprofile resource) throws Exception { vpnclientlessaccessprofile updateresource = new vpnclientlessaccessprofile(); updateresource.profilename = resource.profilename; updateresource.urlrewritepolicylabel = resource.urlrewritepolicylabel; updateresource.javascriptrewritepolicylabel = resource.javascriptrewritepolicylabel; updateresource.reqhdrrewritepolicylabel = resource.reqhdrrewritepolicylabel; updateresource.reshdrrewritepolicylabel = resource.reshdrrewritepolicylabel; updateresource.regexforfindingurlinjavascript = resource.regexforfindingurlinjavascript; updateresource.regexforfindingurlincss = resource.regexforfindingurlincss; updateresource.regexforfindingurlinxcomponent = resource.regexforfindingurlinxcomponent; updateresource.regexforfindingurlinxml = resource.regexforfindingurlinxml; updateresource.regexforfindingcustomurls = resource.regexforfindingcustomurls; updateresource.clientconsumedcookies = resource.clientconsumedcookies; updateresource.requirepersistentcookie = resource.requirepersistentcookie; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12788
vpnclientlessaccessprofile.update
train
public static base_responses update(nitro_service client, vpnclientlessaccessprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile updateresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new vpnclientlessaccessprofile(); updateresources[i].profilename = resources[i].profilename; updateresources[i].urlrewritepolicylabel = resources[i].urlrewritepolicylabel; updateresources[i].javascriptrewritepolicylabel = resources[i].javascriptrewritepolicylabel; updateresources[i].reqhdrrewritepolicylabel = resources[i].reqhdrrewritepolicylabel; updateresources[i].reshdrrewritepolicylabel = resources[i].reshdrrewritepolicylabel; updateresources[i].regexforfindingurlinjavascript = resources[i].regexforfindingurlinjavascript; updateresources[i].regexforfindingurlincss = resources[i].regexforfindingurlincss; updateresources[i].regexforfindingurlinxcomponent = resources[i].regexforfindingurlinxcomponent; updateresources[i].regexforfindingurlinxml = resources[i].regexforfindingurlinxml; updateresources[i].regexforfindingcustomurls = resources[i].regexforfindingcustomurls; updateresources[i].clientconsumedcookies = resources[i].clientconsumedcookies; updateresources[i].requirepersistentcookie = resources[i].requirepersistentcookie; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12789
vpnclientlessaccessprofile.unset
train
public static base_response unset(nitro_service client, vpnclientlessaccessprofile resource, String[] args) throws Exception{ vpnclientlessaccessprofile unsetresource = new vpnclientlessaccessprofile(); unsetresource.profilename = resource.profilename; return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q12790
vpnclientlessaccessprofile.unset
train
public static base_responses unset(nitro_service client, vpnclientlessaccessprofile resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile unsetresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new vpnclientlessaccessprofile(); unsetresources[i].profilename = resources[i].profilename; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
{ "resource": "" }
q12791
vpnclientlessaccessprofile.get
train
public static vpnclientlessaccessprofile[] get(nitro_service service) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); vpnclientlessaccessprofile[] response = (vpnclientlessaccessprofile[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12792
vpnclientlessaccessprofile.get
train
public static vpnclientlessaccessprofile get(nitro_service service, String profilename) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); obj.set_profilename(profilename); vpnclientlessaccessprofile response = (vpnclientlessaccessprofile) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12793
vpnclientlessaccessprofile.get
train
public static vpnclientlessaccessprofile[] get(nitro_service service, String profilename[]) throws Exception{ if (profilename !=null && profilename.length>0) { vpnclientlessaccessprofile response[] = new vpnclientlessaccessprofile[profilename.length]; vpnclientlessaccessprofile obj[] = new vpnclientlessaccessprofile[profilename.length]; for (int i=0;i<profilename.length;i++) { obj[i] = new vpnclientlessaccessprofile(); obj[i].set_profilename(profilename[i]); response[i] = (vpnclientlessaccessprofile) obj[i].get_resource(service); } return response; } return null; }
java
{ "resource": "" }
q12794
vpnclientlessaccessprofile.get_filtered
train
public static vpnclientlessaccessprofile[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); options option = new options(); option.set_filter(filter); vpnclientlessaccessprofile[] response = (vpnclientlessaccessprofile[]) obj.getfiltered(service, option); return response; }
java
{ "resource": "" }
q12795
MtasSolrMtasResult.getFullKeyList
train
public Set<String> getFullKeyList() throws IOException { if (dataCollector.getCollectorType() .equals(DataCollector.COLLECTOR_TYPE_LIST)) { return dataCollector.getKeyList(); } else { throw new IOException( "only allowed for " + DataCollector.COLLECTOR_TYPE_LIST); } }
java
{ "resource": "" }
q12796
FactorTable.conditionalLogProbGivenPrevious
train
public double conditionalLogProbGivenPrevious(int[] given, int of) { if (given.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbGivenPrevious requires given one less than clique size (" + windowSize + ") but was " + Arrays.toString(given)); } // Note: other similar methods could be optimized like this one, but this is the one the CRF uses.... /* int startIndex = indicesFront(given); int numCellsToSum = SloppyMath.intPow(numClasses, windowSize - given.length); double z = ArrayMath.logSum(table, startIndex, startIndex + numCellsToSum); int i = indexOf(given, of); System.err.printf("startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n", startIndex, numCellsToSum, i, of); */ int startIndex = indicesFront(given); double z = ArrayMath.logSum(table, startIndex, startIndex + numClasses); int i = startIndex + of; // System.err.printf("startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n", startIndex, numClasses, i, of); return table[i] - z; }
java
{ "resource": "" }
q12797
FactorTable.conditionalLogProbsGivenPrevious
train
public double[] conditionalLogProbsGivenPrevious(int[] given) { if (given.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbsGivenPrevious requires given one less than clique size (" + windowSize + ") but was " + Arrays.toString(given)); } double[] result = new double[numClasses]; for (int i = 0; i < numClasses; i++) { int index = indexOf(given, i); result[i] = table[index]; } ArrayMath.logNormalize(result); return result; }
java
{ "resource": "" }
q12798
FactorTable.conditionalLogProbGivenFirst
train
public double conditionalLogProbGivenFirst(int given, int[] of) { if (of.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbGivenFirst requires of one less than clique size (" + windowSize + ") but was " + Arrays.toString(of)); } // compute P(given, of) int[] labels = new int[windowSize]; labels[0] = given; System.arraycopy(of, 0, labels, 1, windowSize - 1); // double probAll = logProb(labels); double probAll = unnormalizedLogProb(labels); // compute P(given) // double probGiven = logProbFront(given); double probGiven = unnormalizedLogProbFront(given); // compute P(given, of) / P(given) return probAll - probGiven; }
java
{ "resource": "" }
q12799
FactorTable.unnormalizedConditionalLogProbGivenFirst
train
public double unnormalizedConditionalLogProbGivenFirst(int given, int[] of) { if (of.length != windowSize - 1) { throw new IllegalArgumentException("unnormalizedConditionalLogProbGivenFirst requires of one less than clique size (" + windowSize + ") but was " + Arrays.toString(of)); } // compute P(given, of) int[] labels = new int[windowSize]; labels[0] = given; System.arraycopy(of, 0, labels, 1, windowSize - 1); // double probAll = logProb(labels); double probAll = unnormalizedLogProb(labels); // compute P(given) // double probGiven = logProbFront(given); // double probGiven = unnormalizedLogProbFront(given); // compute P(given, of) / P(given) // return probAll - probGiven; return probAll; }
java
{ "resource": "" }