language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def withColumnRenamed(self, existing, new): """Returns a new :class:`DataFrame` by renaming an existing column. This is a no-op if schema doesn't contain the given column name. :param existing: string, name of the existing column to rename. :param new: string, new name of the column. ...
python
def static_parser(static): """Parse object describing static routes. Might be a list, a dict or a list of dicts. """ if static is None: return if isinstance(static, dict): static = static.items() for group in static: if not isinstanc...
java
public void updateClob(String columnName, java.sql.Clob c) throws SQLException { try { rsetImpl.updateClob(columnName, c); } catch (SQLException ex) { FFDCFilter.processException(ex, "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateClob", "4123", this); throw WSJdbcU...
python
def subs(self, *args, **kwargs): """Substitute a symbolic expression in ``['bond', 'angle', 'dihedral']`` This is a wrapper around the substitution mechanism of `sympy <http://docs.sympy.org/latest/tutorial/basic_operations.html>`_. Any symbolic expression in the columns ``['bon...
java
public static void sleep(long ms) { long start = uptimeMillis(); long duration = ms; boolean interrupted = false; do { try { Thread.sleep(duration); } catch (InterruptedException e) { interrupted = true; ...
python
def configure(ctx, helper, edit): ''' Update configuration ''' ctx.obj.config = ConfigFile(ctx.obj.config_file) if edit: ctx.obj.config.edit_config_file() return if os.path.isfile(ctx.obj.config.config_file): ctx.obj.config.read_config() if ctx.obj.profile is None...
python
def completions(self, symbol, attribute, recursive = False): """Finds all possible symbol completions of the given symbol that belong to this module and its dependencies. :arg symbol: the code symbol that needs to be completed. :arg attribute: one of ['dependencies', 'publics', 'members...
python
def put(self, measurementId, deviceId): """ Initialises the measurement session from the given device. :param measurementId: :param deviceId: :return: """ logger.info('Starting measurement ' + measurementId + ' for ' + deviceId) if self._measurementControl...
python
def parse(self, parser): """Main method to render data into the template.""" lineno = next(parser.stream).lineno if parser.stream.skip_if('name:short'): parser.stream.skip(1) short = parser.parse_expression() else: short = nodes.Const(False) ...
python
def handle_start_scan_command(self, scan_et): """ Handles <start_scan> command. @return: Response string for <start_scan> command. """ target_str = scan_et.attrib.get('target') ports_str = scan_et.attrib.get('ports') # For backward compatibility, if target and ports att...
java
public static lbgroup_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ lbgroup_lbvserver_binding obj = new lbgroup_lbvserver_binding(); obj.set_name(name); lbgroup_lbvserver_binding response[] = (lbgroup_lbvserver_binding[]) obj.get_resources(service); return response; }
java
protected void callConfigModifiers(Scriptable rawConfig) { if( aggregator.getPlatformServices() != null){ IServiceReference[] refs = null; try { refs = aggregator.getPlatformServices().getServiceReferences(IConfigModifier.class.getName(), "(name="+getAggregator().getName()+")"); //$NON-NLS-1$ //$NON-N...
python
def validate_listeners(self): """Validates that some listeners are actually registered""" if self.exception: # pylint: disable=raising-bad-type raise self.exception listeners = self.__listeners_for_thread if not sum(len(l) for l in listeners): raise ...
java
public Set<DiscoveryEntryWithMetaInfo> filter(Version callerVersion, Set<DiscoveryEntryWithMetaInfo> discoveryEntries, Map<String, Set<Version>> discoveredVersions) { if (callerVersion == null || discoveryEntries...
java
public static void writeVarLongCount(DataOutput out, long val) throws IOException { if (val < 0) { throw new IOException("Illegal count (must be non-negative): " + val); } while ((val & ~0x7FL) != 0) { out.write(((int) val) | 0x80); val >>>= 7; } out.write((int) val); }
java
private Collection<JcrProperty> getProperties( String repository, String workspace, String path, Node node ) throws RepositoryException { ArrayList<PropertyDefinition> names = new ArrayList<>(); NodeType primaryType = node.getPrimaryNodeType(); PropertyDefinition[] defs = primaryType.ge...
java
public void marshall(GetCrawlerRequest getCrawlerRequest, ProtocolMarshaller protocolMarshaller) { if (getCrawlerRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getCrawlerRequest.getName(),...
python
def length(self): """Returns the route length (cost) Returns ------- int Route length (cost). """ cost = 0 depot = self._problem.depot() last = depot for i in self._nodes: a, b = last, i if a.name() > b...
python
def endian(self): """ The target architecture byte order. One of :class:`Target.Endian`. """ if self._endian is None: value = self._DEFAULT_ENDIAN[self.arch] if value is None: raise NotImplementedError('Could not determine the default byte order of...
java
public final void castExpression() throws RecognitionException { BaseDescr expr =null; try { // src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:540:5: ( ( LEFT_PAREN primitiveType )=> LEFT_PAREN primitiveType RIGHT_PAREN expr= unaryExpression | ( LEFT_PAREN type )=> LEFT_PAREN type RIGHT_PAREN una...
java
@Override public View createView(ProjectFile file, byte[] fixedMeta, byte[] fixedData, Var2Data varData, Map<Integer, FontBase> fontBases) throws IOException { View view; int splitViewFlag = MPPUtility.getShort(fixedData, 110); if (splitViewFlag == 1) { view = new SplitView9(file, fi...
python
def _fetch_credentials(self, session): """Fetch the endpoint URI and authorization token for this session. Those two information are the basis for all future calls to the Swift (OpenStack) API for the storage container. :param keystoneclient.Session session: The session object to use f...
java
private Method getMethod(Class<?> clazz) { Method method = null; if (methodName != null) { method = getPublicMethod(clazz, methodName, methodParams); if (method != null && returnType != null && !returnType.isAssignableFrom(method.getReturnType())) { // If the return type...
python
def search(query, data, replacements=None): """Yield objects from 'data' that match the 'query'.""" query = q.Query(query, params=replacements) for entry in data: if solve.solve(query, entry).value: yield entry
java
protected HttpGet createHttpGet(String url, IGs2Credential credential, String service, String module, String function) { Long timestamp = System.currentTimeMillis()/1000; url = StringUtils.replace(url, "{service}", service); url = StringUtils.replace(url, "{region}", region.getName()); HttpGet get = new HttpGet...
python
def table( self, kudu_name, name=None, database=None, persist=False, external=True ): """ Convenience to expose an existing Kudu table (using CREATE TABLE) as an Impala table. To create a new table both in the Hive Metastore with storage in Kudu, use create_table. No...
java
protected void addDescription(PackageElement pkg, Content dlTree, SearchIndexItem si) { Content link = getPackageLink(pkg, new StringContent(utils.getPackageName(pkg))); if (configuration.showModules) { si.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(pkg))); ...
java
public void setText(Phrase phrase) { bidiLine = null; composite = false; compositeColumn = null; compositeElements = null; listIdx = 0; splittedRow = false; waitPhrase = phrase; }
python
def run_migrations_online(): """Run migrations in 'online' mode. In this scenario we need to create an Engine and associate a connection with the context. """ engine = engine_from_config( winchester_config['database'], prefix='', poolclass=pool.NullPool) connection = e...
java
@Override public void clearCache() { entityCache.clearCache(CPRuleAssetCategoryRelImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
java
@Nullable public String getDescription(int tagType) { Object object = _directory.getObject(tagType); if (object == null) return null; // special presentation for long arrays if (object.getClass().isArray()) { final int length = Array.getLength(object); ...
java
public void registerCard(String type, Class<? extends Card> cardClz) { mDefaultCardResolver.register(type, cardClz); }
java
@JsonIgnore public Collection<View> getViews() { HashSet<View> views = new HashSet<>(); views.addAll(getSystemLandscapeViews()); views.addAll(getSystemContextViews()); views.addAll(getContainerViews()); views.addAll(getComponentViews()); views.addAll(getDynamicViews(...
python
def search_pending(self, wallet): """ Tells the node to look for pending blocks for any account in **wallet** .. enable_control required :param wallet: Wallet to search for pending blocks :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> r...
java
public void error(SourceLocator srcLctr, String msg, Object args[], Exception e) throws TransformerException { //msg = (null == msg) ? XSLTErrorResources.ER_PROCESSOR_ERROR : msg; String formattedMsg = XSLMessages.createMessage(msg, args); // Locator locator = m_stylesheetLocatorStack.isEmpty() // ...
java
@Override public void endElement(final String uri, final String localName, final String qName) throws SAXException { if (!(DITA_OT_NS.equals(uri) && EXTENSION_ELEM.equals(localName))) { getContentHandler().endElement(uri, localName, qName); } }
python
def parse_author(self, value): """ Attempts to split an author name into last and first parts. """ tokens = tuple([t.upper().strip() for t in value.split(',')]) if len(tokens) == 1: tokens = value.split(' ') if len(tokens) > 0: if len(tokens) > 1: ...
python
def run(): """Command for reflection database objects""" parser = OptionParser( version=__version__, description=__doc__, ) parser.add_option( '-u', '--url', dest='url', help='Database URL (connection string)', ) parser.add_option( '-r', '--render', dest='render...
python
def format_single_dict(dictionary, output_name): ''' Currently used for metadata fields ''' output_payload = {} if dictionary: for (k, v) in dictionary.items(): output_payload[output_name + '[' + k + ']'] = v return output_payload
python
def stripped_lib_dict(lib_dict, strip_prefix): """ Return `lib_dict` with `strip_prefix` removed from start of paths Use to give form of `lib_dict` that appears relative to some base path given by `strip_prefix`. Particularly useful for analyzing wheels where we unpack to a temporary path before analy...
java
public static boolean isFloat(final byte[] qualifier, final int offset) { validateQualifier(qualifier, offset); if ((qualifier[offset] & Const.MS_BYTE_FLAG) == Const.MS_BYTE_FLAG) { return (qualifier[offset + 3] & Const.FLAG_FLOAT) == Const.FLAG_FLOAT; } else { return (qualifier[offset + 1] & C...
java
public void modifyInstanceAttributes(ModifyVpcAttributesRequest modifyVpcAttributesRequest) { checkNotNull(modifyVpcAttributesRequest, "request should not be null."); checkStringNotEmpty(modifyVpcAttributesRequest.getVpcId(), "request vpcId should not be empty."); checkStringNotEmpty(modifyVpcAt...
java
private IntegerConstant parseIntegerConstant(int index) throws IOException { int value = readInt(); return new IntegerConstant(_class.getConstantPool(), index, value); }
java
public static String format(final String strPattern, final Object... argArray) { if (StrUtil.isBlank(strPattern) || ArrayUtil.isEmpty(argArray)) { return strPattern; } final int strPatternLength = strPattern.length(); // 初始化定义好的长度以获得更好的性能 StringBuilder sbuf = new StringBuilder(strPatternLength + 50...
python
def has_name_version(self, name: str, version: str) -> bool: """Check if there exists a network with the name/version combination in the database.""" return self.session.query(exists().where(and_(Network.name == name, Network.version == version))).scalar()
java
@Override public DescribeInventoryDeletionsResult describeInventoryDeletions(DescribeInventoryDeletionsRequest request) { request = beforeClientExecution(request); return executeDescribeInventoryDeletions(request); }
java
@Override public UpdateServiceAccessPoliciesResult updateServiceAccessPolicies(UpdateServiceAccessPoliciesRequest request) { request = beforeClientExecution(request); return executeUpdateServiceAccessPolicies(request); }
java
public static Schema fromJson(String json) { try{ return JsonMappers.getMapper().readValue(json, Schema.class); } catch (Exception e){ //TODO better exceptions throw new RuntimeException(e); } }
python
def set_default_locators_and_formatters(self, axis): """ Set up the locators and formatters for the scale. Parameters ---------- axis: matplotlib.axis Axis for which to set locators and formatters. """ axis.set_major_locator(_LogicleLocator(self._tra...
java
public void setErrorListener(ErrorListener listener) throws IllegalArgumentException { if (null == listener) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_ERRORLISTENER, null)); // "ErrorListener"); m_errorListener = listener; }
python
def getdata(inputfile, argnum=None, close=False): """ Get data from the .dat files args: inputfile: file Input File close: bool, default=False Closes inputfile if True inputfile (File): Input file close (boolean): Closes inputfile if True (default: Fa...
python
def egg2dist(self, egginfo_path, distinfo_path): """Convert an .egg-info directory into a .dist-info directory""" def adios(p): """Appropriately delete directory, file or link.""" if os.path.exists(p) and not os.path.islink(p) and os.path.isdir(p): shutil.rmtree(p...
python
def export_base_dts(cls, graph, obj, nsm): """ Export the base DTS information in a simple reusable way :param graph: Current graph where the information lie :param obj: Object for which we build info :param nsm: Namespace manager :return: Dict """ o = { ...
java
public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) { // check the value we are plotting... Number dataValue = dataset.getValue(row, column); if...
java
private Object invokeMethod(ServletContextImpl appContext, final String methodName, Object[] params) throws Throwable { try { Method method = objectCache.get(methodName); if (method == null) { method = appContext.getClass().getMethod(methodName, classCache.get(methodName...
java
protected String defaultActionHtmlContent() { StringBuffer result = new StringBuffer(2048); result.append("<form name='"); result.append(getList().getId()); result.append("-form' action='"); result.append(getDialogRealUri()); result.append("' method='post' class='nomargi...
python
def add_link(self, name, desc, layout, node_1, node_2): """ Add a link to a network. Links are what effectively define the network topology, by associating two already existing nodes. """ existing_link = get_session().query(Link).filter(Link.name==name, Link....
python
def username_is_available(self, new_username): """Check if ``new_username`` is still available. | Returns True if ``new_username`` does not exist or belongs to the current user. | Return False otherwise. """ # Return True if new_username equals current user's username i...
python
def add(self, dist): """Add `dist` if we ``can_add()`` it and it has not already been added """ if self.can_add(dist) and dist.has_version(): dists = self._distmap.setdefault(dist.key, []) if dist not in dists: dists.append(dist) dists.sort...
java
public static <T extends Levenshtein> T NGram(String baseTarget, String compareTarget) { return NGram(baseTarget, compareTarget, null); }
java
public static byte[] AesDecryptByBase64Str(String base64String,byte[] decryptKey) throws Exception { byte[] content=Base64Decode(base64String); return AesDecryptByBytes(content, decryptKey); }
java
public final void setText(@Nullable final String text) { boolean hasDisabledDependents = shouldDisableDependents(); this.text = text; persistString(text); boolean isDisablingDependents = shouldDisableDependents(); if (isDisablingDependents != hasDisabledDependents) { ...
java
public void trimToSize() { if (_size < _data.length) { _data = _size == 0 ? EMPTY_ARRAY : copyOf(_data, _size); } }
python
def pyxlines(self): """Cython code lines. Assumptions: * Function shall be a method * Method shall be inlined * Method returns nothing * Method arguments are of type `int` (except self) * Local variables are generally of type `int` but of type `double` ...
java
public void createTable() { // [START bigtable_hw_create_table_veneer] // Checks if table exists, creates table if does not exist. if (!adminClient.exists(tableId)) { System.out.println("Creating table: " + tableId); CreateTableRequest createTableRequest = CreateTableRequest.of(tableId...
java
@Override public void forEach(Consumer<? super P_OUT> action) { evaluate(ForEachOps.makeRef(action, false)); }
python
def load_windowstime(buf, pos): """Load LE64 windows timestamp""" # unix epoch (1970) in seconds from windows epoch (1601) unix_epoch = 11644473600 val1, pos = load_le32(buf, pos) val2, pos = load_le32(buf, pos) secs, n1secs = divmod((val2 << 32) | val1, 10000000) dt = datetime.fromtimestamp...
java
protected void configureYahooClient(final Collection<BaseClient> properties) { val yahoo = pac4jProperties.getYahoo(); if (StringUtils.isNotBlank(yahoo.getId()) && StringUtils.isNotBlank(yahoo.getSecret())) { val client = new YahooClient(yahoo.getId(), yahoo.getSecret()); configu...
java
public void marshall(ListTaskDefinitionFamiliesRequest listTaskDefinitionFamiliesRequest, ProtocolMarshaller protocolMarshaller) { if (listTaskDefinitionFamiliesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocol...
java
public static String getFileExt(String fileName) { int dotPos = fileName.lastIndexOf('.'); if (dotPos != -1 && dotPos != fileName.length() - 1) { return fileName.substring(dotPos); } else { return null; } }
java
@Override protected void extraFileActions(PackageSymbol pack, JavaFileObject fo) { if (fo.isNameCompatible("package", JavaFileObject.Kind.HTML)) { pack.sourcefile = fo; } }
java
protected void performValidation(String path, Object value, List<ValidationResult> results) { String name = path != null ? path : "value"; if (value == null) { // Check for required values if (_required) results.add(new ValidationResult(path, ValidationResultType.Error, "VALUE_IS_NULL", name + " ca...
python
def endpoint_delete(auth=None, **kwargs): ''' Delete an endpoint CLI Example: .. code-block:: bash salt '*' keystoneng.endpoint_delete id=3bee4bd8c2b040ee966adfda1f0bfca9 ''' cloud = get_operator_cloud(auth) kwargs = _clean_kwargs(**kwargs) return cloud.delete_endpoint(**kwarg...
java
Iterator<FileSet<CopyEntity>> getCopyEntities(CopyConfiguration configuration, Comparator<FileSet<CopyEntity>> prioritizer, PushDownRequestor<FileSet<CopyEntity>> requestor) throws IOException { if (HiveUtils.isPartitioned(this.dataset.table)) { return new PartitionIterator(this.sourcePartitions, config...
java
public OvhTask service_externalContact_POST(String service, String displayName, String externalEmailAddress, String firstName, Boolean hiddenFromGAL, String initials, String lastName) throws IOException { String qPath = "/email/mxplan/{service}/externalContact"; StringBuilder sb = path(qPath, service); HashMap<St...
java
final void cleanStack() { boolean unlinked = false; Completion p; while ((p = stack) != null && !p.isLive()) // ensure head of stack live unlinked = casStack(p, p.next); if (p != null && !unlinked) { // try to unlink first nonlive for (Completion q = p.next; q != null;) { Completion ...
python
def get_bins_by_query(self, bin_query): """Gets a list of ``Bins`` matching the given bin query. arg: bin_query (osid.resource.BinQuery): the bin query return: (osid.resource.BinList) - the returned ``BinList`` raise: NullArgument - ``bin_query`` is ``null`` raise: Operatio...
java
public ClassInfoList filter(final ClassInfoFilter filter) { final Set<ClassInfo> reachableClassesFiltered = new LinkedHashSet<>(size()); final Set<ClassInfo> directlyRelatedClassesFiltered = new LinkedHashSet<>(directlyRelatedClasses.size()); for (final ClassInfo ci : this) { if (fil...
java
public synchronized void authConnection(MemcachedConnection conn, OperationFactory opFact, AuthDescriptor authDescriptor, MemcachedNode node) { interruptOldAuth(node); AuthThread newSASLAuthenticator = new AuthThread(conn, opFact, authDescriptor, node); nodeMap.put(node, newSASLAuthentic...
python
def get_status(video_id, _connection=None): """ Get the status of a video given the ``video_id`` parameter. """ c = _connection if not c: c = connection.APIConnection() return c.post('get_upload_status', video_id=video_id)
python
def system_qos_qos_service_policy_attach_rbridge_id_remove_rb_remove_range(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") system_qos = ET.SubElement(config, "system-qos", xmlns="urn:brocade.com:mgmt:brocade-policer") qos = ET.SubElement(system_qos, "qos...
java
public DescribeHostsResult withHosts(Host... hosts) { if (this.hosts == null) { setHosts(new com.amazonaws.internal.SdkInternalList<Host>(hosts.length)); } for (Host ele : hosts) { this.hosts.add(ele); } return this; }
python
def _copy_file_or_directory(self, source, destination_directory): """Recursively copies files from source to destination_directory. Args: source: source file or directory to copy into destination_directory destination_directory: destination directory in which to copy source """ if os.pa...
python
def unblock(self, other_user_id): """Unblock the given user. :param str other_user_id: the ID of the user to unblock :return: ``True`` if successful :rtype: bool """ params = {'user': self.user_id, 'otherUser': other_user_id} response = self.session.delete(self.u...
java
public static JsMessagingEngine[] getMessagingEngines(final String busName) { final String methodName = "getMessagingEngines"; if (TRACE.isEntryEnabled()) { SibTr.entry(TRACE, methodName, busName); } final JsMessagingEngine[] result; synchronized (MESSAGING_ENGINES...
java
public TableFactor observe(int variable, final int value) { return marginalize(variable, 0, (marginalizedVariableValue, assignment) -> { if (marginalizedVariableValue == value) { return (old, n) -> { // This would mean that we're observing something with 0 probability, which will wonk up dow...
java
private File getRamlOutputFile(File input) { String ramlFileName = input.getName().substring(0, input.getName().length() - 4) + "raml"; File outDir; if (outputDirectory == null) { outDir = new File(WatcherUtils.getExternalAssetsDestination(basedir), "raml"); } else { ...
java
private int findPrecedingOrAncestorOrSelf( XPathContext xctxt, XPath fromMatchPattern, XPath countMatchPattern, int context, ElemNumber namespaceContext) throws javax.xml.transform.TransformerException { DTM dtm = xctxt.getDTM(context); while (DTM.NULL != context) { ...
python
def resize_old(self, block_size, order=0, mode='constant', cval=False): ''' geo.resize(new_shape, order=0, mode='constant', cval=np.nan, preserve_range=True) Returns resized georaster ''' if not cval: cval = np.nan if (self.raster.dtype.name.find('float') != ...
python
def deconstruct(self): """Handle django.db.migrations.""" name, path, args, kwargs = super(VersionField, self).deconstruct() kwargs['partial'] = self.partial kwargs['coerce'] = self.coerce return name, path, args, kwargs
python
def schnabel_eskow(mat, eps=1e-16): """ Scnabel-Eskow algorithm for modified Cholesky factorisation algorithm. Args: mat (numpy.ndarray) : Must be a non-singular and symmetric matrix If sparse, the result will also be sparse. eps (float) : Error tolerance used in algorithm. ...
java
public java.lang.String getUrlRegex() { java.lang.Object ref = urlRegex_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); urlReg...
java
MongoCollection<BsonDocument> getUndoCollection(final MongoNamespace namespace) { return localClient .getDatabase(String.format("sync_undo_%s", namespace.getDatabaseName())) .getCollection(namespace.getCollectionName(), BsonDocument.class) .withCodecRegistry(MongoClientSettings.getDefaultCod...
python
def make_plot(self): """Generate the plot from time series and arguments """ args = self.args fftlength = float(args.secpfft) overlap = args.overlap self.log(2, "Calculating spectrum secpfft: {0}, overlap: {1}".format( fftlength, overlap)) overlap *= ...
java
public Observable<StorageAccountListKeysResultInner> regenerateKeyAsync(String resourceGroupName, String accountName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1<ServiceResponse<StorageAccountListKeysResultInner>, StorageAccountListKeysRe...
java
@Pure public static boolean intersectsCapsuleCapsule( double capsule1Ax, double capsule1Ay, double capsule1Az, double capsule1Bx, double capsule1By, double capsule1Bz, double capsule1Radius, double capsule2Ax, double capsule2Ay, double capsule2Az, double capsule2Bx, double capsule2By, double capsule2Bz, double c...
java
private void init() { int decorationWidth = getDecorationWidth(); m_decorationBox.setWidth(decorationWidth + "px"); m_primary.getElement().getStyle().setMarginLeft(decorationWidth, Style.Unit.PX); }
java
@Override public Class<?> findClass(final String qualifiedClassName) { final byte[] bytes = this.compiledJavaFileObject.getBytes(); return defineClass(qualifiedClassName, bytes, 0, bytes.length); }
python
def xpubsubSockets(self, hostSub, portSub, hostPub, portPub): ''' Creates frontend and backend for a XPUB/XSUB forwarding device ''' frontend_addr = self.tcpAddress(hostSub, portSub) backend_addr = self.tcpAddress(hostPub, portPub) frontendSocket = self._context.socket(z...
java
private File createFilename(String filenamePrefix, File journalDirectory) throws JournalException { String filename = JournalHelper.createTimestampedFilename(filenamePrefix, new Date()); File theFile = new File(journalDi...