Example usage for java.util Locale US

List of usage examples for java.util Locale US

Introduction

In this page you can find the example usage for java.util Locale US.

Prototype

Locale US

To view the source code for java.util Locale US.

Click Source Link

Document

Useful constant for country.

Usage

From source file:edu.berkeley.compbio.ml.mcmc.TextFileDataCollector.java

@Override
public String toString() {
    final StringBuffer sb = new StringBuffer();
    final Formatter formatter = new Formatter(sb, Locale.US);

    //sb.append(getStep()).append("\n");
    for (final DoubleTimecourse t : timecourses.values()) {
        formatter.format("%1$20s = %2$10s, %3$10s\n", t.name(), t.last(), t.runningaverage());
    }//from w  w w.  j a va2  s  . c o  m

    return sb.toString();
}

From source file:com.frostwire.search.archiveorg.ArchiveorgCrawledSearchResult.java

public ArchiveorgCrawledSearchResult(ArchiveorgSearchResult sr, ArchiveorgFile file) {
    super(sr);//from  w  ww . j  a  v  a2 s.c  o m
    this.filename = FilenameUtils.getName(file.filename);
    this.displayName = FilenameUtils.getBaseName(filename) + " (" + sr.getDisplayName() + ")";
    this.downloadUrl = String.format(Locale.US, DOWNLOAD_URL, sr.getDomainName(), sr.getIdentifier(),
            UrlUtils.encode(file.filename));
    this.size = calcSize(file);
}

From source file:com.github.horrorho.inflatabledonkey.cloudkitty.CloudKitty.java

public static CloudKitty backupd(CKInit ckInit, String cloudKitToken) {

    String container = "com.apple.backup.ios";
    String bundle = "com.apple.backupd";

    String cloudKitUserId = ckInit.cloudKitUserId();
    String baseUrl = ckInit.production().url();

    String deviceID = UUID.randomUUID().toString();
    String deviceHardwareID = new BigInteger(256, ThreadLocalRandom.current()).toString(16)
            .toUpperCase(Locale.US);

    RequestOperationFactory factory = new RequestOperationFactory(cloudKitUserId, container, bundle,
            deviceHardwareID, deviceID);

    InputStreamResponseHandler<List<CloudKit.ResponseOperation>> responseHandler = new InputStreamResponseHandler<>(
            new RawProtoDecoderLogger(null));

    return new CloudKitty(factory, container, bundle, cloudKitUserId, cloudKitToken, baseUrl, responseHandler);
}

From source file:com.squareup.okhttp.internal.http.HttpDate.java

/**
 * Returns the date for {@code value}. Returns null if the value couldn't be
 * parsed./*  ww  w. j ava2s . co m*/
 */
public static Date parse(String value) {
    try {
        return STANDARD_DATE_FORMAT.get().parse(value);
    } catch (ParseException ignore) {
    }
    for (String formatString : BROWSER_COMPATIBLE_DATE_FORMATS) {
        try {
            return new SimpleDateFormat(formatString, Locale.US).parse(value);
        } catch (ParseException ignore) {
        }
    }
    return null;
}

From source file:com.itd.dbmrgdao.TestScanData2.java

@Ignore
@org.junit.Test/*w  ww  .  jav  a 2 s . com*/
public void test() throws ParseException {

    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US);

    //        Date fr = dateFormat.parse("2014-07-10");
    //        Date to = dateFormat.parse("2014-07-15");

    //        List<ScanData> listScanDatas = scanDao.findScanBetweenDate(fr, to);

    //        System.out.println(listScanDatas);

}

From source file:com.ok2c.lightmtp.impl.protocol.cmd.DefaultProtocolHandler.java

public void unregister(final String cmd) {
    Args.notNull(cmd, "Command name");
    this.map.remove(cmd.toUpperCase(Locale.US));
}

From source file:com.inovaworks.ObservedProperty.java

public static ObservedProperty heading(double headingDegs) {
    return new ObservedProperty("heading", String.format(Locale.US, "%.1f", headingDegs), "degrees");
}

From source file:com.koushikdutta.async.http.HttpDate.java

/**
 * Returns the date for {@code value}. Returns null if the value couldn't be
 * parsed.//from  w ww.  j  av  a  2 s.  c  o m
 */
public static Date parse(String value) {
    if (value == null)
        return null;
    try {
        return STANDARD_DATE_FORMAT.get().parse(value);
    } catch (ParseException ignore) {
    }
    for (String formatString : BROWSER_COMPATIBLE_DATE_FORMATS) {
        try {
            return new SimpleDateFormat(formatString, Locale.US).parse(value);
        } catch (ParseException ignore) {
        }
    }
    return null;
}

From source file:net.pms.newgui.LanguageSelectionTest.java

@Test
public void LanguageSelectionClassTest() {
    LanguageSelection languageSelection;
    languageSelection = new LanguageSelection(null, Locale.US, false);
    assertFalse("isAbortedIsFalseByDefault", languageSelection.isAborted());

}

From source file:com.circle_technologies.cnn4j.predictive.command.CommandEvaluate.java

private void printEvaluation(ResidualEvaluation e) {
    System.out.println("###### EVALUATION ######");
    System.out.println("Accuracy:        " + String.format(Locale.US, "%.2f%%", e.getAccuracy() * 100));
    System.out.println("Mean deviation:  " + e.getMeanDeviation());
    System.out.println("SD:              " + e.getStandardDeviation());
    System.out.println("Max deviation:   " + e.getMaxDeviation());
    System.out.println("Min deviation:   " + e.getMinDeviation());
    System.out.println("######### END ##########");
}