Saturday, May 17, 2008

iPhone unavailable from apple online store




All gone !!!!


I think this is a sign for the newer version of 3G iphone coming in next month.

I still dont know JavaScript !!!!!!!

I got shock while coding when i noticed

0 (zero) AND "" (NULL) are equal

Just tested it

alert(0=="");

it was strange for me when it alerted TRUE

Then i think again......

" Do i know JavaScript? "

Saturday, May 10, 2008

Infosys opens retail stores in India



Infosys foray into Rs.88,000 crore apparel retailing ? - Store opened in Bangalore campus.

Mark Zuckerberg in India



If someone can tell what is he doing in India then you can probably win 10K

http://techgoss.com/fullstory.aspx?storyid=c6025410478050808050808%205:46:32%20AMS14469fa

Wednesday, May 7, 2008

Converting a DateTime value to a Unix Timestamp (ms sql server)

While trying to decode the ExtJs library, I came across a obstacle that the time format of Ext Library was Timestamp (unix) while my data was stored in DateTime format. After long hunt for solving this problem, I came across a page: http://mysql.databases.aspfaq.com/how-do-i-convert-a-sql-server-datetime-value-to-a-unix-timestamp.html

This page provided me the solution for my problem. The solution that I used was put this query in my DataAdapter: "select *, excerpt = left(postDesc,100), timestamp = DATEDIFF(s, '19700101', lastPost) from topic"

Here DATEDIFF(s, '19700101', lastPost) converts datetime into timestamp. The writer suggested that this method can convert dates upto 2038-01-19 at 3:14:08 AM only. The write also suggested the alternative function to get dates after above said date. The function is as:

CREATE FUNCTION dbo.DTtoUnixTS
(
@dt DATETIME
)
RETURNS BIGINT
AS
BEGIN
DECLARE @diff BIGINT
IF @dt >= '20380119'
BEGIN
SET @diff = CONVERT(BIGINT, DATEDIFF(S, '19700101', '20380119'))
+ CONVERT(BIGINT, DATEDIFF(S, '20380119', @dt))
END
ELSE
SET @diff = DATEDIFF(S, '19700101', @dt)
RETURN @diff
END


I think this is a great stuff

First Impression


"First impression is not last but long lasting impression"


Earlier, they use to say that “Your First Impression is the last impression” and now, they say that “your first impression is not the last impression but long-lasting impression. Hence, there is a scope to rectify your “first impression” and at times there is also a need to do so. There are times when we think that we have made a mistake…we should not have carried ourselves the way we did and then we look forward to one chance to correct our “first impression”.


What is “First Impression”

Though, your looks and appearance is a part of your impression but that is not the only thing, which matters. Your impression means your overall personality and it consists of:
  1. The Way you carry yourself
  2. Your Dress-up
  3. The way you express yourself
  4. Your Mannerism
  5. Your Behavior
  6. Your Communication
  7. The way you treat the other person

For an impression to be called as FI, this must be your first meeting with that person. FI can be of two types – Planned and Unplanned. It is planned, when you are aware of it. For example,
  1. Your job - interview,
  2. Business meeting with client,
  3. Dating,
  4. You are invited as a guest
FI can be planned, when you are not prepared for it. For example, people looking at you when you are walking down the street; when you are traveling; when you are just passing through a place, you are at a place where people around you hardly matters to you etc. This first impression process occurs in every new situation. Within the first few seconds, people pass judgment on you – looking for common surface clues. Once the first impression is made, it is virtually irreversible.

The process works like this:
  1. If you appear to be of comparable business or social level, you are considered suitable for further interaction.
  2. If you appear to be of higher business or social status, you are admired and cultivated as a valuable contact.
  3. If you appear to be of lower business or social standing, you are tolerated but kept at arm's length.
If you are in an interview situation, you can either appear to match the corporate culture or not, ultimately affecting the outcome.

For the purpose of this article, we will be concentrating on Planned FI because people making an impression about you, when you are walking down the street, hardly matters to anyone.

How to Change your First Impression????

Suppose you are at the receiving end, you met a person and he made certain opinion about you, it can be about your behavior or the way you carry yourself. Or he has read about you or has heard about you and based on that there was already some notion in his mind. You know that you are not what the other person is thinking or assuming about you. Will you make an attempt to correct that impression or assumption?

Well it depends from person to person , some people are hardly bothered what other people think about them , and some are highly social and for them impression and what people think and talk about them is very important. What actually important is that one should understand what that everyone have positive and negative. Just be confident of themselves and they will end up giving Good Impression.

Saturday, May 3, 2008

Speed optimization in ASP .Net web applications

Following are some of the points, that need to be kept in mind while developing a web based application in ASP .Net:
  • First and most popular way to speed up a web application is to use caching.
  • Disable ViewState property of any control that does not need view state.
  • Put all code of page_load under if(!isPostback) other than codes that specifically need to be loaded on every page load.
  • Use javascript in a separate file and embed them rather than putting it into the same file. Also remove any unused javascripts from file.
  • Do not throw an exception unless doing so is necessary.
  • Disable session state, when not using it.
  • Use StringBuilder for large string operations.
  • In case of using web services use asynchronous call to web services. Also wait for end of the call before the page is fully loaded.
  • Use Threading when downloading huge amount of data.
Apart from the above points, the most important part is the Data Access part of a web application, which reduces the performance of an application. Every time we go for some query of data or other data accesses from database, we reduce the speed of the application. So, following points should be taken care of while establishing a data connection:
  • Use DataReader: If you're just consuming rather than caching data, and operate in a forward-only, read-only way, the data reader represents a better option.
  • Use Caching of Data: However all data cannot be cached or in some cases when data changes every moment caching may not be efficient, still retrieving cached data is faster than retrieving it from database. Caching should be used very carefully because, the longer time you cache a value, the more stale it becomes.
  • Use useful properties of SQLDataSource: Instead of writing a query that includes the "Where", or "Sort By" clauses use the caching, filtering and sorting properties of the SQLDataSourse provider.
  • Use Stored Procedures: Stored Procedures should be used whenever it is possible, as SQL server builds and stores execution plans for procedures.
  • Use Paging: In case of large data handling, one should use paging to make it efficient and fast. There are two types of paging available in ASP .Net: default paging and custom paging. Custom Paging is better among the two, as it requests less data from database than default paging.
Disclaimer: compiled from various sources.