Friday, April 11, 2014

How to backup Filezilla Site Manager settings info here

FOR XP
COPY documents and settings/profile/application data/filezilla/sitemanager.xml to your newly installed directory.


FOR WINDOWS 7 
Open Run Command and type
 %AppData%
find 'FileZilla' folder. In that copy sitemanager.xml to your newly installed directory.

Monday, January 30, 2012

T20 International Aus Vs Ind


1st T20I: Australia v India at Sydney
Feb 1, 2012 (19:35 local | 08:35 GMT | 14:05 IST)


2nd T20I: Australia v India at Melbourne
Feb 3, 2012 (19:35 local | 08:35 GMT | 14:05 IST)

Friday, January 27, 2012

Deadlock


Deadlock is a situation in which the processes waits for the other resource which is occupied by another process in a loop for example take processes P1 and P2 and resources R1 and R2 in the deadlock condition

        P1 -R1 waits for R2
        P2 -R2 waits for R1 

so both processes waits for the other resource to get free for their complete operation.
In such cases - One can avoid deadlocks by following methods

1) Prevention
2) Detection
3) Avoidance
4) Recovery

Digial Modulation Technique


There are three predominant methods of encoding a transmission signal. Amplitude modulation (AM), and frequency modulation (FM) are both analog modulation schemes. The third method is digital modulation.
In Digital modulation followings are involved. They are,

  • QPSK( Quadrature Phase Shift Keying )DVB-S
  • QAM( Qudrature Amplitude Modulation )CABLE
  • COFDM( Coded Orthogonal Frequency Division Mulitiplexing )DVB-T

Standards Otherthan DVB


1. ATSC
The Advanced Television Systems Committee (ATSC) is the group that helped to develop the new digital television standard for the United States, also adopted by Canada, Mexico, and South Korea and being considered by other countries.It is intended to replace the NTSC system and produce wide screen 16:9 images up to 1920×1080 pixels in size. More than six times the display resolution of the earlier standard.
2. ISDB
Integrated Services Digital Broadcasting (ISDB) is the digital television (DTV) and digital audio broadcasting (DAB) format that Japan has created to allow radio and television stations there to convert to digital.
3. ARIB
The Association of Radio Industries and Businesses, commonly known as ARIB, is a standardization organization in Japan. ARIB is designated as the center of promotion of the efficient use of the radio spectrum and designated frequency change support agency.
4. SBTVD
Brazilian Digital Television System is a proposed digital television standard for Brazil.

What is interrupt latency?


It is the time interval between an interrupt has occurred till the time it has been serviced.

Wednesday, January 18, 2012

Java Script - Redirecting to a web page



Java Script code to redirect a web page,

<script language="JavaScript">
function move_now()
{
   window.location = 'http://www.vijaynetwork.com'
}
</script>

If you call the move_now() function from a html page,it will be redirect to the vijaynetwork.com.

Saturday, January 14, 2012

Reverse a single linked list

Node *Reverse (Node *p)
{
  Node *pr = NULL;
  while (p != NULL)
  {
  Node *tmp = p->next;
  p->next = pr;
  pr = p;
  p = tmp;
  }
  return pr;
}

C program to count the number of set bits in an unsigned integer

/*
Program to count no. of bits in an unsigned integer
*/
void main( void )
{
unsigned int a = 15;
int count = 0;

while( a )
{
++count;
a = a & ( a - 1 );
}

clrscr();
printf( "Count is %d\n", count );
getch();
}

Why is sizeof('a') not 1?

