code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public static base_responses add(nitro_service client, filterhtmlinjectionvariable resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
filterhtmlinjectionvariable addresources[] = new filterhtmlinjectionvariable[resources.length];
for (int i=0;i<resou... | java |
public static base_response delete(nitro_service client, String variable) throws Exception {
filterhtmlinjectionvariable deleteresource = new filterhtmlinjectionvariable();
deleteresource.variable = variable;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, String variable[]) throws Exception {
base_responses result = null;
if (variable != null && variable.length > 0) {
filterhtmlinjectionvariable deleteresources[] = new filterhtmlinjectionvariable[variable.length];
for (int i=0;i<variable.length;i++){
... | java |
public static base_response update(nitro_service client, filterhtmlinjectionvariable resource) throws Exception {
filterhtmlinjectionvariable updateresource = new filterhtmlinjectionvariable();
updateresource.variable = resource.variable;
updateresource.value = resource.value;
return updateresource.update_resou... | java |
public static base_responses update(nitro_service client, filterhtmlinjectionvariable resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
filterhtmlinjectionvariable updateresources[] = new filterhtmlinjectionvariable[resources.length];
for (int i=0;i... | java |
public static base_response unset(nitro_service client, filterhtmlinjectionvariable resource, String[] args) throws Exception{
filterhtmlinjectionvariable unsetresource = new filterhtmlinjectionvariable();
unsetresource.variable = resource.variable;
return unsetresource.unset_resource(client,args);
} | java |
public static base_responses unset(nitro_service client, String variable[], String args[]) throws Exception {
base_responses result = null;
if (variable != null && variable.length > 0) {
filterhtmlinjectionvariable unsetresources[] = new filterhtmlinjectionvariable[variable.length];
for (int i=0;i<variable.le... | java |
public static filterhtmlinjectionvariable[] get(nitro_service service) throws Exception{
filterhtmlinjectionvariable obj = new filterhtmlinjectionvariable();
filterhtmlinjectionvariable[] response = (filterhtmlinjectionvariable[])obj.get_resources(service);
return response;
} | java |
public static filterhtmlinjectionvariable get(nitro_service service, String variable) throws Exception{
filterhtmlinjectionvariable obj = new filterhtmlinjectionvariable();
obj.set_variable(variable);
filterhtmlinjectionvariable response = (filterhtmlinjectionvariable) obj.get_resource(service);
return response... | java |
public static filterhtmlinjectionvariable[] get(nitro_service service, String variable[]) throws Exception{
if (variable !=null && variable.length>0) {
filterhtmlinjectionvariable response[] = new filterhtmlinjectionvariable[variable.length];
filterhtmlinjectionvariable obj[] = new filterhtmlinjectionvariable[v... | java |
public static lbgroup_binding get(nitro_service service, String name) throws Exception{
lbgroup_binding obj = new lbgroup_binding();
obj.set_name(name);
lbgroup_binding response = (lbgroup_binding) obj.get_resource(service);
return response;
} | java |
public static sslservicegroup_sslciphersuite_binding[] get(nitro_service service, String servicegroupname) throws Exception{
sslservicegroup_sslciphersuite_binding obj = new sslservicegroup_sslciphersuite_binding();
obj.set_servicegroupname(servicegroupname);
sslservicegroup_sslciphersuite_binding response[] = (s... | java |
public static long count(nitro_service service, String servicegroupname) throws Exception{
sslservicegroup_sslciphersuite_binding obj = new sslservicegroup_sslciphersuite_binding();
obj.set_servicegroupname(servicegroupname);
options option = new options();
option.set_count(true);
sslservicegroup_sslciphersui... | java |
public static base_response update(nitro_service client, cacheparameter resource) throws Exception {
cacheparameter updateresource = new cacheparameter();
updateresource.memlimit = resource.memlimit;
updateresource.via = resource.via;
updateresource.verifyusing = resource.verifyusing;
updateresource.maxpostle... | java |
public static base_response unset(nitro_service client, cacheparameter resource, String[] args) throws Exception{
cacheparameter unsetresource = new cacheparameter();
return unsetresource.unset_resource(client,args);
} | java |
public static cacheparameter get(nitro_service service) throws Exception{
cacheparameter obj = new cacheparameter();
cacheparameter[] response = (cacheparameter[])obj.get_resources(service);
return response[0];
} | java |
public static auditsyslogpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
auditsyslogpolicy_csvserver_binding obj = new auditsyslogpolicy_csvserver_binding();
obj.set_name(name);
auditsyslogpolicy_csvserver_binding response[] = (auditsyslogpolicy_csvserver_binding[]) obj.get_re... | java |
public static base_response clear(nitro_service client, nslimitsessions resource) throws Exception {
nslimitsessions clearresource = new nslimitsessions();
clearresource.limitidentifier = resource.limitidentifier;
return clearresource.perform_operation(client,"clear");
} | java |
public static base_responses clear(nitro_service client, nslimitsessions resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nslimitsessions clearresources[] = new nslimitsessions[resources.length];
for (int i=0;i<resources.length;i++){
clearresou... | java |
public static nslimitsessions[] get(nitro_service service, nslimitsessions_args args) throws Exception{
nslimitsessions obj = new nslimitsessions();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
nslimitsessions[] response = (nslimitsessions[])obj.get_resources... | java |
public static base_response update(nitro_service client, lbgroup resource) throws Exception {
lbgroup updateresource = new lbgroup();
updateresource.name = resource.name;
updateresource.persistencetype = resource.persistencetype;
updateresource.persistencebackup = resource.persistencebackup;
updateresource.ba... | java |
public static base_responses update(nitro_service client, lbgroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
lbgroup updateresources[] = new lbgroup[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new lbgroup... | java |
public static lbgroup[] get(nitro_service service) throws Exception{
lbgroup obj = new lbgroup();
lbgroup[] response = (lbgroup[])obj.get_resources(service);
return response;
} | java |
public static lbgroup get(nitro_service service, String name) throws Exception{
lbgroup obj = new lbgroup();
obj.set_name(name);
lbgroup response = (lbgroup) obj.get_resource(service);
return response;
} | java |
public static lbgroup[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
lbgroup obj = new lbgroup();
options option = new options();
option.set_filter(filter);
lbgroup[] response = (lbgroup[]) obj.getfiltered(service, option);
return response;
} | java |
public static base_responses add(nitro_service client, tmformssoaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
tmformssoaction addresources[] = new tmformssoaction[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i... | java |
public static tmformssoaction[] get(nitro_service service) throws Exception{
tmformssoaction obj = new tmformssoaction();
tmformssoaction[] response = (tmformssoaction[])obj.get_resources(service);
return response;
} | java |
public static tmformssoaction get(nitro_service service, String name) throws Exception{
tmformssoaction obj = new tmformssoaction();
obj.set_name(name);
tmformssoaction response = (tmformssoaction) obj.get_resource(service);
return response;
} | java |
public static crvserver_crpolicy_binding[] get(nitro_service service, String name) throws Exception{
crvserver_crpolicy_binding obj = new crvserver_crpolicy_binding();
obj.set_name(name);
crvserver_crpolicy_binding response[] = (crvserver_crpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static vpnsessionpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{
vpnsessionpolicy_vpnvserver_binding obj = new vpnsessionpolicy_vpnvserver_binding();
obj.set_name(name);
vpnsessionpolicy_vpnvserver_binding response[] = (vpnsessionpolicy_vpnvserver_binding[]) obj.get_re... | java |
public static pqpolicy_stats[] get(nitro_service service) throws Exception{
pqpolicy_stats obj = new pqpolicy_stats();
pqpolicy_stats[] response = (pqpolicy_stats[])obj.stat_resources(service);
return response;
} | java |
public static pqpolicy_stats get(nitro_service service, String policyname) throws Exception{
pqpolicy_stats obj = new pqpolicy_stats();
obj.set_policyname(policyname);
pqpolicy_stats response = (pqpolicy_stats) obj.stat_resource(service);
return response;
} | java |
public static appqoepolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
appqoepolicy_lbvserver_binding obj = new appqoepolicy_lbvserver_binding();
obj.set_name(name);
appqoepolicy_lbvserver_binding response[] = (appqoepolicy_lbvserver_binding[]) obj.get_resources(service);
retur... | java |
public static <X, Y> Map<Y, X> invert(Map<X, Y> map) {
Map<Y, X> invertedMap = new HashMap<Y, X>();
for (Map.Entry<X, Y> entry : map.entrySet()) {
X key = entry.getKey();
Y value = entry.getValue();
invertedMap.put(value, key);
}
return invertedMap;
} | java |
public static <K extends Comparable<? super K>, V> List<Map.Entry<K, V>> sortedEntries(Collection<Map.Entry<K, V>> entries) {
List<Entry<K,V>> entriesList = new ArrayList<Map.Entry<K, V>>(entries);
Collections.sort(entriesList, new Comparator<Map.Entry<K, V>>() {
public int compare(Map.Entry<K, V> e1, ... | java |
public static <K extends Comparable<? super K>, V> List<Map.Entry<K, V>> sortedEntries(Map<K, V> map) {
return sortedEntries(map.entrySet());
} | java |
public void sampleSequenceRepeatedly(SequenceModel model, int[] sequence, int numSamples) {
sequence = copy(sequence); // so we don't change the initial, or the one we just stored
listener.setInitialSequence(sequence);
for (int iter=0; iter<numSamples; iter++) {
sampleSequenceForward(model, sequen... | java |
public void sampleSequenceRepeatedly(SequenceModel model, int numSamples) {
int[] sequence = getRandomSequence(model);
sampleSequenceRepeatedly(model, sequence, numSamples);
} | java |
public void sampleSequenceForward(SequenceModel model, int[] sequence, double temperature) {
// System.err.println("Sampling forward");
for (int pos=0; pos<sequence.length; pos++) {
samplePosition(model, sequence, pos, temperature);
}
} | java |
public void sampleSequenceBackward(SequenceModel model, int[] sequence, double temperature) {
for (int pos=sequence.length-1; pos>=0; pos--) {
samplePosition(model, sequence, pos, temperature);
}
} | java |
public double samplePosition(SequenceModel model, int[] sequence, int pos, double temperature) {
double[] distribution = model.scoresOf(sequence, pos);
if (temperature!=1.0) {
if (temperature==0.0) {
// set the max to 1.0
int argmax = ArrayMath.argmax(distribution);
Arrays.fi... | java |
public static aaagroup_binding get(nitro_service service, String groupname) throws Exception{
aaagroup_binding obj = new aaagroup_binding();
obj.set_groupname(groupname);
aaagroup_binding response = (aaagroup_binding) obj.get_resource(service);
return response;
} | java |
public static gslbsyncstatus get(nitro_service service) throws Exception{
gslbsyncstatus obj = new gslbsyncstatus();
gslbsyncstatus[] response = (gslbsyncstatus[])obj.get_resources(service);
return response[0];
} | java |
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[] ... | java |
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[] = (authentic... | java |
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[]) ... | java |
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(servic... | java |
private ComponentFields getMtasFields(ResponseBuilder rb) {
return (ComponentFields) rb.req.getContext().get(ComponentFields.class);
} | java |
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();
reques... | java |
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()) {
stat... | java |
private void errorStatus(MtasSolrStatus status, IOException exception) {
try {
status.setError(exception);
if (requestHandler != null) {
requestHandler.finishStatus(status);
}
} catch (IOException e) {
log.error(e);
}
} | java |
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());
... | java |
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 |
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 |
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 |
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 |
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.dat... | java |
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);
... | java |
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);
... | java |
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_resourc... | java |
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 |
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 |
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 ... | java |
public T build(File file) throws IOException, ConfigurationException {
return build(new FileConfigurationSourceProvider(), file.toString());
} | java |
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 |
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 = quote... | java |
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 = resou... | java |
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 |
public static appqoeparameter get(nitro_service service) throws Exception{
appqoeparameter obj = new appqoeparameter();
appqoeparameter[] response = (appqoeparameter[])obj.get_resources(service);
return response[0];
} | java |
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.tra... | java |
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();
addre... | java |
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 =... | java |
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();
... | java |
public static server[] get(nitro_service service) throws Exception{
server obj = new server();
server[] response = (server[])obj.get_resources(service);
return response;
} | java |
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 |
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 |
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 |
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);
retur... | java |
public static ntpstatus get(nitro_service service) throws Exception{
ntpstatus obj = new ntpstatus();
ntpstatus[] response = (ntpstatus[])obj.get_resources(service);
return response[0];
} | java |
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 |
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 |
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,opt... | java |
public static appfwxmlschema get(nitro_service service) throws Exception{
appfwxmlschema obj = new appfwxmlschema();
appfwxmlschema[] response = (appfwxmlschema[])obj.get_resources(service);
return response[0];
} | java |
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 |
public HasWord apply(HasWord w) {
String str = w.word();
String outStr = americanize(str, capitalizeTimex);
if (!outStr.equals(str)) {
w.setWord(outStr);
}
return w;
} | java |
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.... | java |
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())... | java |
public static <E extends Comparable<E>> Interval<E> toValidInterval(E a, E b) {
return toValidInterval(a,b,0);
} | java |
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 |
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);
retu... | java |
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 |
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)) {
... | java |
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 |= toRe... | java |
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 |
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 |
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 (comp... | java |
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 |
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 |
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 |
public static streamselector[] get(nitro_service service) throws Exception{
streamselector obj = new streamselector();
streamselector[] response = (streamselector[])obj.get_resources(service);
return response;
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.