Jsbi

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 12 May 2010

New Features in C# 4.0

Posted on 00:06 by Unknown
Visual Studio 2010 is out and we have a new version of C# that also accompanies it. That's C# 4.0 - I have been working on C# from the good old 1.0 or 1.1 version upwards. So whats the new 4.0 version of C# got in store for you. Here's a wrap up of the new features available as part of C# 4.0 release.

keyword Dynamic

There's a new kid in the block, with the introduction of a very a key feature of this release called the dynamic keyword. The keyword dynamic bridges the gap that existed between a dynamically and statically - typed languages. Well, C# can now also be considered a dynamically typed language too. You can easily create dynamic objects on the fly and even have their types determined only at run time. You will simply need to add a new namespace called System.Dynamic, and lo you can create expandable objects and even advanced class wrappers. You can also facilitate interoperability between different languages, including the dynamic ones.

To better understand the use of dynamic keyword, here's an example:

dynamic BankAccount = new ExpandoObject();
BankAccount.Number = "174258733-451269";
BankAccount.HolderName = "Jason S";
BankAccount.Branch = "Bangalore";

Though there are many pros and cons for the use of dynamic keyword and the system performance overheads, it makes like that much more simpler for the developer in the end.

Optional (or Default) Method Parameters

If I rightly remember, VB.net is preferred to C# when porting old projects in ancient langues of VB 5 / 6 or when working on creating COM wrappers since VB.net allows you the use of Optional or Default parameters in methods. C# 4.0 has finally got this feature to make it that much more robust in this area.

You can now easily specify a default value for a parameter within the method declaration in C# 4.0. Also, the consumer of the method can either pass a value or can easily skip the parameter. When the parameter is skipped, the default value declared in the method is passed.

Here's a simple example to explain it:
Method declaration:
public static void GetMoney(int amount = 0) { }

Bot the below Method calls for the above declaration are valid in C# 4.0:

GetMoney(); // 0 is used as amount in the method.
GetMoney(1000);

Named Arguments

Well, here's another relief to the developer. Did you know that in C# 4.0 the order of parameters in a method declaration and also the order of arguments you pass to the method when calling don’t need to match anymore!!. You can now easily provide arguments to a method in any order that you are comfortable with by specifying parameter names with-in the method call. This feature also tremendously improves the readability of one's code.

Here's a simple example of using Named Arguments in C# 4.0
var sample = new List();
sample.InsertRange(collection: new List(), index: 0);
sample.InsertRange(index: 0, collection: new List()); // both ways it'll work now

Covariance and Contravariance

Does the heading sound confusing? Well, the use of variance on generic type parameters in interfaces and delegates is yet another new feature available in C# 4.0. Though, strictly speaking it doesn’t add that much of a new functionality. But it rather makes things work in the first place as you expected them to work. Here is a major advantage that is hidden in the power of C# 4.0 in simple line below. Note: The below code wouldn't have compiled up until C# 4.0 was released:

IEnumerable objects = new List();
Now you have the ability to implicitly convert references for objects instantiated with different type arguments. This makes it that much more simpler and easier to reuse code.

Improved COM Interop Support

As I started this article with the dynamic keyword, then we had the optional parameters and named arguments, did you know that all of this actually enables a significant improvement in working with COM interop. Though all these features have arrived pretty late for the COM Interop world - but it's like late than never is better.

Take a look at my ugly code below:

var excelApp = new Excel.Application();
// . . .
excelApp.get_Range("A1", "B4").AutoFormat(
Excel.XlRangeAutoFormat.xlRangeAutoFormatTable3,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);
I can now simply write it in a few lines as below:

excelApp.Range["A1", "B3"].AutoFormat(
Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic2);

Ain't it pretty neat?

So, there you go - that was a wrap up of the new features that are available in C# 4.0. Hope it helped!!
Read More
Posted in microsoft, programming, software, Tips | No comments

Tuesday, 11 May 2010

Can your OS make some ice-cream for you? Well, Linux can!!

Posted on 21:01 by Unknown
We have the OS wars raging like the Cold War down under and ready to erupt any given time. In this time, I have a question for you - Can your OS really churn out some delicious ice-cream? Most probably the answer would be in the negative. But if you happen to run Linux - the answer is YES!!

