General

How WordPress 2.6 ‘Post Revisions’ Retrieved My Unsaved Post Updates

0

The feature announced to be included in the next version of WordPress that had excited me the most was the Post Revisioning feature that was set for the WordPress 2.6 release. After having used 2.6 version for so many days, I finally had a taste of its usefulness today. (Even though I didn’t get to use it much until now, the peace of mind that you get to carry while editing the posts makes the feature worth every effort put in by the WordPress development team).

I did nothing strange on this occasion: while editing and saving and editing and saving and… a draft post, I opened another related, older post in a new browser tab and made a few changes to that post too. Just forgot to save it! I don’t remember when I had closed that tab as my focus was on my current draft post. When I opened the older post again after sometime, WordPress displayed a notice informing me that there is a newer auto-saved version of the post available:

Wordpress 2.6 warns about autosaved version of a post and allows restoring it through its new Post Revisions feature.

Auto-saving posts/drafts is old news. But near the bottom of the page, I could see the complete history of my edits, the relevant date and time information included:

Wordpress 2.6 warns about autosaved version of a post and allows restoring it through its new Post Revisions feature.

Clicking on “View the autosave” link(see the first screenshot above) took me to the automatically saved version of the page. Scrolling down the page took me to “Post Revisions” section where I could select the versions that I want to compare:

Wordpress 2.6 warns about autosaved version of a post and allows restoring it through its new Post Revisions feature.

And finally, I was able to view the two versions side-by-side to see the difference between the two versions visually(click the image to see the larger version):

Wordpress 2.6 warns about autosaved version of a post and allows restoring it through its new Post Revisions feature.

(Bonus: What happens if you compare the same versions of a post? WordPress 2.6 Easteregg!)

A click of a button switched the post to the autosave version(because that’s what I had wanted):

Wordpress 2.6 warns about autosaved version of a post and allows restoring it through its new Post Revisions feature.

And the post was restored:

Wordpress 2.6 warns about autosaved version of a post and allows restoring it through its new Post Revisions feature.

(I didn’t have to worry a lot when restoring because I can always go back to the earlier version because all the revisions are still there.)

Nothing that I didn’t know already but actually going through the process and being able to save those few edits that would have been lost into thin air(or difficult to restore) in earlier versions of WordPress was quite a bit of fun. The whole experience was seamless and tension-free.

Just sharing the excitement ;)

Free Software Community Catching Up to Social Networking Trend

0

The Free software community has never lagged too behind in any technological development field leaving it completely to the closed platform and service providers to rule the market. The first good GPL software that I came across many months ago targeting the social networking domain was Elgg. I liked it, yes, but more importantly, it confirmed the fact that, it may happen late, but the open source community will sure catch up with the new technology domains eventually if they show the potential to become popular and useful.

Another Free software product that I came across today was Laconi.ca and it powers the microblogging service called Identi.ca.

Identi.ca is a microblogging service. Users post short (140 character) notices which are broadcast to their friends and fans using the Web, RSS, or instant messages.

So Identi.ca is a microblogging service like Twitter, Jaiku and Plurk. Yes, yet another micro blogging service you may say. But is there anything new? From Identi.ca’s FAQ:

Our main goal is to provide a fair and transparent service that preserves users’ autonomy. In particular, all the software used for Identi.ca is Free Software, and all the data is available under the Creative Commons Attribution 3.0 license, making it Open Data.

The software also implements the OpenMicroBlogging protocol, meaning that you can have friends on other microblogging services that can receive your notices.

This is huge. The support for OpenID based login itself had impressed me in no time. Then the whole service runs powered by Free software. It uses the OpenMicroBlogging protocol which means that the other similar services can easily interact with it and the users don’t have to create different accounts with different services leading to isolated communities. (And we have to recourse to poor integration alternatives like Ping.FM and HelloTxt.com).

The service is in its infancy still, so use it only if you want to get a feel of it or submit bug and feature requests to help improve the product. Look at the roadmap to and tell me if you are impressed or not. To host it on your own server/domain, you can download laconi.ca source code from its darcs repository(a tar ball is also available). To see an example of laconi.ca being hosted on a private server, go to Foozik.

