Friday, September 6, 2019

Positive and Number Number Checker Using Structures Using Golang


Write a program that will ask the user to give a number and then the program will check if the given number is a positive or negative number and then display the results on the screen using structures using Golang.

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

/* positive_negative.go
   Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
   Date     : August 6, 2019  Tuesday  4:29 PM
   Location : Bacolod City, Negros Occidental
   Website  : http://www.jakerpomperada.com
   Emails   : jakerpomperada@gmail.com and jake_pomperada@tup.edu.ph
 */


package main

import "fmt"

type check_it struct {
a int32
}


func main(){

var num_value check_it

fmt.Print("\n")
fmt.Print("\tPositive and Number Number Checker Using Structures")
fmt.Print("\n\n")
fmt.Print("\tKindly give a number? ")
fmt.Scanln(&num_value.a)
if num_value.a <0 {
fmt.Print("\n")
fmt.Print("\tThe given number ")
fmt.Printf("%d",num_value.a)
fmt.Print(" is a Negative Number.")
} else {
fmt.Print("\n")
fmt.Print("\tThe given number ")
fmt.Printf("%d",num_value.a)
fmt.Print(" is a Positive Number.")
}
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}




Odd and Even Number Checker Using Structures Using Golang


Write a program that will ask the user to give a number and then the program will check if the given number is an even or odd number and then display the results on the screen using structures using Golang 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


/* odd_even.go
   Author   : Mr. Jake Rodriguez Pomperada, MAED-IT
   Date     : August 6, 2019  Thursday  4:37 PM
   Location : Bacolod City, Negros Occidental
   Website  : http://www.jakerpomperada.com
   Emails   : jakerpomperada@gmail.com and jake_pomperada@tup.edu.ph
 */

package main

import "fmt"

type check_even_odd struct {
a int32
}


func main(){
var num_value check_even_odd
fmt.Print("\n")
fmt.Print("\tOdd and Even Number Checker Using Structures")
fmt.Print("\n\n")
fmt.Print("\tKindly give a number? ")
fmt.Scanln(&num_value.a)
if num_value.a % 2 ==0 {
fmt.Print("\n")
fmt.Print("\tThe given number ")
fmt.Printf("%d",num_value.a)
fmt.Print(" is an Even Number.")
} else {
fmt.Print("\n")
fmt.Print("\tThe given number ")
fmt.Printf("%d",num_value.a)
fmt.Print(" is an Odd Number.")
}
fmt.Print("\n\n")
fmt.Print("\tEnd of Program")
fmt.Print("\n")
}



Quick Sort in C++

Here is a sample program that I wrote using C++ to demonstrate the quick sort algorithm. It will ask the user to give how many items to be processed and then the program will sort and display the unsorted items and sorted items in the screen.

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

#include<iostream>
#include<cstdlib>

using namespace std;


void swap_numbers(int *a, int *b)
{
int temp; 
temp = *a;
*a = *b;
*b = temp;
}


int Partition(int a[], int low, int high)
{
int pivot, index, i;
index = low;
pivot = high;


for(i=low; i < high; i++)
{
if(a[i] < a[pivot])
{
swap_numbers(&a[i], &a[index]);
index++;
}
}

swap_numbers(&a[pivot], &a[index]);

return index;
}


int RandomPivotPartition(int a[], int low, int high)
{
int pvt, n, temp;
n = rand();

pvt = low + n%(high-low+1);


swap_numbers(&a[high], &a[pvt]);

return Partition(a, low, high);
}


int QuickSort(int a[], int low, int high)
{
int pindex;
if(low < high)
{

pindex = RandomPivotPartition(a, low, high);

QuickSort(a, low, pindex-1);
QuickSort(a, pindex+1, high);
}
return 0;
}

