Monday, December 16, 2019

How to Formulate Research Problem

Most students taking thesis/dissertation/research usually takes their concern from what they have observed rather than what was the real cause of it. These mistakes often make the paper loses its value from the scientific community. These mistakes often create temporary remedy rather than a long-lasting solution.

A good example is when you smell stinky garbage, most people would say:
"The cause is the garbage"
"The cause is the people throwing their garbage improperly"
"The cause is the garbage truck not collecting the trash"

That is maybe right but have you questioned your self this?
"Why did people just throw their garbages here? or anywhere?"
"Why did the garbage truck not able to collect this garbages?"

Those questions can even create more questions
"What did the local government does with waste collection management?"
"Are the people here knows ho to segregate?"
"Is there any law about throwing garbage in this city?"

By simply creating a solution for these primary causes identified will not solve the problem.
"The cause is the garbage"
"The cause is the people throwing their garbage improperly"
"The cause is the garbage truck not collecting the trash"

But maybe if you develop a strategy or solution for these questions
"What did the local government does with waste collection management?"
"Are the people here knows ho to segregate?"
"Is there any law about throwing garbage in this city?"

By converting them into these questions
"What can I do to help the local government with their waste collection management?"
"What could I do to inform the people living in this city about the harmful effects of not properly disposing of their garbage and or segregating them correctly?"

"How can I strengthen the law of this city with regards to the clean and safe environment?"

This can also be done using an inverted tree as Problem Analysis tool to formulate your research problem.

In an Inverted Tree, the upper part represent the Cause while the lower part represent the Effect

Example:



This is Problem Tree #1 which the root problem in color green anchored to the Sustainable Development Goals of the (United Nations Development Plan) UNDP #6 or the Clean Water and Sanitation. Out of this problem tree, we are going to take the cause Waste Collection Mismanagement, the one with a red mark and create another problem tree analysis for that.

Note: Your first problem tree analysis should be based on facts and observation.


This is your Problem Tree #2 which uses the marked box in PT #1 as the root problem. You can now select at least one box from PT #2 and create a solution for that identified problem or root cause. Selection of a problem is not limited in the upper part, you may also find a solution on the identified effects in the lower part for this will also solve the main root problem in the PT #1 analysis. In this case we have selected Ineffective Planning Matrix on Waste Collection as our main problem to solve in our research.

Note: In your PT #2 you can now apply your guess and hypothesis about how the root problem occur.



Saturday, December 14, 2019

How to Write a Research Problem

A research paper could not stand alone without the research problem. A research problem is the question/s you want to answer in your research study. In writing the research problem you have to identify your research objectives.

The general objectives or the main objective of your research problem will be the final outcome of your research while the specific objectives are the objectives taken from the general objectives. These specific objectives will answer the question how will you be able to produce the main objective of the study, in these specific objectives, you will formulate your research questions.

In writing your research problem, you may begin with writing a few introductory sentences or a paragraph in relation to your Introduction before putting the main question on your research.

There are different ways of putting your research problems or objectives:

Hypothesis

Example
  1. Automating the garbage bin to identify the biodegradable  and non-biodegradable will decrease the waste management problems.
Research Question

Example
  1. How to solve the waste management problem?
Example of a Research Problem




How to write a Thesis Introduction

In scientific community, a research paper is the way how people communicate with each other, sharing ideas and useful information throughout the history of humankind. This method of communication is the most common yet long lasting form of trade for centuries which keeps the knowledge and technology to advance further.

A good research paper may starts with a title but it is the less of concern in writing your manuscript. When you have done with your theory and conceptualization, a good introduction will let your findings into the mind of the readers, it must open a portal to a new knowledge with interest from the readers. These are pointers in writing a Good Thesis Introduction

Set your audience

