Sabado, Disyembre 17, 2011

Balak kong puntahan.....

Ang villa julia ay isang resort na matatagpuan sa silang, cavite. Isa ito sa pinagmamalaking pasyalan sa aming lugar. Ito ang napili kong puntahan sa darating na pasko sa kadahilanang halos taun taon na lng ay sa malayo kami nagrereunion ng pamilya. Gusto ko namang maranasan na mapuntahan ang ganda at serbisyo ng villa julia. Tsaka sa isang banda bakit lalayo ka pa kung may mas malapit naman.

Ito po yung ibang pasilidad ng Villa Julia:


Malaki ang swimming pool ng villa julia na tamang tama naman sa laki ng aming angkan para sa nalalapit naming reunion.

Masarap magistambay sa tree house na yan na sa pagkakaalam ko ay kakagawa lamang para sa mga nais magpunta.

 medium cabanas
small cabanas

Ito yung mga cottage na pwedeng pagstayan ng mga papasok at mg papasko sa villa julia tulad namin na sinasabay ang pasko sa reunion para isang handaan na lng.


Masarap magpahinga sa kubo na yan kung napapagod ka sa mga events na pinaggagawa nyu sa resort.

          

          Maraming magagandang pasyalan sa buong bansa ngunit hindi mabubuo ang pasko nyu kung hindi nyu naman kasama ang mga mahal nyu sa buhay. Pero kung ngbabalak kayu na pumunta sa mga ganitong resorts ay dun na lng ,kayu sa malapit na resort sa inyo. Nakatiipid na kayo sa pamasahe, hindi pa kayu masyadong pagod sa byahe.

references:
http://villajulia.pbworks.com/w/page/13231528/FrontPage
          


-------June Rey A. Cortez

Which is the BEST?



Tablet, PC or Laptop
            
            These three gadgets are the most used gadgets of the Filipinos now a day. Some Filipinos have used these top gadgets of the country for their personal needs or sometimes for luxury. Students, businessman, teachers have the great population in using tablet, PC, and laptop but which of these gadgets are being used or preferred to use by the people even though they are useful in any kind of works.


            Tablet was produced lately. It has the size as a notebook. You can store music, videos, and pictures etc. on this or even reviewers for students. Tablet Company proposed the tablets in schools because instead of buying books they can stored the data in this gadget and use it as a source of knowledge and you can use it also for online activities.


                        A small, relatively inexpensive computer designed for an individual user. In price, personal computers range anywhere from a few hundred dollars to thousands of dollars. All are based on the microprocessor technology that enables manufacturers to put an entire CPU on one chip. Businesses use personal computers for word processing, accounting, desktop, publishing, and for running spreadsheet and database management applications. At home, the most popular use for personal computers is for playing games.


            Laptop is the common used gadget among the three Laptop computers, also known as notebooks, are portable computers that you can take with you and use in different environments. They include a screen, keyboard, and a trackpad or trackball, which serves as the mouse. Because laptops are meant to be used on the go, they have a battery which allows them to operate without being plugged into a power outlet. Laptops also include a power adapter that allows them to use power from an outlet and recharges the battery.


  When buying gadgets we must first check the specification of each gadget for ultimate satisfaction and avoiding disappointments  therefore any of this gadget is useful         
but on this top three gadgets which is preferred to use by the people. For me I preferred to use laptop than personal computers and tablets because we can use laptop for school works like presenting reports, making thesis, etc. This gadget can be carry in any places you want because its weight is not heavy as computers. Even though tablet is the lightest among the three, laptop was doing great part of our college lives.
            Laptops can be powerful and convenient, the convenience often comes at a price. Most laptops cost several hundred dollars more than a similarly equipped desktop model with a monitor, keyboard, and mouse. Furthermore, working long hours on a laptop with a small screen and keyboard may be more fatiguing than working on a desktop system. Therefore, if portability is not a requirement for your computer, you may find better value in a desktop model but then again I personally choose laptop as the best among the three.


But in the end you and only yourself knows what is the best among the three it is just only my opinion based on my experience if you buy one of these gadgets make sure to see the specification of the gadget because sometimes it better to use what we don't want than what we want so make sure the specification of the gadget you choose is the one gets your ideal  specs. or better.




REFERENCES:





by:  Adrian Paul Q. Liveta

Sabado, Disyembre 10, 2011

Benigno "Ninoy" Aquino