int main()
{
int n=0, i=0;
cout <<"\n";
cout <<"Quick Sort in C++";
cout <<"\n";
cout<<"\nHow many items to be sorted?  ";
cin>>n;

int arr[n];
for(i = 0; i < n; i++)
{
cout<<"Enter item no. "<<i+1<<": ";
cin>>arr[i];
}
    cout <<"\n";
  cout<<"\nUnSorted Data ";
for (i = 0; i < n; i++)
        cout<<" ,"<<arr[i];
    cout <<"\n";
QuickSort(arr, 0, n-1);


cout<<"\nSorted Data ";
for (i = 0; i < n; i++)
        cout<<" ,"<<arr[i];
    cout <<"\n\n";
cout <<"\tEnd of Program";   
cout <<"\n";
return 0;
}




Wednesday, September 4, 2019

Employee's Profile Using Union in C Language


In today's I would like to share with you guys a simple program that I wrote how to use union in C programming language I called this program Employee's Profile Using Union in C 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

/* emp_profile.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : November 29, 2018  Thursday  2:33 PM
   Location : Bacolod City, Negros Occidental
   Tool     : Dev C++ Version 5.11
   Website  : http://www.jakerpomperada.com
   Email    : jakerpomperada@jakerpomperada.com and jakerpomperada@gmail.com
*/
#include<stdio.h>
union emp
{
char emp_name[100];
char emp_position[100];
int age;
    float salary;
}; 
void main()
{
 union emp profile;
 printf("\n\n");
 printf("\tEmployee's Profile Using Union");
 printf("\n\n");
 printf("\tEmployees Name     : ");
 gets(profile.emp_name);
 printf("\n");
 printf("\tName         :  %s\n",profile.emp_name);
 printf("\n");
 printf("\tEmployees Position : ");
 gets(profile.emp_position);
 printf("\n");
 printf("\tYour position is %s.\n",profile.emp_position);
 printf("\n");
 printf("\tEmployees Age : ");
 scanf("%d",&profile.age);
 printf("\n");
 printf("\tYour age is %d year(s) old.\n",profile.age);
 printf("\n");
 printf("\tEmployees Salary : PHP ");
 scanf("%f",&profile.salary);
 printf("\n");
 printf("\tYour salary is PHP %.2f",profile.salary);
 printf("\n\n");
 printf("\tEnd of Program");
 printf("\n\n");
}




Sunday, September 1, 2019

CRUD ADODB Connection in Visual Basic 6 and Microsoft Access

I this article I would like to share with you sample program written by my close friend, business partner and fellow software engineer Sir Larry Dave Emol a simple CRUD ADODB Connection in Visual Basic 6 and Microsoft Access.

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 Command1_Click()
Form1.Show 1
End Sub

Private Sub Command2_Click()
If Me.Tag = "" Then
 MsgBox "Please select data to update", vbCritical, "Crud"
Else
Form1.Text2.Text = Me.Listview1.selectedItem.ListSubItems(3)
Form1.Text3.Text = Listview1.selectedItem.ListSubItems(4)
Form1.Text4.Text = Listview1.selectedItem.ListSubItems(5)
Form1.Command1.Caption = "UPDATE"
Form1.Caption = "UPDATE"
Form1.Show 1, Mainform
End If
End Sub

Private Sub Command3_Click()
'On Error Resume Next
If Me.Tag = "" Then
 MsgBox "Please select data to delete", vbCritical, "Crud"
Else
Set rstUserAcct = New ADODB.Recordset
    If rstUserAcct.State = 1 Then rstUserAcct.Close
    rstUserAcct.Open "Select * from tblInfo where ID like'" & Me.Tag & "'", MyConn, adOpenDynamic, adLockBatchOptimistic
    rstUserAcct.Delete
    rstUserAcct.UpdateBatch
    data
    MsgBox "Successfully Deleted", vbInformation, "DELETE"
    Me.Tag = ""
End If
End Sub

Private Sub Form_Activate()
data
End Sub

Sub data()
On Error Resume Next
Dim lst
Dim cnt As Integer
Dim X As Integer
Set rstUserAcct = New ADODB.Recordset
    If rstUserAcct.State = 1 Then rstUserAcct.Close
    rstUserAcct.Open "Select * from tblInfo", MyConn, adOpenDynamic, adLockBatchOptimistic
    
