language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public void removeResourceFromProject(String resourcename) throws CmsException { // TODO: this should be also possible if the resource has been deleted CmsResource resource = readResource(resourcename, CmsResourceFilter.ALL); getResourceType(resource).removeResourceFromProject(this, m_securityM...
python
def handle_lut(self, pkt): """This part of the protocol is used by IRAF to set the frame number. """ self.logger.debug("handle lut") if pkt.subunit & COMMAND: data_type = str(pkt.nbytes / 2) + 'h' #size = struct.calcsize(data_type) line = pkt.datain.re...
python
def bake(self): """ Bake a ``gilt`` command so it's ready to execute and returns None. :return: None """ self._sh_command = getattr(sh, self.command) self._sh_command = self._sh_command.bake( self.options, 'overlay', _env=self.env, ...
java
@SuppressWarnings("unchecked") public <T> T processElement(Element element) throws ConfigurationException { String namespace = $(element).namespaceURI(); String tagName = $(element).tag(); ElementHandler<?> handler = handlers.get(new HandlerId(namespace, tagName)); if (handler !=...
python
def discriminator1(ndf, no_bias=True, fix_gamma=True, eps=1e-5 + 1e-12): '''First part of the discriminator which takes a 32x32 image as input and output a convolutional feature map, this is required to calculate the layer loss''' BatchNorm = mx.sym.BatchNorm data = mx.sym.Variable('data') d1 ...
python
def _ppf(self, q, left, right, cache): """ Point percentile function. Example: >>> print(chaospy.Uniform().inv([0.1, 0.2, 0.9])) [0.1 0.2 0.9] >>> print(chaospy.Pow(chaospy.Uniform(), 2).inv([0.1, 0.2, 0.9])) [0.01 0.04 0.81] >>> print...
java
public static void initInstance(Context context, String meteorServerHostname, boolean useSsl) { initInstance(context, meteorServerHostname, sMeteorPort, useSsl); }
python
def PopState(self, **unused_kwargs): """Pop the previous state from the stack.""" try: self.state = self.state_stack.pop() logging.debug('Returned state to {0:s}'.format(self.state)) return self.state except IndexError: self.Error( 'Tried to pop the state but failed - poss...
python
def jump_statement(self): """ jump_statement: 'return' expression_statement """ self._process(Nature.RETURN) return ReturnStatement(expression=self.expression_statement())
python
def get(self, page=0, size=10): """Get dashboard meta info from in page `page` and page size is `size`. Args: page: page number. size: size number. Returns: list of dict containing the dash_id and accordingly meta info. maybe empty list [] when p...
java
public static void disableCaching(final WebResponse response) { response.setLastModifiedTime(Time.now()); final HttpServletResponse httpServletResponse = getHttpServletResponse(response); if (httpServletResponse != null) { httpServletResponse.addHeader("Cache-Control", "max-age=0"); httpServletRes...
python
def _get(self, ndef_message, timeout=1.0): """Get an NDEF message from the server. Temporarily connects to the default SNEP server if the client is not yet connected. """ if not self.socket: try: self.connect('urn:nfc:sn:snep') except nfc.llcp.Conn...
java
public Observable<StreamingJobInner> getByResourceGroupAsync(String resourceGroupName, String jobName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1<ServiceResponseWithHeaders<StreamingJobInner, StreamingJobsGetHeaders>, StreamingJobInner>() { @Overrid...
python
def autoconfig_url_from_preferences(): """ Get the PAC ``AutoConfigURL`` value from the macOS System Preferences. This setting is visible as the "URL" field in System Preferences > Network > Advanced... > Proxies > Automatic Proxy Configuration. :return: The value from the registry, or None i...
python
def neg_loglikelihood(y, mean, scale, shape, skewness): """ Negative loglikelihood function for this distribution Parameters ---------- y : np.ndarray univariate time series mean : np.ndarray array of location parameters for the Cauchy distribution ...
python
def set_primary_contact(self, email): """assigns the primary contact for this client""" params = {"email": email} response = self._put(self.uri_for('primarycontact'), params=params) return json_to_py(response)
python
def iquant(val, u=Ellipsis): ''' iquant(...) is equivalent to quant(...) except that the magnitude of the return value is always a read-only numpy array object. ''' if u is not Ellipsis and u is not None: u = unit(u) if is_quantity(val): uu = unit(val) if u is Ellipsis or u == ...
python
def to_representation(self, value): """Convert to natural key.""" content_type = ContentType.objects.get_for_id(value) return "_".join(content_type.natural_key())
java
public static String getDate(int days, int months, int years, String format) { return getDate(days, months, years, format, Locale.ENGLISH); }
python
def download(): """ Download all files from an FTP share """ ftp = ftplib.FTP(SITE) ftp.set_debuglevel(DEBUG) ftp.login(USER, PASSWD) ftp.cwd(DIR) filelist = ftp.nlst() filecounter = MANAGER.counter(total=len(filelist), desc='Downloading', unit='fil...
java
private long adjustForZoneAndDaylightSavingsTime( int tzMask, long utcTimeInMillis, TimeZone zone) { // The following don't actually need to be initialized because they are always set before // they are used but the compiler cannot detect that. int zoneOffset = 0; int dstOff...
python
def p12d_local(vertices, lame, mu): """Local stiffness matrix for P1 elements in 2d.""" assert(vertices.shape == (3, 2)) A = np.vstack((np.ones((1, 3)), vertices.T)) PhiGrad = inv(A)[:, 1:] # gradients of basis functions R = np.zeros((3, 6)) R[[[0], [2]], [0, 2, 4]] = PhiGrad.T R[[[2], [1]...
java
public static <T> T runWithSleepThenReturnValue(long milliseconds, ReturningRunnable<T> runnable) { Assert.isTrue(milliseconds > 0, "Milliseconds [%d] must be greater than 0", milliseconds); T returnValue = runnable.run(); ThreadUtils.sleep(milliseconds, 0); return returnValue; }
python
def get_user(self, user_id, expand=False): """Returns Hacker News `User` object. Fetches data from the url: https://hacker-news.firebaseio.com/v0/user/<user_id>.json e.g. https://hacker-news.firebaseio.com/v0/user/pg.json Args: user_id (string): unique user id ...
python
def opt_pairwise(n_items, data, alpha=1e-6, method="Newton-CG", initial_params=None, max_iter=None, tol=1e-5): """Compute the ML estimate of model parameters using ``scipy.optimize``. This function computes the maximum-likelihood estimate of model parameters given pairwise-comparison data (see :ref...
java
public static THttpService of(Map<String, ?> implementations, SerializationFormat defaultSerializationFormat) { return new THttpService(ThriftCallService.of(implementations), newAllowedSerializationFormats(defaultSerializationFormat, ...
java
public static <T> Function<Object, T> getConverter(final Class<T> clazz) { return object -> Convert.convert(object, clazz); }
python
def render(self, request, **kwargs): """ Renders this view. Adds cancel_url to the context. If the request get parameters contains 'popup' then the `render_type` is set to 'popup'. """ if request.GET.get('popup'): self.render_type = 'popup' kwargs[...
python
def oldest_peer(peers): """Determines who the oldest peer is by comparing unit numbers.""" local_unit_no = int(os.getenv('JUJU_UNIT_NAME').split('/')[1]) for peer in peers: remote_unit_no = int(peer.split('/')[1]) if remote_unit_no < local_unit_no: return False return True
java
public static INDArray im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int pval, boolean isSameMode) { INDArray output = null; if (isSameMode) { int oH = (int) Math.ceil(img.size(2) * 1.f / sy); int oW = (int) Math.ceil(img....
java
private void setSelectedNavDrawerItem(int itemId) { for(DrawerItem item: mDrawerItems){ formatNavDrawerItem(item, itemId == item.getId()); } }
java
public com.google.protobuf.ByteString getRuntimeBytes() { java.lang.Object ref = runtime_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); runtime_ = b; return b; ...
java
public static RoaringBitmap naive_or(RoaringBitmap... bitmaps) { RoaringBitmap answer = new RoaringBitmap(); for (int k = 0; k < bitmaps.length; ++k) { answer.naivelazyor(bitmaps[k]); } answer.repairAfterLazy(); return answer; }
python
def _raise_error_if_disconnected(self) -> None: """ See if we're still connected, and if not, raise ``SMTPServerDisconnected``. """ if ( self.transport is None or self.protocol is None or self.transport.is_closing() ): self....
java
public ListLayersResult withLayers(LayersListItem... layers) { if (this.layers == null) { setLayers(new com.amazonaws.internal.SdkInternalList<LayersListItem>(layers.length)); } for (LayersListItem ele : layers) { this.layers.add(ele); } return this; }
python
def _get_comparison_spec(pkgver): ''' Return a tuple containing the comparison operator and the version. If no comparison operator was passed, the comparison is assumed to be an "equals" comparison, and "==" will be the operator returned. ''' oper, verstr = salt.utils.pkg.split_comparison(pkgver...
python
def info(self, callback=None, **kwargs): """ Get the basic info from the current cluster. """ self.client.fetch( self.mk_req('', method='GET', **kwargs), callback = callback )
python
def _makeIndentAsColumn(self, block, column, offset=0): """ Make indent equal to column indent. Shiftted by offset """ blockText = block.text() textBeforeColumn = blockText[:column] tabCount = textBeforeColumn.count('\t') visibleColumn = column + (tabCount * (sel...
java
public static YamlConfiguration loadYamlConfiguration(Resource resource) throws DeployerConfigurationException { try { try (Reader reader = new BufferedReader(new InputStreamReader(resource.getInputStream(), "UTF-8"))) { return doLoadYamlConfiguration(reader); } }...
java
public boolean isFriend(Jid provisioningServer, BareJid friendInQuestion) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { LruCache<BareJid, Void> cache = negativeFriendshipRequestCache.lookup(provisioningServer); if (cache != null && cache.containsKey(friend...
java
private static String trackingNumberURL(String carrier, String trackingNumber) throws AuthenticationException, InvalidRequestException, APIConnectionException, APIException { try { return String.format("%s/%s/%s", classURL(Track.class), urlEncode(carrier), urlEncode(trackingNumber)); } catch (UnsupportedEncod...
python
def __convert_booleans(self, eitem): """ Convert True/False to 1/0 for better kibana processing """ for field in eitem.keys(): if isinstance(eitem[field], bool): if eitem[field]: eitem[field] = 1 else: eitem[field] = 0 ...
python
def link(self): """Resolve and link all types in the scope.""" type_specs = {} types = [] for name, type_spec in self.scope.type_specs.items(): type_spec = type_spec.link(self.scope) type_specs[name] = type_spec if type_spec.surface is not None: ...
python
def _run_command(self, command_constructor, args): """ Run command_constructor and call run(args) on the resulting object :param command_constructor: class of an object that implements run(args) :param args: object arguments for specific command created by CommandParser """ ...
python
def encodeGsm7(plaintext, discardInvalid=False): """ GSM-7 text encoding algorithm Encodes the specified text string into GSM-7 octets (characters). This method does not pack the characters into septets. :param text: the text string to encode :param discardInvalid: if True, characters that...
java
@Override public void saveCheckOutHistory() { if (ThreadCacheContext.exists()) { // e.g. in action checkingOutRequestPath = ThreadCacheContext.findRequestPath(); checkingOutEntryExp = convertMethodToMethodExp(ThreadCacheContext.findEntryMethod()); checkingOutUserExp = con...
java
public void setXpgSize(Integer newXpgSize) { Integer oldXpgSize = xpgSize; xpgSize = newXpgSize; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.PGD__XPG_SIZE, oldXpgSize, xpgSize)); }
java
public MutableDateTime toMutableDateTime(DateTimeZone zone) { Chronology chrono = DateTimeUtils.getChronology(getChronology()); chrono = chrono.withZone(zone); return new MutableDateTime(getMillis(), chrono); }
java
private void populateActivityCodes(Task task) { List<Integer> list = m_activityCodeAssignments.get(task.getUniqueID()); if (list != null) { for (Integer id : list) { ActivityCodeValue value = m_activityCodeMap.get(id); if (value != null) { ...
java
public Observable<ServiceResponse<Page<UsageInner>>> listWebWorkerUsagesNextWithServiceResponseAsync(final String nextPageLink) { return listWebWorkerUsagesNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<UsageInner>>, Observable<ServiceResponse<Page<UsageInner>>>>() { ...
java
public static double elementSumAbs( DMatrixD1 mat ) { double total = 0; int size = mat.getNumElements(); for( int i = 0; i < size; i++ ) { total += Math.abs(mat.get(i)); } return total; }
java
public void marshall(CommandPlugin commandPlugin, ProtocolMarshaller protocolMarshaller) { if (commandPlugin == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(commandPlugin.getName(), NAME_BINDING); ...
java
public static String format(final String aMessage, final String... aDetails) { int position = 0; int count = 0; while ((position = aMessage.indexOf("{}", position)) != -1) { position += 1; count += 1; } if (count != aDetails.length) { throw n...
java
public java.util.List<TriggerConfig> getTriggerConfigurations() { if (triggerConfigurations == null) { triggerConfigurations = new com.amazonaws.internal.SdkInternalList<TriggerConfig>(); } return triggerConfigurations; }
python
def register_hook(self, hook, event_type=None): """ If ``event_type`` is provided, then ``hook`` will be called whenever that event is fired. If no ``event_type`` is specifid, but ``hook`` implements any methods with names matching an event hook, then those will be registered wi...
java
public int setState(boolean state, boolean bDisplayOption, int moveMode) { double value = 0; if (state) value = 1; return this.setValue(value, bDisplayOption, moveMode); // Move value to this field }
python
def find_eq_stress(strains, stresses, tol=1e-10): """ Finds stress corresponding to zero strain state in stress-strain list Args: strains (Nx3x3 array-like): array corresponding to strains stresses (Nx3x3 array-like): array corresponding to stresses tol (float): tolerance to find ze...
java
public static VarBinding create( IVarDef varDef, VarValueDef valueDef) { VarBinding binding = valueDef.isNA() ? new VarNaBinding( varDef.getPathName(), varDef.getType()) : new VarBinding( varDef.getPathName(), varDef.getType(), valueDef.getName()); binding.setValueValid( valueDef.isValid...
java
@Override public void writeTo(final OutputStream outputStream, final Formatter formatter) throws IllegalArgumentException { this.getArchive().writeTo(outputStream, formatter); }
java
@Override public ListStreamProcessorsResult listStreamProcessors(ListStreamProcessorsRequest request) { request = beforeClientExecution(request); return executeListStreamProcessors(request); }
java
public void marshall(GetAddressBookRequest getAddressBookRequest, ProtocolMarshaller protocolMarshaller) { if (getAddressBookRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getAddressBookRe...
python
def call_only_once(func): ''' To be used as a decorator @call_only_once def func(): print 'Calling func only this time' Actually, in PyDev it must be called as: func = call_only_once(func) to support older versions of Python. ''' def new_func(*args, **kwargs): if not ...
python
def stop(self): """Stop stream.""" if self.stream and self.stream.session.state != STATE_STOPPED: self.stream.stop()
java
public UpdateUserPoolClientRequest withAllowedOAuthFlows(OAuthFlowType... allowedOAuthFlows) { java.util.ArrayList<String> allowedOAuthFlowsCopy = new java.util.ArrayList<String>(allowedOAuthFlows.length); for (OAuthFlowType value : allowedOAuthFlows) { allowedOAuthFlowsCopy.add(value.toStri...
python
def evaluate_inline(self, groups): """Evaluate inline comments on their own lines.""" # Consecutive lines with only comments with same leading whitespace # will be captured as a single block. if self.lines: if ( self.group_comments and self.li...
python
def smooth(x0, rho, gamma, axis=0): """ Proximal operator for a smoothing function enforced via the discrete laplacian operator Notes ----- Currently only works with matrices (2-D arrays) as input Parameters ---------- x0 : array_like The starting or initial point used in the p...
java
protected Set<Class<? extends S>> findInstanceAbleScript(Set<Class<? extends S>> scriptClazzs) throws InstantiationException, IllegalAccessException { Set<Class<? extends S>> result=new HashSet<>(); for (Class<? extends S> scriptClazz : scriptClazzs) { if(isInstanceAble(scriptClazz)) { result...
python
def serve(args): """Start a server which will watch .md and .rst files for changes. If a md file changes, the Home Documentation is rebuilt. If a .rst file changes, the updated sphinx project is rebuilt Args: args (ArgumentParser): flags from the CLI """ # Sever's parameters port = ...
python
async def parse_get_revoc_reg_def_response(get_revoc_ref_def_response: str) -> (str, str): """ Parse a GET_REVOC_REG_DEF response to get Revocation Registry Definition in the format compatible with Anoncreds API. :param get_revoc_ref_def_response: response of GET_REVOC_REG_DEF request. :return: Revocat...
java
public byte[] preProcess(ClassLoader classLoader, String slashedClassName, ProtectionDomain protectionDomain, byte[] bytes) { if (disabled) { return bytes; } // TODO need configurable debug here, ability to dump any code before/after for (Plugin plugin : getGlobalPlugins()) { if (plugin instanceof Loa...
python
def to_string(self, obj): """ Converts the given resource to a string representation and returns it. """ stream = NativeIO() self.to_stream(obj, stream) return text_(stream.getvalue(), encoding=self.encoding)
java
public boolean isIdentical(T a, double tol) { if( a.getType() != getType() ) return false; return ops.isIdentical(mat,a.mat,tol); }
java
public void marshall(DisableDomainAutoRenewRequest disableDomainAutoRenewRequest, ProtocolMarshaller protocolMarshaller) { if (disableDomainAutoRenewRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.m...
java
public static int asInteger(Object value) { if (value instanceof Number) { return ((Number) value).intValue(); } else if (value instanceof Numeric) { return ((Numeric) value).asInteger(); } else if (value instanceof Boolean) { return ((Boolean) value) ? 1 : 0;...
java
private static void setCampaignTargetingCriteria( Campaign campaign, AdWordsServicesInterface adWordsServices, AdWordsSession session) throws ApiException, RemoteException { // Get the CampaignCriterionService. CampaignCriterionServiceInterface campaignCriterionService = adWordsServices.get(...
python
def getAllChannelsAsPolygons(self, maptype=None): """Return slew the telescope and return the corners of the modules as Polygon objects. If a projection is supplied, the ras and decs are mapped onto x, y using that projection """ polyList = [] for ch in self.orig...
python
def COH(self): """Coherence. .. math:: \mathrm{COH}_{ij}(f) = \\frac{S_{ij}(f)} {\sqrt{S_{ii}(f) S_{jj}(f)}} References ---------- P. L. Nunez, R. Srinivasan, A. F. Westdorp, R. S. Wijesinghe, D. M. Tucker, R. B. Silverstei...
java
public Matrix4d set(Matrix3dc mat) { m00 = mat.m00(); m01 = mat.m01(); m02 = mat.m02(); m03 = 0.0; m10 = mat.m10(); m11 = mat.m11(); m12 = mat.m12(); m13 = 0.0; m20 = mat.m20(); m21 = mat.m21(); m22 = mat.m22(); m23 = 0.0; ...
python
def AnsiText(text, command_list=None, reset=True): """Wrap text in ANSI/SGR escape codes. Args: text: String to encase in sgr escape sequence. command_list: List of strings, each string represents an sgr value. e.g. 'fg_blue', 'bg_yellow' reset: Boolean, if to add a reset sequence to the suffix o...
python
def add_job(session, command_line, name = 'job', dependencies = [], array = None, exec_dir=None, log_dir = None, stop_on_failure = False, **kwargs): """Helper function to create a job, add the dependencies and the array jobs.""" job = Job(command_line=command_line, name=name, exec_dir=exec_dir, log_dir=log_dir, arr...
java
public File getBackupFile(String path) { String rootDir = tempDir + JawrConstant.SPRITE_BACKUP_GENERATED_CSS_DIR; String fPath = null; if (jawrConfig.isWorkingDirectoryInWebApp()) { fPath = jawrConfig.getContext().getRealPath(rootDir + getCssPath(path)); } else { fPath = rootDir + getCssPath(path); } ...
java
public static CommercePriceEntry fetchByC_C(long commercePriceListId, String CPInstanceUuid, boolean retrieveFromCache) { return getPersistence() .fetchByC_C(commercePriceListId, CPInstanceUuid, retrieveFromCache); }
python
def get_api(version: str, ui_version: str=None) -> API_1: """Get a versioned interface matching the given version and ui_version. version is a string in the form "1.0.2". """ ui_version = ui_version if ui_version else "~1.0" return _get_api_with_app(version, ui_version, ApplicationModule.app)
java
@Nullable public static String getFromLastExcl (@Nullable final String sStr, final char cSearch) { return _getFromLast (sStr, cSearch, false); }
python
def _set_class_(self, v, load=False): """ Setter method for class_, mapped from YANG variable /logging/auditlog/class (list) If this variable is read-only (config: false) in the source YANG file, then _set_class_ is considered as a private method. Backends looking to populate this variable should ...
java
public ReservedInstancesModification withReservedInstancesIds(ReservedInstancesId... reservedInstancesIds) { if (this.reservedInstancesIds == null) { setReservedInstancesIds(new com.amazonaws.internal.SdkInternalList<ReservedInstancesId>(reservedInstancesIds.length)); } for (Reserved...
python
def get_key_pair(self, keyname): """ Convenience method to retrieve a specific keypair (KeyPair). :type image_id: string :param image_id: the ID of the Image to retrieve :rtype: :class:`boto.ec2.keypair.KeyPair` :return: The KeyPair specified or None if it is not found ...
python
def from_dict(cls, d): """Instantiate a SemI from a dictionary representation.""" read = lambda cls: (lambda pair: (pair[0], cls.from_dict(pair[1]))) return cls( variables=map(read(Variable), d.get('variables', {}).items()), properties=map(read(Property), d.get('propertie...
python
def extend(self, other): """ extend signal with samples from another signal Parameters ---------- other : Signal Returns ------- signal : Signal new extended *Signal* """ if len(self.timestamps): last_stamp = self.timesta...
java
public List<E> createAll(AnnotatedElement element) { List<E> result = new ArrayList<>(); for (Annotation annotation : element.getAnnotations()) { create(annotation).ifPresent(result::add); } return result; }
python
def create_job_id(self, data): """ Create a new job id and reference (refs/aetros/job/<id>) by creating a new commit with empty tree. That root commit is the actual job id. A reference is then created to the newest (head) commit of this commit history. The reference will always be update...
java
public void clearResults(long sequence) { if (sequence > commandLowWaterMark) { for (long i = commandLowWaterMark + 1; i <= sequence; i++) { results.remove(i); commandLowWaterMark = i; } } }
java
private static Properties parseArguments(String agentArgument, String separator) { Properties p = new Properties(); try { String argumentAsLines = agentArgument.replaceAll(separator, "\n"); p.load(new ByteArrayInputStream(argumentAsLines.getBytes())); } catch (IOException...
python
def availability_set_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure an availability set does not exist in a resource group. :param name: Name of the availability set. :param resource_group: Name of the resource group containing the availa...
java
@Override public Request<DisassociateTransitGatewayRouteTableRequest> getDryRunRequest() { Request<DisassociateTransitGatewayRouteTableRequest> request = new DisassociateTransitGatewayRouteTableRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return...
python
def _from_python_type(self, obj, field, pytype): """Get schema definition from python type.""" json_schema = { 'title': field.attribute or field.name, } for key, val in TYPE_MAP[pytype].items(): json_schema[key] = val if field.dump_only: json...
python
def SRLS(anchors, w, r2, rescale=False, z=None, print_out=False): '''Squared range least squares (SRLS) Algorithm written by A.Beck, P.Stoica in "Approximate and Exact solutions of Source Localization Problems". :param anchors: anchor points (Nxd) :param w: weights for the measurements (Nx1) :para...
python
def all(self, paths, access=None, recursion=False): """ Iterates over `paths` (which may consist of files and/or directories). Removes duplicates and returns list of valid paths meeting access criteria. """ self.__init__() self.access = access self.filetyp...
java
public void setProxyport(Object oProxyport) throws PageException { if (StringUtil.isEmpty(oProxyport)) return; this.proxyport = Caster.toIntValue(oProxyport); }
python
def generate(env): """Add Builders and construction variables for Microsoft Visual Studio project files to an Environment.""" try: env['BUILDERS']['MSVSProject'] except KeyError: env['BUILDERS']['MSVSProject'] = projectBuilder try: env['BUILDERS']['MSVSSolution'] except ...