header image

Archive for April, 2007

Discount tramadol

Thursday, April 26th, 2007

During hacking on various tasks, discount tramadol, I needed to partition a set of elements quite a few times. Discount tramadol, I have attacked the problem with different homegrown implementations, discount tramadol, mostly involving select-ing every element belonging into the same basket in turn. Discount tramadol, Fortunately I run across divide recently, discount tramadol, which does exactly this… Discount tramadol, No more wheel reinvention! Let’s see a concrete example.

I have an input file like this:

a 53 2 3
b 8 62 1 23
a 9 0 31
b 4 45 4 16 7
b 1 23
c 3 42 2 31 4 6
a 1 3 22
a 7 83 1 23 3
b 1 14 4 15 16 2
c 5 16 2 34

The goal is to sum up all the numbers in rows beginning with the same character (e.g. Discount tramadol, to sum up all the numbers that are in a row beginning with ‘a’). Discount tramadol, The result should look like:

[{"a"=>241}, discount tramadol, {"b"=>246}, discount tramadol, {"c"=>145}]

This is an ideal task for divide! Let’s see one possible solution for the problem:

  1. require ’set’
  2.  
  3. input = Set.new open(‘input.txt).readlines.map{|e| e.chomp}
  4. groups = input.divide {|x, discount tramadol,y| x.map[0][0] == y.map[0][0] }
  5. #build the array of hashes
  6. p groups.map.inject([]) {|a, discount tramadol,g|
  7.    #build the hashes for the number sequences with same letters
  8.     a << g.map.inject(Hash.new(0)) {|h, discount tramadol,v|
  9.     #for every sequence, discount tramadol, sum the numbers it contains
  10.     h[v[0..0]] += v[2..-1].split(‘ ‘).inject(0) {|c, discount tramadol,x|
  11.       c+=x.to_i; c}; h
  12.   }; a
  13. }

The output is:

  1. [{"a"=>241}, discount tramadol, {"b"=>246}, discount tramadol, {"c"=>145}]

Great - it works! Now let’s take a look into the code…

Discount tramadol, The 3rd line loads the lines into a set like this:

  1. <Set: {"b 1 23 ", discount tramadol, "c 5 16 2 34", discount tramadol, "a 9 0 31", discount tramadol, "a 7 83 1 23 3", discount tramadol, "b 1 14 4 15 16 2", discount tramadol, "a 53 2 3", discount tramadol, "c 3 42 2 31 4 6", discount tramadol, "b 4 45 4 16 7", discount tramadol, "b 8 62 1 23", discount tramadol, "a 1 3 22 "}>

The real thing happens on line 4. Discount tramadol, After it’s execution, discount tramadol, groups looks like:

  1. <Set: <Set: {"a 9 0 31", discount tramadol, "a 7 83 1 23 3", discount tramadol, "a 53 2 3", discount tramadol, "a 1 3 22 "}>, discount tramadol, <Set: {"b 1 23 ", discount tramadol, "b 1 14 4 15 16 2", discount tramadol, "b 8 62 1 23", discount tramadol, "b 4 45 4 16 7"}>, discount tramadol, <Set: {"c 5 16 2 34", discount tramadol, "c 3 42 2 31 4 6"}>}>

Discount tramadol, As you can see, discount tramadol, the set is correctly partitioned now - with almost no effort! We did not even need to require an external library… Discount tramadol,
The rest of the code is out of the scope of this article (everybody is always complaining about the long articles here, discount tramadol, so I am trying to keep them short) - and anyway, discount tramadol, the remaining snippet is just a bunch of calls to inject. Discount tramadol, If inject does not feel too natural to you, discount tramadol, don’t worry - it took me months until I got used to it, discount tramadol, and some people (despite of the fact that they fully understand and are able to use it) never reach after it - I guess it’s a matter of taste…’

Similar Posts:buy viagra,discount tramadol,phentermine for order,buy cheap lasix,effexor online

Generic xanax

Thursday, April 19th, 2007

Generic xanax, Do you also have the feeling that you are totally drowning under the unbelievable amount of information that is emited by the Web today? (and by other media as well, generic xanax, which emphasizes this greatly, generic xanax, but I would like to focus solely on the Web aspect in this article). Generic xanax, I feel more and more frustrated day by day, generic xanax, trying to stay on top of my ever-growing heap of unopened e-mails, generic xanax, undread blog entries, generic xanax, unchecked news sites etc. Generic xanax, with a constant fear that though I spend a fair amount of time to consume and process all the information pouring in, generic xanax, I am still missing something very important all the time.

