Thursday, October 3, 2019

Addition of Two Numbers in Golang Using Web Forms

A simple addition of two numbers in golang using web forms that I wrote while learning web development in Go programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.



Program Listing

index.tmpl

{{ define "Index" }}
<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Add</title>
        <meta charset="UTF-8" />
    </head>
<body>
    <form method="POST" action="/Add">
     <br>
     <h2>  Addition of Two Numbers in Golang </h2>
     <br><br>
     First Value <input type="text" name="FNumber" value="{{.FNumber}}"/><br />
     Second Value  <input type="text" name="SNumber" value="{{.SNumber }}"/><br /><br>
     Total Sum  <input type="text" name="Total" value="{{ .Total }}"/><br />
      <br>
      <input type="submit" value="Compute" />
        &nbsp;
        <input type="reset" value="Reset">
       
    </form><br />   
</body>
</html>     
{{ end }}


add.go

package main 


import( "strconv"
"net/http"
"text/template"
)

type Sum struct {
FNumber string
SNumber string
Total string
}

var tmpl = template.Must(template.ParseGlob("templates/*"))

func Add(w http.ResponseWriter, r *http.Request) {
r.ParseForm()                     
    fNumber, err := strconv.Atoi(r.Form.Get("FNumber"))
    if err != nil {
    panic(err)
}
    sNumber, err := strconv.Atoi(r.Form.Get("SNumber"))
    if err != nil {
    panic(err)
}

    total := fNumber + sNumber

    sum := Sum{}
    sum.FNumber = r.Form.Get("FNumber")
    sum.SNumber = r.Form.Get("SNumber")
    sum.Total = strconv.Itoa(total)
    tmpl.ExecuteTemplate(w, "Index", sum)
}

func Index(w http.ResponseWriter, r *http.Request) {
    tmpl.ExecuteTemplate(w, "Index", Sum{})
}

func main() {
  http.HandleFunc("/", Index)
  http.HandleFunc("/Add", Add)
    http.ListenAndServe(":8080", nil)

}


Select/Display Distinct Records in a ComboBox in Visual Basic 6

Here is a sample program that is being provided by my close friend, business partner and fellow software engineer Sir Larry Dave Emol. He created this program using Microsoft Visual Basic 6 and Microsoft Access to Select/Display Distinct Records in a ComboBox in VB6

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.



Sample Program Output


Program Listing

FORM CODES
Private Sub Form_Load()
Call SQLDB(Me.AdoCon, "select distinct Namex from tblInfo Order by Namex")
If Not (Me.AdoCon.Recordset.EOF And Me.AdoCon.Recordset.BOF) Then
Combo1.Clear
Do While Not Me.AdoCon.Recordset.EOF
    Combo1.AddItem Me.AdoCon.Recordset.Fields("Namex").Value
    Me.AdoCon.Recordset.MoveNext
    Combo1.ListIndex = 0
    Loop
 End If
End Sub

MODULE CODES(DB Connection)

Option Explicit

Public Function AppDir() As String
    If Right$(App.Path, 1) = "\" Then
        AppDir = App.Path
    Else
        AppDir = App.Path & "\"
    End If
End Function

Public Sub SQLDB(adoObj As Adodc, AdoRec As String) 'for SQL Recordsource

    'Loads the database and provides the database password
    adoObj.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & AppDir & "Tutorial.mdb;Persist Security Info=False;Jet OLEDB:Database Password = "
 
    'Sets the command type to Table
    adoObj.CommandType = adCmdText
 
    'Loads the source table of info
    adoObj.RecordSource = AdoRec

    'refreshes database status
     adoObj.Refresh
End Sub




My New Book Beginners Guide To Computer Programming With Logic Formulation Using C Language

In this article, I would like to share with you guys my new book that is already published the title of the book is  "Beginners Guide To Computer Programming With Logic Formulation Using C Language" that is already published exclusively by Mindshapers Inc. Metro Manila.






For my book orders, you may visit my publishers at the following web address https://www.mindshaperspublishing.com/

