Wednesday, June 26, 2013

Windows 8.1 download

Windows 8.1 is available to download:

Checkout this: http://windows.microsoft.com/en-us/windows-8/preview

Enjoy!

Thursday, January 3, 2013

Getting a driving licence in Canada for international drivers ( Alberta )

I have recently move to Canada and thought to share the process of getting driving licence in Canada. I am in Edmonton, Alberta and pretty much similar process is applied in other provinces.

1. If you have are driving in your home country then get Driving Licence Extract from your local transport office ( RTO in case of India). This will help you in appearing road test, else the waiting period is applied.

2. When you are in Canada, go to your local registry and get driving rules book ( yellow book in case of Alberta) This book will help you clear the computer based test. There is no magic to pass this test! I just read this book once and I was able to clear the test in first attempt. 

3. Once you are ready for the theory test, visit registry and appear for it. It is computer aided and you have to get at least 25/30. Once you clear it you can apply for Class 7 driver (learner) licence. Submit your driving licence extract if you have it. Registry will verify your experience and may allow you for road test.

4. Take driving lessons if you want to feel comfortable during road test. I would recommend at least few hours of driving lessons.

5. Book your road test at your local registry. An examiner will accompany you on road test and he will take you in live traffic. He will observe you closely while you drive and give you points for each mistake. if you get more than 75 points then you are fail. 

Don't feel bad if you fail, Whenever you fail understand your mistake and improve on it. Remember it's good to fail and waste 89$ for exam to learn from mistake then involving in accident and harm some innocent people or yourself!  I also failed for the first time of road test but I am glad that I did so I can be a better driver in future! good luck! and let me know if you have any questions!

Happy and safe driving!

Tuesday, September 4, 2012

jQuery Intellisense in Visual Studio

Gusy, here is a way to get a Intellisense for jQuery  API like we get in our Visual studio for other .Net libraries.

Do you want something like this? then follow the steps below...



Steps:
1. Go to http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx and download VSDOC file.

2. Place the downloaded file in visual studio at the same folder where your jquery-#.#.#*.js resides and add the reference like this

for eg:

and that's it! Visual studio will automatically fetch it to give you Intellisense when you use jQuery functions next time.

Cheers!

Monday, August 27, 2012

Mobile apps development

Now a days many of us dream of having our own mobile app and it's so cool to have our own. Let me get you started.

For non developers:

Below websites offers easy online tools which 
  1. http://www.appmakr.com/
  2. http://appinventor.mit.edu/
  3. ibuildapp.com
  4. buzztouch.com
  5. appsbar.com
For Developers: People who can code and understand internals of mobile operating systems, can use below frameworks:

1. Sencha Touch
First HTML5 mobile JavaScript framework that allows developer to develop mobile web apps that look and feel native on iPhone and Android touchscreen devices. Sencha Touch built like the ExtJS component, if have some experience with ExtJS I believe it will bring the advantage for easier learning and programming.
2. jQuery Mobile
I think this is the most awaited in mobile web application framework, because the popularity of jQuery, this framework is not the first but getting a lot of attention, jQuery Mobile: Touch-Optimized Web Framework for Smartphones & Tablets.

A unified user interface system across all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation.
3. WebApp.Net
WebApp.Net is a light weight, powerful javascript framework taking advantage of AJAX technology. It provides a full set of ready to use components to help you develop, quickly and easily, advanced mobile web applications.
4. DTHMLX Touch
DHTMLX Touch is an HTML5-based JavaScript library for building mobile web applications. It’s not just a set of UI widgets, but a complete framework that allows you to create eye-catching, cross-platform web applications for mobile and touch-screen devices.
5. jQTouch
This is not a framework but just a jQuery plugin for mobile web development on the iPhone, iPod Touch, and other forward-thinking devices. Now this project a part of Sencha Labs, the company who developing Sencha Touch. I love the default theme that have black, dark look and feel.
6. iWebKit
iWebKit is a file package designed to help you create your own iPhone, iPod Touch and iPad compatible website or webapp. The kit is accessible to anyone even people without any html knowledge and is simple to understand thanks to the included tutorials.
7. Jo HTML5 Mobile App Framework
Joapp is a UI Widget Framework With a side of DOM, event and data stuff , Open Source Under a friendly OpenBSD License , Cross Platform webOS, iOS, Android, Symbian, Safari, Chrome, Dashboard Widgets. Light and Efficient Minified JavaScript is just over 8K with no dependancies, and compatible with PhoneGap Plus most other JavaScript frameworks
8. iUI: iPhone User Interface Framework
iUI is a framework consisting of a JavaScript library, CSS, and images for developing advanced mobile webapps for iPhone and comparable/compatible devices. iUI has the following features: Create Navigational Menus and iPhone-style interfaces from standard HTML, use or knowledge of JavaScript is not required to create modern mobile web pages, ability to handle phone orientation changes, provide a more “iPhone-like” experience in your Web apps.
9. Sproutcore
SproutCore is an HTML5 application framework for building responsive, desktop-caliber apps in any modern web browser, without plugins.
10. Zepto.js
Zepto.js is a minimalist JavaScript framework for mobile WebKit browsers, with a jQuery-compatible syntax. The goal: a 2-5k library that handles most basic drudge work with a nice API so you can concentrate on getting stuff done. Zepto.js is created by Thomas Fuchs the author of script.aculo.us, the javascript user interface framework.