Generic xanax, The “problem” is that there are way too many outstanding blogs, generic xanax, aggregators, generic xanax, social new sites, generic xanax, bookmarking service popular links and other sources of information which you “just can not miss”. Generic xanax, I fear I am definitely losing the battle - there are more and more information sources, generic xanax, but no new, generic xanax, more effective methods (at least I don’t know about them) to handle them, generic xanax, so I guess it’s pretty clear that as time is progressing, generic xanax, more and more info will fall through the cracks (or spending more and more time will be needed to prevent this).

Generic xanax, Since there is no way to stop the exponential growth of information (and if there would be, generic xanax, I doubt anybody would want to utilize it - this is just not the way this problem should be approached), generic xanax, we have to influence the other factor: find more effective means of locating, generic xanax, sorting, generic xanax, bookmarking, generic xanax, processing and otherwise handling the most important data.

Generic xanax, It is interesting to observe that at the moment, generic xanax, services with this intention are not really receiving as much attention as they should - provided that the above reasoning is sound and thus there is a need for more effective handling of existing information. Generic xanax, Google is a trivial example of this: it has loads of interesting tricks to refine, generic xanax, specify and narrow your search (like for example the synonym operator, generic xanax, ~, generic xanax, or other advanced options) - yet I bet 2 hours of my most precious blog-reading time that most of us can not even tell when did we use advanced search for the last time (besides a few trivial ones entered to the search box, generic xanax, like site:.rubyrailways.com). Generic xanax, In most of the cases I never check out more than 2-3 result pages (and just the first page in 90% of the time) - which is interesting, generic xanax, given that I am doing 99% of my searches on google!
In my opinion, generic xanax, exactly the opposite is true: Sites like twitter or tumblelog are immensely popular, generic xanax, flooding you with even more and more information, generic xanax, all the time, generic xanax, every minute, generic xanax, as fast as possible etc. Generic xanax, You did not have enough time to read blogs? No problem, generic xanax, here are tumblelogs and twitter messages, generic xanax, which will help you by shooting even more data right into your face much more frequently than ever. Generic xanax, Welcome to information overloading 2.0.

Generic xanax, Fortunately there is hope on the horizon: some sites are striving to help the situation by providing interesting view on the data, generic xanax, narrowing down the information to a specific niche, generic xanax, or aggregating and presenting it in a way so that you do not have hand-pick it from an enormous set of everything-in-one-bag infosoup. Generic xanax, I will try to describe a few of them which I have found interesting recently.