You can call them at the following numbers (02) 254-6160  and  (02) 527-6489 in Metro Manila.

Their office address of Mindshapers Inc is 

Rm 108 ICP Bldg. Recoletos Street, Intramuros, Manila


Their email address is  mindshapersco@yahoo.com


I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.

Thank you very much for the support.


Delete All Record in a database Table in Visual Basic 6


Here is a sample program that is being provided by my close friend, business partner and fellow software engineer Sir Larry Dave Emol. He created this program using Microsoft Visual Basic 6 and Microsoft Access to Delete All Record in a database Table in VB6. 

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.



Sample Program Output


Program Listing

FORM CODES

Private Sub Command3_Click()
On Error Resume Next
Call dbConn
conn.Execute "DELETE FROM tblInfo"
MsgBox "All information has been successfully deleted!", vbInformation
Call SQLDB(Me.AdoCon, "Select * from tblInfo order by LASTNAME Desc")
Set Me.DataGrid1.DataSource = Me.AdoCon
End Sub


Private Sub Form_Activate()
On Error Resume Next
Call SQLDB(Me.AdoCon, "Select * from tblInfo order by LASTNAME Desc")
Set Me.DataGrid1.DataSource = Me.AdoCon
End Sub

MODULE CODES

Option Explicit

'variables for ADODB
Public conn As New ADODB.Connection
Public ctr As Integer


Public Function AppDir() As String
    If Right$(App.Path, 1) = "\" Then
        AppDir = App.Path
    Else
        AppDir = App.Path & "\"
    End If
End Function

Public Sub dbConn()
  Set conn = New ADODB.Connection
  conn.ConnectionString = strConn2
  conn.Open
End Sub

Public Function strConn2() As String
  strConn2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & AppDir & "Tutorial.mdb;Persist Security Info=False;Jet OLEDB:Database Password = "
End Function

Public Sub SQLDB(adoObj As Adodc, AdoRec As String) 'for SQL Recordsource

    'Loads the database and provides the database password
    adoObj.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & AppDir & "Tutorial.mdb;Persist Security Info=False;Jet OLEDB:Database Password = "
    
    'Sets the command type to Table
    adoObj.CommandType = adCmdText
    
    'Loads the source table of info
    adoObj.RecordSource = AdoRec

    'refreshes database status
     adoObj.Refresh
End Sub






Wednesday, October 2, 2019

Inches To Centimeter in Visual Foxpro

A simple program that I wrote using Microsoft Visual Foxpro by asking the user to give value in inches and then it will convert into centimeter equivalent.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.





Sample Program Output


Program Listing

Compute Button

feet = VAL(thisform.text1.Value)
comp_disp = feet * 2.54
thisform.label2.caption ="The centimeter equivalent is "
thisform.text2.Value= ROUND(comp_disp,2)

Clear

thisform.label2.caption =""
thisform.text2.Value= ""
thisform.text1.value=""
thisform.text1.SetFocus

Quit

thisform.Release




Biggest of Three Numbers in VB.NET

In this article, I will discuss and demonstrate how to write a program that will ask the user to give three numbers and then the program will determine which of the three numbers has the biggest value using Microsoft Visual Basic NET. I called this program Biggest of Three Numbers in VB.NET

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.





Sample Program Output


Program Listing

Public Class Form1

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        End
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim a, b, c As Integer

        a = Val(TextBox1.Text)
        b = Val(TextBox2.Text)
        c = Val(TextBox3.Text)

        If (a > b) And (a > c) Then
            MsgBox(a & " is Bigger Value.")
        ElseIf (b > a) And (b > c) Then
            MsgBox(b & " is Bigger Value.")
        Else
            MsgBox(c & " is Bigger Value.")
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox1.Focus()
    End Sub
End Class




Biggest of Three Numbers in VB.NET

Swapping of Two Numbers in VB.NET

In this article, I would like to share with you guys a sample program that will ask the user to give two numbers and then the program will swap the arrangement of two numbers using Microsoft Visual Basic NET as our programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.






