Saturday, November 28, 2009

Online calculator 2: Loan Calculator


The results of this loan payment calculator are for comparison purposes only. They will be a close approximation of actual loan repayments if available at the terms entered, from a financial institution. This is being provided for you to plan your next loan application. To use, enter values for the Loan Amount, Number of Months for Loan, and the Interest Rate (e.g. 7.25), and click the Calculate button. Clicking the Reset button will clear entered values.

DescriptionData Entry
Loan Amount
Loan Length in Months
Interest Rate
Monthly PaymentCalculated
Enter only numeric values (no commas), using decimal points where needed.
Non-numeric values will cause errors.

This free script provided by
JavaScript Kit

Online calculator 1






This free script provided by
JavaScript Kit

Thursday, October 15, 2009

Missing Text Document template in Windows Context Menu (Right Click)

Missing Text Document template in Windows Context Menu (Right Click)


If you find out your right click (aka context menu) in Windows; is missing the Text Document, a simple and fast method to create a text document with Notepad, you could resolve this problem with this solution:

Download TweakUI.exe
or visit http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx

Navigate to template

Toggle Text Document on and off, while click Apply
How?
- Uncheck the Text Document, and click Apply
- Check the Text Document, and Click Apply


Other very useful utilities also available at: http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx



The Text Document re-appear.

Thursday, August 27, 2009

VB6: Cellphone database, database manipulation Part 1b

With some little modification, we could extract records


Dim gLibWS As Workspace
Dim gLibDB As Database
Dim gLibDyna As Recordset
Dim gLibSnap As Recordset
Dim gLibTable As Recordset
Dim gDbName As String
Dim ftFldName$
Dim ftFld$

gDbName = App.Path & "\phone.mdb"

' Print database name with path to debug screen
Debug.Print gDbName

Set gLibWS = DBEngine.CreateWorkspace("Workspace", "Admin", "")

' Open DataBase with Exclusive and Read/Write access
Set gLibDB = gLibWS.OpenDatabase(gDbName$, True, False)
Set gLibSnap = gLibDB.OpenRecordset("cellphone", dbOpenSnapshot)
giFldTotal% = gLibDB.TableDefs("cellphone").Fields.Count - 1

' Print total of fields in the debug windows
Debug.Print "Total of fields: " & giFldTotal%

For fiIndex% = 0 To giFldTotal% - 1
' Extract name of fields name
ftFldName$ = CStr(gLibDB.TableDefs("cellphone").Fields(fiIndex%).Name)
' Extract fields content, no need to use
' EOF since there is only one record
' Null will gives error, need error trapping
If Not IsNull(gLibSnap.Fields(fiIndex%)) Then
ftFld$ = CStr(gLibSnap.Fields(fiIndex%))
Else: ftFld$ = "Null"
End If
Debug.Print fiIndex% & " : " & ftFldName$ & " : "; ftFld$
Next fiIndex%




Output