Well, a company called MooBella (what a name to Moo around with) has come up with a rather geeky invention - a Linux-powered ice cream maker which is currently undergoing demo runs in New England. This is not the size of your average PC though for home use, but a full fledged ice cream machine that reportedly churns out Fresh Dairy Ice Cream in 40 seconds and has a whooping 96 varieties. All this being 100% natural dairy stuff.

The ice cream machine sports a 15" touch screen but under the hood it is basically an off-the-shelf PC Hardware that is in use and best of all it happens to runs Redhat Linux. Well, the basic interface happens to run off Firefox too. This seems to be a cool innovation and also a great example of what Linux can do.

I am sure that in near future we will have refrigerators / TVs / ACs coming with a choice of OS like Linux / Android / Chrome / Windows. Any takers yet?
Read More
Posted in Gadgets, linux, news, programming, story, technology | No comments

FaceBook Login

Posted on 05:07 by Unknown
As you all know by now - Facebook happens to be the single most popular Social Networking website on the Internet. Facebook currently has approximately has more than 400 million active users currently worldwide, which makes it the most sought after web property second to Google.

When you are speaking about 400 million users on facebook, the Facebook login problems are also very similar to the login problems that you will face on any other website online. What I am trying to emphazize here is not the common forgotten username / password kind of problem but at most sophisticated problems related to phishing Facebook accounts which many other large websites online too have to worry about - did I forget google's set of misseries in the early days?

We currently have two different versions of the Facebook Login page online - the standard login page to your facebook account that loads up on your web browser, the other version is called Facebook Lite which is mainly a mobile version of Facebook with faster loading times and also less data on the page. Both these pages have an option called the forgot password which links to a page that helps you change the Facebook password in case you have forgotten the original facebook password.

I would recommend users who often forget their Facebook password to use an online Password Manager that helps you to easily fill your password when online. An online password manager will remember the username and password for your Facebook account, and it will also automatically fill the details into the login form at the Facebook homepage - some even have the functionality to do a Facebook login automatically too (How lazy can it get folks!!).

Well, Facebook users often experience other login problems that may not be really related to the Facebook login page o- at such times it is recommended to clear the web browser cache - which will help you fetch a new copy of the website form the webserver again. I can also think of another way to overcome the Facebook login issue by using a different web browser from the one in which you are having problems to see if the login problem still exists. If it still exists you can very well be sure that web browser is not the real problem here nor is it to do anything with the browser settings that may be the culprit for the Facebook login problems the user is facing.

Do read the tips on Facebook Login.
Read More
Posted in FaceBook, internet, Tips | No comments

A few FaceBook Login Tips

Posted on 05:01 by Unknown
Here are a few tips for Facebook Login problems that have become very common nowadays. if you follow these tips, you can be sure to reduce the number of issues you face with your Facebook login.
  • You should NEVER and EVER click on links from other webpages to visit the Facebook login page. Many a times clicking a Short Url may land you on the Facebook login page - simply close the page and open a new browser session and type the url manually yourself.
  • You must always remember to enter the url directly into your web browser's navigation bar to goto the Facebook login page.
  • Take a few second to reconfirm the url displayed on the navigation bar and also do a check on the website before you start entering your log in information.
  • It is a good practice to use a password manager to enter the login details and process your login. That way no key-press for key loggers to know.
  • Always ensure that you have a very secure password with consists of atleast eight characters/digits. This should include atleast one number, atleast one CAPITAL letter and atleast one special character.
  • Never give your username and password to anyone - let them be your best friend or family member. You'll never know how knowingly or unknowingly that information can land in the wrong hands.
  • Always make it a habit to change your online password the very minute you suspect the account has been compromised - No second thoughts.
Well, that's all the gyan I could think off - if you have any other tips, do post it in the comments below - deeply appreciated.

Also you can find more Facebook login information and some very good security tips at the Facebook Official Login Helper site.
Read More
Posted in FaceBook, internet, software, Tips | No comments

List of Best Engineering Colleges in Bangalore : Ranking of B.E. Colleges for CET and COMEDK