[ I was not able to login to Foozik.com using my OpenID account though. I wonder if it was intentionally disabled or if there was a glitch in the service. Russell Beattie, the guy who installed Laconi.ca on Foozik.com, also explains why the current architecture of laconica/identi.ca is not scalable. (Also reproves Twitter.com) ]

Another open source social networking software written using Ruby on Rails framework is RailsSpace, which was originally created as part of the book RailsSpace: Building a Social Networking Website with Ruby on Rails. [ Sidenote: Excellent write-up on how to upgrade Rails applications to Rails 2.1 version: A Rails 2.1 case study: upgrading the Insoshi social networking platform ]

Elgg is another open source social networking web application software that is closer to Facebook in functionality than Twitter. You are supposed to download it and install it on your server. Lot of educational institutes are reportedly using this software.

Mugshot is RedHat’s hosted social networking service. I don’t know how easy it is to get its source code and install it on a private server.

Didn’t satisfy your palate yet? Check the list of 10 open source social networking[1] software on Mashable.com. So see you at Identi.ca, let’s turn the heat on!

[1] term used in the broadest sense of its meaning

Don’t Let the “Smart” Way to Write the Swap Function in C++ Fool You

11

Over the years many beginning programmers have shown me two different versions of C++ code for swapping the values of two variables. I am now starting to get tired of correcting the wrong version of the two, especially because of the disappointment that I get to see written on the face of those who thought theirs to be a very clever way of writing code. (Even if the version was correct, I don’t know why they take such personal pride in the code. Obviously they have not invented the code; it has been circling the Internet or the general student community for many years, from where they have merely copied it.)

The first and the correct version for swapping values of two variables, in C++, is like this:
[cpp]
template
void swap(T &a, T &b)
{
T t = a;
a = b;
b = t;
}
[/cpp]

Simple, straightforward, and correct.

The second, wrong version goes like this:
[cpp]
template
void swap(T &a, T &b)
{
a = a + b;
b = a – b;
a = a – b;
}
[/cpp]

The openly asserted advantage of this version is that one variable is saved in this case. But the real, hidden attraction is that it appears to be smartly written code. If only the version was correct too. The problem with this version, of course, is that it is useless for any type that doesn’t support arithmetic operations. It works fine for integer type for example, most of the times at least. It is not guaranteed to work even for floating point variables. But what if I want to swap the values of two Colour objects? Two Shape objects? The requirement that the type support addition and subtraction operations for its objects to be swappable is very absurd.

More problems with the second “smart” version:

  1. The code fails utterly when you pass references to the same variable!
    [cpp]
    int a;
    //read something into a
    ::swap(a, a); //BOOM! ‘a’ is now corrupted and beyond recovery.
    [/cpp]
    The call to swap() in this case should have been a “no operation” like it will be with the first version.
  2. The code fails even for the integers when the the sum of two passed variables exceeds the maximum integer limit on that machine.
  3. The code is also needlessly unnatural. Human beings don’t swap things by indulging in addition and subtraction activities. Unless a person knows that the second version works for at least the integer type (some of the times), or verifies it manually by working through it logically or with a large number of example cases, it is difficult to just see and “get” that the code indeed does the swapping operation.
  4. The second version indeed uses one less variable than the first version but at the same time uses three additional arithmetic operations.

There are similar clever ways to swap two variables(using XOR operation, or macros for example), but all of them have one or more problems of similar kind. The best way to swap two variables is definitely the natural way to do it. By the way, parts of the above explanation apply to swapping variables in most other languages too(can’t think one where it doesn’t). Clever code is useless code if it isn’t also correct at the same time.

How To Create a Single-Click Link to View All Unread EMails in GMail

0

It was one of the requested features in my now almost two years old “GMail Wish List”. I wanted one click access to all of my unread emails only. There is still no such ready-made solution in GMail but I am happy that I can at least create one now, thanks to GMail’s advance search operators and the new “Quick Links” feature introduced as part of GMail Labs experimental features. Follow these five steps to create a custom link to fetch all unread emails from the GMail inbox.

  1. Sign-in to your GMail account. Go to the Settings page and click on the Labs link.

    If it is visible, you can also click the green funnel like icon sitting just to the left of “Settings” link(it is not visible when no GMail Labs feature is selected).

    (If these links are not there, then you have to first enable the GMail Labs feature for your GMail account. Look for a link at the top-right corner of your GMail inbox page to do so.)

  2. On the Labs settings page, enable the “Quick Links” feature, which should be the first feature listed on the page.
  3. Now enter the text “in:inbox is:unread” into GMail search box as shown in the below screenshot, and click the “Search Mail” button(or press ENTER).
  4. Find the “Quick Links” box in the left sidebar(should be somewhere below the “Contacts” and “Labels” boxes) and click the “Add Quick Link” link in it.
  5. Enter some readable text for this custom link as shown in the screenshot below.
  6. Your custom link is piping hot and ready now.

