Just curious, since google search uses a lot of JS and AJAX, would it ever be possible to make instant search work on a text browser like lynx?
if yes, what would it take?
You can still execute google searches from Lynx. The instant search and other javascript quietly degrages to "dumb" search mode.
I suppose it would take adding JS support to lynx? Last I check (and I admit, that was quite a few years ago), lynx didn't have even the beginning of JS support.
Related
Scenario:
In Google Analytic, I notice that it is possible to replace certain URI parameter to words that you want by using search and replace filter like the following example below.
e.g. www.example.com/abc/product_id=3 -----> www.example.com/abc/product_name=shampoo
Problems:
Currently I've got a list of over 1000 products in my hand, instead of creating 1000 search and replace filter, what would be the most efficient and maintainable way to go solve the problem?
I've done some digging and notice that custom dimension could be the solution, however it would require me to modify the the JS code on the FTP sever which I dont have permission on. What other solutions do I have?
If it is not possible to show it here would there be any kind of tutorial that I could follow through?
Really appreciate for the help, Many Thanks
This is not a complete answer, but it's certainly more than a comment.
Besides the tedium of writing this out by hand, I can think of two options available to you.
Firstly, you could use the Google Analytics Management API (https://developers.google.com/analytics/devguides/config/mgmt/v3/). By constructing a set of commands, you could quickly iterate through your list and create the required 1,000 search and replace filters.
Secondly, if you were to use Google Tag Manager you would be able to create a Custom JavaScript Variable that takes the page path and compares it to your list. This variable could then replace the Page field before the hit data is sent to Google Analytics. This may sound more complicated, but it would allow you to pull your solution out of Google Analytics and into the flexible world of JavaScript.
Note that if you rewrite the product_id to a product_name once, you will have to maintain that cross reference every day and keep it in sync with what appears on the website -- make sure you have an automated solution or it will quickly get out-of-sync and be more of a mess than before.
An alternative is to do the search-and-replace on the reporting side.
I know Analytics Edge or Analytics Canvas products could easily do this, or you could just download into Excel or Google Sheets and do a series of lookup formulae.
From last few day , I was searching for static code analysis tool for ColdFusion. I have not got a good one till now. I found two.
YASCA
https://code.google.com/p/cf-metrics/
From YASCA I was getting only XSS alerts and some alerts for session mgmt, nothing more than that. I have tried with my entire project.
I am not even able to properly install cf-metrics using ColdFusion10 , After putting the required jar file in the lib folder I was not able to access any one my IIS site
because of some isapi redirect isse.
Any other tools available?
If you're still looking for a ColdFusion Linter, I would recommend CFLint. It's hosted on GitHub and Maven. The parser was updated to use ANTLR4, so it's much faster than previous editions. We're also making it easier to customize than JSLint.
I've looked at this a couple of times in the past, as I maintain a large CF application.
Each time I looked I was unable to find anything suitable. I spent a while looking into using the Railo CFML parser (because it's open source) to build something ourselves and concluded at the time that it was possible, but was no small task.
You may be able to re-examine the Railo approach, but feed the AST from Railo into an existing code analysis tool. I never got that far, but it may be possible to an extent.
I'd love to hear different, but the short answer is that there's not much out there.
We use DokuWiki to manage our internal documentation but the page renames / moves are not supported very well (there is no built-in way other than messing with raw files manually and the third-party plugin 'pagemove' is no longer developed). Which is a pain.
I'm looking for an alternative which will be similarly simple as DokuWiki (must be filesystem-based) but handle the page renames/moves well. Any suggestions?
For anyone whose search lands them on this page - you might also be interested in the plug-in that keeps links for moved and renamed pages in DokuWiki:
http://www.dokuwiki.org/plugin:move
Starting with Comparison of wiki software and sorting them by Data backend, there seem to be quite a few file system based wiki's. Skipping the webpages that are down or incomprehensible turns up the following viable candidates:
MoinMoin
Twiki
PmWiki (after installing a plugin)
JSPWiki
In the end it's up to you to decide which of these best suits your needs & supports migrating your existing contents to the new wiki (no small feat), but at least it's a start.
If this is possible...
What would you have to use/learn in order to write something to consistently check (every 20 minutes) whether a page has been updated? It would involve logging into the system and navigating the site. As an example I'd wished I'd had in the past, a script to log onto my school's website and check for updated grades.
Thanks to all suggestions :)
will it involve things such as changing window focus, mouse movement, etc?
If so, take a look at autoit
I personally would use Perl. But, I'd imagine there are a number of scripting languages that can accomplish this.
This sounds like you want to knock together something quick and dirty, use what you know, most languages have a library for this. You don't need to learn something new!
Or, if you are just interested in getting notified when the page has changed, you could use some existing service, such as:
Watch That Page
Consider Selenium, specifically the Selenium IDE for Firefox; it's generally used for testing, but it lets you record and replay scripts in your browser -- and then edit them as HTML and JavaScript. You can just insert a test that stops the script once the grades differ from their "expected" values.
Skill set required:
HTML
Firefox Addons
JavaScript (and the DOM)
Selenium
This is basically a shell script based solution for a Unix or Windows with Cygwin system.
To fetch the page of interest,
wget -N <URI>
Do this once from the command line and get the file.
Open the file in some editor and check for your pattern of interest.
You can then use grep, sed, awk, or even perl to filter out things of interest.
You could then write this all into a shell script and either loop it with a sleep or plug it into a cron job.
You would basically need to learn some sed, awk, grep for this. But, that should be quick for the purpose at hand and what you learn would be usable in future for other such needs. You could also dive into perl or python -- but i will not suggest a start from scratch on that for what you need here.
Has any one done this before? It would seem to me that there should be a webservice but i can't find one. I am writing an application for personal use that would just show basic info from IMDB.
The libraries for IMDb seem quite unreliable at present and highly inefficient. I really wish IMDb would just create a webservice.
After a bit of searching I found a reasonable alternative to IMDb. It provides all the basic information such as overview, year, ratings, posters, trailers etc.:
The Movie Database (TMDb).
It provides a webservice with wrappers for several languages and seems reliable so far. The search results have been, for myself, more accurate as well.
There is no webservice available.
But there are enough html scrapers written in every language to suit your needs!
I've used the .NET 3.5 Imdb Services opensource project in a few personal projects.
1 minute google results:
Perl: IMDB-Film
Ruby: libimdb-ruby
Python: IMDbPY
The only "API" the IMDb publishes is a set of plain-text data files containing formatted lists of actors, directors, movies, etc. You would likely need to write your own parser unless somebody has released one for your language. Try Google searches like "imdb api" and "imdb parser".
A screen scraper might be useful, but they specifically prohibit scrapers in their terms of use.
Though this was posted over two years ago, here is a simple python code
import urllib2
movie_id = raw_input('Enter the ID of the movie: ')
json = urllib2.urlopen('http://imdbapi.com/?i=' + movie_id + '&r=json')
print json.read()
save as imdb.py and then run as in shell or terminal or whatever
if you want xml data just replace json with xml
please note that this is using the imdbapi.com website to return a json result visit that website to view more options.
Here is my own solution using RegEx:
private const string UglyMovieRegex = "(?<=5>|3>)(Cast|Director:|Fun\\sStuff|Genre:|Plot:|Runtime:|Tagline:|Writers:)"
+ "|href=\"[\\w\\d/]+?(Genres|name|character)/([\\w]+?)/\".*?>([.\\-\\s\\w]+)</a>"
+ "|(?<=h\\d>)([.\\w\\s'\\-\"]+)(?=<a\\sc|</d|\\|)";
Regex MovieData = new Regex (UglyMovieRegex, RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline );
IMDB prohibits scrapers, and change the page layout every once in a while, so parsing HTML is an option, but be prepared to adjust your code 2-3 times a year (been there, done that, given up). They do have a fee-based service giving the full access to the data, but you'll also need to explain what is it for, and convince them you are not building a competitive website (I had a link to that, but it seems to have changed and can't find it now).
Another alternative is to run the IMDB database on your local machine. Java Movie Database imports the IMDB database files, converts them and provides a locally-accessible copy of IMDB. IMDB has some functionality which Java Movie Database does not have and visa-versa but if what you're looking for is quick access to all the data it might be worth giving this a try.
Now there's is an (undocumented) API like http://www.imdb.com/xml/find?json=1&q=Harry+Potter. See Does IMDB provide an API?
TRYNT Heavy Technologies provides (for free) a web service for retrieving basic IMDb data -- check out their site at http://www.trynt.com/trynt-movie-imdb-api/. They also have a separate service for Television data.
There is at least one unofficial IMDb API called IMDb8. It has about 31 endpoints including
actors/list-born-today
actors/get-awards-summary
title/get-plots
title/get-top-crew
etc. Like any other API it is very straightforward to use. I used this API for building a fun trivia project. You can find a tutorial on how to get started here.