Posted on 04:51 by Unknown
The Karnataka CET (KCET), COMED K and AIEEE entrance exams for all the Karnataka Engineering Colleges have just got over. Well, here is a list of all the Best engineering colleges in Bangalore to choose from for the 4 precious years of Engineering ahead.

We have considered the following facts in providing the ranks to the colleges below:
  • Engineering Colleges only in Bangalore
  • Faculty to Student Ratio
  • Facilities available and the quality
  • Faculty qualifications
  • Previous year placements record
  • Student feedbacks over the years
etc, etc, etc....

So here's the ranking :
  1. RV College of Engineering, Mysore Road (RVCE)
  2. P.E.S. Institute of Technology, Outer Ring Road (PESIT)
  3. B.M.S College of Engineering, Bull Temple Road (BMSCE)
  4. Bangalore Institute of Technology (BIT)
  5. MS Ramiah Institute of Technology (MSRIT)
  6. RNS Institute of Technology (RNSIT)
  7. Sir M Visvewsvaraya Institute of Technology (MVIT)
  8. JSS Academy of Technical Education (JSSATE)
  9. BNM Institute of Technology (BNMIT)
  10. Global Academy of Techology (GAT)
  11. Dayanand Sagar College of Engineering (DSCE)
  12. Dr. Ambedkar Institute of Technology (AIT)
  13. BMS Institute of Technology, Yelahanka (BMSIT)
  14. Sapthagiri College of Engineering (SCE)
  15. CMR Institute of Technology (CMRIT)
  16. New Horizon College of Engineering (NHCE)
  17. P.E.S. School of Engineering (PESSE)
  18. Don Bosco Institute of Technology (DBIT)
  19. Atria Institute of Technology (AtIT)
  20. MV Jayaram College of Engineering (MVJCE)
  21. Vemana Institute of Technology (VIT)
  22. Sri Venkateshwara College of Engineering
  23. HKBK College of Engineering (HKBKCE)
  24. East West Insitute of Technology (EWIT)
Read More
Posted in announcements, Bangalore, India | No comments

Check your COMEDK 2010 (UGET) results online : Complete list of websites to get COMEDK results when Announced

Posted on 04:36 by Unknown
The Consortium of Medical, Engineering and Dental Colleges of Karnataka (COMEDK) in Karnataka was held recently. The results for the COMEDK UGET-2010 can be checked online from the following websites when they are announced. The COMEDK office is located at #37, first floor, Ramanashree chambers, Lady curzon road, Bangalore 560001, Karnataka.

COMEDK Fax number is 080-2598309 (or +91802598309)
COMEDK Email : uget@comedk.org
COMEDK Help desk number : 080-41132810 (4 lines)
COMEDK website www.comedk.org

Candidates who have appeared in COMEDK UGET-2010 can easily check their results from one of the following websites once it is announced online:
  • www.comedk.org [Official Karnataka COMEDK website]
(more websites to be added soon)

Wishing all the students the very Best and also a very Bright and fruitful Engineering Life ahead!!!

Here are some important dates pertaining to COMEDK 2010:
Publishing of COMEDK answer keys: 09.05.2010
Last date for receiving objection pertaining to COMEDK answer keys: 14.05.2010
COMEDK UGET 2010 Results - Publishing of test scores: 26.05.2010
Last date for receiving objection pertaining to test scores: 29.05.2010
Publishing of COMEDK rank list: 07.06.2010
Last date for dispatch of COMEDK rank cards: 17.06.2010
Only centralized counseling for B.Arch
Start date for issue of online application form for B.Arch: 21.05.2010
Last date for receipt of completed application forms for B.Arch: 24.06.2010
Read More
Posted in announcements, Bangalore, India, internet, news | No comments

Check your CET 2010 results online : Complete list of websites to get CET results when Announced

Posted on 04:28 by Unknown
The Common Entrance Test (CET) in Karnataka is conducted by the CET Cell. The results for the Karnataka CET 2010 exams can be checked online from the following websites once they are announced. The Karnataka CET Cell office is situated at 18th Cross, Malleswaram, Bangalore.