I hope above information can help you get started!  Good luck!

Wednesday, February 29, 2012

TOAD message "Home is Not valid" (Oracle home is not valid)

I was trying to get my Toad running and it was giving me "Home is not Valid" error, This error doesn't give much information and finding root cause was not easy :( . Here is the thing that I was doing.

- My system had Oracle 9 client pre-installed. I installed Toad and it was giving me home is not valid error.
- My need was to also update Oracle so I went and uninstalled prior version of Oracle client. (remember clean uninstall of prior oracle client is very necessary. If you are expert then try to clear registry entry as well which oracle generally leaves after uninstall as well :( )
- After that I installed Oracle 10.2 and then Toad(9.7.2) but it was still giving the same error. I set the Proper system variables(PATH) and also put my valid TNSnames.ora in proper location, but no luck!!   then I uninstalled Toad 9.7.2 and reinstalled Toad 10.6 and after rebooting machine it's working fine!! :)

I hope this helps.

Also, Please note that I also follow below steps after installing oracle:

1. Add C:\Oracle\ORA10_2\BIN to your PATH environment variable
2. Install ODP dlls in your GAC 
3. Restore your project specific tnsnames.ora  to C:\Oracle\ORA10_2\NETWORK\ADMIN
4. If you are accessing Oracle from .NET web applications running on IIS 5, give IIS/ASPNET permissions on  your Oracle folder
     a.    Grant ASPNET user read/execute permissions on C:\Oracle\ ORA10_2
               i.    In Windows Explorer, right click on the Ora10.1 folder and select Sharing and Security…
               ii.    Click the Security tab
               iii.    Click "Add…"
               iv.    Type yourMachineName\ASPNET in the bottom textbox and click "OK".
               v.    Make sure the Read & Execute, List Folder Contents and Read boxes are checked. Make sure  permissions are propagated to all subfolders.  Click "OK"
    b.    Reset IIS

5. Restart Visual Studio, update your project references to use the new version of Oracle.DataAccess.dll, clean and rebuild your solution
 

 



Friday, February 24, 2012

Listing Date MCX IPO


Stock Market / IPO
Open Date     22-Feb-2012
Close Date     24-Feb-2012
Allotment Date     05-Mar-2012
Refund Date     06-Mar-2012
Listing Date     07-to-09-Mar-2012 (Expected)

MCX IPO Allotment status : http://mis.karvycomputershare.com/ipo









Wednesday, February 15, 2012

Appointment for Passport Renewal through Passport Seva Kendra (PSK)





Getting appointment for any work at Passport Seva Kendra is a BIG DEAL!! I had to renew my passport recently and when I got the appointment at Bangalore Sai Arcade PSK after hard try it was like winning a battle! :) I was in very hurry to renew my passport due to personal issue and I tried couple of days to get the appointment without luck :( . Brokers were saying me 1500Rs to get appointment and he promised me to get appointment at 4:00 pm, which is exactly 2 hours before the official time of taking appointment(6:00 pm). Finally one online friend help me in getting appointment.

I checked with inquiry section at PSK about the procedure to get emergency appointment and the person told me that in emergency cases I need to get a letter from Passport Officer of RPO. As I wanted immediate appointment I tried visiting Koramangala RPO as well but I was not allowed at entrance itself saying I need "Admit Card" from the office of PO to meet PO. Entrance security pointed me to the office number of PO and I tried calling them 60 times, 61st time a lady picked up the call and without listening to my situation she just said "We Don't issue appointment". I tried again and someone just picked the call and keep it aside :(. So getting a appointment to meet PO seems impossible to me.( unless you know him ;) )

Here is some information that can help people who are trying to book an appointment.


1. It is a myth that your online submitted application should be a week or 10 days older to get appointment. You can get appointment if you created profile on same day as well.
2. Be ready at sharp 6:00 PM and login to http://passportindia.gov.in( For Bangalore PSK, other PSK the timings are different! )
3. try your luck! :)

