language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def sd_journal_send(**kwargs): """ Send a message to the journald log. @param kwargs: Mapping between field names to values, both as bytes. @raise IOError: If the operation failed. """ # The function uses printf formatting, so we need to quote # percentages. fields = [ _ffi.new...
python
def _handle_special_yaml_cases(v): """Handle values that pass integer, boolean, list or dictionary values. """ if "::" in v: out = {} for part in v.split("::"): k_part, v_part = part.split(":") out[k_part] = v_part.split(";") v = out elif ";" in v: ...
java
public void getNumberChars(CharArr output) throws IOException { int ev=0; if (valstate==0) ev=nextEvent(); if (valstate == LONG || valstate == NUMBER) output.write(this.out); else if (valstate==BIGNUMBER) { continueNumber(output); } else { throw err("Unexpected " + ev); } valstat...
java
public void marshall(GetComplianceDetailsByResourceRequest getComplianceDetailsByResourceRequest, ProtocolMarshaller protocolMarshaller) { if (getComplianceDetailsByResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ...
python
def fetch_object_from_db_by_pk(self, obj: Any, table: str, fieldlist: Sequence[str], pkvalue: Any) -> bool: """Fetches object from database table by PK value. Writes back t...
python
def client_ident(self): """ Return the client identifier as included in many command replies. """ return irc.client.NickMask.from_params( self.nick, self.user, self.server.servername)
python
def _do_filter(cnf, args): """ :param cnf: Mapping object represents configuration data :param args: :class:`argparse.Namespace` object :return: 'cnf' may be updated """ if args.query: cnf = API.query(cnf, args.query) elif args.get: cnf = _do_get(cnf, args.get) elif args....
python
def get_page_numbers( current_page, num_pages, extremes=DEFAULT_CALLABLE_EXTREMES, arounds=DEFAULT_CALLABLE_AROUNDS, arrows=DEFAULT_CALLABLE_ARROWS): """Default callable for page listing. Produce a Digg-style pagination. """ page_range = range(1, num_pages + 1) pages...
python
def _extract_from_bundle(b, compute, times=None, allow_oversample=False, by_time=True, **kwargs): """ Extract a list of sorted times and the datasets that need to be computed at each of those times. Any backend can then loop through these times and see what quantities are neede...
java
private RestoreWork processMessage(DecodedContainer msg, CachedByteBufferAllocator resultBufferAllocator) { if (msg == null) { return null; } RestoreWork restoreWork = null; try { if (msg.m_msgType == StreamSnapshotMessageTy...
java
public static void register(Context context, String... senderIds) { GCMRegistrar.resetBackoff(context); internalRegister(context, senderIds); }
python
def on_recv_rsp(self, rsp_pb): """receive response callback function""" ret_code, msg, data = OrderDetail.unpack_rsp(rsp_pb) if ret_code != RET_OK: return ret_code, msg else: return RET_OK, data
java
public boolean getMessagesFromSharedPreferences(int notificationId) { boolean gotMessages = false; SharedPreferences sharedPreferences = appContext.getSharedPreferences( PREFS_NAME, Context.MODE_PRIVATE); int countOfStoredMessages = sharedPreferences.getInt(MFPPush.PREFS_NOTIFICATION_COUNT, 0); if...
python
def _asciify_list(data): """ Ascii-fies list values """ ret = [] for item in data: if isinstance(item, unicode): item = _remove_accents(item) item = item.encode('utf-8') elif isinstance(item, list): item = _asciify_list(item) elif isinstance(item, ...
python
def getTaxCertURL(self, CorpNum, UserID): """ κ³΅μΈμΈμ¦μ„œ 등둝 URL args CorpNum : νšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ UserID : νšŒμ› νŒλΉŒμ•„μ΄λ”” return 30초 λ³΄μ•ˆ 토큰을 ν¬ν•¨ν•œ url raise PopbillException """ result = self._httpget('/?TG=CERT', CorpN...
python
def is_replicaset_initialized(self): """ iterate on all members and check if any has joined the replica """ # it's possible isMaster returns an "incomplete" result if we # query a replica set member while it's loading the replica set config # https://jira.mongodb.org/bro...
python
def log_metrics(self, metrics_by_name, info): """Store new measurements to the database. Take measurements and store them into the metrics collection in the database. Additionally, reference the metrics in the info["metrics"] dictionary. """ if self.metrics is No...
python
def get_trajectories(self, indexes, rollout_length): """ Return batch consisting of *consecutive* transitions """ # assert indexes.shape[0] > 1, "There must be multiple indexes supplied" assert rollout_length > 1, "Rollout length must be greater than 1" batch_indexes = ( ...
python
def lal(self): """Produces a LAL frequency series object equivalent to self. Returns ------- lal_data : {lal.*FrequencySeries} LAL frequency series object containing the same data as self. The actual type depends on the sample's dtype. If the epoch of ...
java
private Optional<UfsStatus> syncPersistDirectory(InodeDirectoryView dir) throws FileDoesNotExistException, IOException, InvalidPathException { AlluxioURI uri = getPath(dir); MountTable.Resolution resolution = mMountTable.resolve(uri); String ufsUri = resolution.getUri().toString(); try (CloseableR...
java
public static void main(String[] args) { DirectoryIterator iter = new DirectoryIterator(args); while(iter.hasNext()) System.out.println(iter.next().getAbsolutePath()); }
java
@Override protected byte[] computeResult() { final AbsAxis axis = getArgs().get(0); Integer count = 0; while (axis.hasNext()) { axis.next(); count++; } return TypedValue.getBytes(count.toString()); }
java
public final SipHasherStream update(byte b) { this.len++; this.m |= (((long) b & 0xff) << (this.m_idx++ * 8)); if (this.m_idx < 8) { return this; } this.v3 ^= this.m; for (int i = 0; i < this.c; i++) { round(); } this.v0 ^= this.m; ...
python
def timezone(zone): r''' Return a datetime.tzinfo implementation for the given timezone >>> from datetime import datetime, timedelta >>> utc = timezone('UTC') >>> eastern = timezone('US/Eastern') >>> eastern.zone 'US/Eastern' >>> timezone(u'US/Eastern') is eastern True >>> utc_dt = ...
python
def hgnc(name=None, identifier=None) -> Protein: """Build an HGNC protein node.""" return Protein(namespace='HGNC', name=name, identifier=identifier)
java
public EjbRelationshipRoleType<EjbRelationType<T>> getOrCreateEjbRelationshipRole() { List<Node> nodeList = childNode.get("ejb-relationship-role"); if (nodeList != null && nodeList.size() > 0) { return new EjbRelationshipRoleTypeImpl<EjbRelationType<T>>(this, "ejb-relationship-role", chil...
python
def pformat_check(success, checker, message): """Pretty print a check result :param success: `True` if the check was successful, `False` otherwise. :param checker: The checker dict that was executed :param message: The label for the check :returns: A string representation of the check """ ...
java
private CompositeExpression parseCaretRange() { consumeNextToken(CARET); int major = intOf(consumeNextToken(NUMERIC).lexeme); if (!tokens.positiveLookahead(DOT)) { return gte(versionFor(major)).and(lt(versionFor(major + 1))); } consumeNextToken(DOT); int minor...
java
protected void prepareRow(final Request request, final int rowIndex) { WComponent row = getRepeatedComponent(); row.preparePaint(request); }
java
public void attributeDecl(String eName, String aName, String type, String mode, String value) throws SAXException { // TODO attributeDecl }
python
def is_cache(cache): """Returns `True` if ``cache`` is a readable cache file or object Parameters ---------- cache : `str`, `file`, `list` Object to detect as cache Returns ------- iscache : `bool` `True` if the input object is a cache, or a file in LAL cache format, ...
python
def record_id(self, record, type_=None, selector=None): """Retrieve an object identifier from the given record; if it is an alien class, and the type is provided, then use duck typing to get the corresponding fields of the alien class.""" pk = record_id(record, type_, selector, self.norm...
java
public GridBagLayoutBuilder appendField(Component component, int colSpan) { return append(component, colSpan, 1, true, false); }
java
public static final SupportFragment shadow(Object fragment, IckleSupportManager.Builder supportManagerBuilder) { boolean hasIllegalArguments = false; StringBuilder errorContext = new StringBuilder(); if(fragment == null) { errorContext .append("Either an instance of ") .append(android.app.Fragm...
java
protected void resolutionFailed (ChatChannel channel, Exception cause) { log.warning("Failed to resolve chat channel", "channel", channel, cause); // alas, we just drop all pending messages because we're hosed _resolving.remove(channel); }
python
def nifti2db(file_path, file_type, is_copy, step_id, db_conn, sid_by_patient=False, pid_in_vid=False): """Extract some meta-data from NIFTI files (actually mostly from their paths) and stores it in a DB. Arguments: :param file_path: File path. :param file_type: File type. :param is_copy: Indicate i...
java
public void marshall(NotifyEmailType notifyEmailType, ProtocolMarshaller protocolMarshaller) { if (notifyEmailType == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(notifyEmailType.getSubject(), SUBJ...
python
def _GenerateSection(self, problem_type): """Generate a listing of the given type of problems. Args: problem_type: The type of problem. This is one of the problem type constants from transitfeed. Returns: The generated HTML as a string. """ if problem_type == transi...
java
@Override public void flush() throws IOException { checkClosed(); if (bs.isDirty()) { bs.write(); } for (int i = 0; i < bs.getNrFats(); i++) { fat.writeCopy(bs.getFatOffset(i)); } rootDir.flush(); if ...
java
public static Duration.Formatter<IsoUnit> formatter(String pattern) { return Duration.Formatter.ofPattern(pattern); }
python
def resource_action(client, action='', log_format='item: %(key)s', **kwargs): """Call _action_ using boto3 _client_ with _kwargs_. This is meant for _action_ methods that will create or implicitely prove a given Resource exists. The _log_failure_ flag is available for methods that should always succeed...
python
def _namespace_requested(self, namespace): """Checks whether the requested_namespaces contain the provided namespace""" if namespace is None: return False namespace_tuple = self._tuplefy_namespace(namespace) if namespace_tuple[0] in IGNORE_DBS: return ...
java
private static URL getResource(String name, ClassLoader[] classLoaders) { // Java standard class loader require resource name to be an absolute path without leading path separator // at this point <name> argument is guaranteed to not start with leading path separator for(ClassLoader classLoader : cl...
python
def _encrypt_data_key(self, data_key, algorithm, encryption_context=None): """Encrypts a data key and returns the ciphertext. :param data_key: Unencrypted data key :type data_key: :class:`aws_encryption_sdk.structures.RawDataKey` or :class:`aws_encryption_sdk.structures.DataKey` ...
java
@Override public void close() throws Exception { if (closed.compareAndSet(false, true)) { executor.shutdown(); completionExecutor.shutdown(); if (!executor.awaitTermination(shutdownTimeout, TimeUnit.MILLISECONDS)) { LOG.log(Level.WARNING, "Executor did not terminate in " + shutdownTimeou...
java
private void newHttpSessionScope() { SessionScopeAdvisor advisor = SessionScopeAdvisor.create(context); this.sessionScope = new HttpSessionScope(advisor); setAttribute(SESSION_SCOPE_ATTRIBUTE_NAME, this.sessionScope); }
python
def collect(since, to, top=DEFAULT_TOP): """Collect the CSP report. @returntype: CspReportSummary """ summary = CspReportSummary(since, to, top=top) queryset = CSPReport.objects.filter(created__range=(since, to)) valid_queryset = queryset.filter(is_valid=True) invalid_queryset = queryset.fi...
python
def get_node_ip_address(address="8.8.8.8:53"): """Determine the IP address of the local node. Args: address (str): The IP address and port of any known live service on the network you care about. Returns: The IP address of the current node. """ ip_address, port = addres...
java
@Execute public void process() throws Exception { if (inFile != null) { File file = new File(inFile); outProperties.load(new FileReader(file)); } else { if (duration != null) { outProperties.put(TimeParameterCodes.DURATION.getKey(), duration + MIN)...
java
@Override public int find(int x) { int curr = x; int currp = p[curr]; while (curr != currp) { curr = currp; currp = p[curr]; } return curr; // TODO: use path compression/halving/...? }
python
def lengths_to_mask(*lengths, **kwargs): """ Given a list of lengths, create a batch mask. Example: >>> lengths_to_mask([1, 2, 3]) tensor([[1, 0, 0], [1, 1, 0], [1, 1, 1]], dtype=torch.uint8) >>> lengths_to_mask([1, 2, 2], [1, 2, 2]) tensor([[[1, ...
python
def save(self, *args, **kwargs): """ Create the new user. If no username is supplied (may be hidden via ``ACCOUNTS_PROFILE_FORM_EXCLUDE_FIELDS`` or ``ACCOUNTS_NO_USERNAME``), we generate a unique username, so that if profile pages are enabled, we still have something to u...
python
def execute(self, query): """ Execute arbitrary queries on the db. .. seealso:: :class:`FeatureDB.schema` may be helpful when writing your own queries. Parameters ---------- query : str Query to execute -- trailing ";" opti...
python
def resize_bytes(self, size): """ Resize this buffer (deferred operation). Parameters ---------- size : int New buffer size in bytes. """ self._nbytes = size self._glir.command('SIZE', self._id, size) # Invalidate any view on this buf...
python
def _AddVolume(self, volume): """Adds a volume. Args: volume (Volume): a volume. Raises: KeyError: if volume is already set for the corresponding volume identifier. """ if volume.identifier in self._volumes: raise KeyError( 'Volume object already set for volum...
python
def build_call(func, *args, **kwargs): """ Build an argument dictionary suitable for passing via `**` expansion given function `f`, positional arguments `args`, and keyword arguments `kwargs`. """ func = get_wrapped_func(func) named, vargs, _, defs, kwonly, kwonlydefs, _ = getfullargspec(func) ...
python
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'results') and self.results is not None: _dict['results'] = [x._to_dict() for x in self.results] if hasattr(self, 'result_index') and self.result_index is not None: ...
java
public Bitflyer4j createInstance(Properties properties) { log.info("Creating instance."); final AbstractConfiguration conf = createConfiguration(properties); final Class<? extends RealtimeService> realtimeClass = getRealtimeType(conf); Module module = new AbstractModule() { ...
java
public static CommerceSubscriptionEntry fetchByC_C_C( String CPInstanceUuid, long CProductId, long commerceOrderItemId) { return getPersistence() .fetchByC_C_C(CPInstanceUuid, CProductId, commerceOrderItemId); }
python
def colors(self): """Return the current foreground and background colors.""" try: return get_console_info(self._kernel32, self._stream_handle)[:2] except OSError: return WINDOWS_CODES['white'], WINDOWS_CODES['black']
python
def merge(self, carts=None, new_cart_name=None): """ `carts` - A list of cart names `new_cart_name` - Resultant cart name Merge the contents of N carts into a new cart TODO: Sanity check that each cart in `carts` exists. Try 'juicer pull'ing carts that can't be located ...
java
public void billingAccount_miniPabx_serviceName_tones_PUT(String billingAccount, String serviceName, OvhTones body) throws IOException { String qPath = "/telephony/{billingAccount}/miniPabx/{serviceName}/tones"; StringBuilder sb = path(qPath, billingAccount, serviceName); exec(qPath, "PUT", sb.toString(), body); ...
python
def GetConfigValue(self, fieldName): """ Match given field name in Config table and return corresponding value. Parameters ---------- fieldName : string String matching Name column in Config table. Returns ---------- string or None If a match is found the correspond...
java
public static BatchSession newBatchSessionByBatchSize(KnowledgePackage knowledgePackage,int batchSize){ return new BatchSessionImpl(knowledgePackage,BatchSession.DEFAULT_THREAD_SIZE,batchSize); }
python
def set_file_filters(self, file_filters): """ Sets internal file filters to `file_filters` by tossing old state. `file_filters` can be single object or iterable. """ file_filters = util.return_list(file_filters) self.file_filters = file_filters
java
@FFDCIgnore(NumberFormatException.class) private static boolean determineIsJava8Before161(String version) { try { return version != null && version.startsWith("1.8.0_") && Integer.parseInt(version.substring(6)) < 161; } catch (NumberFormatException ex) { ...
python
def get_inception_score(images, splits=10): """ Inception_score function. The images will be divided into 'splits' parts, and calculate each inception_score separately, then return the mean and std of inception_scores of these parts. :param images: Images(num x c x w x h) that needs to calcu...
java
private String extractGroup(String path) { if (TextUtils.isEmpty(path) || !path.startsWith("/")) { throw new HandlerException(Consts.TAG + "Extract the default group failed, the path must be start with '/' and contain more than 2 '/'!"); } try { String defaultGroup = pat...
java
public static ResourceBundle getCurrentResourceBundle(String locale) { try { if (null != locale && !locale.isEmpty()) { return getCurrentResourceBundle(LocaleUtils.toLocale(locale)); } } catch (IllegalArgumentException ex) { // do nothing } return getCurrentResourceBundle((Locale) null); }
java
private Intent createVoiceAppSearchIntent(Intent baseIntent, SearchableInfo searchable) { ComponentName searchActivity = searchable.getSearchActivity(); // create the necessary intent to set up a search-and-forward operation // in the voice search system. We have to keep the bundle separate, ...
java
public String[] sentDetect(String s) { int[] starts = sentPosDetect(s); if (starts.length == 0) { return new String[] {s}; } boolean leftover = starts[starts.length - 1] != s.length(); String[] sents = new String[leftover? starts.length + 1 : starts.length]; sents[0] = s.substring(0,starts[0])...
java
public java.lang.String getLeaderMasterAddress() { java.lang.Object ref = leaderMasterAddress_; 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.toStri...
java
@Override public Iterable<V> values() { if (isEmpty()) { return Collections.<V>emptyList(); } return () -> new Iter<>(this, map -> map.value); }
python
def stop(self): """Stop consuming the stream and shutdown the background thread.""" with self._operational_lock: self._bidi_rpc.close() if self._thread is not None: # Resume the thread to wake it up in case it is sleeping. self.resume() ...
python
def update(self): """Update Docker stats using the input method.""" # Init new stats stats = self.get_init_value() # The Docker-py lib is mandatory if import_error_tag: return self.stats if self.input_method == 'local': # Update stats ...
java
public com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder() { if (sourceCase_ == 1) { return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; } return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); }
python
def create_sonos_playlist_from_queue(self, title): """Create a new Sonos playlist from the current queue. Args: title: Name of the playlist :rtype: :py:class:`~.soco.data_structures.DidlPlaylistContainer` """ # Note: probably same as Queue service method SaveAsSonos...
python
def display_candidates(self, tree, html_path, filename_prefix): """ Displays the bounding boxes corresponding to candidates on an image of the pdf boxes is a list of 5-tuples (page, top, left, bottom, right) """ imgs = self.display_boxes( tree, html_path, filename_pre...
python
def get_best_gain(mapping, candidate_mappings, weight_dict, instance_len, cur_match_num): """ Hill-climbing method to return the best gain swap/move can get Arguments: mapping: current node mapping candidate_mappings: the candidates mapping list weight_dict: the weight dictionary instance_le...
java
public MediaEjectControlEjCtrl createMediaEjectControlEjCtrlFromString(EDataType eDataType, String initialValue) { MediaEjectControlEjCtrl result = MediaEjectControlEjCtrl.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eD...
java
@Override public void loadImage(DataInputStream in, ImageVisitor v, boolean skipBlocks) throws IOException { try { InjectionHandler.processEvent(InjectionEvent.IMAGE_LOADER_CURRENT_START); v.start(); v.visitEnclosingElement(ImageElement.FS_IMAGE); imageVersion = in.readInt(); ...
python
def __get_config(): ''' Returns-->dict or None ''' if 'config' not in globals(): return None cfg = globals().get('config', None) if cfg is None: return None if not isinstance(cfg, dict): return None return cfg
python
def render(C, styles, margin='', indent='\t'): """output css text from styles. margin is what to put at the beginning of every line in the output. indent is how much to indent indented lines (such as inside braces). """ from unum import Unum s = "" # render the c...
java
public void displayPdfString(PdfString string, float tj) { String unicode = decode(string); // this is width in unscaled units - we have to normalize by the Tm scaling float width = getStringWidth(unicode, tj); Matrix nextTextMatrix = new Matrix(width, 0).multiply(textMatrix); displayText(unicode, nextTe...
python
def _ProcessSources(self, sources, parser_factory): """Iterates through sources yielding action responses.""" for source in sources: for action, request in self._ParseSourceType(source): yield self._RunClientAction(action, request, parser_factory, source.path_ty...
java
@NonNull public final <X> GenericType<T> where( @NonNull GenericTypeParameter<X> freeVariable, @NonNull GenericType<X> actualType) { TypeResolver resolver = new TypeResolver().where(freeVariable.getTypeVariable(), actualType.__getToken().getType()); Type resolvedType = resolver.resolveType(this....
java
public List<WsByteBuffer> decompress(WsByteBuffer inputBuffer) throws DataFormatException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "decompress, input=" + inputBuffer); } List<WsByteBuffer> list = new LinkedList<WsByteBuffer>(); int dat...
java
public static GVRCameraRig makeInstance(GVRContext gvrContext) { final GVRCameraRig result = gvrContext.getApplication().getDelegate().makeCameraRig(gvrContext); result.init(gvrContext); return result; }
python
def _get_stddevs(self, C, stddev_types, num_sites, mag_conversion_sigma): """ Return total standard deviation. """ assert all(stddev_type in self.DEFINED_FOR_STANDARD_DEVIATION_TYPES for stddev_type in stddev_types) sigma = np.zeros(num_sites) + C['sigma'] * n...
python
def _note_remote_option(self, option, state): """Record the status of local negotiated Telnet options.""" if not self.telnet_opt_dict.has_key(option): self.telnet_opt_dict[option] = TelnetOption() self.telnet_opt_dict[option].remote_option = state
python
def ds_extent(ds, t_srs=None): """Return min/max extent of dataset based on corner coordinates xmin, ymin, xmax, ymax If t_srs is specified, output will be converted to specified srs """ ul, ll, ur, lr = gt_corners(ds.GetGeoTransform(), ds.RasterXSize, ds.RasterYSize) ds_srs = get_ds_srs(ds) ...
java
@SuppressWarnings("unchecked") public static List<String> firstStringRow(PreparedStatement stmt) throws SQLException { return (List<String>) firstRow(stmt, String.class); }
python
def var_fmpt(P): """ Variances of first mean passage times for an ergodic transition probability matrix. Parameters ---------- P : array (k, k), an ergodic Markov transition probability matrix. Returns ------- : array (k, k), elements are the v...
java
private IpcAttempt extractAttempt(SdkHttpRequest request) { int attempt = 0; List<String> vs = request.headers().get("amz-sdk-retry"); if (vs != null) { for (String v : vs) { // Format is: {requestCount - 1}/{lastBackoffDelay}/{availableRetryCapacity} // See internal RetryHandler for m...
python
def _get_current_ids(self, source=True, meta=True, spectra=True, spectra_annotation=True): """Get the current id for each table in the database Args: source (boolean): get the id for the table "library_spectra_source" will update self.current_id_origin meta (boolean): get the id...
python
def files_list(self, **kwargs) -> SlackResponse: """Lists & filters team files.""" self._validate_xoxp_token() return self.api_call("files.list", http_verb="GET", params=kwargs)
java
public static InjectorImpl current(ClassLoader loader) { if (loader instanceof DynamicClassLoader) { return _localManager.getLevel(loader); } else { SoftReference<InjectorImpl> injectRef = _loaderManagerMap.get(loader); if (injectRef != null) { return injectRef.get(); } ...
python
def parse_JSON(self, JSON_string): """ Parses an *Ozone* instance out of raw JSON data. Only certain properties of the data are used: if these properties are not found or cannot be parsed, an error is issued. :param JSON_string: a raw JSON string :type JSON_string: str ...
java
@Override public List<CPRuleUserSegmentRel> findByCPRuleId(long CPRuleId, int start, int end) { return findByCPRuleId(CPRuleId, start, end, null); }
java
public static String encodePath(String path) { // Any characters that are not one of the following are // percent-encoded (including spaces): // a-z A-Z 0-9 . - _ ~ ! $ &amp; ' ( ) * + , ; = : @ / % if (StringUtils.isBlank(path)) { return path; } StringBuilder...