Saturday, March 19, 2011

Looping Statement repetition.



----- Visual Basic 0.6 ( Looping Repetition )
------- GRADE CALCULATOR CODES.



Dim intCount As Integer, strChecked As String

    If chkDone(Index).Value = vbChecked Then
        cmdDisplay.Enabled = True
        txtScore(Index).Enabled = True
        txtScore(Index).SetFocus
    Else
        txtScore(Index).Text = 0
        txtScore(Index).Enabled = False
        strChecked = "N"
        Do While intCount <= 4 And strChecked = "N"
            If chkDone(intCount).Value = vbChecked Then
                strChecked = "y"
            End If
            intCount = intCount + 1
        Loop
        If strChecked = "n" Then
            cmdDisplay.Enabled = False
        End If
    End If
           
   
End Sub

Private Sub cmdClear_Click()
Dim x As Integer

For x = 0 To 4
   chkDone(x).Value = False
   txtScore(x).Text = ""
Next x

lblGrade.Caption = ""
txtName.SetFocus

 
End Sub

Private Sub cmdDisplay_Click()
    Dim intEarned As Integer, intPossible As Integer
    Dim sngRatio As Single, intCount As Integer
   
        For intCount = 0 To 4
            If chkDone(intCount).Value = vbChecked Then
                intEarned = intEarned + Val(txtScore(intCount).Text)
                Select Case intCount
                    Case 0 To 2
                        intPossible = intPossible + 10
                    Case Else
                        intPossible = intPossible + 50
                    End Select
            End If
        Next intCount
       
        sngRatio = intEarned / intPossible
            Select Case sngRatio
                Case Is >= 0.9
                    lblGrade.Caption = "A"
                Case Is >= 0.8
                    lblGrade.Caption = "B"
                Case Is >= 0.7
                    lblGrade.Caption = "C"
                Case Is >= 0.6
                    lblGrade.Caption = "D"
                Case Else
                    lblGrade.Caption = "F"
            End Select
   
End Sub

Private Sub cmdExit_Click()
    Unload frmGrade

End Sub

Private Sub cmdPrint_Click()
    PrintForm
End Sub

Private Sub Form_Load()
    frmGrade.Top = (Screen.Height - frmGrade.Height) / 2
    frmGrade.Left = (Screen.Width - frmGrade.Width) / 2
End Sub

Private Sub Form_Unload(Cancel As Integer)
Const conBtns As Integer = vbYesNo + vbExclamation + vbDefaultButton1 + vbApplicationModal
Dim intUserResponse As Integer

intUserResponse = MsgBox("Do you want to exit?", conBtns, "Grade Application")
If intUserResponse = vbNo Then          'User does not want to quit the app
    Cancel = 1                          'prevent form unload.
End If

End Sub

Private Sub txtScore_GotFocus(Index As Integer)
    txtScore(Index).SelStart = 0
    txtScore(Index).SelLength = Len(txtScore(Index).Text)
   
End Sub

Thursday, March 10, 2011

STRUCTURED PROGRAMMING

SELECTION CONSTRUCTS
The Selection constructs are used when the flow of execution may flow down two or more paths.

I compile it in .Exe



                            If statements can be nested, and the combined with logical operators.



THE IF STATEMENT
The If statement is used to control the flow of execution down one of two or more paths, depending on the result of a logical test. The Else If statement may be used to specify conditions should previous conditions be false, and Else may be used should none of the above be true. 


of course on the Selection Statement you can see may example below the last topic on our subject.   

-I use the Select Case construct to Access the code, according to which arrow key is pressed on the keyboard or in the screen using the point Cursor. 

The Select statement can be used when multiple If statements become messy and difficult to read. Each Case statement is evaluated from the top down. Should the Case statement be true, the section of code associated with the condition is executed. Case Else is used as a catch all.


Tuesday, March 1, 2011

Programming Practices

PROGRAM READABILITY
a.) Meaningful Identifiers

      Dim mAccessCode As Long       
           Dim message As String

Declaires the variable mAccessCode as type Long. Like Integer , Long stores whole numbers (w/o decimal point). the rage of the values that can be stored in a Long are-- 2,147,483,648 to 2,147,483,647.
The Long is a type of character &. with m allows them to be identified easily.