Before you write your introduction, do not forget to identify your readers, who might they be, what are their level of educational attainment perhaps. Failure to capture your readers or include the type of readers you may have will ruin your introduction or your whole research paper. A strong point will catch the attention of your readers but without exaggeration. Be formal on your words and the keep an active voice in the introduction. This will makes it more interesting and gives your readers the idea that you are really determine to prove something in your research paper. You have to catch their attention not half but full.
          
State your subject matter

Do not blind your readers to what is what, keep them connected to your research, give them pointers on your research topic, hook their interest on your subject matter. Be clear on your thoughts and meanings and the purpose of your research paper.

Review relevant background

Related literature may be found on your Chapter II but it is a good practice to include relevant topics and research findings in your introduction to make it more realistic. Most readers in the scientific community will look on where you have gotten your points, your ideas regarding on the problems identified in your research. This will also prove how reliable your research paper compare to other research out there.

Connect your introduction to your Research Problem

Lastly, do not let the fire burnt out, always make sure that your readers will continue to read your problem statement. Create a strong connection between your Introduction and Research Problem. Like movies you have to create a cliff hanger.

Tuesday, December 3, 2019

Visual Basic .net Simple Standard Calculator

Step 1: Create New Project with Visual Studio (I am using 2008)
Step 2: Select Windows on Project Types
Step 3: Select Windows Forms Application as Templates
Step 4: Design your simple calculator

Note: The display used is a Label and it has two labels the lower and the upper part namely
        Upper Part:  Secondary Display
        Lower Part: Primary Display

Step 5: Double click on your form and add this codes


Step 6: Add codes to each buttons afterwards

MC

memory = 0
MemoryIndicator.Visible = False

MR

PrimaryDisplay.Text = memory
MemoryIndicator.Visible = True

MS

memory = PrimaryDisplay.Text
MemoryIndicator.Visible = True

M+

memory += CDbl(PrimaryDisplay.Text)
MemoryIndicator.Visible = True

M-

memory -= CDbl(PrimaryDisplay.Text)
MemoryIndicator.Visible = True

<-- (Backspace)

If Len(PrimaryDisplay.Text) > 0 Then
       PrimaryDisplay.Text = Mid(PrimaryDisplay.Text, 1, Len(PrimaryDisplay.Text) - 1)
End If

CE (Clear Equation)

n2 = Nothing
ans = Nothing
operator_active = Nothing
selected_operator = Nothing
SecondaryDisplay.Text = ""

C (Clear)

n1 = Nothing
n2 = Nothing
ans = Nothing
operator_active = Nothing
selected_operator = Nothing
PrimaryDisplay.Text = ""
SecondaryDisplay.Text = ""

+- (Negative Positive)

If Mid(PrimaryDisplay.Text, 1, 1) = "-" Then
            PrimaryDisplay.Text = Mid(PrimaryDisplay.Text, 2, Len(PrimaryDisplay.Text))
Else
            PrimaryDisplay.Text = "-" & PrimaryDisplay.Text
End If

SQRT (Square root)

SecondaryDisplay.Text = "Sqrt(" & PrimaryDisplay.Text & ")"
PrimaryDisplay.Text = CDbl(PrimaryDisplay.Text) ^ 0.5

% (Percentage)

percentage_active = True
SecondaryDisplay.Text = "Percentage(" & selected_operator & ")"

1/x (Reciprocal)

PrimaryDisplay.Text = 1 / CDbl(PrimaryDisplay.Text)
SecondaryDisplay.Text = "(Reciprocal)"

/ (Division)

n1 = CDbl(PrimaryDisplay.Text)
operator_active = True
selected_operator = "/"
SecondaryDisplay.Text = PrimaryDisplay.Text & "/"

* (Multiplication)

n1 = CDbl(PrimaryDisplay.Text)
operator_active = True
selected_operator = "*"
SecondaryDisplay.Text = PrimaryDisplay.Text & "*"

- (Subtraction)

n1 = CDbl(PrimaryDisplay.Text)
operator_active = True
selected_operator = "-"
SecondaryDisplay.Text = PrimaryDisplay.Text & "-"

