_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q11700 | CRFCliqueTree.scoresOf | train | public double[] scoresOf(int[] sequence, int position) {
if (position >= factorTables.length) throw new RuntimeException("Index out of bounds: " + position);
// DecimalFormat nf = new DecimalFormat("#0.000");
// if (position>0 && position<sequence.length-1) System.out.println(position
// + ": asking about " +sequence[position-1] + "(" + sequence[position] +
// ")" + sequence[position+1]);
double[] probThisGivenPrev = new double[numClasses];
double[] probNextGivenThis = new double[numClasses];
// double[] marginal = new double[numClasses]; // for debugging only
// compute prob of this tag given the window-1 previous tags, normalized
// extract the window-1 previous tags, pad left with background if necessary
int prevLength = windowSize - 1;
int[] prev = new int[prevLength + 1]; // leave an extra element for the
// label at this position
int i = 0;
for (; i < prevLength - position; i++) { // will only happen if
// position-prevLength < 0
prev[i] = classIndex.indexOf(backgroundSymbol);
}
for (; i < prevLength; i++) {
prev[i] = sequence[position - prevLength + i];
}
for (int label = 0; label < numClasses; label++) {
prev[prev.length - 1] = label;
probThisGivenPrev[label] = factorTables[position].unnormalizedLogProb(prev);
// marginal[label] = factorTables[position].logProbEnd(label); // remove:
// for debugging only
}
// ArrayMath.logNormalize(probThisGivenPrev);
// compute the prob of the window-1 next tags given this tag
// extract the window-1 next tags
int nextLength = windowSize - 1;
if (position + nextLength >= length()) {
nextLength = length() - position - 1;
}
FactorTable nextFactorTable = factorTables[position + nextLength];
if (nextLength != windowSize - 1) {
for (int j = 0; j < windowSize - 1 - nextLength; j++) {
nextFactorTable = nextFactorTable.sumOutFront();
}
}
if (nextLength == 0) { // we are asking about the prob of no sequence
Arrays.fill(probNextGivenThis, 1.0);
} else {
int[] next = new int[nextLength];
System.arraycopy(sequence, position + 1, next, 0, nextLength);
for (int label = 0; label < numClasses; label++) {
// ask the factor table such that pos is the first position in the
// window
// probNextGivenThis[label] =
// factorTables[position+nextLength].conditionalLogProbGivenFirst(label,
// next);
// probNextGivenThis[label] =
// nextFactorTable.conditionalLogProbGivenFirst(label, next);
probNextGivenThis[label] = nextFactorTable.unnormalizedConditionalLogProbGivenFirst(label, next);
}
}
// pointwise multiply
return ArrayMath.pairwiseAdd(probThisGivenPrev, probNextGivenThis);
} | java | {
"resource": ""
} |
q11701 | CRFCliqueTree.scoreOf | train | public double scoreOf(int[] sequence) {
int[] given = new int[window() - 1];
Arrays.fill(given, classIndex.indexOf(backgroundSymbol));
double logProb = 0;
for (int i = 0; i < length(); i++) {
int label = sequence[i];
logProb += condLogProbGivenPrevious(i, label, given);
System.arraycopy(given, 1, given, 0, given.length - 1);
given[given.length - 1] = label;
}
return logProb;
} | java | {
"resource": ""
} |
q11702 | CRFCliqueTree.condLogProbGivenPrevious | train | public double condLogProbGivenPrevious(int position, int label, int[] prevLabels) {
if (prevLabels.length + 1 == windowSize) {
return factorTables[position].conditionalLogProbGivenPrevious(prevLabels, label);
} else if (prevLabels.length + 1 < windowSize) {
FactorTable ft = factorTables[position].sumOutFront();
while (ft.windowSize() > prevLabels.length + 1) {
ft = ft.sumOutFront();
}
return ft.conditionalLogProbGivenPrevious(prevLabels, label);
} else {
int[] p = new int[windowSize - 1];
System.arraycopy(prevLabels, prevLabels.length - p.length, p, 0, p.length);
return factorTables[position].conditionalLogProbGivenPrevious(p, label);
}
} | java | {
"resource": ""
} |
q11703 | CRFCliqueTree.getConditionalDistribution | train | public double[] getConditionalDistribution(int[] sequence, int position) {
double[] result = scoresOf(sequence, position);
ArrayMath.logNormalize(result);
// System.out.println("marginal: " + ArrayMath.toString(marginal,
// nf));
// System.out.println("conditional: " + ArrayMath.toString(result,
// nf));
result = ArrayMath.exp(result);
// System.out.println("conditional: " + ArrayMath.toString(result,
// nf));
return result;
} | java | {
"resource": ""
} |
q11704 | authenticationldappolicy_systemglobal_binding.get | train | public static authenticationldappolicy_systemglobal_binding[] get(nitro_service service, String name) throws Exception{
authenticationldappolicy_systemglobal_binding obj = new authenticationldappolicy_systemglobal_binding();
obj.set_name(name);
authenticationldappolicy_systemglobal_binding response[] = (authenticationldappolicy_systemglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11705 | LinearClassifier.scoreOf | train | public double scoreOf(Datum<L, F> example, L label) {
if(example instanceof RVFDatum<?, ?>)return scoreOfRVFDatum((RVFDatum<L,F>)example, label);
int iLabel = labelIndex.indexOf(label);
double score = 0.0;
for (F f : example.asFeatures()) {
score += weight(f, iLabel);
}
return score + thresholds[iLabel];
} | java | {
"resource": ""
} |
q11706 | LinearClassifier.scoreOf | train | @Deprecated
public double scoreOf(RVFDatum<L, F> example, L label) {
int iLabel = labelIndex.indexOf(label);
double score = 0.0;
Counter<F> features = example.asFeaturesCounter();
for (F f : features.keySet()) {
score += weight(f, iLabel) * features.getCount(f);
}
return score + thresholds[iLabel];
} | java | {
"resource": ""
} |
q11707 | LinearClassifier.scoreOf | train | private double scoreOf(int[] feats, L label) {
int iLabel = labelIndex.indexOf(label);
double score = 0.0;
for (int feat : feats) {
score += weight(feat, iLabel);
}
return score + thresholds[iLabel];
} | java | {
"resource": ""
} |
q11708 | LinearClassifier.logProbabilityOf | train | public Counter<L> logProbabilityOf(Datum<L, F> example) {
if(example instanceof RVFDatum<?, ?>)return logProbabilityOfRVFDatum((RVFDatum<L,F>)example);
Counter<L> scores = scoresOf(example);
Counters.logNormalizeInPlace(scores);
return scores;
} | java | {
"resource": ""
} |
q11709 | LinearClassifier.logProbabilityOf | train | public Counter<L> logProbabilityOf(int[] features) {
Counter<L> scores = scoresOf(features);
Counters.logNormalizeInPlace(scores);
return scores;
} | java | {
"resource": ""
} |
q11710 | LinearClassifier.getLabelIndices | train | protected Set<Integer> getLabelIndices(Set<L> labels) {
Set<Integer> iLabels = new HashSet<Integer>();
for (L label:labels) {
int iLabel = labelIndex.indexOf(label);
iLabels.add(iLabel);
if (iLabel < 0) throw new IllegalArgumentException("Unknown label " + label);
}
return iLabels;
} | java | {
"resource": ""
} |
q11711 | LinearClassifier.topFeaturesToString | train | public String topFeaturesToString(List<Triple<F,L,Double>> topFeatures)
{
// find longest key length (for pretty printing) with a limit
int maxLeng = 0;
for (Triple<F,L,Double> t : topFeatures) {
String key = "(" + t.first + "," + t.second + ")";
int leng = key.length();
if (leng > maxLeng) {
maxLeng = leng;
}
}
maxLeng = Math.min(64, maxLeng);
// set up pretty printing of weights
NumberFormat nf = NumberFormat.getNumberInstance();
nf.setMinimumFractionDigits(4);
nf.setMaximumFractionDigits(4);
if (nf instanceof DecimalFormat) {
((DecimalFormat) nf).setPositivePrefix(" ");
}
//print high weight features to a String
StringBuilder sb = new StringBuilder();
for (Triple<F,L,Double> t : topFeatures) {
String key = "(" + t.first + "," + t.second + ")";
sb.append(StringUtils.pad(key, maxLeng));
sb.append(" ");
double cnt = t.third();
if (Double.isInfinite(cnt)) {
sb.append(cnt);
} else {
sb.append(nf.format(cnt));
}
sb.append("\n");
}
return sb.toString();
} | java | {
"resource": ""
} |
q11712 | LinearClassifier.toDistributionString | train | public String toDistributionString(int treshold) {
Counter<Double> weightCounts = new ClassicCounter<Double>();
StringBuilder s = new StringBuilder();
s.append("Total number of weights: ").append(totalSize());
for (int f = 0; f < weights.length; f++) {
for (int l = 0; l < weights[f].length; l++) {
weightCounts.incrementCount(weights[f][l]);
}
}
s.append("Counts of weights\n");
Set<Double> keys = Counters.keysAbove(weightCounts, treshold);
s.append(keys.size()).append(" keys occur more than ").append(treshold).append(" times ");
return s.toString();
} | java | {
"resource": ""
} |
q11713 | LinearClassifier.bucketizeValue | train | private static int bucketizeValue(double wt) {
int index;
if (wt >= 0.0) {
index = ((int) (wt * 10.0)) + 100;
} else {
index = ((int) (Math.floor(wt * 10.0))) + 100;
}
if (index < 0) {
index = 201;
} else if (index > 200) {
index = 200;
}
return index;
} | java | {
"resource": ""
} |
q11714 | LinearClassifier.printHistCounts | train | private static void printHistCounts(int ind, String title, PrintWriter pw, double[][] hist, Object[][] histEg) {
pw.println(title);
for (int i = 0; i < 200; i++) {
int intpart, fracpart;
if (i < 100) {
intpart = 10 - ((i + 9) / 10);
fracpart = (10 - (i % 10)) % 10;
} else {
intpart = (i / 10) - 10;
fracpart = i % 10;
}
pw.print("[" + ((i < 100) ? "-" : "") + intpart + "." + fracpart + ", " + ((i < 100) ? "-" : "") + intpart + "." + fracpart + "+0.1): " + hist[ind][i]);
if (histEg[ind][i] != null) {
pw.print(" [" + histEg[ind][i] + ((hist[ind][i] > 1) ? ", ..." : "") + "]");
}
pw.println();
}
} | java | {
"resource": ""
} |
q11715 | LinearClassifier.dump | train | public void dump() {
Datum<L, F> allFeatures = new BasicDatum<L, F>(features(), (L)null);
justificationOf(allFeatures);
} | java | {
"resource": ""
} |
q11716 | LinearClassifier.weightsAsMapOfCounters | train | public Map<L,Counter<F>> weightsAsMapOfCounters() {
Map<L,Counter<F>> mapOfCounters = new HashMap<L,Counter<F>>();
for(L label : labelIndex){
int labelID = labelIndex.indexOf(label);
Counter<F> c = new ClassicCounter<F>();
mapOfCounters.put(label, c);
for (F f : featureIndex) {
c.incrementCount(f, weights[featureIndex.indexOf(f)][labelID]);
}
}
return mapOfCounters;
} | java | {
"resource": ""
} |
q11717 | LinearClassifier.dumpSorted | train | public void dumpSorted() {
Datum<L, F> allFeatures = new BasicDatum<L, F>(features(), (L)null);
justificationOf(allFeatures, new PrintWriter(System.err, true), true);
} | java | {
"resource": ""
} |
q11718 | LinearClassifier.readClassifier | train | public static <L, F> LinearClassifier<L, F> readClassifier(String loadPath) {
System.err.print("Deserializing classifier from " + loadPath + "...");
try {
ObjectInputStream ois = IOUtils.readStreamFromString(loadPath);
LinearClassifier<L, F> classifier = ErasureUtils.<LinearClassifier<L, F>>uncheckedCast(ois.readObject());
ois.close();
return classifier;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Deserialization failed: "+e.getMessage());
}
} | java | {
"resource": ""
} |
q11719 | LinearClassifier.writeClassifier | train | public static void writeClassifier(LinearClassifier<?, ?> classifier, String writePath) {
try {
IOUtils.writeObjectToFile(classifier, writePath);
} catch (Exception e) {
throw new RuntimeException("Serialization failed: "+e.getMessage(), e);
}
} | java | {
"resource": ""
} |
q11720 | cspolicy_cspolicylabel_binding.get | train | public static cspolicy_cspolicylabel_binding[] get(nitro_service service, String policyname) throws Exception{
cspolicy_cspolicylabel_binding obj = new cspolicy_cspolicylabel_binding();
obj.set_policyname(policyname);
cspolicy_cspolicylabel_binding response[] = (cspolicy_cspolicylabel_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11721 | cspolicy_cspolicylabel_binding.count | train | public static long count(nitro_service service, String policyname) throws Exception{
cspolicy_cspolicylabel_binding obj = new cspolicy_cspolicylabel_binding();
obj.set_policyname(policyname);
options option = new options();
option.set_count(true);
cspolicy_cspolicylabel_binding response[] = (cspolicy_cspolicylabel_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java | {
"resource": ""
} |
q11722 | vpnclientlessaccesspolicy_vpnvserver_binding.get | train | public static vpnclientlessaccesspolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy_vpnvserver_binding obj = new vpnclientlessaccesspolicy_vpnvserver_binding();
obj.set_name(name);
vpnclientlessaccesspolicy_vpnvserver_binding response[] = (vpnclientlessaccesspolicy_vpnvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11723 | appfwarchive.export | train | public static base_response export(nitro_service client, appfwarchive resource) throws Exception {
appfwarchive exportresource = new appfwarchive();
exportresource.name = resource.name;
exportresource.target = resource.target;
return exportresource.perform_operation(client,"export");
} | java | {
"resource": ""
} |
q11724 | appfwarchive.Import | train | public static base_response Import(nitro_service client, appfwarchive resource) throws Exception {
appfwarchive Importresource = new appfwarchive();
Importresource.src = resource.src;
Importresource.name = resource.name;
Importresource.comment = resource.comment;
return Importresource.perform_operation(client,"Import");
} | java | {
"resource": ""
} |
q11725 | appfwarchive.get | train | public static appfwarchive get(nitro_service service) throws Exception{
appfwarchive obj = new appfwarchive();
appfwarchive[] response = (appfwarchive[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q11726 | vlan_channel_binding.get | train | public static vlan_channel_binding[] get(nitro_service service, Long id) throws Exception{
vlan_channel_binding obj = new vlan_channel_binding();
obj.set_id(id);
vlan_channel_binding response[] = (vlan_channel_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11727 | service.add | train | public static base_response add(nitro_service client, service resource) throws Exception {
service addresource = new service();
addresource.name = resource.name;
addresource.ip = resource.ip;
addresource.servername = resource.servername;
addresource.servicetype = resource.servicetype;
addresource.port = resource.port;
addresource.cleartextport = resource.cleartextport;
addresource.cachetype = resource.cachetype;
addresource.maxclient = resource.maxclient;
addresource.healthmonitor = resource.healthmonitor;
addresource.maxreq = resource.maxreq;
addresource.cacheable = resource.cacheable;
addresource.cip = resource.cip;
addresource.cipheader = resource.cipheader;
addresource.usip = resource.usip;
addresource.pathmonitor = resource.pathmonitor;
addresource.pathmonitorindv = resource.pathmonitorindv;
addresource.useproxyport = resource.useproxyport;
addresource.sc = resource.sc;
addresource.sp = resource.sp;
addresource.rtspsessionidremap = resource.rtspsessionidremap;
addresource.clttimeout = resource.clttimeout;
addresource.svrtimeout = resource.svrtimeout;
addresource.customserverid = resource.customserverid;
addresource.serverid = resource.serverid;
addresource.cka = resource.cka;
addresource.tcpb = resource.tcpb;
addresource.cmp = resource.cmp;
addresource.maxbandwidth = resource.maxbandwidth;
addresource.accessdown = resource.accessdown;
addresource.monthreshold = resource.monthreshold;
addresource.state = resource.state;
addresource.downstateflush = resource.downstateflush;
addresource.tcpprofilename = resource.tcpprofilename;
addresource.httpprofilename = resource.httpprofilename;
addresource.hashid = resource.hashid;
addresource.comment = resource.comment;
addresource.appflowlog = resource.appflowlog;
addresource.netprofile = resource.netprofile;
addresource.td = resource.td;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q11728 | service.disable | train | public static base_response disable(nitro_service client, service resource) throws Exception {
service disableresource = new service();
disableresource.name = resource.name;
disableresource.delay = resource.delay;
disableresource.graceful = resource.graceful;
return disableresource.perform_operation(client,"disable");
} | java | {
"resource": ""
} |
q11729 | service.disable | train | public static base_responses disable(nitro_service client, service resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
service disableresources[] = new service[resources.length];
for (int i=0;i<resources.length;i++){
disableresources[i] = new service();
disableresources[i].name = resources[i].name;
disableresources[i].delay = resources[i].delay;
disableresources[i].graceful = resources[i].graceful;
}
result = perform_operation_bulk_request(client, disableresources,"disable");
}
return result;
} | java | {
"resource": ""
} |
q11730 | service.get | train | public static service[] get(nitro_service service, service_args args) throws Exception{
service obj = new service();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
service[] response = (service[])obj.get_resources(service, option);
return response;
} | java | {
"resource": ""
} |
q11731 | service.get | train | public static service get(nitro_service service, String name) throws Exception{
service obj = new service();
obj.set_name(name);
service response = (service) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q11732 | service.count | train | public static long count(nitro_service service) throws Exception{
service obj = new service();
options option = new options();
option.set_count(true);
service[] response = (service[])obj.get_resources(service, option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java | {
"resource": ""
} |
q11733 | channel.add | train | public static base_response add(nitro_service client, channel resource) throws Exception {
channel addresource = new channel();
addresource.id = resource.id;
addresource.ifnum = resource.ifnum;
addresource.state = resource.state;
addresource.mode = resource.mode;
addresource.conndistr = resource.conndistr;
addresource.macdistr = resource.macdistr;
addresource.lamac = resource.lamac;
addresource.speed = resource.speed;
addresource.flowctl = resource.flowctl;
addresource.hamonitor = resource.hamonitor;
addresource.tagall = resource.tagall;
addresource.trunk = resource.trunk;
addresource.ifalias = resource.ifalias;
addresource.throughput = resource.throughput;
addresource.bandwidthhigh = resource.bandwidthhigh;
addresource.bandwidthnormal = resource.bandwidthnormal;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q11734 | channel.add | train | public static base_responses add(nitro_service client, channel resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
channel addresources[] = new channel[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new channel();
addresources[i].id = resources[i].id;
addresources[i].ifnum = resources[i].ifnum;
addresources[i].state = resources[i].state;
addresources[i].mode = resources[i].mode;
addresources[i].conndistr = resources[i].conndistr;
addresources[i].macdistr = resources[i].macdistr;
addresources[i].lamac = resources[i].lamac;
addresources[i].speed = resources[i].speed;
addresources[i].flowctl = resources[i].flowctl;
addresources[i].hamonitor = resources[i].hamonitor;
addresources[i].tagall = resources[i].tagall;
addresources[i].trunk = resources[i].trunk;
addresources[i].ifalias = resources[i].ifalias;
addresources[i].throughput = resources[i].throughput;
addresources[i].bandwidthhigh = resources[i].bandwidthhigh;
addresources[i].bandwidthnormal = resources[i].bandwidthnormal;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q11735 | channel.update | train | public static base_response update(nitro_service client, channel resource) throws Exception {
channel updateresource = new channel();
updateresource.id = resource.id;
updateresource.state = resource.state;
updateresource.mode = resource.mode;
updateresource.conndistr = resource.conndistr;
updateresource.macdistr = resource.macdistr;
updateresource.lamac = resource.lamac;
updateresource.speed = resource.speed;
updateresource.flowctl = resource.flowctl;
updateresource.hamonitor = resource.hamonitor;
updateresource.tagall = resource.tagall;
updateresource.trunk = resource.trunk;
updateresource.ifalias = resource.ifalias;
updateresource.throughput = resource.throughput;
updateresource.lrminthroughput = resource.lrminthroughput;
updateresource.bandwidthhigh = resource.bandwidthhigh;
updateresource.bandwidthnormal = resource.bandwidthnormal;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q11736 | channel.update | train | public static base_responses update(nitro_service client, channel resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
channel updateresources[] = new channel[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new channel();
updateresources[i].id = resources[i].id;
updateresources[i].state = resources[i].state;
updateresources[i].mode = resources[i].mode;
updateresources[i].conndistr = resources[i].conndistr;
updateresources[i].macdistr = resources[i].macdistr;
updateresources[i].lamac = resources[i].lamac;
updateresources[i].speed = resources[i].speed;
updateresources[i].flowctl = resources[i].flowctl;
updateresources[i].hamonitor = resources[i].hamonitor;
updateresources[i].tagall = resources[i].tagall;
updateresources[i].trunk = resources[i].trunk;
updateresources[i].ifalias = resources[i].ifalias;
updateresources[i].throughput = resources[i].throughput;
updateresources[i].lrminthroughput = resources[i].lrminthroughput;
updateresources[i].bandwidthhigh = resources[i].bandwidthhigh;
updateresources[i].bandwidthnormal = resources[i].bandwidthnormal;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | {
"resource": ""
} |
q11737 | channel.get | train | public static channel[] get(nitro_service service) throws Exception{
channel obj = new channel();
channel[] response = (channel[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11738 | channel.get | train | public static channel get(nitro_service service, String id) throws Exception{
channel obj = new channel();
obj.set_id(id);
channel response = (channel) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q11739 | channel.get | train | public static channel[] get(nitro_service service, String id[]) throws Exception{
if (id !=null && id.length>0) {
channel response[] = new channel[id.length];
channel obj[] = new channel[id.length];
for (int i=0;i<id.length;i++) {
obj[i] = new channel();
obj[i].set_id(id[i]);
response[i] = (channel) obj[i].get_resource(service);
}
return response;
}
return null;
} | java | {
"resource": ""
} |
q11740 | lbwlm_lbvserver_binding.get | train | public static lbwlm_lbvserver_binding[] get(nitro_service service, String wlmname) throws Exception{
lbwlm_lbvserver_binding obj = new lbwlm_lbvserver_binding();
obj.set_wlmname(wlmname);
lbwlm_lbvserver_binding response[] = (lbwlm_lbvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11741 | lbwlm_lbvserver_binding.get_filtered | train | public static lbwlm_lbvserver_binding[] get_filtered(nitro_service service, String wlmname, filtervalue[] filter) throws Exception{
lbwlm_lbvserver_binding obj = new lbwlm_lbvserver_binding();
obj.set_wlmname(wlmname);
options option = new options();
option.set_filter(filter);
lbwlm_lbvserver_binding[] response = (lbwlm_lbvserver_binding[]) obj.getfiltered(service, option);
return response;
} | java | {
"resource": ""
} |
q11742 | lbwlm_lbvserver_binding.count | train | public static long count(nitro_service service, String wlmname) throws Exception{
lbwlm_lbvserver_binding obj = new lbwlm_lbvserver_binding();
obj.set_wlmname(wlmname);
options option = new options();
option.set_count(true);
lbwlm_lbvserver_binding response[] = (lbwlm_lbvserver_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java | {
"resource": ""
} |
q11743 | dnspolicy.add | train | public static base_response add(nitro_service client, dnspolicy resource) throws Exception {
dnspolicy addresource = new dnspolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.viewname = resource.viewname;
addresource.preferredlocation = resource.preferredlocation;
addresource.preferredloclist = resource.preferredloclist;
addresource.drop = resource.drop;
addresource.cachebypass = resource.cachebypass;
addresource.actionname = resource.actionname;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q11744 | dnspolicy.add | train | public static base_responses add(nitro_service client, dnspolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnspolicy addresources[] = new dnspolicy[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dnspolicy();
addresources[i].name = resources[i].name;
addresources[i].rule = resources[i].rule;
addresources[i].viewname = resources[i].viewname;
addresources[i].preferredlocation = resources[i].preferredlocation;
addresources[i].preferredloclist = resources[i].preferredloclist;
addresources[i].drop = resources[i].drop;
addresources[i].cachebypass = resources[i].cachebypass;
addresources[i].actionname = resources[i].actionname;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q11745 | dnspolicy.update | train | public static base_response update(nitro_service client, dnspolicy resource) throws Exception {
dnspolicy updateresource = new dnspolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.viewname = resource.viewname;
updateresource.preferredlocation = resource.preferredlocation;
updateresource.preferredloclist = resource.preferredloclist;
updateresource.drop = resource.drop;
updateresource.cachebypass = resource.cachebypass;
updateresource.actionname = resource.actionname;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q11746 | dnspolicy.update | train | public static base_responses update(nitro_service client, dnspolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnspolicy updateresources[] = new dnspolicy[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new dnspolicy();
updateresources[i].name = resources[i].name;
updateresources[i].rule = resources[i].rule;
updateresources[i].viewname = resources[i].viewname;
updateresources[i].preferredlocation = resources[i].preferredlocation;
updateresources[i].preferredloclist = resources[i].preferredloclist;
updateresources[i].drop = resources[i].drop;
updateresources[i].cachebypass = resources[i].cachebypass;
updateresources[i].actionname = resources[i].actionname;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | {
"resource": ""
} |
q11747 | dnspolicy.get | train | public static dnspolicy[] get(nitro_service service) throws Exception{
dnspolicy obj = new dnspolicy();
dnspolicy[] response = (dnspolicy[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11748 | dnspolicy.get | train | public static dnspolicy get(nitro_service service, String name) throws Exception{
dnspolicy obj = new dnspolicy();
obj.set_name(name);
dnspolicy response = (dnspolicy) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q11749 | FilePathProcessor.processPath | train | public static void processPath(File path, String suffix, boolean recursively, FileProcessor processor) {
processPath(path, new ExtensionFileFilter(suffix, recursively), processor);
} | java | {
"resource": ""
} |
q11750 | dnspolicylabel_dnspolicy_binding.get | train | public static dnspolicylabel_dnspolicy_binding[] get(nitro_service service, String labelname) throws Exception{
dnspolicylabel_dnspolicy_binding obj = new dnspolicylabel_dnspolicy_binding();
obj.set_labelname(labelname);
dnspolicylabel_dnspolicy_binding response[] = (dnspolicylabel_dnspolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11751 | authorizationpolicylabel_stats.get | train | public static authorizationpolicylabel_stats[] get(nitro_service service) throws Exception{
authorizationpolicylabel_stats obj = new authorizationpolicylabel_stats();
authorizationpolicylabel_stats[] response = (authorizationpolicylabel_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q11752 | authorizationpolicylabel_stats.get | train | public static authorizationpolicylabel_stats get(nitro_service service, String labelname) throws Exception{
authorizationpolicylabel_stats obj = new authorizationpolicylabel_stats();
obj.set_labelname(labelname);
authorizationpolicylabel_stats response = (authorizationpolicylabel_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q11753 | authenticationcertpolicy_binding.get | train | public static authenticationcertpolicy_binding get(nitro_service service, String name) throws Exception{
authenticationcertpolicy_binding obj = new authenticationcertpolicy_binding();
obj.set_name(name);
authenticationcertpolicy_binding response = (authenticationcertpolicy_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q11754 | nsmemory_stats.get | train | public static nsmemory_stats[] get(nitro_service service) throws Exception{
nsmemory_stats obj = new nsmemory_stats();
nsmemory_stats[] response = (nsmemory_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q11755 | nsmemory_stats.get | train | public static nsmemory_stats get(nitro_service service, String pool) throws Exception{
nsmemory_stats obj = new nsmemory_stats();
obj.set_pool(pool);
nsmemory_stats response = (nsmemory_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q11756 | lbmetrictable_binding.get | train | public static lbmetrictable_binding get(nitro_service service, String metrictable) throws Exception{
lbmetrictable_binding obj = new lbmetrictable_binding();
obj.set_metrictable(metrictable);
lbmetrictable_binding response = (lbmetrictable_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q11757 | MtasConfiguration.readMtasCharFilterConfigurations | train | public static HashMap<String, MtasConfiguration> readMtasCharFilterConfigurations(
ResourceLoader resourceLoader, String configFile) throws IOException {
HashMap<String, HashMap<String, String>> configs = readConfigurations(
resourceLoader, configFile, MtasCharFilterFactory.class.getName());
if (configs == null) {
throw new IOException("no configurations");
} else {
HashMap<String, MtasConfiguration> result = new HashMap<String, MtasConfiguration>();
for (Entry<String, HashMap<String, String>> entry : configs.entrySet()) {
HashMap<String, String> config = entry.getValue();
if (config.containsKey(CHARFILTER_CONFIGURATION_TYPE)) {
MtasConfiguration item = new MtasConfiguration();
item.attributes.put(CHARFILTER_CONFIGURATION_TYPE,
config.get(CHARFILTER_CONFIGURATION_TYPE));
item.attributes.put(CHARFILTER_CONFIGURATION_PREFIX,
config.get(CHARFILTER_CONFIGURATION_PREFIX));
item.attributes.put(CHARFILTER_CONFIGURATION_POSTFIX,
config.get(CHARFILTER_CONFIGURATION_POSTFIX));
result.put(entry.getKey(), item);
} else {
throw new IOException("configuration " + entry.getKey() + " has no "
+ CHARFILTER_CONFIGURATION_TYPE);
}
}
return result;
}
} | java | {
"resource": ""
} |
q11758 | MtasConfiguration.readMtasTokenizerConfigurations | train | public static HashMap<String, MtasConfiguration> readMtasTokenizerConfigurations(
ResourceLoader resourceLoader, String configFile) throws IOException {
HashMap<String, HashMap<String, String>> configs = readConfigurations(
resourceLoader, configFile, MtasTokenizerFactory.class.getName());
if (configs == null) {
throw new IOException("no configurations");
} else {
HashMap<String, MtasConfiguration> result = new HashMap<String, MtasConfiguration>();
for (Entry<String, HashMap<String, String>> entry : configs.entrySet()) {
HashMap<String, String> config = entry.getValue();
if (config.containsKey(TOKENIZER_CONFIGURATION_FILE)) {
result.put(entry.getKey(), readConfiguration(resourceLoader
.openResource(config.get(TOKENIZER_CONFIGURATION_FILE))));
} else {
throw new IOException("configuration " + entry.getKey() + " has no "
+ TOKENIZER_CONFIGURATION_FILE);
}
}
return result;
}
} | java | {
"resource": ""
} |
q11759 | MtasConfiguration.readConfiguration | train | public static MtasConfiguration readConfiguration(InputStream reader)
throws IOException {
MtasConfiguration currentConfig = null;
// parse xml
XMLInputFactory factory = XMLInputFactory.newInstance();
try {
XMLStreamReader streamReader = factory.createXMLStreamReader(reader);
QName qname;
try {
int event = streamReader.getEventType();
while (true) {
switch (event) {
case XMLStreamConstants.START_DOCUMENT:
if (!streamReader.getCharacterEncodingScheme().equals("UTF-8")) {
throw new IOException("XML not UTF-8 encoded");
}
break;
case XMLStreamConstants.END_DOCUMENT:
case XMLStreamConstants.SPACE:
break;
case XMLStreamConstants.START_ELEMENT:
// get data
qname = streamReader.getName();
if (currentConfig == null) {
if (qname.getLocalPart().equals("mtas")) {
currentConfig = new MtasConfiguration();
} else {
throw new IOException("no Mtas Configuration");
}
} else {
MtasConfiguration parentConfig = currentConfig;
currentConfig = new MtasConfiguration();
parentConfig.children.add(currentConfig);
currentConfig.parent = parentConfig;
currentConfig.name = qname.getLocalPart();
for (int i = 0; i < streamReader.getAttributeCount(); i++) {
currentConfig.attributes.put(
streamReader.getAttributeLocalName(i),
streamReader.getAttributeValue(i));
}
}
break;
case XMLStreamConstants.END_ELEMENT:
if (currentConfig.parent == null) {
return currentConfig;
} else {
currentConfig = currentConfig.parent;
}
break;
case XMLStreamConstants.CHARACTERS:
break;
}
if (!streamReader.hasNext()) {
break;
}
event = streamReader.next();
}
} finally {
streamReader.close();
}
} catch (XMLStreamException e) {
log.debug(e);
}
return null;
} | java | {
"resource": ""
} |
q11760 | systemcpu_stats.get | train | public static systemcpu_stats[] get(nitro_service service) throws Exception{
systemcpu_stats obj = new systemcpu_stats();
systemcpu_stats[] response = (systemcpu_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q11761 | systemcpu_stats.get | train | public static systemcpu_stats get(nitro_service service, Long id) throws Exception{
systemcpu_stats obj = new systemcpu_stats();
obj.set_id(id);
systemcpu_stats response = (systemcpu_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q11762 | TregexParser.Root | train | final public TregexPattern Root() throws ParseException {
TregexPattern node;
node = SubNode(Relation.ROOT);
jj_consume_token(11);
{if (true) return node;}
throw new Error("Missing return statement in function");
} | java | {
"resource": ""
} |
q11763 | TregexParser.Node | train | final public TregexPattern Node(Relation r) throws ParseException {
TregexPattern node;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 12:
jj_consume_token(12);
node = SubNode(r);
jj_consume_token(13);
break;
case IDENTIFIER:
case BLANK:
case REGEX:
case 14:
case 15:
case 18:
case 19:
node = ModDescription(r);
break;
default:
jj_la1[0] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
{if (true) return node;}
throw new Error("Missing return statement in function");
} | java | {
"resource": ""
} |
q11764 | TregexParser.generateParseException | train | public ParseException generateParseException() {
jj_expentries.clear();
boolean[] la1tokens = new boolean[25];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
for (int i = 0; i < 23; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1<<j)) != 0) {
la1tokens[j] = true;
}
}
}
}
for (int i = 0; i < 25; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
jj_expentries.add(jj_expentry);
}
}
int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) {
exptokseq[i] = jj_expentries.get(i);
}
return new ParseException(token, exptokseq, tokenImage);
} | java | {
"resource": ""
} |
q11765 | hafiles.sync | train | public static base_response sync(nitro_service client, hafiles resource) throws Exception {
hafiles syncresource = new hafiles();
syncresource.mode = resource.mode;
return syncresource.perform_operation(client,"sync");
} | java | {
"resource": ""
} |
q11766 | lbpersistentsessions.clear | train | public static base_response clear(nitro_service client, lbpersistentsessions resource) throws Exception {
lbpersistentsessions clearresource = new lbpersistentsessions();
clearresource.vserver = resource.vserver;
clearresource.persistenceparameter = resource.persistenceparameter;
return clearresource.perform_operation(client,"clear");
} | java | {
"resource": ""
} |
q11767 | lbpersistentsessions.clear | train | public static base_responses clear(nitro_service client, lbpersistentsessions resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
lbpersistentsessions clearresources[] = new lbpersistentsessions[resources.length];
for (int i=0;i<resources.length;i++){
clearresources[i] = new lbpersistentsessions();
clearresources[i].vserver = resources[i].vserver;
clearresources[i].persistenceparameter = resources[i].persistenceparameter;
}
result = perform_operation_bulk_request(client, clearresources,"clear");
}
return result;
} | java | {
"resource": ""
} |
q11768 | lbpersistentsessions.get | train | public static lbpersistentsessions[] get(nitro_service service, options option) throws Exception{
lbpersistentsessions obj = new lbpersistentsessions();
lbpersistentsessions[] response = (lbpersistentsessions[])obj.get_resources(service,option);
return response;
} | java | {
"resource": ""
} |
q11769 | lbpersistentsessions.get | train | public static lbpersistentsessions[] get(nitro_service service, lbpersistentsessions_args args) throws Exception{
lbpersistentsessions obj = new lbpersistentsessions();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
lbpersistentsessions[] response = (lbpersistentsessions[])obj.get_resources(service, option);
return response;
} | java | {
"resource": ""
} |
q11770 | vpnvserver_staserver_binding.get | train | public static vpnvserver_staserver_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_staserver_binding obj = new vpnvserver_staserver_binding();
obj.set_name(name);
vpnvserver_staserver_binding response[] = (vpnvserver_staserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11771 | appfwprofile_trustedlearningclients_binding.get | train | public static appfwprofile_trustedlearningclients_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_trustedlearningclients_binding obj = new appfwprofile_trustedlearningclients_binding();
obj.set_name(name);
appfwprofile_trustedlearningclients_binding response[] = (appfwprofile_trustedlearningclients_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11772 | SystemUtils.run | train | public static void run(ProcessBuilder builder, Writer output, Writer error) {
try {
Process process = builder.start();
consume(process, output, error);
int result = process.waitFor();
if (result != 0) {
String msg = "process %s exited with value %d";
throw new ProcessException(String.format(msg, builder.command(), result));
}
} catch (InterruptedException e) {
throw new ProcessException(e);
} catch (IOException e) {
throw new ProcessException(e);
}
} | java | {
"resource": ""
} |
q11773 | SystemUtils.consume | train | private static void consume(Process process, Writer outputWriter, Writer errorWriter)
throws IOException, InterruptedException {
if (outputWriter == null) {
outputWriter = new OutputStreamWriter(System.out);
}
if (errorWriter == null) {
errorWriter = new OutputStreamWriter(System.err);
}
WriterThread outputThread = new WriterThread(process.getInputStream(), outputWriter);
WriterThread errorThread = new WriterThread(process.getErrorStream(), errorWriter);
outputThread.start();
errorThread.start();
outputThread.join();
errorThread.join();
} | java | {
"resource": ""
} |
q11774 | SystemUtils.getPID | train | public static int getPID() throws IOException {
// note that we ask Perl for "ppid" -- process ID of parent -- that's us
String[] cmd =
new String[] {"perl", "-e", "print getppid() . \"\\n\";"};
StringBuilder out = new StringBuilder();
runShellCommand(cmd, out);
return Integer.parseInt(out.toString());
} | java | {
"resource": ""
} |
q11775 | appqoe_stats.get | train | public static appqoe_stats get(nitro_service service) throws Exception{
appqoe_stats obj = new appqoe_stats();
appqoe_stats[] response = (appqoe_stats[])obj.stat_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q11776 | transformpolicy_binding.get | train | public static transformpolicy_binding get(nitro_service service, String name) throws Exception{
transformpolicy_binding obj = new transformpolicy_binding();
obj.set_name(name);
transformpolicy_binding response = (transformpolicy_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q11777 | gslbvserver_binding.get | train | public static gslbvserver_binding get(nitro_service service, String name) throws Exception{
gslbvserver_binding obj = new gslbvserver_binding();
obj.set_name(name);
gslbvserver_binding response = (gslbvserver_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q11778 | aaauser_vpnsessionpolicy_binding.get | train | public static aaauser_vpnsessionpolicy_binding[] get(nitro_service service, String username) throws Exception{
aaauser_vpnsessionpolicy_binding obj = new aaauser_vpnsessionpolicy_binding();
obj.set_username(username);
aaauser_vpnsessionpolicy_binding response[] = (aaauser_vpnsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11779 | tmtrafficpolicy_csvserver_binding.get | train | public static tmtrafficpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_csvserver_binding obj = new tmtrafficpolicy_csvserver_binding();
obj.set_name(name);
tmtrafficpolicy_csvserver_binding response[] = (tmtrafficpolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11780 | vpnclientlessaccesspolicy_vpnglobal_binding.get | train | public static vpnclientlessaccesspolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy_vpnglobal_binding obj = new vpnclientlessaccesspolicy_vpnglobal_binding();
obj.set_name(name);
vpnclientlessaccesspolicy_vpnglobal_binding response[] = (vpnclientlessaccesspolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11781 | MultiClassAccuracyStats.numCorrect | train | public int numCorrect(int recall) {
int correct = 0;
for (int j = scores.length - 1; j >= scores.length - recall; j--) {
if (isCorrect[j]) {
correct++;
}
}
return correct;
} | java | {
"resource": ""
} |
q11782 | tmsessionpolicy_aaagroup_binding.get | train | public static tmsessionpolicy_aaagroup_binding[] get(nitro_service service, String name) throws Exception{
tmsessionpolicy_aaagroup_binding obj = new tmsessionpolicy_aaagroup_binding();
obj.set_name(name);
tmsessionpolicy_aaagroup_binding response[] = (tmsessionpolicy_aaagroup_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11783 | DependencyTreeTransformer.cleanUpLabel | train | protected String cleanUpLabel(String label) {
if (label == null) {
return ""; // This shouldn't really happen, but can happen if there are unlabeled nodes further down a tree, as apparently happens in at least the 20100730 era American National Corpus
}
boolean nptemp = NPTmpPattern.matcher(label).matches();
boolean npadv = NPAdvPattern.matcher(label).matches();
label = tlp.basicCategory(label);
if (nptemp) {
label = label + "-TMP";
} else if (npadv) {
label = label + "-ADV";
}
return label;
} | java | {
"resource": ""
} |
q11784 | AcronymModel.computeProb | train | public double computeProb(InfoTemplate temp){
return computeProb(temp.wname,temp.wacronym,temp.cname,temp.cacronym,
temp.whomepage, temp.chomepage);
} | java | {
"resource": ""
} |
q11785 | authenticationlocalpolicy_vpnglobal_binding.get | train | public static authenticationlocalpolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
authenticationlocalpolicy_vpnglobal_binding obj = new authenticationlocalpolicy_vpnglobal_binding();
obj.set_name(name);
authenticationlocalpolicy_vpnglobal_binding response[] = (authenticationlocalpolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11786 | ptp.update | train | public static base_response update(nitro_service client, ptp resource) throws Exception {
ptp updateresource = new ptp();
updateresource.state = resource.state;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q11787 | ptp.get | train | public static ptp get(nitro_service service) throws Exception{
ptp obj = new ptp();
ptp[] response = (ptp[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q11788 | nsratecontrol.update | train | public static base_response update(nitro_service client, nsratecontrol resource) throws Exception {
nsratecontrol updateresource = new nsratecontrol();
updateresource.tcpthreshold = resource.tcpthreshold;
updateresource.udpthreshold = resource.udpthreshold;
updateresource.icmpthreshold = resource.icmpthreshold;
updateresource.tcprstthreshold = resource.tcprstthreshold;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q11789 | nsratecontrol.unset | train | public static base_response unset(nitro_service client, nsratecontrol resource, String[] args) throws Exception{
nsratecontrol unsetresource = new nsratecontrol();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q11790 | nsratecontrol.get | train | public static nsratecontrol get(nitro_service service, options option) throws Exception{
nsratecontrol obj = new nsratecontrol();
nsratecontrol[] response = (nsratecontrol[])obj.get_resources(service,option);
return response[0];
} | java | {
"resource": ""
} |
q11791 | vpnglobal_sharefileserver_binding.get | train | public static vpnglobal_sharefileserver_binding[] get(nitro_service service) throws Exception{
vpnglobal_sharefileserver_binding obj = new vpnglobal_sharefileserver_binding();
vpnglobal_sharefileserver_binding response[] = (vpnglobal_sharefileserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11792 | appflowparam.update | train | public static base_response update(nitro_service client, appflowparam resource) throws Exception {
appflowparam updateresource = new appflowparam();
updateresource.templaterefresh = resource.templaterefresh;
updateresource.appnamerefresh = resource.appnamerefresh;
updateresource.flowrecordinterval = resource.flowrecordinterval;
updateresource.udppmtu = resource.udppmtu;
updateresource.httpurl = resource.httpurl;
updateresource.aaausername = resource.aaausername;
updateresource.httpcookie = resource.httpcookie;
updateresource.httpreferer = resource.httpreferer;
updateresource.httpmethod = resource.httpmethod;
updateresource.httphost = resource.httphost;
updateresource.httpuseragent = resource.httpuseragent;
updateresource.clienttrafficonly = resource.clienttrafficonly;
updateresource.httpcontenttype = resource.httpcontenttype;
updateresource.httpauthorization = resource.httpauthorization;
updateresource.httpvia = resource.httpvia;
updateresource.httpxforwardedfor = resource.httpxforwardedfor;
updateresource.httplocation = resource.httplocation;
updateresource.httpsetcookie = resource.httpsetcookie;
updateresource.httpsetcookie2 = resource.httpsetcookie2;
updateresource.connectionchaining = resource.connectionchaining;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q11793 | appflowparam.unset | train | public static base_response unset(nitro_service client, appflowparam resource, String[] args) throws Exception{
appflowparam unsetresource = new appflowparam();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q11794 | appflowparam.get | train | public static appflowparam get(nitro_service service) throws Exception{
appflowparam obj = new appflowparam();
appflowparam[] response = (appflowparam[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q11795 | BooleanArrayList.removeAll | train | public boolean removeAll(AbstractBooleanList other) {
// overridden for performance only.
if (! (other instanceof BooleanArrayList)) return super.removeAll(other);
/* There are two possibilities to do the thing
a) use other.indexOf(...)
b) sort other, then use other.binarySearch(...)
Let's try to figure out which one is faster. Let M=size, N=other.size, then
a) takes O(M*N) steps
b) takes O(N*logN + M*logN) steps (sorting is O(N*logN) and binarySearch is O(logN))
Hence, if N*logN + M*logN < M*N, we use b) otherwise we use a).
*/
if (other.size()==0) {return false;} //nothing to do
int limit = other.size()-1;
int j=0;
boolean[] theElements = elements;
int mySize = size();
double N=(double) other.size();
double M=(double) mySize;
if ( (N+M)*cern.colt.Math.log2(N) < M*N ) {
// it is faster to sort other before searching in it
BooleanArrayList sortedList = (BooleanArrayList) other.clone();
sortedList.quickSort();
for (int i=0; i<mySize ; i++) {
if (sortedList.binarySearchFromTo(theElements[i], 0, limit) < 0) theElements[j++]=theElements[i];
}
}
else {
// it is faster to search in other without sorting
for (int i=0; i<mySize ; i++) {
if (other.indexOfFromTo(theElements[i], 0, limit) < 0) theElements[j++]=theElements[i];
}
}
boolean modified = (j!=mySize);
setSize(j);
return modified;
} | java | {
"resource": ""
} |
q11796 | configobjects.get | train | public static configobjects get(nitro_service service) throws Exception{
configobjects obj = new configobjects();
configobjects[] response = (configobjects[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q11797 | authorizationpolicylabel_authorizationpolicy_binding.get | train | public static authorizationpolicylabel_authorizationpolicy_binding[] get(nitro_service service, String labelname) throws Exception{
authorizationpolicylabel_authorizationpolicy_binding obj = new authorizationpolicylabel_authorizationpolicy_binding();
obj.set_labelname(labelname);
authorizationpolicylabel_authorizationpolicy_binding response[] = (authorizationpolicylabel_authorizationpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11798 | authenticationvserver_auditsyslogpolicy_binding.get | train | public static authenticationvserver_auditsyslogpolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_auditsyslogpolicy_binding obj = new authenticationvserver_auditsyslogpolicy_binding();
obj.set_name(name);
authenticationvserver_auditsyslogpolicy_binding response[] = (authenticationvserver_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q11799 | gslbvserver_gslbservice_binding.get | train | public static gslbvserver_gslbservice_binding[] get(nitro_service service, String name) throws Exception{
gslbvserver_gslbservice_binding obj = new gslbvserver_gslbservice_binding();
obj.set_name(name);
gslbvserver_gslbservice_binding response[] = (gslbvserver_gslbservice_binding[]) obj.get_resources(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.