b.) Logic Practice 


    Select Case mAccessCode
         Case Is < 1000
             message = "Access Denied"
             Beep
         Case 1645 To 1689
             message = "Technician Personnel"
         Case 8345
             message = "Custodial Services"
         Case 55875
             message = "Special Services"
         Case 999898, 1000006 To 1000008
             message = "Specific Personnel"
         Case Else
             message = "Access Denied"
  End Select
Placing a larger value on the left side of keyword To in a Case is a logic error and is ignored at run-time.
When using the optional Case Else statement in a Select Case structure, not placing the Case Else as the last statement is a syntax error.

c.) Coding Practice

      Case Is < 1000
Keywords Is along with the comparison operator < , specifies the rage of values to test.

d.) Notes and Comments

    Dim message As String

   mAccessCode = txtDisplay.Text
   txtDisplay.Text = ""

PROGRAM DOCUMENTATION

a.) Program Listing

    Private Sub cmdZero_Click()
        txtDisplay.Text = txtDisplay.Text & "0"
  End Sub

I listed the properties for cmdZero, Although i did not use other numbered buttons, they have the same property settings.

b.) Program Specification

Security Keypad
-A Simple Vb Programming, Easy Operation
- It can also a Security Access Control Keypad ( Company User )-For switching locks,entry and security systems.
-Has a limited Users codes.

Numbers combinations are possible for the 4 independent user codes: 
1645 to 1689 (Technician Personnel)
8345 (Custodial Services) 
55875 (Special Services)
999898, 1000006 to 1000008 (Scientific Personnel).
User code 1000 can be altered to act as a Panic code for reporting panic to an "Access Denied".


c.) File Layouts and Record Description

I listed the properties for cmdZero, Although i did not use other numbered buttons, they have the same property settings.

Tthe variable mAccessCode as type Long. Like Integer , Long stores whole numbers (w/o decimal point). 
The rage of the values that can be stored in a Long are-- 2,147,483,648 to 2,147,483,647.
The Long is a type of character &.

 1stLogEntry.AddItem Now & Space$ (3) & message

-It has the ability to record the time and date to the text box and it tells as if it is "Access Denied" or granted.
 Now is the current system time and date.
function Space$(3) creates and returns a string containing spaces.


d.) Operating Instruction

including the Case Else statement focuses the programer on the need to process exceptional conditions.  In some situation s, no Case Else processing is needed.
The required End Select terminates the Select Case structure, such indentation improves program readability.


Look at the file layouts and the Instructions. ( Security Keypad Program GUI ) 


Initial GUI at execution.


User entering an access code.




















GUI after user has pressed Enter.


-Code Listing-






 Visual Basic 0.6






  

Friday, February 18, 2011

Differences of four Web Browsers


a.Formats & Protocols
b.Power
c.Performance
d.Platform

*Internet Explorer -

a. Just click the address bar to directly open a Windows Messenger chat window.
b. Faster internet browser
c. Is private, reliable, and flexible Internet Browsing expirience.
d. Extensions of the standards, including HTML, CSS, and the DOM.


* Mozilla -
a.The most custumizable browser.
b.Just a few minutes to download.
c.It can keeps your computer safe.
d. Supports most basic web standards including HTML, XML, XHTML, CSS  and they quickly check the spelling of text.

*Opera -
a.It is set Landscape with a clearer screen and a small mouse cursor,
you can overview and zoom the certain web pages.
b. Is also one of the fastest web browsing applications.
c. Design for mobile phones and smart phones.
d. Available for devices using the Blackberry and Symbians operating systems.

*Safari -
a.graphical web browser created by Apple.
b.Rank 4 for the most widely used browsers,available for free download.
c.Simple with a elegant interface.
d.fastest browser from the windows platforms. Available for MAC and PC users.


*Google chrome -
a. Newest web browser, Latest security updates, themes and more..
b. It runs websites and applications faster., its a free web browser.
c. Clean and Simple.
d. OS and it has also Add-on's for more easy progress.

Safety

IE - Such a highly private, flexible and reliable web browsers
Mozilla Firefox - Most secured web browsers
Opera - Quickly customized and updated. 
Safari - Being able to customize that it can protect its system on any dangerous Mal-were.
Google Chrome - has the ability to give you a warning when you are visiting sites, for protecting your pc to  danger malware or any other unsafe sites.