+ (Addition)

n1 = CDbl(PrimaryDisplay.Text)
operator_active = True
selected_operator = "+"
SecondaryDisplay.Text = PrimaryDisplay.Text & "+"

= (Equal)

n2 = CDbl(PrimaryDisplay.Text)
SecondaryDisplay.Text = SecondaryDisplay.Text & PrimaryDisplay.Text
Select Case selected_operator
       Case "+"
                If percentage_active = False Then
                    ans = n1 + n2
                Else
                    ans = n1 + ((n2 / 100) * n1)
                End If
       Case "-"
                If percentage_active = False Then
                    ans = n1 - n2
                Else
                    ans = n1 - ((n2 / 100) * n1)
                End If
       Case "*"
                If percentage_active = False Then
                    ans = n1 * n2
                Else
                    ans = n1 * ((n2 / 100) * n1)
                End If
       Case "/"
                If percentage_active = False Then
                    ans = n1 / n2
                Else
                    ans = n1 / ((n2 / 100) * n1)
                End If
End Select
PrimaryDisplay.Text = ans
percentage_active = False

Decemal Point

If PrimaryDisplay.Text.Contains(".") = False Then
         PrimaryDisplay.Text = PrimaryDisplay.Text & "."
End If

Number 0 to 9

If operator_active = False Then
            PrimaryDisplay.Text = PrimaryDisplay.Text & "0"
Else
            PrimaryDisplay.Text = "0"
            operator_active = False
End If

Note: Add this codes from number 0 up to number 9 just change the number for each button

Monday, December 2, 2019

Connecting Visual Studio 2008 to MySQL Database using ODBC Connector

Step 1: Install MySQL Database like MySQL Server 5.0
Step 2: Install ODBC Connector like Connector ODBC 5.1
Step 3: Create a project in Visual Studio

Project Type: Visual Basic -> Windows
Project Template: Windows Forms Application


Step 4: Click My Project on your Solution Explorer
Step 5: Click on Reference Tab


Step 6: Click on Add 
Step 7: Click on COM Tab
Step 8: Look for Microsoft ActiveX Data Object 2.7 Library or higher version
Step 9: Click OK

Step 10: On your Project Explorer right click on your project name and mouse over Add
Step 11: Add Module

Step 12: Add the following code on the very top of other code

Imports ADODB

Step 13: Add the following code just below the Module Module 1

Public conn As New ADODB.Connection
Public rs As New Recordset
Public lvi As ListViewItem

Step 14: Add the following code just below Public lvi As ListViewItem

Public Sub Connection()
        On Error GoTo Err
        If conn.State = ObjectStateEnum.adStateOpen Then conn.Close()
            conn.ConnectionString = "Driver=MySQL ODBC 5.1 Driver;Server=Localhost;Port=3306;Database=name_of_my_database;UID=mysqluser;PWD=mysqlpassword;Option=3;"
           conn.ConnectionTimeout = 5
           conn.CursorLocation = CursorLocationEnum.adUseClient
           conn.Open()
           Exit Sub
Err:
        MsgBox(Err.Description, MsgBoxStyle.Information + MsgBoxStyle.Critical)
    End Sub

Note: Driver may depend on the driver you have installed. Server may vary if the mysql database is installed on your machine or to the other computer, if it is the second then use the other computer's IP Address instead of Localhost but be sure you have enabled Allow Remote Connection during the installation of your MySQL Database. Port may also vary if what port number you have used during the installation of MySQL Database, Database name may vary on the created database in your MySQL Database Server, as well as the UID which uses "root" as the default user when you install MySQL and the PWD or password you set up during the MySQL installation while Option = 3 should be kept as is. Lastly there is no restriction on the number of ConnectionTimeout so you decide. THIS IS YOUR CONNECTION SCRIPT TO CONNECT VB.net to MySQL

Step 15: Add the following code after the End Sub of Public Sub Connection()

