language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
java | public static IGroupMember getGroupMember(String key, Class<?> type) throws GroupsException {
/*
* WARNING: The 'type' parameter is not the leafType; you're obligated
* to say whether you want a group or a non-group (i.e. some type of
* entity). In fact, the underlying implementati... |
java | public void start(Xid xid, int flags) throws XAException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "start", new Object[]{xid, flags});
// First have a check to see if this start is a resume.
if ((flags & XAResource.TMRESUME) != 0)
{
... |
python | def alert(text='', title='', button=OK_TEXT, root=None, timeout=None):
"""Displays a simple message box with text and a single OK button. Returns the text of the button clicked on."""
assert TKINTER_IMPORT_SUCCEEDED, 'Tkinter is required for pymsgbox'
return _buttonbox(msg=text, title=title, choices=[str(bu... |
java | public static RelDataType createSqlTypeWithNullability(
final RelDataTypeFactory typeFactory,
final SqlTypeName typeName,
final boolean nullable
)
{
final RelDataType dataType;
switch (typeName) {
case TIMESTAMP:
// Our timestamps are down to the millisecond (precision = 3).... |
python | def Decompress(self, compressed_data):
"""Decompresses the compressed data.
Args:
compressed_data (bytes): compressed data.
Returns:
tuple(bytes, bytes): uncompressed data and remaining compressed data.
Raises:
BackEndError: if the XZ compressed stream cannot be decompressed.
""... |
java | @Override
public final synchronized void setSeed(long seed) {
// Annoying runtime check for initialisation of internal data
// caused by java.util.Random invoking setSeed() during init.
// This is unavoidable because no fields in our instance will
// have been initialised at this point,... |
java | public static <I extends ImageGray<I>, D extends ImageGray<D>>
AnyImageDerivative<I,D> createAnyDerivatives( DerivativeType type , Class<I> inputType , Class<D> derivType ) {
boolean isInteger = !GeneralizedImageOps.isFloatingPoint(inputType);
KernelBase kernel = lookupKernelX(type,isInteger);
if( kernel insta... |
java | protected String getCurrentFolderPath(GenericWebAppContext context)
{
// To limit browsing set Servlet init param "digitalAssetsPath" with desired JCR path
String rootFolderStr =
(String)context.get("org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsPath");
if (rootFolderS... |
java | @Api
public final HandlerRegistration addMapModelChangedHandler(final MapModelChangedHandler handler) {
return handlerManager.addHandler(MapModelChangedHandler.TYPE, handler);
} |
java | public String submitExtra (String name, String text, String extra)
{
return fixedInput("submit", name, text, extra);
} |
python | def _add_boolean_cli_param(params, key, value):
'''
Adds key as a command line parameter to params.
'''
if value is True:
params.append('--{0}'.format(key)) |
java | public static Builder with(FileDetails template) {
return new Builder().formatName(template.getFormatName()).extension(template.getExtension()).mediaType(template.getMediaType()).properties(template.getProperties());
} |
java | @Override
public ServiceInstance lookupInstance(String serviceName)
throws ServiceException {
ServiceInstanceUtils.validateManagerIsStarted(isStarted);
ServiceInstanceUtils.validateServiceName(serviceName);
ServiceInstanceLoadBalancer lb = lbManager.getDefaultLoadBalancer();
... |
python | def get_value(self, exp, rep, tags, which='last'):
""" Like get_history(..) but returns only one single value rather
than the whole list.
tags can be a string or a list of strings. if tags is a string,
the history is returned as a single value, if tags is a list of
... |
java | public void setValueDefinitionMatchOperator(
ValueDefinitionMatchOperator valueDefinitionMatchOperator) {
if (valueDefinitionMatchOperator == null) {
this.valueDefinitionMatchOperator =
ValueDefinitionMatchOperator.ANY;
} else {
this.valueDefinitio... |
java | public void addLdapGroupLink(Object groupIdOrPath, String cn, AccessLevel groupAccess, String provider) throws GitLabApiException {
if (groupAccess == null) {
throw new RuntimeException("groupAccess cannot be null or empty");
}
addLdapGroupLink(groupIdOrPath, cn, groupAccess.toValu... |
python | def pull(self, cartname=None, env=None):
"""
`cartname` - Name of cart
Pull remote cart from the pre release (base) environment
"""
if not env:
env = self._defaults['start_in']
juicer.utils.Log.log_debug("Initializing pulling cart: %s ...", cartname)
... |
java | public ViewTransitionBuilder animator(@NonNull final Animator animator) {
addSetup(new ViewTransition.Setup() {
@Override
public void setupAnimation(@NonNull final TransitionControllerManager manager) {
Animator animator2 = animator.clone();
if (animator2 ... |
java | private Billing generateDefaultBilling() {
Billing billing = new Billing();
billing.setPaymentTiming("Postpaid");
billing.setBillingMethod("ByBandwidth");
return billing;
} |
java | public static Sql newInstance(String url) throws SQLException {
Connection connection = DriverManager.getConnection(url);
return new Sql(connection);
} |
python | def QA_fetch_future_min_adv(
code,
start, end=None,
frequence='1min',
if_drop_index=True,
collections=DATABASE.future_min):
'''
'获取股票分钟线'
:param code:
:param start:
:param end:
:param frequence:
:param if_drop_index:
:param collections:
:return... |
python | def parse(string, timezone='UTC', day_first=False, year_first=True, strict=False):
""""Returns a MayaDT instance for the machine-produced moment specified.
Powered by pendulum.
Accepts most known formats. Useful for working with data.
Keyword Arguments:
string -- string to be parsed
ti... |
java | @Override
public void read(TagValue tv) {
readClass(tv);
readVersion(tv);
readCreator(tv);
readEmbedded(tv);
try {
readDescription(tv);
} catch (NumberFormatException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
tv.clear();
tv.add(... |
python | def from_pydatetime(cls, pydatetime):
"""
Creates sql datetime2 object from Python datetime object
ignoring timezone
@param pydatetime: Python datetime object
@return: sql datetime2 object
"""
return cls(date=Date.from_pydate(pydatetime.date),
t... |
java | protected void loadCacheMapping() {
File f = new File(getCacheFilePath());
if (f.exists()) {
try(InputStream is = new FileInputStream(f); BufferedReader rd = new BufferedReader(new FileReader(f))) {
cacheProperties.load(is);
for (Enumeration<?> properyNames = cacheProperties.propertyNames(); properyNames... |
python | def is_header(self):
"""
Whether or not the cell is a header
Any header cell will have "=" instead of "-" on its border.
For example, this is a header cell::
+-----+
| foo |
+=====+
while this cell is not::
+-----+
... |
python | def create(self, extra_entropy=''):
'''
Creates a new private key, and returns it as a :class:`~eth_account.local.LocalAccount`.
:param extra_entropy: Add extra randomness to whatever randomness your OS can provide
:type extra_entropy: str or bytes or int
:returns: an object wit... |
java | public Stream<Note> getMergeRequestNotesStream(Object projectIdOrPath, Integer mergeRequestIid, SortOrder sortOrder, Note.OrderBy orderBy) throws GitLabApiException {
return (getMergeRequestNotes(projectIdOrPath, mergeRequestIid, sortOrder, orderBy, getDefaultPerPage()).stream());
} |
python | def get_property(self):
"""Establishes the dynamic behavior of Property values"""
scope = self
def fget(self):
"""Call dynamic function then validate output"""
value = scope.func(self)
if value is None or value is undefined:
return None
... |
java | public RegulationOfGeneExpression getRelation() {
if (GeneRegulationTemplate_Type.featOkTst && ((GeneRegulationTemplate_Type)jcasType).casFeat_relation == null)
jcasType.jcas.throwFeatMissing("relation", "de.julielab.jules.types.bootstrep.GeneRegulationTemplate");
return (RegulationOfGeneExpression)(jcasT... |
python | def _write_frames(self, handle):
'''Write our frame data to the given file handle.
Parameters
----------
handle : file
Write metadata and C3D motion frames to the given file handle. The
writer does not close the handle.
'''
assert handle.tell() ==... |
java | public void getPositions(KiteConnect kiteConnect) throws KiteException, IOException {
// Get positions returns position model which contains list of positions.
Map<String, List<Position>> position = kiteConnect.getPositions();
System.out.println(position.get("net").size());
System.out.pr... |
java | protected void searchNode(P target, KdTree.Node n) {
while( n != null) {
checkBestDistance(n, target);
if( n.isLeaf() )
break;
// select the most promising branch to investigate first
KdTree.Node nearer,further;
double splitValue = distance.valueAt( (P)n.point , n.split );
if( distance.value... |
java | public void exportAllResources(String exportFile, boolean isReducedExportMode) throws Exception {
List<String> exportPaths = new ArrayList<String>(1);
exportPaths.add("/");
CmsVfsImportExportHandler vfsExportHandler = new CmsVfsImportExportHandler();
CmsExportParameters params = new Cm... |
java | private void append2slowUUID() {
if(_id != null)
cancel_sparse();
if( _ds==null && _ms!=null ) { // This can happen for columns with all NAs and then a UUID
_xs=null;
_ms.switchToLongs();
_ds = MemoryManager.malloc8d(_sparseLen);
Arrays.fill(_ms._vals8,C16Chunk._LO_NA);
Array... |
java | private void stage6(ProtoNetwork pn) {
beginStage(PHASE3_STAGE6_HDR, "6", NUM_PHASES);
stageOutput("Saving augmented network");
final String rootpath = artifactPath.getAbsolutePath();
long t1 = currentTimeMillis();
try {
p3.write(rootpath, pn);
if (withD... |
java | @SuppressWarnings("unchecked")
public static <T, R> Aggregator<T, R> create(Class<T> type) {
if (type == Long.class) {
return (Aggregator<T, R>) new LongSummaryAggregator();
}
else if (type == LongValue.class) {
return (Aggregator<T, R>) new ValueSummaryAggregator.LongValueSummaryAggregator();
}
else i... |
java | private String addHeadWordsToTreebank(final List<String> inputTrees) {
final StringBuffer parsedDoc = new StringBuffer();
for (final String parseSent : inputTrees) {
final Parse parsedSentence = Parse.parseParse(parseSent);
this.headFinder.printHeads(parsedSentence);
parsedSentence.show(parsed... |
python | def accept(self):
"""Reimplement Qt method"""
configurations = []
for index in range(self.stack.count()):
filename = to_text_string(self.combo.itemText(index))
runconfigoptions = self.stack.widget(index)
if index == self.stack.currentIndex() and\
... |
java | public void configure(Properties props) throws HibernateException {
try{
this.config = new BoneCPConfig(props);
// old hibernate config
String url = props.getProperty(CONFIG_CONNECTION_URL);
String username = props.getProperty(CONFIG_CONNECTION_USERNAME);
String password = props.getProperty(CON... |
python | def gas_liquid_viscosity(x, mul, mug, rhol=None, rhog=None, Method=None,
AvailableMethods=False):
r'''This function handles the calculation of two-phase liquid-gas viscosity.
Six calculation methods are available; three of them require only `x`,
`mul`, and `mug`; the other three r... |
python | def list_dscp_marking_rules(self, policy_id,
retrieve_all=True, **_params):
"""Fetches a list of all DSCP marking rules for the given policy."""
return self.list('dscp_marking_rules',
self.qos_dscp_marking_rules_path % policy_id,
... |
java | public Activation getIronJacamarMetaData(File root) throws Exception
{
Activation result = null;
File metadataFile = new File(root, "/META-INF/ironjacamar.xml");
if (metadataFile.exists())
{
InputStream input = null;
String url = metadataFile.getAbsolutePath();
tr... |
python | def change_time(self):
"""dfdatetime.DateTimeValues: change time or None if not available."""
timestamp = self._fsapfs_file_entry.get_inode_change_time_as_integer()
return dfdatetime_apfs_time.APFSTime(timestamp=timestamp) |
java | private ProtocolDecoderOutput getDecoderOut(IoSession session,
NextFilter nextFilter) {
ProtocolDecoderOutput out = (ProtocolDecoderOutput) session.getAttribute(DECODER_OUT);
if (out == null) {
// Create a new instance, and stores it into the session
out = ne... |
python | def read_line(self, timeout=0.0, purge_buffer=False):
"""
Reads a line from the device.
:param timeout: read timeout
:type timeout: float
:param purge_buffer: Indicates whether to purge the buffer prior to
reading.
:type purge_buffer: bool
... |
java | public static void register(BeanDefinitionRegistry registry, String... packageNames) {
if (registry.containsBeanDefinition(BEAN)) {
BeanDefinition beanDefinition = registry.getBeanDefinition(BEAN);
ConstructorArgumentValues constructorArguments = beanDefinition
.getConstructorArgumentValues();
construct... |
python | def deleteMember(self, address, id, headers=None, query_params=None, content_type="application/json"):
"""
Delete member from network
It is method for DELETE /network/{id}/member/{address}
"""
uri = self.client.base_url + "/network/"+id+"/member/"+address
return self.clie... |
python | def parse_querystring(querystring):
"""
Return parsed querystring in dict
"""
if querystring is None or len(querystring) == 0:
return {}
qs_dict = parse.parse_qs(querystring, keep_blank_values=True)
for key in qs_dict:
if len(qs_dict[key]) != 1:
continue
qs_d... |
java | public static BlockingQueue<Runnable> buildQueue(int size, boolean isPriority) {
BlockingQueue<Runnable> queue;
if (size == 0) { // 默认无队列
queue = new SynchronousQueue<Runnable>();
} else { // 有限队列或无限队列
if (isPriority) {
queue = size < 0 ? new PriorityBlock... |
python | def _snpeff_args_from_config(data):
"""Retrieve snpEff arguments supplied through input configuration.
"""
config = data["config"]
args = ["-hgvs"]
# General supplied arguments
resources = config_utils.get_resources("snpeff", config)
if resources.get("options"):
args += [str(x) for x... |
python | def update(self, ng_template_id, name=NotUpdated, plugin_name=NotUpdated,
plugin_version=NotUpdated, flavor_id=NotUpdated,
description=NotUpdated, volumes_per_node=NotUpdated,
volumes_size=NotUpdated, node_processes=NotUpdated,
node_configs=NotUpdated, floatin... |
java | public IPv4Address replace(int startIndex, int endIndex, IPv4Address replacement, int replacementIndex) {
return checkIdentity(getSection().replace(startIndex, endIndex, replacement.getSection(), replacementIndex, replacementIndex + (endIndex - startIndex)));
} |
java | @Override
public IoBuffer putEnum(Enum<?> e) {
if (e.ordinal() > BYTE_MASK) {
throw new IllegalArgumentException(enumConversionErrorMessage(e, "byte"));
}
return put((byte) e.ordinal());
} |
java | public FileOutputStream getFileOutputStream(final File file, final boolean append) throws FileNotFoundException {
if (System.getSecurityManager() == null)
return new FileOutputStream(file.getAbsolutePath(), append);
try {
return AccessController.doPrivileged(new PrivilegedExcepti... |
python | def access_SUSY_dataset_format_file(filename):
"""
This function accesses a CSV file containing data of the form of the [SUSY
dataset](https://archive.ics.uci.edu/ml/datasets/SUSY), i.e. with the first
column being class labels and other columns being features.
"""
# Load the CSV file to a list.... |
python | def _symbols2assets(self, symbols):
'''
Utility for debug/testing
'''
assets = {a.symbol: a for a in self.get_equities()}
return [assets[symbol] for symbol in symbols if symbol in assets] |
python | def extractData(self):
""" return `self` with extracted data as `numpy array`
Extract the data of the columns and parameters of `self.kws` and put
them in a :np:func:`array` with all columns as columns or parameters as
columns. If columns and parameters are requested at the same then ea... |
java | @Reference(cardinality=ReferenceCardinality.MULTIPLE, policy=ReferencePolicy.DYNAMIC)
public void addFactory(ConfigurationsProvider factory) {
if (logger.isLoggable(Level.FINER)) {
logger.finer("Adding factory: " + factory);
}
providers.add(factory);
} |
python | def set_user_info(self, nick, user='*', real='*'):
"""Sets user info for this server, to be used before connection.
Args:
nick (str): Nickname to use.
user (str): Username to use.
real (str): Realname to use.
"""
if self.connected:
raise E... |
java | public static List<CommerceUserSegmentCriterion> toModels(
CommerceUserSegmentCriterionSoap[] soapModels) {
if (soapModels == null) {
return null;
}
List<CommerceUserSegmentCriterion> models = new ArrayList<CommerceUserSegmentCriterion>(soapModels.length);
for (CommerceUserSegmentCriterionSoap soapModel ... |
python | def set_progress_brackets(self, start, end):
"""Set brackets to set around a progress bar."""
self.sep_start = start
self.sep_end = end |
python | def x5t_calculation(cert):
"""
base64url-encoded SHA-1 thumbprint (a.k.a. digest) of the DER
encoding of an X.509 certificate.
:param cert: DER encoded X.509 certificate
:return: x5t value
"""
if isinstance(cert, str):
der_cert = base64.b64decode(cert.encode('ascii'))
else:
... |
java | public ReturnValue create() {
if (forcedStatus == null) {
retVal.withStatus(status);
} else {
retVal.withStatus(forcedStatus);
}
StringBuilder msg = new StringBuilder(pluginName).append(" : ").append(retVal.getStatus());
if (!StringUtils.isEmpty(retValMes... |
java | @Override
public void setFontForZoom(double zoom) {
int size = this.getFontSizeForZoom(zoom);
if (size != -1) {
this.currentFont = this.fontSizeToFontMap.get(size);
}
} |
python | def value(self):
"""Set a calculated value for this Expression.
Used when writing formulas using XlsxWriter to give cells
an initial value when the sheet is loaded without being calculated.
"""
try:
if isinstance(self.__value, Expression):
return self.... |
java | public void rollback(Xid xid) throws XAException
{
if (pad)
xid = convertXid(xid);
xaResource.rollback(xid);
} |
java | @Override
public boolean prepare() throws IOException {
if (!super.prepare()) {
return false;
}
mapOutputFile.removeAll(getTask().getTaskID());
return true;
} |
python | def parse(self, lines):
"""
Parses the `.gitignore` file represented by the *lines*.
"""
if isinstance(lines, str):
lines = lines.split('\n')
sub = _re.sub
for line in lines:
if line.endswith('\n'):
line = line[:-1]
line = line.lstrip()
if not line.startswith('#'... |
java | public LambdaDslJsonArray eachLike(int numberExamples, Consumer<LambdaDslJsonBody> nestedObject) {
final PactDslJsonBody arrayLike = pactArray.eachLike(numberExamples);
final LambdaDslJsonBody dslBody = new LambdaDslJsonBody(arrayLike);
nestedObject.accept(dslBody);
arrayLike.closeArray(... |
python | def depth(self) -> int:
""" Depth of the citation scheme
.. example:: If we have a Book, Poem, Line system, and the citation we are looking at is Poem, depth is 1
:rtype: int
:return: Depth of the citation scheme
"""
if len(self.children):
return 1 + max([c... |
java | @Override
public StopTaskResult stopTask(StopTaskRequest request) {
request = beforeClientExecution(request);
return executeStopTask(request);
} |
java | public void handReportToDefaultExceptionHandler(@Nullable Thread t, @NonNull Throwable e) {
if (defaultExceptionHandler != null) {
ACRA.log.i(LOG_TAG, "ACRA is disabled for " + context.getPackageName()
+ " - forwarding uncaught Exception on to default ExceptionHandler");
... |
python | def flatten(self, order='C'):
"""Return a copy of the array collapsed into one dimension.
Any index information is removed as part of the flattening,
and the result is returned as a `~astropy.units.Quantity` array.
Parameters
----------
order : {'C', 'F', 'A', 'K'}, opt... |
java | public static HandlerReference newRef(
ComponentType component, Method method,
int priority, HandlerScope filter) {
if (handlerTracking.isLoggable(Level.FINE)) {
return new VerboseHandlerReference(
component, method, priority, filter);
} else {
... |
python | def _ensure_snapshot(connection, volume):
""" Ensure that a given volume has an appropriate snapshot
:type connection: boto.ec2.connection.EC2Connection
:param connection: EC2 connection object
:type volume: boto.ec2.volume.Volume
:param volume: Volume to check
:returns: None
"""
if 'Au... |
python | def set_input(self, nr=2, qd=1, b=0):
""" Set inputs after initialization
Parameters
-------
nr: integer
length of generated time-series
number must be power of two
qd: float
discrete variance
b: float
noise type:
... |
python | def _encodeRelativeValidityPeriod(validityPeriod):
""" Encodes the specified relative validity period timedelta into an integer for use in an SMS PDU
(based on the table in section 9.2.3.12 of GSM 03.40)
:param validityPeriod: The validity period to encode
:type validityPeriod: datetime.timedelta
... |
java | public void setIntVec(IntBuffer data)
{
if (data == null)
{
throw new IllegalArgumentException("Input buffer for indices cannot be null");
}
if (getIndexSize() != 4)
{
throw new UnsupportedOperationException("Cannot update integer indices with short ar... |
python | def generate_binding_permissions(self, binding, permissions):
"""Generate Users pemissions on the database
Defining roles to the database for the users.
We can pass extra information into parameters of the binding if needed (see binding.parameters).
Args:
bi... |
java | protected void publishChangedFile(
CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
Set<CmsUUID> publishedResourceIds,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException {
CmsResource onlineResource = null;
... |
python | def parse(self, val):
"""
Parses a ``bool`` from the string, matching 'true' or 'false' ignoring case.
"""
s = str(val).lower()
if s == "true":
return True
elif s == "false":
return False
else:
raise ValueError("cannot interpret... |
java | public UploadMediaResponse uploadMedia(MediaType type, File file) {
UploadMediaResponse response;
String url = "http://file.api.weixin.qq.com/cgi-bin/media/upload?access_token=#&type=" + type.toString();
BaseResponse r = executePost(url, null, file);
response = JSONUtil.toBean(r.getErrms... |
python | def has_provider_support(provider, media_type):
""" Verifies if API provider has support for requested media type
"""
if provider.lower() not in API_ALL:
return False
provider_const = "API_" + media_type.upper()
return provider in globals().get(provider_const, {}) |
python | def nl_object_alloc(ops):
"""Allocate a new object of kind specified by the operations handle.
https://github.com/thom311/libnl/blob/libnl3_2_25/lib/object.c#L54
Positional arguments:
ops -- cache operations handle (nl_object_ops class instance).
Returns:
New nl_object class instance or None.... |
java | @SuppressWarnings("unchecked")
public EList<IfcShapeAspect> getOfShapeAspect() {
return (EList<IfcShapeAspect>) eGet(Ifc2x3tc1Package.Literals.IFC_SHAPE_MODEL__OF_SHAPE_ASPECT, true);
} |
python | def interpolate_delays(augmented_stop_times, dist_threshold,
delay_threshold=3600, delay_cols=None):
"""
Given an augment stop times DataFrame as output by the function
:func:`build_augmented_stop_times`, a distance threshold (float)
in the same units as the ``'shape_dist_traveled'`` column of
``a... |
python | def get_dimensions(filenames):
"""given a sequence of filenames, compute dimensions
return sequence of tuples (x, y, content-type, filename)"""
dims = []
for filename in filenames:
implemented = False
with open(filename, 'rb') as fp:
img_types = (PNGFile, GIFFile, JPEGFile)... |
java | public static long[] unbox(List<Long> list) {
long[] res = new long[list.size()];
for (int i = 0; i < res.length; i++) {
res[i] = list.get(i);
}
return res;
} |
java | @WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C forceIndex(String... indexes) {
return addJoinFlag(" force index (" + JOINER.join(indexes) + ")", JoinFlag.Position.END);
} |
python | def fake2db_redis_initiator(self, host, port, number_of_rows, name=None, custom=None):
'''Main handler for the operation
'''
client, pipe = self.database_caller_creator(host, port, name)
if custom:
self.custom_db_creator(number_of_rows, pipe, custom)
client.save... |
java | public Observable<ApplicationInsightsComponentBillingFeaturesInner> getAsync(String resourceGroupName, String resourceName) {
return getWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<ApplicationInsightsComponentBillingFeaturesInner>, ApplicationInsightsComponentBillingFe... |
python | def bake(self):
"""
Bake an ``ansible-playbook`` command so it's ready to execute and
returns ``None``.
:return: None
"""
# Pass a directory as inventory to let Ansible merge the multiple
# inventory sources located under
self.add_cli_arg('inventory',
... |
java | public static String firstSentence(String text)
{
if(text == null) {
return null;
}
int length = text.length();
boolean sentenceSeparator = false;
for(int i = 0; i < length; i++) {
switch(text.charAt(i)) {
case '.':
case '!':
case '?':
case ';':
... |
python | def teardown(cluster_config_file, yes, workers_only, cluster_name):
"""Tear down the Ray cluster."""
teardown_cluster(cluster_config_file, yes, workers_only, cluster_name) |
python | def psd(self, segment_duration, **kwds):
""" Calculate the power spectral density of this time series.
Use the `pycbc.psd.welch` method to estimate the psd of this time segment.
For more complete options, please see that function.
Parameters
----------
segment_duration:... |
java | private void configAppBar(){
setSupportActionBar(mAppbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.changelog_activity_title);
mAppbar.setNavigationOnClickListener(this);
} |
java | public void buildInterfaceSummary(XMLNode node, Content summaryContentTree) {
String interfaceTableSummary =
configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Interface_Summary"),
configuration.getText("doclet.interfaces"));
... |
java | private void fullScanLocalDataToClear(Indexes indexes) {
InternalIndex[] indexesSnapshot = indexes.getIndexes();
for (Record record : storage.values()) {
Data key = record.getKey();
Object value = Records.getValueOrCachedValue(record, serializationService);
indexes.re... |
java | public static void replaceContentInMultiSplitPane(final JComponent container,
final JComponent content, boolean scrollable)
{
container.removeAll();
if (scrollable)
{
container.add(new JScrollPane(content));
}
else
{
container.add(content);
}
JXMultiSplitPane pane = SwingXUtilities.getAncestor(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.