LINUX AND WINDOWS SAFETY : (prone in viruses.)

Linux - feature that provides a mechanism for supporting access control security policies, and it can delivers the latest breaking news and information on security, linux, open source, firewalls, networks and privacy.

Windows - Provides real-time protection for your home PC that guards against viruses, spyware, and other malicious software. 

Conclusion :

Based on my Experience of all this Web browsers the speed of the internet its always depends on the Connection of the Network. But for me the most useful web browser is Mozilla Firefox although i used Google Chrome. Mozilla is a secured and has a speed when you are downloading files and when you open a Social network like Facebook it is also fast unlike Internet Explorer. I also used Opera for my phone because is so portable it has the ability to download in just a minutes.

Wednesday, February 9, 2011

WEB PROGRAMMING LANGUAGE

Give 5 Not Common PL.



Datalog is a query and rule language for deductive databases that syntactically is a subset of Prolog. Its origins date back to the beginning of logic programming, but it became prominent as a separate area around 1977 when HervĂ© Gallaire and Jack Minker organized a workshop on logic and databases. David Maier is credited with coining the term Datalog. Query evaluation with Datalog is based on first order logic, and is thus sound and complete. It can be done efficiently even for large databases. Query evaluation is usually done using bottom-up strategies.

(BLISS) Basic Language for Implementation of System Software is also ‘‘expression language’’ rather than a ‘‘statement language’’  a type less block-structured language based on expressions rather than statements, and includes constructs for exception handling, coroutines, and macros. It does not include a goto statement. For example, the counterpart of an assignment ‘‘statement’’ in BLISS is, strictly speaking, an expression that itself has a value. The value of an expression can be either used or discarded in BLISS... Finally, BLISS includes a macro facility that provides a level of capability usually found only in macro-assemblers.


Advanced Multi-Purpose Language (AMPLE) is a scripting language and a part of the Falcon Framework software framework developed for the Apollo/Domain computer by Mentor Graphics. It is a dynamically typed C-like programming language, with for example vector types added. In 2009, AMPLE was enhanced with hash-like data types in version 9.0 of the AMPLE-IC variant (IC-Station product line).
As the Apollo/Domain was very popular in computer-aided engineering (especially in electronic design automation), AMPLE is still used in several Mentor Graphics applications such as Design Architect IC and IC Station. These tools are built on the Falcon Framework, and run on Unix and Linux workstations. Some of the PCB design tools even run on Windows NT.


AppleScript is a scripting language created by Apple Inc. and built into Macintosh operating systems since System 7. The term "AppleScript" may refer to the scripting system itself, or to particular scripts that are written in the AppleScript language.
AppleScript is primarily an inter-application processing system, designed to exchange data between and control other applications in order to automate repetitive tasks. AppleScript has some limited processing abilities of its own - basic calculation abilities, and some more intricate text processing tools - and is extensible, allowing the addition of scripting additions which add new functions to the language itself. Mainly, however, AppleScript relies on the built-in functionalities of other applications and processes to handle complex tasks.


CLIST is an interpreted language. That is, the computer must translate a CLIST every time the program is executed. CLISTs therefore tend to be slower than programs written in compiled languages such as COBOL, FORTRAN, or PL/1. (A program written in a compiled language is translated once to create a "load module" or executable.)



Compare at least two Not Common PL.


AMPLE
As the Apollo/Domain was very popular in computer-aided engineering (especially in electronic design automation), AMPLE is still used in several Mentor Graphics applications such as Design Architect IC and IC Station. These tools are built on the Falcon Framework, and run on Unix and Linux workstations. Some of the PCB design tools even run on Windows NT.


AppleScript
AppleScript is primarily an inter-application processing system, designed to exchange data between and control other applications in order to automate repetitive tasks. AppleScript has some limited processing abilities of its own - basic calculation abilities, and some more intricate text processing tools - and is extensible, allowing the addition of scripting additions which add new functions to the language itself. Mainly, however, AppleScript relies on the built-in functionalities of other applications and processes to handle complex tasks.




Examples Source Code :



  • AMPLE




