_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q12400 | vpnvserver_authenticationnegotiatepolicy_binding.get | train | public static vpnvserver_authenticationnegotiatepolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationnegotiatepolicy_binding obj = new vpnvserver_authenticationnegotiatepolicy_binding();
obj.set_name(name);
vpnvserver_authenticationnegotiatepolicy_binding response[] = (vpnvserver_authenticationnegotiatepolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12401 | authenticationvserver_tmsessionpolicy_binding.get | train | public static authenticationvserver_tmsessionpolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_tmsessionpolicy_binding obj = new authenticationvserver_tmsessionpolicy_binding();
obj.set_name(name);
authenticationvserver_tmsessionpolicy_binding response[] = (authenticationvserver_tmsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12402 | vpnglobal_authenticationtacacspolicy_binding.get | train | public static vpnglobal_authenticationtacacspolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_authenticationtacacspolicy_binding obj = new vpnglobal_authenticationtacacspolicy_binding();
vpnglobal_authenticationtacacspolicy_binding response[] = (vpnglobal_authenticationtacacspolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12403 | sslservice_sslcipher_binding.get | train | public static sslservice_sslcipher_binding[] get(nitro_service service, String servicename) throws Exception{
sslservice_sslcipher_binding obj = new sslservice_sslcipher_binding();
obj.set_servicename(servicename);
sslservice_sslcipher_binding response[] = (sslservice_sslcipher_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12404 | MtasSolrSearchComponent.getMtasFields | train | private ComponentFields getMtasFields(ResponseBuilder rb) {
return (ComponentFields) rb.req.getContext().get(ComponentFields.class);
} | java | {
"resource": ""
} |
q12405 | MtasSolrSearchComponent.initializeRequestHandler | train | private void initializeRequestHandler(ResponseBuilder rb) {
if (requestHandler == null) {
// try to initialize
for (Entry<String, SolrInfoBean> entry : rb.req.getCore().getInfoRegistry().entrySet()) {
if (entry.getValue() instanceof MtasRequestHandler) {
requestHandlerName = entry.getKey();
requestHandler = (MtasRequestHandler) entry.getValue();
break;
}
}
}
} | java | {
"resource": ""
} |
q12406 | MtasSolrSearchComponent.checkStatus | train | private void checkStatus(MtasSolrStatus status) throws IOException {
if (!status.finished()) {
if (status.error()) {
status.setFinished();
if (requestHandler != null) {
requestHandler.finishStatus(status);
}
throw new IOException(status.errorMessage());
} else if (status.abort()) {
status.setFinished();
if (requestHandler != null) {
requestHandler.finishStatus(status);
}
throw new IOException(status.abortMessage());
}
}
} | java | {
"resource": ""
} |
q12407 | MtasSolrSearchComponent.errorStatus | train | private void errorStatus(MtasSolrStatus status, IOException exception) {
try {
status.setError(exception);
if (requestHandler != null) {
requestHandler.finishStatus(status);
}
} catch (IOException e) {
log.error(e);
}
} | java | {
"resource": ""
} |
q12408 | CrossValidator.computeAverage | train | public double computeAverage (Function<Triple<GeneralDataset<L, F>,GeneralDataset<L, F>,SavedState>,Double> function)
{
double sum = 0;
Iterator<Triple<GeneralDataset<L, F>,GeneralDataset<L, F>,SavedState>> foldIt = iterator();
while (foldIt.hasNext()) {
sum += function.apply(foldIt.next());
}
return sum / kfold;
} | java | {
"resource": ""
} |
q12409 | vpnvserver_binding.get | train | public static vpnvserver_binding get(nitro_service service, String name) throws Exception{
vpnvserver_binding obj = new vpnvserver_binding();
obj.set_name(name);
vpnvserver_binding response = (vpnvserver_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12410 | tmglobal_auditsyslogpolicy_binding.get | train | public static tmglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{
tmglobal_auditsyslogpolicy_binding obj = new tmglobal_auditsyslogpolicy_binding();
tmglobal_auditsyslogpolicy_binding response[] = (tmglobal_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12411 | appflow_stats.get | train | public static appflow_stats get(nitro_service service) throws Exception{
appflow_stats obj = new appflow_stats();
appflow_stats[] response = (appflow_stats[])obj.stat_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12412 | MtasSpanNotQuery.getTermContexts | train | protected Map<Term, TermContext> getTermContexts(
List<MtasSpanNotQueryWeight> items) {
List<SpanWeight> weights = new ArrayList<>();
for (MtasSpanNotQueryWeight item : items) {
weights.add(item.spanWeight);
}
return getTermContexts(weights);
} | java | {
"resource": ""
} |
q12413 | LinearClassifierFactory.getHighPrecisionFeatures | train | private List<F> getHighPrecisionFeatures(GeneralDataset<L,F> dataset, double minPrecision, int maxNumFeatures){
int[][] feature2label = new int[dataset.numFeatures()][dataset.numClasses()];
for(int f = 0; f < dataset.numFeatures(); f++)
Arrays.fill(feature2label[f],0);
int[][] data = dataset.data;
int[] labels = dataset.labels;
for(int d = 0; d < data.length; d++){
int label = labels[d];
//System.out.println("datum id:"+d+" label id: "+label);
if(data[d] != null){
//System.out.println(" number of features:"+data[d].length);
for(int n = 0; n < data[d].length; n++){
feature2label[data[d][n]][label]++;
}
}
}
Counter<F> feature2freq = new ClassicCounter<F>();
for(int f = 0; f < dataset.numFeatures(); f++){
int maxF = ArrayMath.max(feature2label[f]);
int total = ArrayMath.sum(feature2label[f]);
double precision = ((double)maxF)/total;
F feature = dataset.featureIndex.get(f);
if(precision >= minPrecision){
feature2freq.incrementCount(feature, total);
}
}
if(feature2freq.size() > maxNumFeatures){
Counters.retainTop(feature2freq, maxNumFeatures);
}
//for(F feature : feature2freq.keySet())
//System.out.println(feature+" "+feature2freq.getCount(feature));
//System.exit(0);
return Counters.toSortedList(feature2freq);
} | java | {
"resource": ""
} |
q12414 | LinearClassifierFactory.trainClassifierV | train | public LinearClassifier<L, F> trainClassifierV(GeneralDataset<L, F> train, GeneralDataset<L, F> validation, double min, double max, boolean accuracy) {
labelIndex = train.labelIndex();
featureIndex = train.featureIndex();
this.min = min;
this.max = max;
heldOutSetSigma(train, validation);
double[][] weights = trainWeights(train);
return new LinearClassifier<L, F>(weights, train.featureIndex(), train.labelIndex());
} | java | {
"resource": ""
} |
q12415 | LinearClassifierFactory.loadFromFilename | train | public Classifier<String, String> loadFromFilename(String file) {
try {
File tgtFile = new File(file);
BufferedReader in = new BufferedReader(new FileReader(tgtFile));
// Format: read indicies first, weights, then thresholds
Index<String> labelIndex = HashIndex.loadFromReader(in);
Index<String> featureIndex = HashIndex.loadFromReader(in);
double[][] weights = new double[featureIndex.size()][labelIndex.size()];
String line = in.readLine();
int currLine = 1;
while (line != null && line.length()>0) {
String[] tuples = line.split(LinearClassifier.TEXT_SERIALIZATION_DELIMITER);
if (tuples.length != 3) {
throw new Exception("Error: incorrect number of tokens in weight specifier, line="
+currLine+" in file "+tgtFile.getAbsolutePath());
}
currLine++;
int feature = Integer.valueOf(tuples[0]);
int label = Integer.valueOf(tuples[1]);
double value = Double.valueOf(tuples[2]);
weights[feature][label] = value;
line = in.readLine();
}
// First line in thresholds is the number of thresholds
int numThresholds = Integer.valueOf(in.readLine());
double[] thresholds = new double[numThresholds];
int curr = 0;
while ((line = in.readLine()) != null) {
double tval = Double.valueOf(line.trim());
thresholds[curr++] = tval;
}
in.close();
LinearClassifier<String, String> classifier = new LinearClassifier<String, String>(weights, featureIndex, labelIndex);
return classifier;
} catch (Exception e) {
System.err.println("Error in LinearClassifierFactory, loading from file="+file);
e.printStackTrace();
return null;
}
} | java | {
"resource": ""
} |
q12416 | vpnsessionpolicy_vpnglobal_binding.get | train | public static vpnsessionpolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
vpnsessionpolicy_vpnglobal_binding obj = new vpnsessionpolicy_vpnglobal_binding();
obj.set_name(name);
vpnsessionpolicy_vpnglobal_binding response[] = (vpnsessionpolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12417 | clusternode_stats.get | train | public static clusternode_stats[] get(nitro_service service) throws Exception{
clusternode_stats obj = new clusternode_stats();
clusternode_stats[] response = (clusternode_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q12418 | clusternode_stats.get | train | public static clusternode_stats get(nitro_service service, Long nodeid) throws Exception{
clusternode_stats obj = new clusternode_stats();
obj.set_nodeid(nodeid);
clusternode_stats response = (clusternode_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q12419 | HoconConfigurationFactory.build | train | public T build(ConfigurationSourceProvider provider, String path) throws IOException, ConfigurationException {
try (InputStream input = provider.open(checkNotNull(path))) {
final JsonNode node = mapper.readTree(hoconFactory.createParser(input));
return build(node, path);
} catch (ConfigException e) {
ConfigurationParsingException.Builder builder = ConfigurationParsingException
.builder("Malformed HOCON")
.setCause(e)
.setDetail(e.getMessage());
ConfigOrigin origin = e.origin();
if (origin != null) {
builder.setLocation(origin.lineNumber(), 0);
}
throw builder.build(path);
}
} | java | {
"resource": ""
} |
q12420 | HoconConfigurationFactory.build | train | public T build(File file) throws IOException, ConfigurationException {
return build(new FileConfigurationSourceProvider(), file.toString());
} | java | {
"resource": ""
} |
q12421 | bridgegroup_binding.get | train | public static bridgegroup_binding get(nitro_service service, Long id) throws Exception{
bridgegroup_binding obj = new bridgegroup_binding();
obj.set_id(id);
bridgegroup_binding response = (bridgegroup_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12422 | Morphology.lemmatize | train | private static String lemmatize(String word, String tag, Morpha lexer, boolean lowercase) {
boolean wordHasForbiddenChar = word.indexOf('_') >= 0 ||word.indexOf(' ') >= 0;
String quotedWord = word;
if (wordHasForbiddenChar) {
// choose something unlikely. Classical Vedic!
quotedWord = quotedWord.replaceAll("_", "\u1CF0");
quotedWord = quotedWord.replaceAll(" ", "\u1CF1");
}
String wordtag = quotedWord + '_' + tag;
if (DEBUG) System.err.println("Trying to normalize |" + wordtag + "|");
try {
lexer.setOption(1, lowercase);
lexer.yyreset(new StringReader(wordtag));
lexer.yybegin(Morpha.scan);
String wordRes = lexer.next();
lexer.next(); // go past tag
if (wordHasForbiddenChar) {
if (DEBUG) System.err.println("Restoring forbidden chars");
wordRes = wordRes.replaceAll("\u1CF0", "_");
wordRes = wordRes.replaceAll("\u1CF1", " ");
}
return wordRes;
} catch (IOException e) {
LOGGER.warning("Morphology.stem() had error on word " + word + "/" + tag);
return word;
}
} | java | {
"resource": ""
} |
q12423 | appqoeparameter.update | train | public static base_response update(nitro_service client, appqoeparameter resource) throws Exception {
appqoeparameter updateresource = new appqoeparameter();
updateresource.sessionlife = resource.sessionlife;
updateresource.avgwaitingclient = resource.avgwaitingclient;
updateresource.maxaltrespbandwidth = resource.maxaltrespbandwidth;
updateresource.dosattackthresh = resource.dosattackthresh;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12424 | appqoeparameter.unset | train | public static base_response unset(nitro_service client, appqoeparameter resource, String[] args) throws Exception{
appqoeparameter unsetresource = new appqoeparameter();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q12425 | appqoeparameter.get | train | public static appqoeparameter get(nitro_service service) throws Exception{
appqoeparameter obj = new appqoeparameter();
appqoeparameter[] response = (appqoeparameter[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12426 | server.add | train | public static base_response add(nitro_service client, server resource) throws Exception {
server addresource = new server();
addresource.name = resource.name;
addresource.ipaddress = resource.ipaddress;
addresource.domain = resource.domain;
addresource.translationip = resource.translationip;
addresource.translationmask = resource.translationmask;
addresource.domainresolveretry = resource.domainresolveretry;
addresource.state = resource.state;
addresource.ipv6address = resource.ipv6address;
addresource.comment = resource.comment;
addresource.td = resource.td;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q12427 | server.add | train | public static base_responses add(nitro_service client, server resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
server addresources[] = new server[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new server();
addresources[i].name = resources[i].name;
addresources[i].ipaddress = resources[i].ipaddress;
addresources[i].domain = resources[i].domain;
addresources[i].translationip = resources[i].translationip;
addresources[i].translationmask = resources[i].translationmask;
addresources[i].domainresolveretry = resources[i].domainresolveretry;
addresources[i].state = resources[i].state;
addresources[i].ipv6address = resources[i].ipv6address;
addresources[i].comment = resources[i].comment;
addresources[i].td = resources[i].td;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q12428 | server.update | train | public static base_response update(nitro_service client, server resource) throws Exception {
server updateresource = new server();
updateresource.name = resource.name;
updateresource.ipaddress = resource.ipaddress;
updateresource.domainresolveretry = resource.domainresolveretry;
updateresource.translationip = resource.translationip;
updateresource.translationmask = resource.translationmask;
updateresource.domainresolvenow = resource.domainresolvenow;
updateresource.comment = resource.comment;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12429 | server.update | train | public static base_responses update(nitro_service client, server resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
server updateresources[] = new server[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new server();
updateresources[i].name = resources[i].name;
updateresources[i].ipaddress = resources[i].ipaddress;
updateresources[i].domainresolveretry = resources[i].domainresolveretry;
updateresources[i].translationip = resources[i].translationip;
updateresources[i].translationmask = resources[i].translationmask;
updateresources[i].domainresolvenow = resources[i].domainresolvenow;
updateresources[i].comment = resources[i].comment;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | {
"resource": ""
} |
q12430 | server.get | train | public static server[] get(nitro_service service) throws Exception{
server obj = new server();
server[] response = (server[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12431 | server.get | train | public static server[] get(nitro_service service, server_args args) throws Exception{
server obj = new server();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
server[] response = (server[])obj.get_resources(service, option);
return response;
} | java | {
"resource": ""
} |
q12432 | server.get | train | public static server get(nitro_service service, String name) throws Exception{
server obj = new server();
obj.set_name(name);
server response = (server) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12433 | server.get_filtered | train | public static server[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
server obj = new server();
options option = new options();
option.set_filter(filter);
server[] response = (server[]) obj.getfiltered(service, option);
return response;
} | java | {
"resource": ""
} |
q12434 | systemglobal_auditnslogpolicy_binding.get | train | public static systemglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{
systemglobal_auditnslogpolicy_binding obj = new systemglobal_auditnslogpolicy_binding();
systemglobal_auditnslogpolicy_binding response[] = (systemglobal_auditnslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12435 | ntpstatus.get | train | public static ntpstatus get(nitro_service service) throws Exception{
ntpstatus obj = new ntpstatus();
ntpstatus[] response = (ntpstatus[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12436 | dns_stats.get | train | public static dns_stats get(nitro_service service) throws Exception{
dns_stats obj = new dns_stats();
dns_stats[] response = (dns_stats[])obj.stat_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12437 | netbridge_nsip6_binding.get | train | public static netbridge_nsip6_binding[] get(nitro_service service, String name) throws Exception{
netbridge_nsip6_binding obj = new netbridge_nsip6_binding();
obj.set_name(name);
netbridge_nsip6_binding response[] = (netbridge_nsip6_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12438 | netbridge_nsip6_binding.count | train | public static long count(nitro_service service, String name) throws Exception{
netbridge_nsip6_binding obj = new netbridge_nsip6_binding();
obj.set_name(name);
options option = new options();
option.set_count(true);
netbridge_nsip6_binding response[] = (netbridge_nsip6_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java | {
"resource": ""
} |
q12439 | appfwxmlschema.get | train | public static appfwxmlschema get(nitro_service service) throws Exception{
appfwxmlschema obj = new appfwxmlschema();
appfwxmlschema[] response = (appfwxmlschema[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12440 | appfwxmlschema.get | train | public static appfwxmlschema get(nitro_service service, String name) throws Exception{
appfwxmlschema obj = new appfwxmlschema();
obj.set_name(name);
appfwxmlschema response = (appfwxmlschema) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12441 | Americanize.apply | train | public HasWord apply(HasWord w) {
String str = w.word();
String outStr = americanize(str, capitalizeTimex);
if (!outStr.equals(str)) {
w.setWord(outStr);
}
return w;
} | java | {
"resource": ""
} |
q12442 | Americanize.americanize | train | public static String americanize(String str, boolean capitalizeTimex) {
// System.err.println("str is |" + str + "|");
// System.err.println("timexMapping.contains is " +
// timexMapping.containsKey(str));
if (capitalizeTimex && timexMapping.containsKey(str)) {
return timexMapping.get(str);
} else if (mapping.containsKey(str)) {
return mapping.get(str);
} else {
for (int i = 0; i < pats.length; i++) {
Pattern ex = excepts[i];
if (ex != null) {
Matcher me = ex.matcher(str);
if (me.find()) {
continue;
}
}
Matcher m = pats[i].matcher(str);
if (m.find()) {
// System.err.println("Replacing " + word + " with " +
// pats[i].matcher(word).replaceAll(reps[i]));
return m.replaceAll(reps[i]);
}
}
return str;
}
} | java | {
"resource": ""
} |
q12443 | Americanize.main | train | public static void main(String[] args) throws IOException {
System.err.println(new Americanize());
System.err.println();
if (args.length == 0) { // stdin -> stdout:
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String line;
while((line = buf.readLine()) != null) {
for(String w : line.split("\\s+")) {
System.out.print(Americanize.americanize(w)+" ");
}
System.out.println();
}
buf.close();
}
for (String arg : args) {
System.out.print(arg);
System.out.print(" --> ");
System.out.println(americanize(arg));
}
} | java | {
"resource": ""
} |
q12444 | Interval.toValidInterval | train | public static <E extends Comparable<E>> Interval<E> toValidInterval(E a, E b) {
return toValidInterval(a,b,0);
} | java | {
"resource": ""
} |
q12445 | Interval.toValidInterval | train | public static <E extends Comparable<E>> Interval<E> toValidInterval(E a, E b, int flags) {
int comp = a.compareTo(b);
if (comp <= 0) {
return new Interval(a,b,flags);
} else {
return new Interval(b,a,flags);
}
} | java | {
"resource": ""
} |
q12446 | Interval.contains | train | public boolean contains(E p)
{
// Check that the start point is before p
boolean check1 = (includesBegin())? (first.compareTo(p) <= 0):(first.compareTo(p) < 0);
// Check that the end point is after p
boolean check2 = (includesEnd())? (second.compareTo(p) >= 0):(second.compareTo(p) > 0);
return (check1 && check2);
} | java | {
"resource": ""
} |
q12447 | Interval.isIntervalComparable | train | public boolean isIntervalComparable(Interval<E> other)
{
int flags = getRelationFlags(other);
if (checkMultipleBitSet(flags & REL_FLAGS_INTERVAL_UNKNOWN)) {
return false;
}
return checkFlagSet(flags, REL_FLAGS_INTERVAL_BEFORE) || checkFlagSet(flags, REL_FLAGS_INTERVAL_AFTER);
} | java | {
"resource": ""
} |
q12448 | Interval.compareIntervalOrder | train | public int compareIntervalOrder(Interval<E> other)
{
int flags = getRelationFlags(other);
if (checkFlagExclusiveSet(flags, REL_FLAGS_INTERVAL_BEFORE, REL_FLAGS_INTERVAL_UNKNOWN)) {
return -1;
} else if (checkFlagExclusiveSet(flags, REL_FLAGS_INTERVAL_AFTER, REL_FLAGS_INTERVAL_UNKNOWN)) {
return 1;
} else {
return 0;
}
} | java | {
"resource": ""
} |
q12449 | Interval.getRelationFlags | train | public int getRelationFlags(Interval<E> other)
{
if (other == null) return 0;
int flags = 0;
int comp11 = this.first.compareTo(other.first()); // 3 choices
flags |= toRelFlags(comp11, REL_FLAGS_SS_SHIFT);
int comp22 = this.second.compareTo(other.second()); // 3 choices
flags |= toRelFlags(comp22, REL_FLAGS_EE_SHIFT);
int comp12 = this.first.compareTo(other.second()); // 3 choices
flags |= toRelFlags(comp12, REL_FLAGS_SE_SHIFT);
int comp21 = this.second.compareTo(other.first()); // 3 choices
flags |= toRelFlags(comp21, REL_FLAGS_ES_SHIFT);
flags = addIntervalRelationFlags(flags, false);
return flags;
} | java | {
"resource": ""
} |
q12450 | Interval.checkMultipleBitSet | train | public static boolean checkMultipleBitSet(int flags) {
boolean set = false;
while (flags != 0) {
if ((flags & 0x01) != 0) {
if (set) { return false; }
else { set = true; }
}
flags = flags >> 1;
}
return false;
} | java | {
"resource": ""
} |
q12451 | Interval.checkFlagExclusiveSet | train | public static boolean checkFlagExclusiveSet(int flags, int flag, int mask)
{
int f = flags & flag;
if (f != 0) {
return ((flags & mask & ~flag) != 0)? false:true;
} else {
return false;
}
} | java | {
"resource": ""
} |
q12452 | Interval.getRelation | train | public RelType getRelation(Interval<E> other) {
// TODO: Handle open/closed intervals?
if (other == null) return RelType.NONE;
int comp11 = this.first.compareTo(other.first()); // 3 choices
int comp22 = this.second.compareTo(other.second()); // 3 choices
if (comp11 == 0) {
if (comp22 == 0) {
// |---| this
// |---| other
return RelType.EQUAL;
} if (comp22 < 0) {
// SAME START - this finishes before other
// |---| this
// |------| other
return RelType.INSIDE;
} else {
// SAME START - this finishes after other
// |------| this
// |---| other
return RelType.CONTAIN;
}
} else if (comp22 == 0) {
if (comp11 < 0) {
// SAME FINISH - this start before other
// |------| this
// |---| other
return RelType.CONTAIN;
} else /*if (comp11 > 0) */ {
// SAME FINISH - this starts after other
// |---| this
// |------| other
return RelType.INSIDE;
}
} else if (comp11 > 0 && comp22 < 0) {
// |---| this
// |---------| other
return RelType.INSIDE;
} else if (comp11 < 0 && comp22 > 0) {
// |---------| this
// |---| other
return RelType.CONTAIN;
} else {
int comp12 = this.first.compareTo(other.second());
int comp21 = this.second.compareTo(other.first());
if (comp12 > 0) {
// |---| this
// |---| other
return RelType.AFTER;
} else if (comp21 < 0) {
// |---| this
// |---| other
return RelType.BEFORE;
} else if (comp12 == 0) {
// |---| this
// |---| other
return RelType.BEGIN_MEET_END;
} else if (comp21 == 0) {
// |---| this
// |---| other
return RelType.END_MEET_BEGIN;
} else {
return RelType.OVERLAP;
}
}
} | java | {
"resource": ""
} |
q12453 | vpnglobal_vpnurl_binding.get | train | public static vpnglobal_vpnurl_binding[] get(nitro_service service) throws Exception{
vpnglobal_vpnurl_binding obj = new vpnglobal_vpnurl_binding();
vpnglobal_vpnurl_binding response[] = (vpnglobal_vpnurl_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12454 | streamselector.add | train | public static base_response add(nitro_service client, streamselector resource) throws Exception {
streamselector addresource = new streamselector();
addresource.name = resource.name;
addresource.rule = resource.rule;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q12455 | streamselector.update | train | public static base_response update(nitro_service client, streamselector resource) throws Exception {
streamselector updateresource = new streamselector();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12456 | streamselector.get | train | public static streamselector[] get(nitro_service service) throws Exception{
streamselector obj = new streamselector();
streamselector[] response = (streamselector[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12457 | streamselector.get | train | public static streamselector get(nitro_service service, String name) throws Exception{
streamselector obj = new streamselector();
obj.set_name(name);
streamselector response = (streamselector) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12458 | appfwglobal_appfwpolicy_binding.get | train | public static appfwglobal_appfwpolicy_binding[] get(nitro_service service) throws Exception{
appfwglobal_appfwpolicy_binding obj = new appfwglobal_appfwpolicy_binding();
appfwglobal_appfwpolicy_binding response[] = (appfwglobal_appfwpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12459 | appfwprofile_fieldconsistency_binding.get | train | public static appfwprofile_fieldconsistency_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_fieldconsistency_binding obj = new appfwprofile_fieldconsistency_binding();
obj.set_name(name);
appfwprofile_fieldconsistency_binding response[] = (appfwprofile_fieldconsistency_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12460 | dnsparameter.update | train | public static base_response update(nitro_service client, dnsparameter resource) throws Exception {
dnsparameter updateresource = new dnsparameter();
updateresource.retries = resource.retries;
updateresource.minttl = resource.minttl;
updateresource.maxttl = resource.maxttl;
updateresource.cacherecords = resource.cacherecords;
updateresource.namelookuppriority = resource.namelookuppriority;
updateresource.recursion = resource.recursion;
updateresource.resolutionorder = resource.resolutionorder;
updateresource.dnssec = resource.dnssec;
updateresource.maxpipeline = resource.maxpipeline;
updateresource.dnsrootreferral = resource.dnsrootreferral;
updateresource.dns64timeout = resource.dns64timeout;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12461 | dnsparameter.unset | train | public static base_response unset(nitro_service client, dnsparameter resource, String[] args) throws Exception{
dnsparameter unsetresource = new dnsparameter();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q12462 | dnsparameter.get | train | public static dnsparameter get(nitro_service service) throws Exception{
dnsparameter obj = new dnsparameter();
dnsparameter[] response = (dnsparameter[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12463 | MtasSolrComponentCollection.stringToStringValues | train | private static HashSet<String> stringToStringValues(String stringValue)
throws IOException {
// should be improved to support escaped characters
HashSet<String> stringValues = new HashSet<>();
JSONParser jsonParser = new JSONParser(stringValue);
int event = jsonParser.nextEvent();
if (event == JSONParser.ARRAY_START) {
while ((event = jsonParser.nextEvent()) != JSONParser.ARRAY_END) {
if (jsonParser.getLevel() == 1) {
switch (event) {
case JSONParser.STRING:
stringValues.add(jsonParser.getString());
break;
case JSONParser.BIGNUMBER:
case JSONParser.NUMBER:
case JSONParser.LONG:
stringValues.add(jsonParser.getNumberChars().toString());
break;
case JSONParser.BOOLEAN:
stringValues.add(Boolean.toString(jsonParser.getBoolean()));
break;
default:
// do nothing
break;
}
}
}
} else {
throw new IOException("unsupported json structure");
}
return stringValues;
} | java | {
"resource": ""
} |
q12464 | systemglobal_binding.get | train | public static systemglobal_binding get(nitro_service service) throws Exception{
systemglobal_binding obj = new systemglobal_binding();
systemglobal_binding response = (systemglobal_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12465 | AbstractDependencyGrammar.intern | train | protected IntDependency intern(IntTaggedWord headTW, IntTaggedWord argTW, boolean leftHeaded, short dist) {
Map<IntDependency,IntDependency> map = expandDependencyMap;
IntDependency internTempDependency = new IntDependency(itwInterner.intern(headTW), itwInterner.intern(argTW), leftHeaded, dist);
IntDependency returnDependency = internTempDependency;
if (map != null) {
returnDependency = map.get(internTempDependency);
if (returnDependency == null) {
map.put(internTempDependency, internTempDependency);
returnDependency = internTempDependency;
}
}
return returnDependency;
} | java | {
"resource": ""
} |
q12466 | LVMorphologyReaderAndWriter.getAnalyzer | train | public static Analyzer getAnalyzer() {
if (analyzer == null ) initAnalyzer();
if (!analyzer.enableGuessing)
System.err.println("Morphologic analyzer has disabled out-of-vocabulary guessing - this will reduce tagging accuracy");
return analyzer;
} | java | {
"resource": ""
} |
q12467 | LVMorphologyReaderAndWriter.applyLVmorphoanalysis | train | private static void applyLVmorphoanalysis(CoreLabel wi, Collection<String> answerAttributes) {
Word analysis = analyzer.analyze(wi.word());
applyLVmorphoanalysis(wi, analysis, answerAttributes);
} | java | {
"resource": ""
} |
q12468 | sslpolicy_sslglobal_binding.get | train | public static sslpolicy_sslglobal_binding[] get(nitro_service service, String name) throws Exception{
sslpolicy_sslglobal_binding obj = new sslpolicy_sslglobal_binding();
obj.set_name(name);
sslpolicy_sslglobal_binding response[] = (sslpolicy_sslglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12469 | MtasDataItemNumberComparator.recomputeBoundary | train | public MtasDataItemNumberComparator<T> recomputeBoundary(int n)
throws IOException {
if (sortDirection.equals(CodecUtil.SORT_DESC)) {
if (value instanceof Integer) {
return new MtasDataItemNumberComparator(
Math.floorDiv((Integer) value, n), sortDirection);
} else if (value instanceof Long) {
return new MtasDataItemNumberComparator(Math.floorDiv((Long) value, n),
sortDirection);
} else if (value instanceof Float) {
return new MtasDataItemNumberComparator(((Float) value) / n,
sortDirection);
} else if (value instanceof Double) {
return new MtasDataItemNumberComparator(((Double) value) / n,
sortDirection);
} else {
throw new IOException("unknown NumberComparator");
}
} else if (sortDirection.equals(CodecUtil.SORT_ASC)) {
return new MtasDataItemNumberComparator(getValue(), sortDirection);
} else {
throw new IOException("unknown sortDirection " + sortDirection);
}
} | java | {
"resource": ""
} |
q12470 | authenticationradiuspolicy_binding.get | train | public static authenticationradiuspolicy_binding get(nitro_service service, String name) throws Exception{
authenticationradiuspolicy_binding obj = new authenticationradiuspolicy_binding();
obj.set_name(name);
authenticationradiuspolicy_binding response = (authenticationradiuspolicy_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12471 | Treebank.decimate | train | public void decimate(Writer trainW, Writer devW, Writer testW) throws IOException {
PrintWriter trainPW = new PrintWriter(trainW, true);
PrintWriter devPW = new PrintWriter(devW, true);
PrintWriter testPW = new PrintWriter(testW, true);
int i = 0;
for (Tree t : this) {
if (i == 8) {
t.pennPrint(devPW);
} else if (i == 9) {
t.pennPrint(testPW);
} else {
t.pennPrint(trainPW);
}
i = (i+1) % 10;
}
} | java | {
"resource": ""
} |
q12472 | crvserver_cspolicy_binding.get | train | public static crvserver_cspolicy_binding[] get(nitro_service service, String name) throws Exception{
crvserver_cspolicy_binding obj = new crvserver_cspolicy_binding();
obj.set_name(name);
crvserver_cspolicy_binding response[] = (crvserver_cspolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12473 | MtasXMLParser.printConfigMappingTypes | train | private String printConfigMappingTypes(
Map<QName, MtasParserType<MtasParserMapping<?>>> types) {
StringBuilder text = new StringBuilder();
for (Entry<QName, MtasParserType<MtasParserMapping<?>>> entry : types
.entrySet()) {
text.append("- " + entry.getKey().getLocalPart() + ": "
+ entry.getValue().items.size() + " mapping(s)\n");
for (int i = 0; i < entry.getValue().items.size(); i++) {
text.append("\t" + entry.getValue().items.get(i) + "\n");
}
}
return text.toString();
} | java | {
"resource": ""
} |
q12474 | MtasXMLParser.recursiveCollect | train | private Collection<? extends String> recursiveCollect(String refId,
Map<String, SortedSet<String>> relationKeyMap, int maxRecursion) {
Set<String> list = new HashSet<>();
if (maxRecursion > 0 && relationKeyMap.containsKey(refId)) {
SortedSet<String> subList = relationKeyMap.get(refId);
for (String subRefId : subList) {
list.add(subRefId);
list.addAll(
recursiveCollect(subRefId, relationKeyMap, maxRecursion - 1));
}
}
return list;
} | java | {
"resource": ""
} |
q12475 | MtasXMLParser.getQName | train | private QName getQName(String key) {
QName qname;
if ((qname = qNames.get(key)) == null) {
qname = new QName(namespaceURI, key);
qNames.put(key, qname);
}
return qname;
} | java | {
"resource": ""
} |
q12476 | MtasXMLParser.collectAttributes | train | public void collectAttributes(MtasParserObject currentObject,
XMLStreamReader streamReader) {
String attributeNamespaceURI;
currentObject.objectAttributes.clear();
currentObject.objectId = streamReader.getAttributeValue(namespaceURI_id,
"id");
for (int i = 0; i < streamReader.getAttributeCount(); i++) {
attributeNamespaceURI = streamReader.getAttributeNamespace(i);
if (attributeNamespaceURI == null || attributeNamespaceURI.equals("")) {
attributeNamespaceURI = streamReader.getNamespaceURI();
}
if (namespaceURI == null || attributeNamespaceURI.equals(namespaceURI)) {
currentObject.objectAttributes.put(
streamReader.getAttributeLocalName(i),
streamReader.getAttributeValue(i));
} else {
HashMap<String, String> otherMap;
if(!currentObject.objectOtherAttributes.containsKey(attributeNamespaceURI)) {
otherMap = new HashMap<>();
currentObject.objectOtherAttributes.put(attributeNamespaceURI, otherMap);
} else {
otherMap = currentObject.objectOtherAttributes.get(attributeNamespaceURI);
}
otherMap.put(
streamReader.getAttributeLocalName(i),
streamReader.getAttributeValue(i));
}
}
} | java | {
"resource": ""
} |
q12477 | MtasCRMParser.processCRMSentence | train | private Set<MtasParserObject> processCRMSentence(
MtasTokenIdFactory mtasTokenIdFactory, String name, String text,
Integer currentOffset,
List<MtasCRMParserFunctionOutput> functionOutputList,
MtasCRMAncestors unknownAncestors,
Map<String, List<MtasParserObject>> currentList,
Map<String, Map<Integer, Set<String>>> updateList,
Map<String, Set<Integer>> idPositions, Map<String, Integer[]> idOffsets,
Set<MtasParserObject> previous, Set<MtasParserObject> previousClause)
throws MtasParserException, MtasConfigException {
MtasParserType tmpCurrentType;
MtasParserObject currentObject;
if ((tmpCurrentType = crmSentenceTypes.get(name)) != null) {
String filteredText = text.replaceAll("[^0-9\\-]", "");
currentObject = new MtasParserObject(tmpCurrentType);
currentObject.setUnknownAncestorNumber(unknownAncestors.unknown);
currentObject.setRealOffsetStart(currentOffset);
currentObject.setText(filteredText);
if (!prevalidateObject(currentObject, currentList)) {
return new HashSet<>();
} else {
closePrevious(mtasTokenIdFactory, previousClause, currentOffset,
unknownAncestors, currentList, updateList, idPositions, idOffsets);
closePrevious(mtasTokenIdFactory, previous, currentOffset,
unknownAncestors, currentList, updateList, idPositions, idOffsets);
previous.clear();
currentList.get(MAPPING_TYPE_GROUP).add(currentObject);
unknownAncestors.unknown = 0;
return new HashSet<>(Arrays.asList(currentObject));
}
}
return new HashSet<>();
} | java | {
"resource": ""
} |
q12478 | MtasCRMParser.closePrevious | train | private void closePrevious(MtasTokenIdFactory mtasTokenIdFactory,
Set<MtasParserObject> previous, Integer currentOffset,
MtasCRMAncestors unknownAncestors,
Map<String, List<MtasParserObject>> currentList,
Map<String, Map<Integer, Set<String>>> updateList,
Map<String, Set<Integer>> idPositions, Map<String, Integer[]> idOffsets)
throws MtasParserException, MtasConfigException {
for (MtasParserObject previousObject : previous) {
previousObject.setRealOffsetEnd(currentOffset);
idPositions.put(previousObject.getId(), previousObject.getPositions());
idOffsets.put(previousObject.getId(), previousObject.getOffset());
previousObject.updateMappings(idPositions, idOffsets);
unknownAncestors.unknown = previousObject.getUnknownAncestorNumber();
computeMappingsFromObject(mtasTokenIdFactory, previousObject, currentList,
updateList);
currentList.get(MAPPING_TYPE_GROUP).remove(previousObject);
}
} | java | {
"resource": ""
} |
q12479 | MtasCRMParser.processFunctions | train | private void processFunctions(String name, String text, String type,
List<MtasCRMParserFunctionOutput> functionOutputList) {
if (functions.containsKey(type) && functions.get(type).containsKey(name)
&& text != null) {
MtasCRMParserFunction function = functions.get(type).get(name);
String[] value;
if (function.split != null) {
value = text.split(Pattern.quote(function.split));
} else {
value = new String[] { text };
}
for (int c = 0; c < value.length; c++) {
boolean checkedEmpty = false;
if (value[c].equals("")) {
checkedEmpty = true;
}
if (function.output.containsKey(value[c])) {
ArrayList<MtasCRMParserFunctionOutput> list = function.output
.get(value[c]);
for (MtasCRMParserFunctionOutput listItem : list) {
functionOutputList.add(listItem.create(value[c]));
}
}
if (!checkedEmpty && function.output.containsKey("")) {
ArrayList<MtasCRMParserFunctionOutput> list = function.output.get("");
for (MtasCRMParserFunctionOutput listItem : list) {
functionOutputList.add(listItem.create(value[c]));
}
}
}
}
} | java | {
"resource": ""
} |
q12480 | MtasCRMParser.printConfigTypes | train | private String printConfigTypes(
HashMap<?, MtasParserType<MtasParserMapping<?>>> types) {
StringBuilder text = new StringBuilder();
for (Entry<?, MtasParserType<MtasParserMapping<?>>> entry : types
.entrySet()) {
text.append("- " + entry.getKey() + ": " + entry.getValue().items.size()
+ " mapping(s)\n");
for (int i = 0; i < entry.getValue().items.size(); i++) {
text.append("\t" + entry.getValue().items.get(i) + "\n");
}
}
return text.toString();
} | java | {
"resource": ""
} |
q12481 | MtasIgnoreItem.getMinStartPosition | train | public int getMinStartPosition(int docId, int position) throws IOException {
if (ignoreSpans != null && docId == currentDocId) {
if (position < minimumPosition) {
throw new IOException(
"Unexpected position, should be >= " + minimumPosition + "!");
} else {
computeFullStartPositionMinimum(position);
if (minFullStartPosition.containsKey(position)) {
return minFullStartPosition.get(position);
} else {
return 0;
}
}
} else {
return 0;
}
} | java | {
"resource": ""
} |
q12482 | MtasIgnoreItem.getMaxEndPosition | train | public int getMaxEndPosition(int docId, int position) throws IOException {
if (ignoreSpans != null && docId == currentDocId) {
if (position < minimumPosition) {
throw new IOException(
"Unexpected position, should be >= " + minimumPosition + "!");
}
computeFullEndPositionList(position);
if (maxFullEndPosition.containsKey(position)) {
return maxFullEndPosition.get(position);
} else {
return 0;
}
} else {
return 0;
}
} | java | {
"resource": ""
} |
q12483 | MtasIgnoreItem.getFullEndPositionList | train | public Set<Integer> getFullEndPositionList(int docId, int position)
throws IOException {
if (ignoreSpans != null && docId == currentDocId) {
if (position < minimumPosition) {
throw new IOException(
"Unexpected startPosition, should be >= " + minimumPosition + "!");
} else {
computeFullEndPositionList(position);
return fullEndPositionList.get(position);
}
} else {
return null;
}
} | java | {
"resource": ""
} |
q12484 | MtasIgnoreItem.computeFullStartPositionMinimum | train | private void computeFullStartPositionMinimum(int position)
throws IOException {
if (ignoreSpans != null && !minFullStartPosition.containsKey(position)) {
HashSet<Integer> list = baseStartPositionList.get(position);
HashSet<Integer> newList = new HashSet<>();
int minimumStartPosition = position;
while (list != null && !list.isEmpty()) {
newList.clear();
for (int startPosition : list) {
if (minFullStartPosition.containsKey(startPosition)) {
minimumStartPosition = Math.min(minimumStartPosition,
minFullStartPosition.get(startPosition));
} else if (baseStartPositionList.containsKey(startPosition)) {
newList.addAll(baseStartPositionList.get(startPosition));
} else {
if (startPosition < minimumStartPosition) {
minimumStartPosition = startPosition;
}
}
}
list.clear();
list.addAll(newList);
}
minFullStartPosition.put(position, minimumStartPosition);
}
} | java | {
"resource": ""
} |
q12485 | MtasIgnoreItem.computeFullEndPositionList | train | private void computeFullEndPositionList(int position) throws IOException {
if (ignoreSpans != null && !fullEndPositionList.containsKey(position)) {
// initial fill
moveTo(position);
HashSet<Integer> list = baseEndPositionList.get(position);
if (list != null && !list.isEmpty()) {
int maxEndPosition = maxBaseEndPosition.get(position);
HashSet<Integer> checkList = new HashSet<>();
HashSet<Integer> subCheckList = new HashSet<>();
checkList.addAll(list);
int depth = 1;
while (!checkList.isEmpty()) {
if (depth > maximumIgnoreLength) {
checkList.clear();
subCheckList.clear();
throw new IOException("too many successive ignores, maximum is "
+ maximumIgnoreLength);
} else {
for (Integer checkItem : checkList) {
if (fullEndPositionList.get(checkItem) != null) {
list.addAll(fullEndPositionList.get(checkItem));
maxEndPosition = Math.max(maxEndPosition,
maxFullEndPosition.get(checkItem));
} else {
moveTo(checkItem);
if (baseEndPositionList.containsKey(checkItem)) {
list.addAll(baseEndPositionList.get(checkItem));
maxEndPosition = Math.max(maxEndPosition,
maxBaseEndPosition.get(checkItem));
subCheckList.addAll(baseEndPositionList.get(checkItem));
} else {
// ready for checkItem
}
}
}
checkList.clear();
checkList.addAll(subCheckList);
subCheckList.clear();
depth++;
}
}
fullEndPositionList.put(position, list);
maxFullEndPosition.put(position, (maxEndPosition - position));
} else {
fullEndPositionList.put(position, null);
maxFullEndPosition.put(position, 0);
}
}
} | java | {
"resource": ""
} |
q12486 | MtasIgnoreItem.moveTo | train | private void moveTo(int position) {
while (position >= currentPosition) {
try {
currentPosition = ignoreSpans.nextStartPosition();
if (currentPosition != Spans.NO_MORE_POSITIONS
&& currentPosition >= minimumPosition) {
if (!baseEndPositionList.containsKey(currentPosition)) {
baseEndPositionList.put(currentPosition, new HashSet<Integer>());
maxBaseEndPosition.put(currentPosition, currentPosition);
} else {
maxBaseEndPosition.put(currentPosition,
Math.max(maxBaseEndPosition.get(currentPosition),
ignoreSpans.endPosition()));
}
if (!baseStartPositionList.containsKey(ignoreSpans.endPosition())) {
baseStartPositionList.put(ignoreSpans.endPosition(),
new HashSet<Integer>());
minBaseStartPosition.put(ignoreSpans.endPosition(),
ignoreSpans.endPosition());
} else {
minBaseStartPosition.put(ignoreSpans.endPosition(),
Math.min(minBaseStartPosition.get(ignoreSpans.endPosition()),
currentPosition));
}
baseStartPositionList.get(ignoreSpans.endPosition())
.add(currentPosition);
baseEndPositionList.get(currentPosition)
.add(ignoreSpans.endPosition());
}
} catch (IOException e) {
log.debug(e);
currentPosition = Spans.NO_MORE_POSITIONS;
break;
}
}
} | java | {
"resource": ""
} |
q12487 | MtasIgnoreItem.removeBefore | train | public void removeBefore(int docId, int position) {
if (ignoreSpans != null && docId == currentDocId) {
baseStartPositionList.entrySet()
.removeIf(entry -> entry.getKey() < position);
baseEndPositionList.entrySet()
.removeIf(entry -> entry.getKey() < position);
fullEndPositionList.entrySet()
.removeIf(entry -> entry.getKey() < position);
minBaseStartPosition.entrySet()
.removeIf(entry -> entry.getKey() < position);
maxBaseEndPosition.entrySet()
.removeIf(entry -> entry.getKey() < position);
minFullStartPosition.entrySet()
.removeIf(entry -> entry.getKey() < position);
maxFullEndPosition.entrySet()
.removeIf(entry -> entry.getKey() < position);
if (minimumPosition < position) {
minimumPosition = position;
}
if (currentPosition < position) {
currentPosition = position;
}
}
} | java | {
"resource": ""
} |
q12488 | vpnvserver_authenticationlocalpolicy_binding.get | train | public static vpnvserver_authenticationlocalpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationlocalpolicy_binding obj = new vpnvserver_authenticationlocalpolicy_binding();
obj.set_name(name);
vpnvserver_authenticationlocalpolicy_binding response[] = (vpnvserver_authenticationlocalpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12489 | gslbvserver.add | train | public static base_response add(nitro_service client, gslbvserver resource) throws Exception {
gslbvserver addresource = new gslbvserver();
addresource.name = resource.name;
addresource.servicetype = resource.servicetype;
addresource.iptype = resource.iptype;
addresource.dnsrecordtype = resource.dnsrecordtype;
addresource.lbmethod = resource.lbmethod;
addresource.backupsessiontimeout = resource.backupsessiontimeout;
addresource.backuplbmethod = resource.backuplbmethod;
addresource.netmask = resource.netmask;
addresource.v6netmasklen = resource.v6netmasklen;
addresource.tolerance = resource.tolerance;
addresource.persistencetype = resource.persistencetype;
addresource.persistenceid = resource.persistenceid;
addresource.persistmask = resource.persistmask;
addresource.v6persistmasklen = resource.v6persistmasklen;
addresource.timeout = resource.timeout;
addresource.edr = resource.edr;
addresource.mir = resource.mir;
addresource.disableprimaryondown = resource.disableprimaryondown;
addresource.dynamicweight = resource.dynamicweight;
addresource.state = resource.state;
addresource.considereffectivestate = resource.considereffectivestate;
addresource.comment = resource.comment;
addresource.somethod = resource.somethod;
addresource.sopersistence = resource.sopersistence;
addresource.sopersistencetimeout = resource.sopersistencetimeout;
addresource.sothreshold = resource.sothreshold;
addresource.sobackupaction = resource.sobackupaction;
addresource.appflowlog = resource.appflowlog;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q12490 | gslbvserver.add | train | public static base_responses add(nitro_service client, gslbvserver resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbvserver addresources[] = new gslbvserver[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new gslbvserver();
addresources[i].name = resources[i].name;
addresources[i].servicetype = resources[i].servicetype;
addresources[i].iptype = resources[i].iptype;
addresources[i].dnsrecordtype = resources[i].dnsrecordtype;
addresources[i].lbmethod = resources[i].lbmethod;
addresources[i].backupsessiontimeout = resources[i].backupsessiontimeout;
addresources[i].backuplbmethod = resources[i].backuplbmethod;
addresources[i].netmask = resources[i].netmask;
addresources[i].v6netmasklen = resources[i].v6netmasklen;
addresources[i].tolerance = resources[i].tolerance;
addresources[i].persistencetype = resources[i].persistencetype;
addresources[i].persistenceid = resources[i].persistenceid;
addresources[i].persistmask = resources[i].persistmask;
addresources[i].v6persistmasklen = resources[i].v6persistmasklen;
addresources[i].timeout = resources[i].timeout;
addresources[i].edr = resources[i].edr;
addresources[i].mir = resources[i].mir;
addresources[i].disableprimaryondown = resources[i].disableprimaryondown;
addresources[i].dynamicweight = resources[i].dynamicweight;
addresources[i].state = resources[i].state;
addresources[i].considereffectivestate = resources[i].considereffectivestate;
addresources[i].comment = resources[i].comment;
addresources[i].somethod = resources[i].somethod;
addresources[i].sopersistence = resources[i].sopersistence;
addresources[i].sopersistencetimeout = resources[i].sopersistencetimeout;
addresources[i].sothreshold = resources[i].sothreshold;
addresources[i].sobackupaction = resources[i].sobackupaction;
addresources[i].appflowlog = resources[i].appflowlog;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q12491 | gslbvserver.update | train | public static base_response update(nitro_service client, gslbvserver resource) throws Exception {
gslbvserver updateresource = new gslbvserver();
updateresource.name = resource.name;
updateresource.iptype = resource.iptype;
updateresource.dnsrecordtype = resource.dnsrecordtype;
updateresource.backupvserver = resource.backupvserver;
updateresource.backupsessiontimeout = resource.backupsessiontimeout;
updateresource.lbmethod = resource.lbmethod;
updateresource.backuplbmethod = resource.backuplbmethod;
updateresource.netmask = resource.netmask;
updateresource.v6netmasklen = resource.v6netmasklen;
updateresource.tolerance = resource.tolerance;
updateresource.persistencetype = resource.persistencetype;
updateresource.persistenceid = resource.persistenceid;
updateresource.persistmask = resource.persistmask;
updateresource.v6persistmasklen = resource.v6persistmasklen;
updateresource.timeout = resource.timeout;
updateresource.edr = resource.edr;
updateresource.mir = resource.mir;
updateresource.disableprimaryondown = resource.disableprimaryondown;
updateresource.dynamicweight = resource.dynamicweight;
updateresource.considereffectivestate = resource.considereffectivestate;
updateresource.somethod = resource.somethod;
updateresource.sopersistence = resource.sopersistence;
updateresource.sopersistencetimeout = resource.sopersistencetimeout;
updateresource.sothreshold = resource.sothreshold;
updateresource.sobackupaction = resource.sobackupaction;
updateresource.servicename = resource.servicename;
updateresource.weight = resource.weight;
updateresource.domainname = resource.domainname;
updateresource.ttl = resource.ttl;
updateresource.backupip = resource.backupip;
updateresource.cookie_domain = resource.cookie_domain;
updateresource.cookietimeout = resource.cookietimeout;
updateresource.sitedomainttl = resource.sitedomainttl;
updateresource.comment = resource.comment;
updateresource.appflowlog = resource.appflowlog;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12492 | gslbvserver.disable | train | public static base_responses disable(nitro_service client, String name[]) throws Exception {
base_responses result = null;
if (name != null && name.length > 0) {
gslbvserver disableresources[] = new gslbvserver[name.length];
for (int i=0;i<name.length;i++){
disableresources[i] = new gslbvserver();
disableresources[i].name = name[i];
}
result = perform_operation_bulk_request(client, disableresources,"disable");
}
return result;
} | java | {
"resource": ""
} |
q12493 | gslbvserver.get | train | public static gslbvserver[] get(nitro_service service) throws Exception{
gslbvserver obj = new gslbvserver();
gslbvserver[] response = (gslbvserver[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12494 | gslbvserver.get | train | public static gslbvserver get(nitro_service service, String name) throws Exception{
gslbvserver obj = new gslbvserver();
obj.set_name(name);
gslbvserver response = (gslbvserver) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12495 | transformprofile.add | train | public static base_response add(nitro_service client, transformprofile resource) throws Exception {
transformprofile addresource = new transformprofile();
addresource.name = resource.name;
addresource.type = resource.type;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q12496 | transformprofile.update | train | public static base_response update(nitro_service client, transformprofile resource) throws Exception {
transformprofile updateresource = new transformprofile();
updateresource.name = resource.name;
updateresource.type = resource.type;
updateresource.onlytransformabsurlinbody = resource.onlytransformabsurlinbody;
updateresource.comment = resource.comment;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12497 | transformprofile.update | train | public static base_responses update(nitro_service client, transformprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
transformprofile updateresources[] = new transformprofile[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new transformprofile();
updateresources[i].name = resources[i].name;
updateresources[i].type = resources[i].type;
updateresources[i].onlytransformabsurlinbody = resources[i].onlytransformabsurlinbody;
updateresources[i].comment = resources[i].comment;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | {
"resource": ""
} |
q12498 | transformprofile.get | train | public static transformprofile[] get(nitro_service service) throws Exception{
transformprofile obj = new transformprofile();
transformprofile[] response = (transformprofile[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12499 | transformprofile.get | train | public static transformprofile get(nitro_service service, String name) throws Exception{
transformprofile obj = new transformprofile();
obj.set_name(name);
transformprofile response = (transformprofile) 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.