query-by method for field thumbnailUrl
@param thumbnailUrl the specified attribute
@return an Iterable of DUsers for the specified thumbnailUrl
165915
public Iterable<DUser> queryByThumbnailUrl(java.lang.String thumbnailUrl) {
    return queryByField(null, DUserMapper.Field.THUMBNAILURL.getFieldName(), thumbnailUrl);
  }
1207787
public Iterable<DUser> queryByCountry(java.lang.String country) {
    return queryByField(null, DUserMapper.Field.COUNTRY.getFieldName(), country);
  }
1018335
public ResourceIterator getResourceIterator(URL url, Filter filter)
    {
        String urlString = url.toString();
        try
        {
            if (urlString.endsWith("!/"))
            {
                urlString = urlString.substring(4);
                urlString = urlString.substring(0, urlString.length() - 2);
                url = new URL(urlString);
            }

            if (urlString.endsWith(".class"))
            {
                File f = new File(url.getPath());
                return new ClassFileIterator(f);
            }
            else if (!urlString.endsWith("/"))
            {
                return new JarFileIterator(url.openStream(), filter);
            }
            else
            {
                if (!url.getProtocol().equals("file"))
                {
                    throw new ResourceReadingException("Unable to understand protocol: " + url.getProtocol());
                }

                File f = new File(url.getPath());
                if (f.isDirectory() || url.getProtocol().toUpperCase().equals(AllowedProtocol.VFS.name()))
                {
                    return new ClassFileIterator(f, filter);
                }
                else
                {
                    return new JarFileIterator(url.openStream(), filter);
                }
            }
        }
        catch (MalformedURLException e)
        {
            throw new ResourceReadingException(e);
        }
        catch (IOException e)
        {
            throw new ResourceReadingException(e);
        }
    }
975022
public Iterable<DUser> queryByCreatedBy(java.lang.String createdBy) {
    return queryByField(null, DUserMapper.Field.CREATEDBY.getFieldName(), createdBy);
  }
502125
public String getImageUrl() {
    if (thumbnailUrl != null) {
      return thumbnailUrl;
    }

    if (image != null) {
      return image.url;
    }

    return null;
  }
1342809
public String getOriginalUrl() throws FlickrException {
        if (originalSize == null) {
            if (originalFormat != null) {
                return getOriginalBaseImageUrl() + "_o." + originalFormat;
            }
            return getOriginalBaseImageUrl() + DEFAULT_ORIGINAL_IMAGE_SUFFIX;
        } else {
            return originalSize.getSource();
        }
    }
190332
def thumbnail(self):
        
        # check if there is a valid thumbnail override
        if self.thumbnail_override.id is not None:
            return self.thumbnail_override

        # otherwise, just try to grab the first image
        first_image = self.first_image
        if first_image is not None:
            return first_image

        # no override for thumbnail and no non-none image field, just return override,
        # which is a blank image field
        return self.thumbnail_override
141246
def get_dupe_prob(self, url):
        
        path, query = _parse_url(url)
        dupestats = []
        extend_ds = lambda x: dupestats.extend(filter(None, (
            ds_dict.get(key) for ds_dict, key in x)))
        if self.urls_by_path.get(path):
            extend_ds([(self.path_dupstats, path)])
        # If param is in the query
        for param, value in query.items():
            qwp_key = _q_key(_without_key(query, param))
            # Have we seen the query with param changed or removed?
            has_changed = self.urls_by_path_qwp.get((path, param, qwp_key))
            has_removed = self.urls_by_path_q.get((path, qwp_key))
            if has_changed or has_removed:
                extend_ds(self._param_dupstats(path, param, qwp_key))
            if has_removed:
                extend_ds(self._param_value_dupstats(path, param, value))
        # If param is not in the query, but we've crawled a page when it is
        q_key = _q_key(query)
        for param in (self.params_by_path.get(path, set()) - set(query)):
            if self.urls_by_path_qwp.get((path, param, q_key)):
                extend_ds(self._param_dupstats(path, param, q_key))
                # FIXME - this could be a long list of param values,
                # it's better to somehow store only high-probability values?
                for value in self.param_values.get((path, param), set()):
                    extend_ds(self._param_value_dupstats(path, param, value))
        return max(ds.get_prob() for ds in dupestats) if dupestats else 0.