Just click on it whenever you want to load all the unread messages in your inbox. Alas there is no way to just drag this “Quick Links” block and place it at the top of the GMail page.

You can similarly create custom links using other search operators; refer to GMail help for more advanced search operators. These search operators can also be used to create filters and label the messages.

Dreamhost Invitation Codes Give Four Times The Normal Bandwidth and Disk Space

I got this email from th Dreamhost folks couple of weeks ago and they sent me five special invitation codes that can be used to sign-up for Dreamhost web hosting packages but get four times the normal bandwidth and hard disk space. Here is the complete text of the email:

You just got five DreamHost Invitations!

Hey Tabrez!

This email is to let you know that you, yes you, have just been given
five (5) oh so special DreamHost Invitations you can use to invite your
friends and colleagues to DreamHost!

Of course, they don’t NEED an official invitation to sign up, but if you
email them and tell them to use one of these five invitation codes:

600482886073
134970060629
450568037263
670907616224
277212429492

… they will get all these super special advantages not available any
other way:

* They will get four (4) times the normal disk and bandwidth!
* If they choose our five-year plan, they’ll get $150 off!
* If they choose our ten-year plan, they’ll get $200 off!
* YOU will still earn a full $97 for each person who signs up!

That means these five invitations are worth like, $485 in your pocket!
(Each code is good for only ONE sweet DreamHostering referral!)

Tell your invitees to use the 12-digit code you give them in the “Promo
Code” field when they sign up at:

https://signup.dreamhost.com/

So there you are. All the details are included in the quoted email text. Have a look at Dreamhost’s normal shared hosting package feature set. It comes with 500GB of disk space and 5TB of bandwidth. Now multiply that with four!

The reason for not posting the invite codes here earlier is that, in my opinion, even the normal amount of bandwidth and disk space that comes with Dreamhost shared hosting package is way, way more than most users will ever need. I don’t use even 2% of it. What then is the big attraction of four times of that bandwidth and disk space? If there is someone who hosts a lot of static content and this kind of huge disk space and bandwidth make sense to them, well, the invite codes are here for the grabbing:
Code 1 : 600482886073
Code 2 : 134970060629
Code 3 : 450568037263
Code 4 : 670907616224
Code 5 : 277212429492

There may be many such invite codes posted on Dreamhost forum too. Hosting service wise, Dreamhost is pretty good. Apart from the never going away ~30 minutes of downtime almost every week, I like their hosting service very much. For example, they have got very good wiki documentation. You can read reviews of it on the Internet.

