repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
sequence
docstring
stringlengths
3
16k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.add
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<resources.length;i++){ addresources[i] = new filterhtmlinjectionvariable(); addresources[i].variable = resources[i].variable; addresources[i].value = resources[i].value; } result = add_bulk_request(client, addresources); } return result; }
java
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<resources.length;i++){ addresources[i] = new filterhtmlinjectionvariable(); addresources[i].variable = resources[i].variable; addresources[i].value = resources[i].value; } result = add_bulk_request(client, addresources); } return result; }
[ "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", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "addresources", "[", "i", "]", ".", "variable", "=", "resources", "[", "i", "]", ".", "variable", ";", "addresources", "[", "i", "]", ".", "value", "=", "resources", "[", "i", "]", ".", "value", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add filterhtmlinjectionvariable resources.
[ "Use", "this", "API", "to", "add", "filterhtmlinjectionvariable", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L145-L157
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.delete
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_response delete(nitro_service client, String variable) throws Exception { filterhtmlinjectionvariable deleteresource = new filterhtmlinjectionvariable(); deleteresource.variable = variable; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "variable", ")", "throws", "Exception", "{", "filterhtmlinjectionvariable", "deleteresource", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "deleteresource", ".", "variable", "=", "variable", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete filterhtmlinjectionvariable of given name.
[ "Use", "this", "API", "to", "delete", "filterhtmlinjectionvariable", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L162-L166
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.delete
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++){ deleteresources[i] = new filterhtmlinjectionvariable(); deleteresources[i].variable = variable[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
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++){ deleteresources[i] = new filterhtmlinjectionvariable(); deleteresources[i].variable = variable[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "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", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "variable", "=", "variable", "[", "i", "]", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete filterhtmlinjectionvariable resources of given names.
[ "Use", "this", "API", "to", "delete", "filterhtmlinjectionvariable", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L180-L191
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.update
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_resource(client); }
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_resource(client); }
[ "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_resource", "(", "client", ")", ";", "}" ]
Use this API to update filterhtmlinjectionvariable.
[ "Use", "this", "API", "to", "update", "filterhtmlinjectionvariable", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L212-L217
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.update
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<resources.length;i++){ updateresources[i] = new filterhtmlinjectionvariable(); updateresources[i].variable = resources[i].variable; updateresources[i].value = resources[i].value; } result = update_bulk_request(client, updateresources); } return result; }
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<resources.length;i++){ updateresources[i] = new filterhtmlinjectionvariable(); updateresources[i].variable = resources[i].variable; updateresources[i].value = resources[i].value; } result = update_bulk_request(client, updateresources); } return result; }
[ "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", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "updateresources", "[", "i", "]", ".", "variable", "=", "resources", "[", "i", "]", ".", "variable", ";", "updateresources", "[", "i", "]", ".", "value", "=", "resources", "[", "i", "]", ".", "value", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update filterhtmlinjectionvariable resources.
[ "Use", "this", "API", "to", "update", "filterhtmlinjectionvariable", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L222-L234
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.unset
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_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); }
[ "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", ")", ";", "}" ]
Use this API to unset the properties of filterhtmlinjectionvariable resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "filterhtmlinjectionvariable", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L240-L244
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.unset
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.length;i++){ unsetresources[i] = new filterhtmlinjectionvariable(); unsetresources[i].variable = variable[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
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.length;i++){ unsetresources[i] = new filterhtmlinjectionvariable(); unsetresources[i].variable = variable[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "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", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "variable", "=", "variable", "[", "i", "]", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of filterhtmlinjectionvariable resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "filterhtmlinjectionvariable", "resources", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L250-L261
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.get
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) throws Exception{ filterhtmlinjectionvariable obj = new filterhtmlinjectionvariable(); filterhtmlinjectionvariable[] response = (filterhtmlinjectionvariable[])obj.get_resources(service); return response; }
[ "public", "static", "filterhtmlinjectionvariable", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "filterhtmlinjectionvariable", "obj", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "filterhtmlinjectionvariable", "[", "]", "response", "=", "(", "filterhtmlinjectionvariable", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the filterhtmlinjectionvariable resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "filterhtmlinjectionvariable", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L283-L287
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.get
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{ filterhtmlinjectionvariable obj = new filterhtmlinjectionvariable(); obj.set_variable(variable); filterhtmlinjectionvariable response = (filterhtmlinjectionvariable) obj.get_resource(service); return response; }
[ "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", ";", "}" ]
Use this API to fetch filterhtmlinjectionvariable resource of given name .
[ "Use", "this", "API", "to", "fetch", "filterhtmlinjectionvariable", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L299-L304
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.get
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[variable.length]; for (int i=0;i<variable.length;i++) { obj[i] = new filterhtmlinjectionvariable(); obj[i].set_variable(variable[i]); response[i] = (filterhtmlinjectionvariable) obj[i].get_resource(service); } return response; } return null; }
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[variable.length]; for (int i=0;i<variable.length;i++) { obj[i] = new filterhtmlinjectionvariable(); obj[i].set_variable(variable[i]); response[i] = (filterhtmlinjectionvariable) obj[i].get_resource(service); } return response; } return null; }
[ "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", "[", "variable", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "variable", ".", "length", ";", "i", "++", ")", "{", "obj", "[", "i", "]", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "obj", "[", "i", "]", ".", "set_variable", "(", "variable", "[", "i", "]", ")", ";", "response", "[", "i", "]", "=", "(", "filterhtmlinjectionvariable", ")", "obj", "[", "i", "]", ".", "get_resource", "(", "service", ")", ";", "}", "return", "response", ";", "}", "return", "null", ";", "}" ]
Use this API to fetch filterhtmlinjectionvariable resources of given names .
[ "Use", "this", "API", "to", "fetch", "filterhtmlinjectionvariable", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L309-L321
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_binding.java
lbgroup_binding.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch lbgroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "lbgroup_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_binding.java#L103-L108
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_sslciphersuite_binding.java
sslservicegroup_sslciphersuite_binding.get
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[] = (sslservicegroup_sslciphersuite_binding[]) obj.get_resources(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[] = (sslservicegroup_sslciphersuite_binding[]) obj.get_resources(service); return response; }
[ "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", "[", "]", "=", "(", "sslservicegroup_sslciphersuite_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch sslservicegroup_sslciphersuite_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "sslservicegroup_sslciphersuite_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_sslciphersuite_binding.java#L173-L178
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_sslciphersuite_binding.java
sslservicegroup_sslciphersuite_binding.count
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_sslciphersuite_binding response[] = (sslservicegroup_sslciphersuite_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
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_sslciphersuite_binding response[] = (sslservicegroup_sslciphersuite_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
[ "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_sslciphersuite_binding", "response", "[", "]", "=", "(", "sslservicegroup_sslciphersuite_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "if", "(", "response", "!=", "null", ")", "{", "return", "response", "[", "0", "]", ".", "__count", ";", "}", "return", "0", ";", "}" ]
Use this API to count sslservicegroup_sslciphersuite_binding resources configued on NetScaler.
[ "Use", "this", "API", "to", "count", "sslservicegroup_sslciphersuite_binding", "resources", "configued", "on", "NetScaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_sslciphersuite_binding.java#L209-L219
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cacheparameter.java
cacheparameter.update
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.maxpostlen = resource.maxpostlen; updateresource.prefetchmaxpending = resource.prefetchmaxpending; updateresource.enablebypass = resource.enablebypass; updateresource.undefaction = resource.undefaction; updateresource.enablediskcache = resource.enablediskcache; return updateresource.update_resource(client); }
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.maxpostlen = resource.maxpostlen; updateresource.prefetchmaxpending = resource.prefetchmaxpending; updateresource.enablebypass = resource.enablebypass; updateresource.undefaction = resource.undefaction; updateresource.enablediskcache = resource.enablediskcache; return updateresource.update_resource(client); }
[ "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", ".", "maxpostlen", "=", "resource", ".", "maxpostlen", ";", "updateresource", ".", "prefetchmaxpending", "=", "resource", ".", "prefetchmaxpending", ";", "updateresource", ".", "enablebypass", "=", "resource", ".", "enablebypass", ";", "updateresource", ".", "undefaction", "=", "resource", ".", "undefaction", ";", "updateresource", ".", "enablediskcache", "=", "resource", ".", "enablediskcache", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update cacheparameter.
[ "Use", "this", "API", "to", "update", "cacheparameter", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cacheparameter.java#L299-L310
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cacheparameter.java
cacheparameter.unset
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 base_response unset(nitro_service client, cacheparameter resource, String[] args) throws Exception{ cacheparameter unsetresource = new cacheparameter(); return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "cacheparameter", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "cacheparameter", "unsetresource", "=", "new", "cacheparameter", "(", ")", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of cacheparameter resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "cacheparameter", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cacheparameter.java#L316-L319
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cacheparameter.java
cacheparameter.get
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 cacheparameter get(nitro_service service) throws Exception{ cacheparameter obj = new cacheparameter(); cacheparameter[] response = (cacheparameter[])obj.get_resources(service); return response[0]; }
[ "public", "static", "cacheparameter", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "cacheparameter", "obj", "=", "new", "cacheparameter", "(", ")", ";", "cacheparameter", "[", "]", "response", "=", "(", "cacheparameter", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the cacheparameter resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "cacheparameter", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cacheparameter.java#L324-L328
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_csvserver_binding.java
auditsyslogpolicy_csvserver_binding.get
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_resources(service); return response; }
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_resources(service); return response; }
[ "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_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch auditsyslogpolicy_csvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "auditsyslogpolicy_csvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_csvserver_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitsessions.java
nslimitsessions.clear
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_response clear(nitro_service client, nslimitsessions resource) throws Exception { nslimitsessions clearresource = new nslimitsessions(); clearresource.limitidentifier = resource.limitidentifier; return clearresource.perform_operation(client,"clear"); }
[ "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\"", ")", ";", "}" ]
Use this API to clear nslimitsessions.
[ "Use", "this", "API", "to", "clear", "nslimitsessions", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitsessions.java#L244-L248
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitsessions.java
nslimitsessions.clear
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++){ clearresources[i] = new nslimitsessions(); clearresources[i].limitidentifier = resources[i].limitidentifier; } result = perform_operation_bulk_request(client, clearresources,"clear"); } return result; }
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++){ clearresources[i] = new nslimitsessions(); clearresources[i].limitidentifier = resources[i].limitidentifier; } result = perform_operation_bulk_request(client, clearresources,"clear"); } return result; }
[ "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", "++", ")", "{", "clearresources", "[", "i", "]", "=", "new", "nslimitsessions", "(", ")", ";", "clearresources", "[", "i", "]", ".", "limitidentifier", "=", "resources", "[", "i", "]", ".", "limitidentifier", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "clearresources", ",", "\"clear\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to clear nslimitsessions resources.
[ "Use", "this", "API", "to", "clear", "nslimitsessions", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitsessions.java#L253-L264
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitsessions.java
nslimitsessions.get
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(service, option); return response; }
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(service, option); return response; }
[ "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", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nslimitsessions resources that are configured on netscaler. This uses nslimitsessions_args which is a way to provide additional arguments while fetching the resources.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nslimitsessions", "resources", "that", "are", "configured", "on", "netscaler", ".", "This", "uses", "nslimitsessions_args", "which", "is", "a", "way", "to", "provide", "additional", "arguments", "while", "fetching", "the", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitsessions.java#L295-L301
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java
lbgroup.update
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.backuppersistencetimeout = resource.backuppersistencetimeout; updateresource.persistmask = resource.persistmask; updateresource.cookiename = resource.cookiename; updateresource.v6persistmasklen = resource.v6persistmasklen; updateresource.cookiedomain = resource.cookiedomain; updateresource.timeout = resource.timeout; updateresource.rule = resource.rule; return updateresource.update_resource(client); }
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.backuppersistencetimeout = resource.backuppersistencetimeout; updateresource.persistmask = resource.persistmask; updateresource.cookiename = resource.cookiename; updateresource.v6persistmasklen = resource.v6persistmasklen; updateresource.cookiedomain = resource.cookiedomain; updateresource.timeout = resource.timeout; updateresource.rule = resource.rule; return updateresource.update_resource(client); }
[ "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", ".", "backuppersistencetimeout", "=", "resource", ".", "backuppersistencetimeout", ";", "updateresource", ".", "persistmask", "=", "resource", ".", "persistmask", ";", "updateresource", ".", "cookiename", "=", "resource", ".", "cookiename", ";", "updateresource", ".", "v6persistmasklen", "=", "resource", ".", "v6persistmasklen", ";", "updateresource", ".", "cookiedomain", "=", "resource", ".", "cookiedomain", ";", "updateresource", ".", "timeout", "=", "resource", ".", "timeout", ";", "updateresource", ".", "rule", "=", "resource", ".", "rule", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update lbgroup.
[ "Use", "this", "API", "to", "update", "lbgroup", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java#L345-L358
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java
lbgroup.update
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(); updateresources[i].name = resources[i].name; updateresources[i].persistencetype = resources[i].persistencetype; updateresources[i].persistencebackup = resources[i].persistencebackup; updateresources[i].backuppersistencetimeout = resources[i].backuppersistencetimeout; updateresources[i].persistmask = resources[i].persistmask; updateresources[i].cookiename = resources[i].cookiename; updateresources[i].v6persistmasklen = resources[i].v6persistmasklen; updateresources[i].cookiedomain = resources[i].cookiedomain; updateresources[i].timeout = resources[i].timeout; updateresources[i].rule = resources[i].rule; } result = update_bulk_request(client, updateresources); } return result; }
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(); updateresources[i].name = resources[i].name; updateresources[i].persistencetype = resources[i].persistencetype; updateresources[i].persistencebackup = resources[i].persistencebackup; updateresources[i].backuppersistencetimeout = resources[i].backuppersistencetimeout; updateresources[i].persistmask = resources[i].persistmask; updateresources[i].cookiename = resources[i].cookiename; updateresources[i].v6persistmasklen = resources[i].v6persistmasklen; updateresources[i].cookiedomain = resources[i].cookiedomain; updateresources[i].timeout = resources[i].timeout; updateresources[i].rule = resources[i].rule; } result = update_bulk_request(client, updateresources); } return result; }
[ "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", "(", ")", ";", "updateresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "updateresources", "[", "i", "]", ".", "persistencetype", "=", "resources", "[", "i", "]", ".", "persistencetype", ";", "updateresources", "[", "i", "]", ".", "persistencebackup", "=", "resources", "[", "i", "]", ".", "persistencebackup", ";", "updateresources", "[", "i", "]", ".", "backuppersistencetimeout", "=", "resources", "[", "i", "]", ".", "backuppersistencetimeout", ";", "updateresources", "[", "i", "]", ".", "persistmask", "=", "resources", "[", "i", "]", ".", "persistmask", ";", "updateresources", "[", "i", "]", ".", "cookiename", "=", "resources", "[", "i", "]", ".", "cookiename", ";", "updateresources", "[", "i", "]", ".", "v6persistmasklen", "=", "resources", "[", "i", "]", ".", "v6persistmasklen", ";", "updateresources", "[", "i", "]", ".", "cookiedomain", "=", "resources", "[", "i", "]", ".", "cookiedomain", ";", "updateresources", "[", "i", "]", ".", "timeout", "=", "resources", "[", "i", "]", ".", "timeout", ";", "updateresources", "[", "i", "]", ".", "rule", "=", "resources", "[", "i", "]", ".", "rule", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update lbgroup resources.
[ "Use", "this", "API", "to", "update", "lbgroup", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java#L363-L383
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java
lbgroup.get
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) throws Exception{ lbgroup obj = new lbgroup(); lbgroup[] response = (lbgroup[])obj.get_resources(service); return response; }
[ "public", "static", "lbgroup", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "lbgroup", "obj", "=", "new", "lbgroup", "(", ")", ";", "lbgroup", "[", "]", "response", "=", "(", "lbgroup", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the lbgroup resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "lbgroup", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java#L450-L454
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java
lbgroup.get
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(nitro_service service, String name) throws Exception{ lbgroup obj = new lbgroup(); obj.set_name(name); lbgroup response = (lbgroup) obj.get_resource(service); return response; }
[ "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", ";", "}" ]
Use this API to fetch lbgroup resource of given name .
[ "Use", "this", "API", "to", "fetch", "lbgroup", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java#L466-L471
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java
lbgroup.get_filtered
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 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; }
[ "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", ";", "}" ]
Use this API to fetch filtered set of lbgroup resources. set the filter parameter values in filtervalue object.
[ "Use", "this", "API", "to", "fetch", "filtered", "set", "of", "lbgroup", "resources", ".", "set", "the", "filter", "parameter", "values", "in", "filtervalue", "object", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup.java#L505-L511
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmformssoaction.java
tmformssoaction.add
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] = new tmformssoaction(); addresources[i].name = resources[i].name; addresources[i].actionurl = resources[i].actionurl; addresources[i].userfield = resources[i].userfield; addresources[i].passwdfield = resources[i].passwdfield; addresources[i].ssosuccessrule = resources[i].ssosuccessrule; addresources[i].namevaluepair = resources[i].namevaluepair; addresources[i].responsesize = resources[i].responsesize; addresources[i].nvtype = resources[i].nvtype; addresources[i].submitmethod = resources[i].submitmethod; } result = add_bulk_request(client, addresources); } return result; }
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] = new tmformssoaction(); addresources[i].name = resources[i].name; addresources[i].actionurl = resources[i].actionurl; addresources[i].userfield = resources[i].userfield; addresources[i].passwdfield = resources[i].passwdfield; addresources[i].ssosuccessrule = resources[i].ssosuccessrule; addresources[i].namevaluepair = resources[i].namevaluepair; addresources[i].responsesize = resources[i].responsesize; addresources[i].nvtype = resources[i].nvtype; addresources[i].submitmethod = resources[i].submitmethod; } result = add_bulk_request(client, addresources); } return result; }
[ "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", "]", "=", "new", "tmformssoaction", "(", ")", ";", "addresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "addresources", "[", "i", "]", ".", "actionurl", "=", "resources", "[", "i", "]", ".", "actionurl", ";", "addresources", "[", "i", "]", ".", "userfield", "=", "resources", "[", "i", "]", ".", "userfield", ";", "addresources", "[", "i", "]", ".", "passwdfield", "=", "resources", "[", "i", "]", ".", "passwdfield", ";", "addresources", "[", "i", "]", ".", "ssosuccessrule", "=", "resources", "[", "i", "]", ".", "ssosuccessrule", ";", "addresources", "[", "i", "]", ".", "namevaluepair", "=", "resources", "[", "i", "]", ".", "namevaluepair", ";", "addresources", "[", "i", "]", ".", "responsesize", "=", "resources", "[", "i", "]", ".", "responsesize", ";", "addresources", "[", "i", "]", ".", "nvtype", "=", "resources", "[", "i", "]", ".", "nvtype", ";", "addresources", "[", "i", "]", ".", "submitmethod", "=", "resources", "[", "i", "]", ".", "submitmethod", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add tmformssoaction resources.
[ "Use", "this", "API", "to", "add", "tmformssoaction", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmformssoaction.java#L277-L296
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmformssoaction.java
tmformssoaction.get
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) throws Exception{ tmformssoaction obj = new tmformssoaction(); tmformssoaction[] response = (tmformssoaction[])obj.get_resources(service); return response; }
[ "public", "static", "tmformssoaction", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "tmformssoaction", "obj", "=", "new", "tmformssoaction", "(", ")", ";", "tmformssoaction", "[", "]", "response", "=", "(", "tmformssoaction", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the tmformssoaction resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "tmformssoaction", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmformssoaction.java#L436-L440
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmformssoaction.java
tmformssoaction.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch tmformssoaction resource of given name .
[ "Use", "this", "API", "to", "fetch", "tmformssoaction", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmformssoaction.java#L452-L457
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cr/crvserver_crpolicy_binding.java
crvserver_crpolicy_binding.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch crvserver_crpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "crvserver_crpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cr/crvserver_crpolicy_binding.java#L215-L220
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionpolicy_vpnvserver_binding.java
vpnsessionpolicy_vpnvserver_binding.get
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_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_resources(service); return response; }
[ "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_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vpnsessionpolicy_vpnvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vpnsessionpolicy_vpnvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionpolicy_vpnvserver_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/pq/pqpolicy_stats.java
pqpolicy_stats.get
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) throws Exception{ pqpolicy_stats obj = new pqpolicy_stats(); pqpolicy_stats[] response = (pqpolicy_stats[])obj.stat_resources(service); return response; }
[ "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", ";", "}" ]
Use this API to fetch the statistics of all pqpolicy_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "pqpolicy_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/pq/pqpolicy_stats.java#L291-L295
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/pq/pqpolicy_stats.java
pqpolicy_stats.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch statistics of pqpolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "pqpolicy_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/pq/pqpolicy_stats.java#L309-L314
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy_lbvserver_binding.java
appqoepolicy_lbvserver_binding.get
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); 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); return response; }
[ "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", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch appqoepolicy_lbvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "appqoepolicy_lbvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy_lbvserver_binding.java#L142-L147
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Maps.java
Maps.invert
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 <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; }
[ "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", ";", "}" ]
Inverts a map x->y to a map y->x assuming unique preimages. If they are not unique, you get an arbitrary ones as the values in the inverted map. @return The inverted map
[ "Inverts", "a", "map", "x", "-", ">", "y", "to", "a", "map", "y", "-", ">", "x", "assuming", "unique", "preimages", ".", "If", "they", "are", "not", "unique", "you", "get", "an", "arbitrary", "ones", "as", "the", "values", "in", "the", "inverted", "map", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Maps.java#L70-L78
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Maps.java
Maps.sortedEntries
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, Map.Entry<K, V> e2) { return e1.getKey().compareTo(e2.getKey()); } }); return entriesList; }
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, Map.Entry<K, V> e2) { return e1.getKey().compareTo(e2.getKey()); } }); return entriesList; }
[ "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", ",", "Map", ".", "Entry", "<", "K", ",", "V", ">", "e2", ")", "{", "return", "e1", ".", "getKey", "(", ")", ".", "compareTo", "(", "e2", ".", "getKey", "(", ")", ")", ";", "}", "}", ")", ";", "return", "entriesList", ";", "}" ]
Sorts a list of entries. This menthod is here since the entries might come from a Counter.
[ "Sorts", "a", "list", "of", "entries", ".", "This", "menthod", "is", "here", "since", "the", "entries", "might", "come", "from", "a", "Counter", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Maps.java#L98-L106
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Maps.java
Maps.sortedEntries
public static <K extends Comparable<? super K>, V> List<Map.Entry<K, V>> sortedEntries(Map<K, V> map) { return sortedEntries(map.entrySet()); }
java
public static <K extends Comparable<? super K>, V> List<Map.Entry<K, V>> sortedEntries(Map<K, V> map) { return sortedEntries(map.entrySet()); }
[ "public", "static", "<", "K", "extends", "Comparable", "<", "?", "super", "K", ">", ",", "V", ">", "List", "<", "Map", ".", "Entry", "<", "K", ",", "V", ">", ">", "sortedEntries", "(", "Map", "<", "K", ",", "V", ">", "map", ")", "{", "return", "sortedEntries", "(", "map", ".", "entrySet", "(", ")", ")", ";", "}" ]
Returns a List of entries in the map, sorted by key.
[ "Returns", "a", "List", "of", "entries", "in", "the", "map", "sorted", "by", "key", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Maps.java#L111-L113
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java
SequenceGibbsSampler.sampleSequenceRepeatedly
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, sequence); } }
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, sequence); } }
[ "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\r", "listener", ".", "setInitialSequence", "(", "sequence", ")", ";", "for", "(", "int", "iter", "=", "0", ";", "iter", "<", "numSamples", ";", "iter", "++", ")", "{", "sampleSequenceForward", "(", "model", ",", "sequence", ")", ";", "}", "}" ]
Samples the sequence repeatedly, making numSamples passes over the entire sequence.
[ "Samples", "the", "sequence", "repeatedly", "making", "numSamples", "passes", "over", "the", "entire", "sequence", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java#L167-L173
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java
SequenceGibbsSampler.sampleSequenceRepeatedly
public void sampleSequenceRepeatedly(SequenceModel model, int numSamples) { int[] sequence = getRandomSequence(model); sampleSequenceRepeatedly(model, sequence, numSamples); }
java
public void sampleSequenceRepeatedly(SequenceModel model, int numSamples) { int[] sequence = getRandomSequence(model); sampleSequenceRepeatedly(model, sequence, numSamples); }
[ "public", "void", "sampleSequenceRepeatedly", "(", "SequenceModel", "model", ",", "int", "numSamples", ")", "{", "int", "[", "]", "sequence", "=", "getRandomSequence", "(", "model", ")", ";", "sampleSequenceRepeatedly", "(", "model", ",", "sequence", ",", "numSamples", ")", ";", "}" ]
Samples the sequence repeatedly, making numSamples passes over the entire sequence. Destructively modifies the sequence in place.
[ "Samples", "the", "sequence", "repeatedly", "making", "numSamples", "passes", "over", "the", "entire", "sequence", ".", "Destructively", "modifies", "the", "sequence", "in", "place", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java#L179-L182
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java
SequenceGibbsSampler.sampleSequenceForward
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 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); } }
[ "public", "void", "sampleSequenceForward", "(", "SequenceModel", "model", ",", "int", "[", "]", "sequence", ",", "double", "temperature", ")", "{", "// System.err.println(\"Sampling forward\");\r", "for", "(", "int", "pos", "=", "0", ";", "pos", "<", "sequence", ".", "length", ";", "pos", "++", ")", "{", "samplePosition", "(", "model", ",", "sequence", ",", "pos", ",", "temperature", ")", ";", "}", "}" ]
Samples the complete sequence once in the forward direction Destructively modifies the sequence in place. @param sequence the sequence to start with.
[ "Samples", "the", "complete", "sequence", "once", "in", "the", "forward", "direction", "Destructively", "modifies", "the", "sequence", "in", "place", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java#L197-L202
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java
SequenceGibbsSampler.sampleSequenceBackward
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 void sampleSequenceBackward(SequenceModel model, int[] sequence, double temperature) { for (int pos=sequence.length-1; pos>=0; pos--) { samplePosition(model, sequence, pos, temperature); } }
[ "public", "void", "sampleSequenceBackward", "(", "SequenceModel", "model", ",", "int", "[", "]", "sequence", ",", "double", "temperature", ")", "{", "for", "(", "int", "pos", "=", "sequence", ".", "length", "-", "1", ";", "pos", ">=", "0", ";", "pos", "--", ")", "{", "samplePosition", "(", "model", ",", "sequence", ",", "pos", ",", "temperature", ")", ";", "}", "}" ]
Samples the complete sequence once in the backward direction Destructively modifies the sequence in place. @param sequence the sequence to start with.
[ "Samples", "the", "complete", "sequence", "once", "in", "the", "backward", "direction", "Destructively", "modifies", "the", "sequence", "in", "place", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java#L217-L221
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java
SequenceGibbsSampler.samplePosition
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.fill(distribution, Double.NEGATIVE_INFINITY); distribution[argmax] = 0.0; } else { // take all to a power // use the temperature to increase/decrease the entropy of the sampling distribution ArrayMath.multiplyInPlace(distribution, 1.0/temperature); } } ArrayMath.logNormalize(distribution); ArrayMath.expInPlace(distribution); int oldTag = sequence[pos]; int newTag = ArrayMath.sampleFromDistribution(distribution, random); // System.out.println("Sampled " + oldTag + "->" + newTag); sequence[pos] = newTag; listener.updateSequenceElement(sequence, pos, oldTag); return distribution[newTag]; }
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.fill(distribution, Double.NEGATIVE_INFINITY); distribution[argmax] = 0.0; } else { // take all to a power // use the temperature to increase/decrease the entropy of the sampling distribution ArrayMath.multiplyInPlace(distribution, 1.0/temperature); } } ArrayMath.logNormalize(distribution); ArrayMath.expInPlace(distribution); int oldTag = sequence[pos]; int newTag = ArrayMath.sampleFromDistribution(distribution, random); // System.out.println("Sampled " + oldTag + "->" + newTag); sequence[pos] = newTag; listener.updateSequenceElement(sequence, pos, oldTag); return distribution[newTag]; }
[ "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\r", "int", "argmax", "=", "ArrayMath", ".", "argmax", "(", "distribution", ")", ";", "Arrays", ".", "fill", "(", "distribution", ",", "Double", ".", "NEGATIVE_INFINITY", ")", ";", "distribution", "[", "argmax", "]", "=", "0.0", ";", "}", "else", "{", "// take all to a power\r", "// use the temperature to increase/decrease the entropy of the sampling distribution\r", "ArrayMath", ".", "multiplyInPlace", "(", "distribution", ",", "1.0", "/", "temperature", ")", ";", "}", "}", "ArrayMath", ".", "logNormalize", "(", "distribution", ")", ";", "ArrayMath", ".", "expInPlace", "(", "distribution", ")", ";", "int", "oldTag", "=", "sequence", "[", "pos", "]", ";", "int", "newTag", "=", "ArrayMath", ".", "sampleFromDistribution", "(", "distribution", ",", "random", ")", ";", "// System.out.println(\"Sampled \" + oldTag + \"->\" + newTag);\r", "sequence", "[", "pos", "]", "=", "newTag", ";", "listener", ".", "updateSequenceElement", "(", "sequence", ",", "pos", ",", "oldTag", ")", ";", "return", "distribution", "[", "newTag", "]", ";", "}" ]
Samples a single position in the sequence. Destructively modifies the sequence in place. returns the score of the new sequence @param sequence the sequence to start with @param pos the position to sample.
[ "Samples", "a", "single", "position", "in", "the", "sequence", ".", "Destructively", "modifies", "the", "sequence", "in", "place", ".", "returns", "the", "score", "of", "the", "new", "sequence" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java#L241-L263
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_binding.java
aaagroup_binding.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch aaagroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "aaagroup_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_binding.java#L202-L207
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsyncstatus.java
gslbsyncstatus.get
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 gslbsyncstatus get(nitro_service service) throws Exception{ gslbsyncstatus obj = new gslbsyncstatus(); gslbsyncstatus[] response = (gslbsyncstatus[])obj.get_resources(service); return response[0]; }
[ "public", "static", "gslbsyncstatus", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "gslbsyncstatus", "obj", "=", "new", "gslbsyncstatus", "(", ")", ";", "gslbsyncstatus", "[", "]", "response", "=", "(", "gslbsyncstatus", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the gslbsyncstatus resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "gslbsyncstatus", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsyncstatus.java#L88-L92
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_authenticationnegotiatepolicy_binding.java
vpnvserver_authenticationnegotiatepolicy_binding.get
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
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; }
[ "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", ";", "}" ]
Use this API to fetch vpnvserver_authenticationnegotiatepolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vpnvserver_authenticationnegotiatepolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_authenticationnegotiatepolicy_binding.java#L178-L183
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_tmsessionpolicy_binding.java
authenticationvserver_tmsessionpolicy_binding.get
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
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; }
[ "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", ";", "}" ]
Use this API to fetch authenticationvserver_tmsessionpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationvserver_tmsessionpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_tmsessionpolicy_binding.java#L254-L259
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_authenticationtacacspolicy_binding.java
vpnglobal_authenticationtacacspolicy_binding.get
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
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; }
[ "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", ";", "}" ]
Use this API to fetch a vpnglobal_authenticationtacacspolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "vpnglobal_authenticationtacacspolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_authenticationtacacspolicy_binding.java#L225-L229
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservice_sslcipher_binding.java
sslservice_sslcipher_binding.get
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
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; }
[ "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", ";", "}" ]
Use this API to fetch sslservice_sslcipher_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "sslservice_sslcipher_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservice_sslcipher_binding.java#L131-L136
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java
MtasSolrSearchComponent.getMtasFields
private ComponentFields getMtasFields(ResponseBuilder rb) { return (ComponentFields) rb.req.getContext().get(ComponentFields.class); }
java
private ComponentFields getMtasFields(ResponseBuilder rb) { return (ComponentFields) rb.req.getContext().get(ComponentFields.class); }
[ "private", "ComponentFields", "getMtasFields", "(", "ResponseBuilder", "rb", ")", "{", "return", "(", "ComponentFields", ")", "rb", ".", "req", ".", "getContext", "(", ")", ".", "get", "(", "ComponentFields", ".", "class", ")", ";", "}" ]
Gets the mtas fields. @param rb the rb @return the mtas fields
[ "Gets", "the", "mtas", "fields", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java#L848-L850
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java
MtasSolrSearchComponent.initializeRequestHandler
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
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; } } } }
[ "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", ";", "}", "}", "}", "}" ]
Initialize request handler. @param rb the rb
[ "Initialize", "request", "handler", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java#L858-L869
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java
MtasSolrSearchComponent.checkStatus
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
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()); } } }
[ "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", "(", ")", ")", ";", "}", "}", "}" ]
Check status. @param status the status @throws IOException Signals that an I/O exception has occurred.
[ "Check", "status", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java#L879-L895
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java
MtasSolrSearchComponent.errorStatus
private void errorStatus(MtasSolrStatus status, IOException exception) { try { status.setError(exception); if (requestHandler != null) { requestHandler.finishStatus(status); } } catch (IOException e) { log.error(e); } }
java
private void errorStatus(MtasSolrStatus status, IOException exception) { try { status.setError(exception); if (requestHandler != null) { requestHandler.finishStatus(status); } } catch (IOException e) { log.error(e); } }
[ "private", "void", "errorStatus", "(", "MtasSolrStatus", "status", ",", "IOException", "exception", ")", "{", "try", "{", "status", ".", "setError", "(", "exception", ")", ";", "if", "(", "requestHandler", "!=", "null", ")", "{", "requestHandler", ".", "finishStatus", "(", "status", ")", ";", "}", "}", "catch", "(", "IOException", "e", ")", "{", "log", ".", "error", "(", "e", ")", ";", "}", "}" ]
Error status. @param status the status @param exception the exception
[ "Error", "status", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/MtasSolrSearchComponent.java#L940-L949
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/CrossValidator.java
CrossValidator.computeAverage
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
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; }
[ "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", ";", "}" ]
This computes the average over all folds of the function we're trying to optimize. The input triple contains, in order, the train set, the test set, and the saved state. You don't have to use the saved state if you don't want to.
[ "This", "computes", "the", "average", "over", "all", "folds", "of", "the", "function", "we", "re", "trying", "to", "optimize", ".", "The", "input", "triple", "contains", "in", "order", "the", "train", "set", "the", "test", "set", "and", "the", "saved", "state", ".", "You", "don", "t", "have", "to", "use", "the", "saved", "state", "if", "you", "don", "t", "want", "to", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/CrossValidator.java#L48-L56
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_binding.java
vpnvserver_binding.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch vpnvserver_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnvserver_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_binding.java#L356-L361
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmglobal_auditsyslogpolicy_binding.java
tmglobal_auditsyslogpolicy_binding.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch a tmglobal_auditsyslogpolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "tmglobal_auditsyslogpolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmglobal_auditsyslogpolicy_binding.java#L171-L175
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/appflow/appflow_stats.java
appflow_stats.get
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
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]; }
[ "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", "]", ";", "}" ]
Use this API to fetch the statistics of all appflow_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "appflow_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appflow/appflow_stats.java#L251-L255
train
meertensinstituut/mtas
src/main/java/mtas/search/spans/MtasSpanNotQuery.java
MtasSpanNotQuery.getTermContexts
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
protected Map<Term, TermContext> getTermContexts( List<MtasSpanNotQueryWeight> items) { List<SpanWeight> weights = new ArrayList<>(); for (MtasSpanNotQueryWeight item : items) { weights.add(item.spanWeight); } return getTermContexts(weights); }
[ "protected", "Map", "<", "Term", ",", "TermContext", ">", "getTermContexts", "(", "List", "<", "MtasSpanNotQueryWeight", ">", "items", ")", "{", "List", "<", "SpanWeight", ">", "weights", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "MtasSpanNotQueryWeight", "item", ":", "items", ")", "{", "weights", ".", "add", "(", "item", ".", "spanWeight", ")", ";", "}", "return", "getTermContexts", "(", "weights", ")", ";", "}" ]
Gets the term contexts. @param items the items @return the term contexts
[ "Gets", "the", "term", "contexts", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/search/spans/MtasSpanNotQuery.java#L107-L114
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java
LinearClassifierFactory.getHighPrecisionFeatures
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
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); }
[ "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);\r", "if", "(", "data", "[", "d", "]", "!=", "null", ")", "{", "//System.out.println(\" number of features:\"+data[d].length);\r", "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())\r", "//System.out.println(feature+\" \"+feature2freq.getCount(feature));\r", "//System.exit(0);\r", "return", "Counters", ".", "toSortedList", "(", "feature2freq", ")", ";", "}" ]
Returns a list of featured thresholded by minPrecision and sorted by their frequency of occurrence. precision in this case, is defined as the frequency of majority label over total frequency for that feature. @return list of high precision features.
[ "Returns", "a", "list", "of", "featured", "thresholded", "by", "minPrecision", "and", "sorted", "by", "their", "frequency", "of", "occurrence", ".", "precision", "in", "this", "case", "is", "defined", "as", "the", "frequency", "of", "majority", "label", "over", "total", "frequency", "for", "that", "feature", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java#L208-L242
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java
LinearClassifierFactory.trainClassifierV
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
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()); }
[ "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", "(", ")", ")", ";", "}" ]
Train a classifier with a sigma tuned on a validation set. @return The constructed classifier
[ "Train", "a", "classifier", "with", "a", "sigma", "tuned", "on", "a", "validation", "set", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java#L249-L257
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java
LinearClassifierFactory.loadFromFilename
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
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; } }
[ "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\r", "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\r", "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", ";", "}", "}" ]
Given the path to a file representing the text based serialization of a Linear Classifier, reconstitutes and returns that LinearClassifier. TODO: Leverage Index
[ "Given", "the", "path", "to", "a", "file", "representing", "the", "text", "based", "serialization", "of", "a", "Linear", "Classifier", "reconstitutes", "and", "returns", "that", "LinearClassifier", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java#L760-L801
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionpolicy_vpnglobal_binding.java
vpnsessionpolicy_vpnglobal_binding.get
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
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; }
[ "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", ";", "}" ]
Use this API to fetch vpnsessionpolicy_vpnglobal_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vpnsessionpolicy_vpnglobal_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionpolicy_vpnglobal_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/cluster/clusternode_stats.java
clusternode_stats.get
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) throws Exception{ clusternode_stats obj = new clusternode_stats(); clusternode_stats[] response = (clusternode_stats[])obj.stat_resources(service); return response; }
[ "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", ";", "}" ]
Use this API to fetch the statistics of all clusternode_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "clusternode_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/cluster/clusternode_stats.java#L253-L257
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/cluster/clusternode_stats.java
clusternode_stats.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch statistics of clusternode_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "clusternode_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/cluster/clusternode_stats.java#L271-L276
train
jclawson/dropwizardry
dropwizardry-config-hocon/src/main/java/io/dropwizard/configuration/HoconConfigurationFactory.java
HoconConfigurationFactory.build
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
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); } }
[ "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", ")", ";", "}", "}" ]
Loads, parses, binds, and validates a configuration object. @param provider the provider to to use for reading configuration files @param path the path of the configuration file @return a validated configuration object @throws IOException if there is an error reading the file @throws ConfigurationException if there is an error parsing or validating the file
[ "Loads", "parses", "binds", "and", "validates", "a", "configuration", "object", "." ]
3dd95da764ddd63d8959792942ce29becf43f80b
https://github.com/jclawson/dropwizardry/blob/3dd95da764ddd63d8959792942ce29becf43f80b/dropwizardry-config-hocon/src/main/java/io/dropwizard/configuration/HoconConfigurationFactory.java#L81-L97
train
jclawson/dropwizardry
dropwizardry-config-hocon/src/main/java/io/dropwizard/configuration/HoconConfigurationFactory.java
HoconConfigurationFactory.build
public T build(File file) throws IOException, ConfigurationException { return build(new FileConfigurationSourceProvider(), file.toString()); }
java
public T build(File file) throws IOException, ConfigurationException { return build(new FileConfigurationSourceProvider(), file.toString()); }
[ "public", "T", "build", "(", "File", "file", ")", "throws", "IOException", ",", "ConfigurationException", "{", "return", "build", "(", "new", "FileConfigurationSourceProvider", "(", ")", ",", "file", ".", "toString", "(", ")", ")", ";", "}" ]
Loads, parses, binds, and validates a configuration object from a file. @param file the path of the configuration file @return a validated configuration object @throws IOException if there is an error reading the file @throws ConfigurationException if there is an error parsing or validating the file
[ "Loads", "parses", "binds", "and", "validates", "a", "configuration", "object", "from", "a", "file", "." ]
3dd95da764ddd63d8959792942ce29becf43f80b
https://github.com/jclawson/dropwizardry/blob/3dd95da764ddd63d8959792942ce29becf43f80b/dropwizardry-config-hocon/src/main/java/io/dropwizard/configuration/HoconConfigurationFactory.java#L107-L109
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/bridgegroup_binding.java
bridgegroup_binding.get
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
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; }
[ "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", ";", "}" ]
Use this API to fetch bridgegroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "bridgegroup_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/bridgegroup_binding.java#L137-L142
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/Morphology.java
Morphology.lemmatize
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
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; } }
[ "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!\r", "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\r", "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", ";", "}", "}" ]
Lemmatize the word, being sensitive to the tag, using the passed in lexer. @param lowercase If this is true, words other than proper nouns will be changed to all lowercase.
[ "Lemmatize", "the", "word", "being", "sensitive", "to", "the", "tag", "using", "the", "passed", "in", "lexer", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/Morphology.java#L140-L166
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoeparameter.java
appqoeparameter.update
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
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); }
[ "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", ")", ";", "}" ]
Use this API to update appqoeparameter.
[ "Use", "this", "API", "to", "update", "appqoeparameter", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoeparameter.java#L187-L194
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoeparameter.java
appqoeparameter.unset
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 base_response unset(nitro_service client, appqoeparameter resource, String[] args) throws Exception{ appqoeparameter unsetresource = new appqoeparameter(); return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "appqoeparameter", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "appqoeparameter", "unsetresource", "=", "new", "appqoeparameter", "(", ")", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of appqoeparameter resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "appqoeparameter", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoeparameter.java#L200-L203
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoeparameter.java
appqoeparameter.get
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 appqoeparameter get(nitro_service service) throws Exception{ appqoeparameter obj = new appqoeparameter(); appqoeparameter[] response = (appqoeparameter[])obj.get_resources(service); return response[0]; }
[ "public", "static", "appqoeparameter", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "appqoeparameter", "obj", "=", "new", "appqoeparameter", "(", ")", ";", "appqoeparameter", "[", "]", "response", "=", "(", "appqoeparameter", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the appqoeparameter resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "appqoeparameter", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoeparameter.java#L208-L212
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.add
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
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); }
[ "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", ")", ";", "}" ]
Use this API to add server.
[ "Use", "this", "API", "to", "add", "server", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L431-L444
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.add
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
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; }
[ "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", ";", "}" ]
Use this API to add server resources.
[ "Use", "this", "API", "to", "add", "server", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L449-L469
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.update
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
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); }
[ "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", ")", ";", "}" ]
Use this API to update server.
[ "Use", "this", "API", "to", "update", "server", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L524-L534
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.update
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
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; }
[ "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", ";", "}" ]
Use this API to update server resources.
[ "Use", "this", "API", "to", "update", "server", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L539-L556
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.get
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) throws Exception{ server obj = new server(); server[] response = (server[])obj.get_resources(service); return response; }
[ "public", "static", "server", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "server", "obj", "=", "new", "server", "(", ")", ";", "server", "[", "]", "response", "=", "(", "server", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the server resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "server", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L727-L731
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.get
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, 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; }
[ "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", ";", "}" ]
Use this API to fetch all the server resources that are configured on netscaler. This uses server_args which is a way to provide additional arguments while fetching the resources.
[ "Use", "this", "API", "to", "fetch", "all", "the", "server", "resources", "that", "are", "configured", "on", "netscaler", ".", "This", "uses", "server_args", "which", "is", "a", "way", "to", "provide", "additional", "arguments", "while", "fetching", "the", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L744-L750
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.get
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(nitro_service service, String name) throws Exception{ server obj = new server(); obj.set_name(name); server response = (server) obj.get_resource(service); return response; }
[ "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", ";", "}" ]
Use this API to fetch server resource of given name .
[ "Use", "this", "API", "to", "fetch", "server", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L755-L760
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java
server.get_filtered
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 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; }
[ "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", ";", "}" ]
Use this API to fetch filtered set of server resources. set the filter parameter values in filtervalue object.
[ "Use", "this", "API", "to", "fetch", "filtered", "set", "of", "server", "resources", ".", "set", "the", "filter", "parameter", "values", "in", "filtervalue", "object", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server.java#L794-L800
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemglobal_auditnslogpolicy_binding.java
systemglobal_auditnslogpolicy_binding.get
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
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; }
[ "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", ";", "}" ]
Use this API to fetch a systemglobal_auditnslogpolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "systemglobal_auditnslogpolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemglobal_auditnslogpolicy_binding.java#L180-L184
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ntp/ntpstatus.java
ntpstatus.get
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 ntpstatus get(nitro_service service) throws Exception{ ntpstatus obj = new ntpstatus(); ntpstatus[] response = (ntpstatus[])obj.get_resources(service); return response[0]; }
[ "public", "static", "ntpstatus", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "ntpstatus", "obj", "=", "new", "ntpstatus", "(", ")", ";", "ntpstatus", "[", "]", "response", "=", "(", "ntpstatus", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the ntpstatus resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "ntpstatus", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ntp/ntpstatus.java#L88-L92
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dns_stats.java
dns_stats.get
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 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]; }
[ "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", "]", ";", "}" ]
Use this API to fetch the statistics of all dns_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "dns_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dns_stats.java#L1211-L1215
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_nsip6_binding.java
netbridge_nsip6_binding.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch netbridge_nsip6_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "netbridge_nsip6_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_nsip6_binding.java#L177-L182
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_nsip6_binding.java
netbridge_nsip6_binding.count
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
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; }
[ "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", ";", "}" ]
Use this API to count netbridge_nsip6_binding resources configued on NetScaler.
[ "Use", "this", "API", "to", "count", "netbridge_nsip6_binding", "resources", "configued", "on", "NetScaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_nsip6_binding.java#L213-L223
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlschema.java
appfwxmlschema.get
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) throws Exception{ appfwxmlschema obj = new appfwxmlschema(); appfwxmlschema[] response = (appfwxmlschema[])obj.get_resources(service); return response[0]; }
[ "public", "static", "appfwxmlschema", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "appfwxmlschema", "obj", "=", "new", "appfwxmlschema", "(", ")", ";", "appfwxmlschema", "[", "]", "response", "=", "(", "appfwxmlschema", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the appfwxmlschema resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "appfwxmlschema", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlschema.java#L107-L111
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlschema.java
appfwxmlschema.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch appfwxmlschema resource of given name .
[ "Use", "this", "API", "to", "fetch", "appfwxmlschema", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlschema.java#L125-L130
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/Americanize.java
Americanize.apply
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 HasWord apply(HasWord w) { String str = w.word(); String outStr = americanize(str, capitalizeTimex); if (!outStr.equals(str)) { w.setWord(outStr); } return w; }
[ "public", "HasWord", "apply", "(", "HasWord", "w", ")", "{", "String", "str", "=", "w", ".", "word", "(", ")", ";", "String", "outStr", "=", "americanize", "(", "str", ",", "capitalizeTimex", ")", ";", "if", "(", "!", "outStr", ".", "equals", "(", "str", ")", ")", "{", "w", ".", "setWord", "(", "outStr", ")", ";", "}", "return", "w", ";", "}" ]
Americanize the HasWord or String coming in. @param w A HasWord or String to covert to American if needed. @return Either the input or an Americanized version of it.
[ "Americanize", "the", "HasWord", "or", "String", "coming", "in", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/Americanize.java#L63-L70
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/Americanize.java
Americanize.americanize
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
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; } }
[ "public", "static", "String", "americanize", "(", "String", "str", ",", "boolean", "capitalizeTimex", ")", "{", "// System.err.println(\"str is |\" + str + \"|\");\r", "// System.err.println(\"timexMapping.contains is \" +\r", "// timexMapping.containsKey(str));\r", "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 \" +\r", "// pats[i].matcher(word).replaceAll(reps[i]));\r", "return", "m", ".", "replaceAll", "(", "reps", "[", "i", "]", ")", ";", "}", "}", "return", "str", ";", "}", "}" ]
Convert the spelling of a word from British to American English. This is deterministic spelling conversion, and so cannot deal with certain cases involving complex ambiguities, but it can do most of the simple cases of English to American conversion. @param str The String to be Americanized @param capitalizeTimex Whether to capitalize time expressions like month names in return value @return The American spelling of the word.
[ "Convert", "the", "spelling", "of", "a", "word", "from", "British", "to", "American", "English", ".", "This", "is", "deterministic", "spelling", "conversion", "and", "so", "cannot", "deal", "with", "certain", "cases", "involving", "complex", "ambiguities", "but", "it", "can", "do", "most", "of", "the", "simple", "cases", "of", "English", "to", "American", "conversion", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/Americanize.java#L98-L124
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/Americanize.java
Americanize.main
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
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)); } }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "System", ".", "err", ".", "println", "(", "new", "Americanize", "(", ")", ")", ";", "System", ".", "err", ".", "println", "(", ")", ";", "if", "(", "args", ".", "length", "==", "0", ")", "{", "// stdin -> stdout:\r", "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", ")", ")", ";", "}", "}" ]
Americanize and print the command line arguments. This main method is just for debugging. @param args Command line arguments: a list of words
[ "Americanize", "and", "print", "the", "command", "line", "arguments", ".", "This", "main", "method", "is", "just", "for", "debugging", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/Americanize.java#L204-L225
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.toValidInterval
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) { return toValidInterval(a,b,0); }
[ "public", "static", "<", "E", "extends", "Comparable", "<", "E", ">", ">", "Interval", "<", "E", ">", "toValidInterval", "(", "E", "a", ",", "E", "b", ")", "{", "return", "toValidInterval", "(", "a", ",", "b", ",", "0", ")", ";", "}" ]
Create an interval with the specified endpoints, reordering them as needed @param a one of the endpoints @param b the other endpoint @param <E> type of the interval endpoints @return Interval with endpoints re-ordered as needed
[ "Create", "an", "interval", "with", "the", "specified", "endpoints", "reordering", "them", "as", "needed" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L369-L371
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.toValidInterval
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 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); } }
[ "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", ")", ";", "}", "}" ]
Create an interval with the specified endpoints, reordering them as needed, using the specified flags @param a one of the endpoints @param b the other endpoint @param flags flags characterizing the interval @param <E> type of the interval endpoints @return Interval with endpoints re-ordered as needed
[ "Create", "an", "interval", "with", "the", "specified", "endpoints", "reordering", "them", "as", "needed", "using", "the", "specified", "flags" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L382-L389
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.contains
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
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); }
[ "public", "boolean", "contains", "(", "E", "p", ")", "{", "// Check that the start point is before p\r", "boolean", "check1", "=", "(", "includesBegin", "(", ")", ")", "?", "(", "first", ".", "compareTo", "(", "p", ")", "<=", "0", ")", ":", "(", "first", ".", "compareTo", "(", "p", ")", "<", "0", ")", ";", "// Check that the end point is after p\r", "boolean", "check2", "=", "(", "includesEnd", "(", ")", ")", "?", "(", "second", ".", "compareTo", "(", "p", ")", ">=", "0", ")", ":", "(", "second", ".", "compareTo", "(", "p", ")", ">", "0", ")", ";", "return", "(", "check1", "&&", "check2", ")", ";", "}" ]
Checks whether the point p is contained inside this interval @param p point to check @return True if the point p is contained withing the interval, false otherwise
[ "Checks", "whether", "the", "point", "p", "is", "contained", "inside", "this", "interval" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L434-L441
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.isIntervalComparable
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 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); }
[ "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", ")", ";", "}" ]
Checks whether this interval is comparable with another interval comes before or after @param other interval to compare with
[ "Checks", "whether", "this", "interval", "is", "comparable", "with", "another", "interval", "comes", "before", "or", "after" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L590-L597
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.compareIntervalOrder
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
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; } }
[ "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", ";", "}", "}" ]
Returns order of another interval compared to this one @param other Interval to compare with @return -1 if this interval is before the other interval, 1 if this interval is after 0 otherwise (may indicate the two intervals are same or not comparable)
[ "Returns", "order", "of", "another", "interval", "compared", "to", "this", "one" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L605-L615
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.getRelationFlags
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
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; }
[ "public", "int", "getRelationFlags", "(", "Interval", "<", "E", ">", "other", ")", "{", "if", "(", "other", "==", "null", ")", "return", "0", ";", "int", "flags", "=", "0", ";", "int", "comp11", "=", "this", ".", "first", ".", "compareTo", "(", "other", ".", "first", "(", ")", ")", ";", "// 3 choices\r", "flags", "|=", "toRelFlags", "(", "comp11", ",", "REL_FLAGS_SS_SHIFT", ")", ";", "int", "comp22", "=", "this", ".", "second", ".", "compareTo", "(", "other", ".", "second", "(", ")", ")", ";", "// 3 choices\r", "flags", "|=", "toRelFlags", "(", "comp22", ",", "REL_FLAGS_EE_SHIFT", ")", ";", "int", "comp12", "=", "this", ".", "first", ".", "compareTo", "(", "other", ".", "second", "(", ")", ")", ";", "// 3 choices\r", "flags", "|=", "toRelFlags", "(", "comp12", ",", "REL_FLAGS_SE_SHIFT", ")", ";", "int", "comp21", "=", "this", ".", "second", ".", "compareTo", "(", "other", ".", "first", "(", ")", ")", ";", "// 3 choices\r", "flags", "|=", "toRelFlags", "(", "comp21", ",", "REL_FLAGS_ES_SHIFT", ")", ";", "flags", "=", "addIntervalRelationFlags", "(", "flags", ",", "false", ")", ";", "return", "flags", ";", "}" ]
Return set of flags indicating possible relationships between this interval and another interval. @param other Interval with which to compare with @return flags indicating possible relationship between this interval and the other interval
[ "Return", "set", "of", "flags", "indicating", "possible", "relationships", "between", "this", "interval", "and", "another", "interval", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L638-L652
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.checkMultipleBitSet
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 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; }
[ "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", ";", "}" ]
Utility function to check if multiple bits are set for flags @param flags flags to check @return true if multiple bits are set
[ "Utility", "function", "to", "check", "if", "multiple", "bits", "are", "set", "for", "flags" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L714-L724
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.checkFlagExclusiveSet
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 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; } }
[ "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", ";", "}", "}" ]
Utility function to check if a particular flag is set exclusively given a particular set of flags and a mask @param flags flags to check @param flag bit for flag of interest (is this flag set or not) @param mask bitmask of bits to check @return true if flag is exclusively set for flags & mask
[ "Utility", "function", "to", "check", "if", "a", "particular", "flag", "is", "set", "exclusively", "given", "a", "particular", "set", "of", "flags", "and", "a", "mask" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L746-L754
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.getRelation
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
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; } } }
[ "public", "RelType", "getRelation", "(", "Interval", "<", "E", ">", "other", ")", "{", "// TODO: Handle open/closed intervals?\r", "if", "(", "other", "==", "null", ")", "return", "RelType", ".", "NONE", ";", "int", "comp11", "=", "this", ".", "first", ".", "compareTo", "(", "other", ".", "first", "(", ")", ")", ";", "// 3 choices\r", "int", "comp22", "=", "this", ".", "second", ".", "compareTo", "(", "other", ".", "second", "(", ")", ")", ";", "// 3 choices\r", "if", "(", "comp11", "==", "0", ")", "{", "if", "(", "comp22", "==", "0", ")", "{", "// |---| this\r", "// |---| other\r", "return", "RelType", ".", "EQUAL", ";", "}", "if", "(", "comp22", "<", "0", ")", "{", "// SAME START - this finishes before other\r", "// |---| this\r", "// |------| other\r", "return", "RelType", ".", "INSIDE", ";", "}", "else", "{", "// SAME START - this finishes after other\r", "// |------| this\r", "// |---| other\r", "return", "RelType", ".", "CONTAIN", ";", "}", "}", "else", "if", "(", "comp22", "==", "0", ")", "{", "if", "(", "comp11", "<", "0", ")", "{", "// SAME FINISH - this start before other\r", "// |------| this\r", "// |---| other\r", "return", "RelType", ".", "CONTAIN", ";", "}", "else", "/*if (comp11 > 0) */", "{", "// SAME FINISH - this starts after other\r", "// |---| this\r", "// |------| other\r", "return", "RelType", ".", "INSIDE", ";", "}", "}", "else", "if", "(", "comp11", ">", "0", "&&", "comp22", "<", "0", ")", "{", "// |---| this\r", "// |---------| other\r", "return", "RelType", ".", "INSIDE", ";", "}", "else", "if", "(", "comp11", "<", "0", "&&", "comp22", ">", "0", ")", "{", "// |---------| this\r", "// |---| other\r", "return", "RelType", ".", "CONTAIN", ";", "}", "else", "{", "int", "comp12", "=", "this", ".", "first", ".", "compareTo", "(", "other", ".", "second", "(", ")", ")", ";", "int", "comp21", "=", "this", ".", "second", ".", "compareTo", "(", "other", ".", "first", "(", ")", ")", ";", "if", "(", "comp12", ">", "0", ")", "{", "// |---| this\r", "// |---| other\r", "return", "RelType", ".", "AFTER", ";", "}", "else", "if", "(", "comp21", "<", "0", ")", "{", "// |---| this\r", "// |---| other\r", "return", "RelType", ".", "BEFORE", ";", "}", "else", "if", "(", "comp12", "==", "0", ")", "{", "// |---| this\r", "// |---| other\r", "return", "RelType", ".", "BEGIN_MEET_END", ";", "}", "else", "if", "(", "comp21", "==", "0", ")", "{", "// |---| this\r", "// |---| other\r", "return", "RelType", ".", "END_MEET_BEGIN", ";", "}", "else", "{", "return", "RelType", ".", "OVERLAP", ";", "}", "}", "}" ]
Returns the relationship of this interval to the other interval The most specific relationship from the following is returned. NONE: the other interval is null EQUAL: this have same endpoints as other OVERLAP: this and other overlaps BEFORE: this ends before other starts AFTER: this starts after other ends BEGIN_MEET_END: this begin is the same as the others end END_MEET_BEGIN: this end is the same as the others begin CONTAIN: this contains the other INSIDE: this is inside the other UNKNOWN: this is returned if for some reason it is not possible to determine the exact relationship of the two intervals (possible for fuzzy intervals) @param other The other interval with which to compare with @return RelType indicating relationship between the two interval
[ "Returns", "the", "relationship", "of", "this", "interval", "to", "the", "other", "interval", "The", "most", "specific", "relationship", "from", "the", "following", "is", "returned", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L776-L841
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_vpnurl_binding.java
vpnglobal_vpnurl_binding.get
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 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; }
[ "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", ";", "}" ]
Use this API to fetch a vpnglobal_vpnurl_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "vpnglobal_vpnurl_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_vpnurl_binding.java#L131-L135
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamselector.java
streamselector.add
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 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); }
[ "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", ")", ";", "}" ]
Use this API to add streamselector.
[ "Use", "this", "API", "to", "add", "streamselector", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamselector.java#L114-L119
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamselector.java
streamselector.update
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 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); }
[ "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", ")", ";", "}" ]
Use this API to update streamselector.
[ "Use", "this", "API", "to", "update", "streamselector", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamselector.java#L141-L146
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamselector.java
streamselector.get
public static streamselector[] get(nitro_service service) throws Exception{ streamselector obj = new streamselector(); streamselector[] response = (streamselector[])obj.get_resources(service); return response; }
java
public static streamselector[] get(nitro_service service) throws Exception{ streamselector obj = new streamselector(); streamselector[] response = (streamselector[])obj.get_resources(service); return response; }
[ "public", "static", "streamselector", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "streamselector", "obj", "=", "new", "streamselector", "(", ")", ";", "streamselector", "[", "]", "response", "=", "(", "streamselector", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the streamselector resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "streamselector", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamselector.java#L218-L222
train