Generic xanax,

  • Generic xanax, Tools utilizing visual representation of data - People are visual beings. Generic xanax, In most of the cases, generic xanax, a few good, generic xanax, to-the-point pictures or diagrams can tell much more than boring pages of text. Generic xanax, Therefore it is quite intuitive that visual representation of data (typically result of search engine queries) could help to navigate, generic xanax, refine and finally locate relevant results compared to text-only pages.

    Generic xanax, ubuntu My current favorite in this category is quintura. Generic xanax, Besides working as a normal yahoo search, generic xanax, quintura does a lot of other interesting things: it finds related tags to your query and displays them as a tag cloud. Generic xanax, You can further refine the search results or navigate to documents found by any of the related tags. Generic xanax, Hovering over the related tags displays the related tag for that tag. Generic xanax, For example, generic xanax, searching for web scraping, generic xanax, and hovering over the ‘ruby’ related tag, generic xanax, ’scrubyt’ is also displayed - it would definitely take more time to find scrubyt on google, generic xanax, even by using the search term combination ‘web scraping ruby’ - so the functionality offers more than just a fancy view, generic xanax, it actually speeds up and makes searching faster and more effective.

    quitura in action

    Generic xanax, Am I using quintura regularly? Nope. Generic xanax, Given that I have just stated a few sentences ago that it can speed up and make searching faster and more effective’ this is strange - but for some reason, generic xanax, if I am after something, generic xanax, I am trying to find it on google.com. Generic xanax, This is rather irrational, generic xanax, don’t you think so?

  • Generic xanax, Sites concentrating on a specific niche - I feel that (otherwise great) sites like digg are just too overcrowded for me: with over 5000 submissions a day in a lot of diverse categories it simply takes too much time to read even just the front page stories. Generic xanax, I am mainly interested in technology and development related articles - and while a lot of digg proponents are arguing that there are both technology and programming categories on digg, generic xanax, they are still too ‘mainstream’ for my taste and rarely catering to a ardcore developer/hacker in my opinion.
    Fortunately dzone and tektag are here to rescue the situation!

    Generic xanax, ubuntu The guys over at dzone are really cranking all the time to bring a great digg-like site for developers that helps you to stay on top of the current development and technology trends. Generic xanax, The community (which is crucial in the case of such a site of course) is really nice and helpful, generic xanax, and in my opinion the site owners have found (and are consantly fine-tuning) the right magic formula to keep the site from being overloaded with redundant information but still delivering the most relevant news and stuff. Generic xanax, Currently, generic xanax, dzone is my no 1. Generic xanax, source of developer and tech news on the web.

    Generic xanax, ubuntu In my opinion, generic xanax, tektag did not reach the maturity level of dzone yet (I think they are currently in public beta), generic xanax, but once this will happen, generic xanax, I bet it would be a very important and relevant source of information for developers, generic xanax, too. Generic xanax, To put it simple, generic xanax, tektag is to del.icio.us what dzone is to digg. Generic xanax, Why is this so great? If you need to bookmark something, generic xanax, you should just use del.icio.us, generic xanax, right? Wrong - at least if you intend to use del.icio.us in any other way than store your personal bookmarks. Generic xanax, The problem with del.icio.us again is that people are using to bookmark just anything with it - therefore it is virtually impossible to track the movers and shakers in a narrow topic (like programming). Generic xanax, Visiting del.icio.us/popular will show you what’s being bookmarked the most overall, generic xanax, not inside your category of interest (of course I know there are categrories like del.icio.us/popular/programming, generic xanax, but these still do not solve the situation fully by far).
    Tektag has the potential to solve this situation by adding development-specific features and tweaks, generic xanax, but most importantly by the fact that only developer articles will be saved here and thus interpreting the data will me much more easy since the input won’t be cluttered with an enormous amount of information from arbitrary topics. Generic xanax, In my opinion the only question of their succes is: can they build the critical user mass?

  • Generic xanax, Semantic search - if you hear the word ’search engine’ most probably google or one of it’s competitors (yahoo, generic xanax, msn) springs to your mind, generic xanax, and you are right - for the absolute majority of the searches, generic xanax, we are using these sites. Generic xanax, However, generic xanax, they are not really that powerful in letting you express what are you searching for exactly (and of course, generic xanax, stemming from this fact, generic xanax, actually bring you the right results) because they are not trying to understand the documents on the Web: they just crawl and index them to be searchable with phrases they contain. Generic xanax,
    Since the above mentioned sites are still the absolute market leaders in search, generic xanax, It’s clear the keyword based indexing is still good enough(tm) - until somebody will show that there is a more sophisticated way of searching, generic xanax, by trying to apply natural language processing, generic xanax, ontology extraction and other semantic techniques to to actually understand the documents, generic xanax, and deliver usable results with these techniques.

    Generic xanax, ubuntu Spock, generic xanax, an upcoming people search engine is a great example of this principle in action. Generic xanax, Spock’s goal is to crawl the whole web and extract information about people - which is far from trivial - since to do this properly, generic xanax, their spiders have to be smart enough to understand human language as much as possible (A simple example: think of a birth date, generic xanax, e.g. Generic xanax, 07/06/05 - is 07 denoting a day (meaning the 7th day in the month) or a year (the year 2007)? There are hundreds, generic xanax, maybe thousands of date formats used on the Web - and there are far more complicated problems to solve than this).
    OK solving complex problems or not, generic xanax, what’s so cool about a people search engine? After all you can use ye good olde google as for everything else. Generic xanax, Tim O’Reilly has an excellent example against this approach: on google, generic xanax, it’s trivial to find Eric Schmidt, generic xanax, google’s CEO - however it’s much harder to find the other 44 Eric Schmidts returned by spock. Generic xanax, It’s not that google does not find them - but to actually locate them in as much as approximately 4, generic xanax,500, generic xanax,000 returned documents (as opposed to spock’s 45) is nearly impossible. Generic xanax, Spock is probably the best example in this article to demonstrate how a service should bring you all the information you need - and not even a bit more!

Generic xanax, If these services are so promising and they help you to figt the information overloading, generic xanax, thus helping you to find desired information easier (so that you will have more time to read other blogs :-)), generic xanax, why they are less popular by magnitudes than the ones flooding you all the time? Why do not people use as simple things as advanced google search to fight information overloading? Is information overloading a bad thing at all (since it seems the sites generating the most information with the fastest pace are the most popular)? I can’t really answer these questions at the moment, generic xanax, but even if I could, generic xanax, I have to run now to read some interesting (tumble|b)logs. Generic xanax, What!? 20 twitter messages received? Ok, generic xanax, seriously gotta go now…

Similar Posts:discount zoloft,generic xanax,buy tramadol online,buy generic nizoral,buy cheap zithromax online


Bad Behavior has blocked 1233 access attempts in the last 7 days.