Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6346127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:57:29+00:00 2026-05-24T20:57:29+00:00

More specifically, how to test further? I saw another post where the answer used

  • 0

More specifically, how to test further? I saw another post where the answer used a hexdump. How might I try this, and should I?

Here’s my trying in console…

variables: myl is my latitude value from my database. ul is the value from an api. ll is where I hand retyped the value:

ruby-1.9.2-p180 :106 > myl=a.latitude   #=> "42.3471841"
ruby-1.9.2-p180 :107 > ul=@events[30].xpath('venue')[0]['lat']
=> "42.3471836"
ruby-1.9.2-p180 :108 > myl==ul   #=> false
ruby-1.9.2-p180 :109 > myl==ul.to_i   #=> false
ruby-1.9.2-p180 :110 > myl.to_i==ul.to_i   #=> true
ruby-1.9.2-p180 :111 > Venue.find_by_latitude(ul)   #=> nil
ruby-1.9.2-p180 :112 > Venue.find_by_latitude(ul.to_i)   #=> nil
ruby-1.9.2-p180 :113 > Venue.find_by_latitude(ul.to_s)   #=> nil
ruby-1.9.2-p180 :114 > ul   #=> "42.3471836"
ruby-1.9.2-p180 :115 > myl.class   #=> String
ruby-1.9.2-p180 :116 > ul.class   #=> String
ruby-1.9.2-p180 :117 > ll="42.3471836"   #=> "42.3471836"
ruby-1.9.2-p180 :118 > myl==ll   #=> false
ruby-1.9.2-p180 :119 > ul==ll   #=> true

Any suggestions would be most helpful! The goal is to use latitude and longitude to identify a place already stored in my database, since names of a place are not always unique.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:57:30+00:00Added an answer on May 24, 2026 at 8:57 pm

    Two things:

    As I understand it, you’re envisioning these things as numbers, not strings, so it’s probably best to convert them before you make the comparison.

    Second, since the strings aren’t really equal, but fairly close as latitudes go, I’m going to go out on a limb and guess that you’re really trying to compare them with some allowed margin of error. Like so (assuming myLatitude and apiLatitude are numbers):

    (myLatitude - apiLatitude).abs < 0.000001

    And (while you’re at it) make sure that your longitude convention (-180 to 180 vs. 0 to 360) is consistent when you’re comparing those.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

More specifically I want to test whether Oracle ODP.Net is installed on a machine.
More specifically, is List(T)(IEnumerable(T)) thread-safe if the IEnumerable used to initialize the list is
More specifically, does NDK have a complete STL implementation. We're looking at this for
Can I unit test Informatica Powercentre workflows? EDIT: More specifically, can I mock sources
More specifically, I'm trying to check if given string (a sentence) is in Turkish.
More specifically, if I have: public class TempClass : TempInterface { int TempInterface.TempProperty {
...or more specifically, how are they able to create animations via javascript, which is
In .Net (VB more specifically, but that doesn't really matter), is there a way
I was of the idea that flash (more specifically Adobe's flash player browser plugin)
Is there stable linear algebra (more specifically, vectors, matrices, multidimensional arrays and basic operations

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.