Character constants in C are of type int, so sizeof('a') is sizeof(int) (though it's different in C++).
Result:
In Turbo C output is: 2
In Turbo C++ output is: 1

why n++ executes faster than n+1?

The expression n++ requires a single machine instruction such as INR to carry out the increment operation whereas, n+1 requires more instructions to carry out this operation.

Finding middle of the single linked list in a single traversal.

Step 1:
Take two pointers P1 and P2, both pointed to the first element.
Step 2:
Increment P1 by 1 and P2 by two.
Step 3:
Whenever P2 reaches to the end, P1 will be at the middle of the list, just return P1->data.

Finding Loop in a single linked list.


Method-1
If the linked list is read only, take two pointer approach( p1, p2). Both pointing to beginning of linked list. Now increment p1 by 1 and p2 by 2 and compare both. if they are equal there is a cycle. Repeat this untill p2 points to null.

Method-2
If you have the condition not to modify the node but you can change the links, then reverse the linked list. If you reach the head node then there is a cycle.

Difference between memcpy and memmove

memmove offers guaranteed behavior if the source and destination arguments overlap. memcpy makes no such guarantee, and may therefore be more efficiently implementable. When in doubt, it's safer to use memmove.




Nibble Swap & Alternate Bit Swapping

int main( void )
{
    unsigned char  a = 40, b=20;

    a = ( a>>4 ) | ( a<<4 );

    b = ( ( b & 0xAA ) >> 1 ) | ( ( b & 0x55 ) << 1 );
   
    printf( "After Nibble Swap %d\n", a );
    printf( "Alternate Bit swapping %d\n", b );
    getch();

    return 0;
}

Few More String functions..

String Length
int strlen( char *s )
{
    char *ptr = s;

    while( *ptr++ );
    return( ptr-s );
}

String Copy
char *strcpy( char *s, char *t )
{
    char *ptr=s;
    while( *s++ = *t++ );
    return( ptr );
}

String Cat
char *strcat( char *s, char *t )
{
    char *ptr=s;

    while( *s++ );
    while( *s++ = *t++ );
    return( ptr );
}

String Compare
int strcmp( char *s, char *t )
{
    int n;
    while ((n = *s - *t++) == 0 && *s++);
    return( n );
}

String Reverse

int main( void )
{
    char     S[] = "iVijay C Programming";
    int      i, j;

    for( i=0, j=strlen(S)-1; i<((strlen(S))/2); ++i, --j )
    {
         S[i]  ^= S[j] ^=  S[i]  ^= S[j];
    }
    printf( "Reverse Is : %s\n", S );

    return 0;
}

Reverse Bits ( 16 bit )

int main( void )
{
    int a= 0xFF00, i, rev=0;

    for( i = 0; i < 16; ++i )
    {
        if( a & ( 1 << i ) )
        {
            rev |= ( 0x8000 >> i );
        }
    }
    printf( "Input is 0x%04x\n", a );
    printf( "Reverse Bit Is 0x%04x\n", rev );

    return 0;
}

Healthy Eating..

Honey & Cinnamon
It is found that mixture of Honey and Cinnamon cures most of the diseases. Honey is produced in most of the countries of the world. Ayurvedic as well as Yunani medicine have been using honey as a vital medicine for centuries. Scientists of today also accept honey as a Ram Ban (very effective) medicine for all kinds of diseases. Honey can be used without any side effects for any kind of diseases. Today's science says that even though honey is sweet, if taken in the right dosage as a medicine, it does not harm diabetic patients also.

Fish
Eat plenty of fish - fish oil helps prevent headaches. So does ginger, which reduces inflammation and pain.

Apple
Although an apple has a low Vitamin C content, it has antioxidants & flavonoids which enhances the activity of Vitamin C thereby helping to lower the risks of colon cancer, heart attack & stroke.

Strawberry-Protective Fruit
Strawberries have the highest total antioxidant power among major fruits & protect the body from cancer causing, blood vessels clogging free radicals.

Causes of cancer

Smoking is very often the main cause of cancer. It kills us silently and drains money from us quietly. There're 4,000 harmful chemicals (though in diluted form) in one stick of cigarette. Taking one puff is 600 times worst than inhaling the exhaust fumes from vehicles.
Some food that cause cancer are,
1. Barbecued Food
2. Deep Fried Food
3. Overheating Meat
4. Food that is high in fat causes our bile to secrete acid that contains a chemical which is a promoter of cancer cells.
5. Food that contains preservatives, too much salt or nitrates (e.g. Canned food, Salted egg & veggies, sausages, etc.)
6. Overnight Rice (where Aflatoxin is accumulated)
7. Food that is low in fibre: Our body needs 25 gm of both soluble & insoluble fibre daily. We must drink at least 1.5 litres of plain water a day.
8. Contaminated Food.