Benigno “Ninoy” Aquino

            Maybe you saw a face of a person in our 500 peso bill. I would never ask if you know that person already because I know that you know him. He is the much known Benigno Aquino or simply “Ninoy”, he was proclaimed as a hero of our country for fighting the Marcos government and because of that he got himself into danger and on the date August 21, 1983, he was assassinate at the airport (NAIA) by Ronaldo Galman and soon he was killed by the soldiers who escort Ninoy from the airport. And until now this case is still unclosed but the Filipino people accused President Marcos which resulted to EDSA revolution. In this blog I am going to talk all about a hero on mid 70s and 80s.

            Ninoy Aquino was born on November 27, 1932 at the province of Tarlac, to a prominent family. He was a grandson of a General and a son of a Philippine Senator. The name Ninoy Aquino stood early at the age of 17, he was sent by the Manila Times newspaper to report from the war between North and South Korea which was joined by the China and America.

            At the age of 22 he became the youngest mayor in his home-town Concepcion. After six years he became the Governor of Tarlac. In 1967 Aquino once again made a history for being the youngest elected senator of the Philippines. Meanwhile he married Corazon Cojuanco, with whom he eventually raised five children.

            With his brilliant mind and great ambition, he became the leading candidate for the presidency when President Marcos has decided to leave the palace after completing the maximum of two terms on 1973. Aquino’s ambition to be a president was postponed when Marcos decided to declare the state of emergency in which military authorities are given temporary rule or “Martial Law. At the same time Marcos dissolved the constitution, claiming supreme power and jailing his political opponents, including Aquino. Aquino was charged with murder, subversion, and illegal possession of firearms. Although he denied the charges, Aquino was found guilty and was convicted by a military tribunal, or military court, and spent over seven years in prison. When he was prisoned, the government tries to bring down the morale and ability to think by losing his appetite. In 1980 he was allowed to undergo an operation in the United States for a heart bypass operation. He returned to the Philippine on 1983. Upon arriving in the Manila airport he was shot and killed. Marcos and the military stated that a lone gunman who had been hired by the Communist Party had carried out the assassination and no military personnel were involved in that particular incident.After that incident, Marcos lost the trust of his people; the Philippine economy also fell apart. By 1985 the nation was in political and economic chaos, with Marcos under attack by the press and by the strengthened political opposition, which did well in elections.In December 1985 the court proclaimed that General Ver and the others charged with Aquino's murder were not guilty. Marcos promptly returned Ver to his former position. Popular unrest with Marcos's rule grew steadily, however. Within weeks a political movement formed around Aquino's widow, Corazon. She was elected president of the Philippines in 1986, unseating Marcos.
            Years after Benigno “Ninoy” Aquino and Corazon “Cory” Aquino’s son Benigno “Noynoy” Aquino III wins the presidency election on May 2010 and proclaimed as a president of the Republic of the Philippines on June 2010.

REFERENCES:


---June  Rey A. Cortez

Biyernes, Disyembre 9, 2011

Quick sort algorithm versus Bubble sort algorithm



Bubble sort Vs Quick sort
Bago tayo pumunta sa main event alamin muna natin ang bawat isang algorithm una Bubble sort.
Isa sa pinaka basic na sorting algorithm ang bubble sort? It is used in practice and its main application is to make an introduction to the sorting algorithms. Bubble sort belongs to O(n2) sorting algorithms, which makes it quite inefficient for sorting large data volumes. Bubble sort is stable and adaptive
Isa sa pinaka basic na idea about dito ay ginagamit ito sa pamamagitan ng pag kukumpara sa bawat laman ng array isa-isa at pag katapos nito ay uulitin nito ang unang step kung saan mag sisimula ulit cya sa umpisa hangang sa matapos nito ang sorting.
Code:
// Example Program in C++
  // to sort an array
  // using bubble sort

  #include<iostream.h>

  void main(void)
  {
   int temp, i, j;
   int ar[10];

   cout<<"enter elements of array:\n";
   for(i=0; i<10; i++)
     cin>>ar[i];

   // sorting is done here
   for(i=0;i<10;i++)
     for(j=0; j<(10-1); j++)
       if (ar[j]>ar[j+1])
         {
          temp=ar[j];
          ar[j]=ar[j+1];
          ar[j+1]=temp;
         }
   // till here
 
   for(i=0; i<10; i++)
     cout<<endl<<ar[i];
 
   cout<<endl;
  }

Try ninyong gumamit ng program nito at makikita mu sa pag sisimulate mu ng mga code na isa isa nitong ikinukumpara ang  laman ng bawat array hangang sa  ito ay matapos. The best case of bubble sort is the ascending order of the number dahil direct nitong nalalaman kung na sort a ang mga laman ng array ngunit lahat ay may kahinaan and descending order ng number ng array ay lubhang nakaka apekto sa pag sosort ng algorithm na ito kaya lubhang mabagal ang pag sort nito kaysa sa ibang sorting algorithm.
Kung panu to nanggyayari e2 ang mga larawan at example

















































Quick sort naman tayo
            Ang quick sort algorithm ay isa sa pinaka mabilis na algorithm. Quicksort is a relatively simple sorting algorithm using the divide-and-conquer recursive procedure. It is the quickest comparison-based sorting algorithm in practice with an average running time.

          Mas madalas gamitin ang quick sort kaysa sa bubble sort kasi mas efficient ang quick sort algorithm dahil sa massive sorting nito.

panu nga ba gumagana ang quick sort?

