language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
java | public com.google.api.ads.admanager.axis.v201902.AdSenseSettingsAdType getAdType() {
return adType;
} |
python | def guest_live_migrate(self, userid, dest_zcc_userid, destination,
parms, lgr_action):
"""Move an eligible, running z/VM(R) virtual machine transparently
from one z/VM system to another within an SSI cluster.
:param userid: (str) the userid of the vm to be relocated o... |
python | def copy_and_run(config, src_dir):
'''
Local-only operation of the executor.
Intended for validation script developers,
and the test suite.
Please not that this function only works correctly
if the validator has one of the following names:
- validator.py
- validator.zip
Ret... |
java | @Override
public void addWordToIndex(int index, String label) {
if (index >= 0) {
T token = tokenFor(label);
if (token != null) {
idxMap.put(index, token);
token.setIndex(index);
}
}
} |
python | def trigger_audited(self, id, rev, **kwargs):
"""
Triggers a build of a specific Build Configuration in a specific revision
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked wh... |
java | private static final byte[] getSimpleBytes(String str) {
StringBuilder sb = new StringBuilder(str);
byte[] b = new byte[sb.length()];
for (int i = 0, len = sb.length(); i < len; i++) {
b[i] = (byte) sb.charAt(i);
}
return b;
} |
python | def pareto_set(self, *args, **kwargs):
"""
Returns
-------
S : np.array
Returns the pareto set for a problem. Points in the X space to be known to be optimal!
"""
if self._pareto_set is None:
self._pareto_set = self._calc_pareto_set(*args, **kwargs... |
python | def bbox_hflip(bbox, rows, cols):
"""Flip a bounding box horizontally around the y-axis."""
x_min, y_min, x_max, y_max = bbox
return [1 - x_max, y_min, 1 - x_min, y_max] |
python | def result(self, timeout=None):
"""Returns the result of the call that the future represents.
:param timeout: The number of seconds to wait for the result
if the future has not been completed. None, the default,
sets no limit.
:returns: The result of the call that the fu... |
java | public static nstrafficdomain_binding[] get(nitro_service service, Long td[]) throws Exception{
if (td !=null && td.length>0) {
nstrafficdomain_binding response[] = new nstrafficdomain_binding[td.length];
nstrafficdomain_binding obj[] = new nstrafficdomain_binding[td.length];
for (int i=0;i<td.length;i++) {
... |
java | protected Map<String, List<String>> getEffectiveAnnotationMap(
Map<String, List<String>> inheritedAnnotationMap,
Map<String, List<String>> immediateAnnotationMap) {
//resolve effective annotations
Map<String, List<String>> effectiveAnnotationMap =
new HashMap<Stri... |
python | def operations_happening_at_same_time_as(
self, scheduled_operation: ScheduledOperation
) -> List[ScheduledOperation]:
"""Finds operations happening at the same time as the given operation.
Args:
scheduled_operation: The operation specifying the time to query.
Returns:
... |
java | @Override
public RandomVariable[] getFactorLoading(double time, int component, RandomVariable[] realizationAtTimeIndex) {
int timeIndex = timeDiscretization.getTimeIndex(time);
if(timeIndex < 0) {
timeIndex = -timeIndex - 2;
}
return getFactorLoading(timeIndex, component, realizationAtTimeIndex);
} |
java | public void marshall(ListDevicesRequest listDevicesRequest, ProtocolMarshaller protocolMarshaller) {
if (listDevicesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(listDevicesRequest.getFle... |
java | static String[] getPathNames(String path) {
if (path == null || !path.startsWith(Path.SEPARATOR)) {
return null;
}
return StringUtils.split(path, Path.SEPARATOR_CHAR);
} |
java | private List<Integer> extractRgroups(String data){
Pattern pattern = Pattern.compile("R[1-9]\\d*");
Matcher matcher = pattern.matcher(data);
List<Integer> listValues = new ArrayList<Integer>();
while(matcher.find()){
listValues.add(Integer.parseInt(matcher.group().split("R")[1]));
}
re... |
java | public static double inverfc(double p) {
double x, err, t, pp;
if (p >= 2.0) {
return -100.;
}
if (p <= 0.0) {
return 100.;
}
pp = (p < 1.0) ? p : 2. - p;
t = Math.sqrt(-2. * Math.log(pp / 2.));
x = -0.70711 * ((2.30753 + t * 0.2706... |
java | protected Map<String, String> getStringDataMap(final JobDataMap jobDataMap){
Map<String, String> stringMap = new HashMap<>();
for (Map.Entry<String, Object> entry : jobDataMap.entrySet()) {
if(entry.getValue() != null){
stringMap.put(entry.getKey(), entry.getValue().toString(... |
java | public ReadOnlyDoubleProperty lengthSquaredProperty() {
if (this.lengthSquareProperty == null) {
this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED);
this.lengthSquareProperty.bind(Bindings.createDoubleBinding(() ->
Vector2dfx.this.x.doubleValue() * Vector2dfx.th... |
python | def addr_info(addr):
"""
Interprets an address in standard tuple format to determine if it
is valid, and, if so, which socket family it is. Returns the
socket family.
"""
# If it's a string, it's in the UNIX family
if isinstance(addr, basestring):
return socket.AF_UNIX
# Verif... |
python | def express_route_cross_connections(self):
"""Instance depends on the API version:
* 2018-02-01: :class:`ExpressRouteCrossConnectionsOperations<azure.mgmt.network.v2018_02_01.operations.ExpressRouteCrossConnectionsOperations>`
* 2018-04-01: :class:`ExpressRouteCrossConnectionsOperations<a... |
python | def _read_http_push_promise(self, size, kind, flag):
"""Read HTTP/2 PUSH_PROMISE frames.
Structure of HTTP/2 PUSH_PROMISE frame [RFC 7540]:
+-----------------------------------------------+
| Length (24) |
+---------------+----------... |
python | def invert_delete_row2(self, key, value):
"""
Invert of type two where there are two columns given
"""
self.rows = filter(lambda x: x.get(key) == x.get(value), self.rows) |
java | public String getMessage(final String messageKey, final Object... objects) {
//TODO validate input
return getFormattedMessage(getMessagePattern(messageKey), objects);
} |
java | protected IAtomContainer buildMolecule(int mainChain, List<AttachedGroup> attachedSubstituents,
List<AttachedGroup> attachedGroups, boolean isMainCyclic, String name) throws ParseException, CDKException {
//Set up the molecle's name
currentMolecule.setID(name);
//Build the main chain... |
python | def circ_r(alpha, w=None, d=None, axis=0):
"""Mean resultant vector length for circular data.
Parameters
----------
alpha : array
Sample of angles in radians
w : array
Number of incidences in case of binned angle data
d : float
Spacing (in radians) of bin centers for bin... |
python | def refine_pi_cation_laro(self, all_picat, stacks):
"""Just important for constellations with histidine involved. If the histidine ring is positioned in stacking
position to an aromatic ring in the ligand, there is in most cases stacking and pi-cation interaction reported
as histidine also carri... |
java | public String getTableNames(boolean bAddQuotes)
{
return (m_tableName == null) ? Record.formatTableNames(PACKAGES_FILE, bAddQuotes) : super.getTableNames(bAddQuotes);
} |
python | def revision(revision, path, branch_label, splice, head, sql, autogenerate, message):
""" Create new revision file """
alembic_command.revision(
config=get_config(),
rev_id=revision,
version_path=path,
branch_label=branch_label,
splice=splice,
head=head,
s... |
python | def get_adif_id(self, callsign, timestamp=timestamp_now):
""" Returns ADIF id of a callsign's country
Args:
callsign (str): Amateur Radio callsign
timestamp (datetime, optional): datetime in UTC (tzinfo=pytz.UTC)
Returns:
int: containing the country ADIF id
... |
java | public MessagePacker writePayload(byte[] src, int off, int len)
throws IOException
{
if (buffer == null || buffer.size() - position < len || len > bufferFlushThreshold) {
flush(); // call flush before write
// Directly write payload to the output without using the buffer... |
python | def _candidate_filenames():
"""Generates filenames of the form 'specktre_123AB.png'.
The random noise is five characters long, which allows for
62^5 = 916 million possible filenames.
"""
while True:
random_stub = ''.join([
random.choice(string.ascii_letters + string.digits)
... |
java | @Trivial
public static void logToJobLogAndTrace(Level level, String msg, Object[] params, Logger traceLogger){
String formattedMsg = getFormattedMessage(msg, params, "Job event.");
logRawMsgToJobLogAndTrace(level, formattedMsg, traceLogger);
} |
python | def request(self, url):
"""
Send a http request to the given *url*, try to decode
the reply assuming it's JSON in UTF-8, and return the result
:returns: Decoded result, or None in case of an error
:rtype: mixed
"""
self.logger.debug('url:\n' + url)
try:
... |
python | def pretty(timings, label):
'''Print timing stats'''
results = [(sum(values), len(values), key)
for key, values in timings.items()]
print(label)
print('=' * 65)
print('%20s => %13s | %8s | %13s' % (
'Command', 'Average', '# Calls', 'Total time'))
p... |
java | @Override
public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException {
return model.getNumeraire(evaluationTime);
} |
python | def email_match(string):
"""邮箱地址匹配. 匹配成功返回(email_name, email_server), 否则返回None"""
m = re.match(email_pattern, string)
if m:
# print('Match success: %s' % m.string)
return m.groups()[0], m.groups()[2]
else:
# print('Match failed: %s' % string)
return None |
python | def cell_nodes_y(self):
"""The unstructured y-boundaries with shape (N, m) where m > 2"""
decoder = self.decoder
ycoord = self.ycoord
data = self.data
ybounds = decoder.get_cell_node_coord(
data, coords=data.coords, axis='y')
if self.plotter.convert_radian:
... |
java | @SuppressWarnings("unchecked")
public static <T> T deserialize(final byte[] data) {
if (data == null) {
return null;
}
try (final ByteArrayInputStream bais = new ByteArrayInputStream(data)) {
final ObjectInputStream in = new ObjectInputStream(bais);
... |
java | public static String concat(final Object... osToString) {
final StringBuilder b = new StringBuilder();
if (osToString != null) {
for (final Object o : osToString) {
b.append(o != null ? o.toString() : "null");
}
}
return b.toString();
} |
python | def clean_srt(srt):
"""Remove damaging line breaks and numbers from srt files and return a
dictionary.
"""
with open(srt, 'r') as f:
text = f.read()
text = re.sub(r'^\d+[\n\r]', '', text, flags=re.MULTILINE)
lines = text.splitlines()
output = OrderedDict()
key = ''
for line ... |
python | def terminal_cfg_line_sessionid(self, **kwargs):
"""Auto Generated Code
"""
config = ET.Element("config")
terminal_cfg = ET.SubElement(config, "terminal-cfg", xmlns="urn:brocade.com:mgmt:brocade-terminal")
line = ET.SubElement(terminal_cfg, "line")
sessionid = ET.SubEleme... |
python | def convert_namespaces_ast(
ast,
api_url: str = None,
namespace_targets: Mapping[str, List[str]] = None,
canonicalize: bool = False,
decanonicalize: bool = False,
):
"""Recursively convert namespaces of BEL Entities in BEL AST using API endpoint
Canonicalization and decanonicalization is de... |
python | def get_breaks_lno(self, filename):
"""List all line numbers that have a breakpoint"""
return list(
filter(
lambda x: x is not None, [
getattr(breakpoint, 'line', None)
for breakpoint in self.breakpoints
if breakpoin... |
java | private int readCRS(JsonParser jp) throws IOException, SQLException {
int srid = 0;
jp.nextToken(); //START_OBJECT {
jp.nextToken();// crs type
jp.nextToken(); // crs name
String firstField = jp.getText();
if(firstField.equalsIgnoreCase(GeoJsonField.NAME)){
jp... |
java | public static Fixture parseFrom(String fileName, Parser parser) {
if (fileName == null) {
throw new NullPointerException("File name should not be null");
}
String path = "fixtures/" + fileName + ".yaml";
InputStream inputStream = openPathAsStream(path);
Fixture result = parser.parse(inputStrea... |
java | public static Path decodePathFromReference(CheckpointStorageLocationReference reference) {
if (reference.isDefaultReference()) {
throw new IllegalArgumentException("Cannot decode default reference");
}
final byte[] bytes = reference.getReferenceBytes();
final int headerLen = REFERENCE_MAGIC_NUMBER.length;
... |
python | def activate_api_deployment(restApiId, stageName, deploymentId,
region=None, key=None, keyid=None, profile=None):
'''
Activates previously deployed deployment for a given stage
CLI Example:
.. code-block:: bash
salt myminion boto_apigateway.activate_api_deployent r... |
java | @Deprecated
@DeprecatedSince("3.8.0")
@ReplaceWith("build().awaitReady()")
public JDA buildBlocking() throws LoginException, InterruptedException
{
return buildBlocking(Status.CONNECTED);
} |
java | public ResourceKey child(String childId) {
return new ResourceKey(bundle, id == null ? childId : join(id, childId));
} |
python | def tlsa_data(pub, usage, selector, matching):
'''
Generate a TLSA rec
:param pub: Pub key in PEM format
:param usage:
:param selector:
:param matching:
:return: TLSA data portion
'''
usage = RFC.validate(usage, RFC.TLSA_USAGE)
selector = RFC.validate(selector, RFC.TLSA_SELECT)
... |
python | def _target_load(self, load):
'''
Verify that the publication is valid and applies to this minion
'''
mp_call = _metaproxy_call(self.opts, 'target_load')
return mp_call(self, load) |
python | def _plot2d(plotfunc):
"""
Decorator for common 2d plotting logic
Also adds the 2d plot method to class _PlotMethods
"""
commondoc = """
Parameters
----------
darray : DataArray
Must be 2 dimensional, unless creating faceted plots
x : string, optional
Coordinate for ... |
java | public AbstractTracer getTracer(Thread thread) {
this.poolReadLock.lock();
try {
AbstractTracer tracer;
if (!this.tracerMap.containsKey(thread.getId())) {
if (this.threadNames.contains(thread.getName())) { // non-unique thread name, first come first serve
System.err.p... |
java | public static Style createStyleForColortable( String colorTableName, double min, double max, double[] values, double opacity )
throws Exception {
List<Color> colorList = new ArrayList<Color>();
String tableString = new DefaultTables().getTableString(colorTableName);
if (tableString ... |
java | public ProjectStage getProjectStage()
{
Application application = getMyfacesApplicationInstance();
if (application != null)
{
return application.getProjectStage();
}
throw new UnsupportedOperationException();
} |
java | public AppServicePlanInner update(String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan) {
return updateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).toBlocking().single().body();
} |
java | public static int age(Date birthDay, Date dateToCompare) {
Calendar cal = Calendar.getInstance();
cal.setTime(dateToCompare);
if (cal.before(birthDay)) {
throw new IllegalArgumentException(StrUtil.format("Birthday is after date {}!", formatDate(dateToCompare)));
}
int year = cal.get(Calendar.YEAR... |
java | @Override
public GetRepositoryPolicyResult getRepositoryPolicy(GetRepositoryPolicyRequest request) {
request = beforeClientExecution(request);
return executeGetRepositoryPolicy(request);
} |
java | public final void writeStream(InputStream stream, OnStreamWriteListener listener) throws IOException {
if (listener == null)
throw new IllegalArgumentException("listener MUST not be null!");
byte[] buffer = new byte[UploadService.BUFFER_SIZE];
int bytesRead;
try {
... |
python | def _get_nets_lacnic(self, *args, **kwargs):
"""
Deprecated. This will be removed in a future release.
"""
from warnings import warn
warn('Whois._get_nets_lacnic() has been deprecated and will be '
'removed. You should now use Whois.get_nets_lacnic().')
retu... |
java | public <T> T query(Connection conn, String sql, Object[] params,
ResultSetHandler<T> rsh) throws SQLException {
PreparedStatement stmt = null;
ResultSet rs = null;
T result = null;
try {
stmt = this.prepareStatement(conn, sql);
this.fillStatement(stm... |
python | def start(self):
"""
Start daemonization process.
"""
# If pidfile already exists, we should read pid from there; to overwrite it, if locking
# will fail, because locking attempt somehow purges the file contents.
if os.path.isfile(self.pid):
with open(self.pid... |
java | public static List<Class<?>> buildArgumentClassList( Object... arguments ) {
if (arguments == null || arguments.length == 0) return Collections.emptyList();
List<Class<?>> result = new ArrayList<Class<?>>(arguments.length);
for (Object argument : arguments) {
if (argument != null) {
... |
java | protected List<AttachedNarArtifact> getAttachedNarArtifacts(List<? extends Executable> libraries)
throws MojoFailureException, MojoExecutionException {
getLog().info("Getting Nar dependencies");
final List<NarArtifact> narArtifacts = getNarArtifacts();
final List<AttachedNarArtifact> attachedNarArtifa... |
python | def get_preconfigured_ssl_connection(
self,
override_ssl_version: Optional[OpenSslVersionEnum] = None,
ssl_verify_locations: Optional[str] = None,
should_use_legacy_openssl: Optional[bool] = None,
) -> SslConnection:
"""Get an SSLConnection instance with the r... |
java | public Observable<ServiceResponse<LogsInner>> listLogsWithServiceResponseAsync(String resourceGroupName, String containerGroupName, String containerName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be... |
java | public void addSignInInterceptor(ProviderSignInInterceptor<?> interceptor) {
Class<?> serviceApiType = GenericTypeResolver.resolveTypeArgument(interceptor.getClass(), ProviderSignInInterceptor.class);
signInInterceptors.add(serviceApiType, interceptor);
} |
java | public static <T> List<T> asList(Iterable<T> self) {
if (self instanceof List) {
return (List<T>) self;
} else {
return toList(self);
}
} |
python | def list_jobs(tail):
"""Show info about the existing crawler jobs."""
query = (
db.session.query(models.CrawlerJob)
.order_by(models.CrawlerJob.id.desc())
)
if tail != 0:
query = query.limit(tail)
results = query.yield_per(10).all()
_show_table(results=results) |
java | @Override
protected Client<?> instantiateClient(String persistenceUnit)
{
return new DSClient(this, persistenceUnit, externalProperties, kunderaMetadata, reader, timestampGenerator);
} |
python | def tryCKeywords(self, block, isBrace):
"""
Check for if, else, while, do, switch, private, public, protected, signals,
default, case etc... keywords, as we want to indent then. If is
non-null/True, then indentation is not increased.
Note: The code is written to be called *afte... |
python | def go_to_error(self, text):
"""Go to error if relevant"""
match = get_error_match(to_text_string(text))
if match:
fname, lnb = match.groups()
if ("<ipython-input-" in fname and
self.run_cell_filename is not None):
fname = self.r... |
python | def post(self, request):
"""
Create a client, store it in the user's session and redirect the user
to the API provider to authorize our app and permissions.
"""
request.session['next'] = self.get_next(request)
client = self.get_client()()
request.session[self.get_... |
java | public Specification createSpecification(Specification specification) throws GreenPepperServerException {
try {
sessionService.startSession();
sessionService.beginTransaction();
Repository repository = loadRepository(specification.getRepository().getUid());
Spe... |
python | def zeros_like(other, dtype: Union[str, np.dtype, None] = None):
"""Shorthand for full_like(other, 0, dtype)
"""
return full_like(other, 0, dtype) |
python | def defconfig_filename(self):
"""
See the class documentation.
"""
if self.defconfig_list:
for filename, cond in self.defconfig_list.defaults:
if expr_value(cond):
try:
with self._open_config(filename.str_value) as f... |
python | def get_points(self, measurement=None, tags=None):
"""Return a generator for all the points that match the given filters.
:param measurement: The measurement name
:type measurement: str
:param tags: Tags to look for
:type tags: dict
:return: Points generator
""... |
java | private void initGraphics() {
// Set initial size
if (Double.compare(gauge.getPrefWidth(), 0.0) <= 0 || Double.compare(gauge.getPrefHeight(), 0.0) <= 0 ||
Double.compare(gauge.getWidth(), 0.0) <= 0 || Double.compare(gauge.getHeight(), 0.0) <= 0) {
if (gauge.getPrefWidth() > 0 && ... |
python | def makeSong(self):
"""Render abstract animation
"""
self.makeVisualSong()
self.makeAudibleSong()
if self.make_video:
self.makeAnimation() |
python | def autohook(ui, repo, hooktype, **kwargs):
"""Look for hooks inside the repository to run."""
cmd = hooktype.replace("-", "_")
if not repo or not cmd.replace("_", "").isalpha():
return False
result = False
trusted = ui.configlist("autohooks", "trusted")
if "" not in trusted:
def... |
java | public void marshall(DescribeBackupVaultRequest describeBackupVaultRequest, ProtocolMarshaller protocolMarshaller) {
if (describeBackupVaultRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(d... |
python | def backward(self, speed=1):
"""
Drive the robot backward by running both motors backward.
:param float speed:
Speed at which to drive the motors, as a value between 0 (stopped)
and 1 (full speed). The default is 1.
"""
self.left_motor.backward(speed)
... |
java | public Set<ResourceWorkerSlot> getKeepAssign(DefaultTopologyAssignContext defaultContext, Set<Integer> needAssigns) {
Set<Integer> keepAssignIds = new HashSet<>();
keepAssignIds.addAll(defaultContext.getAllTaskIds());
keepAssignIds.removeAll(defaultContext.getUnstoppedTaskIds());
keepAss... |
java | private synchronized void startTimer() {
if (timer == null) {
timer = new Timer("Timer thread for monitoring " + getContextName(),
true);
TimerTask task = new TimerTask() {
public void run() {
try {
timerEvent();
}
... |
python | def name_window_pixmap(self, onerror = None):
"""Create a new pixmap that refers to the off-screen storage of
the window, including its border.
This pixmap will remain allocated until freed whatever happens
with the window. However, the window will get a new off-screen
pixmap every time it is mapp... |
python | def clearParameters(self):
"""Removes all parameters from model"""
self.beginRemoveRows(QtCore.QModelIndex(), 0, self.rowCount())
self.model.clear_parameters()
self.endRemoveRows() |
python | def add_rotating_file_handler(logger=None, file_path="out.log",
level=logging.INFO,
log_format=log_formats.easy_read,
max_bytes=10*sizes.mb, backup_count=5,
**handler_kwargs):
""" Adds a rotating ... |
python | def get_recursive_subclasses(cls):
"""Return list of all subclasses for a class, including subclasses of direct subclasses"""
return cls.__subclasses__() + [g for s in cls.__subclasses__() for g in get_recursive_subclasses(s)] |
python | def wait_until_present(self, locator, timeout=None, failure_message='Timeout waiting for element to be present'):
"""
Waits for an element to be present
@type locator: webdriverwrapper.support.locator.Locator
@param locator: the locator or css string to search for the element
@... |
python | def add_field(self, fieldname, fieldspec=whoosh_module_fields.TEXT):
"""Add a field in the index of the model.
Args:
fieldname (Text): This parameters register a new field in specified model.
fieldspec (Name, optional): This option adds various options as were described before.
Returns:
... |
python | def schedule_hosting_device(self, plugin, context, hosting_device):
"""Selects Cisco cfg agent that will configure <hosting_device>."""
active_cfg_agents = plugin.get_cfg_agents(context, active=True)
if not active_cfg_agents:
LOG.warning('There are no active Cisco cfg agents')
... |
python | def get_voltage(self, channel, unit='V'):
'''Reading voltage
'''
adc_ch = self._ch_map[channel]['ADCV']['adc_ch']
address = self._ch_map[channel]['ADCV']['address']
raw = self._get_adc_value(address=address)[adc_ch]
dac_offset = self._ch_cal[channel]['ADCV']['offset']
... |
java | public static CouchbaseAsyncCluster create(final CouchbaseEnvironment environment,
final String... nodes) {
return create(environment, Arrays.asList(nodes));
} |
python | def to_kaf(self):
"""
Converts the coreference layer to KAF
"""
if self.type == 'NAF':
for node_coref in self.__get_corefs_nodes():
node_coref.set('coid',node_coref.get('id'))
del node_coref.attrib['id'] |
python | def create(cls, attachment_public_uuid, custom_headers=None):
"""
:param attachment_public_uuid: The public UUID of the public attachment
from which an avatar image must be created.
:type attachment_public_uuid: str
:type custom_headers: dict[str, str]|None
:rtype: BunqR... |
python | def moveToPoint(self, xxx_todo_changeme2):
"""
Moves the line to the point x,y
"""
(x,y) = xxx_todo_changeme2
self.set_x1(float(self.get_x1()) + float(x))
self.set_x2(float(self.get_x2()) + float(x))
self.set_y1(float(self.get_y1()) + float(y))
self.set_y2... |
java | public Integer asIntegerObj() {
if (current == null)
return null;
if (current instanceof Number) {
if (current instanceof Integer)
return (Integer) current;
if (current instanceof Long) {
Long l = (Long) current;
if (l.longValue() == l.intValue()) {
return Integer.valueOf(l.intValue());
... |
java | public boolean contains(Token token,
Transaction transaction)
throws ObjectManagerException
{
try {
for (Iterator iterator = iterator(); iterator.next(transaction) != token;);
return true;
} catch (java.util.NoSuchElementExcepti... |
java | public ServiceFuture<NetworkConfigurationDiagnosticResponseInner> getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters, final ServiceCallback<NetworkConfigurationDiagnosticResponseInner> serviceCallback) {
return ServiceF... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.