923436
def get_thumbnail_image_url(self, page=1):
        
        template = self.resources.page.get('image')
        return template.replace(
            "{page}",
            str(page)
        ).replace("{size}", "thumbnail")
611140
@SuppressWarnings("UnusedDeclaration")
    private String createDataURI(final URL imageURL) {
        return imgCache.computeIfAbsent(imageURL, url -> {
            String dataUrl = null;
            try (final InputStream isGuess = url.openStream();
                 final InputStream isConvert = url.openStream();
                 final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                final String contentType = URLConnection.guessContentTypeFromStream(isGuess);
                if (null != contentType) {
                    final byte[] chunk = new byte[4096];
                    int bytesRead;
                    while ((bytesRead = isConvert.read(chunk)) > 0) {
                        os.write(chunk, 0, bytesRead);
                    }
                    os.flush();
                    dataUrl = "data:" + contentType + ";base64," + Base64.getEncoder().encodeToString(os
                            .toByteArray());
                } else {
                    if (logger.isWarnEnabled()) {
                        logger.warn("could not get content type from {}", imageURL.toExternalForm());
                    }
                }
            } catch (final IOException e) {
                if (logger.isWarnEnabled()) {
                    logger.warn("error loading image", e);
                }
            }
            if (null == dataUrl) {
                if (logger.isWarnEnabled()) {
                    logger.warn("could not create data url from {}", imageURL.toExternalForm());
                }
            }
            return dataUrl;
        });
    }
747194
def downloadThumbnail(self, outPath):
        """"""
        url = self._url + "/info/thumbnail"
        params = {

        }
        return self._get(url=url,
                            out_folder=outPath,
                            file_name=None,
                            param_dict=params,
                            securityHandler=self._securityHandler,
                            proxy_url=self._proxy_url,
                            proxy_port=self._proxy_port)
725760
public DUser findByUsername(java.lang.String username) {
    return queryUniqueByField(null, DUserMapper.Field.USERNAME.getFieldName(), username);
  }
102516
public Iterable<DUser> queryByFirstName(java.lang.String firstName) {
    return queryByField(null, DUserMapper.Field.FIRSTNAME.getFieldName(), firstName);
  }
1323344
private URL extractActualUrl(URL jarUrl) throws MalformedURLException {
        String urlFile = jarUrl.getFile();
        int separatorIndex = urlFile.indexOf("!/");
        if (separatorIndex != -1) {
            String jarFile = urlFile.substring(0, separatorIndex);

            try {
                return new URL(jarFile);
            } catch (MalformedURLException var5) {
                if (!jarFile.startsWith("/")) {
                    jarFile = "/" + jarFile;
                }

                return new URL("file:" + jarFile);
            }
        } else {
            return jarUrl;
        }
    }
1137205
public static Observable<Bitmap> getThumbnail(Context context, Uri uri, int requiredWidth,
      int requiredHeight, int kind) {
    return getThumbnailFromUriWithSizeAndKind(context, uri, requiredWidth, requiredHeight, kind);
  }
564814
@Override
    public List<URL> getJarFileUrls() {
        List<URL> urls = new ArrayList<>();
        for (String url : persistenceUnitXml.getJarFile()) {
            try {
                urls.add(new URL(url));
            } catch (MalformedURLException e) {
                LOGGER.error("Cannot create an URL object from {}", url, e);
            }
        }
        return urls;
    }
994701
private List<String> findUrlsInAttributeValue(final String attributeValue) {
        List<String> foundUrls = new ArrayList<>();

        urlPatterns.stream()
                .map((Pattern urlPattern) -> urlPattern.matcher(attributeValue))
                .forEach((Matcher urlPatternMatcher) -> {
                    while (urlPatternMatcher.find()) {
                        String foundUrl = urlPatternMatcher.group().trim();

                        if (validator.test(foundUrl)) {
                            foundUrls.add(foundUrl);
                        }
                    }
                });

        return foundUrls;
    }