Quicksort, like mergesort, is a divide-and-conquer recursive algorithm. The basic divide-and-conquer process for sorting a subarray S[p..r] is summarized in the following three easy steps: 

Divide: Partition S[p..r] into two subarrays S[p..q-1] and S[q+1..r] such that each element of S[p..q-1] is less than or equal to S[q], which is, in turn, less than or equal to each element of S[q+1..r]. Compute the index q as part of this partitioning procedure 

Conquer: Sort the two subarrays S[p...q-1] and S[q+1..r] by recursive calls to quicksort. 

Combine: Since the subarrays are sorted in place, no work is needed to combing them: the entire array S is now sorted.




QUICKSORT(S, P, r)
1 If p < r
2        then q <- PARTITION(S, p, r)
3                QUICKSORT(S, p, q-1)
4                QUICKSORT(S, q+1, r)

note: to sort the whole array S, the initial parameters would be: QUICKSORT(S, 1, length[A]) 


PARTITION(S, p, r)
1 x <- S[r]
2 i <- p-1
3 for j <- p to r-1
4        do if S[j] <= x
5                then i <- i+1
6                         swap S[i] <-> S[j]
7 swap S[i+1] <-> S[r]
8 return i+1


Quicksort's running time depends on the result of the partitioning routine - whether it's balanced or unbalanced. This is determined by the pivot element used for partitioning. If the result of the partition is unbalanced, quicksort can run as slowly as insertion sort; if it's balanced, the algorithm runs asymptotically as fast as merge sort. That is why picking the "best" pivot is a crucial design decision. 
The Wrong Way: the popular way of choosing the pivot is to use the first element; this is acceptable only if the input is random, but if the input is presorted, or in the reverse order, then the first elements provides a bad, unbalanced, partition. All the elements go either into S[p...q-1] or S[q+1..r]. If the input is presorted and as the first element is chosen consistently throughout the recursive calls, quicksort has taken quadratic time to do nothing at all. 

The Safe Way: the safe way to choose a pivot is to simply pick one randomly; it is unlikely that a random pivot would consistently provide us with a bad partition throughout the course of the sort. 

Median-of-Three Way: best case partitioning would occur if PARTITION produces two subproblems of almost equal size - one of size [n/2] and the other of size [n/2]-1. In order to achieve this partition, the pivot would have to be the median of the entire input; unfortunately this is hard to calculate and would consume much of the time, slowing down the algorithm considerably. A decent estimate can be obtained by choosing three elements randomly and using the median of these three as the pivot.

























































code:



#include <stdio.h>

#include <stdlib.h>

void swap(int *x,int *y)

{

   int temp;

   temp = *x;

   *x = *y;
   *y = temp;

}

int choose_pivot(int i,int j )

{

   return((i+j) /2);

}


void quicksort(int list[],int m,int n)

{

   int key,i,j,k;

   if( m < n)

   {

      k = choose_pivot(m,n);

      swap(&list[m],&list[k]);

      key = list[m];

      i = m+1;

      j = n;

      while(i <= j)

      {

         while((i <= n) && (list[i] <= key))

                i++;

         while((j >= m) && (list[j] > key))

                j--;

         if( i < j)

                swap(&list[i],&list[j]);

      }

      // swap two elements

      swap(&list[m],&list[j]);

      // recursively sort the lesser list

      quicksort(list,m,j-1);

      quicksort(list,j+1,n);

   }

}

void printlist(int list[],int n)

{

   int i;

   for(i=0;i<n;i++)

      printf("%d\t",list[i]);

}


void main()

{

   const int MAX_ELEMENTS = 10;

   int list[MAX_ELEMENTS];


   int i = 0;

    

   // generate random numbers and fill them to the list

   for(i = 0; i < MAX_ELEMENTS; i++ ){

       list[i] = rand();

   }

   printf("The list before sorting is:\n");

   printlist(list,MAX_ELEMENTS);

    

   // sort the list using quicksort

   quicksort(list,0,MAX_ELEMENTS-1);


   // print the result

   printf("The list after sorting using quicksort algorithm:\n");

   printlist(list,MAX_ELEMENTS);

}



And the Result iS!!!

Quick Sort Algorithm Wins!!!!



- quick sort is better than the bubble sort because of possibility na ang set ng array ay kadalasan ay hindi na ka sort agad kaya ang 
suggestion ko ay mas magandang gamitin ang quick sort.

-Adrian Paul Q. Liveta
-200910042

Reference:
http://www.algolist.net/Algorithms/Sorting/Bubble_sort
http://learning-computer-programming.blogspot.com/2007/06/sorting-array-using-bubble-sort.html
http://www.devx.com/vb2themax/Tip/18972
http://warp.povusers.org/grrr/bubblesort_eng.html
http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/quickSort.htm
http://www.cprogramming.com/tutorial/computersciencetheory/quicksort.html
http://www.devx.com/vb2themax/Article/19900
http://warp.povusers.org/SortComparison/
http://www.cprogramming.com/tutorial/computersciencetheory/quicksort.html