Skip to main content

Posts

Showing posts from March, 2009

Strenght & Weakness

Recently i was thinking about my strengths and weaknesses, what i realized was, my weaknesses are mirrored reflections of my strengths.

Now i am trying to find out whether it is same with every body else or not.

Let me know about yours.

How to: Check login name availability in ASP.NET MVC using jQuery Validation plug-in

I need to write comments for the below code, bcoz of lack of time i am posting only abstract things,if you want to know something, write comment, i will reply.

HTML login control
< input type="text" name="txtUserName" id="txtUserName" class="textBoxes" />

jQuery Rule: Add the below rule into script tag in header & add reference to jquery-1.2.6.js,jquery.validate.js in Head Element
$(document).ready(function() {
         $("#frmSelfRegister").validate({              rules: { txtUserName: {                          required: true,                          remote: { type: "post",                                     url: "Register/IsLoginAvailable" }                     },     messages:{
txtUserName: { required: "User Name is Required.",                                 remote: jQuery.format("{0} is not available.")}      } });      });

The above validation code executed when the focus changes from txtUserNa…

Interface Inheritance Naming Conflicts

Suppose you have two interfaces, lets say Interface-IA, Interface-IB & in both you have declared Name as a property as follows.
public interface IA {
string Name { get; set; } String Adress { get; set; }
}
public interface IB {
string Name { get; set; }
}
Now, you write an interface -IC which derives from above 2 Interfaces as below,

public interface IC : IA, IB {
int Id { get; set; }
}

When you are try to do the following, you will get an error saying 'Ambiguity between IA.Name and IB.Name'. 
class Test {
    public void GetSomething()      {        IC objIc = new IC();        Textbox1.Text =  objIc.Name();      }
}
It can be solved by upcasting as below.
class Test {
  public void GetSomething()   {       IC objIc = new IC();       Textbox1.Text =  ((IA)objIc).Name();   }
}

23 March 1931

Today would mark 78 years of the sacrifice three young men gave for the nation. Bhagat Singh- Raj Guru- Sukh Dev.So today no one in news would talk about Bhagat Singh, Sukh Dev and Raj Guru the three young men who were hanged on this day near Ferozpur near the present India-Pakistan border. These men never cared about religion and fought for the freedom of the nation.
Indians seem to have forgotten the sacrifice and keep remembering Gandhi. It is definitely an unfortunate thing that people who were not in congress and worked for India's freedom never got the credit they deserve.Bhagat Singh, Sukhdev and Rajguru shall remain in my heart till I die. These are the people whom the young generation should have as idols. Their sacrifice, their patriotism & their principles, we should never forget them.

Fix Google Chrome (Crash) Error, The application failed to initialize properly (0xc00005)

I have Windows Machine with Symantec Anti Virus software,whenever I used to open Google Chrome,I used to get, "The application failed to initialize properly (0xc00005)" error.

After some exploration i found the way to bypass this error.
Here are the steps to follow to get rid of the error.
1. Close Chrome 2. Right click on the Chrome Shortcut and add "--no-sandbox" or "--in-process-plugins" switch as shown in the image below.
"--no-sandbox" switch instructs Chrome not to use Sanbox Security, Sanbox security mode prevents malware from getting installed into computer.
"--in-process-plugins" switch instructs Chrome to run the plug-ins inside the browser process itself. By default Chrome runs plug-ins in seperate process to avoid browser crashing when a plug-in crashes.
Hope it helps.

Hunt for Indian Secret Societies

I am involved in finding the Indian Secret Societies. Recently I had a chat with one of my friend who is also invovled.Here is the chat transcript.
7:17 PM Rahul: Hello one questen 7:18 PM me: hi yeah tell me 7:19 PM Rahul: Like Priory of Sion is more famous for its members like Issac Newton have u ever heard ne prominent person of India of this team?/ 7:21 PM me: u mean in the group of priory of sion? Rahul: yes 7:22 PM me: no i don't think any body has associated with it 7:23 PM Rahul: but it must be.....I mean more brillaint people are very obvius to be attracted to their philosophy 7:24 PM me: yeah, but religion was the main criteria, so people didn't associated with it 7:25 PM if u see the history of Priory, it started around 11th century 7:26 PM Rahul: it is more ancient than that isnt it?? me: and that time, foreign invasion was happening in India 7:27 PM it might be ancient but existed in some other name so during crusades they might have changed the name 7:28 PM Rahul: may be the Man…

Logging Errors with NLog a .NET Logging Library

NLog is a .NET Logging Library, 
Official Site mentions it as follows, NLog is a .NET logging library designed with simplicity and flexibility in mind. With NLog you can process diagnostic messages emitted from any .NET language, augment them with contextual information, format them according to your preference and send them to one or more targets.Using it is very easy. Following steps helps you to get started. (For Visual Studio 2008, Web Applications) 1. Download and install NLog Library
2. If you are using Visual Studio 2008, follow this step as mentioned in my earlier post, to fix issue with Intellisense. 3. Add reference to NLog.dll. 4. Add the following Entries to web.config

5. Add  following entries to your code behind file(for C#)
using NLog; using NLog.Targets; using NLog.Config; using NLog.Win32.Targets;
6.  Create a Logger object as below in your code behind file
catch(Exception ex)
{
    Logger errLogger = LogManager.GetLogger("*");                     e…

Language Extinction

Today i came across this below image, i was aware that the languages are getting extinct but didn't know that India tops in that, may be its because of dependence on English as a Communicative language. Some how we need to protect our language heritage.

I support Media Ombudsman

Why We(I) Support the BJP - Because India Deserves Better

Source : Friends Of BJPWe are some of us - young and professionals. Till some time ago, we assumed that our contribution to the 2009 elections and the future of India would be our one vote. But, somewhere along the line, things changed. Maybe it was 26/11 and seeing some of us out on the streets demanding action. Maybe it was seeing Obama become President, and see politics really change in America, bottom-up. Whatever it was, we have woken up to the fact that we have to do more - much more - if we are going to rewrite our future and rebuild our India into the glorious country that it once was.We know we are on the wrong track when security warnings sent on September 24 for the event that happened on 26/11 are ignored and not acted on. We know we are on the wrong track when we cannot provide adequate electricity 24×7 in our homes and factories - and yet for the sake of votes our political parties offer free power to millions. We know we are on the wrong track when we have schemes like …

Tips & Tricks to go Green

Tip 1# If you plug your Computer,TV, converter box, DVD player and surround sound stereo system into a power strip, you can eliminate the "phantom" loads they may draw when they appear to be off but are still consuming electricity in standby mode.
Tip 2# Use kitchen towels and cloth napkins instead of paper products. Stop using plastic straws, you know how to drink out of a cup?! Avoid buying/taking plastic utensils. If you must, bring home, wash, and reuse. Most can be washed in dishwasher.
Tip 3# Keep plants around the house.
Tip 4# Don't use cloth dryers, instead, dry your clothes to the sun.
Tip 5# Eat less meat. Cutting red meat and dairy consumption once a week reduces green house gas emissions equivalent to driving a 25 miles/gallon vehicle 1160 miles/yr (1860 km/yr). Cutting consumption altogether is equivalent to 8100 mi/yr (13000 km/yr).
Tip 6# Use LCD monitors instead of CRT,LCD monitors use less electricity and generates less heat than CRT monitors.
Submit your Tip…

How to : Creat an empty Solution in Visual Studio 2008

1. Open Visual Studio
2. Go to Tools > Options 3. Check Show all setting check box 4. Select Projects and Solutions from the tree 5. Check "Always Show solution" checkbox
6. Click Ok 7. Now Select Create New Project 8. From tree List select Other Project Types 9. Then Visual Studi Soultions, You will see Blank Solution in Templates section.


Biggest List of Cheet Sheets, Reference Guides to help you

Browser War

Interviewing a Software Engineer

Imagine the following interview with two interviewees, “Player A” and “Player B”:Interviewer: “Okay, sir. Let’s say a ball is hit a little bit to your left. How do you field it?”Player A: “Well, I’d take a few steps to the left and try to get my body in front of the ball. I’d use my left-hand to field the ball, switch the ball over to my right hand, and throw it to first.”Player B: “I’d take a few steps to the left, keeping my body bent at the knees and the back so I could respond to any strange hops the ball might take. If I can get completely in front of the ball, comfortably, I will, but I might have to field it with one hand to the left of my body, if I can’t get my body in front of it. Depending on the direction I’m moving, the time it took me to get to the ball, and whether I got completely in front of it or not, I might have to throw it on the run.”Based upon the two player’s answers to this question, Player B gets hired.This might seem like the right call. The problem is tha…

The disaster of ‘me, me’ by S Gurumurthy

Source: http://www.gurumurthy.net/

This happened in Mangalore as February 14 — now marketed as Valentine’s Day by traders to sell their wares — was approaching.

Upset with public drinking by boys and girls, a freak by name Pramod Muthalik got mad. He got some of them in a pub beaten up like their parents would do, but unlike them. He had informed the media about his show so that the news cameras were in place to telecast the Muthalik action everywhere. Thus the Muthalik show was a joint venture between him and the media to keep away the state police, which could spoil the show. Predictably, the whole world pounced on poor Yeddyurappa who heads the BJP government in Karnataka for allowing Muthalik to take the law into his hands. The BJP, ever torn between its love of Hindu culture and its desire for a modern image, was greatly embarrassed. With the BJP in power in Karnataka, Muthalik knew the publicity value of his show. Had he enacted his theatre elsewhere, like when the Shiv Sena raide…

S.L.Bhairappa on Religion/Caste Conversion

Some of my friends were asking me for S.L.Bhairappa's article published in Vijay Karnataka news paper on conversion . I thought to put it here so that people who are searching for this can find it.Click on image to enlarge.