language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public void setAlignment(String alignment) { if (ElementTags.ALIGN_CENTER.equalsIgnoreCase(alignment)) { this.alignment = Element.ALIGN_CENTER; return; } if (ElementTags.ALIGN_RIGHT.equalsIgnoreCase(alignment)) { this.alignment = Element.ALIGN_RIGHT; ...
python
def download_data(job, master_ip, inputs, known_snps, bam, hdfs_snps, hdfs_bam): """ Downloads input data files from S3. :type masterIP: MasterAddress """ log.info("Downloading known sites file %s to %s.", known_snps, hdfs_snps) call_conductor(job, master_ip, known_snps, hdfs_snps, memory=inpu...
python
def plt_goea_results(fout_img, goea_results, **kws): """Plot a single page.""" go_sources = [rec.GO for rec in goea_results] go2obj = {rec.GO:rec.goterm for rec in goea_results} gosubdag = GoSubDag(go_sources, go2obj, rcntobj=True) godagplot = GoSubDagPlot(gosubdag, goea_results=goea_results, **kws)...
python
def select_action(self, **kwargs): """Choose an action to perform # Returns Action to take (int) """ setattr(self.inner_policy, self.attr, self.get_current_value()) return self.inner_policy.select_action(**kwargs)
python
def get_password(prompt='Password: ', confirm=False): """ <Purpose> Return the password entered by the user. If 'confirm' is True, the user is asked to enter the previously entered password once again. If they match, the password is returned to the caller. <Arguments> prompt: The text of ...
java
public Sender getResponseSender() { if (blockingHttpExchange != null) { return blockingHttpExchange.getSender(); } if (sender != null) { return sender; } return sender = new AsyncSenderImpl(this); }
java
@Override public List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId, String language) { return delegate.getTasksAssignedAsBusinessAdministrator(userId, language); }
java
public void write(byte[] buffer, int byteOffset, int byteCount) throws IOException { IoBridge.write(fd, buffer, byteOffset, byteCount); // if we are in "rws" mode, attempt to sync file+metadata if (syncMetadata) { fd.sync(); } }
java
public void run() { try { callback.open(); this.request = getLogRequest(true); final HttpResponse response = client.execute(request); parseResponse(response); } catch (LogCallback.DoneException e) { // Signifies we're finished with the log stre...
java
@VisibleForTesting static Optional<Integer> computeEndPosition( Tree methodInvocationTree, CharSequence sourceCode, VisitorState state) { int invocationEnd = state.getEndPosition(methodInvocationTree); if (invocationEnd == -1) { return Optional.empty(); } // Finding a good end position is...
python
def query_all(current_page_num=1): ''' 查询所有未登录用户的访问记录 ToDo: ``None`` ? ''' return TabLog.select().where(TabLog.user_id == 'None').order_by(TabLog.time_out.desc()).paginate( current_page_num, CMS_CFG['list_num'] )
python
def node_to_nodal_planes(node): """ Parses the nodal plane distribution to a PMF """ if not len(node): return None npd_pmf = [] for plane in node.nodes: if not all(plane.attrib[key] for key in plane.attrib): # One plane fails - return None return None ...
java
public boolean generateAndSort(final Iterator<long[]> iterator, final long seed) { // We cache all variables for faster access final int[] d = this.d; final int[] e = new int[3]; cleanUpIfNecessary(); /* We build the XOR'd edge list and compute the degree of each vertex. */ for(int k = 0; k < numEdges; k++...
python
def with_app(f): """Calls function passing app as first argument""" @wraps(f) def decorator(*args, **kwargs): app = create_app() configure_extensions(app) configure_views(app) return f(app=app, *args, **kwargs) return decorator
python
def dump(data, abspath, indent_format=False, float_precision=None, ensure_ascii=True, overwrite=False, enable_verbose=True): """Dump Json serializable object to file. Provides multiple choice to customize the behavior. :param data: Serializable python object. ...
java
public Expression<Calendar> gte(Calendar value) { String valueString = "'" + getCalendarAsString(value) + "'"; return new Expression<Calendar>(this, Operation.gte, valueString); }
python
def login(session): """Login to Voobly.""" if not session.auth.username or not session.auth.password: raise VooblyError('must supply username and password') _LOGGER.info("logging in (no valid cookie found)") session.cookies.clear() try: session.get(session.auth.base_url + LOGIN_PAGE)...
python
def _get(self, key): """ Iterate over all the config dictionaries that have been loaded into the list of configs. If value is found, immediately return it. Otherwise, raise a ConfigKeyNotFoundError with an appropriate message. :param key: The variable to search for in the possible list o...
java
@Override public void processMessage(final WebSocketMessage webSocketData) { setDoTransactionNotifications(true); final SecurityContext securityContext = getWebSocket().getSecurityContext(); try { final String name = webSocketData.getNodeDataStringValue("name"); final String rawData = webSocketD...
java
public final void dump(PrintStream out) { out.println("Token [Code: " + getCode() + "] [Image: " + getImage() + "] [Value: " + getStringValue() + "] [Id: " + getID() + "] [start: " + mInfo.getStartPosition() + "] [end " + mInfo.getE...
python
def minimum_sys_modules(cls, site_libs, modules=None): """Given a set of site-packages paths, return a "clean" sys.modules. When importing site, modules within sys.modules have their __path__'s populated with additional paths as defined by *-nspkg.pth in site-packages, or alternately by distribution me...
java
public static String getFirstSpell(String chinese) { if (StringUtils.isBlank(chinese)) return ""; StringBuffer pybf = new StringBuffer(); char[] arr = chinese.toCharArray(); HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat(); defaultFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE); de...
java
public static Byte[] nullToEmpty(Byte[] array) { if (array == null || array.length == 0) { return EMPTY_BYTE_OBJECT_ARRAY; } return array; }
python
def column_coordinates(self, X): """The column principal coordinates.""" utils.validation.check_is_fitted(self, 'V_') _, _, _, col_names = util.make_labels_and_names(X) if isinstance(X, pd.SparseDataFrame): X = X.to_coo() elif isinstance(X, pd.DataFrame): ...
java
public static void streamOut(OutputStream out, Object object, boolean compressed) throws IOException { if (compressed) { out = new GZIPOutputStream(out); } DroolsObjectOutputStream doos = null; try { doos = new DroolsObjectOutputStream(out); doos.write...
python
def writeFailure(failure, logger=None): """ Write a L{twisted.python.failure.Failure} to the log. This is for situations where you got an unexpected exception and want to log a traceback. For example, if you have C{Deferred} that might error, you'll want to wrap it with a L{eliot.twisted.DeferredCo...
python
def get_siblings(self): """ :returns: A queryset of all the node's siblings, including the node itself. """ qset = get_result_class(self.__class__).objects.filter( depth=self.depth ).order_by( 'path' ) if self.depth > 1: ...
java
@Override public void parse() throws Exception { FileUtils.checkPath(caddFilePath); BufferedReader bufferedReader = FileUtils.newBufferedReader(caddFilePath); List<Long> rawValues = new ArrayList<>(CHUNK_SIZE); List<Long> scaledValues = new ArrayList<>(CHUNK_SIZE); int star...
python
def _add_custom_headers(self, dct): """ Add the Client-ID header required by Cloud Queues """ if self.client_id is None: self.client_id = os.environ.get("CLOUD_QUEUES_ID") if self.client_id: dct["Client-ID"] = self.client_id
python
def path(self, which=None): """Return the path to the current entity. Return the path to base entities of this entity's type if: * ``which`` is ``'base'``, or * ``which`` is ``None`` and instance attribute ``id`` is unset. Return the path to this exact entity if instance attri...
python
def getGenotypes(self,i0=None,i1=None,pos0=None,pos1=None,chrom=None,center=True,unit=True,pos_cum0=None,pos_cum1=None,impute_missing=True): """load genotypes. Optionally the indices for loading subgroups the genotypes for all people can be given in one out of three ways: - 0-based ind...
java
public static String encodeQuery(String query) { if (query == null) { return null; } StringBuilder rebuiltQuery = new StringBuilder(); // Encode parameters to mitigate XSS attacks String[] queryParams = query.split("&"); for (String param : queryParams) { ...
java
public EClass getMIORG() { if (miorgEClass == null) { miorgEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(417); } return miorgEClass; }
java
@Nullable @OverrideOnDemand protected String getLoginName (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope) { return aRequestScope.params ().getAsString (CLogin.REQUEST_ATTR_USERID); }
java
public static List<Integer> asList(final MutableIntTuple t) { if (t == null) { throw new NullPointerException("The tuple may not be null"); } return new AbstractList<Integer>() { @Override public Integer get(int index) ...
python
def unpack_ascii(data): """Unpack ASCII data using string methods`` :param data_pointer: metadata for the ``data_pointer`` attribute for this data stream :type data_pointer: ``ahds.header.Block`` :param definitions: definitions specified in the header :type definitions: ``ahds.header.Block`` ...
python
def _prep_items_from_base(base, in_files, metadata, separators, force_single=False): """Prepare a set of configuration items for input files. """ details = [] in_files = _expand_dirs(in_files, KNOWN_EXTS) in_files = _expand_wildcards(in_files) ext_groups = collections.defaultdict(list) for ...
java
private Template parseFix(Document dc, String tagname) { Template fix; NodeList prefixElementList = dc.getElementsByTagNameNS(SCHEMA_LOCATION, tagname); if (prefixElementList.getLength() > 0) { fix = parseTemplate(prefixElementList.item(0)); } else { fix = new Tem...
python
def validate(self): ''' Perform integrity checks on the modes in this document. Returns: None ''' for r in self.roots: refs = r.references() check_integrity(refs)
java
void performRun(IntegrationOperation operation) { for (Map.Entry<String, Integration<?>> entry : integrations.entrySet()) { String key = entry.getKey(); long startTime = System.nanoTime(); operation.run(key, entry.getValue(), projectSettings); long endTime = System.nanoTime(); long dur...
java
public void intern() { symbol = symbol.intern(); if (leftChild != null) { leftChild.intern(); } if (rightChild != null) { rightChild.intern(); } }
java
@Override public String toUrl() { List<NameValuePair> params = new ArrayList<NameValuePair>(getParams()); params.add(new BasicNameValuePair("fetch", fetch.toString())); return String.format("%s.js?%s", getEndpoint(), URLEncodedUtils.format(params, "utf-8")); }
java
protected final boolean checkTTC(FontFileReader in, String name) throws IOException { String tag = in.readTTFString(4); if ("ttcf".equals(tag)) { // This is a TrueType Collection in.skip(4); // Read directory offsets int numDirectories = (int)in.readTTFU...
java
public Map<Group, List<ServerMonitoringStatistics>> getMonitoringStatsAsMap(List<Group> groups, ServerMonitoringFilter config) { Map<Group, List<ServerMonitoringStatistics>> result = new HashMap<>(groups.size()); groups.stream() .forEach(group -> result.put(group, getMonitoringStats(group, c...
python
def QWidget_factory(ui_file=None, *args, **kwargs): """ Defines a class factory creating `QWidget <http://doc.qt.nokia.com/qwidget.html>`_ classes using given ui file. :param ui_file: Ui file. :type ui_file: unicode :param \*args: Arguments. :type \*args: \* :param \*\*kwargs: Keywords ...
python
def add_JSsource(self, new_src): """add additional js script source(s)""" if isinstance(new_src, list): for h in new_src: self.JSsource.append(h) elif isinstance(new_src, basestring): self.JSsource.append(new_src) else: raise OptionType...
python
def _sign_of(money): """Determines the amount sign of a money instance Args: money (:class:`endpoints_management.gen.servicecontrol_v1_messages.Money`): the instance to test Return: int: 1, 0 or -1 """ units = money.units nanos = money.nanos if units: if units ...
python
def check_existence(to_check, name, config_key=None, relative_to=None, allow_undefined=False, allow_not_existing=False, base_key='releaser'): """Determine whether a file or folder actually exists.""" if allow_undefined and (to_check is None or to_check.lower() == 'none'):...
java
private synchronized ReceiveAllowedThread getReceiveAllowedThread(DestinationHandler destinationHandler) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getReceiveAllowedThread", destinationHandler); if (_receiveAllowedThread == null) { ...
python
def user(self, username=None): """A user resource that represents a registered user in the portal.""" if username is None: username = self.__getUsername() parsedUsername = urlparse.quote(username) url = self.root + "/%s" % parsedUsername return User(url=url, ...
python
def instruction_ROR_register(self, opcode, register): """ Rotate accumulator right """ a = register.value r = self.ROR(a) # log.debug("$%x ROR %s value $%x >> 1 | Carry = $%x" % ( # self.program_counter, # register.name, a, r # )) register.set(r)
python
def cursor(self, pos): """Returns a line for the cursor as position *pos* :param pos: mouse cursor position :type pos: :qtdoc:`QPoint` :returns: :qtdoc:`QLine` -- position between items (indicates where drops will go) """ index = self.splitAt(pos) if len(self._r...
java
public final void start(long expiryInterval, JsMessagingEngine jsme) throws SevereMessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "start", "interval=" + expiryInterval + " indexSize=" + expiryIndex.size()); messagingEngine = jsme; ...
python
def crc(self): """ A checksum for the current visual object and its parent mesh. Returns ---------- crc: int, checksum of data in visual object and its parent mesh """ # will make sure everything has been transferred # to datastore that needs to be before...
python
def get_font_matrix(self): """Copies the current font matrix. See :meth:`set_font_matrix`. :returns: A new :class:`Matrix`. """ matrix = Matrix() cairo.cairo_get_font_matrix(self._pointer, matrix._pointer) self._check_status() return matrix
java
private KeyValuePair<CacheTransaction, Object> waitForTransactionsToComplete(Collection<PendingTransaction> transactionsToCheck, long expectedEndTime) throws InterruptedException { if (transactionsToCheck.isEmpty()) { return null; } ...
java
public void keys(final LongArrayList list) { list.clear(); forEachKey( new LongProcedure() { public boolean apply(long key) { list.add(key); return true; } } ); }
java
public static byte[] readBytes(final BitInput bitInput, final int lengthSize, final boolean byteUnsigned, final int byteSize) throws IOException { if (bitInput == null) { throw new NullPointerException("bitInput is null"); } requireValid...
java
public static ServerParams load(String[] args) throws ConfigurationException { if (INSTANCE != null) { logger.warn("Configuration is loaded already. Use ServerParams.getInstance() method. "); return INSTANCE; } INSTANCE = new ServerParams(); INSTANCE.parse...
java
private void filter(Predicate<TreeItem<S>> predicate) { if (task != null) { task.cancel(false); } task = threadPool.schedule(filterRunnable, 200, TimeUnit.MILLISECONDS); }
python
def table_ensure(cls, rr): ''' Creates the table if it doesn't exist. ''' dbs = rr.db_list().run() if not rr.dbname in dbs: logging.info('creating rethinkdb database %s', repr(rr.dbname)) rr.db_create(rr.dbname).run() tables = rr.table_list().run()...
python
def typify(value: Union[dict, list, set, str]): """ Enhance block operation with native types. Typify takes a blockchain operation or dict/list/value, and then it parses and converts string types into native data types where appropriate. """ if type(value) == dict: return walk_values(typify...
java
public static List<String> getDayListBetween2Day(String startDate, String endDate, Format format) { List<String> dayList = new ArrayList<String>(); int dataNum = Integer.parseInt(getTwoDay2String(startDate, endDate, format)); for (int i = 0; i < (dataNum + 1); i++) { String resultDat...
python
def add_interim_values(module, input, output): """The forward hook used to save interim tensors, detached from the graph. Used to calculate the multipliers """ try: del module.x except AttributeError: pass try: del module.y except AttributeError: pass modu...
java
void handleMove(HttpRequest request, HttpResponse response, String pathInContext, Resource resource) throws IOException { if (!resource.exists() || !passConditionalHeaders(request,response,resource)) return; String ne...
python
def prep_db_parallel(samples, parallel_fn): """Prepares gemini databases in parallel, handling jointly called populations. """ batch_groups, singles, out_retrieve, extras = _group_by_batches(samples, _has_variant_calls) to_process = [] has_batches = False for (name, caller), info in batch_groups...
python
def gen_orm_classes_from_base(base: Type) -> Generator[Type, None, None]: """ From an SQLAlchemy ORM base class, yield all the subclasses (except those that are abstract). If you begin with the proper :class`Base` class, then this should give all ORM classes in use. """ for cls in gen_all_s...
python
def check_and_update_resources(num_cpus, num_gpus, resources): """Sanity check a resource dictionary and add sensible defaults. Args: num_cpus: The number of CPUs. num_gpus: The number of GPUs. resources: A dictionary mapping resource names to resource quantities. Returns: ...
python
def dump_state(self): """Dump the current state of this emulated object as a dictionary. Note that dump_state happens synchronously in the emulation thread to avoid any race conditions with accessing data members and ensure a consistent view of all state data. Returns: ...
java
public Pager<Project> getProjects(Boolean archived, Visibility visibility, ProjectOrderBy orderBy, SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData ...
java
private InvocationMethod tryGetMethod(final InvokerKey key) { InvocationMethod invocationMethod = null; try { invocationMethod = invocationMethods.get(key); } catch (Exception ex) { LOG.warn("Error fetching method to invoke method {}", key, ex); } return ...
python
def _remove_duplicate(old_events, dat): """Remove duplicates from the events. Parameters ---------- old_events : ndarray (dtype='int') N x 3 matrix with start, peak, end samples dat : ndarray (dtype='float') vector with the data after detection-transformation (to compute peak) ...
python
def fill_subparser(subparser): """Sets up a subparser to convert the ILSVRC2012 dataset files. Parameters ---------- subparser : :class:`argparse.ArgumentParser` Subparser handling the `ilsvrc2012` command. """ subparser.add_argument( "--shuffle-seed", help="Seed to use for ran...
java
@Override @Path("/packages") @ApiOperation(value="Import discovered asset packages", response=StatusMessage.class) @ApiImplicitParams({ @ApiImplicitParam(name="discoveryUrl", paramType="query", dataType="string"), @ApiImplicitParam(name="branch", paramType="query", dataType="string"), ...
java
public String readProperty(String propertyName) { String propVal = null; try { propVal = getCms().readPropertyObject(getParamResource(), propertyName, false).getValue(); } catch (CmsException e) { if (LOG.isInfoEnabled()) { LOG.info(e.getLocalizedMessage(...
python
def create_full_tear_sheet(factor_data, long_short=True, group_neutral=False, by_group=False): """ Creates a full tear sheet for analysis and evaluating single return predicting (alpha) factor. Parameters ---------- ...
python
def join(self, target): """join a channel""" password = self.config.passwords.get( target.strip(self.server_config['CHANTYPES'])) if password: target += ' ' + password self.send_line('JOIN %s' % target)
python
def get_serializer(serializer): """ Load a serializer. """ if isinstance(serializer, string_types): try: app_label, serializer_name = serializer.split('.') app_package = get_application(app_label) serializer_module = import_module('%s.serializers' % app_package) ...
python
def _build(self, input_batch, is_training, test_local_stats=True): """Connects the BatchNorm module into the graph. Args: input_batch: A Tensor of arbitrary dimension. By default, the final dimension is not reduced over when computing the minibatch statistics. is_training: A boolean to indi...
python
def _convert_to_style(cls, style_dict, num_format_str=None): """ converts a style_dict to an xlwt style object Parameters ---------- style_dict : style dictionary to convert num_format_str : optional number format string """ import xlwt if style_d...
python
def dump_registers(cls, registers, arch = None): """ Dump the x86/x64 processor register values. The output mimics that of the WinDBG debugger. @type registers: dict( str S{->} int ) @param registers: Dictionary mapping register names to their values. @type arch: str ...
python
def get_minions(): ''' Return a list of minions ''' with _get_serv(ret=None, commit=True) as cur: sql = '''SELECT DISTINCT id FROM `salt_returns`''' cur.execute(sql) data = cur.fetchall() ret = [] for minion in data: ret.append(minion...
python
def get_connection(self, command_name, *keys, **options): """Get a connection from the pool""" self._checkpid() try: connection = self._available_connections[self._pattern_idx].pop() except IndexError: connection = self.make_connection() self._in_use_conne...
python
def diamond_functions(xx, yy, y_x0, x_y0): """ Method that creates two upper and lower functions based on points xx and yy as well as intercepts defined by y_x0 and x_y0. The resulting functions form kind of a distorted diamond-like structure aligned from point xx to point yy. Schematically : ...
java
public OvhTask service_domain_domainName_disclaimer_DELETE(String service, String domainName) throws IOException { String qPath = "/email/mxplan/{service}/domain/{domainName}/disclaimer"; StringBuilder sb = path(qPath, service, domainName); String resp = exec(qPath, "DELETE", sb.toString(), null); return conver...
python
def __ip_addr(addr, address_family=socket.AF_INET): ''' Returns True if the IP address (and optional subnet) are valid, otherwise returns False. ''' mask_max = '32' if address_family == socket.AF_INET6: mask_max = '128' try: if '/' not in addr: addr = '{addr}/{ma...
python
def nvmlDeviceGetPowerUsage(handle): r""" /** * Retrieves power usage for this GPU in milliwatts and its associated circuitry (e.g. memory) * * For Fermi &tm; or newer fully supported devices. * * On Fermi and Kepler GPUs the reading is accurate to within +/- 5% of current power draw. ...
python
def get_task(self, key): """Get a scheduled task, or none""" res, pk = key jobs, lock = self._jobs with lock: return jobs[res].get(pk)
python
def _reschedule(self, node): """Maybe schedule new items on the node. If there are any globally pending work units left then this will check if the given node should be given any more tests. """ # Do not add more work to a node shutting down if node.shutting_down: ...
python
def leave_moderator(self, subreddit): """Abdicate moderator status in a subreddit. Use with care. :param subreddit: The name of the subreddit to leave `status` from. :returns: the json response from the server. """ self.evict(self.config['my_mod_subreddits']) return sel...
python
def next_joystick_device(): """Finds the next available js device name.""" for i in range(100): dev = "/dev/input/js{0}".format(i) if not os.path.exists(dev): return dev
python
def _connect(self, hosts_list): """ In the basic case, hostsp is a list of hosts like: ``` [10.0.0.2:2181, 10.0.0.3:2181] ``` It might also contain auth info: ``` [digest:foo:bar@10.0.0.2:2181, 10.0.0.3:2181] ``` """ self._discon...
python
def show_Certificate(cert, short=False): """ Print Fingerprints, Issuer and Subject of an X509 Certificate. :param cert: X509 Certificate to print :param short: Print in shortform for DN (Default: False) :type cert: :class:`asn1crypto.x509.Certificate` :type short: Boolean ...
java
private void addPostParams(final Request request) { if (actions != null) { request.addPostParam("Actions", Converter.mapToJson(actions)); } }
java
@SuppressWarnings("unused") @Override public void onPaymentSuccess(String razorpayPaymentID) { try { Toast.makeText(this, "Payment Successful: " + razorpayPaymentID, Toast.LENGTH_SHORT).show(); } catch (Exception e) { Log.e(TAG, "Exception in onPaymentSuccess", e); ...
java
public static Set<Integer> parseRange(String range) { if (range == null) { return Collections.emptySet(); } Set<Integer> ret = new LinkedHashSet<>(); StringTokenizer stringTokenizer = new StringTokenizer(range, String.format("%s%s", COMMA, DASH), true); Integer from =...
java
private boolean doAcquireSharedNanos(int arg, long nanosTimeout) throws InterruptedException { if (nanosTimeout <= 0L) return false; final long deadline = System.nanoTime() + nanosTimeout; final Node node = addWaiter(Node.SHARED); try { for (;;) { ...
java
@SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"}) protected void copyVisibleJvmConstructors(JvmGenericType source, JvmGenericType target, XtendTypeDeclaration sarlSource, Set<ActionParameterTypes> createdConstructors, JvmVisibility minimalVisibility) { final boolean samePacka...
java
public static <K, V> ArrayListMultimapJsonDeserializer<K, V> newInstance( KeyDeserializer<K> keyDeserializer, JsonDeserializer<V> valueDeserializer ) { return new ArrayListMultimapJsonDeserializer<K, V>( keyDeserializer, valueDeserial...
java
public List<LatLng> getPointsFromMarkers(List<Marker> markers) { List<LatLng> points = new ArrayList<LatLng>(); for (Marker marker : markers) { points.add(marker.getPosition()); } return points; }