Archive

Archive for the ‘tricks’ Category

Chrome Browser History By Date

April 29, 2014 Leave a comment

If you do not want to install any extensions or plug-ins, there is a way how you can browse your browser history faster. The history frame has the following URL: chrome://history-frame/#page=N, where N is the page number. For example, chrome://history-frame/#page=24. From here you can just try to do a binary search.

Advertisements

Samsung Android Phone Problems and Solution

One of the Android phones in my household (Samsung Galaxy S2) started acting chaotically. It showed signs like:

  • stopped charging;
  • showing it was connected via MTP while it wasn’t;
  • was turning on the car mode in a loop during charging;
  • when I was turning it off, it was turning on automatically;
  • when I was plugging the charger, it didn’t vibrate, etc.

The remedy was rather simple – cleanup the microUSB port using a toothbrush. Make sure your Settings/Voice input and output/Text-to-speech settings/Driving mode is unchecked.

RSS Feeds and Bloomberg (and other sites with no RSS)

June 12, 2011 18 comments

For some reason back in 2006 Bloomberg disabled its RSS feeds. So I started to follow Bloomberg less frequently. But Bloomberg offers good news. So I decided to look into this again. Bloomberg still does not offer RSS feeds, but another site does. I found Feed43 (Feed for free).

But first, a couple of words about Bloomberg. It has sites for some keywords – http://topics.bloomberg.com/<keyword>. For example, http://topics.bloomberg.com/belarus (since I wanted to follow the Belarus financial crisis). It makes it easier to get news on a specific topic.

Now all you have to do is to get an RSS feed out of it. This is where Feed43 helps. It allows you to create a feed from a URL after you describe the URL so it could extract your news. It is free and you do not even have to register to use it.

Here are step by step instructions how to do this with an example:

Step 1: Specify source page address (URL)

  1. Provide a URL: http://topics.bloomberg.com/belarus
  2. Specify the encoding in necessary: <leave empty>
  3. Click “Reload”.
  4. It extracts the page contents.
  5. Please note, it removes leading and trailing spaces. This is critical to know when you configure other parameters in the next steps.

Step 2: Define extraction rules.

  1. Provide the Global Search Pattern. This is where your news block starts and ends: <h2>Belarus News</h2>{*}<ul>{%}</ul>
  2. Here the {*} indicates any character, which is used in this case to suppress spaces, {%} indicates the news block itself.
  3. Provide Item (repeatable) Search Pattern. This is the structure of your news item: <li>{*}<h3><a href=”{%}”>{%}</a></h3>{*}<p>{%}</p>{*}</li>
  4. As you can see, here the first {%} stands for the news URL, the second {%} stands for the title, and the third one stands for the news body. These variables will be converted to {%1}, {%2}, and {%3} respectively.
  5. Hit “Extract”.
  6. Now it extracts your news items.

Step 3: Define output format.

  1. RSS feed properties are easy.
  2. Feed Title (should be populated automatically): Belarus News – Bloomberg
  3. Feed Link: http://topics.bloomberg.com/belarus
  4. Feed Description: Belarus News – Bloomberg
  5. RSS item properties refer to the variables you extracted.
  6. Item Title Template (news title): {%2}
  7. Item Link Template (news link): {%1}
  8. Item Content Template (news body): {%3}
  9. Click “Preview” and you will see the extracted news.

Step 4. Get your RSS feed.

  1. Feed43 generates you an XML file with your RSS feed, which you can link to in your RSS aggregator.
  2. If you are picky, you can rename your feed.

The concept is very simple and easy to implement. The only missing thing is ability to get a publication date. But it is not always available and it requires a more complex configuration.

Enjoy!

Dec 12, 2011 (update): It looks like Bloomberg has changed formatting. I will take a look at it with a couple of days to update the information above. But the purpose of this post was to provide some guidance, not very specific way. Stay tuned.

Dec 14, 2011 (update): One of the blog visitors suggested that this pattern should now work for the news item (step 3): <li>{*}<h3><a href=”{%}”>{%}</a></h3>{*}<p>{%}</p>{*}</li>

Dec 03, 2012 (update): I’ve got a lot of feedback recently that this no longer works. I tested it and it does work. Just use the standard double quote in #3 (Step 2). Do not just copy and paste! For some reason, WordPress tries to be too smart.

Dec 03, 2012 (update 2): Another example: Apple Technology News.

Step 1:
1. URL: http://www.bloomberg.com/technology/apple/

Step 2:

1. <h2>More Apple News</h2>{*}<ul>{%}</ul>

3. <li>{*}<a href=”{%}”{*}>{%}</a>{*}</li>