With Me.Listview1
    .ColumnHeaders.Clear
    .ListItems.Clear
    .ColumnHeaders.Add , , "", 0
    .ColumnHeaders.Add , , "USERNAME", 3000
    .ColumnHeaders.Add , , "PASSWORD", 4000
    .ColumnHeaders.Add , , "FISTNAME", 4000
    .ColumnHeaders.Add , , "MIDDLENAME", 4000
    .ColumnHeaders.Add , , "LASTNAME", 4000
End With
Do Until rstUserAcct.EOF
    Set lst = Listview1.ListItems.Add(, , rstUserAcct.Fields!ID)
            
            lst.ListSubItems.Add , , rstUserAcct.Fields!UserName
            lst.ListSubItems.Add , , rstUserAcct.Fields!Password
            lst.ListSubItems.Add , , rstUserAcct.Fields!firstname
            lst.ListSubItems.Add , , rstUserAcct.Fields!middlename
            lst.ListSubItems.Add , , rstUserAcct.Fields!lastname
  cnt = cnt + 1
rstUserAcct.MoveNext
Loop
Label1.Caption = "Total No. of record(s): " & cnt
End Sub


Private Sub Form_Unload(Cancel As Integer)
End
End Sub


Private Sub Listview1_Click()
Me.Tag = Me.Listview1.selectedItem.Text
End Sub

MODULE CODES

Option Explicit

Public MyConn As ADODB.Connection
Public rstUserAcct As ADODB.Recordset



Sub Main()
On Error Resume Next
        Set MyConn = New ADODB.Connection
        Set rstUserAcct = New ADODB.Recordset
        MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & AppDir & "Tutorial.mdb;Persist Security Info=False;Jet OLEDB:Database Password =IT098"
        MyConn.CursorLocation = adUseClient
        'Start up object
        Mainform.Show
End Sub

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



Listview in Visual Basic 6 and Microsoft Access

I this article I would like to share with you sample program written by my close friend, business partner and fellow software engineer Sir Larry Dave Emol a simple listview implementation in Microsoft Visual Basic 6 and Microsoft Access.

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

MODULE  DB CONNECTION


Option Explicit

Public MyConn As ADODB.Connection
Public rstUserAcct As ADODB.Recordset



Sub Main()
On Error Resume Next
        Set MyConn = New ADODB.Connection
        Set rstUserAcct = New ADODB.Recordset
        MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & AppDir & "Tutorial.mdb;Persist Security Info=False;Jet OLEDB:Database Password =IT098"
        MyConn.CursorLocation = adUseClient
        'Start up object
        Mainform.Show
End Sub

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


Private Sub Form_Activate()
data
End Sub

Sub data()
On Error Resume Next
Dim lst
Dim cnt As Integer
Dim X As Integer
Set rstUserAcct = New ADODB.Recordset
    If rstUserAcct.State = 1 Then rstUserAcct.Close
    rstUserAcct.Open "Select * from tblInfo", MyConn, adOpenDynamic, adLockBatchOptimistic
  
With Me.Listview1
    .ColumnHeaders.Clear
    .ListItems.Clear
    .ColumnHeaders.Add , , "", 0
    .ColumnHeaders.Add , , "USERNAME", 3000
    .ColumnHeaders.Add , , "PASSWORD", 4000
    .ColumnHeaders.Add , , "FISTNAME", 4000
    .ColumnHeaders.Add , , "MIDDLENAME", 4000
    .ColumnHeaders.Add , , "LASTNAME", 4000
End With
Do Until rstUserAcct.EOF
    Set lst = Listview1.ListItems.Add(, , rstUserAcct.Fields!ID)
          
            lst.ListSubItems.Add , , rstUserAcct.Fields!UserName
            lst.ListSubItems.Add , , rstUserAcct.Fields!Password
            lst.ListSubItems.Add , , rstUserAcct.Fields!firstname
            lst.ListSubItems.Add , , rstUserAcct.Fields!middlename
            lst.ListSubItems.Add , , rstUserAcct.Fields!lastname
  cnt = cnt + 1
rstUserAcct.MoveNext
Loop
Label1.Caption = "Total No. of record(s): " & cnt
End Sub


Private Sub Form_Unload(Cancel As Integer)
End
End Sub