Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
How can I retrieve data from OpenStreetMap (OSM) using the OSM API (http://wiki.openstreetmap.org/wiki/API) and Ruby? Is there any ruby gem available which serves my purpose? I have been searching for a good solution for my purpose but nothing served me exactly what I need.
As for example : Given the country name as input, I need to get the list of all streets of that country etc.
Any kind of link/code sample or starting point is fine. I can then explore more to find out what I need exactly. Thanks!
As the question as posed is off topic for Stack Overflow, I will answer the question of "How to find something I can use" rather than give any kind of recommendation on a tool itself.
I am not familiar with any gems for OpenStreetMap.
So I do this command from the terminal:
gem list --remote | grep street
And my terminal answers me with this:
openstreetmap (0.2.1)
And then I pull up my trusty browser, and open up ruby-toolbox.org and search for openstreetmap.
This produces a page that shows 30 results. In there, I see the mentioned gem, but also I see Rosemary which seems promising, as it is an "OpenStreetMap API client for ruby" and it was last updated only 4 months ago.
So, hopefully this helps in future searches. You have a lot of tools available to get started on your search to get to the point you are asking for in this question, so that you can get down to the business of doing what you need.
The main API you want to use is not suitable for such queries. It is mainly for editing and retrieving small amounts of map data within a small region. For larger queries better use the Overpass API which is much faster and also allows very complex query conditions if needed.
The Overpass API uses XML as input and serves either XML or JSON as output format. So it should be rather easy to use in any common scripting language.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Preface: this might seem to be a very beginner-level question maybe stupid or ill-formulated. That's why I don't require a determined answer, but just a hint, a point, which I can start with.
I am thinking of script, which would allow me to parse product pages of different online retailers, such as Amazon, for instance. The following information is to be extracted from the product page:
product image
price
availability (in stock/out of stock)
The key point in the algorithm is that, once implemented, it should work for any retailer, for any product page. So it is pretty universal.
What techniques would allow implementation of such an algorithm? Is it even possible to write such a universal parser?
If the information on the product page is marked up in a structured, machine-readable way, e.g. using schema.org microdata, then you can just parse the page HTML into a DOM tree, traverse the tree to locate the microdata elements, and extract the data you want from them.
Unfortunately, many sites still don't use such structured data markup — they just present the information in a human-readable form, with no consideration given for machine parsing. In such cases, you'll need to customize your data extraction code for each site, so that it knows where the information you want is located on the page. Parsing the HTML and then working with the DOM is still often a good first step, but the rest will have to be site-specific (and may need to be updated whenever the site changes its design).
Of course, you can also try to come up with heuristic methods for locating relevant data, like, say, assuming that a number following a $ sign is probably a price. Of course, such methods are also likely to occasionally produce incorrect matches (like, say, mistaking the "$10" in "Order now and save $10!" for a price). You can adjust and refine your heuristics to be smarter about such things, but no matter how good you get at it, there will always be some new and unexpected cases that you haven't anticipated.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I want to write bash in a comfortable environment.
I've tried http://www.vim.org/scripts/script.php?script_id=365
But it lacks:
function list
function parameter hint
function description hint
Is there any vim plugin which you use when writing shell script?
Don't forget that Vim is not an IDE (though through its great integration capabilities and plugins, it can appear like one). It is first and foremost a (very powerful) text editor. (There are various blog posts and discussions around that topic, so I spare you further arguments.)
How are function parameter hints supposed to work in Bash scripts? Arguments are simply passed as positional untyped parameters $1 etc., and must be parsed and assigned to variables inside the function.
Likewise, a function description would require some sort of commenting conventions (e.g. tags like Doxygen or Javadoc use); this is not generally used, so don't expect an existing solution.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Does anyone know of a good online API that can translate EAN/GTIN barcodes to the product name (and if possible anything extra such as category?)
I have been unable to find one that has a good success rate, below are some barcodes from items just scanned around my house (nothing rare or obscure)
Example barcodes:
5010186014550
20411336
21048753
5449000000996
5051413363249
try this: http://openean.kaufkauf.net/
here is the API link for it: http://openean.kaufkauf.net/api.php
or this: http://www.codecheck.info/
Both are in german but the language doesn't matter, EAN is EAN :).
try your barcodes there, maybe the database contains your EAN's.
This database seems even larger:
ean-search.org
They also have a REST API.
Here is a comprehensive one from Norway:
http://glnservice1.gs1.no/GS1GepirClient/GepirClient.aspx
Regards
Arnfinn
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Are there any tools out there that will index source code, client side, and provide blazing fast search results?
How can I index our internal source code? is related but covers server side tools.
Everything and Locate32 are nice indexing-tools on the windows platform. Just one problem, they only index the file-names.
DocFetcher is another solution, it tries to index the content of the files, but have big memory issues as it cannot index the content of bigger files, and just skips them
I'm also on the search for something to index my data, and i want some tool like locate32 wich is supernice to integrate with the windows shell, but it would be nice to get it to index the content of files also, only brute word indexing, no magic to be done to the data, but let me do plain wildcard searches, like words starting with, ending with, and containing.
But the search is still on.. (for an app, that is..)
Install ctags.
Then ctags -R in the root of your source tree. Many editors, including Vim, can use the resulting tags file to give near-instant search results.
I know this is an old question, but maybe this will help someone else.
Take a look at CodeIDX: http://sourceforge.net/projects/codeidx/.
Using CodeIDX you can index multiple directories using filetype filters and search the created index.
You can open multiple searches at the same time and the results can be viewed in a preview.
Using GNU Global you can get browsable, searchable source code. You can run this locally too or use all the tools that go with it (like less to go straight to a function definition).
See http://www.tamacom.com/tour/kernel/linux/ for an example of the Linux Kernel.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What is the best Windows program to print out source code (more generally, text files)? I'd like the following features:
Includes line numbers
Option of printing 2 or 4 pages on a single sheet of paper.
Header includes filename and timestamp.
Notepad++ is an excellent tool for this (and it's free!). You can print the code out both in normal text, as well as marked-up with colour as you see it on the screen!
I tried the suggested Notepad++ and Codex, but I find them too limiting.
I could not print two columns per sheet in either one of them.
I like to maximize the amount of code per sheet.
A decade ago I would use pcps to print multiple columns of source code, but that software is just too old and cumbersome in this day and age.
For now, I would suggest this, if you want multi column output: http://www.lerup.com/printfile/
UltraEdit works pretty well for all three of those.
www.ultraedit.com
I use Context for most of my non-Visual Studio development, and it does what you asked for and is free. I don't know how well it does color, but the source code colors print in a couple of varying boldnesses, which makes it pretty readable in black and white.
I just use the printer dialog to set the multi-pages per sheet option.
I'm using Codex: http://www.snapfiles.com/get/codex.html
Works pretty good, can both print and publish (export to HTML).
Crimson Editor looks great too!