The rest is the same. Don’t forget there are simple double quotes in #3 above.

Categories: news, productivity, tricks Tags: , , ,

Memory Problems in Firefox on Mac. Caching Pitfalls

February 11, 2011 Leave a comment

My MacBook Pro has been having some problems – performance problems, crashes, failures to come back from sleep, etc. Often it showed the black screen while heating up. Some signs point to Firefox. Right now I have 3.6.13 running under Mac OS X 10.6.6. Since I like Firefox more than other browsers, I wanted to find a solution.

It looks like I have found one solution. This is a Firefox add-on – RAMBack. It adds a menu item “Clear Caches” under “Tools” and allows Firefox users to release some memory allocated by Firefox for some performance improvement purposes. In the Activity Monitor I have seen the reduction in “Real Memory” from 250M to 215M. Not much, but that is 14%.

Ironically, at some point allocating more memory to improve performance (by caching) slows down applications. This is not only a Firefox problem. This is a more general architectural problem. When designing an application, one should make sure that improving performance of one aspect does not negatively impacts other aspects on which the former depends on.

Another problem with Firefox on Mac is that it seems to be inefficient in handling many open tabs. Firefox on Windows can handle easily up to 150 tabs open. This is an unreachable limit for Firefox on Mac with comparable hardware configuration. Firefox on Mac starts choking with just 20 tabs.

One Way to Restore Eclipse Workspace

July 18, 2010 25 comments

My desktop got frozen and I had to restart it. After the restart I could not start Eclipse with my workspace, although it could start with newly created workspaces. I tried this (with the right link to the Restorer). Nothing worked (the Restorer did not even start). Here is the solution that worked for me. Delete “.snap” file under “C:\path\myworkspace\.metadata\.plugins\org.eclipse.core.resources” (where C:\path\myworkspace is an example of a path to the workspace) and start Eclipse with your workspace.

Note: This worked for version 3.5.2.

NetBeans 6.7.1 Updates. UML, Woodstock, and SOA for NetBeans 6.8. Solution?

April 28, 2010 19 comments

I wrote about problems getting updates for NetBeans 6.7.1. I also wrote about dropping support for UML, VisualWeb (a.k.a Woodstock), and SOA/JBI/BPEL modules in NetBeans 6.8. It looks like found a solution for both problems.

Problem 1: Unable to get beta updates for NetBeans 6.7.1 (includes VisualWeb/Woodstock, UML, SOA/JBI/BPEL, XML, Python modules and extras).

Solution: Point your “NetBeans Beta” update center from http://updates.netbeans.org/netbeans/updates/6.7.1/uc/final/beta/catalog.xml.gz to http://updates.netbeans.org/netbeans/6.7.1/fixes/2010-04-10_20-12-29/uc2/catalog.xml.gz . Please note the timestamp in the URL, hence, it may work for initial installation only. Not sure if this will work for subsequent updates.

Problem 2: NetBeans dropped support for favorite modules like VisualWeb/Woodstock, UML, SOA/JBI/BPEL.

Solution:  Point your “NetBeans Beta” update center from http://updates.netbeans.org/netbeans/updates/6.8/uc/final/beta/catalog.xml.gz to http://updates.netbeans.org/netbeans/6.8/fixes/2010-04-25_18-00-23/uc2/catalog.xml.gz . Please note the timestamp in the URL, hence, it may work for initial installation only. Not sure if this will work for subsequent updates.

Disclaimer: I have not tested these solutions yet. Please use caution.

Still no response from NetBeans.

Update (Apr 28, 2010): I got response from NetBeans about an hour after I posted this message. They are migrating the server to a new data center and right now they are using their backup servers.

Update (Apr 30, 2010): Updates are back online. The updates above are gone. On top of that I checked the UML project, and the latest commit was in January 2010. There is no guarantee that those updates would allow the UML plug-in to work in NetBeans 6.8.

NetBeans 6.7.1 and UML. Never Ending Saga

April 23, 2010 3 comments

This is getting worse. A couple of months ago I installed NetBeans 6.7.1 from OpenESB. From there I added the UML plug-in (http://updates.netbeans.org/netbeans/updates/6.7.1/uc/final/beta/modules/uml6/org-netbeans-modules-uml-kit.nbm). Today I wanted to add this plug-in on another computer. Guess what? All updates for 6.7.1 are gone. http://updates.netbeans.org/netbeans/updates/6.7.1/ returns “Not Found”. The link for 6.7 works. Is this a temporary problem or permanent mess?

If you use NetBeans 6.7.1, update your update sites to point to 6.7, if you get this problem.

Update (Apr 30, 2010): Updates are back online.

Categories: open-source, tricks Tags: , ,