_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q10100 | authenticationvserver_stats.get | train | public static authenticationvserver_stats get(nitro_service service, String name) throws Exception{
authenticationvserver_stats obj = new authenticationvserver_stats();
obj.set_name(name);
authenticationvserver_stats response = (authenticationvserver_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q10101 | vrid_nsip6_binding.get | train | public static vrid_nsip6_binding[] get(nitro_service service, Long id) throws Exception{
vrid_nsip6_binding obj = new vrid_nsip6_binding();
obj.set_id(id);
vrid_nsip6_binding response[] = (vrid_nsip6_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10102 | servicegroup_stats.get | train | public static servicegroup_stats[] get(nitro_service service, options option) throws Exception{
servicegroup_stats obj = new servicegroup_stats();
servicegroup_stats[] response = (servicegroup_stats[])obj.stat_resources(service,option);
return response;
} | java | {
"resource": ""
} |
q10103 | servicegroup_stats.get | train | public static servicegroup_stats get(nitro_service service, String servicegroupname) throws Exception{
servicegroup_stats obj = new servicegroup_stats();
obj.set_servicegroupname(servicegroupname);
servicegroup_stats response = (servicegroup_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q10104 | clusterinstance_binding.get | train | public static clusterinstance_binding get(nitro_service service, Long clid) throws Exception{
clusterinstance_binding obj = new clusterinstance_binding();
obj.set_clid(clid);
clusterinstance_binding response = (clusterinstance_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10105 | auditmessages.get | train | public static auditmessages[] get(nitro_service service) throws Exception{
auditmessages obj = new auditmessages();
auditmessages[] response = (auditmessages[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10106 | auditmessages.get | train | public static auditmessages[] get(nitro_service service, auditmessages_args args) throws Exception{
auditmessages obj = new auditmessages();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
auditmessages[] response = (auditmessages[])obj.get_resources(service, option);
return response;
} | java | {
"resource": ""
} |
q10107 | cmppolicylabel_policybinding_binding.get | train | public static cmppolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{
cmppolicylabel_policybinding_binding obj = new cmppolicylabel_policybinding_binding();
obj.set_labelname(labelname);
cmppolicylabel_policybinding_binding response[] = (cmppolicylabel_policybinding_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10108 | vpnglobal_appcontroller_binding.get | train | public static vpnglobal_appcontroller_binding[] get(nitro_service service) throws Exception{
vpnglobal_appcontroller_binding obj = new vpnglobal_appcontroller_binding();
vpnglobal_appcontroller_binding response[] = (vpnglobal_appcontroller_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10109 | Clique.valueOfHelper | train | private static Clique valueOfHelper(int[] relativeIndices) {
// if clique already exists, return that one
Clique c = new Clique();
c.relativeIndices = relativeIndices;
return intern(c);
} | java | {
"resource": ""
} |
q10110 | Clique.checkSorted | train | private static void checkSorted(int[] sorted) {
for (int i = 0; i < sorted.length-1; i++) {
if (sorted[i] > sorted[i+1]) {
throw new RuntimeException("input must be sorted!");
}
}
} | java | {
"resource": ""
} |
q10111 | aaapreauthenticationpolicy_aaaglobal_binding.get | train | public static aaapreauthenticationpolicy_aaaglobal_binding[] get(nitro_service service, String name) throws Exception{
aaapreauthenticationpolicy_aaaglobal_binding obj = new aaapreauthenticationpolicy_aaaglobal_binding();
obj.set_name(name);
aaapreauthenticationpolicy_aaaglobal_binding response[] = (aaapreauthenticationpolicy_aaaglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10112 | dbsmonitors.restart | train | public static base_response restart(nitro_service client) throws Exception {
dbsmonitors restartresource = new dbsmonitors();
return restartresource.perform_operation(client,"restart");
} | java | {
"resource": ""
} |
q10113 | wisite_accessmethod_binding.get | train | public static wisite_accessmethod_binding[] get(nitro_service service, String sitepath) throws Exception{
wisite_accessmethod_binding obj = new wisite_accessmethod_binding();
obj.set_sitepath(sitepath);
wisite_accessmethod_binding response[] = (wisite_accessmethod_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10114 | Pair.makePair | train | public static <X, Y> Pair<X, Y> makePair(X x, Y y) {
return new Pair<X, Y>(x, y);
} | java | {
"resource": ""
} |
q10115 | Pair.stringIntern | train | public static Pair<String, String> stringIntern(Pair<String, String> p) {
return new MutableInternedPair(p);
} | java | {
"resource": ""
} |
q10116 | authenticationradiusaction.add | train | public static base_response add(nitro_service client, authenticationradiusaction resource) throws Exception {
authenticationradiusaction addresource = new authenticationradiusaction();
addresource.name = resource.name;
addresource.serverip = resource.serverip;
addresource.serverport = resource.serverport;
addresource.authtimeout = resource.authtimeout;
addresource.radkey = resource.radkey;
addresource.radnasip = resource.radnasip;
addresource.radnasid = resource.radnasid;
addresource.radvendorid = resource.radvendorid;
addresource.radattributetype = resource.radattributetype;
addresource.radgroupsprefix = resource.radgroupsprefix;
addresource.radgroupseparator = resource.radgroupseparator;
addresource.passencoding = resource.passencoding;
addresource.ipvendorid = resource.ipvendorid;
addresource.ipattributetype = resource.ipattributetype;
addresource.accounting = resource.accounting;
addresource.pwdvendorid = resource.pwdvendorid;
addresource.pwdattributetype = resource.pwdattributetype;
addresource.defaultauthenticationgroup = resource.defaultauthenticationgroup;
addresource.callingstationid = resource.callingstationid;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q10117 | authenticationradiusaction.add | train | public static base_responses add(nitro_service client, authenticationradiusaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
authenticationradiusaction addresources[] = new authenticationradiusaction[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new authenticationradiusaction();
addresources[i].name = resources[i].name;
addresources[i].serverip = resources[i].serverip;
addresources[i].serverport = resources[i].serverport;
addresources[i].authtimeout = resources[i].authtimeout;
addresources[i].radkey = resources[i].radkey;
addresources[i].radnasip = resources[i].radnasip;
addresources[i].radnasid = resources[i].radnasid;
addresources[i].radvendorid = resources[i].radvendorid;
addresources[i].radattributetype = resources[i].radattributetype;
addresources[i].radgroupsprefix = resources[i].radgroupsprefix;
addresources[i].radgroupseparator = resources[i].radgroupseparator;
addresources[i].passencoding = resources[i].passencoding;
addresources[i].ipvendorid = resources[i].ipvendorid;
addresources[i].ipattributetype = resources[i].ipattributetype;
addresources[i].accounting = resources[i].accounting;
addresources[i].pwdvendorid = resources[i].pwdvendorid;
addresources[i].pwdattributetype = resources[i].pwdattributetype;
addresources[i].defaultauthenticationgroup = resources[i].defaultauthenticationgroup;
addresources[i].callingstationid = resources[i].callingstationid;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q10118 | authenticationradiusaction.get | train | public static authenticationradiusaction[] get(nitro_service service) throws Exception{
authenticationradiusaction obj = new authenticationradiusaction();
authenticationradiusaction[] response = (authenticationradiusaction[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10119 | authenticationradiusaction.get | train | public static authenticationradiusaction get(nitro_service service, String name) throws Exception{
authenticationradiusaction obj = new authenticationradiusaction();
obj.set_name(name);
authenticationradiusaction response = (authenticationradiusaction) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10120 | authenticationradiusaction.get_filtered | train | public static authenticationradiusaction[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
authenticationradiusaction obj = new authenticationradiusaction();
options option = new options();
option.set_filter(filter);
authenticationradiusaction[] response = (authenticationradiusaction[]) obj.getfiltered(service, option);
return response;
} | java | {
"resource": ""
} |
q10121 | sslcertkey_sslvserver_binding.get | train | public static sslcertkey_sslvserver_binding[] get(nitro_service service, String certkey) throws Exception{
sslcertkey_sslvserver_binding obj = new sslcertkey_sslvserver_binding();
obj.set_certkey(certkey);
sslcertkey_sslvserver_binding response[] = (sslcertkey_sslvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10122 | TNK.getConstraint | train | private double getConstraint(double x1, double x2)
{
double c1,c2,h;
c1 = -x1*x1-x2*x2+1+0.1*Math.cos(16*Math.atan(x1/x2));
c2 = (x1-0.5)*(x1-0.5)+(x2-0.5)*(x2-0.5)-0.5;
if(c1>c2)
h = (c1>0)?c1:0;
else
h = (c2>0)?c2:0;
return h;
} | java | {
"resource": ""
} |
q10123 | lbvserver_stats.get | train | public static lbvserver_stats[] get(nitro_service service) throws Exception{
lbvserver_stats obj = new lbvserver_stats();
lbvserver_stats[] response = (lbvserver_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q10124 | lbvserver_stats.get | train | public static lbvserver_stats get(nitro_service service, String name) throws Exception{
lbvserver_stats obj = new lbvserver_stats();
obj.set_name(name);
lbvserver_stats response = (lbvserver_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q10125 | MtasRBTree.updateMax | train | private void updateMax(MtasRBTreeNode n, MtasRBTreeNode c) {
if (c != null) {
if (n.max < c.max) {
n.max = c.max;
}
}
} | java | {
"resource": ""
} |
q10126 | MtasRBTree.setMax | train | private void setMax(MtasRBTreeNode n) {
n.max = n.right;
if (n.leftChild != null) {
n.max = Math.max(n.max, n.leftChild.max);
}
if (n.rightChild != null) {
n.max = Math.max(n.max, n.rightChild.max);
}
} | java | {
"resource": ""
} |
q10127 | filterhtmlinjectionparameter.update | train | public static base_response update(nitro_service client, filterhtmlinjectionparameter resource) throws Exception {
filterhtmlinjectionparameter updateresource = new filterhtmlinjectionparameter();
updateresource.rate = resource.rate;
updateresource.frequency = resource.frequency;
updateresource.strict = resource.strict;
updateresource.htmlsearchlen = resource.htmlsearchlen;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10128 | filterhtmlinjectionparameter.unset | train | public static base_response unset(nitro_service client, filterhtmlinjectionparameter resource, String[] args) throws Exception{
filterhtmlinjectionparameter unsetresource = new filterhtmlinjectionparameter();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10129 | filterhtmlinjectionparameter.get | train | public static filterhtmlinjectionparameter get(nitro_service service, options option) throws Exception{
filterhtmlinjectionparameter obj = new filterhtmlinjectionparameter();
filterhtmlinjectionparameter[] response = (filterhtmlinjectionparameter[])obj.get_resources(service,option);
return response[0];
} | java | {
"resource": ""
} |
q10130 | aaauser_binding.get | train | public static aaauser_binding get(nitro_service service, String username) throws Exception{
aaauser_binding obj = new aaauser_binding();
obj.set_username(username);
aaauser_binding response = (aaauser_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10131 | sslvserver_sslcertkey_binding.get | train | public static sslvserver_sslcertkey_binding[] get(nitro_service service, String vservername) throws Exception{
sslvserver_sslcertkey_binding obj = new sslvserver_sslcertkey_binding();
obj.set_vservername(vservername);
sslvserver_sslcertkey_binding response[] = (sslvserver_sslcertkey_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10132 | tmsessionparameter.unset | train | public static base_response unset(nitro_service client, tmsessionparameter resource, String[] args) throws Exception{
tmsessionparameter unsetresource = new tmsessionparameter();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10133 | tmsessionparameter.get | train | public static tmsessionparameter get(nitro_service service) throws Exception{
tmsessionparameter obj = new tmsessionparameter();
tmsessionparameter[] response = (tmsessionparameter[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10134 | systemuser.add | train | public static base_response add(nitro_service client, systemuser resource) throws Exception {
systemuser addresource = new systemuser();
addresource.username = resource.username;
addresource.password = resource.password;
addresource.externalauth = resource.externalauth;
addresource.promptstring = resource.promptstring;
addresource.timeout = resource.timeout;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q10135 | systemuser.add | train | public static base_responses add(nitro_service client, systemuser resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
systemuser addresources[] = new systemuser[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new systemuser();
addresources[i].username = resources[i].username;
addresources[i].password = resources[i].password;
addresources[i].externalauth = resources[i].externalauth;
addresources[i].promptstring = resources[i].promptstring;
addresources[i].timeout = resources[i].timeout;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q10136 | systemuser.delete | train | public static base_response delete(nitro_service client, String username) throws Exception {
systemuser deleteresource = new systemuser();
deleteresource.username = username;
return deleteresource.delete_resource(client);
} | java | {
"resource": ""
} |
q10137 | systemuser.update | train | public static base_response update(nitro_service client, systemuser resource) throws Exception {
systemuser updateresource = new systemuser();
updateresource.username = resource.username;
updateresource.password = resource.password;
updateresource.externalauth = resource.externalauth;
updateresource.promptstring = resource.promptstring;
updateresource.timeout = resource.timeout;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10138 | systemuser.update | train | public static base_responses update(nitro_service client, systemuser resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
systemuser updateresources[] = new systemuser[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new systemuser();
updateresources[i].username = resources[i].username;
updateresources[i].password = resources[i].password;
updateresources[i].externalauth = resources[i].externalauth;
updateresources[i].promptstring = resources[i].promptstring;
updateresources[i].timeout = resources[i].timeout;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | {
"resource": ""
} |
q10139 | systemuser.unset | train | public static base_response unset(nitro_service client, systemuser resource, String[] args) throws Exception{
systemuser unsetresource = new systemuser();
unsetresource.username = resource.username;
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10140 | systemuser.unset | train | public static base_responses unset(nitro_service client, String username[], String args[]) throws Exception {
base_responses result = null;
if (username != null && username.length > 0) {
systemuser unsetresources[] = new systemuser[username.length];
for (int i=0;i<username.length;i++){
unsetresources[i] = new systemuser();
unsetresources[i].username = username[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | java | {
"resource": ""
} |
q10141 | systemuser.get | train | public static systemuser[] get(nitro_service service) throws Exception{
systemuser obj = new systemuser();
systemuser[] response = (systemuser[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10142 | systemuser.get | train | public static systemuser get(nitro_service service, String username) throws Exception{
systemuser obj = new systemuser();
obj.set_username(username);
systemuser response = (systemuser) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10143 | service_stats.get | train | public static service_stats[] get(nitro_service service) throws Exception{
service_stats obj = new service_stats();
service_stats[] response = (service_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q10144 | service_stats.get | train | public static service_stats get(nitro_service service, String name) throws Exception{
service_stats obj = new service_stats();
obj.set_name(name);
service_stats response = (service_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q10145 | inatparam.update | train | public static base_response update(nitro_service client, inatparam resource) throws Exception {
inatparam updateresource = new inatparam();
updateresource.nat46v6prefix = resource.nat46v6prefix;
updateresource.nat46ignoretos = resource.nat46ignoretos;
updateresource.nat46zerochecksum = resource.nat46zerochecksum;
updateresource.nat46v6mtu = resource.nat46v6mtu;
updateresource.nat46fragheader = resource.nat46fragheader;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10146 | inatparam.unset | train | public static base_response unset(nitro_service client, inatparam resource, String[] args) throws Exception{
inatparam unsetresource = new inatparam();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10147 | inatparam.get | train | public static inatparam get(nitro_service service) throws Exception{
inatparam obj = new inatparam();
inatparam[] response = (inatparam[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10148 | FloatFactorTable.conditionalLogProb | train | public float conditionalLogProb(int[] given, int of) {
if (given.length != windowSize - 1) {
System.err.println("error computing conditional log prob");
System.exit(0);
}
int[] label = indicesFront(given);
float[] masses = new float[label.length];
for (int i = 0; i < masses.length; i++) {
masses[i] = table[label[i]];
}
float z = ArrayMath.logSum(masses);
return table[indexOf(given, of)] - z;
} | java | {
"resource": ""
} |
q10149 | aaaparameter.update | train | public static base_response update(nitro_service client, aaaparameter resource) throws Exception {
aaaparameter updateresource = new aaaparameter();
updateresource.enablestaticpagecaching = resource.enablestaticpagecaching;
updateresource.enableenhancedauthfeedback = resource.enableenhancedauthfeedback;
updateresource.defaultauthtype = resource.defaultauthtype;
updateresource.maxaaausers = resource.maxaaausers;
updateresource.maxloginattempts = resource.maxloginattempts;
updateresource.failedlogintimeout = resource.failedlogintimeout;
updateresource.aaadnatip = resource.aaadnatip;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10150 | aaaparameter.unset | train | public static base_response unset(nitro_service client, aaaparameter resource, String[] args) throws Exception{
aaaparameter unsetresource = new aaaparameter();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10151 | aaaparameter.get | train | public static aaaparameter get(nitro_service service) throws Exception{
aaaparameter obj = new aaaparameter();
aaaparameter[] response = (aaaparameter[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10152 | gslbvserver_spilloverpolicy_binding.get | train | public static gslbvserver_spilloverpolicy_binding[] get(nitro_service service, String name) throws Exception{
gslbvserver_spilloverpolicy_binding obj = new gslbvserver_spilloverpolicy_binding();
obj.set_name(name);
gslbvserver_spilloverpolicy_binding response[] = (gslbvserver_spilloverpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10153 | MtasCQLParserSentencePartCondition.setFirstOccurence | train | public void setFirstOccurence(int min, int max) throws ParseException {
if (fullCondition == null) {
if ((min < 0) || (min > max) || (max < 1)) {
throw new ParseException("Illegal number {" + min + "," + max + "}");
}
if (min == 0) {
firstOptional = true;
}
firstMinimumOccurence = Math.max(1, min);
firstMaximumOccurence = max;
} else {
throw new ParseException("fullCondition already generated");
}
} | java | {
"resource": ""
} |
q10154 | MtasCQLParserSentencePartCondition.createFullSentence | train | public MtasCQLParserSentenceCondition createFullSentence()
throws ParseException {
if (fullCondition == null) {
if (secondSentencePart == null) {
if (firstBasicSentence != null) {
fullCondition = new MtasCQLParserSentenceCondition(firstBasicSentence,
ignoreClause, maximumIgnoreLength);
} else {
fullCondition = firstSentence;
}
fullCondition.setOccurence(firstMinimumOccurence,
firstMaximumOccurence);
if (firstOptional) {
fullCondition.setOptional(firstOptional);
}
return fullCondition;
} else {
if (!orOperator) {
if (firstBasicSentence != null) {
firstBasicSentence.setOccurence(firstMinimumOccurence,
firstMaximumOccurence);
firstBasicSentence.setOptional(firstOptional);
fullCondition = new MtasCQLParserSentenceCondition(
firstBasicSentence, ignoreClause, maximumIgnoreLength);
} else {
firstSentence.setOccurence(firstMinimumOccurence,
firstMaximumOccurence);
firstSentence.setOptional(firstOptional);
fullCondition = new MtasCQLParserSentenceCondition(firstSentence,
ignoreClause, maximumIgnoreLength);
}
fullCondition.addSentenceToEndLatestSequence(
secondSentencePart.createFullSentence());
} else {
MtasCQLParserSentenceCondition sentence = secondSentencePart
.createFullSentence();
if (firstBasicSentence != null) {
sentence.addSentenceAsFirstOption(
new MtasCQLParserSentenceCondition(firstBasicSentence,
ignoreClause, maximumIgnoreLength));
} else {
sentence.addSentenceAsFirstOption(firstSentence);
}
fullCondition = sentence;
}
return fullCondition;
}
} else {
return fullCondition;
}
} | java | {
"resource": ""
} |
q10155 | vserver.update | train | public static base_response update(nitro_service client, vserver resource) throws Exception {
vserver updateresource = new vserver();
updateresource.name = resource.name;
updateresource.backupvserver = resource.backupvserver;
updateresource.redirecturl = resource.redirecturl;
updateresource.cacheable = resource.cacheable;
updateresource.clttimeout = resource.clttimeout;
updateresource.somethod = resource.somethod;
updateresource.sopersistence = resource.sopersistence;
updateresource.sopersistencetimeout = resource.sopersistencetimeout;
updateresource.sothreshold = resource.sothreshold;
updateresource.pushvserver = resource.pushvserver;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10156 | vserver.disable | train | public static base_response disable(nitro_service client, String name) throws Exception {
vserver disableresource = new vserver();
disableresource.name = name;
return disableresource.perform_operation(client,"disable");
} | java | {
"resource": ""
} |
q10157 | systemcollectionparam.update | train | public static base_response update(nitro_service client, systemcollectionparam resource) throws Exception {
systemcollectionparam updateresource = new systemcollectionparam();
updateresource.communityname = resource.communityname;
updateresource.loglevel = resource.loglevel;
updateresource.datapath = resource.datapath;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10158 | systemcollectionparam.unset | train | public static base_response unset(nitro_service client, systemcollectionparam resource, String[] args) throws Exception{
systemcollectionparam unsetresource = new systemcollectionparam();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10159 | systemcollectionparam.get | train | public static systemcollectionparam get(nitro_service service) throws Exception{
systemcollectionparam obj = new systemcollectionparam();
systemcollectionparam[] response = (systemcollectionparam[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10160 | gslbconfig.sync | train | public static base_response sync(nitro_service client, gslbconfig resource) throws Exception {
gslbconfig syncresource = new gslbconfig();
syncresource.preview = resource.preview;
syncresource.debug = resource.debug;
syncresource.forcesync = resource.forcesync;
syncresource.nowarn = resource.nowarn;
syncresource.saveconfig = resource.saveconfig;
syncresource.command = resource.command;
return syncresource.perform_operation(client,"sync");
} | java | {
"resource": ""
} |
q10161 | WordShapeClassifier.lookupShaper | train | public static int lookupShaper(String name) {
if (name == null) {
return NOWORDSHAPE;
} else if (name.equalsIgnoreCase("dan1")) {
return WORDSHAPEDAN1;
} else if (name.equalsIgnoreCase("chris1")) {
return WORDSHAPECHRIS1;
} else if (name.equalsIgnoreCase("dan2")) {
return WORDSHAPEDAN2;
} else if (name.equalsIgnoreCase("dan2useLC")) {
return WORDSHAPEDAN2USELC;
} else if (name.equalsIgnoreCase("dan2bio")) {
return WORDSHAPEDAN2BIO;
} else if (name.equalsIgnoreCase("dan2bioUseLC")) {
return WORDSHAPEDAN2BIOUSELC;
} else if (name.equalsIgnoreCase("jenny1")) {
return WORDSHAPEJENNY1;
} else if (name.equalsIgnoreCase("jenny1useLC")) {
return WORDSHAPEJENNY1USELC;
} else if (name.equalsIgnoreCase("chris2")) {
return WORDSHAPECHRIS2;
} else if (name.equalsIgnoreCase("chris2useLC")) {
return WORDSHAPECHRIS2USELC;
} else if (name.equalsIgnoreCase("chris3")) {
return WORDSHAPECHRIS3;
} else if (name.equalsIgnoreCase("chris3useLC")) {
return WORDSHAPECHRIS3USELC;
} else if (name.equalsIgnoreCase("chris4")) {
return WORDSHAPECHRIS4;
} else if (name.equalsIgnoreCase("digits")) {
return WORDSHAPEDIGITS;
} else {
return NOWORDSHAPE;
}
} | java | {
"resource": ""
} |
q10162 | WordShapeClassifier.wordShape | train | public static String wordShape(String inStr, int wordShaper, Collection<String> knownLCWords) {
// this first bit is for backwards compatibility with how things were first
// implemented, where the word shaper name encodes whether to useLC.
// If the shaper is in the old compatibility list, then a specified
// list of knownLCwords is ignored
if (knownLCWords != null && dontUseLC(wordShaper)) {
knownLCWords = null;
}
switch (wordShaper) {
case NOWORDSHAPE:
return inStr;
case WORDSHAPEDAN1:
return wordShapeDan1(inStr);
case WORDSHAPECHRIS1:
return wordShapeChris1(inStr);
case WORDSHAPEDAN2:
return wordShapeDan2(inStr, knownLCWords);
case WORDSHAPEDAN2USELC:
return wordShapeDan2(inStr, knownLCWords);
case WORDSHAPEDAN2BIO:
return wordShapeDan2Bio(inStr, knownLCWords);
case WORDSHAPEDAN2BIOUSELC:
return wordShapeDan2Bio(inStr, knownLCWords);
case WORDSHAPEJENNY1:
return wordShapeJenny1(inStr, knownLCWords);
case WORDSHAPEJENNY1USELC:
return wordShapeJenny1(inStr, knownLCWords);
case WORDSHAPECHRIS2:
return wordShapeChris2(inStr, false, knownLCWords);
case WORDSHAPECHRIS2USELC:
return wordShapeChris2(inStr, false, knownLCWords);
case WORDSHAPECHRIS3:
return wordShapeChris2(inStr, true, knownLCWords);
case WORDSHAPECHRIS3USELC:
return wordShapeChris2(inStr, true, knownLCWords);
case WORDSHAPECHRIS4:
return wordShapeChris4(inStr, false, knownLCWords);
case WORDSHAPEDIGITS:
return wordShapeDigits(inStr);
default:
throw new IllegalStateException("Bad WordShapeClassifier");
}
} | java | {
"resource": ""
} |
q10163 | WordShapeClassifier.wordShapeDan1 | train | private static String wordShapeDan1(String s) {
boolean digit = true;
boolean upper = true;
boolean lower = true;
boolean mixed = true;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (!Character.isDigit(c)) {
digit = false;
}
if (!Character.isLowerCase(c)) {
lower = false;
}
if (!Character.isUpperCase(c)) {
upper = false;
}
if ((i == 0 && !Character.isUpperCase(c)) || (i >= 1 && !Character.isLowerCase(c))) {
mixed = false;
}
}
if (digit) {
return "ALL-DIGITS";
}
if (upper) {
return "ALL-UPPER";
}
if (lower) {
return "ALL-LOWER";
}
if (mixed) {
return "MIXED-CASE";
}
return "OTHER";
} | java | {
"resource": ""
} |
q10164 | WordShapeClassifier.wordShapeChris2Long | train | private static String wordShapeChris2Long(String s, boolean omitIfInBoundary, int len, Collection<String> knownLCWords) {
final char[] beginChars = new char[BOUNDARY_SIZE];
final char[] endChars = new char[BOUNDARY_SIZE];
int beginUpto = 0;
int endUpto = 0;
final Set<Character> seenSet = new TreeSet<Character>(); // TreeSet guarantees stable ordering; has no size parameter
boolean nonLetters = false;
for (int i = 0; i < len; i++) {
int iIncr = 0;
char c = s.charAt(i);
char m = c;
if (Character.isDigit(c)) {
m = 'd';
} else if (Character.isLowerCase(c)) {
m = 'x';
} else if (Character.isUpperCase(c) || Character.isTitleCase(c)) {
m = 'X';
}
for (String gr : greek) {
if (s.startsWith(gr, i)) {
m = 'g';
//System.out.println(s + " :: " + s.substring(i+1));
iIncr = gr.length() - 1;
break;
}
}
if (m != 'x' && m != 'X') {
nonLetters = true;
}
if (i < BOUNDARY_SIZE) {
beginChars[beginUpto++] = m;
} else if (i < len - BOUNDARY_SIZE) {
seenSet.add(Character.valueOf(m));
} else {
endChars[endUpto++] = m;
}
i += iIncr;
// System.out.println("Position skips to " + i);
}
// Calculate size. This may be an upperbound, but is often correct
int sbSize = beginUpto + endUpto + seenSet.size();
if (knownLCWords != null) { sbSize++; }
final StringBuilder sb = new StringBuilder(sbSize);
// put in the beginning chars
sb.append(beginChars, 0, beginUpto);
// put in the stored ones sorted
if (omitIfInBoundary) {
for (Character chr : seenSet) {
char ch = chr.charValue();
boolean insert = true;
for (int i = 0; i < beginUpto; i++) {
if (beginChars[i] == ch) {
insert = false;
break;
}
}
for (int i = 0; i < endUpto; i++) {
if (endChars[i] == ch) {
insert = false;
break;
}
}
if (insert) {
sb.append(ch);
}
}
} else {
for (Character chr : seenSet) {
sb.append(chr.charValue());
}
}
// and add end ones
sb.append(endChars, 0, endUpto);
if (knownLCWords != null) {
if (!nonLetters && knownLCWords.contains(s.toLowerCase())) {
sb.append('k');
}
}
// System.out.println(s + " became " + sb);
return sb.toString();
} | java | {
"resource": ""
} |
q10165 | WordShapeClassifier.wordShapeChris4 | train | private static String wordShapeChris4(String s, boolean omitIfInBoundary, Collection<String> knownLCWords) {
int len = s.length();
if (len <= BOUNDARY_SIZE * 2) {
return wordShapeChris4Short(s, len, knownLCWords);
} else {
return wordShapeChris4Long(s, omitIfInBoundary, len, knownLCWords);
}
} | java | {
"resource": ""
} |
q10166 | WordShapeClassifier.wordShapeDan2Bio | train | private static String wordShapeDan2Bio(String s, Collection<String> knownLCWords) {
if (containsGreekLetter(s)) {
return wordShapeDan2(s, knownLCWords) + "-GREEK";
} else {
return wordShapeDan2(s, knownLCWords);
}
} | java | {
"resource": ""
} |
q10167 | WordShapeClassifier.containsGreekLetter | train | private static boolean containsGreekLetter(String s) {
Matcher m = biogreek.matcher(s);
return m.find();
} | java | {
"resource": ""
} |
q10168 | WordShapeClassifier.wordShapeDigits | train | private static String wordShapeDigits(final String s) {
char[] outChars = null;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (Character.isDigit(c)) {
if (outChars == null) {
outChars = s.toCharArray();
}
outChars[i] = '9';
}
}
if (outChars == null) {
// no digit found
return s;
} else {
return new String(outChars);
}
} | java | {
"resource": ""
} |
q10169 | aaagroup_authorizationpolicy_binding.get | train | public static aaagroup_authorizationpolicy_binding[] get(nitro_service service, String groupname) throws Exception{
aaagroup_authorizationpolicy_binding obj = new aaagroup_authorizationpolicy_binding();
obj.set_groupname(groupname);
aaagroup_authorizationpolicy_binding response[] = (aaagroup_authorizationpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10170 | cachepolicylabel_policybinding_binding.get | train | public static cachepolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{
cachepolicylabel_policybinding_binding obj = new cachepolicylabel_policybinding_binding();
obj.set_labelname(labelname);
cachepolicylabel_policybinding_binding response[] = (cachepolicylabel_policybinding_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10171 | csvserver_copolicy_binding.get | train | public static csvserver_copolicy_binding[] get(nitro_service service, String name) throws Exception{
csvserver_copolicy_binding obj = new csvserver_copolicy_binding();
obj.set_name(name);
csvserver_copolicy_binding response[] = (csvserver_copolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10172 | ipseccounters_stats.get | train | public static ipseccounters_stats get(nitro_service service) throws Exception{
ipseccounters_stats obj = new ipseccounters_stats();
ipseccounters_stats[] response = (ipseccounters_stats[])obj.stat_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10173 | RedwoodConfiguration.clear | train | public RedwoodConfiguration clear(){
tasks = new LinkedList<Runnable>();
tasks.add(new Runnable(){ public void run(){
Redwood.clearHandlers();
Redwood.restoreSystemStreams();
Redwood.clearLoggingClasses();
} });
return this;
} | java | {
"resource": ""
} |
q10174 | RedwoodConfiguration.stdout | train | public RedwoodConfiguration stdout(){
LogRecordHandler visibility = new VisibilityHandler();
LogRecordHandler console = Redwood.ConsoleHandler.out();
return this
.rootHandler(visibility)
.handler(visibility, console);
} | java | {
"resource": ""
} |
q10175 | RedwoodConfiguration.stderr | train | public RedwoodConfiguration stderr(){
LogRecordHandler visibility = new VisibilityHandler();
LogRecordHandler console = Redwood.ConsoleHandler.err();
return this
.rootHandler(visibility)
.handler(visibility, console);
} | java | {
"resource": ""
} |
q10176 | RedwoodConfiguration.rootHandler | train | public RedwoodConfiguration rootHandler(final LogRecordHandler handler){
tasks.add(new Runnable(){ public void run(){ Redwood.appendHandler(handler); } });
Redwood.appendHandler(handler);
return this;
} | java | {
"resource": ""
} |
q10177 | RedwoodConfiguration.loggingClass | train | public RedwoodConfiguration loggingClass(final String classToIgnoreInTraces){
tasks.add(new Runnable() { public void run() { Redwood.addLoggingClass(classToIgnoreInTraces); } });
return this;
} | java | {
"resource": ""
} |
q10178 | RedwoodConfiguration.loggingClass | train | public RedwoodConfiguration loggingClass(final Class<?> classToIgnoreInTraces){
tasks.add(new Runnable() { public void run() { Redwood.addLoggingClass(classToIgnoreInTraces.getName()); } });
return this;
} | java | {
"resource": ""
} |
q10179 | RedwoodConfiguration.collapseExact | train | public RedwoodConfiguration collapseExact(){
tasks.add(new Runnable() { public void run() { Redwood.spliceHandler(VisibilityHandler.class, new RepeatedRecordHandler(RepeatedRecordHandler.EXACT), OutputHandler.class); } });
return this;
} | java | {
"resource": ""
} |
q10180 | RedwoodConfiguration.captureStdout | train | public RedwoodConfiguration captureStdout(){
tasks.add(new Runnable() { public void run() { Redwood.captureSystemStreams(true, false); } });
return this;
} | java | {
"resource": ""
} |
q10181 | RedwoodConfiguration.neatExit | train | public RedwoodConfiguration neatExit(){
tasks.add(new Runnable() { public void run() {
Runtime.getRuntime().addShutdownHook(new Thread(){
@Override public void run(){ Redwood.stop(); }
});
}});
return this;
} | java | {
"resource": ""
} |
q10182 | RedwoodConfiguration.printChannels | train | public RedwoodConfiguration printChannels(final int width){
tasks.add(new Runnable() { public void run() { Redwood.Util.printChannels(width);} });
return this;
} | java | {
"resource": ""
} |
q10183 | RedwoodConfiguration.hideChannels | train | public RedwoodConfiguration hideChannels(final Object[] channels){
tasks.add(new Runnable() { public void run() { Redwood.hideChannels(channels); } });
return this;
} | java | {
"resource": ""
} |
q10184 | RedwoodConfiguration.showOnlyChannels | train | public RedwoodConfiguration showOnlyChannels(final Object[] channels){
tasks.add(new Runnable() { public void run() { Redwood.showOnlyChannels(channels); } });
return this;
} | java | {
"resource": ""
} |
q10185 | RedwoodConfiguration.get | train | private static String get(Properties p, String key, String defaultValue, Set<String> used){
String rtn = p.getProperty(key, defaultValue);
used.add(key);
return rtn;
} | java | {
"resource": ""
} |
q10186 | vpnglobal_auditnslogpolicy_binding.get | train | public static vpnglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_auditnslogpolicy_binding obj = new vpnglobal_auditnslogpolicy_binding();
vpnglobal_auditnslogpolicy_binding response[] = (vpnglobal_auditnslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10187 | vpnglobal_auditnslogpolicy_binding.get_filtered | train | public static vpnglobal_auditnslogpolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
vpnglobal_auditnslogpolicy_binding obj = new vpnglobal_auditnslogpolicy_binding();
options option = new options();
option.set_filter(filter);
vpnglobal_auditnslogpolicy_binding[] response = (vpnglobal_auditnslogpolicy_binding[]) obj.getfiltered(service, option);
return response;
} | java | {
"resource": ""
} |
q10188 | filterpolicy_csvserver_binding.get | train | public static filterpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
filterpolicy_csvserver_binding obj = new filterpolicy_csvserver_binding();
obj.set_name(name);
filterpolicy_csvserver_binding response[] = (filterpolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10189 | EnglishGrammaticalStructure.isConjWithNoPrep | train | private static boolean isConjWithNoPrep(TreeGraphNode node, Collection<TypedDependency> list) {
for (TypedDependency td : list) {
if (td.gov() == node && td.reln() == CONJUNCT) {
// we have a conjunct
// check the POS of the dependent
String tdDepPOS = td.dep().parent().value();
if (!(tdDepPOS.equals("IN") || tdDepPOS.equals("TO"))) {
return true;
}
}
}
return false;
} | java | {
"resource": ""
} |
q10190 | appfwglobal_auditnslogpolicy_binding.get | train | public static appfwglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{
appfwglobal_auditnslogpolicy_binding obj = new appfwglobal_auditnslogpolicy_binding();
appfwglobal_auditnslogpolicy_binding response[] = (appfwglobal_auditnslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10191 | lbsipparameters.update | train | public static base_response update(nitro_service client, lbsipparameters resource) throws Exception {
lbsipparameters updateresource = new lbsipparameters();
updateresource.rnatsrcport = resource.rnatsrcport;
updateresource.rnatdstport = resource.rnatdstport;
updateresource.retrydur = resource.retrydur;
updateresource.addrportvip = resource.addrportvip;
updateresource.sip503ratethreshold = resource.sip503ratethreshold;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10192 | lbsipparameters.unset | train | public static base_response unset(nitro_service client, lbsipparameters resource, String[] args) throws Exception{
lbsipparameters unsetresource = new lbsipparameters();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10193 | lbsipparameters.get | train | public static lbsipparameters get(nitro_service service) throws Exception{
lbsipparameters obj = new lbsipparameters();
lbsipparameters[] response = (lbsipparameters[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10194 | appfwjsoncontenttype.add | train | public static base_response add(nitro_service client, appfwjsoncontenttype resource) throws Exception {
appfwjsoncontenttype addresource = new appfwjsoncontenttype();
addresource.jsoncontenttypevalue = resource.jsoncontenttypevalue;
addresource.isregex = resource.isregex;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q10195 | appfwjsoncontenttype.add | train | public static base_responses add(nitro_service client, appfwjsoncontenttype resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
appfwjsoncontenttype addresources[] = new appfwjsoncontenttype[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new appfwjsoncontenttype();
addresources[i].jsoncontenttypevalue = resources[i].jsoncontenttypevalue;
addresources[i].isregex = resources[i].isregex;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q10196 | appfwjsoncontenttype.delete | train | public static base_response delete(nitro_service client, String jsoncontenttypevalue) throws Exception {
appfwjsoncontenttype deleteresource = new appfwjsoncontenttype();
deleteresource.jsoncontenttypevalue = jsoncontenttypevalue;
return deleteresource.delete_resource(client);
} | java | {
"resource": ""
} |
q10197 | appfwjsoncontenttype.delete | train | public static base_responses delete(nitro_service client, String jsoncontenttypevalue[]) throws Exception {
base_responses result = null;
if (jsoncontenttypevalue != null && jsoncontenttypevalue.length > 0) {
appfwjsoncontenttype deleteresources[] = new appfwjsoncontenttype[jsoncontenttypevalue.length];
for (int i=0;i<jsoncontenttypevalue.length;i++){
deleteresources[i] = new appfwjsoncontenttype();
deleteresources[i].jsoncontenttypevalue = jsoncontenttypevalue[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java | {
"resource": ""
} |
q10198 | appfwjsoncontenttype.get | train | public static appfwjsoncontenttype[] get(nitro_service service, options option) throws Exception{
appfwjsoncontenttype obj = new appfwjsoncontenttype();
appfwjsoncontenttype[] response = (appfwjsoncontenttype[])obj.get_resources(service,option);
return response;
} | java | {
"resource": ""
} |
q10199 | appfwjsoncontenttype.get | train | public static appfwjsoncontenttype get(nitro_service service, String jsoncontenttypevalue) throws Exception{
appfwjsoncontenttype obj = new appfwjsoncontenttype();
obj.set_jsoncontenttypevalue(jsoncontenttypevalue);
appfwjsoncontenttype response = (appfwjsoncontenttype) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.