language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public Collection<HFCAIdentity> getHFCAIdentities(User registrar) throws IdentityException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } logger.debug(format("identity url: %s, registrar: %s", url, re...
python
def delete_connection(self, name): """ Close the named connection. The API returns a 204 on success, in which case this method returns True, otherwise the error is raised. :param string name: The name of the connection to delete. :returns bool: True on success. "...
java
public static String printString(CharSequence text) { if (text == null) { return "null.string"; } if (text.length() == 0) { return "\"\""; } StringBuilder builder = new StringBuilder(text.length() + 2); try { ...
java
public final static int itosReverse(int i, int index, char[] buf) { assert (i >= 0); int q, r; int posChar = index; // Generate two digits per iteration while (i >= 65536) { q = i / 100; // really: r = i - (q * 100); r = i - ((q << 6) + (q << 5) + (q << 2)); i = q; buf[posChar++] = DigitOnes[r...
java
public List<Post> selectModifiedPosts(final Post.Type type, final long startTimestamp, final long startId, final int limit, final boolean withResolve) throw...
python
def addPointVectors(self, vectors, name): """ Add a point vector field to the actor's polydata assigning it a name. """ poly = self.polydata(False) if len(vectors) != poly.GetNumberOfPoints(): colors.printc('~times addPointVectors Error: Number of vectors != nr. of po...
python
def delete_comment(self, comment_id): """Deletes a ``Comment``. arg: comment_id (osid.id.Id): the ``Id`` of the ``Comment`` to remove raise: NotFound - ``comment_id`` not found raise: NullArgument - ``comment_id`` is ``null`` raise: OperationFailed - unable...
java
public SIMPRemoteQueuePointControllable getRemoteQueuePointControlByID(String id) throws SIMPInvalidRuntimeIDException, SIMPControllableNotFoundException, SIMPException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getRemoteQueuePointControlByI...
python
def namedtuple_asdict(obj): """ Serializing a nested namedtuple into a Python dict """ if obj is None: return obj if hasattr(obj, "_asdict"): # detect namedtuple return OrderedDict(zip(obj._fields, (namedtuple_asdict(item) for item in obj...
python
def _add_encoded(self, encoded): """Returns E(a + b), given self=E(a) and b. Args: encoded (EncodedNumber): an :class:`EncodedNumber` to be added to `self`. Returns: EncryptedNumber: E(a + b), calculated by encrypting b and taking the product of E(a)...
python
def run(cmd, output_fpath=None, input_fpath=None, checks=None, stdout_to_outputfile=True, stdout_tx=True, reuse=False, env_vars=None): """Run the provided command, logging details and checking for errors. """ if output_fpath and reuse: if verify_file(output_fpath, silent=True): i...
python
def get_interface_detail_output_interface_mtu(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") get_interface_detail = ET.Element("get_interface_detail") config = get_interface_detail output = ET.SubElement(get_interface_detail, "output") i...
java
synchronized Collection<ProbeImpl> removeProbesByListener(ProbeListener listener) { Set<ProbeImpl> listenerProbes = probesByListener.remove(listener); if (listenerProbes == null) { listenerProbes = Collections.emptySet(); } return listenerProbes; }
java
@ObjectiveCName("findPeersWithQuery:") public Command<List<PeerSearchEntity>> findPeers(String query) { return callback -> modules.getSearchModule().findPeers(query) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
python
def observe_multi(self, keys, master_only=False): """Multi-variant of :meth:`observe`""" return _Base.observe_multi(self, keys, master_only=master_only)
python
def action_filter(method_name, *args, **kwargs): """ Creates an effect that will call the action's method with the current value and specified arguments and keywords. @param method_name: the name of method belonging to the action. @type method_name: str """ def action_filter(value, context,...
java
public IAtom configure(IAtom atom) { IIsotope isotope; if (atom.getMassNumber() == null) return atom; else isotope = getIsotope(atom.getSymbol(), atom.getMassNumber()); if (isotope == null) throw new IllegalArgumentException("Cannot configure an unreco...
java
protected QualifiedName computeFullyQualifiedName(EObject obj) { QualifiedName qualifiedNameFromDispatcher = qualifiedName.invoke(obj); if (qualifiedNameFromDispatcher!=null) return qualifiedNameFromDispatcher; return computeFullyQualifiedNameFromNameAttribute(obj); }
java
public static streamidentifier[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ streamidentifier obj = new streamidentifier(); options option = new options(); option.set_filter(filter); streamidentifier[] response = (streamidentifier[]) obj.getfiltered(service, option); return res...
java
public static <K extends Kernel2D> SteerableKernel<K> gaussian(Class<K> kernelType, int orderX, int orderY, double sigma, int radius) { if( orderX < 0 || orderX > 4 ) throw new IllegalArgumentException("derivX must be from 0 to 4 inclusive."); if( orderY < 0 || orderY > 4 ) throw new IllegalArgumentException(...
java
public void getDomainPatches(final AsyncCallback<List<Patches>> callback) { final List<Patches> patches = new ArrayList<>(); final List<Function<List<Patches>>> functions = new ArrayList<>(); for (String host : hostStore.getHostNames()) { functions.add(new ReadPatches(host)); ...
python
def html(text, extensions=0, render_flags=0): """ Convert markdown text to HTML. ``extensions`` can be a list or tuple of extensions (e.g. ``('fenced-code', 'footnotes', 'strikethrough')``) or an integer (e.g. ``EXT_FENCED_CODE | EXT_FOOTNOTES | EXT_STRIKETHROUGH``). ``render_flags`` can be a ...
java
public static List<Pair<Double,Integer>> sortCandidates(INDArray x,INDArray X, List<Integer> candidates, String similarityFunction) { int prevIdx = -1; List<Pair<Double,Integer>> ret =...
java
public char[] toCharArray() { Entity e = root; char[] chrs = new char[size()]; int off = 0; while (e.next != null) { e = e.next; System.arraycopy(e.data, 0, chrs, off, e.data.length); off += e.data.length; } System.arraycopy(buffer, 0, chrs, off, pos); return chrs; }
java
@Nullable public static String intern(@CheckForNull String s) { return s==null ? s : s.intern(); }
python
def _identifyBranches(self): """ A helper function for determining all of the branches in the tree. This should be called after the tree has been fully constructed and its nodes and edges are populated. """ if self.debug: sys.stdout.write("Identifying branche...
python
def to_dict(self): """ Get a dictionary representation of :class:`InstanceResource` """ self_dict = {} for key, value in six.iteritems(self.__dict__): if self.allowed_params and key in self.allowed_params: self_dict[key] = value return self_dic...
python
def assert_xml_equal(first, second, check_tags_order=False): """ Asserts that two xml documents are equal. :param first: first etree object or xml string :param second: second etree object or xml string :param check_tags_order: if False, the order of children is ignored :return: raises Assertion...
java
public void write(IoBuffer buffer) { // FLV buffer.put(signature); // version buffer.put(version); // flags buffer.put((byte) (FLV_HEADER_FLAG_HAS_AUDIO * (flagAudio ? 1 : 0) + FLV_HEADER_FLAG_HAS_VIDEO * (flagVideo ? 1 : 0))); // data offset buffer.putInt...
java
public long getMEArrivalTimestamp() throws SIMPControllableNotFoundException, SIMPException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getMEArrivalTimestamp"); long timestamp = getJsMessage().getCurrentMEArrivalTimestamp(); if (TraceComponent.isAnyTrac...
java
@SuppressWarnings("unchecked") private ApiAdapter<A> nullSafeApiAdapter(ApiAdapter<A> apiAdapter) { if (apiAdapter != null) { return apiAdapter; } return (ApiAdapter<A>) NullApiAdapter.INSTANCE; }
java
public static boolean isEnglish(char c){ //大部分字符在这个范围 if(c > 'z' && c < 'A'){ return false; } if(c < 'A'){ return false; } if(c > 'Z' && c < 'a'){ return false; } if(c > 'Z' && c < 'a'){ return false; ...
java
public int addIfNew(int id, Object obj) { int result; result = indexOf(id, obj); if (result == -1) { result = add(id, obj); } return result; }
java
IntTreePMap<V> withKeysChangedAbove(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot( root.changeKeysAbove(key, delta) ); }
java
public void ensureParameters() { // overwrite already set values with values from query String if ((m_queryParameters != null) && !m_queryParameters.isEmpty()) { for (Map.Entry<String, String[]> entry : m_queryParameters.entrySet()) { if (!entry.getKey().equals(CommonParams....
python
def _rgba(r, g, b, a, **kwargs): """ Converts an rgba(red, green, blue, alpha) quadruplet into a color. """ return ColorValue((float(r), float(g), float(b), float(a)))
python
def to_geopoint(self): """ Returns the geoJSON compliant representation of this location :returns: a ``pyowm.utils.geo.Point`` instance """ if self._lon is None or self._lat is None: return None return geo.Point(self._lon, self._lat)
java
public void setEditorMode(EditorMode editorMode) { if (editorMode != m_editorMode) { EditorMode oldEditorMode = m_editorMode; m_editorMode = editorMode; m_controller.setEditorModeInSession(m_editorMode); if (oldEditorMode == EditorMode.compareLocales) { ...
java
public static ByteBuffer newDirectByteBuffer(long addr, int size, Object att) { dbbCC.setAccessible(true); Object b = null; try { b = dbbCC.newInstance(new Long(addr), new Integer(size), att); return ByteBuffer.class.cast(b); } catch(Exception e) { ...
java
public static PriorityAttribute createPriorityAttribute(long priority) throws IllegalArgumentException { PriorityAttribute attribute = new PriorityAttribute(); attribute.setPriority(priority); return attribute; }
python
def query_feature_values( self, column, feature, distinct=True, contig=None, strand=None): """ Run a SQL query against the sqlite3 database, filtered only on the feature type. """ query = """ SELE...
java
public static ExpectedCondition<List<WebElement>> numberOfElementsToBeMoreThan(final By locator, final Integer number) { return new ExpectedCondition<List<WebElement>>() { private Integer currentNumber = 0; @Override ...
java
private String getDebugLog(final Object[] args) { final StringBuilder sb = new StringBuilder(name); sb.append('('); int i = 0; for (final Object param : args) { if (i > 0) { sb.append(','); } if (param == null) { sb.ap...
java
public void setUnmappedAttributes(java.util.Collection<UnmappedAttribute> unmappedAttributes) { if (unmappedAttributes == null) { this.unmappedAttributes = null; return; } this.unmappedAttributes = new java.util.ArrayList<UnmappedAttribute>(unmappedAttributes); }
java
@Action( semantics = SemanticsOf.SAFE ) @HomePage public FullCalendar2WicketToDoAppDashboard lookup() { return container.newViewModelInstance(FullCalendar2WicketToDoAppDashboard.class, ID); }
java
public void marshall(CreateSnapshotRequest createSnapshotRequest, ProtocolMarshaller protocolMarshaller) { if (createSnapshotRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createSnapshotRe...
python
def enable_data_link(self, instance, link): """ Enables a data link. :param str instance: A Yamcs instance name. :param str link: The name of the data link. """ req = rest_pb2.EditLinkRequest() req.state = 'enabled' url = '/links/{}/{}'.format(instance, l...
python
def load_from_stream(self, stream, container, **kwargs): """ Load config from given stream 'stream'. :param stream: Config file or file-like object :param container: callble to make a container object later :param kwargs: optional keyword parameters to be sanitized :: dict ...
java
public CompletableFuture<CompletedCheckpoint> triggerSavepoint( final long timestamp, @Nullable final String targetLocation) { final CheckpointProperties properties = CheckpointProperties.forSavepoint(); return triggerSavepointInternal(timestamp, properties, false, targetLocation); }
python
def allocate(self): """Initializes libvirt resources.""" network_name = None self._hypervisor = libvirt.open( self.configuration.get('hypervisor', 'lxc:///')) if 'network' in self.configuration: self._network = network.create(self._hypervisor, self.identifier, ...
java
public void setStepAdjustments(java.util.Collection<StepAdjustment> stepAdjustments) { if (stepAdjustments == null) { this.stepAdjustments = null; return; } this.stepAdjustments = new java.util.ArrayList<StepAdjustment>(stepAdjustments); }
java
@SuppressWarnings("unchecked") public EList<IfcPerson> getOfPerson() { return (EList<IfcPerson>) eGet(Ifc2x3tc1Package.Literals.IFC_ADDRESS__OF_PERSON, true); }
python
def read_reference_resource_list(self, ref_sitemap, name='reference'): """Read reference resource list and return the ResourceList object. The name parameter is used just in output messages to say what type of resource list is being read. """ rl = ResourceList() self.log...
python
def modification_time(self): """dfdatetime.DateTimeValues: modification time or None if not available.""" timestamps = self._gzip_file.modification_times if not timestamps: return None return dfdatetime_posix_time.PosixTime(timestamp=timestamps[0])
java
public Decorators<BeansDescriptor> getOrCreateDecorators() { Node node = model.getOrCreate("decorators"); Decorators<BeansDescriptor> decorators = new DecoratorsImpl<BeansDescriptor>(this, "decorators", model, node); return decorators; }
java
public final TextBuilder p(char c) { if (null != __buffer) __append(c); else __caller.p(c); return this; }
python
def DeregisterOutput(cls, output_class): """Deregisters an output class. The output classes are identified based on their NAME attribute. Args: output_class (type): output module class. Raises: KeyError: if output class is not set for the corresponding data type. """ output_class_...
java
public void setDestHighMsgs(long newDestHighMsgs) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setDestHighMsgs", Long.valueOf(newDestHighMsgs)); setDestLimits(newDestHighMsgs, _destLowMsgs); if (TraceComponent.isAnyTracingEnabled() && tc.i...
java
Driver provideHiveDriver() { HiveConf hiveConf = provideHiveConf(); SessionState.start(hiveConf); return new Driver(hiveConf); }
python
def _stage_local_files(local_dir, local_files={}): """ Either ``local_files`` and/or ``context`` should be supplied. Will stage a ``local_files`` dictionary of path:filename pairs where path is relative to ``local_dir`` into a local tmp staging directory. Returns a path to the temporary lo...
java
@Override public void destroy() { final String sourceMethod = "destroy"; //$NON-NLS-1$ boolean isTraceLogging = log.isLoggable(Level.FINER); if (isTraceLogging) { log.entering(AbstractAggregatorImpl.class.getName(), sourceMethod); } shutdown(); super.destroy(); if (isTraceLogging) { l...
java
@Override public int compareTo(DiscriminationGroup o) { if (o == null || !(o instanceof DiscriminationProcessImpl)) { return -1; } return o.hashCode() - hashCode(); }
python
def name(self): """ Return the administrator name for this session. Can be None if the session has not yet been established. .. note:: The administrator name was introduced in SMC version 6.4. Previous versions will show the unique session identifier for ...
java
private boolean processAdditionalCSSGenericProperty(Declaration d, Map<String, CSSProperty> properties, Map<String, Term<?>> values) { if (d.size() == 1) { Term<?> term = d.get(0); if (term instanceof TermIdent) return genericProperty(GenericCSSPropertyProxy.class, (TermId...
python
def _delete_existing(self, project_file, session): """ This will delete existing instances with the same extension """ # remove existing grid if exists existing_elev = session.query(RasterMapFile).\ filter(RasterMapFile.projectFile == project...
java
public Set<String> variants(String identity) throws IllegalArgumentException { Config config = configurations.get(identity); if (config == null) { throw new IllegalArgumentException("Identity " + identity + " does not exist."); } else { return config.variants(); } }
python
def size_from_name(size, sizes): """Return a size from a list of sizes.""" by_name = [s for s in sizes if s.name == size] if len(by_name) > 1: raise Exception('more than one image named %s exists' % size) return by_name[0]
java
public CreateAppRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
python
def next_departures(bus_number, stop_code, date, time, nb_departure, db_file): """ Getting the 10 next departures How to check with tools database sqlite3 stm.db SELECT "t2"."departure_time" FROM "trips" AS t1 INNER JOIN "stop_times" AS t2 ON ("t1"."trip_id" = "t2"."trip_id") INN...
java
protected Expression instantiate(Object oldInstance, Encoder out) { if (! (oldInstance instanceof EventAdaptor)) return super.instantiate(oldInstance, out); // // An implementation instance is actually constructed at decode time by calling // ControlBean.ensureControl on...
python
def _batched_op_msg( operation, command, docs, check_keys, ack, opts, ctx): """OP_MSG implementation entry point.""" buf = StringIO() # Save space for message length and request id buf.write(_ZERO_64) # responseTo, opCode buf.write(b"\x00\x00\x00\x00\xdd\x07\x00\x00") to_send, leng...
java
public void recompose() throws TransformerException { // Now we make a Vector that is going to hold all of the recomposable elements Vector recomposableElements = new Vector(); // First, we build the global import tree. if (null == m_globalImportList) { Vector importList = new Vector()...
python
def p_namelist(self,t): "namelist : namelist ',' NAME \n | NAME" if len(t)==2: t[0] = [t[1]] elif len(t)==4: t[0] = t[1] + [t[3]] else: raise NotImplementedError('unk_len',len(t)) # pragma: no cover
python
def is_implicit_value (value_string): """ Returns true iff 'value_string' is a value_string of an implicit feature. """ assert isinstance(value_string, basestring) if value_string in __implicit_features: return __implicit_features[value_string] v = value_string.split('-') if v[0] n...
java
public static <S extends Sequence<S>> Alignment<S> rightTrimAlignment(Alignment<S> alignment, AlignmentScoring<S> scoring) { if (scoring instanceof LinearGapAlignmentScoring) return rightTrimAlignment(alignment, (LinearGapAlign...
java
private void forgetTransaction(GlobalTransaction gtx, RpcManager rpcManager, CommandsFactory factory) { TxCompletionNotificationCommand cmd = factory.buildTxCompletionNotificationCommand(xid, gtx); rpcManager.sendToAll(cmd, DeliverOrder.NONE); perCacheTxTable.removeLocalTx(xid); globalTxTable.re...
python
def get_service(service, model_form='models', form_name=''): """ get the service name then load the model :param service: the service name :param model_form: could be 'models' or 'forms' :param form_name: the name of the form is model_form is 'forms' :type service: string ...
python
def str2rsi(key): """ Convert a string of the form 'rlz-XXXX/sid-YYYY/ZZZ' into a triple (XXXX, YYYY, ZZZ) """ rlzi, sid, imt = key.split('/') return int(rlzi[4:]), int(sid[4:]), imt
java
public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki) throws PaymentProtocolException { return createFromUrl(url, verifyPki, null); }
python
def read(self, want=0): ''' Read method, gets data from internal buffer while releasing :meth:`write` locks when needed. The lock usage means it must ran on a different thread than :meth:`fill`, ie. the main thread, otherwise will deadlock. The combination of both write...
java
ConstructorFunction<Void, RecordFactory> createRecordFactoryConstructor(final SerializationService serializationService) { return notUsedArg -> { switch (mapConfig.getInMemoryFormat()) { case BINARY: return new DataRecordFactory(mapConfig, serializationService, pa...
python
def open_external_console(self, fname, wdir, args, interact, debug, python, python_args, systerm, post_mortem=False): """Open external console""" if systerm: # Running script in an external system terminal try: if CONF.get('main...
python
def reaction_charge(reaction, compound_charge): """Calculate the overall charge for the specified reaction. Args: reaction: :class:`psamm.reaction.Reaction`. compound_charge: a map from each compound to charge values. """ charge_sum = 0.0 for compound, value in reaction.compounds: ...
java
@Override public void storeJawrBundleMapping(Properties bundleMapping) { File bundleMappingFile = new File(tempDirPath, mappingFileName); OutputStream out = null; try { out = new FileOutputStream(bundleMappingFile); bundleMapping.store(out, "Jawr mapping"); } catch (IOException e) { LOGGER.error("Una...
python
def _set_axis_position(self, axes, axis, option): """ Set the position and visibility of the xaxis or yaxis by supplying the axes object, the axis to set, i.e. 'x' or 'y' and an option to specify the position and visibility of the axis. The option may be None, 'bare' or positiona...
java
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.DEVICE_APPEARANCE__DEV_APP: setDevApp(DEV_APP_EDEFAULT); return; case AfplibPackage.DEVICE_APPEARANCE__RESERVED: setReserved(RESERVED_EDEFAULT); return; } super.eUnset(featureID); }
java
public void marshall(DescribeProvisionedProductRequest describeProvisionedProductRequest, ProtocolMarshaller protocolMarshaller) { if (describeProvisionedProductRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocol...
java
private void executeLocal(String serviceName, Object event, EventRegistration registration, int orderKey) { if (!nodeEngine.isRunning()) { return; } Registration reg = (Registration) registration; try { if (reg.getListener() != null) { eventExecut...
python
def get_html_lang_tags(index_page): """ Return `languages` stored in ``<meta>`` tags. ``<meta http-equiv="Content-language" content="cs">`` -> ``cs`` Args: index_page (str): HTML content of the page you wish to analyze. Returns: list: List of :class:`.SourceString` objects. ""...
java
private void removeUnloadableKeys(Collection<Data> keys) { if (keys == null || keys.isEmpty()) { return; } keys.removeIf(key -> !mapDataStore.loadable(key)); }
python
def attack_class(self, x, target_y): """ Run the attack on a specific target class. :param x: tf Tensor. The input example. :param target_y: tf Tensor. The attacker's desired target class. Returns: A targeted adversarial example, intended to be classified as the target class. """ adv =...
java
public String getRequestName(JpaMethod jpaMethod, Method javaMethod, Object[] args, Query query) { // CHECKSTYLE:ON switch (jpaMethod) { case CREATE_QUERY: case CREATE_NAMED_QUERY: case CREATE_NATIVE_QUERY: case CREATE_STORED_PROCEDURE_QUERY: case CREATE_NAMED_STORED_PROCEDURE_QUERY: return getQuery...
python
def change_authentication(self, client_id=None, client_secret=None, access_token=None, refresh_token=None): """Change the current authentication.""" # TODO: Add error checking so you cannot change client_id and retain # access_token. Because that doesn't make sense....
python
def load(self, df, centerings): """ A moderately mind-bendy meta-method which abstracts the internals of individual projections' load procedures. Parameters ---------- proj : geoplot.crs object instance A disguised reference to ``self``. df : GeoDataFrame ...
python
def simplicial_set_embedding( data, graph, n_components, initial_alpha, a, b, gamma, negative_sample_rate, n_epochs, init, random_state, metric, metric_kwds, verbose, ): """Perform a fuzzy simplicial set embedding, using a specified initialisation method a...
python
def kreplace(self, key, value): """Replaces the given key/value for each element. If the key is not present silently passes. """ for item in self: if key in item: item[key] = value
java
public void printQuery(final Query query) { if (query != null) { final String[] cols = query.getColumns(); final int rows = query.getRowCount(); System.out.println("[Query:" + query.getName() + "]"); for (int i = 0; i < cols.length; i++) { if (i > 0) System.out.print(", "); System.out.print(col...
python
def plot_mixture(mixture, i=0, j=1, center_style=dict(s=0.15), cmap='nipy_spectral', cutoff=0.0, ellipse_style=dict(alpha=0.3), solid_edge=True, visualize_weights=False): '''Plot the (Gaussian) components of the ``mixture`` density as one-sigma ellipses in the ``(i,j)`` plane. ...
java
public void setPresetTransformer(int transformerId){ for(Transformer t : Transformer.values()){ if(t.ordinal() == transformerId){ setPresetTransformer(t); break; } } }
python
def copy(self): """ Deepcopy the parameter (with a new uniqueid). All other tags will remain the same... so some other tag should be changed before attaching back to a ParameterSet or Bundle. :return: the copied :class:`Parameter` object """ s = self.to_json() ...