language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public static Cipher createCipher(String algorithm) { final Provider provider = GlobalBouncyCastleProvider.INSTANCE.getProvider(); Cipher cipher; try { cipher = (null == provider) ? Cipher.getInstance(algorithm) : Cipher.getInstance(algorithm, provider); } catch (Exception e) { throw new CryptoExc...
python
def mousePressEvent(self, event): """ Reimplements the :meth:`QLabel.mousePressEvent` method. :param event: QEvent. :type event: QEvent """ self.setPixmap(self.__active_pixmap) self.__menu and self.__menu.exec_(QCursor.pos()) self.pressed.emit()
python
def rl_cleanspaces(x): """ Clean double spaces, trailing spaces, heading spaces, spaces before punctuations """ patterns = ( # arguments for re.sub: pattern and repl # удаляем пробел перед знаками препинания (r' +([\.,?!\)]+)', r'\1'), # добавляем пробел после знака п...
java
@Override public void filter(byte[] line, byte[] previousLine, int sampleBitCount) throws PngException { PngFilterType filterType = PngFilterType.forValue(line[0]); line[0] = 0; PngFilterType previousFilterType = PngFilterType.forValue(previousLine[0]); previousLine[0] = 0; switch (filterType) { case NO...
java
public GPathResult parse(final File file) throws IOException, SAXException { final FileInputStream fis = new FileInputStream(file); final InputSource input = new InputSource(fis); input.setSystemId("file://" + file.getAbsolutePath()); try { return parse(input); } fina...
java
static SharedPreferences getSharedPreferences() { if (null == getApplicationContext()) return null; SharedPreferences rtn = getApplicationContext().getSharedPreferences(PREF_FILE, Context.MODE_PRIVATE); if (null == rtn) { Log.e(WonderPush.TAG, "Could not get shared prefer...
python
def working_tomorrow(self, date_from=None, date_format=None): """ Retourne la date de demain depuis maintenant ou depuis une date fournie seulement sur les jours ouvrableq. Ainsi lundi devient samedi et samedi devient vendredi :param: :date_from date de référence :return datetime """ # date de demain q...
java
private static void initStreams() { Log.info("Initializing Streams..."); MetadataCommand command = (MetadataCommand) PreConfigurationContext.getCommandByName("-metadata"); BatchCommand batchCommand = (BatchCommand) PreConfigurationContext.getCommandByName("-batchSize"); AsyncAnnotationAuditOutputStream async...
java
public void writeEnd(final OutputStream result) throws IOException{ if(this.fontStyle != UNDEFINED) { if((fontStyle & STYLE_BOLD) == STYLE_BOLD) { result.write(FONT_BOLD); result.write(intToByteArray(0)); } if((fontStyle & STYLE_ITALIC) == STYL...
java
private void symLinkAndConfigureFiles(JobConf job) throws IOException { if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) { LOG.warn("Use GenericOptionsParser for parsing the arguments. " + "Applications should implement Tool for the same."); } // get all the command li...
java
private static List<Method> getAnnotatedMethodsFromChildToParent(Class<?> clazz, Class<? extends Annotation> annotation, Logger log) { List<Method> methodsToRun = new ArrayList<Method>(); while(clazz != null) { List<Method> newMethods = getMethodsWithAnnotation(clazz, annotation, log); for(Met...
java
@Override public void changeTimeoutDuration(Duration timeoutDuration) { RateLimiterConfig newConfig = RateLimiterConfig.from(rateLimiterConfig.get()) .timeoutDuration(timeoutDuration) .build(); rateLimiterConfig.set(newConfig); }
java
public static CPMeasurementUnit fetchByG_P_T_Last(long groupId, boolean primary, int type, OrderByComparator<CPMeasurementUnit> orderByComparator) { return getPersistence() .fetchByG_P_T_Last(groupId, primary, type, orderByComparator); }
python
def _init_optional_attrs(self, optional_attrs): """Prepare to store data from user-desired optional fields. Not loading these optional fields by default saves in space and speed. But allow the possibility for saving these fields, if the user desires, Including: com...
python
def random(length, chars=None): """Generates a random string. :param length: Length of the string to generate. This can be a numbe or a pair: ``(min_length, max_length)`` :param chars: String of characters to choose from """ if chars is None: chars = string.ascii_letters ...
java
public DevState extractDevState() throws DevFailed { manageExceptions("extractDevState"); if (isArray()) { // It is used for an attribute of DevState enum. final DevState[] array = extractDevStateArray(); return array[0]; } else { // It is used for state attribute return DevStateHelper.extra...
java
public static boolean isWindows() { String os = System.getProperty("os.name").toLowerCase(); return os.indexOf("windows") != -1 || os.indexOf("nt") != -1; }
java
public void setWarningMessage(int valueIndex, String message, CmsTabbedPanel<?> tabbedPanel) { if (!m_attributeValueViews.isEmpty()) { FlowPanel parent = (FlowPanel)m_attributeValueViews.get(0).getParent(); CmsAttributeValueView valueView = (CmsAttributeValueView)parent.getWidget(va...
python
def get_query(self, q, request): """ return a query set searching for the query string q either implement this method yourself or set the search_field in the LookupChannel class definition """ return Institute.objects.filter( Q(name__icontains=q) )
python
def _initializeIndividualTable(pop, tc): """ Returns node ID -> individual map """ # First, alive individuals: individal_nodes = {} for i in range(pop.N): individal_nodes[2*i] = i individal_nodes[2*i+1] = i metadata_strings = _generate_individual_metadata(pop.diploid_metadata...
python
def condition_to_lambda(condition, default=False): """ Translates an integer, set, list or function into a lambda that checks if state's current basic block matches some condition. :param condition: An integer, set, list or lambda to convert to a lambda. :param default: The default return val...
java
public void updateState(TrustAnchor anchor, BuilderParams buildParams) throws CertificateException, IOException, CertPathValidatorException { trustAnchor = anchor; X509Certificate trustedCert = anchor.getTrustedCert(); if (trustedCert != null) { updateState(trustedCert); ...
java
public ServiceFuture<Object> listSwaggerAsync(String resourceGroupName, String workflowName, final ServiceCallback<Object> serviceCallback) { return ServiceFuture.fromResponse(listSwaggerWithServiceResponseAsync(resourceGroupName, workflowName), serviceCallback); }
java
protected void doBye(SipServletRequest request) throws ServletException, IOException { request.getSession().setAttribute("lastRequest", request); if(logger.isInfoEnabled()) { logger.info("Got BYE request:\n" + request); } sessions.get(request.getSession()).createRequest("BYE").send(); }
python
def close_stream(self): """ Terminates an open stream and returns the filename of the file containing the streamed data. """ if self.fout: fout = self.fout fout_fn = self.fout_fn self.fout.flush() self.fout.close() self....
python
def detect_emg_activations(emg_signal, sample_rate, smooth_level=20, threshold_level=10, time_units=False, volts=False, resolution=None, device="biosignalsplux", plot_result=False): """ ----- Brief ----- Python implementation of Burst detection a...
java
@Override // override with covariant return type public Period period(int years, int months, int days) { return Period.of(years, months, days); }
python
def get_char(self, offset=0): """Return the current character in the working string.""" if not self.has_space(offset=offset): return '' return self.string[self.pos + offset]
java
protected void beginLifecycleCallback(int methodId, CallbackContextHelper contextHelper, CallbackContextHelper.Contexts pushContexts) throws CSIException { CallbackContextHelper.Tx beginTx = isLifecycleCallbackGlobalTx(methodId)...
java
private void processEnvelope(Envelope envelope) { ActorScope scope = envelope.getScope(); if (actorSystem.getTraceInterface() != null) { actorSystem.getTraceInterface().onEnvelopeDelivered(envelope); } long start = ActorTime.currentTime(); if (scope.getActor() == n...
java
private static String getHostAddress(InetSocketAddress addr) { String hostToAppend = ""; if (addr.isUnresolved()) { hostToAppend = addr.getHostName(); } else { hostToAppend = addr.getAddress().getHostAddress(); } return hostToAppend; }
python
def detach_network_interface(self, network_interface_id, force=False): """ Detaches a network interface from an instance. :type network_interface_id: str :param network_interface_id: The ID of the network interface to detach. :type force: bool :param force: Set to true ...
python
def _get_reg(cls): """Return all of the registered classes. :return: an ``dict`` of task_family -> class """ # We have to do this on-demand in case task names have changed later reg = dict() for task_cls in cls._reg: if not task_cls._visible_in_registry: ...
java
@Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void setOccupantInfo (DSet<OccupantInfo> value) { requestAttributeChange(OCCUPANT_INFO, value, this.occupantInfo); DSet<OccupantInfo> clone = (value == null) ? null : value.clone(); this.occupantInfo = clone; }
python
def d_acquisition_function(self, x): """ Returns the gradient of the acquisition function at x. """ x = np.atleast_2d(x) if self.transform=='softplus': fval = -self.acq.acquisition_function(x)[:,0] scale = 1./(np.log1p(np.exp(fval))*(1.+np.exp(-fval))) ...
java
@Override public ResetDeploymentsResult resetDeployments(ResetDeploymentsRequest request) { request = beforeClientExecution(request); return executeResetDeployments(request); }
python
def is_all_field_none(self): """ :rtype: bool """ if self._id_ is not None: return False if self._monetary_account_id is not None: return False if self._user_alias_created is not None: return False if self._responses is not ...
python
def ensure_folder(path, folder=False, fatal=True, logger=LOG.debug, dryrun=None): """ :param str|None path: Path to file or folder :param bool folder: If True, 'path' refers to a folder (file otherwise) :param bool|None fatal: Abort execution on failure if True :param callable|None logger: Logger to...
python
def __match_signature_tree(self, signature_tree, data, depth = 0): """Recursive function to find matches along the signature tree. signature_tree is the part of the tree left to walk data is the data being checked against the signature tree depth keeps track of how far we have gon...
java
public void computeBasis( int numComponents ) { if( numComponents > A.getNumCols() ) throw new IllegalArgumentException("More components requested that the data's length."); if( sampleIndex != A.getNumRows() ) throw new IllegalArgumentException("Not all the data has been added");...
java
public DefaultShardManagerBuilder setContextMap(IntFunction<? extends ConcurrentMap<String, String>> provider) { this.contextProvider = provider; if (provider != null) this.enableContext = true; return this; }
java
public boolean saveCase(FogbugzCase fbCase, String comment) { try { HashMap<String, String> params = new HashMap<String, String>(); // If id = 0, create new case. if (fbCase.getId() == 0) { params.put("cmd", "new"); params.put("sTitle", fbCase....
python
def guess_depth(packages): """ Guess the optimal depth to use for the given list of arguments. Args: packages (list of str): list of packages. Returns: int: guessed depth to use. """ if len(packages) == 1: return packages[0].count('.') + 2 return min(p.count('.') fo...
python
def tx_estimate_signature_len(privkey_info): """ Estimate how long a signature is going to be, given a private key. privkey_info is a private key or a multisig/segwit bundle. This accounts for both the scriptsig and witness data. The return value is the number of actual *bytes* (not vbytes) that t...
java
public static VTimezone convert(List<Daylight> daylights, Timezone tz) { UtcOffset tzOffset = ValuedProperty.getValue(tz); if (daylights.isEmpty() && tzOffset == null) { return null; } VTimezone timezone = new VTimezone("TZ"); if (daylights.isEmpty() && tzOffset != null) { StandardTime st = new Standar...
python
async def async_get_program_guide(channel, no_cache=False, refresh_interval=4): ''' Get the program data for a channel ''' chan = await async_determine_channel(channel) now = datetime.datetime.now() max_cache_age = datetime.timedelta(hours=refresh_interval) if not no_cache and 'guide' in _CA...
java
public void writeObject(Object obj, AbstractHessianOutput out) throws IOException { if (out.addRef(obj)) { return; } Class< ? > cl = obj.getClass(); try { if (writeReplace != null) { Object repl = writeReplace....
java
@RequestMapping(value = "/api/scripts/{scriptIdentifier}", method = RequestMethod.GET) public @ResponseBody Script getScript(Model model, @PathVariable String scriptIdentifier) throws Exception { return ScriptService.getInstance().getScript(Integer.parseInt(scriptIdentifier)); }
python
def compute(self, x, yerr=0.0, **kwargs): """ Pre-compute the covariance matrix and factorize it for a set of times and uncertainties. :param x: ``(nsamples,)`` or ``(nsamples, ndim)`` The independent coordinates of the data points. :param yerr: (optional) ``(nsampl...
java
@SuppressWarnings("unchecked") private void startScheduler(){ scheduledExecutorService.scheduleAtFixedRate(new Runnable() { @Override @SuppressWarnings("rawtypes") public void run() { Iterator<Entry<String, Long>> it = transactionCallbackTime.entrySet().iterator(); while (it.hasNext()) { Ma...
java
@Override public final <T extends TimePoint<? super U, T>> T subtractFrom(T time) { return this.add(time, this, true); }
java
boolean checkIntegrity () { if (headerType == null) return false; if (headerType == HeaderType.MODE_PARAMETER_HEADER_6 && longLba) return false; return true; }
python
def load_pid(pidfile): """read pid from pidfile. """ if pidfile and os.path.isfile(pidfile): with open(pidfile, "r", encoding="utf-8") as fobj: return int(fobj.readline().strip()) return 0
java
public boolean putIfMissing(final String field, final String value) { return doWithJedis(new JedisCallable<Boolean>() { @Override public Boolean call(Jedis jedis) { return jedis.hsetnx(getKey(), field, value) != 0; } }); }
python
def tremolo(self, freq, depth=40): """tremolo takes two parameters: frequency and depth (max 100)""" self.command.append("tremolo") self.command.append(freq) self.command.append(depth) return self
java
public void setTimeZoneType(com.google.api.ads.admanager.axis.v201811.TimeZoneType timeZoneType) { this.timeZoneType = timeZoneType; }
java
@Override public void initializeState(FunctionInitializationContext context) throws Exception { TypeInformation<Tuple2<StreamShardMetadata, SequenceNumber>> shardsStateTypeInfo = new TupleTypeInfo<>( TypeInformation.of(StreamShardMetadata.class), TypeInformation.of(SequenceNumber.class)); sequenceNumsStateF...
java
public Optional<OperatorBackPressureStats> getOperatorBackPressureStats(ExecutionJobVertex vertex) { synchronized (lock) { final OperatorBackPressureStats stats = operatorStatsCache.getIfPresent(vertex); if (stats == null || backPressureStatsRefreshInterval <= System.currentTimeMillis() - stats.getEndTimestamp(...
java
@Override public Collection<IPermissionTarget> searchTargets(String term) { // Initialize a new collection of matching targets. We use a HashSet // implementation here to prevent duplicate target entries. Collection<IPermissionTarget> matching = new HashSet<IPermissionTarget>(); /...
python
def parse_document(xmlcontent): """Parse document with content. Content is placed in file 'document.xml'. """ document = etree.fromstring(xmlcontent) body = document.xpath('.//w:body', namespaces=NAMESPACES)[0] document = doc.Document() for elem in body: if elem.tag == _name('{{...
java
public static void init(final CertManAPI cmAPI) throws Exception { // Check for Created Certificate Authorities in TRANS sCertAuth = ((TransStore) cmAPI.env).slot(CERT_AUTH); //////// // Overall APIs /////// cmAPI.route(HttpMethods.PUT,"/cert/:ca",API.CERT_REQ,new Code(cmAPI,"Request Certificate") { @...
java
public void buildClassInfo(XMLNode node, Content classContentTree) { Content classInfoTree = writer.getClassInfoTreeHeader(); buildChildren(node, classInfoTree); classContentTree.addContent(writer.getClassInfo(classInfoTree)); }
python
def annotate(*args, **kwargs): """Set function annotations (on Python2 and 3).""" def decorator(f): if not hasattr(f, '__annotations__'): f.__annotations__ = kwargs.copy() else: f.__annotations__.update(kwargs) if args: if len(args) != 1: ...
python
def raise_for_status(self): '''Raise Postmark-specific HTTP errors. If there isn't one, the standard HTTP error is raised. HTTP 401 raises :class:`UnauthorizedError` HTTP 422 raises :class:`UnprocessableEntityError` HTTP 500 raises :class:`InternalServerError` ''' ...
java
@Override @SuppressWarnings("unchecked") public <T> T create(final String objectTypeName, final Object... args) { return (T) create(ClassUtils.loadClass(objectTypeName), getArgumentTypes(args), args); }
java
public static AckErrorCode of(Values value) { if (value == Values.SDK_UNKNOWN) { throw new IllegalArgumentException("SDK_UNKNOWN cannot be used to create an AckErrorCode. Use the raw value to" + "create an AckErrorCode from a string instead"); }...
java
@CanIgnoreReturnValue public static <T> T checkNotNull( T reference, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (reference == null) { // If either of these parameters is null, the right thing happens anyway throw new NullPointerException(format(errorMessage...
python
def download(self, output="", outputFile="", silent=True): """ Downloads the image of the comic onto your computer. Arguments: output: the output directory where comics will be downloaded to. The default argument for 'output is the empty string; if the empty string is passed, it defaults to a "Downloa...
python
def reduce_operators(source): """ Remove spaces between operators in *source* and returns the result. Example:: def foo(foo, bar, blah): test = "This is a %s" % foo Will become:: def foo(foo,bar,blah): test="This is a %s"%foo .. note:: Also remov...
python
def add_continuous_regressors_to_design_matrix(self, regressors): """add_continuous_regressors_to_design_matrix appends continuously sampled regressors to the existing design matrix. One uses this addition to the design matrix when one expects the data to contain nuisance factors that aren't tied to the moments...
java
public static Client websocket(ClientSettings clientSettings) { WebsocketClientCodec clientCodec = new WebsocketClientCodec(DataCodec.getInstance(clientSettings.contentType())); WebsocketClientTransport clientTransport = new WebsocketClientTransport(clientSettings, clientCodec, clientSettings.l...
python
def _generate_walks(self): """ Generates the random walks which will be used as the skip-gram input. :return: List of walks. Each walk is a list of nodes. """ flatten = lambda l: [item for sublist in l for item in sublist] # Split num_walks for each worker num_w...
python
def create(cls, counter_user_alias, share_detail, status, monetary_account_id=None, draft_share_invite_bank_id=None, share_type=None, start_date=None, end_date=None, custom_headers=None): """ Create a new share inquiry for a monetary account, specifying the ...
python
def format_references(self, t, i): """Handle format references.""" octal = self.get_octal(t, i) if octal: value = int(octal, 8) if value > 0xFF and self.is_bytes: # Re fails on octal greater than `0o377` or `0xFF` raise ValueError("octal e...
python
def compute_optional_conf(conf_name, default_value, **all_config): """Returns *conf_name* settings if provided in *all_config*, else returns *default_value*. Validates *conf_name* value if provided. """ conf_value = all_config.get(conf_name) if conf_value is not None: # Validate config...
python
def asizeof(*objs, **opts): '''Return the combined size in bytes of all objects passed as positional argments. The available options and defaults are the following. *align=8* -- size alignment *all=False* -- all current objects *clip=80* -- clip ``repr()`` strings ...
python
def get_current(self, item=None, raw=False, start=None, end=None): """ Get a Panel that is the current data in view. It is not safe to persist these objects because internal data might change """ item_indexer = slice(None) if item: item_indexer = self.items.ge...
java
public static Class<?> getCommonType(Class<?> common, Class<?> compare) { if ( null == common ) return compare; if ( null == compare || common.isAssignableFrom(compare) ) return common; // pick the largest number type based on NUMBER_ORDER definitions if ( NUMBER...
java
public static <T> Optional<T> getObjectOptional(Config config, String path, Class<T> clazz) { return Optional.ofNullable(getObject(config, path, clazz)); }
python
def read_backup_keys(self, recovery_key=False): """Retrieve the backup copy of PGP-encrypted unseal keys. The returned value is the nonce of the rekey operation and a map of PGP key fingerprint to hex-encoded PGP-encrypted key. Supported methods: PUT: /sys/rekey/backup. Pro...
java
void awaitResponses() { try { boolean finishedNicely = responseFinished.await(WAIT_TIMEOUT_MILISECONDS, TimeUnit.MILLISECONDS); if (!finishedNicely) { throw new WarpSynchronizationException(WarpContextStore.get()); } } catch (InterruptedException e) { ...
python
def traverse(self, root = None, display = None, q = Stack(), priority = 'L'): ''' API: traverse(self, root=None, display=None, q=Stack(), priority='L', order='in') Description: Traverses tree starting from node named root if root argument is ...
python
def main(filepath, in_debug_mode): """Gibica Interpreter.""" with open(filepath) as file: try: # Lexical analysis lexer = Lexer(file.read()) # Syntax analysis parser = Parser(lexer) tree = parser.parse() # Sementic analysis ...
java
public @Nonnull SetType getBlockedThreads() { Set<ThreadLock> acquired = new HashSet<ThreadLock>(); for (ThreadType thread: threads) { acquired.addAll(thread.getAcquiredLocks()); } Set<ThreadType> blocked = new HashSet<ThreadType>(); for (ThreadType thread: runtime.g...
java
public static final SerIterable listMultimap(final Class<?> keyType, final Class<?> valueType, final List<Class<?>> valueTypeTypes) { final ListMultimap<Object, Object> map = ArrayListMultimap.create(); return new SerIterable() { @Override public SerIterator iterator() { ...
python
def next(self, *args): """yield from .next()""" self.initialize() self.future = asyncio.Future(loop=self.loop) self.handle = self.loop.call_at(self.get_next(), self.call_func, *args) return self.future
java
private static Configuration enableClusteringHashGroups(String cacheName, Configuration configuration) { if ( configuration.clustering().hash().groups().enabled() ) { return configuration; } LOG.clusteringHashGroupsMustBeEnabled( cacheName ); ConfigurationBuilder builder = new ConfigurationBuilder().read( co...
python
def boundary(self): """ Get or set the boundary module. Available boundary modules are: - ``'none'`` (default) - ``'open'`` - ``'periodic'`` - ``'shear'`` Check the online documentation for a full description of each of the modules. """...
java
public float getFloat(String key, float def) { Object tmp = objectMap.get(key); return tmp != null && tmp instanceof Number ? ((Number) tmp) .floatValue() : def; }
python
def add_rule(name, localport, protocol='tcp', action='allow', dir='in', remoteip='any'): ''' .. versionadded:: 2015.5.0 Add a new inbound or outbound rule to the firewall policy Args: name (str): The name of the rule. Must be unique and cannot be "all". Required. ...
java
public void setSupportedCharacterSets(java.util.Collection<CharacterSet> supportedCharacterSets) { if (supportedCharacterSets == null) { this.supportedCharacterSets = null; return; } this.supportedCharacterSets = new java.util.ArrayList<CharacterSet>(supportedCharacterSe...
java
public KeyArea setupKey(int iKeyArea) { KeyArea keyArea = null; if (iKeyArea == 0) { keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY); keyArea.addKeyField(ID, DBConstants.ASCENDING); } if (iKeyArea == 1) { keyArea = this.makeInd...
java
public static void createRemoteDurableSubscription( MessageProcessor MP, ConsumerDispatcherState subState, SIBUuid8 remoteMEUuid, SIBUuid12 destinationID) throws SIDurableSubscriptionAlreadyExistsException, SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntr...
python
def namedb_create_token_genesis(con, initial_account_balances, genesis_block_history): """ Create the initial account balances. All accounts will be locked, and will have been created at the genesis date for Blockstack (i.e. FIRST_BLOCK_MAINNET) The genesis block has multiple "stages" that encode t...
java
public ServiceFuture<AzureFirewallInner> createOrUpdateAsync(String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters, final ServiceCallback<AzureFirewallInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, azureFirewallNa...
python
def callback(newstate): """Callback from modem, process based on new state""" print('callback: ', newstate) if newstate == modem.STATE_RING: if state == modem.STATE_IDLE: att = {"cid_time": modem.get_cidtime, "cid_number": modem.get_cidnumber, "cid_n...
java
public void init() { // determine the depth to which we can safely split the tree byte sizedepth = (byte)(Math.log10(maxsize) / Math.log10(2)); byte depth = (byte)Math.min(sizedepth, hashdepth); root = initHelper(fullRange.left, fullRange.right, (byte)0, depth); size = (long...
java
public final List<SIDestinationAddress> getForwardRoutingPath() { List<String> fNames = (List<String>) getHdr2().getField(JsHdr2Access.FORWARDROUTINGPATH_DESTINATIONNAME); List<byte[]> fMEs = (List<byte[]>) getHdr2().getField(JsHdr2Access.FORWARDROUTINGPATH_MEID); byte[] fLos = (byte[]) getHdr2(...
java
protected String setEncoding(String content, String encoding) { if (content.toLowerCase().indexOf("<?xml") == -1) { return content; } else { // XML information present, replace encoding // set the encoding only if it does not exist String xmlTag = content...
java
public static <T extends Comparable<?>> DatePath<T> datePath(Class<? extends T> type, Path<?> parent, String property) { return new DatePath<T>(type, PathMetadataFactory.forProperty(parent, property)); }