language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
python | def _get_files_recursively(rootdir):
"""Sometimes, we want to use this tool with non-git repositories.
This function allows us to do so.
"""
output = []
for root, dirs, files in os.walk(rootdir):
for filename in files:
output.append(os.path.join(root, filename))
return outpu... |
python | def set_object(self, object):
"""
Set object for rendering component and set object to all components
:param object:
:return:
"""
if self.object is False:
self.object = object
# Pass object along to child components for rendering
for componen... |
java | public Environment setUpEnvironment( AbstractBuild build, Launcher launcher, BuildListener listener ) throws IOException, InterruptedException, RunnerAbortedException {
return new Environment() {};
} |
python | def parse(cls, filepath, filecontent, parser):
"""Parses a source for addressable Serializable objects.
No matter the parser used, the parsed and mapped addressable objects are all 'thin'; ie: any
objects they point to in other namespaces or even in the same namespace but from a seperate
source are lef... |
java | private String getBinaryServletMapping() {
String binaryServletMapping = null;
// Retrieve binary servlet mapping from the binary resource handler
BinaryResourcesHandler binaryRsHandler = (BinaryResourcesHandler) config.getContext()
.getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE);
if (binaryRsHandler !... |
python | def make_folder_for_today(log_dir):
"""Creates the folder log_dir/yyyy/mm/dd in log_dir if it doesn't exist
and returns the full path of the folder."""
now = datetime.datetime.now()
sub_folders_list = ['{0:04d}'.format(now.year),
'{0:02d}'.format(now.month),
... |
java | private RandomVariable getV(double time, double maturity) {
if(time == maturity) {
return new Scalar(0.0);
}
int timeIndexStart = volatilityModel.getTimeDiscretization().getTimeIndex(time);
if(timeIndexStart < 0) {
timeIndexStart = -timeIndexStart-2; // Get timeIndex corresponding to previous point
}
... |
python | def start_naive_bayes(automated_run, session, path):
"""Starts naive bayes automated run
Args:
automated_run (xcessiv.models.AutomatedRun): Automated run object
session: Valid SQLAlchemy session
path (str, unicode): Path to project folder
"""
module = functions.import_string_c... |
java | public static double avg( List<SimpleFeature> features, String field ) {
double sum = 0;
int count = 0;
for( SimpleFeature feature : features ) {
Object attribute = feature.getAttribute(field);
if (attribute instanceof Number) {
sum = sum + ((Number) attri... |
python | def _get_taxon(taxon):
"""Return Interacting taxon ID | optional | 0 or 1 | gaf column 13."""
if not taxon:
return None
## assert taxon[:6] == 'taxon:', 'UNRECOGNIZED Taxon({Taxon})'.format(Taxon=taxon)
## taxid = taxon[6:]
## assert taxon[:10] == 'NCBITaxon:', 'UNREC... |
java | public Map<String, List<DataNode>> getDataNodeGroups() {
Map<String, List<DataNode>> result = new LinkedHashMap<>(actualDataNodes.size(), 1);
for (DataNode each : actualDataNodes) {
String dataSourceName = each.getDataSourceName();
if (!result.containsKey(dataSourceName)) {
... |
python | def from_dict(cls, coll, d):
"""Construct from dict
:param coll: Collection for the mark
:param d: Input
:type d: dict
:return: new instance
:rtype: Mark
"""
return Mark(collection=coll, operation=Operation[d[cls.FLD_OP]],
pos=d[cls.FL... |
python | def isInside(self, point, tol=0.0001):
"""
Return True if point is inside a polydata closed surface.
"""
poly = self.polydata(True)
points = vtk.vtkPoints()
points.InsertNextPoint(point)
pointsPolydata = vtk.vtkPolyData()
pointsPolydata.SetPoints(points)
... |
python | def _create_all_recommendations(cores, ip_views=False, config=None):
"""Calculate all recommendations in multiple processes."""
global _reco, _store
_reco = GraphRecommender(_store)
_reco.load_profile('Profiles')
if ip_views:
_reco.load_profile('Profiles_IP')
manager = Manager()
re... |
python | def filter_bad_results(search_results, guessit_query):
"""
filter out search results with bad season and episode number (if
applicable); sometimes OpenSubtitles will report search results subtitles
that belong to a different episode or season from a tv show; no reason
why, but it seems to work well ... |
python | def split_trailing_indent(line, max_indents=None):
"""Split line into leading indent and main."""
indent = ""
while (
(max_indents is None or max_indents > 0)
and line.endswith((openindent, closeindent))
) or line.rstrip() != line:
if max_indents is not None and (line.endswith(op... |
python | def _print_breakdown(cls, savedir, fname, data):
"""Function to print model fixtures into generated file"""
if not os.path.exists(savedir):
os.makedirs(savedir)
with open(os.path.join(savedir, fname), 'w') as fout:
fout.write(data) |
python | def params(self):
"""Parameters used in the url of the API call and for authentication.
:return: parameters used in the url.
:rtype: dict
"""
params = {}
params["access_token"] = self.access_token
params["account_id"] = self.account_id
params["alert_id"] ... |
python | def gettextdelimiter(self, retaintokenisation=False):
"""See :meth:`AbstractElement.gettextdelimiter`"""
for e in self:
if isinstance(e, New) or isinstance(e, Current):
return e.gettextdelimiter(retaintokenisation)
return "" |
python | def get_repository_configuration(id):
"""
Retrieve a specific RepositoryConfiguration
"""
response = utils.checked_api_call(pnc_api.repositories, 'get_specific', id=id)
if response:
return response.content |
java | public CompletableFuture<StackTraceSampleResponse> requestStackTraceSample(
int sampleId,
int numSamples,
Time delayBetweenSamples,
int maxStackTraceDepth,
Time timeout) {
final LogicalSlot slot = assignedResource;
if (slot != null) {
final TaskManagerGateway taskManagerGateway = slot.getTaskMan... |
java | public void multiKeyBackupAck(long id, Address from, int segment, int topologyId) {
SegmentBasedCollector collector = (SegmentBasedCollector) collectorMap.get(id);
if (collector != null) {
collector.backupAck(from, segment, topologyId);
}
} |
java | void createSymbolicLinkTo(final File destinationFolder) throws IOException {
for (final File f : this.theFiles) {
final File destinationFile = new File(destinationFolder, f.getName());
Files.createSymbolicLink(destinationFile.toPath(), f.toPath());
}
} |
java | public JsonObject merge(JsonObject object) {
if (object == null) {
throw new NullPointerException(OBJECT_IS_NULL);
}
for (Member member : object) {
this.set(member.name, member.value);
}
return this;
} |
java | public java.util.List<ContainerInstance> getContainerInstances() {
if (containerInstances == null) {
containerInstances = new com.amazonaws.internal.SdkInternalList<ContainerInstance>();
}
return containerInstances;
} |
java | @Override
public Object execute(ExecutionType executionType) throws CommandActionExecutionException {
HystrixInvokable command = HystrixCommandFactory.getInstance().createDelayed(createCopy(originalMetaHolder, executionType));
return new CommandExecutionAction(command, originalMetaHolder).execute(ex... |
python | def parent(self):
"""The logical parent of the path."""
drv = self._drv
root = self._root
parts = self._parts
if len(parts) == 1 and (drv or root):
return self
return self._from_parsed_parts(drv, root, parts[:-1]) |
python | def do_POST(self):
'''The POST command.
'''
try:
ct = self.headers['content-type']
if ct.startswith('multipart/'):
cid = resolvers.MIMEResolver(ct, self.rfile)
xml = cid.GetSOAPPart()
ps = ParsedSoap(xml, resolver=cid.Resolv... |
python | def parent(self):
"""
Select the direct child(ren) from the UI element(s) given by the query expression, see ``QueryCondition`` for
more details about the selectors.
Warnings:
Experimental method, may not be available for all drivers.
Returns:
:py:class:... |
python | def new_error(self, name, message) :
"creates a new DBUS.MESSAGE_TYPE_ERROR message that is a reply to this Message."
result = dbus.dbus_message_new_error(self._dbobj, name.encode(), (lambda : None, lambda : message.encode())[message != None]())
if result == None :
raise CallFailed("... |
java | private static void addProcessors(final Processor processor, final String... keys) throws IllegalStateException {
for (final String key : keys) {
addProcessor(key, processor);
}
} |
java | @Override
GroupReplyList write_attribute_reply_i(final int rid, final int tmo, final boolean fwd) throws DevFailed {
synchronized (this) {
final GroupReplyList reply = new GroupReplyList();
GroupReplyList sub_reply;
final Iterator it = elements.iterator();
while (it.hasNext()) {
final GroupEl... |
python | def du(self, src, extra_args=[]):
'''Perform ``du`` on a path'''
src = [self._full_hdfs_path(x) for x in src]
return self._transform_du_output(self._getStdOutCmd([self._hadoop_cmd, 'fs', '-du'] + extra_args + src, True), self.hdfs_url) |
java | public String exec(String apiPath, String method, String query, Object payload, boolean needAuth)
throws IOException {
if (payload == null)
payload = "";
String responseText = null;
boolean cached = false;
if (cacheManager != null) {
responseText = cacheManager.getCache(apiPath, method, query, payloa... |
java | public ApiResponse<ApiSuccessResponse> getSnapshotContentWithHttpInfo(String snapshotId, GetSnapshotContentData getSnapshotContentData) throws ApiException {
com.squareup.okhttp.Call call = getSnapshotContentValidateBeforeCall(snapshotId, getSnapshotContentData, null, null);
Type localVarReturnType = ne... |
java | static void createInstance(@NonNull Application application, @NonNull ApptentiveConfiguration configuration) {
final String apptentiveKey = configuration.getApptentiveKey();
final String apptentiveSignature = configuration.getApptentiveSignature();
final String baseURL = configuration.getBaseURL();
final boolea... |
java | private static boolean isEmptyOrAllRealm(String realm) {
if (realm == null || realm.trim().isEmpty() || realm.trim().equals("*")) {
return true;
} else {
return false;
}
} |
java | private void writeTitle() {
if (!this.isWriteTitle) {
return;
}
this.currentRowInSheet++;
Row row = this.currentSheet.createRow(this.currentRowInSheet);
if (this.defaultTitleHeight > 0) {
row.setHeightInPoints(this.defaultTitleHeight);
}
fo... |
java | public static <T> TypeToken<T> get(Class<T> type)
{
return new SimpleTypeToken<T>(type);
} |
java | @Override
public EClass getIfcDistributionFlowElement() {
if (ifcDistributionFlowElementEClass == null) {
ifcDistributionFlowElementEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(185);
}
return ifcDistributionFlowElementEClass;
} |
java | @Override
public CPDefinitionSpecificationOptionValue findByUuid_C_Last(String uuid,
long companyId,
OrderByComparator<CPDefinitionSpecificationOptionValue> orderByComparator)
throws NoSuchCPDefinitionSpecificationOptionValueException {
CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue ... |
python | def _set_clipper(self, node, clipper):
"""Assign a clipper that is inherited from a parent node.
If *clipper* is None, then remove any clippers for *node*.
"""
if node in self._clippers:
self.detach(self._clippers.pop(node))
if clipper is not None:
self.a... |
java | public ServiceFuture<IntegrationAccountInner> getByResourceGroupAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback<IntegrationAccountInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, integrationAccountName)... |
python | def check_recommended_global_attributes(self, dataset):
'''
Check the global recommended attributes for 2.0 templates. These go an extra step besides
just checking that they exist.
:param netCDF4.Dataset dataset: An open netCDF dataset
:id = "" ; //................................ |
java | public static Date dateReservedDay000(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return dateReservedDay000(calendar);
} |
python | def dst_to_src(self, dst_file):
"""Map destination path to source URI."""
for map in self.mappings:
src_uri = map.dst_to_src(dst_file)
if (src_uri is not None):
return(src_uri)
# Must have failed if loop exited
raise MapperError(
"Unabl... |
java | public SimpleDependencyPath copy() {
SimpleDependencyPath copy = new SimpleDependencyPath();
copy.path.addAll(path);
copy.nodes.addAll(nodes);
return copy;
} |
java | @SuppressWarnings("deprecation")
@Override
public String getRealPath(String arg0) {
try {
collaborator.preInvoke(componentMetaData);
return request.getRealPath(arg0);
} finally {
collaborator.postInvoke();
}
} |
python | def _compute_ymean(self, **kwargs):
"""Compute the (weighted) mean of the y data"""
y = np.asarray(kwargs.get('y', self.y))
dy = np.asarray(kwargs.get('dy', self.dy))
if dy.size == 1:
return np.mean(y)
else:
return np.average(y, weights=1 / dy ** 2) |
java | public void hideDelayed() {
// The reason for using this function, instead of calling hide directly, is that
// the latter leads to harmless but annoying Javascript errors when called from
// Javascript inside the IFrame, since the IFrame is closed before the function returns.
Scheduler... |
python | def mirtrace_contamination_check(self):
""" Generate the miRTrace Contamination Check"""
# A library of 24 colors. Should be enough for this plot
color_lib = ['rgb(166,206,227)', 'rgb(31,120,180)', 'rgb(178,223,138)', 'rgb(51,160,44)', 'rgb(251,154,153)', 'rgb(227,26,28)', 'rgb(253,191,111)', '... |
python | def replace_f(self, path, arg_name=None):
"""Replace files"""
root, file = os.path.split(path)
pattern = re.compile(r'(\<\<\<)([A-Za-z_]+)(\>\>\>)')
file_path = path
fh, abs_path = mkstemp()
with open(abs_path, 'w') as new_file:
with open(file_path) as old_fi... |
java | public SDVariable mergeAdd(String name, SDVariable... inputs) {
validateSameType("mergeAdd", true, inputs);
SDVariable ret = f().mergeAdd(inputs);
return updateVariableNameAndReference(ret, name);
} |
java | @Override
public IBackendWriter getWriter() throws TTException {
return new JCloudsWriter(mBlobStore, mFac, mByteHandler, mProperties
.getProperty(ConstructorProps.RESOURCE));
} |
java | @Override
public void abort(final String msg, Throwable t) {
if (t != null) {
LOG.fatal(msg, t);
} else {
LOG.fatal(msg);
}
this.aborted = true;
try {
close();
} catch(IOException e) {
throw new RuntimeException("Could not close the connection", e);
}
} |
java | protected String getHostBasedServiceCN(boolean last) {
if (hostBasedServiceCN == null) {
String dn = name.getName();
int cnStart;
if (last) {
// use the last instance of CN in the DN
cnStart = dn.lastIndexOf("CN=") + 3;
} else {
... |
java | public static sslcertkey[] get_filtered(nitro_service service, String filter) throws Exception{
sslcertkey obj = new sslcertkey();
options option = new options();
option.set_filter(filter);
sslcertkey[] response = (sslcertkey[]) obj.getfiltered(service, option);
return response;
} |
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.... |
java | public static String toShortString(Throwable e, int stackLevel) {
StackTraceElement[] traces = e.getStackTrace();
StringBuilder sb = new StringBuilder(1024);
sb.append(e.toString()).append("\t");
if (traces != null) {
for (int i = 0; i < traces.length; i++) {
... |
java | public static rewritepolicy_rewriteglobal_binding[] get(nitro_service service, String name) throws Exception{
rewritepolicy_rewriteglobal_binding obj = new rewritepolicy_rewriteglobal_binding();
obj.set_name(name);
rewritepolicy_rewriteglobal_binding response[] = (rewritepolicy_rewriteglobal_binding[]) obj.get_re... |
python | def _configure_project(config):
"""Setup a Google Cloud Platform Project.
Google Compute Platform organizes all the resources, such as storage
buckets, users, and instances under projects. This is different from
aws ec2 where everything is global.
"""
project_id = config["provider"].get("projec... |
java | private static <T extends Comparable<? super T>> void sort(T[] a, int n) {
int inc = 1;
do {
inc *= 3;
inc++;
} while (inc <= n);
do {
inc /= 3;
for (int i = inc; i < n; i++) {
T v = a[i];
int j = i;
... |
java | public boolean changeState(StateVertex nextState) {
if (nextState == null) {
LOGGER.info("nextState given is null");
return false;
}
LOGGER.debug("Trying to change to state: '{}' from: '{}'", nextState.getName(),
currentState.getName());
if (stateFlowGraph.canGoTo(currentState, nextState)) {
LOGG... |
java | public Actions sendKeys(CharSequence... keys) {
if (isBuildingActions()) {
action.addAction(new SendKeysAction(jsonKeyboard, jsonMouse, null, keys));
}
return sendKeysInTicks(keys);
} |
java | public static OptionalEntity<WebConfig> getEntity(final CreateForm form, final String username, final long currentTime) {
switch (form.crudMode) {
case CrudMode.CREATE:
return OptionalEntity.of(new WebConfig()).map(entity -> {
entity.setCreatedBy(username);
en... |
java | @Override
public <R> CouchbaseManifestComparator<R> withKey(String key) {
return new CouchbaseManifestComparator<>(
key, connection);
} |
java | public static ProtoSubject<?, Message> assertThat(@NullableDecl Message message) {
return assertAbout(protos()).that(message);
} |
java | public static WeldContainer current() {
List<String> ids = WeldContainer.getRunningContainerIds();
if (ids.size() == 1) {
return WeldContainer.instance(ids.get(0));
} else {
// if there is either no container or multiple containers we want to throw exception
/... |
java | public MessageConsumer createConsumer(IntegerID consumerId,Destination destination, String messageSelector, boolean noLocal) throws JMSException
{
externalAccessLock.readLock().lock();
try
{
checkNotClosed();
LocalMessageConsumer consumer = new LocalMessageConsumer(engine,this,destinat... |
java | private double[][] calculateTotalKinematic( double[][] ampikinesurface, double[][] ampisubsurface, double delta_sup,
double delta_sub, double vc, double tcorr, double area_sub, double area_super ) {
double[][] totalKinematic = null;
if (ampisubsurface == null) {
totalKinematic ... |
python | def read_file(fname):
"""
Read file, convert wildcards into regular expressions, skip empty lines
and comments.
"""
res = []
try:
with open(fname, 'r') as f:
for line in f:
line = line.rstrip('\n').rstrip('\r')
if line and (line[0] != '#'):
... |
python | def search(self, href=None,
query=None, query_fields=None, query_filter=None,
limit=None, embed_items=None, embed_tracks=None,
embed_metadata=None, embed_insights=None, language=None):
"""Search a media collection.
'href' the relative href to the bundle lis... |
python | def build_auth_uri(endpoint, client_id, redirect_uri=None, scope=None, state=None):
"""
Helper method builds the uri that a user must be redirected to for
authentication/authorization using the authorization_code grant type.
endpoint - The authorization endpoint
client_... |
python | def write(self, outfilename=None):
"""Write or overwrite this .MAK file"""
outfilename = outfilename or self.filename
if not outfilename:
raise ValueError('Unable to write MAK file without a filename')
with codecs.open(outfilename, 'wb', 'windows-1252') as outf:
o... |
python | def provider(container, cache, name=None):
"""A decorator to register a provider on a container.
For more information see :meth:`Container.add_provider`.
"""
def register(provider):
container.add_provider(provider, cache, name)
return provider
return register |
java | public String serializeDataActionList(List<DataAction> list) {
ObjectMapper om = getObjectMapper();
try {
return om.writeValueAsString(new ListWrappers.DataActionList(list));
} catch (Exception e) {
throw new RuntimeException(e);
}
} |
java | public CoinbasePrice getCoinbaseBuyPrice(BigDecimal quantity, String currency)
throws IOException {
return coinbase.getBuyPrice(quantity, currency);
} |
java | public Observable<FailoverGroupInner> beginFailoverAsync(String resourceGroupName, String serverName, String failoverGroupName) {
return beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, failoverGroupName).map(new Func1<ServiceResponse<FailoverGroupInner>, FailoverGroupInner>() {
... |
java | private static void setConf(String varname, String key, String varvalue, boolean register)
throws IllegalArgumentException {
HiveConf conf = SessionState.get().getConf();
String value = new VariableSubstitution().substitute(conf, varvalue);
if (conf.getBoolVar(HiveConf.ConfVars.HIVECONFVALIDATION)... |
java | public <T extends Header> T getHeader(short ... ids) {
if(ids == null || ids.length == 0)
return null;
return Headers.getHeader(this.headers, ids);
} |
java | public int doStartTag() throws JspException {
// Locate our parent UIComponentTag
UIComponentClassicTagBase tag =
UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
if (tag == null) { // PENDING - i18n
throw new JspException("Not nested in a UICo... |
python | def _do_create(di):
"""Function that interprets a dictionary and creates objects"""
track = di['track'].strip()
artists = di['artist']
if isinstance(artists, StringType):
artists = [artists]
# todo: handle case where different artists have a song with the same title
tracks = Track.objec... |
python | def intersection(line1, line2):
"""
Return the coordinates of a point of intersection given two lines.
Return None if the lines are parallel, but non-colli_near.
Return an arbitrary point of intersection if the lines are colli_near.
Parameters:
line1 and line2: lines given by 4 points (x0,y0,x1... |
java | protected void populateDatabaseTopics(final BuildData buildData,
final Map<String, BaseTopicWrapper<?>> topics) throws BuildProcessingException {
final List<TopicWrapper> allTopics = new ArrayList<TopicWrapper>();
final List<TopicWrapper> latestTopics = new ArrayList<TopicWrapper>();
... |
java | public static String getDeclaredCharset(String contentType)
{
if (contentType == null)
{
return null;
}
Matcher matcher = CHARSET_PATT.matcher(contentType);
if (matcher.find())
{
String encstr = matcher.group(1);
return encstr;
... |
python | def _observed_name(field, name):
"""Adjust field name to reflect `dump_to` and `load_from` attributes.
:param Field field: A marshmallow field.
:param str name: Field name
:rtype: str
"""
if MARSHMALLOW_VERSION_INFO[0] < 3:
# use getattr in case we're running... |
python | def leave_room(self, room_id, timeout=None):
"""Call leave room API.
https://devdocs.line.me/en/#leave
Leave a room.
:param str room_id: Room ID
:param timeout: (optional) How long to wait for the server
to send data before giving up, as a float,
or a (... |
java | public ApiKey generateApiKey() {
URI uri = new URIBase(getBaseUri()).path("_api").path("v2").path("api_keys").build();
InputStream response = couchDbClient.post(uri, null);
return getResponse(response, ApiKey.class, getGson());
} |
python | def _unpack_lookupswitch(bc, offset):
"""
function for unpacking the lookupswitch op arguments
"""
jump = (offset % 4)
if jump:
offset += (4 - jump)
(default, npairs), offset = _unpack(_struct_ii, bc, offset)
switches = list()
for _index in range(npairs):
pair, offset ... |
java | protected void assertValueNotNull(final String key, final String value) {
if (value == null) {
final String msg = "The argument 'value' should not be null: key=" + key;
throw new FwRequiredAssistNotFoundException(msg);
}
} |
java | @Deprecated
public static void setDateHeader(HttpMessage message, CharSequence name, Date value) {
if (value != null) {
message.headers().set(name, DateFormatter.format(value));
} else {
message.headers().set(name, null);
}
} |
java | @SuppressWarnings("unchecked")
public final <T> T get(final String key)
throws TimeoutException, InterruptedException, MemcachedException {
return (T) this.get(key, this.opTimeout);
} |
python | def debug_command(self, command):
"""Debug actions"""
self.switch_to_plugin()
self.main.ipyconsole.write_to_stdin(command)
focus_widget = self.main.ipyconsole.get_focus_widget()
if focus_widget:
focus_widget.setFocus() |
java | public static Map<String, Resource> getComponentResourceMap(
Set<String> components,
Map<String, ByteAmount> componentRamMap,
Map<String, Double> componentCpuMap,
Map<String, ByteAmount> componentDiskMap,
Resource defaultInstanceResource) {
Map<String, Resource> componentResourceMap = ... |
java | public String getString(byte[] in, String declaredEncoding)
{
fDeclaredEncoding = declaredEncoding;
try {
setText(in);
CharsetMatch match = detect();
if (match == null) {
return null;
}
... |
java | public static PortletApplicationContext getPortletApplicationContext(
PortletRequest request, PortletContext portletContext) throws IllegalStateException {
PortletApplicationContext portletApplicationContext = (PortletApplicationContext) request.getAttribute(
ContribDispatcherPortle... |
python | def isset(alias_name):
"""Return a boolean if the docker link is set or not and is a valid looking docker link value.
Args:
alias_name: The link alias name
"""
warnings.warn('Will be removed in v1.0', DeprecationWarning, stacklevel=2)
raw_value = read(alias_name, allow_none=True)
if raw... |
java | public ServiceFuture<UploadBatchServiceLogsResult> uploadBatchServiceLogsAsync(String poolId, String nodeId, UploadBatchServiceLogsConfiguration uploadBatchServiceLogsConfiguration, final ServiceCallback<UploadBatchServiceLogsResult> serviceCallback) {
return ServiceFuture.fromHeaderResponse(uploadBatchServiceL... |
java | @Override
public void accept(double value)
{
writeLock.lock();
try
{
eliminate();
endIncr();
PrimitiveIterator.OfInt rev = modReverseIterator();
int e = rev.nextInt();
assign(e, value);
while (rev.hasNext(... |
java | @SuppressWarnings("WeakerAccess")
public static Widget createWidgetFromModel(final GVRContext gvrContext,
final String modelFile, Class<? extends Widget> widgetClass)
throws InstantiationException, IOException {
GVRSceneObject rootNode = loadModel(gvrContext, modelFile);
retu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.