This sorting method called sequencing Maximum / minimum because it is based on the selection of elements of maximum / minimum as a base sequencing. The idea is to choose the elements of maximum / minimum element then swap it with the element farthest Array (element left end or right end).
Subsequently repeated in the same way for the remaining array elements with no longer includes elements that have been ordered array.
Suppose the array elements will be sorted ascending:
Step 1: Determine the maximum price in the L [1 .. N] maximum price Interchange with L [N]
Step 2: Determine the maximum price in the L [1 .. N-1] Interchange maximum price with L [N-1]
Step 3: Determine the maximum price in the L [1 .. N-2] Interchange maximum price with L [N-2]. .
Step N-1: Determine the maximum price in the L [1 .. 2] Interchange maximum price with L [2]
Remaining element is L [1] does not need to be sorted because it is the last element.
So at each step there is a sorting process of finding the maximum price checkers exchange process a two-element array. Number of sorting steps is N-1.
For example :
Given an Array instance with N = 6 pieces Ascending elements not, this array will be sorted ascending. Element of the array is 25, 27, 10, 8, 76, 21
Programming : Sorting (Bubble Sort)
Ordering is the process of arranging a set of objects in a particular order or arrangement. The object can be an ascending sequence (Ascending) or decreased (Descending). The sorted data has many advantages, among others:
1. Speed up the search process
2. Can be easily determined maximum and minimum ordering process
There is a need to bring a variety of sorting methods which aim to obtain optimal sorting method.
Sorting algorithms which are widely recognized among others:
1. Bubble Sort (Sorting Bubble)
2. Insertion Sort (Sorting Insert)
3. Maximum / Minimum Sort
4. Heap Sort
5. Shell Sort
6. Quick Sort
7. Merge Sort
8. Radix Sort
9. Tree Sort
For all the sorting algorithms that will be discussed later using the type Array (Array),
which is defined as follows:
{Declaration}
Const NMaks = 100 //Maximum Number of elements {Array}
Type LarikInt = array [1 ... NMaks] of integer
In this post, we will discuss only three sorting methods, namely:
1. Ordering Bubbles (Bubble Sort)
Ordering bubble inspired by soap bubbles are above the water surface. Because soaps are lighter specific gravity than water density, it will always be soap bubbles floating on the surface. The principle of flotation is used in bubble sort. Array elements are the most precious little "float", meaning lift up (or to the left end of the array) through a process of exchange, if it will do sorting enlarged, if ordering smaller otherwise.
1. Speed up the search process
2. Can be easily determined maximum and minimum ordering process
There is a need to bring a variety of sorting methods which aim to obtain optimal sorting method.
Sorting algorithms which are widely recognized among others:
1. Bubble Sort (Sorting Bubble)
2. Insertion Sort (Sorting Insert)
3. Maximum / Minimum Sort
4. Heap Sort
5. Shell Sort
6. Quick Sort
7. Merge Sort
8. Radix Sort
9. Tree Sort
For all the sorting algorithms that will be discussed later using the type Array (Array),
which is defined as follows:
{Declaration}
Const NMaks = 100 //Maximum Number of elements {Array}
Type LarikInt = array [1 ... NMaks] of integer
In this post, we will discuss only three sorting methods, namely:
1. Ordering Bubbles (Bubble Sort)
Ordering bubble inspired by soap bubbles are above the water surface. Because soaps are lighter specific gravity than water density, it will always be soap bubbles floating on the surface. The principle of flotation is used in bubble sort. Array elements are the most precious little "float", meaning lift up (or to the left end of the array) through a process of exchange, if it will do sorting enlarged, if ordering smaller otherwise.
Labels:
IT,
Programming,
Sorting
Fuzzy Logic
8/1/13
Fuzzy
Fuzzy System has been existed since 1920, that proposed by Lukasiewicz. Fuzzy System existed to handle gray interpretation, which means to handle variable that have non-crisp values or bold values (crisp values : True/False). Fuzzy System likely more handling the variable that have non-crisp value or we called degrees of membership, for example the variable that has values between 0..1
Fuzzy Logic more focused on quantitying and reasoning of fuzzy that comes from natural language. Value that comes from natural language is more known as Linguistic Variable / Fuzzy Variable . For example above
Fuzzy Rule
On Fuzzy System, Linguistic Variable is used on Fuzzy Rule. Example of Fuzzy Rule :
Fuzzy Membership & Fuzzy Sets
In crisp logic, we just have 2 values, True and False, but in Fuzzy, we have membership degrees, or range 0 to 1 in values.
To make Fuzzy Sets, we need the membership function. To define membership function, there are many methods, for example : polling, define itself, questioner, etc. Example of fuzzy : Short (4..6) Medium (4,5..6,5) Tall (5..7) and the fuzzy sets are like this :
Fuzzy System has been existed since 1920, that proposed by Lukasiewicz. Fuzzy System existed to handle gray interpretation, which means to handle variable that have non-crisp values or bold values (crisp values : True/False). Fuzzy System likely more handling the variable that have non-crisp value or we called degrees of membership, for example the variable that has values between 0..1
"FUZZY LOGIC IS A BRANCH OF THE MEMBERSHIP DEGREES COMPARED USING EXPRESS MEMBERSHIP (TRUE / FALSE)"Fuzzy Logic
Fuzzy Logic more focused on quantitying and reasoning of fuzzy that comes from natural language. Value that comes from natural language is more known as Linguistic Variable / Fuzzy Variable . For example above
Fuzzy |
Fuzzy Rule
On Fuzzy System, Linguistic Variable is used on Fuzzy Rule. Example of Fuzzy Rule :
Fuzzy Rule |
In crisp logic, we just have 2 values, True and False, but in Fuzzy, we have membership degrees, or range 0 to 1 in values.
To make Fuzzy Sets, we need the membership function. To define membership function, there are many methods, for example : polling, define itself, questioner, etc. Example of fuzzy : Short (4..6) Medium (4,5..6,5) Tall (5..7) and the fuzzy sets are like this :
Fuzzy Sets |
Labels:
Artificial intelligence,
IT
Fuzzy Time Series
7/30/13
Fuzzy Time Series is one of method that usually used for predicting. Fuzzy Time Series is combining of data time series and using fuzzy logic to create prediction for what's next. In Fuzzy Time Series the data that used is data time series, which is have many time sequences of data, and the variable can be only one. For example : Sales Total of Dept. Store X in 2000 - 2010. It's contain only 1 variable data which is Total Sales, but it has many sequence data, for example : per month, year.
To use this method, simply find the data that have sequence time,or we called data time series, then preprocessing the data, then using this Fuzzy Time Series to predict. We can preprocess data with many ways, for example : using Min-Max Normalization and Z-Score Normalization. This preprocessing is done for making the data better. In Fuzzy Time Series, it will be good, if the differences (lag) between data is not too high, because it will take effect on the prediction.
Well after the data being processed, simply use this method. There are many steps of Fuzzy Time Series. First step, Making the Interval.
The interval is determined by look at the data. We should find the data maximal, minimal, lag between data, and average of lag.After we find these attributes, we can calculate data by Range/(Avg.lag/2). Range is Dmax - Dmin.
To use this method, simply find the data that have sequence time,or we called data time series, then preprocessing the data, then using this Fuzzy Time Series to predict. We can preprocess data with many ways, for example : using Min-Max Normalization and Z-Score Normalization. This preprocessing is done for making the data better. In Fuzzy Time Series, it will be good, if the differences (lag) between data is not too high, because it will take effect on the prediction.
Well after the data being processed, simply use this method. There are many steps of Fuzzy Time Series. First step, Making the Interval.
The interval is determined by look at the data. We should find the data maximal, minimal, lag between data, and average of lag.After we find these attributes, we can calculate data by Range/(Avg.lag/2). Range is Dmax - Dmin.
Labels:
Artificial intelligence,
IT
Mobile malware is increasing
7/26/13
Cyber threats are increasingly mushrooming. In addition to viruses or malware, phishing threats also continue to lurk in the internet users around the world, including Indonesia.
It says Business Development Manager Kaspersky Lab Southeast Asia Dony Koesmandarin, with the increasing number of smartphone users grows, the threat to users has now spread to mobile devices, such as cell phones and tablet PCs.
Scientists create invisibility viewing tools!
Google Glass function less 'horrible'? This technology may make some people more frightened. Because, with this device people can see invisibility.
Scientists from the Massachusetts Institute of Technology (MIT) experimented with a system they called Wi-Vi. The system is able to track objects moving behind the wall, using the wireless system is fairly inexpensive and readily available everywhere.
Wi-Vi can be embedded in a smartphone or handheld device specific. Dina Katabi, professor who developed the Wi-Vi with students Fadel Adib said, this system will be used for legal purposes or rescue during a natural disaster.
However, according to Katabi, users can use the gadget. For example, when a person is concerned there are following or stalking from behind, he could use gadgetnya to detect whether or not there are people behind the wall.
PHP Basic - Casting, Variable, Constants, Error Controlling Operator
7/22/13
After reading these post : PHP basic 1 and 2, i'd like to continue to add more basic on PHP. This time i will adding some basic on casting, variable, constants, and operator.
Casting
PHP can cast data automatically, for example :
Moreover, we can manually casting the variable, for example:
* $_SERVER
To access variable that available in server
* $_POST
To take data from form or HTTP POST
* $_GET
To take data from url
* $_COOKIE
To take data from cookies that stored in web
* $_FILES
Casting
PHP can cast data automatically, for example :
<?phpAs you see $a is integer and $b is string, but PHP change the string into integer automatically, because the string also number. It can happen only if the inside string is integer type.
$a = 15;
$b = '2';
$times = $a*$b;
echo $times;
?>
Moreover, we can manually casting the variable, for example:
<?php
$a = 15;
$b = 4;
$times = $a/$b;
$casttimes = (int) $times;
echo "before cast : $times<br>";
echo "after cast to integer :$casttimes";
?>
Try to run it, $times will display 3.75 which is float type, and after cast to integer, it will display 3 only. We can cast into data types that available in PHP, which is :
- (int) (integer) : cast into integer
- (float) (double) : cast into float
- (string) : cast into string
- (object) : cast into object
- (array) : cast into array
Variable
- Predefined Variable
We have learned about variable at last post, well there are some predefined variable, that provided by PHP :
* $_SERVER
To access variable that available in server
* $_POST
To take data from form or HTTP POST
* $_GET
To take data from url
* $_COOKIE
To take data from cookies that stored in web
* $_FILES
To take data from HTTP POST files.
We will use mostly $_POST when we creating web. It's useful when used with form.
- Variable Variable
What's this? sounds weird huh? Yap, this is one rule that apply too in PHP. To understand more, let's take a look at this example :
<?php
$a = 'Alex';
$$a = 'Oxlade';
$$$a = 'Chamberlain';
echo $a."<br>";
echo $$a."<br>";
echo $$$a."<br>";
?>
As you see in code above, $$a is same as $alex, which is, $alex is still null, and we fill it with 'Oxlade', and when we want to display it, just type $$a, and it will display Oxlade. Same implements that work in $$$a.
PHP Writing Rule - Part 2
7/21/13
Please visit : Part 1 to learn from beginning.
Now let's continue for other writing rule of PHP. But don't forget to run these code into your browser ok? So you can see what's the result like.
5. Case Sensitive
<?php$a = 10;$A = 15;
echo "a = $A";?>
The above code tell us that the $a and $A is different, so take care when you will code, the variable name must be precise.
PHP Writing Rule - Part 1
7/20/13
Welcome back!
Well i want to share some of PHP Writing Rule. It should be in the beginning of learning PHP, but i forget to tell you about this part.
Before that you need to learn how to display some code in browser, you can learn it from page : Excercise PHP-1
Okay,let's just start. PHP have some rule in their code. Here are some of the rule :
Well i want to share some of PHP Writing Rule. It should be in the beginning of learning PHP, but i forget to tell you about this part.
Before that you need to learn how to display some code in browser, you can learn it from page : Excercise PHP-1
Okay,let's just start. PHP have some rule in their code. Here are some of the rule :
How to Create Invitation Label Name for Invitation Card
Hello again bloggers!
Well right now, i want to post something outside the IT stuff, but also educated! Yeah, it's about creating invitation label name for invitation cards.
Have you ever invited to the party with many people in there? Such as wedding party, graduation party, or home-coming party? In those big events, the host of the party usually create invitation cards to people who will be invited. Well if the invited people is around 50 people, yeah we can still type the name in the invitation cards manually, but if hundred? moreover thousand? We need something that make our work easier.
So i search the google and found this, how to create invitation label name for invitation card, in this event is wedding party, with more flexible.
Well right now, i want to post something outside the IT stuff, but also educated! Yeah, it's about creating invitation label name for invitation cards.
Have you ever invited to the party with many people in there? Such as wedding party, graduation party, or home-coming party? In those big events, the host of the party usually create invitation cards to people who will be invited. Well if the invited people is around 50 people, yeah we can still type the name in the invitation cards manually, but if hundred? moreover thousand? We need something that make our work easier.
So i search the google and found this, how to create invitation label name for invitation card, in this event is wedding party, with more flexible.
Labels:
Invitation Card,
Label,
Tips
Ethical Hacking
7/14/13
This is from my lecture on my second year college. This article is about Ethical Hacking.
Ethical hacking is ethical hacking a network or the Internet, in which case we will be discussing about the hacker certification, or in other words the Certified Ethical Hacker (CEH). People who have this CEH are people - people who have been in the field of security systems. To get there CEH stages as follows: Following Training → Exam Preparation, Exam Code: 312-50 or ECO-350 → If you pass, then got the CEH. People who have this certification will be highly valued, because now a lot of threat - the threat of Internet crime. Methods of threat is often done in the network and internet crime is a file inclusion, sql injection, web dav ¬ major attacks to gain access to the network. Types of threats and attacks are now more sophisticated. In addition, there are a growing number of attacks, caused by a skill that must be held to be a hacker today do not need high skill - skill hackers earlier times and the number of devices that are spread makes a lot of areas that can be attacked.
Multimedia Services Quality Assesment
7/10/13
Multimedia that exists now |
Today, almost every day we will meet with multimedia, well when we are at home watching TV, or on campus while viewing a slide lecture, in the workplace while working with a laptop, and there are many examples. Perhaps there are many who ask what exactly is multimedia. Multimedia is the use of computers for the incorporation of text, images, sound, video, with tools and links, so that we can interact, create and enjoy a variety of multimedia works. In everyday life we sometimes watch the event via streaming on the Internet, such as we watch the ball, usually streaming-quality images from an extremely low compared with those we watch TV through cable or satellite, because the data packets are transferred must be minimized, if not of course be consuming and bandwidth quotas. In the value chain shift video, the quality of the video depends on four things, namely, content creation, aggregation, distribution, and devices.
Labels:
Articles,
Multimedia
Exercise PHP - MySql - 1
PHP & MySql |
Back again.
I suggest you learn about creating database and DML first , before take step in this post.
First you need to make connection to database and php file. The code is below :
<?php
$conn = mysql_connect("localhost","root","") or die("server down");
$db = mysql_select_db("inventory",$conn) or die("database dont exist");
?>
Health Informatics - How to provide informatics work in medicine and world health
7/8/13
Now there are many people who started paying attention to his health than a few years ago, this is due to the many serious diseases that appear suddenly, such as cancer, heart disease, stroke, etc.. Seeing this certainly increases the need for the health sector, as well as detailed information needed by patients and physicians. Here we are as a people in the field of IT berkeceimpung can help by Health Informatics. Health informatics is a blend of IT in the health sector. With health informatics we can provide information about the circumstances of a person's health or disease, so patients and physicians can make decisions, but that with health informatics, health data will be monitored person and patient health data can certainly be good information to cure the patient. Health informatics here is the intersection of the fields of informatics, computer, and health, so helath informatics is closely related to data storage, information retrieval, which is related to health.
Magic Memory System! - It's important how memory work!
6/26/13
Many Memories that Stored in Human's Brain |
Human brain is the most amazing thing ever, in which there are a gazillion brain cells. The human brain regulates all functions of our body, walking, talking, remembering, feeling happy and sad, and all the other things. According to research by experts, at this time we only use less than 1% of our brain capacity. Surely we can not imagine what would happen if we put 100% of our brain capacity. The human brain is divided into two, the left brain and right brain. The left brain governs logic, memory, number, sequence, whereas the right brain governs the rhythm, awareness, daydreaming, color, etc.. Judging from the structure, the human brain consists of 3 parts, the brain stem, limbic brain, and neokortek. Each - each part has a different function, but they have to work together so that people can work normally.
Exercise PHP - 2
6/16/13
We continue to our next excercise. We have learn that PHP can do many things with website. We can display looping text as much as we want, we can change the text that want to display, and we can stop looping, and many more. The excercise below will display us how to learn looping text, stop it, and change the last text.
First look at the code below.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Looping and Break</title>
</head>
Beautiful Information - How cool is information!
6/12/13
Information Sharing |
Again this is my article from my second year college. This is about information that exist in all of us!
Today's world is filled with a variety of new media in the visual field, for example with a laptop, tablet, phone, etc.. Currently all of the information has also been changed, where previously we were busy looking for information, but now it is reversed, that the information would be looking for us. It can be seen by the amount of information, especially on the internet. Technological developments in the visual field is very fast, could be seen with the colored tv, tv that used only black - white. This is because humans are much more like the real thing. With a design that is a combination of art and science, will make the world a better place.
Labels:
Articles,
Information
Engineering Design Process
5/14/13
Work Design |
Engineering Design process itself starts from the abstract look, then make it a common thing (general), then specified, unspecified setelh, dijadikanlah new models, and applied to the real world. Last re-verified the results obtained there to see what needs fixing what is not. In the engineering world, we as engineers should know about validation, verification, and testing. Validation itself is the ability to find things that people need, verification helps us to make better products, and final testing is to check what the product is worth. To make a good design, it takes a combination between the two mindset, namely Presfiktif (More inclined to algorithmic, systematic) and Descriptive (Finding solutions - with creative solutions).
Biometric Technology
4/16/13
Fingerprint Technology |
The system itself works as follows: on the Sensor Module -> go to Quality Assessment -> then checked in Matching and Decision Making -> and checked again in the System Database Module. Look of the excess, Biometric Technology has 7 factors that could adjust everyone, that is owned by everyone, unique, permanent, can be acquired easily, a good degree of accuracy, acceptability, circumvention. Generally, the body parts used in Biometric Technology is the retina, fingerprint because these were a unique part of the body, every human being is different, and the possibility of minor changes.
Subscribe to:
Posts (Atom)