_id
stringlengths
2
7
title
stringlengths
3
140
partition
stringclasses
3 values
text
stringlengths
73
34.1k
language
stringclasses
1 value
meta_information
dict
q11200
dnscnamerec.delete
train
public static base_response delete(nitro_service client, String aliasname) throws Exception { dnscnamerec deleteresource = new dnscnamerec(); deleteresource.aliasname = aliasname; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q11201
dnscnamerec.delete
train
public static base_responses delete(nitro_service client, String aliasname[]) throws Exception { base_responses result = null; if (aliasname != null && aliasname.length > 0) { dnscnamerec deleteresources[] = new dnscnamerec[aliasname.length]; for (int i=0;i<aliasname.length;i++){ deleteresources[i] = new ...
java
{ "resource": "" }
q11202
dnscnamerec.get
train
public static dnscnamerec[] get(nitro_service service) throws Exception{ dnscnamerec obj = new dnscnamerec(); dnscnamerec[] response = (dnscnamerec[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q11203
dnscnamerec.get
train
public static dnscnamerec[] get(nitro_service service, dnscnamerec_args args) throws Exception{ dnscnamerec obj = new dnscnamerec(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); dnscnamerec[] response = (dnscnamerec[])obj.get_resources(service, option); ret...
java
{ "resource": "" }
q11204
dnscnamerec.get
train
public static dnscnamerec get(nitro_service service, String aliasname) throws Exception{ dnscnamerec obj = new dnscnamerec(); obj.set_aliasname(aliasname); dnscnamerec response = (dnscnamerec) obj.get_resource(service); return response; }
java
{ "resource": "" }
q11205
dnscnamerec.get
train
public static dnscnamerec[] get(nitro_service service, String aliasname[]) throws Exception{ if (aliasname !=null && aliasname.length>0) { dnscnamerec response[] = new dnscnamerec[aliasname.length]; dnscnamerec obj[] = new dnscnamerec[aliasname.length]; for (int i=0;i<aliasname.length;i++) { obj[i] = new...
java
{ "resource": "" }
q11206
nsacl_stats.get
train
public static nsacl_stats[] get(nitro_service service) throws Exception{ nsacl_stats obj = new nsacl_stats(); nsacl_stats[] response = (nsacl_stats[])obj.stat_resources(service); return response; }
java
{ "resource": "" }
q11207
nsacl_stats.get
train
public static nsacl_stats get(nitro_service service, String aclname) throws Exception{ nsacl_stats obj = new nsacl_stats(); obj.set_aclname(aclname); nsacl_stats response = (nsacl_stats) obj.stat_resource(service); return response; }
java
{ "resource": "" }
q11208
lbvserver_dnspolicy64_binding.get
train
public static lbvserver_dnspolicy64_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_dnspolicy64_binding obj = new lbvserver_dnspolicy64_binding(); obj.set_name(name); lbvserver_dnspolicy64_binding response[] = (lbvserver_dnspolicy64_binding[]) obj.get_resources(service); return res...
java
{ "resource": "" }
q11209
crvserver_filterpolicy_binding.get
train
public static crvserver_filterpolicy_binding[] get(nitro_service service, String name) throws Exception{ crvserver_filterpolicy_binding obj = new crvserver_filterpolicy_binding(); obj.set_name(name); crvserver_filterpolicy_binding response[] = (crvserver_filterpolicy_binding[]) obj.get_resources(service); retur...
java
{ "resource": "" }
q11210
sslpolicy_sslpolicylabel_binding.get
train
public static sslpolicy_sslpolicylabel_binding[] get(nitro_service service, String name) throws Exception{ sslpolicy_sslpolicylabel_binding obj = new sslpolicy_sslpolicylabel_binding(); obj.set_name(name); sslpolicy_sslpolicylabel_binding response[] = (sslpolicy_sslpolicylabel_binding[]) obj.get_resources(service...
java
{ "resource": "" }
q11211
ArrayHeap.extractMin
train
public E extractMin() { if (isEmpty()) { throw new NoSuchElementException(); } HeapEntry<E> minEntry = indexToEntry.get(0); int lastIndex = size() - 1; if (lastIndex > 0) { HeapEntry<E> lastEntry = indexToEntry.get(lastIndex); swap(lastEntry, minEntry); removeLast(m...
java
{ "resource": "" }
q11212
ArrayHeap.decreaseKey
train
public int decreaseKey(E o) { HeapEntry<E> entry = getEntry(o); if (o != entry.object) { if (cmp.compare(o, entry.object) < 0) { entry.object = o; } } return heapifyUp(entry); }
java
{ "resource": "" }
q11213
MtasBasicParser.createCurrentList
train
protected Map<String, List<MtasParserObject>> createCurrentList() { Map<String, List<MtasParserObject>> currentList = new HashMap<>(); currentList.put(MAPPING_TYPE_RELATION, new ArrayList<MtasParserObject>()); currentList.put(MAPPING_TYPE_RELATION_ANNOTATION, new ArrayList<MtasParserObject>()); ...
java
{ "resource": "" }
q11214
MtasBasicParser.createUpdateList
train
protected Map<String, Map<Integer, Set<String>>> createUpdateList() { Map<String, Map<Integer, Set<String>>> updateList = new HashMap<>(); updateList.put(UPDATE_TYPE_OFFSET, new HashMap<>()); updateList.put(UPDATE_TYPE_POSITION, new HashMap<>()); updateList.put(UPDATE_TYPE_LOCAL_REF_POSITION_START, new ...
java
{ "resource": "" }
q11215
MtasBasicParser.computeVariablesFromObject
train
protected void computeVariablesFromObject(MtasParserObject object, Map<String, List<MtasParserObject>> currentList, Map<String, Map<String, String>> variables) { MtasParserType<MtasParserVariable> parserType = object.getType(); String id = object.getId(); if (id != null) { for (MtasParserV...
java
{ "resource": "" }
q11216
MtasBasicParser.checkForVariables
train
private boolean checkForVariables(List<Map<String, String>> values) { if (values == null || values.isEmpty()) { return false; } else { for (Map<String, String> list : values) { if (list.containsKey("type") && list.get("type") .equals(MtasParserMapping.PARSER_TYPE_VARIABLE)) { ...
java
{ "resource": "" }
q11217
MtasBasicParser.computeTypeFromMappingSource
train
private String computeTypeFromMappingSource(String source) throws MtasParserException { if (source.equals(MtasParserMapping.SOURCE_OWN)) { return null; } else if (source.equals(MtasParserMapping.SOURCE_ANCESTOR_GROUP)) { return MAPPING_TYPE_GROUP; } else if (source .equals(MtasPars...
java
{ "resource": "" }
q11218
MtasBasicParser.computeObjectFromMappingValue
train
private MtasParserObject[] computeObjectFromMappingValue( MtasParserObject object, Map<String, String> mappingValue, Map<String, List<MtasParserObject>> currentList) throws MtasParserException { MtasParserObject[] checkObjects = null; MtasParserObject checkObject; Integer ancestorNumber = ...
java
{ "resource": "" }
q11219
MtasBasicParser.addAndEncodeVariable
train
private String addAndEncodeVariable(String originalValue, String newVariable, String newVariableName, boolean encode) { return addAndEncode(originalValue, newVariable, newVariableName, encode); }
java
{ "resource": "" }
q11220
MtasBasicParser.addAndEncodeValue
train
private String addAndEncodeValue(String originalValue, String newValue, boolean encode) { return addAndEncode(originalValue, null, newValue, encode); }
java
{ "resource": "" }
q11221
MtasBasicParser.addAndEncode
train
private String addAndEncode(String originalValue, String newType, String newValue, boolean encode) { if (newValue == null) { return originalValue; } else { String finalNewValue; if (encode) { if (newType == null) { finalNewValue = new String( enc.encode(ne...
java
{ "resource": "" }
q11222
MtasBasicParser.computePayloadFromMappingPayload
train
private BytesRef computePayloadFromMappingPayload(MtasParserObject object, List<Map<String, String>> mappingPayloads, Map<String, List<MtasParserObject>> currentList) throws MtasParserException { BytesRef payload = null; for (Map<String, String> mappingPayload : mappingPayloads) { if (ma...
java
{ "resource": "" }
q11223
MtasBasicParser.prevalidateObject
train
Boolean prevalidateObject(MtasParserObject object, Map<String, List<MtasParserObject>> currentList) { MtasParserType objectType = object.getType(); List<MtasParserMapping<?>> mappings = objectType.getItems(); if (mappings.isEmpty()) { return true; } for (MtasParserMapping<?> mapping : ma...
java
{ "resource": "" }
q11224
MtasBasicParser.postcheckMappingConditions
train
private void postcheckMappingConditions(MtasParserObject object, List<Map<String, String>> mappingConditions, Map<String, List<MtasParserObject>> currentList) throws MtasParserException { precheckMappingConditions(object, mappingConditions, currentList); for (Map<String, String> mappingConditi...
java
{ "resource": "" }
q11225
MtasBasicParser.computeFilteredSplitValues
train
private String[] computeFilteredSplitValues(String[] values, String filter) throws MtasConfigException { if (filter != null) { String[] filters = filter.split(","); boolean[] valuesFilter = new boolean[values.length]; boolean doSplitFilter = false; for (String item : filters) { ...
java
{ "resource": "" }
q11226
MtasBasicParser.computeFilteredPrefixedValue
train
private String computeFilteredPrefixedValue(String type, String value, String filter, String prefix) throws MtasConfigException { String localValue = value; // do magic with filter if (filter != null) { String[] filters = filter.split(","); for (String item : filters) { if (item.tr...
java
{ "resource": "" }
q11227
MtasBasicParser.computeMaximumFilteredPayload
train
private BytesRef computeMaximumFilteredPayload(String value, BytesRef payload, String filter) { // do magic with filter if (value != null) { if (payload != null) { Float payloadFloat = PayloadHelper.decodeFloat(payload.bytes, payload.offset); Float valueFloat = Float.pars...
java
{ "resource": "" }
q11228
EntityCachingAbstractSequencePrior.otherOccurrences
train
public int[] otherOccurrences(Entity entity){ List<Integer> other = new ArrayList<Integer>(); for (int i = 0; i < doc.size(); i++) { if (i == entity.startPosition) { continue; } if (matches(entity, i)) { other.add(Integer.valueOf(i)); } } return toArray(other); }
java
{ "resource": "" }
q11229
transformpolicylabel_binding.get
train
public static transformpolicylabel_binding get(nitro_service service, String labelname) throws Exception{ transformpolicylabel_binding obj = new transformpolicylabel_binding(); obj.set_labelname(labelname); transformpolicylabel_binding response = (transformpolicylabel_binding) obj.get_resource(service); return ...
java
{ "resource": "" }
q11230
nshttpparam.update
train
public static base_response update(nitro_service client, nshttpparam resource) throws Exception { nshttpparam updateresource = new nshttpparam(); updateresource.dropinvalreqs = resource.dropinvalreqs; updateresource.markhttp09inval = resource.markhttp09inval; updateresource.markconnreqinval = resource.markconnr...
java
{ "resource": "" }
q11231
nshttpparam.unset
train
public static base_response unset(nitro_service client, nshttpparam resource, String[] args) throws Exception{ nshttpparam unsetresource = new nshttpparam(); return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q11232
nshttpparam.get
train
public static nshttpparam get(nitro_service service) throws Exception{ nshttpparam obj = new nshttpparam(); nshttpparam[] response = (nshttpparam[])obj.get_resources(service); return response[0]; }
java
{ "resource": "" }
q11233
IntCounter.getMapFactory
train
public MapFactory<E, MutableInteger> getMapFactory() { return ErasureUtils.<MapFactory<E,MutableInteger>>uncheckedCast(mapFactory); }
java
{ "resource": "" }
q11234
IntCounter.remove
train
public double remove(E key) { totalCount -= getCount(key); // subtract removed count from total (may be 0) MutableInteger val = map.remove(key); if (val == null) { return Double.NaN; } else { return val.doubleValue(); } }
java
{ "resource": "" }
q11235
IntCounter.entrySet
train
public Set<Map.Entry<E,Double>> entrySet() { return new AbstractSet<Map.Entry<E,Double>>() { @Override public Iterator<Entry<E, Double>> iterator() { return new Iterator<Entry<E,Double>>() { final Iterator<Entry<E,MutableInteger>> inner = map.entrySet().iterator(); pu...
java
{ "resource": "" }
q11236
IntCounter.max
train
public int max() { int max = Integer.MIN_VALUE; for (E key : map.keySet()) { max = Math.max(max, getIntCount(key)); } return max; }
java
{ "resource": "" }
q11237
IntCounter.min
train
public int min() { int min = Integer.MAX_VALUE; for (E key : map.keySet()) { min = Math.min(min, getIntCount(key)); } return min; }
java
{ "resource": "" }
q11238
IntCounter.argmax
train
public E argmax(Comparator<E> tieBreaker) { int max = Integer.MIN_VALUE; E argmax = null; for (E key : keySet()) { int count = getIntCount(key); if (argmax == null || count > max || (count == max && tieBreaker.compare(key, argmax) < 0)) { max = count; argmax = key; ...
java
{ "resource": "" }
q11239
IntCounter.argmin
train
public E argmin(Comparator<E> tieBreaker) { int min = Integer.MAX_VALUE; E argmin = null; for (E key : map.keySet()) { int count = getIntCount(key); if (argmin == null || count < min || (count == min && tieBreaker.compare(key, argmin) < 0)) { min = count; argmin = key; ...
java
{ "resource": "" }
q11240
systembackup.create
train
public static base_response create(nitro_service client, systembackup resource) throws Exception { systembackup createresource = new systembackup(); createresource.filename = resource.filename; createresource.level = resource.level; createresource.comment = resource.comment; return createresource.perform_oper...
java
{ "resource": "" }
q11241
systembackup.create
train
public static base_responses create(nitro_service client, systembackup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { systembackup createresources[] = new systembackup[resources.length]; for (int i=0;i<resources.length;i++){ createresources[i...
java
{ "resource": "" }
q11242
systembackup.restore
train
public static base_response restore(nitro_service client, systembackup resource) throws Exception { systembackup restoreresource = new systembackup(); restoreresource.filename = resource.filename; return restoreresource.perform_operation(client,"restore"); }
java
{ "resource": "" }
q11243
systembackup.restore
train
public static base_responses restore(nitro_service client, systembackup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { systembackup restoreresources[] = new systembackup[resources.length]; for (int i=0;i<resources.length;i++){ restoreresource...
java
{ "resource": "" }
q11244
systembackup.delete
train
public static base_response delete(nitro_service client, String filename) throws Exception { systembackup deleteresource = new systembackup(); deleteresource.filename = filename; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q11245
systembackup.delete
train
public static base_responses delete(nitro_service client, String filename[]) throws Exception { base_responses result = null; if (filename != null && filename.length > 0) { systembackup deleteresources[] = new systembackup[filename.length]; for (int i=0;i<filename.length;i++){ deleteresources[i] = new sys...
java
{ "resource": "" }
q11246
systembackup.get
train
public static systembackup[] get(nitro_service service, options option) throws Exception{ systembackup obj = new systembackup(); systembackup[] response = (systembackup[])obj.get_resources(service,option); return response; }
java
{ "resource": "" }
q11247
systembackup.get
train
public static systembackup get(nitro_service service, String filename) throws Exception{ systembackup obj = new systembackup(); obj.set_filename(filename); systembackup response = (systembackup) obj.get_resource(service); return response; }
java
{ "resource": "" }
q11248
systembackup.get
train
public static systembackup[] get(nitro_service service, String filename[]) throws Exception{ if (filename !=null && filename.length>0) { systembackup response[] = new systembackup[filename.length]; systembackup obj[] = new systembackup[filename.length]; for (int i=0;i<filename.length;i++) { obj[i] = new ...
java
{ "resource": "" }
q11249
filterpolicy.add
train
public static base_response add(nitro_service client, filterpolicy resource) throws Exception { filterpolicy addresource = new filterpolicy(); addresource.name = resource.name; addresource.rule = resource.rule; addresource.reqaction = resource.reqaction; addresource.resaction = resource.resaction; return ad...
java
{ "resource": "" }
q11250
filterpolicy.update
train
public static base_response update(nitro_service client, filterpolicy resource) throws Exception { filterpolicy updateresource = new filterpolicy(); updateresource.name = resource.name; updateresource.rule = resource.rule; updateresource.reqaction = resource.reqaction; updateresource.resaction = resource.resa...
java
{ "resource": "" }
q11251
filterpolicy.get
train
public static filterpolicy[] get(nitro_service service) throws Exception{ filterpolicy obj = new filterpolicy(); filterpolicy[] response = (filterpolicy[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q11252
filterpolicy.get
train
public static filterpolicy get(nitro_service service, String name) throws Exception{ filterpolicy obj = new filterpolicy(); obj.set_name(name); filterpolicy response = (filterpolicy) obj.get_resource(service); return response; }
java
{ "resource": "" }
q11253
filterpolicy.get
train
public static filterpolicy[] get(nitro_service service, String name[]) throws Exception{ if (name !=null && name.length>0) { filterpolicy response[] = new filterpolicy[name.length]; filterpolicy obj[] = new filterpolicy[name.length]; for (int i=0;i<name.length;i++) { obj[i] = new filterpolicy(); obj[...
java
{ "resource": "" }
q11254
vpnurl.add
train
public static base_response add(nitro_service client, vpnurl resource) throws Exception { vpnurl addresource = new vpnurl(); addresource.urlname = resource.urlname; addresource.linkname = resource.linkname; addresource.actualurl = resource.actualurl; addresource.clientlessaccess = resource.clientlessaccess; ...
java
{ "resource": "" }
q11255
vpnurl.add
train
public static base_responses add(nitro_service client, vpnurl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnurl addresources[] = new vpnurl[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vpnurl(); addre...
java
{ "resource": "" }
q11256
vpnurl.delete
train
public static base_response delete(nitro_service client, String urlname) throws Exception { vpnurl deleteresource = new vpnurl(); deleteresource.urlname = urlname; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q11257
vpnurl.update
train
public static base_response update(nitro_service client, vpnurl resource) throws Exception { vpnurl updateresource = new vpnurl(); updateresource.urlname = resource.urlname; updateresource.linkname = resource.linkname; updateresource.actualurl = resource.actualurl; updateresource.clientlessaccess = resource.c...
java
{ "resource": "" }
q11258
vpnurl.update
train
public static base_responses update(nitro_service client, vpnurl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnurl updateresources[] = new vpnurl[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new vpnurl(); ...
java
{ "resource": "" }
q11259
vpnurl.unset
train
public static base_response unset(nitro_service client, vpnurl resource, String[] args) throws Exception{ vpnurl unsetresource = new vpnurl(); unsetresource.urlname = resource.urlname; return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q11260
vpnurl.unset
train
public static base_responses unset(nitro_service client, String urlname[], String args[]) throws Exception { base_responses result = null; if (urlname != null && urlname.length > 0) { vpnurl unsetresources[] = new vpnurl[urlname.length]; for (int i=0;i<urlname.length;i++){ unsetresources[i] = new vpnurl()...
java
{ "resource": "" }
q11261
vpnurl.get
train
public static vpnurl[] get(nitro_service service) throws Exception{ vpnurl obj = new vpnurl(); vpnurl[] response = (vpnurl[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q11262
vpnurl.get
train
public static vpnurl get(nitro_service service, String urlname) throws Exception{ vpnurl obj = new vpnurl(); obj.set_urlname(urlname); vpnurl response = (vpnurl) obj.get_resource(service); return response; }
java
{ "resource": "" }
q11263
vpnurl.get
train
public static vpnurl[] get(nitro_service service, String urlname[]) throws Exception{ if (urlname !=null && urlname.length>0) { vpnurl response[] = new vpnurl[urlname.length]; vpnurl obj[] = new vpnurl[urlname.length]; for (int i=0;i<urlname.length;i++) { obj[i] = new vpnurl(); obj[i].set_urlname(url...
java
{ "resource": "" }
q11264
BaseLexicon.ruleIteratorByWord
train
public Iterator<IntTaggedWord> ruleIteratorByWord(String word, int loc) { return ruleIteratorByWord(wordIndex.indexOf(word, true), loc, null); }
java
{ "resource": "" }
q11265
BaseLexicon.addAll
train
public void addAll(List<TaggedWord> taggedWords, double weight) { List<IntTaggedWord> tagWords = listToEvents(taggedWords); }
java
{ "resource": "" }
q11266
BaseLexicon.train
train
public final void train(Collection<Tree> trees, double weight) { // scan data for (Tree tree : trees) { train(tree, weight); } }
java
{ "resource": "" }
q11267
BaseLexicon.addTagging
train
protected void addTagging(boolean seen, IntTaggedWord itw, double count) { if (seen) { seenCounter.incrementCount(itw, count); if (itw.tag() == nullTag) { words.add(itw); } else if (itw.word() == nullWord) { tags.add(itw); } else { // rules.add(itw); } ...
java
{ "resource": "" }
q11268
BaseLexicon.writeData
train
public void writeData(Writer w) throws IOException { PrintWriter out = new PrintWriter(w); for (IntTaggedWord itw : seenCounter.keySet()) { out.println(itw.toLexicalEntry(wordIndex, tagIndex) + " SEEN " + seenCounter.getCount(itw)); } for (IntTaggedWord itw : getUnknownWordModel().unSeenCou...
java
{ "resource": "" }
q11269
nd6.add
train
public static base_response add(nitro_service client, nd6 resource) throws Exception { nd6 addresource = new nd6(); addresource.neighbor = resource.neighbor; addresource.mac = resource.mac; addresource.ifnum = resource.ifnum; addresource.vlan = resource.vlan; addresource.td = resource.td; return addresour...
java
{ "resource": "" }
q11270
nd6.add
train
public static base_responses add(nitro_service client, nd6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nd6 addresources[] = new nd6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nd6(); addresources[i].n...
java
{ "resource": "" }
q11271
nd6.clear
train
public static base_response clear(nitro_service client) throws Exception { nd6 clearresource = new nd6(); return clearresource.perform_operation(client,"clear"); }
java
{ "resource": "" }
q11272
nd6.delete
train
public static base_response delete(nitro_service client, String neighbor) throws Exception { nd6 deleteresource = new nd6(); deleteresource.neighbor = neighbor; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q11273
nd6.delete
train
public static base_response delete(nitro_service client, nd6 resource) throws Exception { nd6 deleteresource = new nd6(); deleteresource.neighbor = resource.neighbor; deleteresource.vlan = resource.vlan; deleteresource.td = resource.td; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q11274
nd6.delete
train
public static base_responses delete(nitro_service client, String neighbor[]) throws Exception { base_responses result = null; if (neighbor != null && neighbor.length > 0) { nd6 deleteresources[] = new nd6[neighbor.length]; for (int i=0;i<neighbor.length;i++){ deleteresources[i] = new nd6(); deletereso...
java
{ "resource": "" }
q11275
nd6.get
train
public static nd6[] get(nitro_service service) throws Exception{ nd6 obj = new nd6(); nd6[] response = (nd6[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q11276
csvserver_lbvserver_binding.get
train
public static csvserver_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ csvserver_lbvserver_binding obj = new csvserver_lbvserver_binding(); obj.set_name(name); csvserver_lbvserver_binding response[] = (csvserver_lbvserver_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q11277
streamidentifier_binding.get
train
public static streamidentifier_binding get(nitro_service service, String name) throws Exception{ streamidentifier_binding obj = new streamidentifier_binding(); obj.set_name(name); streamidentifier_binding response = (streamidentifier_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q11278
appfwprofile_xmlxss_binding.get
train
public static appfwprofile_xmlxss_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_xmlxss_binding obj = new appfwprofile_xmlxss_binding(); obj.set_name(name); appfwprofile_xmlxss_binding response[] = (appfwprofile_xmlxss_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q11279
authenticationlocalpolicy_binding.get
train
public static authenticationlocalpolicy_binding get(nitro_service service, String name) throws Exception{ authenticationlocalpolicy_binding obj = new authenticationlocalpolicy_binding(); obj.set_name(name); authenticationlocalpolicy_binding response = (authenticationlocalpolicy_binding) obj.get_resource(service);...
java
{ "resource": "" }
q11280
dnspolicy64_lbvserver_binding.get
train
public static dnspolicy64_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ dnspolicy64_lbvserver_binding obj = new dnspolicy64_lbvserver_binding(); obj.set_name(name); dnspolicy64_lbvserver_binding response[] = (dnspolicy64_lbvserver_binding[]) obj.get_resources(service); return res...
java
{ "resource": "" }
q11281
Counters.logSum
train
public static <E> double logSum(Counter<E> c) { return ArrayMath.logSum(ArrayMath.unbox(c.values())); }
java
{ "resource": "" }
q11282
Counters.max
train
public static <E> double max(Counter<E> c) { double max = Double.NEGATIVE_INFINITY; for (double v : c.values()) { max = Math.max(max, v); } return max; }
java
{ "resource": "" }
q11283
Counters.asCounter
train
public static <E> Counter<E> asCounter(Collection<E> c) { Counter<E> count = new ClassicCounter<E>(); for (E elem : c) { count.incrementCount(elem); } return count; }
java
{ "resource": "" }
q11284
Counters.min
train
public static <E> double min(Counter<E> c) { double min = Double.POSITIVE_INFINITY; for (double v : c.values()) { min = Math.min(min, v); } return min; }
java
{ "resource": "" }
q11285
Counters.argmax
train
public static <E> E argmax(Counter<E> c) { double max = Double.NEGATIVE_INFINITY; E argmax = null; for (E key : c.keySet()) { double count = c.getCount(key); if (argmax == null || count > max) {// || (count == max && // tieBreaker.compare(key, argm...
java
{ "resource": "" }
q11286
Counters.argmin
train
public static <E> E argmin(Counter<E> c) { double min = Double.POSITIVE_INFINITY; E argmin = null; for (E key : c.keySet()) { double count = c.getCount(key); if (argmin == null || count < min) {// || (count == min && // tieBreaker.compare(key, ar...
java
{ "resource": "" }
q11287
Counters.addInPlace
train
public static <E> void addInPlace(Counter<E> target, double value) { for (E key : target.keySet()) { target.incrementCount(key, value); } }
java
{ "resource": "" }
q11288
Counters.divideInPlace
train
public static <E> void divideInPlace(Counter<E> target, Counter<E> denominator) { for (E key : target.keySet()) { target.setCount(key, target.getCount(key) / denominator.getCount(key)); } }
java
{ "resource": "" }
q11289
Counters.dotProductInPlace
train
public static <E> void dotProductInPlace(Counter<E> target, Counter<E> term) { for (E key : target.keySet()) { target.setCount(key, target.getCount(key) * term.getCount(key)); } }
java
{ "resource": "" }
q11290
Counters.divideInPlace
train
public static <E> Counter<E> divideInPlace(Counter<E> target, double divisor) { for (Entry<E, Double> entry : target.entrySet()) { target.setCount(entry.getKey(), entry.getValue() / divisor); } return target; }
java
{ "resource": "" }
q11291
Counters.multiplyInPlace
train
public static <E> Counter<E> multiplyInPlace(Counter<E> target, double multiplier) { for (Entry<E, Double> entry : target.entrySet()) { target.setCount(entry.getKey(), entry.getValue() * multiplier); } return target; }
java
{ "resource": "" }
q11292
Counters.deleteOutofRange
train
public static <E> List<E> deleteOutofRange(Counter<E> c, int top, int bottom) { List<E> purgedItems = new ArrayList<E>(); int numToPurge = top + bottom; if (numToPurge <= 0) { return purgedItems; } List<E> l = Counters.toSortedList(c); for (int i = 0; i < top; i++) { E it...
java
{ "resource": "" }
q11293
Counters.retainNonZeros
train
public static <E> Set<E> retainNonZeros(Counter<E> counter) { Set<E> removed = new HashSet<E>(); for (E key : counter.keySet()) { if (counter.getCount(key) == 0.0) { removed.add(key); } } for (E key : removed) { counter.remove(key); } return removed; }
java
{ "resource": "" }
q11294
Counters.retainAbove
train
public static <E> Set<E> retainAbove(Counter<E> counter, double countThreshold) { Set<E> removed = new HashSet<E>(); for (E key : counter.keySet()) { if (counter.getCount(key) < countThreshold) { removed.add(key); } } for (E key : removed) { counter.remove(key); } ...
java
{ "resource": "" }
q11295
Counters.retainBelow
train
public static <E> Set<E> retainBelow(Counter<E> counter, double countMaxThreshold) { Set<E> removed = new HashSet<E>(); for (E key : counter.keySet()) { if (counter.getCount(key) > countMaxThreshold) { removed.add(key); } } for (E key : removed) { counter.remove(key); ...
java
{ "resource": "" }
q11296
Counters.retainMatchingKeys
train
public static Set<String> retainMatchingKeys(Counter<String> counter, List<Pattern> matchPatterns) { Set<String> removed = new HashSet<String>(); for (String key : counter.keySet()) { boolean matched = false; for (Pattern pattern : matchPatterns) { if (pattern.matcher(key).matches()) { ...
java
{ "resource": "" }
q11297
Counters.retainKeys
train
public static<E> Set<E> retainKeys(Counter<E> counter, Collection<E> matchKeys) { Set<E> removed = new HashSet<E>(); for (E key : counter.keySet()) { boolean matched = matchKeys.contains(key); if (!matched) { removed.add(key); } } for (E key : removed) { counter....
java
{ "resource": "" }
q11298
Counters.removeKeys
train
public static <E> void removeKeys(Counter<E> counter, Collection<E> removeKeysCollection) { for (E key : removeKeysCollection) counter.remove(key); }
java
{ "resource": "" }
q11299
Counters.transform
train
public static <T1, T2> Counter<T2> transform(Counter<T1> c, Function<T1, T2> f) { Counter<T2> c2 = new ClassicCounter<T2>(); for (T1 key : c.keySet()) { c2.setCount(f.apply(key), c.getCount(key)); } return c2; }
java
{ "resource": "" }