Candidates who have appeared in CET 2010 can easily check their results from one of the following websites once it is announced online:
  • http://kar.nic.in/cet [Official Karnataka CET website]
  • http://cet.kar.nic.in [Official Karnataka CET website]
  • www.oneindia.in
  • www.Karnataka.com
  • www.vishwabharati.org
  • www.shimoga.net
  • www.thatskannada.com
  • www.educhoice.org
  • www.bangaloreeducation.com

Wishing all the studenst the very Best and also a very Bright and fruitful Engineering Life ahead!!!

Also note that you can easily check your CET results via SMS by following the simple instructions here.
Read More
Posted in announcements, Bangalore, India, news | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • 100+ wishes on Orkut + Facebook for your Birthday!!
    Well, first of all thanks to all those numerous mails that I received from you all yesterday - it was my birthday yesterday. Unfortunately m...
  • Comodo Firewall :: A really good one
    As internet is becoming common in our house-holds so is the virus and trojan attacks. The best way to protect yourself from the Trojan warfa...
  • Complete list of Orkut Country Specific Websites – use these when Orkut is blocked to scrap
    Orkut – the popular social networking website from the Google stable has many country specific websites. Though most of us are only aware ...
  • www.kseeb.org website is down already
    When everyone is waiting anxiously for the SSLC results we have one shocker - the website where the results are to be announced is down!! Ye...
  • The Tech Evolution : 1GB memory 20 years ago and 1GB memory now
    The Intel Museum , which is located in Santa Clara, California, USA had recently introduced several new exhibits that demonstrate the transf...
  • HP PhotoSmart Free Printer Giveaway contest - Day 3 of 7
    Well, well - Here we have the day 3 of the contest for you. There was a barrage of e-mails yesterday as to what happened to the contest ques...
  • It's been long since I wrote
    Sorry Folks, it's been quite some time since I wrote - a week to be precise. Well - here goes the lame excuse. I was busy with assemblin...
  • Can your OS make some ice-cream for you? Well, Linux can!!
    We have the OS wars raging like the Cold War down under and ready to erupt any given time. In this time, I have a question for you - Can you...
  • Get 2nd PUC results on SMS for May 2012
    The Karnataka 2nd PU results for 2012 can be checked on the internet by following :  Get 2nd PUC results on SMS for May 2012 But did you kno...
  • Now watch videos on YouTube in 720p High Definition (HD) quality for Free
    YouTube recently launched an exclusive High Definition section for the US users. Users who have access to this section can watch the videos...

Categories

  • Android
  • announcements
  • Anti-Virus
  • Asus
  • Bangalore
  • blogging
  • Contests
  • FaceBook
  • Gadgets
  • google
  • Guest Article
  • health
  • HP
  • India
  • internet
  • iPhone
  • K810i
  • linux
  • mac
  • microsoft
  • Mobile
  • MotherBoards
  • mp3
  • NetBook
  • news
  • Office
  • personal
  • photoshop
  • Portable Apps
  • Printers
  • programming
  • Quotes
  • Review
  • software
  • story
  • technology
  • Tips
  • Travel
  • videos
  • vista
  • windows
  • Windows 7
  • Windows 8
  • zune

Blog Archive

  • ▼  2012 (8)
    • ▼  October (2)
      • Why should NFC be switched off when not in use?
      • Back to blogging after a 2yr sabbatical
    • ►  May (6)
  • ►  2011 (1)
    • ►  December (1)
  • ►  2010 (22)
    • ►  July (1)
    • ►  May (16)
    • ►  April (1)
    • ►  March (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2009 (167)
    • ►  December (3)
    • ►  November (19)
    • ►  October (12)
    • ►  September (8)
    • ►  August (11)
    • ►  July (22)
    • ►  June (30)
    • ►  May (26)
    • ►  April (20)
    • ►  March (12)
    • ►  February (4)
  • ►  2008 (102)
    • ►  December (3)
    • ►  November (1)
    • ►  October (10)
    • ►  September (17)
    • ►  August (16)
    • ►  July (5)
    • ►  June (7)
    • ►  May (10)
    • ►  April (18)
    • ►  March (15)
Powered by Blogger.

About Me

Unknown
View my complete profile