function split(s:string,d : optional {default = " "} ),
  QUICK_HELP "Splits string <s> delimited by <d> in a vector"
{
  local ret=[];
  local n;
  local e="";
  for(n=0;n<length(s);n=n+1)
  {
    if(s[n] != d )
      e=$strcat(e,s[n]);
    else
    {
      ret=lappend(ret,e);
      e="";
    }
  }
  if(e != "") ret=lappend(ret,e);
  return ret;
}
 
function foo( param : string { default=($last!=void)?$last:"my default value" } )
  , INDIRECT   // transcript all commands each in the function body
  , QUICK_HELP "Just a little Example Function"
{
  local n=0;
  for(n=0;n<length(param);n=n+1)
  {
    $writeln($strcat("=> ",param[0:n]));
  }
  return 0;
}

  • AppleScript

set chosenListItem to choose from list {"A", "B", "3"} ¬
        with title ¬
        "List Title" with prompt ¬
        "Prompt Text" default items ¬
        "B" OK button name ¬
        "Looks Good!" cancel button name ¬
        "Nope, try again" multiple selections allowed false ¬
        with empty selection allowed






Saturday, February 5, 2011

PROJECT (SUB. TO : MR. JOEY SUBA )

First i just used HTML to design my TEMPLATE.
Then i was looking for a layout / background in Pyzam.com to look it original, clean and simple.
HTML is easy, on how to make web sites.
I found a Google Map to create the GIS and edit it in html through gadgets with Css codes. 
(just look it below under my bulletin.)



* 2 Alternative languages i've used...

 - I used html instead of Dreamweaver because i dont have a lots of knowledge using it,
   so i used html cause is easy to learn.


- For the photos, I used Photoscape.. i was always using it when im editing or designing my art works and photos. I haven't used Photoshop i got irritated every time I've used it.. cause there are so many icon to click.


  

Friday, February 4, 2011

Randomness: definition ME and MY FRIENDS :)

Best Friends means different things to different people. Some insist that you can have only one best friend. Others assert that they have best friends for different aspects of their personalities. Whatever the precise definition, your best friend is the person who gets you. They understand who you are and what you are saying. The greatest distance cannot separate best friends. You will always feel a kinship with them, and be able to instantly continue the friendship even after not talking for many years.

IMISSTHEM :'))





Marry Your Daughter


"I WISH THAT SOMEONE WHO'S DESTINED TO ME WILL SING THIS SONG TO ME AND MY DAD IN THE RIGHT TIME ! HOW I WISH HE WOULD ! <3 =))"




Marry Your Daughter
Sir, I’m a bit nervous
‘Bout being here today
Still not real sure what I’m going to say
So bare with me please
If I take up too much of your time,
See in this box is a ring for your oldest
Shes my everything and all that I know is
It would be such a relief if I knew that we were on the same side
Very soon I’m hoping that I..
Can marry your daughter
And make her my wife
I want her to be the only girl that I love for the rest of my life
And give her the best of me ’till the day that I die, yeah
I’m gonna marry your princess
And make her my queen
She’ll be the most beautiful bride that I’ve ever seen
Can’t wait to smile
When she walks down the isle
On the arm of her father
On the day that I marry your daughter
She’s been hearing for steps
Since the day that we met (I’m scared to death to think of what would happen if she ever left)
So don’t you ever worry about me ever treating her bad
I’ve got most of my vows done so far (So bring on the better or worse)
And tell death do us part
There’s no doubt in my mind
It’s time
I’m ready to start
I swear to you with all of my heart..
I’m gonna marry your daughter
And make her my wife
I want her to be the only girl that I love for the rest of my life
And give her the best of me ’till the day that I die, yeah
I’m gonna marry your princess
And make her my queen
She’ll be the most beautiful bride that I’ve ever seen
I can’t wait to smile
As she walks down the isle
On the arm of her father
On the day that I marry your daughter
The first time I saw her
I swear I knew that I say I do
I’m gonna marry your daughter
And make her my wife
I want her to be the only girl that I love for the rest of my life
And give her the best of me ’till the day that I die
I’m gonna marry your princess
And make her my queen
She’ll be the most beautiful bride that I’ve ever seen
I can’t wait to smile
As she walks down the isle
On the arm of her father
On the day that I marry your daughter