Search Windows and Linux Networking

Showing posts with label Languages. Show all posts
Showing posts with label Languages. Show all posts

Thursday, December 8, 2011

Using Split Function in VBScript

Using Split Function in VBScript to get needed value

'Using Split Function with delimited with ://

Dim strOutPut ,i, strMngrDn
Dim strValue

strOutPut = "LDAP://cn=Sandeep Kapadane,OU=Pune,DC=Domainname,DC=com"
strValue = Split(strOutPut,"://")

For i = 0 to Ubound(strValue)
    strmngrDn=strValue(1)
Next
Msgbox strMngrDN


OUT PUT OF strMngrDN will be:-
cn=Sandeep Kapadane,OU=Pune,DC=Domainname,DC=com



Friday, December 2, 2011

Simple C program asking user to press ENTER Key and ignore other all keys before continue

Simple C program asking user to press ENTER Key and ignore other keys before continue

 /* Simple program asking user to press ENTER Key and ignore other */
/* Author: Sandeep           Date: 1 DEC 2011 */

#include<stdio.h>
#include<conio.h>
main()
{  char name[80];
   printf("Enter your Name:");
   scanf("%s",&name);
   printf("\nPress \"ENTER\" Key to Continue...");
  
   while(getch()!=0x0d);   /* This is the statement  checking input key with value 0x0d hex value of Enter */
  
   printf("\nHello %s how are you?",name);
   printf("\nPress Any key to Exit");
   getch();
   return(0);
}