Happy New Year
Sabke Dilo mai ho sabke liye Pyar, Aanewala har din laye Khusiyo ka Tyohar, Is ummid ka sath aao bhulke sare Gumnew year 2009 ko Hum Sab kare WEL-COME!
more sms
Wednesday, December 31, 2008
Monday, November 10, 2008
vb loop concept
A For...Next loop condition can be terminated by an Exit For statement. Consider the following statement block.
Dim x As IntegerFor x = 1 To 10Print xIf x = 5 ThenPrint "The program exited at x=5"End IfNext
The preceding code increments the value of x by 1 until it reaches the condition x = 5. The Exit For statement is executed and it terminates the For...Next loop. The Following statement block containing Do...While loop is terminated using Exit Do statement.
Dim x As IntegerDo While x < 10Print xx = x + 1If x = 5 ThenPrint "The program is exited at x=5"Exit DoEnd IfLoop
Dim x As IntegerFor x = 1 To 10Print xIf x = 5 ThenPrint "The program exited at x=5"End IfNext
The preceding code increments the value of x by 1 until it reaches the condition x = 5. The Exit For statement is executed and it terminates the For...Next loop. The Following statement block containing Do...While loop is terminated using Exit Do statement.
Dim x As IntegerDo While x < 10Print xx = x + 1If x = 5 ThenPrint "The program is exited at x=5"Exit DoEnd IfLoop
vb loop concept
Do While... Loop Statement
The Do While...Loop is used to execute statements until a certain condition is met. The following Do Loop counts from 1 to 100.
Dim number As Integernumber = 1Do While number <= 100number = number + 1Loop
A variable number is initialized to 1 and then the Do While Loop starts. First, the condition is tested; if condition is True, then the statements are executed. When it gets to the Loop it goes back to the Do and tests condition again. If condition is False on the first pass, the statements are never executed.
While... Wend Statement
A While...Wend statement behaves like the Do While...Loop statement. The following While...Wend counts from 1 to 100
Dim number As Integernumber = 1While number <=100number = number + 1Wend
Do...Loop While Statement
The Do...Loop While statement first executes the statements and then test the condition after each execution. The following program block illustrates the structure:
Dim number As Longnumber = 0Do number = number + 1Loop While number < 201
The programs executes the statements between Do and Loop While structure in any case. Then it determines whether the counter is less than 501. If so, the program again executes the statements between Do and Loop While else exits the Loop.
Do Until...Loop Statement
Unlike the Do While...Loop and While...Wend repetition structures, the Do Until... Loop structure tests a condition for falsity. Statements in the body of a Do Until...Loop are executed repeatedly as long as the loop-continuation test evaluates to False.
An example for Do Until...Loop statement. The coding is typed inside the click event of the command button
Dim number As Longnumber=0Do Until number > 1000number = number + 1Print numberLoop
Numbers between 1 to 1000 will be displayed on the form as soon as you click on the command button.
The For...Next Loop
The For...Next Loop is another way to make loops in Visual Basic. For...Next repetition structure handles all the details of counter-controlled repetition. The following loop counts the numbers from 1 to 100:
Dim x As IntegerFor x = 1 To 50Print xNext
In order to count the numbers from 1 yo 50 in steps of 2, the following loop can be used
For x = 1 To 50 Step 2Print xNext
The following loop counts numbers as 1, 3, 5, 7..etcThe above coding will display numbers vertically on the form. In order to display numbers horizontally the following method can be used.
For x = 1 To 50Print x & Space$ (2);Next
To increase the space between the numbers increase the value inside the brackets after the & Space$.
Following example is a For...Next repetition structure which is with the If condition used.
Dim number As IntegerFor number = 1 To 10If number = 4 ThenPrint "This is number 4"ElsePrint numberEnd IfNext
In the output instead of number 4 you will get the "This is number 4".
The Do While...Loop is used to execute statements until a certain condition is met. The following Do Loop counts from 1 to 100.
Dim number As Integernumber = 1Do While number <= 100number = number + 1Loop
A variable number is initialized to 1 and then the Do While Loop starts. First, the condition is tested; if condition is True, then the statements are executed. When it gets to the Loop it goes back to the Do and tests condition again. If condition is False on the first pass, the statements are never executed.
While... Wend Statement
A While...Wend statement behaves like the Do While...Loop statement. The following While...Wend counts from 1 to 100
Dim number As Integernumber = 1While number <=100number = number + 1Wend
Do...Loop While Statement
The Do...Loop While statement first executes the statements and then test the condition after each execution. The following program block illustrates the structure:
Dim number As Longnumber = 0Do number = number + 1Loop While number < 201
The programs executes the statements between Do and Loop While structure in any case. Then it determines whether the counter is less than 501. If so, the program again executes the statements between Do and Loop While else exits the Loop.
Do Until...Loop Statement
Unlike the Do While...Loop and While...Wend repetition structures, the Do Until... Loop structure tests a condition for falsity. Statements in the body of a Do Until...Loop are executed repeatedly as long as the loop-continuation test evaluates to False.
An example for Do Until...Loop statement. The coding is typed inside the click event of the command button
Dim number As Longnumber=0Do Until number > 1000number = number + 1Print numberLoop
Numbers between 1 to 1000 will be displayed on the form as soon as you click on the command button.
The For...Next Loop
The For...Next Loop is another way to make loops in Visual Basic. For...Next repetition structure handles all the details of counter-controlled repetition. The following loop counts the numbers from 1 to 100:
Dim x As IntegerFor x = 1 To 50Print xNext
In order to count the numbers from 1 yo 50 in steps of 2, the following loop can be used
For x = 1 To 50 Step 2Print xNext
The following loop counts numbers as 1, 3, 5, 7..etcThe above coding will display numbers vertically on the form. In order to display numbers horizontally the following method can be used.
For x = 1 To 50Print x & Space$ (2);Next
To increase the space between the numbers increase the value inside the brackets after the & Space$.
Following example is a For...Next repetition structure which is with the If condition used.
Dim number As IntegerFor number = 1 To 10If number = 4 ThenPrint "This is number 4"ElsePrint numberEnd IfNext
In the output instead of number 4 you will get the "This is number 4".
Sunday, November 2, 2008
Guide to SSI (server side includes)
Don't worry, SSI doesn't require a rocket-science degree to understand and use. It is, however, a highly useful feature that lets you do incredibly time saving tasks such as include the contents of an external file across multiple pages on your site, or access and display server specific information such as the current server time, visitor's IP address, etc. In this tutorial I'll introduce new comers to the wonderful world of SSI! SSI is short for Server Side Includes, by the way.
Does my server support SSI?
The first thing that needs to be settled is whether your server supports SSI and have it enabled. SSI is a Linux/Apache specific feature, so if you're on a Windows server for example, you'll need to look for the Windows equivalent of SSI (sorry, not a Window's guy). To test if your server supports SSI then, you can run a simple test, by inserting the below code inside a webpage, and saving the page with a .shtml extension (the most common extension configured to parse SSI by default):
Does my server support SSI?
The first thing that needs to be settled is whether your server supports SSI and have it enabled. SSI is a Linux/Apache specific feature, so if you're on a Windows server for example, you'll need to look for the Windows equivalent of SSI (sorry, not a Window's guy). To test if your server supports SSI then, you can run a simple test, by inserting the below code inside a webpage, and saving the page with a .shtml extension (the most common extension configured to parse SSI by default):
jQuery TreeView Menu
Description: jQuery TreeView Menu brings together all the most practical features requested in a Tree Menu into one awesome menu script. The markup for the menu is simply a HTML list before the script transforms it into a TreeView Menu that supports the following:
Three different ways to specify the initial state of the tree nodes:
1) All collapsed by default
2) All collapsed except ones with CSS class "open", or
3) All expanded except ones with CSS class "closed".
Ability to specify that only one tree branch is open at any time, collapsing any previous open branches.
Two types of persistence supported:
1) "Cookie" based, persisting last tree state before user navigates away from page.
2) "Location" based, expanding the branch or node with an "href" value that matches that of the current page (location.href). This lets you expand a particular branch that corresponds to the current page.
Supports optional animation with variable speed.
Controls can be added that collapses, expands, or toggles all nodes within a tree.
Supports optional asynchronous loading of the tree, so inner branches are loaded on demand based on JSON data returned from the server.
Three different ways to specify the initial state of the tree nodes:
1) All collapsed by default
2) All collapsed except ones with CSS class "open", or
3) All expanded except ones with CSS class "closed".
Ability to specify that only one tree branch is open at any time, collapsing any previous open branches.
Two types of persistence supported:
1) "Cookie" based, persisting last tree state before user navigates away from page.
2) "Location" based, expanding the branch or node with an "href" value that matches that of the current page (location.href). This lets you expand a particular branch that corresponds to the current page.
Supports optional animation with variable speed.
Controls can be added that collapses, expands, or toggles all nodes within a tree.
Supports optional asynchronous loading of the tree, so inner branches are loaded on demand based on JSON data returned from the server.
Monday, October 27, 2008
Wedding Query (SQL Style)
Wedding Query...................
(SQL Style)
CREATE PROCEDURE
MYMarrrige (
Bridegroom Male (25),
Bride Female (20))
AS
BEGIN
SELECT Bride FROM india_Brides
WHERE FatherInLaw='Millionire'
AND Count (car)>20 AND
HouseStatus="ThreeStoreyed"
AND BrideEduStatus IN
(B.TECH, BE, Degree, MCA, MiBA)
AND Having Brothers=Null
AND Sister=Null
SELECT Gold, Cash, Car, BankBalance
FROM FatherInLaw
UPDATE MyBankAccount
SET MyBal=MyBal+FatherInlawBal
UPDATE My Locker
SET MyLockerContents=
MyLockerContents+FatherInLawGold
INSERT INTO MycarShed
VALUES ('MBW')
END
GO
THEN the wife writes the below
Query:
DROP HUSBAND;
Commit;
(SQL Style)
CREATE PROCEDURE
MYMarrrige (
Bridegroom Male (25),
Bride Female (20))
AS
BEGIN
SELECT Bride FROM india_Brides
WHERE FatherInLaw='Millionire'
AND Count (car)>20 AND
HouseStatus="ThreeStoreyed"
AND BrideEduStatus IN
(B.TECH, BE, Degree, MCA, MiBA)
AND Having Brothers=Null
AND Sister=Null
SELECT Gold, Cash, Car, BankBalance
FROM FatherInLaw
UPDATE MyBankAccount
SET MyBal=MyBal+FatherInlawBal
UPDATE My Locker
SET MyLockerContents=
MyLockerContents+FatherInLawGold
INSERT INTO MycarShed
VALUES ('MBW')
END
GO
THEN the wife writes the below
Query:
DROP HUSBAND;
Commit;
Thursday, October 23, 2008
10 Dipawali SMS
1............................
Deepawali ke is shubh avsar par
Meri shubhkamnaye kabool kijiyega,
Khusi ke is mahol mein
Humko bhi shamil kijiyega
Happy Dipawali.
2............................
Jhilmilate dipon ki aabha se prakashit
Ye diwali aapke ghar aangan mein
Dhan dhanya sukh samridhi aur ishwor
Ke annat aashirwad le kar aaye.
Happy Diwali
3............................
Deepak ka prakash har pal
aapke jivan me ek nayi roshni de,
Bas yehi shubhkamna hai hamari
aapke liye diwali ke is paawan avsar par,
!! Happy diwali !!
4............................
With gleam of Diyas
And the Echo of the Chants
May Happiness and Contentment Fill Your life
Wishing you a very happy and prosperous Diwali!!
5............................
Phool ki shuruvat kali se hoti hai,
Zindagi ki shuruvat pyar se hoti hai,
Pyar ki shuruvat apno se hoti hai aur
apno ki shuruvat aapse hoti hai.
* Happy Diwali *
6............................
May the beauty
Of deepavali season
Fill your home with
Happiness,
And may the coming year
Provide you with all
That bring you joy!
7.............................
Makai ki Roti,
Nimbu ka Aachar,
Suraj Ki Kirne,
Khushiyo ki Bahar,
Chand Ki Chandi,
Apno ka Pyar,
Mubarak Ho Aapko,
DIWALI ka Tyohar
"HAPPY DIPAWALI 2065"
8..............................
Sri ram ji aapke ghar sukh ki barsat karen,
Dukhon ka naash karen.
Prem ki phuljhari wa anar aapke ghar ko roshan kare.
Roshni ke diye aapki zindagi me khusiya layen.
Happy deepawali.
9..............................
aaj se aap ke yaha
dhan ki barsat ho,
maa laxmi ka vas ho,
sankatto ka nash ho
har dil par aapka raj ho,
unnati ka sar par taj ho
ghar me shanti ka vas ho
* HAPPY DIWALI *
10.............................
Apun wishing u a wonderful,
super-duper,
zabardast,
xtra-badhiya,
xtra special
ekdum mast n dhinchak,
bole to ekdum Jhakaas
“HAPPY DiWALi”
Deepawali ke is shubh avsar par
Meri shubhkamnaye kabool kijiyega,
Khusi ke is mahol mein
Humko bhi shamil kijiyega
Happy Dipawali.
2............................
Jhilmilate dipon ki aabha se prakashit
Ye diwali aapke ghar aangan mein
Dhan dhanya sukh samridhi aur ishwor
Ke annat aashirwad le kar aaye.
Happy Diwali
3............................
Deepak ka prakash har pal
aapke jivan me ek nayi roshni de,
Bas yehi shubhkamna hai hamari
aapke liye diwali ke is paawan avsar par,
!! Happy diwali !!
4............................
With gleam of Diyas
And the Echo of the Chants
May Happiness and Contentment Fill Your life
Wishing you a very happy and prosperous Diwali!!
5............................
Phool ki shuruvat kali se hoti hai,
Zindagi ki shuruvat pyar se hoti hai,
Pyar ki shuruvat apno se hoti hai aur
apno ki shuruvat aapse hoti hai.
* Happy Diwali *
6............................
May the beauty
Of deepavali season
Fill your home with
Happiness,
And may the coming year
Provide you with all
That bring you joy!
7.............................
Makai ki Roti,
Nimbu ka Aachar,
Suraj Ki Kirne,
Khushiyo ki Bahar,
Chand Ki Chandi,
Apno ka Pyar,
Mubarak Ho Aapko,
DIWALI ka Tyohar
"HAPPY DIPAWALI 2065"
8..............................
Sri ram ji aapke ghar sukh ki barsat karen,
Dukhon ka naash karen.
Prem ki phuljhari wa anar aapke ghar ko roshan kare.
Roshni ke diye aapki zindagi me khusiya layen.
Happy deepawali.
9..............................
aaj se aap ke yaha
dhan ki barsat ho,
maa laxmi ka vas ho,
sankatto ka nash ho
har dil par aapka raj ho,
unnati ka sar par taj ho
ghar me shanti ka vas ho
* HAPPY DIWALI *
10.............................
Apun wishing u a wonderful,
super-duper,
zabardast,
xtra-badhiya,
xtra special
ekdum mast n dhinchak,
bole to ekdum Jhakaas
“HAPPY DiWALi”
Sunday, October 19, 2008
Listing 3.2. Declaring database and data table variables.
Private Sub Form_Load()
`
` creating Dynaset-type recordsets
`
Dim db As Database ` the database object
Dim rs As Recordset ` the recordset object
`
` create local variables
Dim strDBName As String
Dim strRSName As String
`
` initialize the variables
strDBName = App.Path & "\..\data\books5.mdb"
strRSName = "Titles"
`
End Sub
`
` creating Dynaset-type recordsets
`
Dim db As Database ` the database object
Dim rs As Recordset ` the recordset object
`
` create local variables
Dim strDBName As String
Dim strRSName As String
`
` initialize the variables
strDBName = App.Path & "\..\data\books5.mdb"
strRSName = "Titles"
`
End Sub
PHP's String Formatting Functions
ASP does not come with many string formatting options. We can find the length, make a string upper/lower case, and do some trimming and replacing, but not too much else. Often appearing in forums is the question "What's the ASP equivalent to PHP's [something] function?" This article will highlight a few formatting functions mimicking PHP, and maybe spur your creative mind on to creating more of your own.
Introduction
Anyone who has ever coded in PHP, knows how easy (and almost fun) it can be to work with strings. The creative minds behind the language realized there are some very common things people like to do with strings, so let's incorporate them right into the package. These include functions to strip HTML formatting, count words, perform smart case changes, and more.
But suppose you make a switch, even a temporary one, to ASP. Perhaps just one application or one environment you work with is ASP driven. Well, much to your dismay, you're now on your own if you want any of these advanced string functions! ASP gives you all you need to trim or count the length of a string, but that's about it. This article will help you along with a number of those functions, and no doubt you'll be able to suggest a few of your own in the forum.
For those of you who don't know or simply don't care what PHP has to offer (shame on you), you'll still find this article very handy. The ideas covered are no doubt things you've encountered in the past, and had to handle in a manual way. My objective here, is to provide some package-able, reusable functions that you can call on whenever you need. And no doubt after you've read of what they can do, you will need!
I'll go through five PHP functions, what they do, and how to create an ASP equivalent. They are:
str_word_count
ucfirst
ucwords
strip_tags
str_pad
They same imitation is the finest form of flattery, so let us proceed with flattering the PHP designers.
Introduction
Anyone who has ever coded in PHP, knows how easy (and almost fun) it can be to work with strings. The creative minds behind the language realized there are some very common things people like to do with strings, so let's incorporate them right into the package. These include functions to strip HTML formatting, count words, perform smart case changes, and more.
But suppose you make a switch, even a temporary one, to ASP. Perhaps just one application or one environment you work with is ASP driven. Well, much to your dismay, you're now on your own if you want any of these advanced string functions! ASP gives you all you need to trim or count the length of a string, but that's about it. This article will help you along with a number of those functions, and no doubt you'll be able to suggest a few of your own in the forum.
For those of you who don't know or simply don't care what PHP has to offer (shame on you), you'll still find this article very handy. The ideas covered are no doubt things you've encountered in the past, and had to handle in a manual way. My objective here, is to provide some package-able, reusable functions that you can call on whenever you need. And no doubt after you've read of what they can do, you will need!
I'll go through five PHP functions, what they do, and how to create an ASP equivalent. They are:
str_word_count
ucfirst
ucwords
strip_tags
str_pad
They same imitation is the finest form of flattery, so let us proceed with flattering the PHP designers.
Wednesday, October 15, 2008
hello everybody
First i would like to say thanks to Sagun for give me some idea about this site, And i would like to say all my known and unknown friends to comment me about my content and put your idea on my blog, thanks
Configuring the Alcatel Speed Touch PC with Demon Express Solo
I have been through a 'dark night of the soul' trying to get this configured, with the help of gleanings from the Internet, a lot of trial and error, but with zero from the Demon ADSL (so-called) Technical Helpdesk.
I am running Windows 98SE with the Alcatel Speed Touch PC ADSL modem card and connecting to Demon as ISP. An ADSL link is only supplied by BT in the UK, I believe. There is no guarantee that these settings will work for anyone else, but it may be a good start and an encouragement to try various configurations.
The protocol is RFC2364, point-to-point protocol over ATM. I understand that this is the only one supplied by BT. This affects the driver you choose to load for the modem.
Installation of the card and loading of the drivers is as expected and goes according to the instructions. It produces a new entry in 'Dial up networking' folder (usually found under Start Menu/Programs/Accessories/Communications).
Right clicking the system tray icon and choosing 'Configuration' is where the puzzle starts. I have set VPI (virtual path identifier) to 0 and VCI (virtual channel identifier) to 38. I understand this is the same for all BT's ADSL.
The Framing I found that works is 'VC MUX' (Virtual Circuit Multiplexing) not 'LLC/SNAP' (Logical Link Control/Sub-Network Access Protocol). If you change this setting, you have to click the 'Setting' button and reboot. Only one mode is ticked: 'ITM G.992.1 (G.dmt)'.
I am running Windows 98SE with the Alcatel Speed Touch PC ADSL modem card and connecting to Demon as ISP. An ADSL link is only supplied by BT in the UK, I believe. There is no guarantee that these settings will work for anyone else, but it may be a good start and an encouragement to try various configurations.
The protocol is RFC2364, point-to-point protocol over ATM. I understand that this is the only one supplied by BT. This affects the driver you choose to load for the modem.
Installation of the card and loading of the drivers is as expected and goes according to the instructions. It produces a new entry in 'Dial up networking' folder (usually found under Start Menu/Programs/Accessories/Communications).
Right clicking the system tray icon and choosing 'Configuration' is where the puzzle starts. I have set VPI (virtual path identifier) to 0 and VCI (virtual channel identifier) to 38. I understand this is the same for all BT's ADSL.
The Framing I found that works is 'VC MUX' (Virtual Circuit Multiplexing) not 'LLC/SNAP' (Logical Link Control/Sub-Network Access Protocol). If you change this setting, you have to click the 'Setting' button and reboot. Only one mode is ticked: 'ITM G.992.1 (G.dmt)'.
Subscribe to:
Posts (Atom)

