Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 16:30

    niemyjski on master

    revert to older asp.net core (compare)

  • 13:29

    dependabot-preview[bot] on nuget

    (compare)

  • 13:29

    dependabot-preview[bot] on nuget

    (compare)

  • 13:29
    dependabot-preview[bot] closed #499
  • 13:29

    dependabot-preview[bot] on nuget

    (compare)

  • 13:29

    dependabot-preview[bot] on nuget

    (compare)

  • 13:29

    dependabot-preview[bot] on nuget

    (compare)

  • 13:29
    dependabot-preview[bot] edited #499
  • 13:29

    dependabot-preview[bot] on nuget

    (compare)

  • 13:29
    dependabot-preview[bot] commented #499
  • 13:29
    dependabot-preview[bot] closed #512
  • 13:29
    dependabot-preview[bot] closed #514
  • 13:29
    dependabot-preview[bot] closed #496
  • 13:29
    dependabot-preview[bot] closed #511
  • 13:29
    dependabot-preview[bot] closed #509
  • 13:29
    dependabot-preview[bot] edited #512
  • 13:29

    dependabot-preview[bot] on nuget

    (compare)

  • 13:29
    dependabot-preview[bot] edited #514
  • 13:29
    dependabot-preview[bot] edited #496
  • 13:29
    dependabot-preview[bot] edited #509
Blake Niemyjski
@niemyjski
which blows up elastic search
        Target.Geo = latitude.ToString("G", CultureInfo.InvariantCulture) + "," + longitude.ToString("G", CultureInfo.InvariantCulture);
Eric J. Smith
@ejsmith
well we don’t want any formatting on the numbet
we just want the number
Blake Niemyjski
@niemyjski
for lat and long you want the full thing
Eric J. Smith
@ejsmith
so we need to specifiy the formatting
Blake Niemyjski
@niemyjski
because you have minutes and seconds
invariant will give us what we want right
The invariant culture is culture-insensitive; it is associated with the English language but not with any country/region. You specify the invariant culture by name by using an empty string ("") in the call to a CultureInfo instantiation method. CultureInfo.InvariantCulture also retrieves an instance of the invariant culture.
Eric J. Smith
@ejsmith
need to look and see what format we are wanting.
I think it’s just 22.3333,33.3545
Blake Niemyjski
@niemyjski
yeah
I think invariant culture is what we want
Eric J. Smith
@ejsmith
no, we want to control the formatting ourselves.
Blake Niemyjski
@niemyjski
Target.Geo = latitude.ToString("G", CultureInfo.InvariantCulture) + "," + longitude.ToString("G", CultureInfo.InvariantCulture);
return this;
Eric J. Smith
@ejsmith
culture is only used for controlling commas and other friendly formats
Blake Niemyjski
@niemyjski
yes..
and we are saying convert this decimal to english based culture
with the periods
"The invariant culture is culture-insensitive; it is associated with the English language but not with any country/region"
// Use standard numeric format specifiers.
specifier = "G";
Console.WriteLine(value.ToString(specifier, CultureInfo.InvariantCulture));
// Displays: 16325.62
Eric J. Smith
@ejsmith
b.ToString("#0.0000"
Eric J. Smith
@ejsmith
probably something like that.
not sure how many decimals.
Blake Niemyjski
@niemyjski
90.090.ToString("G", System.Globalization.CultureInfo.InvariantCulture)
"90.09"
think that’s what we want
Eric J. Smith
@ejsmith
Why would we want that? We don’t wany any culture involved and we don’t want any friendly formatting.
we know exactly what format we want.
so you specify it.
Blake Niemyjski
@niemyjski
G is general
and the other is generic english culture
Eric J. Smith
@ejsmith
yes, general as in format it how you would for the general culture.
we don’t want them to format it for us.
we know the format.
be explicit
G is still for friendly display purposes.
Blake Niemyjski
@niemyjski
[2/9/16, 10:43:54 AM] Greg Marzouka: dont think we have tests that use different locales
[2/9/16, 10:44:10 AM] Greg Marzouka: but we do CultureInfo.InvariantCulture
[2/9/16, 10:44:15 AM] Greg Marzouka: so i think that should fix it
that’s from the elastic guy
Eric J. Smith
@ejsmith
dude, we don’t want culture involved in any way… we don’t want the format open to interpretation of how the system thinks it should be formatted… we know what format we want.
When you say G you are saying to use whatever format the system thinks is appropriate… and you say invariant culture so it goes to see what the friendly format for that culture is…
but we know exactly what format we want, so why would you leave it open to interpretation?
Blake Niemyjski
@niemyjski
ok
Eric J. Smith
@ejsmith
6 decimals is the max precision
that’s how theyy are parsing it which I don’t think is what we are doing
ok
Eric J. Smith
@ejsmith
you just said the keyword there
parsing