language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
python | def map_colors(arr, crange, cmap, hex=True):
"""
Maps an array of values to RGB hex strings, given
a color range and colormap.
"""
if isinstance(crange, np.ndarray):
xsorted = np.argsort(crange)
ypos = np.searchsorted(crange, arr)
arr = xsorted[ypos]
else:
if isin... |
java | public <C extends EvictionCandidate<A, E>> C evaluate(Iterable<C> evictionCandidates) {
C selectedEvictionCandidate = null;
long now = Clock.currentTimeMillis();
for (C currentEvictionCandidate : evictionCandidates) {
if (selectedEvictionCandidate == null) {
selectedE... |
java | @Override
public Object invoke() {
HttpRequestBase request = template.buildRequest(context);
HttpResponse response = template.executeRequest(context, request);
return response == null? null :template.handleResponse(context, response);
} |
java | private Long findServerId(MysqlConnection mysqlConnection) {
try {
ResultSetPacket packet = mysqlConnection.query("show variables like 'server_id'");
List<String> fields = packet.getFieldValues();
if (CollectionUtils.isEmpty(fields)) {
throw new CanalParseExce... |
python | def help_center_section_subscriptions(self, section_id, locale=None, **kwargs):
"https://developer.zendesk.com/rest_api/docs/help_center/subscriptions#list-section-subscriptions"
api_path = "/api/v2/help_center/sections/{section_id}/subscriptions.json"
api_path = api_path.format(section_id=secti... |
java | public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> empty() {
return create(Collections.emptyList());
} |
java | @Override
public double getPaymentOffset(double fixingTime) {
if(paymentOffsetCode == null) {
return paymentOffset;
}
if(paymentOffsets.containsKey(fixingTime)) {
return paymentOffsets.get(fixingTime);
}
else {
/**
* @TODO In case paymentDate is relevant for the index modeling, it should be ch... |
python | def _combine_series_frame(self, other, func, fill_value=None, axis=None,
level=None):
"""
Apply binary operator `func` to self, other using alignment and fill
conventions determined by the fill_value, axis, and level kwargs.
Parameters
----------
self : DataFrame
o... |
java | public Template getTemplateByString(String content, boolean cache) {
if (!cache) {
return buildTemplateBySource(new StringSource(content, cache));
}
String cacheKey = HashKit.md5(content);
Template template = templateCache.get(cacheKey);
if (template == null) {
template = buildTemplateBySourc... |
python | def char2range(d, is_bytes=False, invert=True):
"""Convert the characters in the dict to a range in string form."""
fmt = bytesformat if is_bytes else uniformat
maxrange = MAXASCII if is_bytes else MAXUNICODE
for k1 in sorted(d.keys()):
v1 = d[k1]
if not isinstance(v1, list):
... |
java | public static Point getSize (float scale, Mirage image)
{
int width = Math.max(0, Math.round(image.getWidth() * scale));
int height = Math.max(0, Math.round(image.getHeight() * scale));
return new Point(width, height);
} |
python | def as_graph(self) -> Graph: # pragma: no cover
"""Returns a :class:`graphviz.Graph` representation of this bipartite graph."""
if Graph is None:
raise ImportError('The graphviz package is required to draw the graph.')
graph = Graph()
nodes_left = {} # type: Dict[TLeft, str... |
java | public JSONResource json(URI anUri, AbstractContent requestContent) throws IOException {
return doPOSTOrPUT(anUri, requestContent, createJSONResource());
} |
python | def build_footprint(node: ast.AST, first_line_no: int) -> Set[int]:
"""
Generates a list of lines that the passed node covers, relative to the
marked lines list - i.e. start of function is line 0.
"""
return set(
range(
get_first_token(node).start[0] - first_line_no,
... |
java | public boolean renderURL(String urlstring, OutputStream out, Type type) throws IOException, SAXException
{
if (!urlstring.startsWith("http:") &&
!urlstring.startsWith("https:") &&
!urlstring.startsWith("ftp:") &&
!urlstring.startsWith("file:"))
urlstring =... |
python | def _shape_repr(shape):
"""Return a platform independent reprensentation of an array shape
Under Python 2, the `long` type introduces an 'L' suffix when using the
default %r format for tuples of integers (typically used to store the shape
of an array).
Under Windows 64 bit (and Python 2), the `long`... |
python | def do_execute(self):
"""
The actual execution of the actor.
:return: None if successful, otherwise error message
:rtype: str
"""
expr = str(self.resolve_option("expression"))
expr = expr.replace("{X}", str(self.input.payload))
self._output.append(Token(e... |
python | def p_suffix(self, length=None, elipsis=False):
"Return the rest of the input"
if length is not None:
result = self.input[self.pos:self.pos + length]
if elipsis and len(result) == length:
result += "..."
return result
return self.input[self.pos... |
java | public void registerAggregator(String name, Class<? extends Aggregator<?>> aggregator) {
this.aggregators.put(name, aggregator);
} |
python | def _check_valid_condition(self, get_params):
"""
Check if the condition has been met.
We need to make sure that we are of the correct type.
"""
try:
variable = get_params(self.variable)
except: # noqa e722
variable = None
value = self.val... |
java | @Override
public long generate(IAtomContainer container) {
long[] hashes = generator.generate(container);
long[] rotated = new long[hashes.length];
Arrays.sort(hashes);
// seed with Mersenne prime 2^31-1
long hash = 2147483647L;
for (int i = 0; i < hashes.length; ... |
python | def read_tcp_size(conn, size):
"""Read `size` number of bytes from `conn`, retrying as needed."""
chunks = []
bytes_read = 0
while bytes_read < size:
chunk = conn.recv(size - bytes_read)
if not chunk:
if bytes_read > 0:
logging.warning("Incomplete read: %s of %s.", bytes_read, size)
... |
java | public String[] getEnabledCipherSuites(SSLEngine sslEngine) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "getEnabledCipherSuites");
}
String ciphers[] = null;
// First check the properties object for the ciphers.
Object ciphersObj... |
java | public EJBHome getEJBHome() throws RemoteException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getEJBHome");
if (home == null)
{
try
{
Class homeClass = null;
try
{
... |
java | protected void handleRollback(LocalTransaction transaction)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "handleRollback", transaction);
// Roll back the transaction if we created it.
if (transaction != null)
{
try
{
transaction.rollback... |
python | def get_available_label_stores(self, usefield='tryall'):
"""
Get the label store values that may be used
for writing this annotation.
Available store values include:
- the undefined values in the standard wfdb labels
- the store values not used in the current
a... |
java | public static IPostProcessor wrap(final IPostProcessor postProcessor, final IProcessorDialect dialect) {
Validate.notNull(dialect, "Dialect cannot be null");
if (postProcessor == null) {
return null;
}
return new PostProcessorWrapper(postProcessor, dialect);
} |
python | def __check_right_side_conflict(x, y, dfs_data):
"""Checks to see if the frond xy will conflict with a frond on the right side of the embedding."""
r = dfs_data['FG']['r']
w, z = dfs_data['RF'][r]
return __check_conflict_fronds(x, y, w, z, dfs_data) |
python | def from_name(cls, fullname, soco, *args, **kwargs):
"""Instantiate a plugin by its full name."""
_LOG.info('Loading plugin %s', fullname)
parts = fullname.split('.')
modname = '.'.join(parts[:-1])
clsname = parts[-1]
mod = importlib.import_module(modname)
clas... |
python | def day_of_year(dt):
# type: (int) -> int
"""Day index of year from 1 to 365 or 366"""
sec = time.mktime(dt.timetuple())
t = time.localtime(sec)
return t.tm_yday |
java | public static void clearClassLoader(final ClassLoader classLoader) {
BeanPropertiesCache.clear(classLoader);
final Iterator<Map.Entry<CacheKey, String>> it = CLASS_CACHE.entrySet().iterator();
while (it.hasNext()) {
final CacheKey key = it.next().getKey();
if (key.loader ... |
python | def _post_create(atdepth, entry, result):
"""Finishes the entry logging if applicable.
"""
if not atdepth and entry is not None:
if result is not None:
#We need to get these results a UUID that will be saved so that any
#instance methods applied to this object has a parent to... |
java | protected static DateTime floor(DateTime date, HistogramIntervalType interval) {
DateTime rval = date.withMillisOfSecond(0);
switch (interval) {
case day:
rval = rval.withHourOfDay(0).withMinuteOfHour(0).withSecondOfMinute(0);
break;
case hour:
... |
java | public byte[] getCommentsTranscript(String accountId, String envelopeId) throws ApiException {
return getCommentsTranscript(accountId, envelopeId, null);
} |
python | def median1d(self, name, return_errors=False):
""" Return median 1d marginalized parameters
Parameters
----------
name: str
The name of the parameter requested
return_errors: Optional, {bool, False}
If true, return a second and third parameter that repres... |
java | @Override
public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> envmt) throws Exception {
@SuppressWarnings("unchecked")
Hashtable<String, Object> env = (Hashtable<String, Object>) envmt;
return (o instanceof Reference) ? resolve((Reference) o, env) : null;
} |
python | def _convert(reddit_session, data):
"""Return a Redditor object from the data."""
retval = Redditor(reddit_session, data['name'], fetch=False)
retval.id = data['id'].split('_')[1] # pylint: disable=C0103,W0201
return retval |
java | public void marshall(SageMakerMachineLearningModelResourceData sageMakerMachineLearningModelResourceData, ProtocolMarshaller protocolMarshaller) {
if (sageMakerMachineLearningModelResourceData == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
tr... |
java | public Result<T> put(T service)
{
check(service);
ServiceType serviceType = service.resolveServiceType();
T previous = null;
lock();
try
{
ServiceType existingServiceType = keysToServiceTypes.get(service.getKey());
if (existingServiceType != ... |
java | public PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys)
throws SQLException {
return internalPrepareStatement(sql,
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY,
autoGeneratedKeys);
} |
java | private static PharmacophoreQuery processPharmacophoreElement(Element e, HashMap<String, String> global)
throws CDKException {
PharmacophoreQuery ret = new PharmacophoreQuery();
ret.setProperty("description", e.getAttributeValue("description"));
ret.setTitle(e.getAttributeValue("name... |
python | def init_db():
"""Initialize a new database with the default tables for chill.
Creates the following tables:
Chill
Node
Node_Node
Route
Query
Template
"""
with current_app.app_context():
for filename in CHILL_CREATE_TABLE_FILES:
db.execute(text(fetch_query_str... |
python | def handle_url_build_error(self, error: Exception, endpoint: str, values: dict) -> str:
"""Handle a build error.
Ideally this will return a valid url given the error endpoint
and values.
"""
for handler in self.url_build_error_handlers:
result = handler(error, endpoi... |
java | public static double toDegrees(double x)
{
if (Double.isInfinite(x) || x == 0.0) { // Matches +/- 0.0; return correct sign
return x;
}
// These are 180/PI split into high and low order bits
final double facta = 57.2957763671875;
final double factb = 3.14589482087... |
python | def local_error(self, originalValue, calculatedValue):
"""Calculates the error between the two given values.
:param list originalValue: List containing the values of the original data.
:param list calculatedValue: List containing the values of the calculated TimeSeries that
co... |
java | @Override
public ReceiveMessageResult receiveMessage(ReceiveMessageRequest request) {
request = beforeClientExecution(request);
return executeReceiveMessage(request);
} |
python | def parseFilename(filename):
"""
Parse out filename from any specified extensions.
Returns rootname and string version of extension name.
"""
# Parse out any extension specified in filename
_indx = filename.find('[')
if _indx > 0:
# Read extension name provided
_fname = fil... |
python | def _check_servers(self):
"""Check the servers variable and convert in a valid tuple form"""
new_servers = []
def check_format(server):
if server.scheme not in ["thrift", "http", "https"]:
raise RuntimeError("Unable to recognize protocol: \"%s\"" % _type)
... |
java | public static Query not(Query query) {
Query q = new Query(false);
q.add("$not", query.toJson());
return q;
} |
python | def get_rate_limits(response):
"""Returns a list of rate limit information from a given response's headers."""
periods = response.headers['X-RateLimit-Period']
if not periods:
return []
rate_limits = []
periods = periods.split(',')
limits = response.headers['X-RateLimit-Limit'].split('... |
java | @XmlElementDecl(namespace = "urn:oasis:names:tc:xacml:2.0:context:schema:os", name = "Decision")
public JAXBElement<DecisionType> createDecision(DecisionType value) {
return new JAXBElement<DecisionType>(_Decision_QNAME, DecisionType.class, null, value);
} |
java | public void setBucketAcl(String bucketName, CannedAccessControlList cannedAcl,
RequestMetricCollector requestMetricCollector) throws SdkClientException,
AmazonServiceException {
SetBucketAclRequest request = new SetBucketAclRequest(bucketName, cannedAcl)
.withRequestMetricCol... |
python | def intersection(self, x):
"""
Newly set a time range that overlaps
the input and the current time range.
:param DateTimeRange x:
Value to compute intersection with the current time range.
:Sample Code:
.. code:: python
from datetimerang... |
java | @NonNull
@SuppressWarnings("WeakerAccess")
public SnackbarWrapper appendMessage(@StringRes int message) {
return appendMessage(context.getString(message));
} |
java | public PushProcessorPipeline build(List<PushProcessorSupplier> processor_suppliers) throws Exception {
ApiServer api = null;
PushMetricRegistryInstance registry = null;
final List<PushProcessor> processors = new ArrayList<>(processor_suppliers.size());
try {
final EndpointReg... |
java | @Nonnull
public static <T, R> LFunction<T, R> functionFrom(Consumer<LFunctionBuilder<T, R>> buildingFunction) {
LFunctionBuilder builder = new LFunctionBuilder();
buildingFunction.accept(builder);
return builder.build();
} |
java | private static Map<Locale, String> getAllPageDocs(IAnnotationBinding[] annotations) {
// all @PageDoc or @Page annotations including annotations contained in @PageDocs or @Page
List<IAnnotationBinding> allPageAnnotations = new ArrayList<>(2);
List<Class<?>> singlePageAnnotationClasses = new Arr... |
python | def create_session(self, options):
"""Create the session factory used by :meth:`create_scoped_session`.
The factory **must** return an object that SQLAlchemy recognizes as a session,
or registering session events may raise an exception.
Valid factories include a :class:`~sqlalchemy.orm... |
java | @Override
public Iterator<String> getChildren() {
// Return empty list if the wrapped file is null, if it isn't an existing
// directory, or if we don't have a root. We will not resolve resources (or traverse
// parent/child) if we aren't associated with a root
if (!root.isDirectory(... |
java | private static void createTermvectorFirstRound(
List<ComponentTermVector> termVectorList,
Map<Integer, Integer> positionsData, List<Integer> docSet, Terms t,
LeafReader r, LeafReaderContext lrc) throws IOException {
if (t != null) {
BytesRef term;
TermsEnum termsEnum;
PostingsEnu... |
java | public short getBlockReplication(BlockInfo block) {
if (storage.isSourceBlock(block)) {
return getReplication();
} else {
if (storage.getStorageType() == StorageType.RAID_STORAGE) {
return ((INodeRaidStorage)storage).getCodec().parityReplication;
} else {
throw new IllegalState... |
python | def _gen_flood_wrap(self, data, rmsimg, innerclip, outerclip=None, domask=False):
"""
Generator function.
Segment an image into islands and return one island at a time.
Needs to work for entire image, and also for components within an island.
Parameters
----------
... |
python | def active_devices(self, active_devices):
"""
Sets the active_devices of this ReportBillingData.
:param active_devices: The active_devices of this ReportBillingData.
:type: int
"""
if active_devices is None:
raise ValueError("Invalid value for `active_devices... |
java | private void processComponentJar(URL jarFileURL, WorkList workList, List<String> implicitClasspath) {
LOG.debug("Processing {}", jarFileURL);
if (!jarFileURL.toString().endsWith(".zip") && !jarFileURL.toString().endsWith(".jar")) {
return;
}
try {
URL manifestUR... |
python | def get_string_index_oid(self, s):
"""Turns a string into an oid format is length of name followed by
name chars in ascii"""
return (len(self.get_bytes(s)), ) + self.get_bytes(s) |
python | def _AddExtractionProcessStatusTableRow(self, process_status, table_view):
"""Adds an extraction process status table row.
Args:
process_status (ProcessStatus): processing status.
table_view (CLITabularTableView): table view.
"""
used_memory = self._FormatSizeInUnitsOf1024(process_status.us... |
java | private void buildApplicationData(Context context) throws JSONException {
app = new JSONObject();
app.put("package", context.getPackageName());
try {
PackageInfo info = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
app.put("versionCode", info.ve... |
java | public SqlQueryParameterWrap addParameters(String name, Object first, Object second,
Object... rest) {
super.addParameters(name, first, second, rest);
return this;
} |
python | def register(name, func=None):
"""
Function or decorator which registers a given function as a
recognized control command.
"""
def decorator(func):
# Perform the registration
ControlDaemon._register(name, func)
return func
# If func was given, call the decorator, otherw... |
java | public static base_response add(nitro_service client, appfwjsoncontenttype resource) throws Exception {
appfwjsoncontenttype addresource = new appfwjsoncontenttype();
addresource.jsoncontenttypevalue = resource.jsoncontenttypevalue;
addresource.isregex = resource.isregex;
return addresource.add_resource(client)... |
java | public String buttonHtml(CmsWorkplace wp) {
if (!m_handler.isVisible(wp)) {
return "";
}
String link = CmsToolManager.linkForToolPath(
wp.getJsp(),
getHandler().getPath(),
getHandler().getParameters(wp));
String onClic = "openPage('" + lin... |
java | public boolean evict(S evictableStore, EvictionPolicyEvaluator<A, E> evictionPolicyEvaluator,
EvictionChecker evictionChecker, EvictionListener<A, E> evictionListener) {
if (evictionChecker != null) {
if (evictionChecker.isEvictionRequired()) {
return evictIntern... |
java | public static long systemTimeIntervalBetween(
long earlierTime, long laterTime, TimeUnit systemTimeIntervalUnit) {
long intervalNanos = laterTime - earlierTime;
return systemTimeIntervalUnit.convert(intervalNanos, NANOSECONDS);
} |
java | public float ENgetnodevalue( int index, NodeParameters code ) throws EpanetException {
float[] nodeValue = new float[1];
int error = epanet.ENgetnodevalue(index, code.getCode(), nodeValue);
checkError(error);
return nodeValue[0];
} |
python | def read_validating_webhook_configuration(self, name, **kwargs):
"""
read the specified ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_validating_webhoo... |
python | def _no_slots_copy(dct):
"""Internal helper: copy class __dict__ and clean slots class variables.
(They will be re-created if necessary by normal class machinery.)
"""
dict_copy = dict(dct)
if '__slots__' in dict_copy:
for slot in dict_copy['__slots__']:
dict_copy.pop(slot, None)... |
python | def get_object(self):
"""
Get the object for previewing.
Raises a http404 error if the object is not found.
"""
obj = super(PreviewWrapper, self).get_object()
if not obj:
raise http.Http404
return obj |
java | @Nonnull
@ReturnsMutableCopy
public ICommonsList <CSSSupportsRule> getAllSupportsRules ()
{
return m_aRules.getAllMapped (r -> r instanceof CSSSupportsRule, r -> (CSSSupportsRule) r);
} |
java | public boolean waitForWebElement(By by, int timeout, boolean scroll){
if(config.commandLogging){
Log.d(config.commandLoggingTag, "waitForWebElement("+by+", "+timeout+", "+scroll+")");
}
return (waiter.waitForWebElement(by, 0, timeout, scroll) != null);
} |
python | def _eta_from_phi(self):
"""Update `eta` using current `phi`."""
self.eta = scipy.ndarray(N_NT - 1, dtype='float')
etaprod = 1.0
for w in range(N_NT - 1):
self.eta[w] = 1.0 - self.phi[w] / etaprod
etaprod *= self.eta[w]
_checkParam('eta', self.eta, self.PA... |
java | @Override
public WsByteBuffer[] getRawResponseBodyBuffers() throws IOException, IllegalHttpBodyException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "getRawResponseBodyBuffers(sync)");
}
setRawBody(true);
WsByteBuffer[] list = getResp... |
python | def create_value(cls, prop_name, val, model=None): # @NoSelf
"""This is used to create a value to be assigned to a
property. Depending on the type of the value, different values
are created and returned. For example, for a list, a
ListWrapper is created to wrap it, and returned for the
... |
java | @Override
public List<byte[]> lrange(final byte[] key, final long start, final long stop) {
checkIsInMultiOrPipeline();
client.lrange(key, start, stop);
return client.getBinaryMultiBulkReply();
} |
python | def imagearm(sdmfile, scan, segment, npix=512, res=50, **kwargs):
""" Function to do end-to-end 1d, arm-based imaging """
import sdmpy
sdm = sdmpy.SDM(sdmfile)
ants = {ant.stationId:ant.name for ant in sdm['Antenna']}
stations = {st.stationId: st.name for st in sdm['Station'] if 'X' not in str(st.n... |
python | def first_order_markov_process(t, variance, time_scale, rseed=None):
"""
Generates a correlated noise vector using a multivariate normal
random number generator with zero mean and covariance
Sigma_ij = s^2 exp(-|t_i - t_j|/l),
where s is the variance and l is the time scale.
The P... |
java | @Override
protected void subAppend(LoggingEvent event) {
super.subAppend(event);
// That should've gone into our writer. Notify the LogContext.
String logOutput = writer.toString();
writer.reset();
OperationLog log = operationManager.getOperationLogByThread();
if (log == null) {
LOG.deb... |
java | public Endpoint getOrCreateEndpoint(TestContext context) {
if (endpoint != null) {
return endpoint;
} else if (StringUtils.hasText(endpointUri)) {
endpoint = context.getEndpointFactory().create(endpointUri, context);
return endpoint;
} else {
throw... |
java | private TimeConverter.ConvertedTime getModificationDate(PipelineInstanceModel item) {
Date mostRecentModificationDate = item.getBuildCause().getMaterialRevisions().getDateOfLatestModification();
return timeConverter.getConvertedTime(mostRecentModificationDate);
} |
java | @Override
public void extraInsert(final FinderObject gob) {
objects.put(gob.getString(), (GedObject) gob);
addAttribute((GedObject) gob);
} |
python | def update_campaign_destroy(self, campaign_id, **kwargs): # noqa: E501
"""Delete a campaign # noqa: E501
Delete an update campaign. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asynchronous=True
>>> th... |
python | def off_datastream(self, datastream):
"""
To turn off datastream
:param datastream: string
"""
url = '/datastream/' + str(datastream) + '/off'
response = self.http.post(url,"")
return response |
java | private void _addActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__addActionPerformed
JFileChooser fc = new JFileChooser();
fc.setMultiSelectionEnabled(true);
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
fc.setFileFilter(new FileFilter() {
@Override
... |
java | public static final String toHex(final char separator, final byte... bin)
{
if (bin == null || bin.length == 0)
return "";
char[] buffer = new char[(bin.length * 3) - 1];
int end = bin.length - 1;
int base = 0; // Store the index of buffer we're inserting into
for (int i = 0; i < bin.length; i++)
{
... |
python | def nest2ring(nside, ipix):
"""Drop-in replacement for healpy `~healpy.pixelfunc.nest2ring`."""
ipix = np.atleast_1d(ipix).astype(np.int64, copy=False)
return nested_to_ring(ipix, nside) |
java | protected void drawFeatures( float scale , int offsetX , int offsetY ,
FastQueue<Point2D_F64> all,
FastQueue<Point2D_F64> inliers,
Homography2D_F64 currToGlobal, Graphics2D g2 ) {
Point2D_F64 distPt = new Point2D_F64();
for( int i = 0; i < all.size; i++ ) {
HomographyPointOps_F64.tr... |
python | def firstId(self) -> BaseReference:
""" First child's id of current TextualNode
"""
if self.childIds is not None:
if len(self.childIds) > 0:
return self.childIds[0]
return None
else:
raise NotImplementedError |
python | def confirm_user_avatar(self, user, cropping_properties):
"""Confirm the temporary avatar image previously uploaded with the specified cropping.
After a successful registry with :py:meth:`create_temp_user_avatar`, use this method to confirm the avatar for
use. The final avatar can be a subarea ... |
java | public OrderingOrderingType<OrderingType<T>> getOrCreateBefore()
{
Node node = childNode.getOrCreate("before");
OrderingOrderingType<OrderingType<T>> before = new OrderingOrderingTypeImpl<OrderingType<T>>(this, "before", childNode, node);
return before;
} |
java | public static filteraction[] get(nitro_service service) throws Exception{
filteraction obj = new filteraction();
filteraction[] response = (filteraction[])obj.get_resources(service);
return response;
} |
java | @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpsimPackage.BP_SIM_DATA_TYPE__GROUP:
((FeatureMap.Internal)getGroup()).set(newValue);
return;
case BpsimPackage.BP_SIM_DATA_TYPE__SCENARIO:
getScenario().clear();
getScenario(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.