language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
python | def _configure_using_fluent_definition(self):
"""
Configure the console command using a fluent definition.
"""
definition = Parser.parse(self.signature)
self._config.set_name(definition["name"])
for name, flags, description, default in definition["arguments"]:
... |
python | def get_message_data(msg, key):
'''get the datapoint from the dot delimited message field key
e.g. translation.x looks up translation than x and returns the value found
in x'''
data = msg
paths = key.split('.')
for i in paths:
data = getattr(data, i)
return data |
python | def unbind_opr(self, opr, path=None):
""" 接触操作员与权限关联
"""
if path:
self.routes[path]['oprs'].remove(opr)
else:
for path in self.routes:
route = self.routes.get(path)
if route and opr in route['oprs']:
route['oprs'... |
java | private void checkSameNameSibling(NodeData node, WorkspaceStorageConnection con, final Set<QPath> addedNodes)
throws RepositoryException
{
if (node.getQPath().getIndex() > 1)
{
// check if an older same-name sibling exists
// the check is actual for all operations including delete... |
java | public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException
{
synchronized (this.getTask())
{ // Just being careful (in case the user decides to do some data access)
// Don't override this, override doRemoteCommand(xxx);
... |
java | @Override
public void resolve(final ValueStack values) throws Exception
{
if (values.size() < 1)
throw new Exception("missing operands for " + toString());
try
{
final StringBuilder buf = new StringBuilder();
try (final Formatter fmt = new Formatter(b... |
python | def ClickAndHold(cls):
''' 相当于 按压,press '''
element = cls._element()
action = ActionChains(Web.driver)
action.click_and_hold(element)
action.perform() |
python | def get_config_input_source_config_source_startup_startup(self, **kwargs):
"""Auto Generated Code
"""
config = ET.Element("config")
get_config = ET.Element("get_config")
config = get_config
input = ET.SubElement(get_config, "input")
source = ET.SubElement(input, "... |
java | public JsHandlerRegistration addGeometryMergeAddedHandler(final GeometryMergeAddedHandler handler) {
org.geomajas.plugin.editing.client.merge.event.GeometryMergeAddedHandler h;
h = new org.geomajas.plugin.editing.client.merge.event.GeometryMergeAddedHandler() {
public void onGeometryMergingAdded(GeometryMergeAd... |
python | def _read_para_notification(self, code, cbit, clen, *, desc, length, version):
"""Read HIP NOTIFICATION parameter.
Structure of HIP NOTIFICATION parameter [RFC 7401]:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 ... |
python | def get_cell_length(flow_model):
"""Get flow direction induced cell length dict.
Args:
flow_model: Currently, "TauDEM", "ArcGIS", and "Whitebox" are supported.
"""
assert flow_model.lower() in FlowModelConst.d8_lens
return FlowModelConst.d8_lens.get(flow_model.lower()... |
java | public void print(final MBasicTable table) throws IOException {
final File file = getFile(table);
if (file != null) {
try (OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(file))) {
print(table, outputStream);
}
showDocument(file);
}
} |
python | def users_getPresence(self, *, user: str, **kwargs) -> SlackResponse:
"""Gets user presence information.
Args:
user (str): User to get presence info on. Defaults to the authed user.
e.g. 'W1234567890'
"""
kwargs.update({"user": user})
return self.api_... |
python | def get_asset_ids_by_repository(self, repository_id):
"""Gets the list of ``Asset`` ``Ids`` associated with a ``Repository``.
arg: repository_id (osid.id.Id): ``Id`` of the ``Repository``
return: (osid.id.IdList) - list of related asset ``Ids``
raise: NotFound - ``repository_id`` i... |
python | def fetch(
self,
url,
filename=None,
decompress=False,
force=False,
timeout=None,
use_wget_if_available=True):
"""
Return the local path to the downloaded copy of a given URL.
Don't download the file again if it'... |
java | public static boolean write(Image image, String imageType, ImageOutputStream destImageStream, float quality) throws IORuntimeException {
if (StrUtil.isBlank(imageType)) {
imageType = IMAGE_TYPE_JPG;
}
final ImageWriter writer = getWriter(image, imageType);
return write(toBufferedImage(image, imageType... |
java | @Override
public CommerceOrder fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} |
python | def optimal_slope(cn,n,dt,z,i):
"""
;+
;
; OPTIMAL_SLOPE : Function to compute the slope using a Powell et Leben (2004) <br />
; filter with given characteristics.<br /><br />
;
; Reference : Powell, B. S., et R. R. Leben (2004), An Optimal Filter for <br />
; Geostrop... |
python | def Registry(address='https://index.docker.io', **kwargs):
"""
:return:
"""
registry = None
try:
try:
registry = V1(address, **kwargs)
registry.ping()
except RegistryException:
registry = V2(address, **kwargs)
registry.ping()
except... |
python | def connection_from_url(url, **kw):
"""
Given a url, return an :class:`.ConnectionPool` instance of its host.
This is a shortcut for not having to parse out the scheme, host, and port
of the url before creating an :class:`.ConnectionPool` instance.
:param url:
Absolute URL string that must... |
python | def removeFromRegistery(obj) :
"""Removes an object/rabalist from registery. This is useful if you want to allow the garbage collector to free the memory
taken by the objects you've already loaded. Be careful might cause some discrepenties in your scripts. For objects,
cascades to free the registeries of related rab... |
java | public void add(Image image) {
assert !start || listener == null;
++total;
image.addCallback(callback);
} |
python | def __get_jwks_key(self, jwks_uri, **kwargs):
"""Get from jwks_ui all the JWK keys required to decode JWT Token.
Parameters
----------
jwks_uri : string
The URL where to gather JWKS key
kwargs : Dict
The constructor parameters
"""
... |
python | def mac_hex_to_ascii(mac_hex, inc_dots):
'''
Format a hex MAC string to ASCII
Args:
mac_hex: Value from SNMP
inc_dots: 1 to format as aabb.ccdd.eeff, 0 to format aabbccddeeff
Returns:
String representation of the mac_hex
'''
v = ... |
java | public void writeExternal(ObjectOutput out) throws IOException
{
out.writeInt(orderNumber);
byte[] data = value.getBytes(Constants.DEFAULT_ENCODING);
out.writeInt(data.length);
if (data.length > 0)
{
out.write(data);
}
} |
java | public void recordSlowTask(String trackerName) {
synchronized (this) {
NodeUsageReport usageReport = getReportUnprotected(trackerName);
usageReport.setNumSlow(usageReport.getNumSlow() + 1);
}
} |
java | public com.google.api.ads.adwords.axis.v201809.cm.SpendTargetType getSpendTargetType() {
return spendTargetType;
} |
python | def load_jquery(func):
"""
A decorator to ensure a function is run with jQuery available.
If an exception from a function indicates jQuery is missing, it is loaded
and the function re-executed.
The browser to load jQuery into must be the first argument of the function.
"""
@wraps(func)
... |
python | def to_utc(self, dt):
"""Convert any timestamp to UTC (with tzinfo)."""
if dt.tzinfo is None:
return dt.replace(tzinfo=self.utc)
return dt.astimezone(self.utc) |
python | def plot_separate(self):
"""
plot the different model components separately
:return:
"""
f, axes = plt.subplots(2, 3, figsize=(16, 8))
self.decomposition_plot(ax=axes[0, 0], text='Lens light', lens_light_add=True, unconvolved=True)
self.decomposition_plot(ax=axe... |
python | def everything(self, include_deleted=False, content_id=None,
subtopic_id=None, prefix=None):
'''Returns a generator of all labels in the store.
If `include_deleted` is :const:`True`, labels that have been
overwritten with more recent labels are also included. If
`con... |
python | def predict_w(self, data3d, voxelsize_mm, weight, label0=0, label1=1):
"""
segmentation with weight factor
:param data3d:
:param voxelsize_mm:
:param weight:
:return:
"""
scores = self.scores(data3d, voxelsize_mm)
out = scores[label1] > (weight * s... |
python | def set_coordinate_selection(self, selection, value, fields=None):
"""Modify a selection of individual items, by providing the indices (coordinates)
for each item to be modified.
Parameters
----------
selection : tuple
An integer (coordinate) array for each dimension... |
python | def configuration_signature(config):
"""
Return a signature for a configuration (xml_generator_configuration_t)
object.
This can then be used as a key in the cache.
This method must take into account anything about
a configuration that could cause the declarations generated
to be different ... |
python | def argument_parser(version=None):
"""Create the argument parser for ncbi-genome-download."""
parser = argparse.ArgumentParser()
parser.add_argument('group',
default=NgdConfig.get_default('group'),
help='The NCBI taxonomic group to download (default: %(default... |
python | def _add_remove_team_member(self, url, email_address=None, account_id=None):
''' Add or Remove a team member
We use this function for two different tasks because they have the same
API call
Args:
email_address (str): Email address of the Account to add/remove
... |
java | public static String generateOutputFilePath(String path, String fileName) {
String tempPath = separatorsToSystem(path);
tempPath = tempPath + File.separatorChar + fileName;
return tempPath;
} |
java | public void populate(Entity entity) {
// auto date
generateAutoDateOrDateTime(singletonList(entity), entity.getEntityType().getAttributes());
// auto id
Attribute idAttr = entity.getEntityType().getIdAttribute();
if (idAttr != null
&& idAttr.isAuto()
&& entity.getIdValue() == null
... |
java | public SoundImpl<?> createSound(AssetFileDescriptor fd) {
PooledSound sound = new PooledSound(pool.load(fd, 1));
loadingSounds.put(sound.soundId, sound);
return sound;
} |
java | public void write(RowOutputInterface out,
ResultMetaData meta) throws IOException {
beforeFirst();
out.writeLong(id);
out.writeInt(size);
out.writeInt(0); // offset
out.writeInt(size);
while (hasNext()) {
Object[] data = getNext();
... |
java | public LongitudePair getLongitudeOnGreatCircle(Position position, double latitudeDegrees) {
double lat3 = toRadians(latitudeDegrees);
double lat1 = toRadians(lat);
double lon1 = toRadians(lon);
double lat2 = toRadians(position.getLat());
double lon2 = toRadians(position.getLon())... |
java | public void setupFields()
{
FieldInfo field = null;
field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
field.setDataClass(Integer.class);
} |
python | def from_subdir(cls, container, info_obj):
"""Create from subdirectory info object."""
return cls(container,
info_obj['subdir'],
obj_type=cls.type_cls.SUBDIR) |
python | def __get_keys(self, name='master', passphrase=None):
'''
Returns a key object for a key in the pki-dir
'''
path = os.path.join(self.opts['pki_dir'],
name + '.pem')
if not os.path.exists(path):
log.info('Generating %s keys: %s', name, self.... |
python | def _make_function(instr, queue, stack, body, context):
"""
Set a make_function_context, then push onto the stack.
"""
assert stack, "Empty stack before MAKE_FUNCTION."
prev = stack[-1]
expect(prev, instrs.LOAD_CONST, "before MAKE_FUNCTION")
stack.append(instr)
if is_lambda_name(prev.a... |
java | public Observable<ServiceResponse<Page<DataLakeStoreAccountInfoInner>>> listDataLakeStoreAccountsWithServiceResponseAsync(final String resourceGroupName, final String accountName) {
return listDataLakeStoreAccountsSinglePageAsync(resourceGroupName, accountName)
.concatMap(new Func1<ServiceResponse<P... |
java | public static <T, ET extends T, A1> DecomposableMatchBuilder1<List<T>, A1> headTail(
DecomposableMatchBuilder1<ET, A1> head, MatchesExact<List<T>> tail) {
List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.any(), ArgumentMatchers.eq(tail.t));
return new DecomposableMatchBuilder1<List<T>, ET>(
... |
java | public static ByteBuf copyLong(long value) {
ByteBuf buf = buffer(8);
buf.writeLong(value);
return buf;
} |
python | def data_mnist(datadir=tempfile.gettempdir(), train_start=0,
train_end=60000, test_start=0, test_end=10000):
"""
Load and preprocess MNIST dataset
:param datadir: path to folder where data should be stored
:param train_start: index of first training set example
:param train_end: index of last t... |
java | public static <T extends Case1<A>, A> DecomposableMatchBuilder1<T, A> case1(
Class<T> clazz, MatchesAny<A> a) {
List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.any());
return new DecomposableMatchBuilder1<T, A>(matchers, 0, new Case1FieldExtractor<>(clazz));
} |
python | def get_crime(self, persistent_id):
"""
Get a particular crime by persistent ID. Uses the outcomes-for-crime_
API call.
.. _outcomes-for-crime:
https://data.police.uk/docs/method/outcomes-for-crime/
:rtype: Crime
:param str persistent_id: The persistent ID o... |
python | def get_column(self, id_or_name):
"""
Gets a column from this table by id or name
:param id_or_name: the id or name of the column
:return: WorkBookTableColumn
"""
url = self.build_url(self._endpoints.get('get_column').format(quote(id_or_name)))
response = self.ses... |
java | @BetaApi
public final Operation deleteTargetInstance(ProjectZoneTargetInstanceName targetInstance) {
DeleteTargetInstanceHttpRequest request =
DeleteTargetInstanceHttpRequest.newBuilder()
.setTargetInstance(targetInstance == null ? null : targetInstance.toString())
.build();
r... |
python | def open_output_file(self, test_record):
"""Open file based on pattern."""
# Ignore keys for the log filename to not convert larger data structures.
record_dict = data.convert_to_base_types(
test_record, ignore_keys=('code_info', 'phases', 'log_records'))
pattern = self.filename_pattern
if i... |
java | public static Map<String, XAREntry> getXarEntriesMapFromXML(InputStream stream) throws Exception
{
SAXReader reader = new SAXReader();
Document domdoc;
domdoc = reader.read(stream);
Element filesElement = domdoc.getRootElement().element(FILES_TAG);
if (filesElement == null)... |
python | def setFontUnderline(self, state):
"""
Sets whether or not this editor is currently in underline state.
:param state | <bool>
"""
font = self.currentFont()
font.setUnderline(state)
self.setCurrentFont(font) |
java | public void doRuntimeConfiguration(String pluginName, RuntimeSpringConfiguration springConfig) {
checkInitialised();
GrailsPlugin plugin = getGrailsPlugin(pluginName);
if (plugin == null) {
throw new PluginException("Plugin [" + pluginName + "] not found");
}
if (!pl... |
python | def create_signature(self, base_url, payload=None):
"""
Creates unique signature for request.
Make sure ALL 'GET' and 'POST' data is already included before
creating the signature or receiver won't be able to re-create it.
:param base_url:
The url you'll using for yo... |
python | def __setup_fileserver(self):
'''
Set the local file objects from the file server interface
'''
# Avoid circular import
import salt.fileserver
self.fs_ = salt.fileserver.Fileserver(self.opts)
self._serve_file = self.fs_.serve_file
self._file_find = self.fs... |
python | def analyze_quality_graph(self, obj):
""" Takes in an the object returned by the MDAL query, and analyzes the quality
of the data for each column in the df in the form of graphs. The Graphs returned
show missing data events over time, and missing data frequency during each hour
of the d... |
java | protected static double[][] randomInitialSolution(final int size, final int dim, Random random) {
double[][] sol = new double[size][dim];
for(int i = 0; i < size; i++) {
for(int j = 0; j < dim; j++) {
sol[i][j] = random.nextGaussian() * INITIAL_SOLUTION_SCALE;
}
}
return sol;
} |
python | def peek_step(self, val: ObjectValue,
sn: "DataNode") -> Tuple[Value, "DataNode"]:
"""Return member value addressed by the receiver + its schema node.
Args:
val: Current value (object).
sn: Current schema node.
"""
cn = sn.get_data_child(self.n... |
java | public static <T> T invokeMethod(Object obj, String methodName, Object... args) {
Object[] theArgs = ArrayUtils.nullToEmpty(args);
final Class<?>[] parameterTypes = ClassUtils.toClass(theArgs);
return invokeMethod(obj, methodName, theArgs, parameterTypes);
} |
java | public void visitSymlink(File link, String target, String relativePath) throws IOException {
visit(link,relativePath);
} |
python | def load_soil_sample_data(sp):
"""
Sample data for the Soil object
:param sp: Soil Object
:return:
"""
# soil
sp.g_mod = 60.0e6 # [Pa]
sp.phi = 30 # [degrees]
sp.relative_density = .40 # [decimal]
sp.gwl = 2. # [m], ground water level
sp.unit_dry_weight = 17000 # [N/m3]
... |
python | def del_feed(name):
"""remove from database (and delete aliases)"""
with Database("aliases") as aliases, Database("feeds") as feeds:
if aliases[name]:
proper_name = aliases[name]
elif feeds[name]:
proper_name = feeds[name]
for k, v in aliases:
if v == ... |
python | def oauth_access(
self, *, client_id: str, client_secret: str, code: str, **kwargs
) -> SlackResponse:
"""Exchanges a temporary OAuth verifier code for an access token.
Args:
client_id (str): Issued when you created your application. e.g. '4b39e9-752c4'
client_secret... |
python | def wget(url):
"""
Download the page into a string
"""
import urllib.parse
request = urllib.request.urlopen(url)
filestring = request.read()
return filestring |
java | public Iterable<ActionImport> build(FactoryLookup lookup) {
List<ActionImport> actionImports = new ArrayList<>();
for (ActionImportImpl.Builder actionImportBuilder : actionImportBuilders) {
actionImportBuilder.setEntitySet(
lookup.getEntitySet(actionImportBuilder.getEntit... |
python | def get_pubmed_citation_response(pubmed_identifiers: Iterable[str]):
"""Get the response from PubMed E-Utils for a given list of PubMed identifiers.
:param pubmed_identifiers:
:rtype: dict
"""
pubmed_identifiers = list(pubmed_identifiers)
url = EUTILS_URL_FMT.format(','.join(
pubmed_ide... |
python | def setContent(self, type_, value):
"""
Sets the content that's going to be sent to analyze according to its type
:param type_:
Type of the content (text, file or url)
:param value:
Value of the content
"""
if type_ in [self.CONTENT_TYPE_TXT, sel... |
java | private Properties getRequestProperties(final ICommandLine cl, final String method) throws UnsupportedEncodingException {
Properties props = new Properties();
if (cl.hasOption("useragent")) {
props.setProperty("User-Agent", cl.getOptionValue("useragent"));
} else {
props.... |
java | public JBBPTextWriter Str(final String... str) throws IOException {
JBBPUtils.assertNotNull(str, "String must not be null");
final String oldPrefix = this.prefixValue;
final String oldPostfix = this.postfixValue;
this.prefixValue = "";
this.postfixValue = "";
for (final String s : str) {
... |
python | def _build(self, lexer):
"""Build :class:`~ctfile.ctfile.SDfile` instance.
:return: :class:`~ctfile.ctfile.SDfile` instance.
:rtype: :class:`~ctfile.ctfile.SDfile`.
"""
current_entry_id = 0
while True:
token = next(lexer)
key = token.__class__.__... |
python | def _prep_genome(out_dir, data):
"""Create prepped reference directory for pisces.
Requires a custom GenomeSize.xml file present.
"""
genome_name = utils.splitext_plus(os.path.basename(dd.get_ref_file(data)))[0]
out_dir = utils.safe_makedir(os.path.join(out_dir, genome_name))
ref_file = dd.get_... |
java | private void updateRunningChannels(ChannelDataImpl channelData) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "updateRunningChannels");
}
Channel channel = null;
ChannelContainer channelContainer = null;
Iterator<ChildChannelDataImp... |
java | public void release() {
// This method is never called by jcl-over-slf4j classes. However,
// in certain deployment scenarios, in particular if jcl-over-slf4j.jar
// is
// in the the web-app class loader and the official commons-logging.jar is
// deployed in some parent class loa... |
java | public SDVariable uniform(String name, double min, double max, long... shape) {
SDVariable ret = f().randomUniform(min, max, shape);
return updateVariableNameAndReference(ret, name);
} |
java | private org.ironjacamar.core.api.deploymentrepository.Recovery
createRecovery(javax.resource.spi.ManagedConnectionFactory mcf, ConnectionDefinition cd) throws Throwable
{
Boolean padXid = Defaults.PAD_XID;
Boolean isSameRMOverride = Defaults.IS_SAME_RM_OVERRIDE;
Boolean wrapXAResource = Defau... |
python | def _filehandle(self):
"""
Return a filehandle to the file being tailed
"""
# if file is opened and it has been rolled we need to close the file
# and then to reopen it
if self._fh and self._has_file_rolled():
try:
self._fh.close()
... |
python | def configure_logging(level=logging.DEBUG):
'''Configures the root logger for command line applications.
A stream handler will be added to the logger that directs
messages to the standard error stream.
By default, *no* messages will be filtered out: set a higher
level on derived/child loggers to a... |
java | PdfStream getFormXObject(int pageNumber, int compressionLevel) throws IOException {
PdfDictionary page = reader.getPageNRelease(pageNumber);
PdfObject contents = PdfReader.getPdfObjectRelease(page.get(PdfName.CONTENTS));
PdfDictionary dic = new PdfDictionary();
byte bout[] = null;
... |
python | def _start(self):
"""Start process."""
if not self._fired:
self._partial_ouput = None
self._process.start(self._cmd_list[0], self._cmd_list[1:])
self._timer.start() |
python | def tab(self, n=1, interval=0, pre_dl=None, post_dl=None):
"""Tap ``tab`` key for ``n`` times, with ``interval`` seconds of interval.
**中文文档**
以 ``interval`` 中定义的频率按下某个tab键 ``n`` 次。
"""
self.delay(pre_dl)
self.k.tap_key(self.k.tab_key, n, interval)
self.delay(po... |
python | def iswc(name=None):
"""
ISWC field.
A ISWC code written on a field follows the Pattern TNNNNNNNNNC.
This being:
- T: header, it is always T.
- N: numeric value.
- C: control digit.
So, for example, an ISWC code field can contain T0345246801.
:param name: name for the field
:r... |
java | public static final Element getNextSiblingElement(Node node) {
List<Node> siblings = node.getParent().getChildren();
Node n = null;
int index = siblings.indexOf(node) + 1;
if(index>0 && index<siblings.size()) {
n = siblings.get(index);
while(!(n instanceof Element) &&... |
python | def compact(vertices, indices, tolerance=1e-3):
""" Compact vertices and indices within given tolerance """
# Transform vertices into a structured array for np.unique to work
n = len(vertices)
V = np.zeros(n, dtype=[("pos", np.float32, 3)])
V["pos"][:, 0] = vertices[:, 0]
V["pos"][:, 1] = verti... |
python | def shared_atts(self):
"""Gets atts shared among all nonzero length component Chunk"""
#TODO cache this, could get ugly for large FmtStrs
atts = {}
first = self.chunks[0]
for att in sorted(first.atts):
#TODO how to write this without the '???'?
if all(fs.a... |
java | public final Object anyValue() throws RecognitionException {
Object obj = null;
Token a=null;
Token b=null;
try {
// druidG.g:266:2: (a= SINGLE_QUOTE_STRING |b= ( LONG | FLOAT ) )
int alt128=2;
int LA128_0 = input.LA(1);
if ( (LA128_0==SINGLE_QUOTE_STRING) ) {
alt128=1;
}
else if ( (LA1... |
java | public void marshall(DescribeConnectionsRequest describeConnectionsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeConnectionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(d... |
python | def callback(self, position):
"""
Allows the execution of custom code between creation of the zip file and deployment to AWS.
:return: None
"""
callbacks = self.stage_config.get('callbacks', {})
callback = callbacks.get(position)
if callback:
(mod_p... |
java | @TimerJ
public TableMetadataBuilder withPartitionKey(String... fields) {
for (String field : fields) {
partitionKey.add(new ColumnName(tableName, field));
}
return this;
} |
java | public final void mRULE_ML_COMMENT() throws RecognitionException {
try {
int _type = RULE_ML_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalXtype.g:2805:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
// InternalXtype.g:2805:19: '/*' ( options {gree... |
java | @XmlElementDecl(namespace = "http://www.ibm.com/websphere/wim", name = "ou")
public JAXBElement<String> createOu(String value) {
return new JAXBElement<String>(_Ou_QNAME, String.class, null, value);
} |
python | def get_table_info(*table_names):
"""Returns a dict with table_name keys mapped to the Interface that table exists in
:param *table_names: the tables you are searching for
"""
ret = {}
if table_names:
for table_name in table_names:
for name, inter in get_interfaces().items():
... |
java | private ListItemBlock processFootnote(MacroMarkerBlock footnoteMacro, int counter,
MacroTransformationContext context) throws MacroExecutionException
{
String content = footnoteMacro.getContent();
if (StringUtils.isBlank(content)) {
content = " ";
}
// Construct t... |
java | public void initPropertyMap() {
propertyMap = new HashMap<String, EntityColumn>(getEntityClassColumns().size());
for (EntityColumn column : getEntityClassColumns()) {
propertyMap.put(column.getProperty(), column);
}
} |
python | def list(self):
""" No argument is required for this method as per the API server
specification.
"""
data_list = self.db.get_data(self.list_path)
data_list = data_list.get('Data') or {}
platforms = (data_list.get('Platforms') or {}).get('Platform') or []
return [s... |
python | def zrem(self, key, *members):
"""Removes the specified members from the sorted set stored at key.
Non existing members are ignored.
An error is returned when key exists and does not hold a sorted set.
.. note::
**Time complexity**: ``O(M*log(N))`` with ``N`` being the num... |
python | def convert_point(self, point):
'''
Converts the relative position of @point into an absolute position. To
be used for event considerations, blitting is handled directly by the
Container().
'''
return self.container.convert_point(Vector(point) + self.pos) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.