D:\visual-basic-degree-final-project\phone.mdb
Total of fields: 53
0 : Phone_ID : 000001
1 : Phone_Manufacturer : Samsung
2 : Phone_Model : SGH-Z710
3 : Key_Feature_3G : False
4 : Key_Feature_Wifi : False
5 : Key_Feature_memory_card_slot : True
6 : Key_Feature_MP3 : True
7 : Key_Feature_QWERTY : False
8 : Key_Feature_camera : True
9 : Key_Feature_Bluetooth : True
10 : Key_Feature_GPS : False
11 : From_factor : Clamshell
12 : Data : GPRS/EDGE/UMTS
13 : Antenna_Design : Internal
14 : Operating_frequencies : 900/800/1900
15 : Global_Roaming : Yes
16 : Weight : 3.8 oz (108 g) the average is 2.3 oz (65 g)
17 : Dimensions : 3.8 x 1.9 x 0.8 (97 x 47.5 x 20.5 mm)
18 : Battery_Standby : 220 hours the average is 151 hours (6 days)
19 : Battery_Talktime : 3.00 hours the average is 4 h (240 min)
20 : Battery_Type : 880 mAH
21 : Display_Resolution : 240 x 320 pixels
22 : Display_Type : TFT
23 : Camera_Features : 4x Digital zoom Auto focus Additional camera for video calling
24 : Camera_Video : Yes
25 : Camera_Resolutions : 3.2 megapixels
26 : Memory_Expansion : microSD (T-Flash)
27 : Memory_Internal : 128 MB
28 : Conn_Infrared : No
29 : Conn_Bluetooth : 2.0
30 : Conn_Sync : --
31 : Conn_USB : Yes
32 : Conn_Wifi : --
33 : MM_Headset_Jack : --
34 : MM_Video_Playback : MPEG4 H.263 formats supported Video player
35 : MM_FM_Radio : Stereo FM Radio
36 : MM_Streaming : Yes
37 : MM_Music_Player : MP3 ACC ACC+WMA RA formats supported
38 : Size_Weight : 3.8 oz (108 g) the average is 2.3 oz (65 g)
39 : Size_Dimensions : 3.8 x 1.9 x 0.8 (97 x 47.5 x 20.5 mm)
40 : Messaging_E_Mail : IMAP / POP3 / SMTP
41 : Messaging_Instant_Messaging : --
42 : Messaging_Predictive_Text_Input : T9
43 : Messaging_MMS : Yes
44 : Software_to_do : Yes
45 : Software_Phonebook : Caller groups supported
46 : Software_Games : Yes
47 : Software_Java : MIDP 2.0
48 : Software_Calculator : Yes
49 : Software_Alarm : Yes
50 : Software_Calendar : Yes
51 : Software_Other_Organizers : World Clock Currencies Converter
52 : Official_URL : Null

Tuesday, August 25, 2009

Start Windows XP installation from USB flash drive.

Create a BartPE CD using your Windows XP installation CD
Use Pe2USB to make a USB bootable with your BartPE files
Copy the whole content of your Windows XP CD to your USB flash drive
e.g. f:\xpcd

Start your computer with the USB flash drive.
Start command prompt, navigate to your i386 folder at your USB flash drive
and type this command:
winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource

Your Windows installation should start with no problem.


If your computer board using non-native SATA chipset, you might want to use NLite to intergrate the SATA driver in your BartPE installation.

Textmode driver needed during installation, while Regular-PNP driver usually needed for Windows. For BartPE to recognized your hard drive during execution you will need to use the Regular-PNP. You could run the NLite multiple times to insert the Textmode and Regular-PNP mode.

Friday, August 21, 2009

VB6: Cellphone database, database manipulation Part 1

A simple database created with 1 table and 1 record. Download the database at

http://dl.getdropbox.com/u/1696625/visual-basic-6.0-projects/cellphone-database/phone.7z


The database created with MS Access 97. Unzip the 7zipped database above in a folder. You must use this in a folder, or it with generate an error; the path would be something like C:\\phone.mdb

Below is a simple procedure to manipulate the database and dump the fields name into debug windows.

You could access the debug screen or Immediate windows in your MS Visual Basic 6.0, using Ctrl + G

Dim gLibWS As Workspace
Dim gLibDB As Database
Dim gLibDyna As Recordset
Dim gLibSnap As Recordset
Dim gLibTable As Recordset
Dim gDbName As String

gDbName = App.Path & "\phone.mdb"

' Print database name with path to debug screen
Debug.Print gDbName

Set gLibWS = DBEngine.CreateWorkspace("Workspace", "Admin", "")

' Open DataBase with Exclusive and Read/Write access
Set gLibDB = gLibWS.OpenDatabase(gDbName$, True, False)

Set gLibSnap = gLibDB.OpenRecordset("cellphone", dbOpenSnapshot)
giFldTotal% = gLibDB.TableDefs("cellphone").Fields.Count - 1

' Print total of fields in the debug windows
Debug.Print "Total of fields: " & giFldTotal%


For fiIndex% = 0 To giFldTotal% - 1
' Extract name of fields name
ftfldname$ = CStr(gLibDB.TableDefs("cellphone").Fields(fiIndex%).Name)
Debug.Print fiIndex% & " : " & ftfldname$
Next fiIndex%

Copy and paste, the codes above in a blank form, in the Form_Load()

Do not forget to add References in your project, Microsoft DAO 2.5/3.51 Compatibility Library.

The output in the debug windows will look like this:

D:\visual-basic-diploma-project\phone.mdb
Total of fields: 53
0 : Phone_ID
1 : Phone_Manufacturer
2 : Phone_Model
3 : Key_Feature_3G
4 : Key_Feature_Wifi
5 : Key_Feature_memory_card_slot
6 : Key_Feature_MP3
7 : Key_Feature_QWERTY
8 : Key_Feature_camera
9 : Key_Feature_Bluetooth
10 : Key_Feature_GPS
11 : From_factor
12 : Data
13 : Antenna_Design
14 : Operating_frequencies
15 : Global_Roaming
16 : Weight
17 : Dimensions
18 : Battery_Standby
19 : Battery_Talktime
20 : Battery_Type
21 : Display_Resolution
22 : Display_Type
23 : Camera_Features
24 : Camera_Video
25 : Camera_Resolutions
26 : Memory_Expansion
27 : Memory_Internal
28 : Conn_Infrared
29 : Conn_Bluetooth
30 : Conn_Sync
31 : Conn_USB
32 : Conn_Wifi
33 : MM_Headset_Jack
34 : MM_Video_Playback
35 : MM_FM_Radio
36 : MM_Streaming
37 : MM_Music_Player
38 : Size_Weight
39 : Size_Dimensions
40 : Messaging_E_Mail
41 : Messaging_Instant_Messaging
42 : Messaging_Predictive_Text_Input
43 : Messaging_MMS
44 : Software_to_do
45 : Software_Phonebook
46 : Software_Games
47 : Software_Java
48 : Software_Calculator
49 : Software_Alarm
50 : Software_Calendar
51 : Software_Other_Organizers
52 : Official_URL

Saturday, August 8, 2009

VB6: Cellphone database, form designs Part 3

Added, Home screen for the Introduction of my Visual Basic 6.0 project, the Cellphone database.


And here is the source code of the form design download:
http://dl.getdropbox.com/u/1696625/visual-basic-6.0-projects/cellphone-database/Cellphone-databasev-0-0-1.7z

VB6: Cellphone database, to do list

To do

Interface
Phone browser
Manufacturer browser
Specification search
Price broswer
Phone details, data entry

Information
Wikipedia links to all phones
Manufacturer phone links to all phones

Database
Database - basic design
Database - with relationship

Saturday, August 1, 2009

VB6: Cellphone database, form designs Part 2

After integrating the two frame in one form:











































Private selectedTab As Integer

Private Sub TabStrip1_Click()
selectedTab = TabStrip1.SelectedItem.Index
Debug.Print "sTab " & selectedTab
Select Case selectedTab
Case 1
frameOne.Visible = True
frameTwo.Visible = False

Case 2
frameOne.Visible = False
frameTwo.Visible = True

End Select
End Sub

The fancy VB control, later, after we got this running.

VB6: Cellphone database, form designs Part 1

Initial form designs. The two forms will be integrated in one interface.

The label set to be 1D, to make it easier to put in the grids.

Form 1



















Form 2






















Because of the second frame (detailed specs) bigger than the first (overview), enlarge the first frame to the same size of the second one (in this case 11415x9495)
Position the two frame at the same position, Left 240, Top 360
Make sure you send the TabStrib control to the back.
  • Click TabStrip control
  • Right Click
  • Send to back
Otherwise you will get error in the interface design when the application being executed.

Check Part Two, for the result

Wednesday, May 20, 2009

Encrypt Password

Public Function EncryptPassword(Number As Byte, DecryptedPassword As String)
Dim Password As String, Counter As Byte
Dim Temp As Integer
' The number passed may be 0 - 60 (seconds) mod by 10 to get range 0 - 10
Number = Number Mod 10
Counter = 1 ' See also : Option Base 1
Do Until Counter = Len(DecryptedPassword) + 1
Temp = Asc(Mid(DecryptedPassword, Counter, 1))
If Counter Mod 2 = 0 Then
Temp = Temp - Number
Else
Temp = Temp + Number
End If
Temp = Temp Xor (10 - Number) ' Swap
Password = Password & Chr$(Temp)
Counter = Counter + 1
Loop
EncryptPassword = Password
End Function

Copy to Clipboard

Private Sub Command1_Click()
Clipboard.Clear
Clipboard.SetText
Text1.Text
End Sub

Private Sub Command2_Click()
Text1.Text = Clipboard.GetText
End Sub