language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
python | def write_networks(folder, network_table, networks):
"""
Writing networkTable, nodes and edges to Perseus readable format.
:param folder: Path to output directory.
:param network_table: Network table.
:param networks: Dictionary with node and edge tables, indexed by network guid.
"""
ma... |
python | def ObjectModifiedEventHandler(obj, event):
""" Various types need automation on edit.
"""
if not hasattr(obj, 'portal_type'):
return
if obj.portal_type == 'Calculation':
pr = getToolByName(obj, 'portal_repository')
uc = getToolByName(obj, 'uid_catalog')
obj = uc(UID=obj... |
python | async def handle_client_new_job(self, client_addr, message: ClientNewJob):
""" Handle an ClientNewJob message. Add a job to the queue and triggers an update """
self._logger.info("Adding a new job %s %s to the queue", client_addr, message.job_id)
self._waiting_jobs[(client_addr, message.job_id)]... |
python | def _parent_queryset(self):
""" Get queryset of parent view.
Generated queryset is used to run queries in the current level view.
"""
parent = self._resource.parent
if hasattr(parent, 'view'):
req = self.request.blank(self.request.path)
req.registry = sel... |
java | protected org.javalite.activeweb.FileItem getFile(String fieldName, List<FormItem> formItems){
for (FormItem formItem : formItems) {
if(formItem instanceof org.javalite.activeweb.FileItem && formItem.getFieldName().equals(fieldName)){
return (org.javalite.activeweb.FileItem)formItem;... |
python | def get_notify_observers_kwargs(self):
""" Return the mapping between the metrics call and the iterated
variables.
Return
----------
notify_observers_kwargs: dict,
the mapping between the iterated variables.
"""
return {
'u_new': self._u_ne... |
python | def __get_query_agg_cardinality(cls, field, agg_id=None):
"""
Create an es_dsl aggregation object for getting the approximate count of distinct values of a field.
:param field: field from which the get count of distinct values
:return: a tuple with the aggregation id and es_dsl aggregat... |
java | public void mergeNodes( DdlTokenStream tokens,
AstNode firstNode,
AstNode secondNode ) {
assert tokens != null;
assert firstNode != null;
assert secondNode != null;
int firstStartIndex = (Integer)firstNode.getProperty(DDL_START_CHA... |
java | static void validateInterfaceBasics(Class<?> homeInterface,
Class<?> componentInterface,
EJBWrapperType wrapperType,
String beanName,
int beanType)
... |
java | private void canvasClick(int x, int y)
{
//always called listeners
for (CanvasClickListener listener : canvasClickAlwaysListeners)
listener.canvasClicked(x, y);
//selected listener by toggle buttons
for (JToggleButton button : canvasClickToggleListeners.keySet())
... |
java | public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesNextWithServiceResponseAsync(final String nextPageLink) {
return listSiteDiagnosticCategoriesNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<DiagnosticCategoryInner>>, Observable... |
java | public void installCertificates(final String key, final String cert, final String chain)
{
try
{
final File keyFile = File.createTempFile("key", ".pem");
final File certFile = File.createTempFile("cert", ".pem");
final File chainFile = File.createTempFile("chain", ".pem");
try
{
FileHelper.writ... |
java | public void setDefaultNamedOutput(Schema outputSchema) throws TupleMRException {
Output output = new Output(true, "DEFAULT", new TupleOutputFormat(outputSchema),
ITuple.class, NullWritable.class, null);
namedOutputs.add(output);
} |
java | public void addCodeSystem(CodeSystem theCodeSystem) {
Validate.notBlank(theCodeSystem.getUrl(), "theCodeSystem.getUrl() must not return a value");
addToMap(theCodeSystem, myCodeSystems, theCodeSystem.getUrl());
} |
python | def _load_config(robot_path):
"""
Used internally by pyfrc, don't call this directly.
Loads a json file from sim/config.json and makes the information available
to simulation/testing code.
"""
from . import config
config_obj = config.config_obj
s... |
java | boolean resolve(
final MethodWriter owner,
final int position,
final byte[] data)
{
boolean needUpdate = false;
this.status |= RESOLVED;
this.position = position;
int i = 0;
while (i < referenceCount) {
int source = srcAndRefPositions[i++];... |
python | def group2commdct(commdct, glist):
"""add group info tocomdct"""
for (gname, objname), commitem in zip(glist, commdct):
commitem[0]['group'] = gname
commitem[0]['idfobj'] = objname
return commdct |
python | def setup_logging(verbosity=0):
"""Configure python `logging`. This is required before the `debug()`,
`info()`, etc. functions may be used.
If any other `codekit.*` modules, which are not a "package", have been
imported, and they have a `setup_logging()` function, that is called before
`logging` i... |
python | def index_iterator(self):
"""
Generator that resumes from same index, or restarts from sent index.
"""
idx = 0 # index
while idx < self.number_intervals:
new_idx = yield idx
idx += 1
if new_idx:
idx = new_idx - 1 |
python | def cli(obj, expired=None, info=None):
"""Trigger the expiration and deletion of alerts."""
client = obj['client']
client.housekeeping(expired_delete_hours=expired, info_delete_hours=info) |
java | protected MultiList<String> params(List<FormItem> formItems) {
MultiList<String> params = new MultiList<>();
for (FormItem formItem : formItems) {
if(!formItem.isFile() && !params.contains(formItem.getFieldName())){
params.put(formItem.getFieldName(), formItem.getStreamAsStri... |
java | public void resetClientInformation(WSRdbManagedConnectionImpl mc) throws SQLException {
if (mc.mcf.jdbcDriverSpecVersion >= 40 && (mc.clientInfoExplicitlySet || mc.clientInfoImplicitlySet)) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(this, tc, "resetCl... |
python | def exists(self, path_or_index):
"""
Checks if a path exists in the document. This is meant to be used
for a corresponding :meth:`~couchbase.subdocument.exists` request.
:param path_or_index: The path (or index) to check
:return: `True` if the path exists, `False` if the path do... |
java | public int equivalenceCode()
{
int result = 29 + (DB != null ? DB.hashCode() : 0);
result = 29 * result + (DB_VERSION != null ? DB_VERSION.hashCode() : 0);
result = 29 * result + (ID_VERSION != null ? ID_VERSION.hashCode() : 0);
result = 29 * result + (ID != null ? ID.hashCode() : 0);
return result;
} |
python | def _transpose_words(text, pos):
"""
Drag the word before pos past the word after pos, moving pos over
that word as well. If pos is at the end of text, this transposes the
last two words in text.
"""
text, end2 = _forward_word(text, pos)
text, start2 = _backward_word(text, end2)
text, st... |
python | def get_node_sum(self, age=None):
"""Get sum of all branches in the tree.
Returns:
int: The sum of all nodes grown until the age.
"""
if age is None:
age = self.age
return age if self.comp == 1 else int((pow(self.comp, age+1) - 1) / (self.comp - 1)) |
java | public PrintWriter append(CharSequence csq) {
if (csq == null)
write("null");
else
write(csq.toString());
return this;
} |
java | public static String escapePropertiesValue(final String text, final PropertiesValueEscapeLevel level) {
if (level == null) {
throw new IllegalArgumentException("The 'level' argument cannot be null");
}
return PropertiesValueEscapeUtil.escape(text, level);
} |
java | public ScriptWrapper loadScript(ScriptWrapper script, Charset charset) throws IOException {
if (script == null) {
throw new IllegalArgumentException("Parameter script must not be null.");
}
if (charset == null) {
throw new IllegalArgumentException("Parameter charset must not be null.");
}
script.... |
python | def _check_params(self,params):
"""
Print a warning if params contains something that is not a
Parameter of the overridden object.
"""
overridden_object_params = list(self._overridden.param)
for item in params:
if item not in overridden_object_params:
... |
python | def generate_record_key(ase):
# type: (blobxfer.models.azure.StorageEntity) -> str
"""Generate a record key
:param blobxfer.models.azure.StorageEntity ase: Storage Entity
:rtype: str
:return: record key
"""
key = '{}:{}'.format(ase._client.primary_endpoint, ase.pa... |
java | public static final void deleteQuietly(File file)
{
if (file != null)
{
if (file.isDirectory())
{
File[] children = file.listFiles();
if (children != null)
{
for (File child : children)
{
deleteQuietly(c... |
java | @Override
public OUT get() {
ACC accumulator = getInternal();
return accumulator != null ? aggregateTransformation.aggFunction.getResult(accumulator) : null;
} |
python | def separate_trailing_comments(lines: List[str]) -> List[Tuple[int, str]]:
"""Given a list of numbered Fortran source code lines, i.e., pairs of the
form (n, code_line) where n is a line number and code_line is a line
of code, separate_trailing_comments() behaves as follows: for each
pair (n, c... |
java | public static Double toNullableDouble(Object value) {
if (value == null)
return null;
if (value instanceof Date)
return (double) ((Date) value).getTime();
if (value instanceof Calendar)
return (double) ((Calendar) value).getTimeInMillis();
if (value instanceof Duration)
return (double) ((Duration) ... |
java | public void configure(JobConf jobConf) {
String prefix = getPrefix(isMap);
chainJobConf = jobConf;
SerializationFactory serializationFactory =
new SerializationFactory(chainJobConf);
int index = jobConf.getInt(prefix + CHAIN_MAPPER_SIZE, 0);
for (int i = 0; i < index; i++) {
Class<? exte... |
java | public static void startAppOnPebble(final Context context, final UUID watchappUuid)
throws IllegalArgumentException {
if (watchappUuid == null) {
throw new IllegalArgumentException("uuid cannot be null");
}
final Intent startAppIntent = new Intent(INTENT_APP_START);
... |
java | @Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public Annotation createAnnotation(Data data) {
return Annotation.fromDescriptionAndAttributes(ANNOTATION_DESCRIPTION, data.attributeMap);
} |
java | @Override
public boolean remove(Object o) {
final ReentrantLock lock = this.lock;
lock.lock();
try {
Object[] elements = getArray();
int len = elements.length;
if (len != 0) {
// Copy while searching for element to remove
//... |
java | public static OpenCLKernel createKernel(OpenCLProgram _program, String _kernelName, List<OpenCLArgDescriptor> _args) {
final OpenCLArgDescriptor[] argArray = _args.toArray(new OpenCLArgDescriptor[0]);
final OpenCLKernel oclk = new OpenCLKernel().createKernelJNI(_program, _kernelName, argArray);
for (f... |
python | def is_internet_on(host="8.8.8.8", port=53, timeout=3):
"""Checks if machine has internet connection
:param host: hostname to test
:param port: port of hostname
:param timeout: seconds before discarding connection
:return: True iff machine has internet connection
"""
socket.setdefaulttimeou... |
java | public static boolean isMappedIPv4Address(Inet6Address ip) {
byte bytes[] = ip.getAddress();
return ((bytes[0] == 0x00) && (bytes[1] == 0x00) &&
(bytes[2] == 0x00) && (bytes[3] == 0x00) &&
(bytes[4] == 0x00) && (bytes[5] == 0x00) &&
(bytes[6] == 0x00) && (... |
java | public Observable<DatabaseInner> beginPauseAsync(String resourceGroupName, String serverName, String databaseName) {
return beginPauseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseInner>, DatabaseInner>() {
@Override
public Da... |
java | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "LII_LIST_INDEXED_ITERATING", justification = "this doesn't iterate over every element, so we can't use a for-each loop")
private static boolean hasSimilarParms(List<String> argTypes) {
for (int i = 0; i < (argTypes.size() - 1); i++) {
if (argTypes.get(... |
java | public void setAlpha(javax.el.ValueExpression _alpha) {
getStateHelper().put(PropertyKeys.alpha, _alpha);
} |
python | def parse(self, data):
'''Parse fields and store individual errors'''
self.field_errors = {}
return dict(
(k, self._parse_value(k, v)) for k, v in data.items()
) |
java | @SuppressFBWarnings(value = "DP_DO_INSIDE_DO_PRIVILEGED", justification = "EV is run only from within unit tests")
@SuppressWarnings("unchecked")
public <T> T returnConstant(String constantName) {
try {
Class<T> type = resolve();
if (type == null) {
return null;
... |
java | protected void assertNonNullFieldPrecondition(NonNullableFieldWasNullException e) throws NonNullableFieldWasNullException {
ExecutionStepInfo executionStepInfo = e.getExecutionStepInfo();
if (executionStepInfo.hasParent() && executionStepInfo.getParent().isNonNullType()) {
throw new NonNulla... |
python | def iter_org_events(self, org, number=-1, etag=None):
"""Iterate over events as they appear on the user's organization
dashboard. You must be authenticated to view this.
:param str org: (required), name of the organization
:param int number: (optional), number of events to return. Defau... |
python | def path(self):
"""Node's relative path from the root node"""
if self.parent:
try:
parent_path = self.parent.path.encode()
except AttributeError:
parent_path = self.parent.path
return os.path.join(parent_path, self.name)
return... |
python | def duplicate_object_hook(ordered_pairs):
"""Make lists out of duplicate keys."""
json_dict = {}
for key, val in ordered_pairs:
existing_val = json_dict.get(key)
if not existing_val:
json_dict[key] = val
else:
if isinstance(existing_val, list):
... |
java | protected static final Map<String, ArrayList<String>> parseUserData(String userData) {
int tokenLen = userData.length();
int numOfAttribs = 1; // default has "user" (u) attribute
int lastDelim = 0;
int i = 0;
Map<String, ArrayList<String>> attribs = new HashMap<String, ArrayList<... |
java | public static List<CommerceDiscount> findByG_C(long groupId,
String couponCode) {
return getPersistence().findByG_C(groupId, couponCode);
} |
java | public static <T, U, R> BiFunction<T, U, R> biFunction(CheckedBiFunction<T, U, R> function, Consumer<Throwable> handler) {
return (t, u) -> {
try {
return function.apply(t, u);
}
catch (Throwable e) {
handler.accept(e);
throw n... |
java | @Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case SarlPackage.SARL_FORMAL_PARAMETER__DEFAULT_VALUE:
return defaultValue != null;
}
return super.eIsSet(featureID);
} |
python | def add_logging_level(name, value, method_name=None):
''' Comprehensively adds a new logging level to the ``logging`` module and
the currently configured logging class.
Derived from: https://stackoverflow.com/a/35804945/450917
'''
if not method_name:
method_name = name.lower()
... |
java | public void serialize( JsonWriter writer, T value, JsonSerializationContext ctx ) throws JsonSerializationException {
serialize( writer, value, ctx, JsonSerializerParameters.DEFAULT );
} |
java | protected void copyFile(File outputDirectory,
File sourceFile,
String targetFileName) throws IOException
{
InputStream fileStream = new FileInputStream(sourceFile);
try
{
copyStream(outputDirectory, fileStream, targetFileNam... |
java | public static char[] add(char[] array, char element) {
char[] newArray = (char[])copyArrayGrow1(array, Character.TYPE);
newArray[newArray.length - 1] = element;
return newArray;
} |
python | def compat_string(value):
"""
Provide a python2/3 compatible string representation of the value
:type value:
:rtype :
"""
if isinstance(value, bytes):
return value.decode(encoding='utf-8')
return str(value) |
java | public void setThemeType(ThemeType themeType) {
if (themeType == ThemeType.ACTIVITY) {
setTheme(android.R.style.Theme_Holo_Light);
} else if (themeType == ThemeType.DIALOG) {
setTheme(android.R.style.Theme_Holo_Light_Dialog);
} else if (themeType == ThemeType.DIALOG_NO_AC... |
python | def get_fields(self):
"""Returns the serializer's field set.
If `dynamic` is True, respects field inclusions/exlcusions.
Otherwise, reverts back to standard DRF behavior.
"""
all_fields = self.get_all_fields()
if self.dynamic is False:
return all_fields
... |
java | public static Atom[] getBackboneAtomArray(Structure s) {
List<Atom> atoms = new ArrayList<Atom>();
for (Chain c : s.getChains()) {
for (Group g : c.getAtomGroups()) {
if (g.hasAminoAtoms()) {
// this means we will only take atoms grom groups that have
// complete backbones
for (Atom a : g.ge... |
python | async def _seed2did(self) -> str:
"""
Derive DID, as per indy-sdk, from seed.
:return: DID
"""
rv = None
dids_with_meta = json.loads(await did.list_my_dids_with_meta(self.handle)) # list
if dids_with_meta:
for did_with_meta in dids_with_meta: # di... |
java | public static <T> T withObjectInputStream(File file, @ClosureParams(value = SimpleType.class, options = "java.io.ObjectInputStream") Closure<T> closure) throws IOException {
return IOGroovyMethods.withStream(newObjectInputStream(file), closure);
} |
python | def map_column(self, keys, func):
"""
Args:
keys (list or str): the column name(s) to apply the `func` to
func (callable): applied to each element in the specified columns
"""
return [[func(v) for v in self[key]] for key in keys] |
python | def hex2termhex(hexval: str, allow_short: bool = False) -> str:
""" Convert a hex value into the nearest terminal color matched hex. """
return rgb2termhex(*hex2rgb(hexval, allow_short=allow_short)) |
java | public String getFlowControllerURI()
{
FlowController flowController = getFlowController();
return flowController != null ? flowController.getDisplayName() : null;
} |
java | public String replaceSymbols(String str) {
Matcher m = SYMBOL_DEF.matcher(str);
if (m.find()) {
String symbol = m.group(1);
String expansion = get(symbol);
if (expansion != null) {
return str.replace(m.group(0), expansion);
}
}
... |
python | def set_dirty(self, dirty):
""" .. todo:: set_clean docstring
"""
# Complain if 'dirty' isn't boolean
if not isinstance(dirty, bool):
raise ValueError("'dirty' must be Boolean")
## end if
# Try to retrieve the dataset; complain if repo not bound.
try... |
python | def set_config(self, **config):
"""Shadow all the current config."""
reinit = False
if 'stdopt' in config:
stdopt = config.pop('stdopt')
reinit = (stdopt != self.stdopt)
self.stdopt = stdopt
if 'attachopt' in config:
attachopt = config.pop(... |
python | def get_resource(resource_name):
"""
Return a resource in current directory or in frozen package
"""
resource_path = None
if hasattr(sys, "frozen"):
resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
elif not hasattr(sys, "frozen") and pkg_res... |
python | def filter_vectors(self, input_list):
"""
Returns subset of specified input list.
"""
try:
# Return filtered (vector, data, distance )tuple list. Will fail
# if input is list of (vector, data) tuples.
sorted_list = sorted(input_list, key=lambda x: x[2]... |
python | def predict_mhcii_binding(job, peptfile, allele, univ_options, mhcii_options):
"""
This module will predict MHC:peptide binding for peptides in the files created in node YY to
ALLELE. ALLELE represents an MHCII allele.
The module returns (PREDFILE, PREDICTOR) where PREDFILE contains the predictions an... |
python | def group(self, index, chunked=False):
""" Returns a list of Word objects that match the given group.
With chunked=True, returns a list of Word + Chunk objects - see Match.constituents().
A group consists of consecutive constraints wrapped in { }, e.g.,
search("{JJ JJ} NN", S... |
java | static public int intToBytes(int i, byte[] buffer, int index) {
int length = buffer.length - index;
if (length > 4) length = 4;
for (int j = 0; j < length; j++) {
buffer[index + length - j - 1] = (byte) (i >> (j * 8));
}
return length;
} |
java | public void set(int row, int col, double val) {
backingMatrix.set(getRealRow(row), col, val);
} |
java | public static RoaringBitmap bitmapOfUnordered(final int... data) {
RoaringBitmapWriter<RoaringBitmap> writer = writer().constantMemory()
.doPartialRadixSort().get();
writer.addMany(data);
writer.flush();
return writer.getUnderlying();
} |
python | def _receiving(self):
"""
Receiving loop
:rtype: None
"""
while self._is_running:
try:
rlist, wlist, xlist = select.select(
self._listening, [], [],
self._select_timeout
)
except:
... |
python | def resume_processes(self, as_group, scaling_processes=None):
"""
Resumes Auto Scaling processes for an Auto Scaling group.
:type as_group: string
:param as_group: The auto scaling group to resume processes on.
:type scaling_processes: list
:param scaling_processes: Pro... |
python | def has_special_char(p_str, check_style=charChinese):
"""
检查字符串是否含有指定类型字符
:param:
* p_str: (string) 需要判断的字符串
* check_style: (string) 需要判断的字符类型,默认为 charChinese (编码仅支持utf-8), 支持 charNum,该参数向后兼容
:return:
* True 含有指定类型字符
* False 不含有指定类型字符
举例如下::
print('--- has... |
python | def parse(binary, **params):
"""Turns a JSON structure into a python object."""
encoding = params.get('charset', 'UTF-8')
return json.loads(binary, encoding=encoding) |
python | def main():
"""Main function."""
table_data = [
['Long String', ''], # One row. Two columns. Long string will replace this empty string.
]
table = SingleTable(table_data)
# Calculate newlines.
max_width = table.column_max_width(1)
wrapped_string = '\n'.join(wrap(LONG_STRING, max_wi... |
java | public static String locateUndefinedElement(Element e) {
if (e instanceof Resource) {
// recursively check all of the resources children
Resource r = (Resource) e;
for (Resource.Entry entry : r) {
String rpath = locateUndefinedElement(entry.getValue());
... |
python | def ref(self, orm_classpath, cls_pk=None):
"""
takes a classpath to allow query-ing from another Orm class
the reason why it takes string paths is to avoid infinite recursion import
problems because an orm class from module A might have a ref from module B
and sometimes it is h... |
java | ScrollQuery scanLimit(String query, BytesArray body, long limit, ScrollReader reader) {
return new ScrollQuery(this, query, body, limit, reader);
} |
python | def parseColors(colors, defaultColor):
"""
Parse command line color information.
@param colors: A C{list} of space separated "value color" strings, such as
["0.9 red", "0.75 rgb(23, 190, 207)", "0.1 #CF3CF3"].
@param defaultColor: The C{str} color to use for cells that do not reach
the ... |
java | private void printInfoHost(StringBuilder buf, String uri, boolean reduceDisplay, boolean allowCmd, final Node node) {
for (Node.VHostMapping host : node.getVHosts()) {
if (!reduceDisplay) {
buf.append("<h2> Virtual Host " + host.getId() + ":</h2>");
}
printInf... |
java | @Override
public Future<?> apply(final ClientRequest request, final AsyncConnectorCallback callback) {
// Simulate an asynchronous execution
return new DirectExecutorService().submit(() -> {
try {
callback.response(apply(request));
} catch (Exception e) {
... |
python | def assert_json_subset(first, second):
"""Assert that a JSON object or array is a subset of another JSON object
or array.
The first JSON object or array must be supplied as a JSON-compatible
dict or list, the JSON object or array to check must be a string, an
UTF-8 bytes object, or a JSON-compatibl... |
java | @Override
public EClass getIfcPositiveLengthMeasure() {
if (ifcPositiveLengthMeasureEClass == null) {
ifcPositiveLengthMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(901);
}
return ifcPositiveLengthMeasureEClass;
} |
python | def validate(cls, mapper_spec):
"""Validates mapper spec.
Args:
mapper_spec: The MapperSpec for this InputReader.
Raises:
BadReaderParamsError: required parameters are missing or invalid.
"""
if mapper_spec.input_reader_class() != cls:
raise BadReaderParamsError("Input reader cla... |
java | private int readAndWriteText(Writer w)
throws IOException, XMLStreamException
{
mTokenState = TOKEN_FULL_SINGLE; // we'll read it all
/* We should be able to mostly just use the input buffer at this
* point; exceptions being two-char linefeeds (when converting
* to single ... |
java | public static SelectedRule rule(String rule, ArgumentBuilder arguments) throws Exception
{
if (AunitRuntime.getParserFactory() == null) throw new IllegalStateException("Parser factory not set by configuration");
for (Method method : collectMethods(AunitRuntime.getParserFactory().getParserClass()))
... |
java | public void deleteClassPipeProperties(String className,
String pipeName, String[] propertyNames) throws DevFailed {
ArrayList<String> list = new ArrayList<String>(propertyNames.length);
Collections.addAll(list, propertyNames);
databaseDAO.deleteClassPip... |
java | public static String processColor(String color) {
log.info("Process Color [{}].", color);
String colorRtn = null;
if (StringUtils.isNotBlank(color)) {
HSSFColor poiColor = null;
// #rgb -> #rrggbb
if (color.matches(COLOR_PATTERN_VALUE_SHORT)) {
log.debug("Short Hex Color [{}] Fou... |
python | def list_addresses(self, tag_values=None):
'''
a method to list elastic ip addresses associated with account on AWS
:param tag_values: [optional] list of tag values
:return: list of strings with ip addresses
'''
title = '%s.list_addresse... |
java | public List<CmsUser> searchUsers(CmsDbContext dbc, CmsUserSearchParameters searchParams
) throws CmsDataAccessException {
return getUserDriver(dbc).searchUsers(dbc, searchParams);
} |
java | private Map<URI, Map<String, Element>> getMapMetadata(final Collection<FileInfo> fis) {
final MapMetaReader metaReader = new MapMetaReader();
metaReader.setLogger(logger);
metaReader.setJob(job);
for (final FileInfo f : fis) {
final File mapFile = new File(job.tempDir, f.file... |
java | public Instance withSecurityGroups(GroupIdentifier... securityGroups) {
if (this.securityGroups == null) {
setSecurityGroups(new com.amazonaws.internal.SdkInternalList<GroupIdentifier>(securityGroups.length));
}
for (GroupIdentifier ele : securityGroups) {
this.securityGr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.