skip to main | skip to sidebar

OPEN SOURCE

Linux for Better life

  • Home
  • Trik-Tips
  • Free Template
  • Blogger Hack
  • Free Ebook
Showing posts with label free. Show all posts
Showing posts with label free. Show all posts

Java


/*
* Praktikum Algoritma dan Pemrograman
* STMIK AMIKOM Yogyakarta
* =======================================================
* Algoritma pencarian menggunakan metode Sequntial Search
* pada data acak.
*
*/

import javax.swing.JOptionPane;

public class SeqSearch {
public static void main (String[] args) {
// diberikan array data yang tidak terurut
int [] data = {1, 5, 9, 3, 6, 2, 11, 19, 7, 10, 89};

// mengambil input berupa kunci yang akan dicari
String keyStr = JOptionPane.showInputDialog("Data yang dicari:");

// mengkonversi kunci yang bertipe String ke int agar sesuai dengan
// tipe data pada array
int keyInt = Integer.parseInt(keyStr);

// penanda apakah data ditemukan atau tidak
// nilai awal adalah false atau tidak ketemu
boolean ketemu = false;

int i = 0; // iterator atau variabel perulangan
int idx = -1; // variabel untuk menampung index

// lakukan perulangan ketika tidak ketemu dan iterator kurang dari
// panjang array
while(!ketemu && i < idx =" i;" keyint ="=" ketemu =" true;" i =" i" x =" ekspresi" x =" nilai1;" x =" nilai2;" pesan =" ketemu">

Posted by MALIK 0 comments

Labels: code, free, Java, source code

UNIX and LINUX part 7


PORTABILITY
One of the most sought after features UNIX possesses is portability. Portability is the ability to rewrite the operating system for a different vendor's hardware without a major rewrite effort. UNIX is highly portable and has been ported by many hardware vendors to their computer hardware. In fact, every computer vendor has a UNIX or a UNIX-like system ported to their hardware - a milestone that no other operating system can claim.
There are two main reasons UNIX is a prime system for porting from hardware to hardware. The first is that the kernel provides an interface between the hardware and most of the nonkernel UNIX software. When UNIX is ported to another hardware platform, only the kernel requires major modifications. Since most of the UNIX software interfaces with the kernel and not the hardware, the software is hardware independent and does not require much, if any, modification when it is ported to a new hardware platform.
The second reason UNIX is easy to port is that the majority of the UNIX operating system is written in the C programming language. Most operating systems are written in the hardware vendor's proprietary assembly language. This makes it very difficult, if not impossible, to port their operating systems to a different vendor's computer.
Benefits
Portability allows the customer to choose the vendor and not be locked into that vendor's hardware and software environment. It also provides the user with a broad base of application software that can be used on hardware from different application vendors.
The porting of an operating system creates a standard software environment across a broad range of computers, ranging in size from micros to supercomputers. This cuts training time dramatically and increases overall productivity. It also reduces support costs and redevelopment costs.
PORTABLE APPLICATION SOFTWARE
The UNIX System provides a standard application development environment that allows for easy porting of application software. The C programming language is a big asset to the porting of software between different UNIX machines.
The ability to port software to many systems easily provides application software vendors with a much larger market without the headaches of multiple proprietary environments. Customer training requirements are reduced and the training of internal personnel is minimized. The number of support people needed is not increased because of different knowledge base requirements, but because more software is being sold. Development can spend more time on enhancements instead of ports to unknown, proprietary architectures. Once a customer has bought a product on one UNIX machine, the customer can purchase a different vendor's UNIX machine and be able to use the same applications without having to retrain personnel. As you can understand, portability is a very important issue for many computer users.
JOB CONTROL
Job control on UNIX is the ability to control which job is executed in foreground, background, or is suspended.
* Foreground execution is considered normal interactive command execution. The command is entered from the keyboard. The shell waits until the command completes execution, then the shell prompts for another command to execute.
* Background execution is considered batch processing. A command is entered and detached from the terminal. The shell can continue interactive command processing.
* Suspended jobs (processes) are commands that have been placed in a suspended state. They are not being executed in background or foreground.
Job control allows you to suspend a foreground or background job. A suspended job can be moved to background or foreground. Background jobs can be brought to the foreground and foreground jobs can be placed in the background.
Using job control can increase the productivity of a user by allowing multiple tasks to be juggled back and forth between background, foreground, or a suspended state. For example, a user can edit a source file while executing the compiled program, thus watching the functionality of the program and making changes while suspending the program.

Posted by MALIK

Labels: code, free, linux, open source, operating system, unix

UNIX and LINUX part 6


COMMUNICATING WITH OTHER USERS
UNIX provides multiple ways to communicate with other users. There are commands to communicate interactively or by electronic mail (E-mail). The following is a brief overview of some of the more common commands used to communicate with fellow users.
WRITING TO A USER
The write command allows you to write to a user that is currently logged on to the system. The following steps show how to "talk" to a user with write.
1. First you must find out who is available for you to write. Type who and press Return. This will display who is currently on the system. Select a user to write to and continue on to the next step.
cj> who
bill tty05 Jan 11 08:41
nancy tty07 Jan 11 08:03
mylogin tty11 Jan 11 09:05
nasser tty18 Jan 11 07:49
smr tty23 Jan 11 09:11
tlp tty09 Jan 11 07:38

2. Type write bill and press Return. Now type a message you would like to send to bill. When you finish writing your message press Ctrl-D.
cj> write bill
Hi Bill,
This is Robert. I finally got my UNIX login and am trying to
annoy all other users so they will log off the system and
response time will improve. Have a great day and LOG OFF the
system now!.
^D

NOTE:
While you are typing your message you may see text intermixed with what you are typing. This is probably one line of a response message from the person you are writing.
RECEIVING MESSAGES FROM WRITE
If someone is sending you a message from write, you can perform the following steps to respond.
1. First you will receive a message and a beep when someone writes to you.
Message from bill tty5...

2. Respond by typing write bill and pressing Return. From this point forward you continue your communication as if you had initiated the conversation.
SENDING MAIL
You can send mail to a user by using the mail command.
The mail command reads in a message and sends it to a mailbox for the specific user. The following steps show how to send a simple letter to a user on your local system.
1. First you must know to whom to send the letter. To retrieve a list of all users on your local UNIX System type nawk -F: '{print $1" "$5}' /etc/passwd | sort | more and press Return.
2. Select a user name and type mail nancy and press Return. Now you may type the letter you wish to send to nancy. After you finish the letter, press Ctrl-D to send the letter to nancy. Replace nancy with the name of a user on your system.
RECEIVING MAIL
To receive mail, a user must first send mail to your user name. If no one likes you and you never receive mail you can always send mail to yourself. This is very common practice; it provides an on-line reminder service. The following steps show how to read any mail that may have been sent.
1. Type mail and press Return. Notice the message you requested your system administrator to send you is displayed. If there's no mail you probably have a very busy system administrator.
2. The mail utility has a help feature that provides some insight to using it more effectively. Type ? or help and press Return. Notice a screen of information on the mail utility is displayed.
NOTE:
There are two major versions of the mail utility. One is UNIX System V and the other is Berkeley based. The Berkeley version is supplied with System V as mailx, although it is possible that it has been moved to the mail name. This book discusses the Berkeley /usr/ucb/Mail version and the System V /bin/mailx version of mail and refers to it as mail/mailx.
LOGGING OUT OF THE SYSTEM
To log out of UNIX you must exit the shell. There are multiple ways of exiting the shell; the most common is pressing Ctrl-D. You may also type exit and press Return or, on some systems, you may type logout and press Return.

Posted by MALIK

Labels: code, free, linux, open source, operating system, unix

UNIX and LINUX part 5


TEXT EDITING AND DISPLAYING
UNIX provides multiple ways to enter text into files. The most common way is to use one of the editors. The editors are ed, ex, and vi. The ed editor is the most basic editor. It is a line editor. A line editor does not display the text on the screen while you are editing. You have to display the text, then perform editing functions on a line-by-line basis.
The ex editor is an enhanced version of the ed editor. It provides much better substitution and addressing capabilities. But it is still a line editor.
The vi editor is a visual editor built on top of the ex line editor. Thus vi has the power of visually displaying the text you are working on while also having a powerful line editor to perform substitutions and other necessary functions.
The following steps show you how to create a file using the vi screen editor. It is advisable to learn the ex and vi editors because of there power and popularity.
1. Before you begin using vi you must have your environment set properly. First type env and press Return. Notice that a list of variables is displayed on your screen. Look for the TERM= variable in the list. This variable must be set before vi will perform correctly.
C Shell
Type printenv and press Return.
2. To set TERM to a desired terminal type, type TERM=VT100 and press Return. Replace VT100 with the type of terminal you are using.
C Shell
Type set term=vt100 and press Return.
3. Begin editing a file by typing vi file1 and pressing Return. Notice the screen is cleared and tildes (~) are placed along the left side. The filename is placed on the bottom line along with status information. Your screen looks like the following display.
4. To enter text, type i; this puts vi in insert mode. Now type This is a new file created by vi. and press Esc. Notice you entered a line of text and now the cursor is at the end of the line.
5. To duplicate the line, type yy to yank it to a register and type p to put it back on the screen. Notice you now have 2 lines of text that are identical.
6. To move up 1 line type k, to move down 1 line type j, to move right 1 character type l, and to move left 1 character type h.
7. To jump to the beginning of the current line type 0. Notice the cursor moves to the beginning of the line.
8. To jump to the end of the current line type $. Notice the cursor moves to the end of the line. Remain in vi to continue the following steps.
The following steps show you how to interface with ex commands while in vi.
1. Type :ver and press Return to display what version of vi/ex you are using. On some systems you will need to press Return to redisplay the vi screen.
2. Write the file to disk by typing :w and pressing Return. On some systems you will need to press Return again to redisplay the vi screen.
3. To substitute a string throughout the file (global substitute) type :%s/a new/an old/g and press Return. Notice that both lines changed from having the string "a new" to having "an old." The percent sign (%) tells ex to search lines 1 through end-of-file (EOF). The "s" tells ex to perform a substitution. The "/a new/an old/" says to search for "a new" and change it to "an old." The g tells ex to change all occurrences on a line. The default is to change the first occurrence on each line. Press Return.
4. To escape to the shell type :sh and press Return. Notice a shell prompt appears on your terminal; you have been placed in a new subshell. You may execute any normal UNIX command. To return to vi/ex press Ctrl-D and then press Return.
5. To execute a UNIX command without leaving the editor type :!cat % and press Return. The % is expanded by vi into the current buffer name (file1). The command cat file1 is executed and control is returned to vi.
6. To save the file to disk and exit vi type ZZ (capital letters).

Posted by MALIK

Labels: code, free, linux, open source, operating system, unix

Linux part 4

xData BeOS 4.5 with the following advantages and disadvantage.


Platform: PowerPC, Intel
Architecture: 32 bits, Preemptives multitasking, Multithreading, Symmetrical Multiprocessing, network support integrated, optimized for the web.
RAM: 16 MB minimum
Capacity hard disk: at least 150 MB
File system itself: Journaling 64 bit, multithread.
Other file system: FAT 16, FAT 32
Kernel: MACH


Advantages:

1. Optimal for multimedia applications (video editing process or audio).


2. Multithread system is unique in optimizing the two or more processors.


3. Handling file system for 64 bit large.
4. Promising future in the near future because the operating system will get support from hardware manufacturers in Europe, BeOS planned will support the Intel Pentium III and can function as dual-boot able to read and write FAT file system of Windows and DOS.


Cons:


1. The absence of an application office / business leaders appropriate or good.


2. This operating system appears only on the operating system oriented multimedia course.


3. At least for desktop applications at this time.


4. For the current operating system BeOS is not an operating system that is open-source.


2.2.2. OS / 2 Warp: Server Business expensive. Operating system OS / 2 Warp developed by IBM. In version 4 (Merlin), there are important updates with the view that there is far more beautiful and very similar to the Windows'95 and the introduction of language integration. And now in version 5 (Aurora), IBM to make improvements to the general technique, which can be put in front of the Warp for Windows NT. The most important innovation in the
version 5 is "Journaling File System (JFS). More resembles the structure of the database system files. JFS blessing, every change can be canceled and integrity checks as requested by the NTFS system or the other is not necessary. And this is a big advantage for a server, which should always be available 100%, both in the Intranet and Internet. Software is available for private users is relatively small. For business applications already available version of Star Office is appropriate. In the field of application specific, for example, banks or insurance, where security is an important investment for
customers, OS / 2 for profitable investment because able to support the old version.

The main merit of the OS / 2 is a strong architecture. Preemptives multitasking kernel is very stable and can only disaingi by UNIX. Java integration in the system to make Warp server platform connecting this to be a "server for all." This may be the future trend, which connects all the Warp operating system with all platforms in the network ( "any to any").


2.2.2.1. Data OS / 2 Warp Server for E-Business with the following advantages and disadvantage.


Platforms: Intel
Architecture: 32 bits, Preemptives Multi-tasking, Multithreading, Symmetrical Multiprocessing, network support, optimal for the Web, Java, network management, and speech-recognition integrated.
Kernel: monolithic.
RAM: 32 MB minimum
Capacity hard disk: at least 350 MB
File system: the HPFS, Journaling File System (JFS), multithreaded.
Other file system: FAT, with the help of shareware: FAT 32, VFAT, NTFS, ext2fs, HFS.


Advantages:


1. Stable system for corporate networks, servers and communications transactions, which connects multiple platforms.


2. Multithread system that resembles BeOS.


3. The view that much more beautiful than the Windows'95 and the integration of the introduction
language.
4. The server operating system available 100%, both in the Intranet and Internet, owing to help JFS.


5. Profitable for investment because it can support the older version.


Cons:


1. Not many software for personal users, other than Office.


2. Prices are expensive to make the user a weak financial structure reluctant to buy them.

3. Questions stability is not yet compete UNIX.


4. Special use for business, not for personal or among PC users.

Posted by MALIK 2 comments

Labels: code, free, linux, open source, source

Linux part 3

BeOS Operating System: Multimedia Operating System.


Since the first version in 1997, one of the main goals BeOS, is managing the large amount of data that is optimal. This operating system can meet the demands of multimedia applications with the support of multi-processor, 64 bit file system, and multithreading.
BeOs can use and exploit all available processors, either one or 16 processors. Users do not need to upgrade computer with only enough to replace the motherboard or install new porcessor. In the first BeOS developed to BeBox, a computer with 2 PowerPC processor and main memory with a maximum of 256 MB. Although the BeOS including the very first complete BeOs but can not rival operating systems such as Intel and Macintosh. So since version 3, BeOS is available for Macintosh and Power-PC based Intel

Multithreading burden several processors at once.


With multithreading architecture, BeOS optimally utilize the processor. From the file system to display, the operating system for the divided-in threads. Threads are jobs or tasks that can be done separately and not depend on one another. When there are several processors on a PC, then split BeOS threads dynamically to each processor. Example: In the file system, a processor that change some of the files, while the other processor mencopy file

64 bit file system for large files.


Operating systems such as Windows 95/98 work with 32 bit file system that limits the maximum of 4 GB file. The size is adequate to process the audio, where audio 1 hour average confiscate 600 MB of space on an audio CD. With 64 bit file system, a file on the BeOS can reach sizes up to 18 million terabyte or 18 billion GB. In addition, file system also records all done. This means that, after the electricity connection is lost, all he can to restore the data back. When the server operating system requires long hours for it, the BeOS only need a few minutes, because it only re-start downloading a transaction that has not been completed and closing. Action has been completed removed from the protocol. BeOS on the object-oriented (object oriented). For software developers, this means he can return to the object system. Examples are Bapplication, Bwindows
or Bview. A simple program such as Hello World consists of only a few lines of code, where the descendants of these objects can be "inherited" and modified.


Posted by MALIK 0 comments

Labels: free, linux, online, open source, protocol, source

C ++ part 4

press : cout << "Press any key + enter to continue .. "; cin >> any; goto menu;

break;

case '2' :
// Clear Screen
system("clear");

// Greeting
cout << "+-----------------------------------+" <<>

// Input Kode CD
kembali :
cout << "Masukkan kode CD : "; cin >> inp;

// Validasi Input - Check Apa CD Tersedia
x = 0; st = 0;
do
{
for (y=0; y<4; st =" 0;" st="="4)" z =" 0;" stat="1;" x="1;" x="="10)" stat="0;" x="0;" b="0;">> any; goto menu;

break;

case '3' :
// Clear Screen
system("clear");

// Greeting
cout << "+-----------------------------------+" <<>

// Tampilkan data peminjaman
for (int m=0; m<10; n="0;" n="4;" n="0;">

// Press any key to continue
cout << "Press any key + enter to continue .. "; cin >> any; goto menu;
break;

case '0' :
// Clear Screen
system("clear");

// Greeting
cout << "+-----------------------------------+" <<>

default : goto menu;
}

}

Posted by MALIK 0 comments

Labels: c ++, code, free, open source, programming

Older Posts Home

Links

  • ALJAZEERA TV
  • ANTARA
  • Bali`s Blogger
  • BBC
  • BERITANET.COM
  • CHIP ONLINE
  • CNN
  • DETIK.COM
  • E-BOOK
  • Economic
  • Friends
  • Friendster's Blog
  • Habibieafsyah
  • HARVARD UNIVERSITY
  • ILMU KOMPUTER
  • INFO LINUX
  • KICK ANDY
  • LINUX OpenSuse
  • LINUX SLAX
  • Linux Temanggung
  • LINUX UBUNTU
  • LIPUTAN 6 SCTV
  • MASTER BLOGGER
  • METROTV NEWS
  • MUSIC DOWNLOAD
  • My Class
  • Robotic AMIKOM
  • SMA N 3 TEMANGGUNG
  • SMART E-LEARNING
  • SOFTPEDIA
  • STMIK AMIKOM
  • SUPPORTED BLOGGER
  • TIPS TRICKS
  • TRIAL FILM
  • TV ONE ONLINE

Blog Archive

  • ▼ 2009 (38)
    • ▼ 05/31 - 06/07 (1)
      • Java
    • ► 02/15 - 02/22 (1)
    • ► 01/11 - 01/18 (11)
    • ► 01/04 - 01/11 (25)
  • ► 2008 (70)
    • ► 11/30 - 12/07 (22)
    • ► 11/16 - 11/23 (18)
    • ► 11/09 - 11/16 (1)
    • ► 10/26 - 11/02 (5)
    • ► 10/19 - 10/26 (16)
    • ► 10/12 - 10/19 (4)
    • ► 10/05 - 10/12 (4)



$100.00 Anda pasti untung setelah registrasi!






Search Engine Optimization and SEO Tools







Bookmark CO.CC:Free Domain