Thursday, July 25, 2013

little lock icon rounded with circle on iphone 4s

Hi,

Does any one wonder to see why they are seeing a small lock and around arrow symbol on your iPhone.
Wanna avoid it. Don't worry here you go...

It means that.

Portrait orientation Locked. 
To unlock it, Double tap the home , In multitask bar scroll to left, you can see music player options preceeding you can see the Portrait locked symbol. Here just tap to make it unlock. Now the symbol is gone away...Happy...!!!!


Regards,
Ravi

How to type all capital letters in iPhone 4S

Hi,

I just thought to write all capital letters while texting in my iphone 4S. Surprisingly i could not do so.
I verified my Settings -> General -> Keyboard -> Enable Caps Lock : on only. 
But still i could not type all capital letters. Then i found it. Below is the way to do so.

When typing, there is a small upward arrow on left side to the keyboard. Just 'double tap' it. Let it make back ground blue color. Now see the magic of all capital letters.



Regards,
Ravi

Compilation Error CS1061: 'ASP.default_aspx' does not contain a definition for 'abc_CheckChanged'...

Hi Readers,
Greetings.

After long time....
Actually i am on my way to revise some basic concepts, during one program compilation i got the below error. After spending some time found the cause which turned me to think about one small mistake. Thought to share others, so that their time can be save.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'chkTest_CheckChanged' and no extension method 'chkTest_CheckChanged' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)


Cause: There could be other causes too. But for my instance the cause is,
i made the event function to private. Which caused the issue.

Solution: Took of the private and made the event function to public. And my problem solved.
 

    private void chkTest_CheckChanged(object sender, EventArgs e)
        {
            GetRows();
            -------

        }

   public void chkTest_CheckChanged(object sender, EventArgs e)
        {
            GetRows();
            -----
        }


Regards,
Ravi

Saturday, November 10, 2012

How to run oracle sql scripts from command prompt

Thought it seems to.be fundamental, some times on time when it needs things may not be re-collected immediately. For any one's quick reference....

Here we go,

For example :
The DB script which you want to run consider it's name is 'run.sql' and it is in C:\ drive @ Scripts folder.
So go to command prompt ->  and be in the folder where script is available.
It will be like
 
c:\scripts\sqlplus SchemaName/dataSourceName @ run.sql

Hope it helps some one.


Thanks,
Ravi

a program can't display a message on your desktop


Recently on my laptop (windows vista) i am getting one warning pop up message every time
like 'a program can't display a message on your desktop ' , I did search and applied below solution.
It seems to be working fine. I have not got same kind message later time. I just felt update here for some one's quick reference.

start -> run -> services.msc -> search for service name 'Interactive Services Detection' .
So here either stop or disabled the service.

Hope it helps some one.


Thanks,
Ravi






Thursday, November 17, 2011

Interesting point about JavaScript array sorting

Hi All,
Would like to share one point on java script
array sorting, recently one of my team members had one issue during this we realized this one. So it made me to pen this article.

Sorting arrays in JavaScript is done via the method array.sort(). While calling sort() by itself simply sorts the array in alphabetical order.

For example :

//Sort alphabetically and ascending:
var myarray=["CC", "BB", "AA"]
myarray.sort() //Array now becomes ["AA", "BB", "CC"]

Notice that the order is ascending. To make it descending instead, the simplest way is to enlist the help of another Array method in combination, array.reverse():

//Sort alphabetically and descending:
var myarray=["CC", "AA", "BB"]
myarray.sort()
myarray.reverse() //Array now becomes ["CC", "BB", "AA"]

Now, before you start feeling comfortable, consider what happens if we call array.sort() on an array consisting of numbers: ????


var myarray=[7, 40, 300]
myarray.sort() //Array now becomes [300,40,7]

Although 7 is numerically smaller than 40 or 300, lexicographically, it is larger, so 7 appears at the very right of the sorted array. Remember, by default array.sort() sorts its elements in lexicographical order.

And there you have it with array.sort() in terms of its basic usage. But there's a lot more to this method than meets the eye. Array.sort() accepts an optional parameter in the form of a function reference that pretty much lets you sort an array based on any custom criteria, such as sort an array numerically or shuffle it (randomize the order of its elements).
Passing in a function reference into array.sort()
As touched on already, array.sort() accepts an optional parameter in the form of a function reference (lets call it sortfunction). The format of this function looks like this:

array.sort(sortfunction)

function sortfunction(a, b){
//Compare "a" and "b" in some fashion, and return -1, 0, or 1
}

When such a function is passed into array.sort(), the array elements are sorted based on the relationship between each pair of elements "a" and "b" and the function's return value. The three possible return numbers are: <0 (less than 0), 0, or >0 (greater than 0):

    Less than 0: Sort "a" to be a lower index than "b"
     Zero: "a" and "b" should be considered equal, and no sorting performed.
     Greater than 0: Sort "b" to be a lower index than "a".

To sort an array numerically and ascending for example, the body of your function would look like this:

function sortfunction(a, b){
return (a - b) //causes an array to be sorted numerically and ascending
}

More on this below.
Sorting an array in numerical order

To sort an array in numerical order, simply pass a custom sortfunction into array.sort() that returns the difference between "a" and "b", the two parameters indirectly/ automatically fed into the function:

//Sort numerically and ascending:
var myarray=[25, 8, 7, 41]
myarray.sort(function(a,b){return a - b}) //Array now becomes [7, 8, 25, 41]

This works the way it does because whenever "a" is less than "b", a negative value is returned, which results in the smaller elements always appearing to the left of the larger ones, in other words, ascending.

Sort an array numerically but descending isn't much different, and just requires reversing the two operands "a" and "b":

//Sort numerically and descending:
var myarray=[25, 8, 7, 41]
myarray.sort(function(a,b){return b - a}) //Array now becomes [41, 25, 8, 71]

Thats it.

Hope it will useful to many.

Note: Content is refereed from javascriptkit site.

 

Thanks,
Ravi




How to make default page for a site in IIS 7.0

Hi All
Though it seems simple, just wanted to share how to make a default page for IIS 7.0
Generally many applications may display login page as default, in some cases some other pages. So let see how can we do this in IIS 7.0

1) Run -> inetmgr  (It opens IIS settings)
2) Go to your site (application which is hosted / application / folder) on selection of your site,
    you can see options to view the settings at bottom side with 'Features View' and  'Content View'  select the 
    'Features View', here we go, under IIS section we have an option of  'Default Document' , it will allow us to 
     add us the page name which you want to display. And also it allows us to add many pages also and lists all pages which are added. So top one page is the default page which will display when you access the site.
And also it provides couple of actions to move up and down the already added default pages based on our requirement.  Just select the page you can see the 'Actions' window which has the options will allow us to do.


Thanks,
Ravi