BTW, I was helped with some professional to get appointment.

Best Luck!

Monday, January 9, 2012

App for Mumbai Marathon

TCS Launches Mobile App For Mumbai Marathon

TCS brings to you for the first time a Mobile Application for Mumbai Marathon 2012. Another way to show how true Mumbaikars keep up the spirit of always on the Move. Mumbai Marathon 2012 app provides a range of exciting features for marathon runners as well as enthusiasts who want to keep track of the event.

Race & Events:
  • Keep track of your favorite Mumbai Marathon runners.
  • Check top 25 runners at different check points for Marathon and Half Marathon.
  • Check the info of all the race events of the Marathon.
Results:
  • Check last 3 years results and other records.
  • Check current year results and search your favorite result.
Share on social media:
  • Upload status and photos on Facebook.
  • Tweet as well as upload pics to twitpic and Twitter.
Gallery:
  • Visit previous year photos as well as latest event photos.
Info:
  • Latest news and FAQs about the Marathon.
  • Local weather information for the current week.

Download TCS Mumbai Marathon App

Android

Blackberry (Not available yet :| )

iPhone (Not available yet :( )



Sunday, December 25, 2011


Twitter keyboard shortcuts  (twitter cheat sheet)

n                             post a new status update(this works from any page)

r                              reply to your selected tweet

t                              retweet(only works on twitter profiles(other than your’s))

m                            direct message (you need to fill the recipient)

/                              move the cursor to the search box

.                              move back to the top of the page

g then h                 go to your home page

g then r                 see your @mentions

g then m                see your direct messages

g then p                 go to your profile page (twitter.com/username)

g then u                 go to a specific user’s profile page

Thursday, December 8, 2011

ECas Status Tracking Tool: (E-Cas tracking )



Friends,

I thought saving some time for you while you check your ECas status. So here is simple tool which can help you.



Here are the simple steps:
1. Download  WinCIC.exec from:  http://min.us/mtEFE0ufB
    (Please rename it to WinCIC.exe after downloading)
2.Enter your details.
3. Click on "Save your details" button to save your details in your local machine(C:\CIC.txt)
(use save button to save your details in your private computer only, if you are using public computer then do not use this option. When you click save button this tool will save your information in your local machine and reuse it when you start it next time so you don't have to enter all information again :) )
4. wait for the Ecas page to be loaded and after that Automate button will be enabled.
5. Click on Automate button and wait!  You will see your status page in some time.


I know there are some bugs in this tool but I will be keep on fixing it and will try to provide you new version soon. If you face any issue then please let me know so that I can fix it.

Features planned:
- currently this tool is  loading to main page and then you have to click on link (say RBVO or In Process) to go to actual status page. I will fix it soon to directly route to actual status page.
- Auto scheduling and daily status email to your mail box.
- email notification only when status changes. (developing this will be fun part!!)
- Any other??? Please share so I can add them!


I hope this tool will atleast save your 5 seconds daily! :)



Disclaimer:
- The purpose of this tool is to just check your status and none of your personal data is shared with anyone. I have developed this tool for the benefit of the people and it's available free and no-one should engage in reselling it or collect money for this service. This tool just reads the web page of Canadian Immigration web-site and it does not modify any data present there. Neither me nor this tool is responsible for any kind of loss that may occur while using this.

I have developed this tool just for my interest and to learn technology, Please refrain from any kind of misuse! I am also planning to share code once I have email functionality implemented so that interested people can help me in maintaining and adding more features.


Thanks,
Sunil



Saturday, December 3, 2011

PCC through Passport Seva Kendra

Just wanted to share about the process/quick steps to get PCC from passport seva kendra:

-  Go to Passport Seva Portal   http://www.passportindia.gov.in/ and create your application.
-  Create appointment from manager appointment(you get appointment 2 days prior, suppose you want appointment on 04/12/2011 then try for looking for appointment on 02/12/2011, also official timings to schedule appointment are from morning 8.00 am but I got appointment day before in the evening around 6:30 pm)
- Reach your PSKat slightly before time and security will let you by your appointment time, get your documents verified(carry origianals) and get your token.
- Process is pretty organized here! after getting token go to counter A->B->C . Counter A is to get your Digital Photograph and finger prints( By TCS staff). Counter B is to just cross check everything by junior Govt Employee and Counter C is to submit your application to Govt employee
- You will be given acknowledgement from counter C and while leaving PSK.

Real fun starts now!
- your app goes to Police Commissioner's office from here and then they will forward it to your local police station, Local police station will call you and verify your documents and then they will send back the feedback to Police Commissioner's office.
-if you're lucky above process will be done in 3 days after submitting your app at PSK. After Police Commissioner's office your application goes to RPO(in our case it was at Koramangala, Bangalore).
-You can also check your application status online, if you see “PCC application is under review at Passport Seva Kendra.” that means your application is at RPO.
- Go to RPO Koramangala at around 8:30-9:00 am and get a inquiry token and they will sent you to counter no 5 at RPO. Show your PSK acknowledgement to the person sitting at counter 5 and he will upload your files(I am not sure why they don't do it without our telling, if you need your PCC fast then visit RPO and get this done!)
- That's all once you got your application uploaded by RPO you can directly go to PSK and collect your PCC! Simple ;)

I hope this helps you!

ps: We are currently working on a https://footrr.com/  Just promote the brands that you love and get paid for doing it. See if that interests you!

Wednesday, August 17, 2011

Remove empty lines in Visual Studio in CS file

Just another use of regular expression. I had a situation where a developer has checked in file with lot of white spaces in between methods and I want cs file to look clean so here is the solution:

Visual Studio has ability to delete empty lines in replace operation using regular expressions.

1.Click Ctrl-H (quick replace)
2. Tick "Use Regular Expressions"
3. In Find specify ^$\n
4. In Replace box delete everything.
5 Click "Replace All"
All empty lines will be deleted.

Thursday, August 11, 2011

C# Regular Expressions Cheat Sheet

System.Text.RegularExpressions provides regular expression matching in C#



Character
Description
\ Marks the next character as either a special character or escapes a literal. For example, "n" matches the character "n". "\n" matches a newline character. The sequence "\\" matches "\" and "\(" matches "(".
Note: double quotes may be escaped by doubling them: ""
^ Depending on whether the MultiLine option is set, matches the position before the first character in a line, or the first character in the string.

Eg:

string input = "WXYZ"
string pattern = "XYZ"
if (System.Text.RegularExpressions.Regex.IsMatch(input, "^"+pattern))
{
Console.WriteLine("Match");
}

$ Depending on whether the MultiLine option is set, matches the position after the last character in a line, or the last character in the string.
* Matches the preceding character zero or more times. For example, "zo*" matches either "z" or "zoo".
+ Matches the preceding character one or more times. For example, "zo+" matches "zoo" but not "z".
? Matches the preceding character zero or one time. For example, "a?ve?" matches the "ve" in "never".
. Matches any single character except a newline character.
(pattern) Matches pattern and remembers the match. The matched substring can be retrieved from the resulting Matches collection, using Item [0]...[n]. To match parentheses characters ( ), use "\(" or "\)".
(?pattern) Matches pattern and gives the match a name.
(?:pattern) A non-capturing group
(?=...) A positive lookahead
(?!...) A negative lookahead
(?<=...) A positive lookbehind .
(? A negative lookbehind .
x|y Matches either x or y. For example, "z|wood" matches "z" or "wood". "(z|w)oo" matches "zoo" or "wood".
{n} n is a non-negative integer. Matches exactly n times. For example, "o{2}" does not match the "o" in "Bob," but matches the first two o's in "foooood".
{n,} n is a non-negative integer. Matches at least n times. For example, "o{2,}" does not match the "o" in "Bob" and matches all the o's in "foooood." "o{1,}" is equivalent to "o+". "o{0,}" is equivalent to "o*".
{n,m} m and n are non-negative integers. Matches at least n and at most m times. For example, "o{1,3}" matches the first three o's in "fooooood." "o{0,1}" is equivalent to "o?".
[xyz] A character set. Matches any one of the enclosed characters. For example, "[abc]" matches the "a" in "plain".
[^xyz] A negative character set. Matches any character not enclosed. For example, "[^abc]" matches the "p" in "plain".
[a-z] A range of characters. Matches any character in the specified range. For example, "[a-z]" matches any lowercase alphabetic character in the range "a" through "z".

Eg:

string input = "/content/alternate-1.aspx";
Match match = Regex.Match(input, @"content/([A-Za-z0-9\-]+)\.aspx$");

[^m-z] A negative range characters. Matches any character not in the specified range. For example, "[m-z]" matches any character not in the range "m" through "z".
\b Matches a word boundary, that is, the position between a word and a space. For example, "er\b" matches the "er" in "never" but not the "er" in "verb".
\B Matches a non-word boundary. "ea*r\B" matches the "ear" in "never early".
\d Matches a digit character. Equivalent to [0-9].

Eg:

Regex rx= new Regex(@"\d+");
Match match = rx.Match("My age is 27");
if (match.Success)
{
Console.WriteLine(match.Value);
}


\D Matches a non-digit character. Equivalent to [^0-9].
\f Matches a form-feed character.
\k A back-reference to a named group.
\n Matches a newline character.
\r Matches a carriage return character.
\s Matches any white space including space, tab, form-feed, etc. Equivalent to "[ \f\n\r\t\v]".
\S Matches any nonwhite space character. Equivalent to "[^ \f\n\r\t\v]".
\t Matches a tab character.
\v Matches a vertical tab character.
\w Matches any word character including underscore. Equivalent to "[A-Za-z0-9_]".
\W Matches any non-word character. Equivalent to "[^A-Za-z0-9_]".
\num Matches num, where num is a positive integer. A reference back to remembered matches. For example, "(.)\1" matches two consecutive identical characters.
\n Matches n, where n is an octal escape value. Octal escape values must be 1, 2, or 3 digits long. For example, "\11" and "\011" both match a tab character. "\0011" is the equivalent of "\001" & "1". Octal escape values must not exceed 256. If they do, only the first two digits comprise the expression. Allows ASCII codes to be used in regular expressions.
\xn Matches n, where n is a hexadecimal escape value. Hexadecimal escape values must be exactly two digits long. For example, "\x41" matches "A". "\x041" is equivalent to "\x04" & "1". Allows ASCII codes to be used in regular expressions.
\un Matches a Unicode character expressed in hexadecimal notation with exactly four numeric digits. "\u0200" matches a space character.
\A Matches the position before the first character in a string. Not affected by the MultiLine setting
\Z Matches the position after the last character of a string. Not affected by the MultiLine setting.
\G Specifies that the matches must be consecutive, without any intervening non-matching characters.


I am in the process to build example for each one of above! :)

C# 4.0 Optional Parameters - Interview Questions

Microsoft introduced Optional Parameters in C# 4.0

it works likes this:

int Add(int a, int b = 5)
{
retrun(a+b);
}

now when you invoke this function like Add(1,2) it will return 3 but when you do Add(1) it will take b's default value as 5 and add 1+5 and return 6.

Optional parameters make interoperating with COM easier. Previously, C# had to pass in every parameter in the method of the COM component, even those that are optional.

Monday, April 19, 2010

SQL server Reporting Report parameters

Displaying last working day as default in SSRS Date report parameter:
I was creating a report today with SQL server reporting service and I had a requirement to display previous working day as default selected value whenever report is generated. We work from Monday to Friday and say if user runs report on Monday then default selection should be last Friday.
To do this:
- Create a Report file (RDL)
- Go to the Layout page
- right click and Add Report parameters
- Add a parameter with Data type DateTime
- Select non-queried radio button and set formula as =IIF(Weekday(TODAY())<3,DATEADD("d",-1 * (Weekday(TODAY())+1),TODAY()),DATEADD("d",-1,TODAY()))
and your'e good to go!!