Public Sub OpenRecord(ByVal sql As String)
        On Error GoTo Err
        If rs.State = ObjectStateEnum.adStateOpen Then rs.Close()
        rs.Open(sql, conn, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)
        Exit Sub
Err:
        MsgBox(Err.Description, MsgBoxStyle.Information)
    End Sub

Note: sql comes from your parameter while conn comes from the variable declaration on top.

Step 16: Go back to your design and double click on your form and add this code just below the Public Class Form1

Dim isEdit As Boolean = False

Step 17: On your Form_Load() add the following lines

Connection() 'this will call the connection script
getAllUsers("") 'this will retrieve all previous data from users table.

Note: Be sure you have created a database in your MySQL and should have at least one table like "users" with fields userid int type, username and password text type

Step 17: Double click on your CLEAR button and add this lines inside

TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
getAllUsers("")

Step 18: Go back to your design and double click on your SAVE Button and add this lines

 If Trim(TextBox1.Text) <> "" Or Trim(TextBox2.Text) <> "" Or Trim(TextBox3.Text) <> "" Then
            OpenRecord("Select * from user Where userid = '" & TextBox1.Text & "'")
            With rs
                If isEdit = False Then 'add new record
                    .AddNew()
                    .Fields("userid").Value = TextBox1.Text
                    .Fields("username").Value = TextBox2.Text
                    .Fields("password").Value = TextBox3.Text
                    .Update()
                    MsgBox("New user added.", MsgBoxStyle.Information)
                Else 'edit existing record
                    .Fields("username").Value = TextBox2.Text
                    .Fields("password").Value = TextBox3.Text
                    .Update()
                    MsgBox("Information has been edited.", MsgBoxStyle.Information)
                    TextBox1.Enabled = True
                End If
            End With
        Else
            MsgBox("Incomplete Fields. Please try again.", MsgBoxStyle.Information)
        End If
        Button2_Click(sender, e)
        getAllUsers("")

Step 19: Go back to your design and double click on button EDIT and add this lines

If ListView1.Items.Count = 0 Then Exit Sub
If ListView1.SelectedItems.Count = 0 Then Exit Sub

TextBox1.Text = ListView1.SelectedItems.Item(0).SubItems(0).Text
TextBox2.Text = ListView1.SelectedItems.Item(0).SubItems(1).Text
TextBox3.Text = ListView1.SelectedItems.Item(0).SubItems(2).Text
TextBox1.Enabled = False
 isEdit = True


Step 20: Go back to your design and double click on DELETE button and add this lines

If ListView1.Items.Count = 0 Then Exit Sub
If ListView1.SelectedItems.Count = 0 Then Exit Sub

If MsgBox("This action will delete the selected user. Do want to continue?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then

      OpenRecord("Delete from user where userid = '" &   ListView1.SelectedItems.Item(0).SubItems(0).Text & "'")
      getAllUsers("")
      MsgBox("Selected user has been deleted.", MsgBoxStyle.Information)
End If

Step 21: Go back to your design and double click on Textbox for searching and add this lines

Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
        getAllUsers(TextBox4.Text)
End Sub

Step 22: Add this code at the very end of the script but do not go beyond the "End Class" for your code may not run successfully.

Public Sub getAllUsers(ByVal str As String)
        ListView1.Items.Clear()

        OpenRecord("Select * from user Where username like '" & str & "%'")
        With rs
            While Not .EOF
                lvi = ListView1.Items.Add(.Fields("userid").Value)
                lvi.SubItems.Add(.Fields("username").Value)
                lvi.SubItems.Add(.Fields("password").Value)
                .MoveNext()
            End While
        End With
    End Sub




A REVIEW ON CONNIE DABATE’S MURDER CASE: Fitbit One Wearable

T he Author   ROSITO D. ORQUESTA MSIT Student at Jose Rizal Memorial State University-Dapitan Campus OIC-ICT Dean, Eastern Mindanao College ...