Sample Program Output


Program Listing

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        End
    End Sub

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim a, b, c As Integer

        a = Val(TextBox1.Text)
        b = Val(TextBox2.Text)

        ' Before Swapping of Two Numbers
        TextBox3.Text = "The value of A =" & a & " and B = " & b

        'Swapping Code of Two Number

        c = a
        a = b
        b = c

        ' After Swapping of Two Numbers
        TextBox4.Text = "The value of A =" & a & " and B = " & b

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox1.Focus()
    End Sub
End Class


Swapping of Two Numbers in VB.NET

Tuesday, October 1, 2019

Civil Status Checker in Visual Basic 6

A very simple program that I wrote using Microsoft Visual Basic 6 to ask the user to give a number and then the program will check if the given number of the user represents single, married, divorced or widowed civil status. Thus our program also asks the user if the user whats to continue to run the program or not.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.







Sample Program Output


Program Listing

' Civil status program in vb6
' Written by Mr. Jake R. Pomperada,MAED-IT
' Date : October 1, 2019
' Email : jakerpomperada@gmail.com


Private Sub Command1_Click()
Dim a As Integer
a = Val(Form1.Text1.Text)

If (a = 1) Then
    Msg = "The Result"
    Style = vbInformation
    disppaly = MsgBox("You are still Single.", Style, "The Result")
ElseIf (a = 2) Then
Msg = "The Result"
Style = vbInformation
disppaly = MsgBox("You are Married.", Style, "The Result")
ElseIf (a = 3) Then
Msg = "The Result"
Style = vbInformation
disppaly = MsgBox("You are Divorced.", Style, "The Result")
ElseIf (a = 4) Then
Msg = "The Result"
Style = vbInformation
disppaly = MsgBox("You are Widowed.", Style, "The Result")
Else
Msg = "The Result"
Style = vbInformation
disppaly = MsgBox("Invalid Civil Status.", Style, "The Result")
End If
End Sub


Private Sub Command2_Click()
 Form1.Text1.Text = ""
 Form1.Text1.SetFocus
End Sub

Private Sub Command3_Click()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to continue ?"    ' Define message.
Style = vbYesNo + vbInformation + vbDefaultButton2    ' Define buttons.
Title = "Quit Program"    ' Define title.
Help = "DEMO.HLP"    ' Define Help file.
Ctxt = 1000    ' Define topic context.
        ' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then    ' User chose Yes.
    Form1.Text1.Text = ""
    Form1.Text1.SetFocus
Else
    End
End If
End Sub



How to use DataGrid1.Columns.Item(0) Display Data/Delete in Visual Basic 6 and MS Access

Here is a sample program that is being provided by my close friend, business partner and fellow software engineer Sir Larry Dave Emol. He created this program using Microsoft Visual Basic 6 and Microsoft Access to use DataGrid1.Columns.Item(0) Display Data/Delete. This simple application will help you how to use DataGrid1.Columns.Item(0) in Vb6 you can change  0 it depends on the datafields number in database

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.





Sample Program Output

Program Listing


DISPLAY

Private Sub DataGrid1_Click()
On Error Resume Next
Me.txtID.Text = Me.DataGrid1.Columns.Item(0)
Me.Text1.Text = Me.DataGrid1.Columns.Item(1)
Me.Text2.Text = Me.DataGrid1.Columns.Item(2)
Me.Text3.Text = Me.DataGrid1.Columns.Item(3)
Me.Text4.Text = Me.DataGrid1.Columns.Item(4)
End Sub

DELETE 

Private Sub Command3_Click()
On Error Resume Next
 Call SQLDB(Me.AdoCon, "Select * from tblInfo where ID like'" & Me.DataGrid1.Columns.Item(0).Text & "'")
             Me.AdoCon.Recordset.Delete
             Me.AdoCon.Refresh
             Me.Text1.Text = ""
             Me.Text2.Text = ""
             Me.Text3.Text = ""
             Me.Text4.Text = ""
             Me.txtID.Text = ""
End Sub