language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
@Override public synchronized Object getAttribute(String name) { if (disconnected) return disconnectData.attributes.get(name); return req.getAttribute(name); }
java
public ServiceFuture<ServerDnsAliasInner> getAsync(String resourceGroupName, String serverName, String dnsAliasName, final ServiceCallback<ServerDnsAliasInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serverName, dnsAliasName), serviceCallback); }
java
public CheckableField<T> addCheckableField(int viewResId, BooleanExtractor<T> isCheckedExtractor) { CheckableField<T> field = new CheckableField<T>(viewResId, isCheckedExtractor); mCheckableFields.add(field); return field; }
java
public static String toSeparatedString(List<?> values, String separator) { return toSeparatedString(values, separator, null); }
python
def _validate_xor_args(self, p): """ Raises ValueError if 2 arguments are not passed to an XOR """ if len(p[1]) != 2: raise ValueError('Invalid syntax: XOR only accepts 2 arguments, got {0}: {1}'.format(len(p[1]), p))
python
def next_month(today: datetime=None, tz=None): """ Returns next month begin (inclusive) and end (exclusive). :param today: Some date in the month (defaults current datetime) :param tz: Timezone (defaults pytz UTC) :return: begin (inclusive), end (exclusive) """ if today is None: toda...
java
@SuppressWarnings("all") public JSONObject toJSONObject() { try { return Reflection.toType(this, JSONObject.class); } catch (Throwable e) { throw new RuntimeException("The output cannot be converted to jsonObject!", e); } }
java
private int toModifierFlags (int mods) { return modifierFlags((mods & GLFW_MOD_ALT) != 0, (mods & GLFW_MOD_CONTROL) != 0, (mods & GLFW_MOD_SUPER) != 0, (mods & GLFW_MOD_SHIFT) != 0); }
java
public void runCleanupOperation() { final SQLiteDatabase db = getDb(); if (db == null || !db.isOpen()) { if (Configuration.getInstance().isDebugMode()) { Log.d(IMapView.LOGTAG, "Finished init thread, aborted due to null database reference"); } return; ...
java
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "in") public JAXBElement<InType> createIn(InType value) { return new JAXBElement<InType>(_In_QNAME, InType.class, null, value); }
java
protected String parseObjectToString(Object object, Locale locale, Arguments args) { final String string = String.valueOf(object); if (args.has(LOWERCASE_FLAG)) { return string.toLowerCase(locale); } if (args.has(UPPERCASE_FLAG)) { return strin...
python
def patch_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): """ partially update the specified HorizontalPodAutoscaler This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread =...
java
@Override public final String getFor(final Class<?> pClass, final String pThingName) { if ("list".equals(pThingName)) { if (pClass == PaymentFrom.class || pClass == PaymentTo.class || pClass == PrepaymentFrom.class || pClass == PrepaymentTo.class || pClass == SubaccountLine.class || pClass...
java
public java.util.List<InstanceInfo> getInstanceInfos() { if (instanceInfos == null) { instanceInfos = new com.amazonaws.internal.SdkInternalList<InstanceInfo>(); } return instanceInfos; }
java
public void updateStreamDestinationPushUrl(UpdateStreamDestinationPushUrlRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty."); checkStringNotEmpty(request.getApp(), "App should NOT be empty...
python
def _destroy_stream_state(self, exc): """ Destroy all state which does not make sense to keep after a disconnect (without stream management). """ self._logger.debug("destroying stream state (exc=%r)", exc) self._iq_response_map.close_all(exc) for task in self._iq_...
java
@Override public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException { try { ChargingStation chargingStation = repository.findOne(chargingStationId); if (chargingStation != null && chargingStation...
python
def get_region_from_metadata(): ''' Try to get region from instance identity document and cache it .. versionadded:: 2015.5.6 ''' global __Location__ if __Location__ == 'do-not-get-from-metadata': log.debug('Previously failed to get AWS region from metadata. Not trying again.') ...
python
def _create_data_files_directory(symlink=False): """Install data_files in the /etc directory.""" current_directory = os.path.abspath(os.path.dirname(__file__)) etc_kytos = os.path.join(BASE_ENV, ETC_KYTOS) if not os.path.exists(etc_kytos): os.makedirs(etc_kytos) sr...
python
def update_account_api_key(self, account_id, api_key, body, **kwargs): # noqa: E501 """Update API key details. # noqa: E501 An endpoint for updating API key details. **Example usage:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{accountID}/api-keys/{apiKey} -d '{\"name\": \"TestAp...
python
def getitem(self, index, context=None): """Return the inference of a subscript. This is basically looking up the method in the metaclass and calling it. :returns: The inferred value of a subscript to this class. :rtype: NodeNG :raises AstroidTypeError: If this class does not d...
java
public void addDefaultValueInfo(MemberDoc member, Content annotationDocTree) { if (((AnnotationTypeElementDoc) member).defaultValue() != null) { Content dt = HtmlTree.DT(writer.getResource("doclet.Default")); Content dl = HtmlTree.DL(dt); Content dd = HtmlTree.DD(new StringCo...
java
public Set<Explanation<OWLAxiom>> getExplanations(OWLAxiom entailment, int limit) throws ExplanationException { OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); SyntacticLocalityModuleExtractor extractor = new SyntacticLocalityModuleExtractor(manager, (OWLOntology) null, workingAxioms...
java
@Override public void log(int level, String message) { switch (level) { case LogChute.WARN_ID: log.warn(message); break; case LogChute.INFO_ID: log.info(message); break; case LogChute.TRACE_ID: log.trace(message); ...
java
public static <T extends Comparable<T>> RelationalOperator<T> greaterThanAndLessThanEqualTo(T lowerBound, T upperBound) { return ComposableRelationalOperator.compose(greaterThan(lowerBound), LogicalOperator.AND, lessThanEqualTo(upperBound)); }
java
public static byte[] computeHash(String passwd) throws NoSuchAlgorithmException { java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-1"); md.reset(); md.update(passwd.getBytes()); return md.digest(); }
java
public String getNewSigName() { AcroFields af = writer.getAcroFields(); String name = "Signature"; int step = 0; boolean found = false; while (!found) { ++step; String n1 = name + step; if (af.getFieldItem(n1) != null) { continu...
java
public void clear() { // TODO not currently used since EventImpl itself doesn't have a clear this.parentMap = null; if (null != this.values) { for (int i = 0; i < this.values.length; i++) { this.values[i] = null; } this.values = null; }...
python
def progress(self, *msg): """ Prints a progress message """ label = colors.purple("Progress") self._msg(label, *msg)
python
def unarchive(filename,output_dir='.'): '''unpacks the given archive into ``output_dir``''' if not os.path.exists(output_dir): os.makedirs(output_dir) for archive in archive_formats: if filename.endswith(archive_formats[archive]['suffix']): return subprocess.call(archive_formats[...
java
private static void handleSlotFilled(HandleSlotFilledTask hsfTask) { Key slotKey = hsfTask.getSlotKey(); Slot slot = querySlotOrAbandonTask(slotKey, true); List<Barrier> waitingList = slot.getWaitingOnMeInflated(); if (null == waitingList) { throw new RuntimeException("Internal logic error: " + sl...
java
@Programmatic public DocumentTemplate findByTypeAndAtPathAndDate(final DocumentType documentType, final String atPath, final LocalDate date) { return repositoryService.firstMatch( new QueryDefault<>(DocumentTemplate.class, "findByTypeAndAtPathAndDate", ...
python
def _text(username, password, **kwargs): ''' The text file function can authenticate plaintext and digest methods that are available in the :py:func:`hashutil.digest <salt.modules.hashutil.digest>` function. ''' filename = kwargs['filename'] hashtype = kwargs['hashtype'] field_separator...
python
def pop(self, i=None): """remove the ith term from the term list Parameters --------- i : int, optional term to remove from term list by default the last term is popped. Returns ------- term : Term """ if i == None: ...
python
def set_schedule_enabled(self, state): """ :param state: a boolean True (on) or False (off) :return: nothing """ desired_state = {"schedule_enabled": state} response = self.api_interface.set_device_state(self, { "desired_state": desired_state }) ...
java
@CallMethod(pattern = "install/files/file") public void addClassPathFile( @CallParam(pattern = "install/files/file", attributeName = "name") final String _classPathFile, @CallParam(pattern = "install/files/file", attributeName = "type") final String _type, ...
java
private List<Entity> runQuery(Query query) throws DatastoreException { RunQueryRequest.Builder request = RunQueryRequest.newBuilder(); request.setQuery(query); RunQueryResponse response = datastore.runQuery(request.build()); if (response.getBatch().getMoreResults() == QueryResultBatch.MoreResultsType.N...
python
def request(self, *args, **kwargs): """Issue a request.""" headers = self.headers.copy() if self.cookiestring: headers['Cookie'] = self.cookiestring headers.update(kwargs.get('headers', {})) kwargs['headers'] = headers r = request(*args, **kwargs) sel...
python
def get_label_based_random_walk_matrix(adjacency_matrix, labelled_nodes, label_absorption_probability): """ Returns the label-absorbing random walk transition probability matrix. Input: - A: A sparse matrix that contains the adjacency matrix of the graph. Output: - W: A sparse matrix that contains th...
java
@VisibleForTesting @Nullable public Instance getInstance(ResourceID resourceId) { for (Instance instance : allInstances) { if (Objects.equals(resourceId, instance.getTaskManagerID())) { return instance; } } return null; }
java
private Map<String, ProvisioningFeatureDefinition> getProductExtFeatureDefinitions(String productName) { readProductExtFeatureLocations(); Map<String, ProvisioningFeatureDefinition> features = null; BundleRepositoryHolder featureData = BundleRepositoryRegistry.getRepositoryHolder(productName); ...
java
public static void rescopeNamesToNewScope(Expression newScope, List<String> names, Expression e) { if (e instanceof NodeWithArguments) { NodeWithArguments<?> arguments = (NodeWithArguments) e; for (Expression argument : arguments.getArguments()) { rescopeNamesToNewScope(...
java
Node tryOptimizeObjectPattern(Node pattern) { checkArgument(pattern.isObjectPattern(), pattern); if (pattern.hasChildren() && pattern.getLastChild().isRest()) { // don't remove any elements in `const {f: [], ...rest} = obj` because that affects what's // assigned to `rest`. only the last element ca...
python
def pages(self): """Get pages, reloading the site if needed.""" rev = self.db.get('site:rev') if int(rev) != self.revision: self.reload_site() return self._pages
python
def get_users(self, usernames): """Fetch user info for given usernames :param username: The usernames you want metadata for (max. 50) """ if self.standard_grant_type is not "authorization_code": raise DeviantartError("Authentication through Authorization Code (Grant Type) ...
java
@Override public TemporalDataModelIF<Long, Long> parseTemporalData(final File f, final String mapIdsPrefix) throws IOException { TemporalDataModelIF<Long, Long> dataset = DataModelFactory.getDefaultTemporalModel(); Map<String, Long> mapUserIds = new HashMap<>(); Map<String, Long> mapItemIds...
java
protected Object doInvocation(TransactionLogger transactionLogger, MethodInvocation invocation, TransactionMetadata transactionMetadata, Object currentTransaction) throws Throwable { Object result = null; try { transactionLogger.log("invocation started", transactionLogger); ...
java
private void scanAttributeForAnnotation(InputStream is) throws IOException { int nameIndex = readShort(is); // String name = _cp.getUtf8(nameIndex).getValue(); int length = readInt(is); if (! isNameAnnotation(nameIndex)) { is.skip(length); return; } int count = ...
java
public static base_responses delete(nitro_service client, dnssoarec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnssoarec deleteresources[] = new dnssoarec[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new d...
python
def config(self, decimals_as_strings=True, ts_as_dates=False, sequencing=False, **kwargs): """ Send configuration to websocket server :param decimals_as_strings: bool, turn on/off decimals as strings :param ts_as_dates: bool, decide to request timestamps as dates instead ...
java
protected ServletContext initServletContext(Document webXmlDoc, String baseDirPath, String tmpDirPath, String springConfigFiles, String servletAPIversion) { // Parse the context parameters MockServletContext servletContext = new MockServletContext( servletAPIversion, baseDirPath, tmpDirPath); Map<Strin...
java
@SuppressWarnings("unchecked") private void concatSqlText(Node node, SqlInfo sqlInfo) { // 获取所有子节点,并分别将其使用StringBuilder拼接起来 List<Node> nodes = node.selectNodes(ZealotConst.ATTR_CHILD); for (Node n: nodes) { if (ZealotConst.NODETYPE_TEXT.equals(n.getNodeTypeName())) { ...
java
public org.tensorflow.framework.CollectionDef.NodeListOrBuilder getNodeListOrBuilder() { if (kindCase_ == 1) { return (org.tensorflow.framework.CollectionDef.NodeList) kind_; } return org.tensorflow.framework.CollectionDef.NodeList.getDefaultInstance(); }
java
public int upgradeProgress(String[] argv, int idx) throws IOException { DistributedFileSystem dfs = getDFS(); if (dfs == null) { System.out.println("FileSystem is " + getFS().getUri()); return -1; } if (idx != argv.length - 1) { printUsage("-upgradeProgress"); return -1; } ...
java
public String getFullMethod(ClassAnnotation primaryClass) { if (fullMethod == null) { if (Const.CONSTRUCTOR_NAME.equals(methodName)) { fullMethod = "new " + stripJavaLang(className) + getSignatureInClass(primaryClass); } else { fullMethod = stripJavaLang(c...
python
def _initialize_id(self): """Initializes the id of the instance.""" self.id = str(self.db.incr(self._key['id']))
python
def _sha1_for_file(filename): """Return sha1 for contents of filename.""" with open(filename, "rb") as fileobj: contents = fileobj.read() return hashlib.sha1(contents).hexdigest()
java
public List<Integer> getWars(String datasource, String ifNoneMatch, Integer maxWarId) throws ApiException { ApiResponse<List<Integer>> resp = getWarsWithHttpInfo(datasource, ifNoneMatch, maxWarId); return resp.getData(); }
java
public Observable<Void> purgeDeletedStorageAccountAsync(String vaultBaseUrl, String storageAccountName) { return purgeDeletedStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<...
java
public final void pushExpressionState(int cn, int en, PrefixResolver nc) { m_currentNodes.push(cn); m_currentExpressionNodes.push(cn); m_prefixResolvers.push(nc); }
java
public UpdateCrawlerRequest withClassifiers(String... classifiers) { if (this.classifiers == null) { setClassifiers(new java.util.ArrayList<String>(classifiers.length)); } for (String ele : classifiers) { this.classifiers.add(ele); } return this; }
java
public StartBuildRequest withSecondarySourcesVersionOverride(ProjectSourceVersion... secondarySourcesVersionOverride) { if (this.secondarySourcesVersionOverride == null) { setSecondarySourcesVersionOverride(new java.util.ArrayList<ProjectSourceVersion>(secondarySourcesVersionOverride.length)); ...
java
protected Driver parseDriver(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { String driverClass = null; String dataSourceClass = null; String xaDataSourceClass = null; //attributes reading String name = null; Integer majorVersion = n...
java
@Override protected void unserializeFrom(RawDataBuffer in) { super.unserializeFrom(in); int idCount = in.readInt(); for (int i = 0; i < idCount; i++) { String msgID = in.readUTF(); addDeliveredMessageID(msgID); } }
java
public boolean manage(final DeliveryReceipt result) { if (logger.isDebugEnabled()) { logger.debug("Invoking manage with parameter DeliveryReceipt method" + " - smid : " + result.getSmid() + " - msmisdn : " + result.getMsisdn() + " - date : " + result.getDate() + ...
python
def is_valid_hostname(hostname): '''Return True if hostname is valid, otherwise False.''' if not isinstance(hostname, str): raise TypeError('hostname must be a string') # strip exactly one dot from the right, if present if hostname and hostname[-1] == ".": hostname = hostname[:-1] if...
java
public static Chain getRepresentativeAtomsOnly(Chain chain){ Chain newChain = new ChainImpl(); newChain.setId(chain.getId()); newChain.setName(chain.getName()); newChain.setEntityInfo(chain.getEntityInfo()); newChain.setSwissprotId(chain.getSwissprotId()); List<Group> groups = chain.getAtomGroups(); gr...
java
protected void removeItem(int item, int bin) throws ContradictionException { updateLoads(item, bin); if (decoKPSimple != null) { decoKPSimple.postRemoveItem(item, bin); } }
python
def packer_gzip(params, ctxt, scope, stream, coord): """``PackerGZip`` - implements both unpacking and packing. Can be used as the ``packer`` for a field. When packing, concats the build output of all params and gzip-compresses the result. When unpacking, concats the build output of all params and gzip-...
python
def get_format(self, name): """ Returns the closest format or closest parent format associated to given name. :param name: Format name. :type name: unicode :return: Format. :rtype: QTextCharFormat """ formats = [format for format in self.list_formats(sel...
python
def find_next_word_ending(self, include_current_position=False, count=1, WORD=False): """ Return an index relative to the cursor position pointing to the end of the next word. Return `None` if nothing was found. """ if count < 0: return self.find_previous_word_ending(...
python
def on_close_clicked(self, event, state_machine_m, result, force=False): """Triggered when the close button of a state machine tab is clicked Closes state machine if it is saved. Otherwise gives the user the option to 'Close without Saving' or to 'Cancel the Close Operation' :param sta...
python
def finalize_configs(is_training): """ Run some sanity checks, and populate some configs from others """ _C.freeze(False) # populate new keys now _C.DATA.NUM_CLASS = _C.DATA.NUM_CATEGORY + 1 # +1 background _C.DATA.BASEDIR = os.path.expanduser(_C.DATA.BASEDIR) if isinstance(_C.DATA.VAL, si...
java
public static long count(nitro_service service, String monitorname) throws Exception{ lbmonitor_metric_binding obj = new lbmonitor_metric_binding(); obj.set_monitorname(monitorname); options option = new options(); option.set_count(true); lbmonitor_metric_binding response[] = (lbmonitor_metric_binding[]) obj....
python
def _start_pub_proc(self, publisher_type, publisher_opts, pub_id): ''' Start the publisher process. ''' log.debug('Starting the publisher process for %s', publisher_type) publisher = NapalmLogsPublisherProc(s...
java
public ApiResponse<ModelApiResponse> tenantInfoWithHttpInfo(ApiRequestAuthSchemeLookupData lookupData) throws ApiException { com.squareup.okhttp.Call call = tenantInfoValidateBeforeCall(lookupData, null, null); Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType(); return apiCl...
java
public void setDiscriminator(String discriminator) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setDiscriminator", discriminator); this.discriminator = discriminator; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "setDis...
python
def _get_edge_sign(im, edge): """Get the polarity of the influence by examining the edge sign.""" edge_data = im[edge[0]][edge[1]] # Handle possible multiple edges between nodes signs = list(set([v['sign'] for v in edge_data.values() if v.get('sign')])) if len(signs...
java
private Entity lookupEntity(String sid) { for (Integer i = 0; i < getEntities().size(); i++) { Entity e = getEntities().get(i); if (e != null && sid.compareTo(EntityContainer.buildId(e.getId())) == 0) { return getEntity(e.getId()); } } return n...
python
def radius_server_host_protocol(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") radius_server = ET.SubElement(config, "radius-server", xmlns="urn:brocade.com:mgmt:brocade-aaa") host = ET.SubElement(radius_server, "host") hostname_key = ET.SubElem...
java
static int majorVersion(final String javaSpecVersion) { final String[] components = javaSpecVersion.split("\\."); final int[] version = new int[components.length]; for (int i = 0; i < components.length; i++) { version[i] = Integer.parseInt(components[i]); } if (versi...
python
def create(self, virtual_host): """Create a Virtual Host. :param str virtual_host: Virtual host name :raises ApiError: Raises if the remote server encountered an error. :raises ApiConnectionError: Raises if there was a connectivity issue. :rtype: dict """ virtu...
java
protected int handleDatagram (DatagramChannel listener, long when) { InetSocketAddress source; _databuf.clear(); try { source = (InetSocketAddress)listener.receive(_databuf); } catch (IOException ioe) { log.warning("Failure receiving datagram.", ioe); ...
python
def installed(cls): """ Used in ``yacms.pages.views.page`` to ensure ``PageMiddleware`` or a subclass has been installed. We cache the result on the ``PageMiddleware._installed`` to only run this once. Short path is to just check for the dotted path to ``PageMiddleware`` ...
python
def del_object(self, obj): """Debug deletes obj of obj[_type] with id of obj['_id']""" if obj['_index'] is None or obj['_index'] == "": raise Exception("Invalid Object") if obj['_id'] is None or obj['_id'] == "": raise Exception("Invalid Object") if obj['_type'] i...
python
def wait_for_tasks_to_complete(batch_service_client, job_ids, timeout): """Returns when all tasks in the specified job reach the Completed state. :param batch_service_client: A Batch service client. :type batch_service_client: `azure.batch.BatchServiceClient` :param str job_id: The id of the job whose ...
python
def empirical_sinkhorn(X_s, X_t, reg, a=None, b=None, metric='sqeuclidean', numIterMax=10000, stopThr=1e-9, verbose=False, log=False, **kwargs): ''' Solve the entropic regularization optimal transport problem and return the OT matrix from empirical data The function solves the following optimization pr...
java
public License getLicense(final DbLicense dbLicense) { final License license = DataModelFactory.createLicense(dbLicense.getName(), dbLicense.getLongName(), dbLicense.getComments(), dbLicense.getRegexp(), dbLicense.getUrl()); if (dbLicense.isApproved() != null) { license.setAppro...
python
def subscribe_condition_fulfilled(self, agreement_id, timeout, callback, args, timeout_callback=None, wait=False): """ Subscribe to the condition fullfilled event. :param agreement_id: id of the agreement, hex str :param timeout: :param call...
python
def determine_tool(filepath, tool_to_get): """ Determine the tool to use for reading/writing. The function uses an internally defined set of mappings between filepaths, regular expresions and readers/writers to work out which tool to use for a given task, given the filepath. It is intended for...
python
def decode(self, data): """ Parses the file, creating a CWRFile from it. It requires a dictionary with two values: - filename, containing the filename - contents, containing the file contents :param data: dictionary with the data to parse :return: a CWRFile inst...
java
protected String buildQueryString(Request request) { MultiMap resolvedParameters = null; if(parameterFactory != null) { resolvedParameters = parameterFactory.getParameters(); } if(hasEntries(resolvedParameters)) resolvedParameters = resolvedParameters...
java
public static void removePrivateDataProvider(String elementName, String namespace) { String key = XmppStringUtils.generateKey(elementName, namespace); privateDataProviders.remove(key); }
python
def moving_average(data, xcol, ycol, width): """Compute the moving average of YCOL'th column of each sample point in DATA. In particular, for each element I in DATA, this function extracts up to WIDTH*2+1 elements, consisting of I itself, WIDTH elements before I, and WIDTH elements after I. It then comput...
java
public <T> CompletableFuture<VersionedMetadata<T>> getData(final String path, Function<byte[], T> fromBytes) { final CompletableFuture<VersionedMetadata<T>> result = new CompletableFuture<>(); try { client.getData().inBackground( callback(event -> { ...
java
public static void setRegistry(Registry registry) { SpectatorContext.registry = registry; if (registry instanceof NoopRegistry) { initStacktrace = null; } else { Exception cause = initStacktrace; Exception e = new IllegalStateException( "called SpectatorContext.setRegistry(" + re...
python
def intersection(self, *sets): """ Returns elements in common between all sets. Order is defined only by the first set. Example: >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3]) >>> print(oset) OrderedSet([1, 2, 3]) ...
java
private <T extends IEntity> IntuitMessage prepareQuery(String query) throws FMSException { IntuitMessage intuitMessage = new IntuitMessage(); RequestElements requestElements = intuitMessage.getRequestElements(); //set the request params Map<String, String> requestParameters = requestEle...
python
def iterator_product(variables: VarType, parent: str = None) -> Iterable[VarMatrix]: """Apply the product operator to a set of variables. This uses the python itertools.product iterator to combine multiple variables such that all possible combinations are generated. This is the default iterator however...
python
def insert(self, data, using_name=True): """Insert one or many records. :param data: dict type data or list of dict :param using_name: if you are using field name in data, please set using_name = True (it's the default), otherwise, False **中文文档** 插入...