buy prednisone medication COD purchase prednisone without prescription needed purchase prednisone prescription online prednisone no prior script prednisone no rx needed order prednisone usa cod buy prednisone without rx from us pharmacy buy prednisone online without rx purchase prednisone without prescription order prednisone saturday delivery buy prednisone amex online without prescription ordering prednisone over the counter buy prednisone amex online without rx ordering Paxil over the counter order Paxil without rx needed order Paxil pharmacy Paxil overnight delivery fed ex ordering Paxil without a script order Paxil order amex order Paxil amex online without prescription buy Paxil pay pal without prescription order rx free Paxil cheapest Paxil available online purchase Paxil without purchase Paxil without prescription how to order Paxil online without a prescription purchase Paxil cod next day delivery buy discount Paxil online buy Paxil no visa online without rx prednisone cheap overnight fedex purchase Strattera usa cod where to buy accutane buy frontpage software cheap mortgage application software buy autocad software best price for final draft 7 software iphone software download plagiarism software to buy for parents Crestor side effects buy masterwriter software discount bmi sesac microsoft software downloads wm5 software download treo software download cheap discount software xxasdf discount trellian software best antivirus software download cheap microsoft word software buy software for mac software discounts for educators microsoft office buy windows xp oem software buy flash cs3 software photoshop cs 5 full fashion conference italy buy Orlistat with amex ordering Lasix over the counter purchase online prescription Lasix without windows 7 product key purchase online cheapest xenical available online prescription xenical online online Maxalt achat Maxalt Zithromax uk sales where to buy Valtrex by cod where to purchase generic valtrex online without a prescription quality generic valtrex cheap valtrex usa (no prescriptions needed for Buspar|buy Buspar with no prescription|online pharmacies Buspar|Buspar cheap|buy Buspar without rx|purchase rx Buspar without|Buspar purchase online|purchase Buspar online without rx|purchase Buspar free consultation|buy Buspar Online|buy Buspar american express|buy Buspar Online|buy cheap Buspar with dr. prescription|Buspar side effects|fedex Buspar without priscription|overnight Buspar without a rx|order cheap overnight Buspar|Buspar toronto|uk order Buspar|Buspar no doctors prescription|Buspar mexico|Buspar order|no prescription Buspar with fedex|order generic Buspar|buy Buspar without rx from us pharmacy|prezzo Buspar|Buspar 10mg|Buspar from canada|purchasing Buspar without a script|buy Buspar australia|purchase Buspar visa without prescription|online purchase Buspar|buy Buspar no perscription cod|buy Buspar drugs|buy Buspar with visa|buy Buspar without rx needed|buy Buspar without prescription|buy Buspar no prescription low cost|purchase purchase Buspar no prescription cheap buy cheap Nolvadex cod buy Nolvadex infertility in internet visa at Wisconsin Ontario omicrosoft office 2003 megaupload online purchase Lasix Buy genuine accutane online buy Cytotec online no rx Cytotec online buy nolvadex amex online where to buy synthroid in germany where to buy synthroid pills cheap discount Nolvadex overnight Accutane 20mg mexico order Lasix usa Lasix overnight delivery fed ex buy zithromax overnight purchase online prescription zithromax without buy Nolvadex cheap cheapest Nolvadex available online buy Nolvadex without rx from us pharmacy buy Nolvadex without a prescription overnight delivery buy 20mg Nolvadex free shipping buy Nolvadex no prescription order zithromax overnight delivery buy zithromax 100 mg visa Valtrex without doctor prescription buying zithromax over the counter order zithromax with no prescription order zithromax 250mg mastercard order zithromax 250 mg visa order zithromax 500mg amex buy mail order Orlistat buy Valtrex online now Orlistat tablets purchase cheap Maxalt onlinebuy generic Maxalt pills free fedex delivery Buspar buy cheap Finpecia under without rx purchase online finpecia without rx finpecia fedex no prescription buy line finpecia generic Crestor uk Buspar u.p.s shipping cod order cheap overnight Buspar free fedex delivery prednisone prednisone no script fedex buy valtrex cheap without prescription generic Valtrex fedex Online overnight shipping Valtrex purchase Zithromax without purchase Zithromax no scams Arimidex delivered overnight order cheap overnight Arimidex purchase Cytotec over the counter fedex buy Cytotec online overnight adobe financial results microsoft office professional 2007 upgrade download microsoft office professional 2007 cheap Buspar by money order how to buy Valtrex without a prescription cheap valtrex uk buy Flomax in the uk purchase Proscar usa cod adobe lm service adobe after effects simple creativity latest adobe flash download buy Crestor amex measurement software Photoshop For Sale buy discount Tamsulosin line Autocad 2010 Review download adobe premiere complete removal of office 2003 adobe indesign cs2 photoshop lightroom 3 cheap where can i buy herbal Crestor where to buy Crestor buy Crestor online cod Buy Fincar online 5 mg mastercard cheapest price for microsoft office vio software discount coupon purchase Orlistat amex online without prescription buy maxalt online without a prescription adobe photoshop 6 cd key Cheap Software Buy Downloads For Photoshop flash catalyst sql ms office 2010 enterprise windows 7 upgrade oem Windows Server 2003 Standard Edition Downloads For Windows 7 Ultimate Buy cheap Valtrex without a perscription application free download office microcoft2007 buy Crestor drugs Valtrex no prescription purchase Valtrex amex online without prescription Xenical Orlistat Flomax buy on line boilsoft viseo create new instrument logic studio 9 cheap purchase finpecia buy Strattera no prescription low cost Flomax best buy buy cheap oem software formica countertop cyberlink power dvd 9 download buy Prednisone no prescriptions cheap indesign cs android acdsee buy Flomax australia generic Valtrex online lightroom license .txt download de driver para corel windvd buy microsoft office online cheap generic Valtrex online buy Flomax online no prescription buy pharmacy Flomax waterview ifinance price price of valtrex buy valtrex doctor prescription buy generic Crestor order generic Tamsulosin imtoo dvd ripper serial look like buy Buspar without a rx cheap digital video want to buy Buspar in malaysia buy Crestor now buy Valtrex without a rx purchase rx Valacyclovir without Bupropion buy Bupropion buy no perscription Amitriptyline buy discount Zithromax cheapest Zithromax available online how to order Buspar online without a rx purchase prednisone cod next day delivery where can i purchase prednisone online prednisone online cash on delivery microsoft office 2010 3 user license cheap mac desktops no prescription Orlistat cod delivery Work Order Tracking System Acrobat 6.0 Professional Oem Version Windows 7 buy Valtrex where order Orlistat no rx cheap proffes Microsoft Windows Xp Purchase buy Valtrex legally buy cheap Proscar without prescription Windows Xp Server buy cheap online pharmacy Buspar buy Prednisone online now generic Zithromax usa accutane 40 mg delivered overnight buy accutane 40 mg with no prescription media 8 oline cheap cs software Discount Microsoft WindowsLightroom 2 Windows 7Ms Office StandardPhotoshop Cs5 UpgradeComputer Monitors For SaleWindows Xp InstallSuite Microsoft OfficeAutocad Version 2007Adobe Acrobat 9.0 Standard DownloadIe8 Download For Windows 7Adobe Paint ShopMicrosoft Service Pack 2Free Download Adobe AcrobatStudent And Teacher EditionManage ImageAdobe Acrobat 7 Pro DownloadVista Home Premium To Windows 7 UltimateWindows 7 Home Premium Upgrade OemAdobe Creative Suite 5 Master Collection Student And Teacher EditionBuy Adobe Photoshop Lightroom 3Ms Office 2010 Home And StudentCompare Photo SoftwareMicrosoft Office Word Viewer 2010Windows 7 Upgrade Student Discount ProfessionalWindows 7 Updates DownloadCreative Suite WebAdobe Reader VistaMicrosoft Windows 7 Home Premium Upgrade 64 BitPhotoshop 2Ie8 Download For Windows 7Photoshop 2009Suite Microsoft OfficeMicrosoft Office 2007 VersionUpgrade Windows Vista To 7Autocad Lt 2010Autocad 2010 Best PriceDownload Acrobat Reader 8 buy Flomax online us pharmacy cheapest Buspar available online where can i purchase Buspar without a prescription sony oem software Valtrex from india Maxalt pharmacy Prednisone prescription order Buspar shipped by cash on delivery purchase Proscar online with overnight delivery buy Valtrex with no prescription prezzo Valtrex buy Valtrex shipped cod Proscar no prescription overnight Proscar overnight no consult where to purchase cheap Cytotec no rx Cytotec to buy canadian prescriptions prednisone where to buy Prednisone online Prednisone buy Prednisone Proscar online no rx overnight where can i buy Valtrex online without a prescription buy valtrex legally order Valtrex without a rx overnight shipping c.o.d prednisone purchase Prednisone money purchase is it legal to buy Cytotec online in australia buy Cytotec cheapest buy finpecia without prescription finpecia buy cod want to buy finpecia in malaysia buy finpecia with mastercard Buy Finpecia 1 mg online microsoft onenote and educator discount window mirror film charset windows 1252 reinstal windows finpecia overdose excel new window windows for loop microsoft office 2008 for mac home student cheap collection software virtual dj software web design software mac cheap or discount photoshop software load windows xp buy Orlistat legally Rosuvastatin generic order buspar pharmacy buy Flomax in mo dreamweaver cs4 windows mobile opera adobe photoshop price epson creativity suite
Go to Top