Search this site

Thursday, October 13, 2011

rubik solver

now I have a task to make a rubik solver
that use backtracking algorithm

in wikipedia:
Backtracking is a general algorithm for finding all (or some) solutions to some computational problem, that incrementally builds candidates to the solutions, and abandons each partial candidate c ("backtracks") as soon as it determines that c cannot possibly be completed to a valid solution.[1][2][3]

The classic textbook example of the use of backtracking is the eight queens puzzle, that asks for all arrangements of eight queens on a standard chessboard so that no queen attacks any other. In the common backtracking approach, the partial candidates are arrangements of k queens in the first k rows of the board, all in different rows and columns. Any partial solution that contains two mutually attacking queens can be abandoned, since it cannot possibly be completed to a valid solution.

Backtracking can be applied only for problems which admit the concept of a "partial candidate solution" and a relatively quick test of whether it can possibly be completed to a valid solution. It is useless, for example, for locating a given value in an unordered table. When it is applicable, however, backtracking is often much faster than brute force enumeration of all complete candidates, since it can eliminate a large number of candidates with a single test.

Backtracking is an important tool for solving constraint satisfaction problems, such as crosswords, verbal arithmetic, Sudoku, and many other puzzles. It is often the most convenient (if not the most efficient[citation needed]) technique for parsing, for the knapsack problem and other combinatorial optimization problems. It is also the basis of the so-called logic programming languages such as Icon, Planner and Prolog. Backtracking is also utilized in the (diff) difference engine for the MediaWiki software.

Backtracking depends on user-given "black box procedures" that define the problem to be solved, the nature of the partial candidates, and how they are extended into complete candidates. It is therefore a metaheuristic rather than a specific algorithm --- although, unlike many other meta-heuristics, it is guaranteed to find all solutions to a finite problem in a bounded amount of time.

The term "backtrack" was coined by American mathematician D. H. Lehmer in the 1950s.[4] The pioneer string-processing language SNOBOL (1962) may have been the first to provide a built-in general backtracking facility.

Saturday, September 10, 2011

Steven Alter Framework

Actually I have some homework to make Steven Alter Framework for some case



The definitions of the 9 elements of a work system are as follows:

Processes and activities include everything that happens within the work system. The term processes and activities is used instead of the term business process because many work systems do not contain highly structured business processes involving a prescribed sequence of steps, each of which is triggered in a pre-defined manner. Such processes are sometimes described as “artful processes” whose sequence and content “depend on the skills, experience, and judgment of the primary actors.” (Hill et al, 2006) In effect, business process is but one of a number of different perspectives for analyzing the activities within a work system. Other perspectives with their own valuable concepts and terminology include decision-making, communication, coordination, control, and information processing.

Participants are people who perform the work. Some may use computers and IT extensively, whereas others may use little or no technology. When analyzing a work system the more encompassing role of work system participant is more important than the more limited role of technology user (whether or not particular participants happen to be technology users)

Information includes codified and non-codified information used and created as participants perform their work. Information may or may not be computerized. Data not related to the work system is not directly relevant, making the distinction between data and information secondary when describing or analyzing a work system. Knowledge can be viewed as a special case of information.

Technologies include tools (such as cell phones, projectors, spreadsheet software, and automobiles) and techniques (such as management by objectives, optimization, and remote tracking) that work system participants use while doing their work.

Products and services are the combination of physical things, information, and services that the work system produces. This may include physical products, information products, services, intangibles such as enjoyment and peace of mind, and social products such as arrangements, agreements, and organizations.

Customers are people who receive direct benefit from products and services the work system produces. They include external customers who receive the organization's products and/or services and internal customers who are employees or contractors working inside the organization.

Environment includes the organizational, cultural, competitive, technical, and regulatory environment within which the work system operates. These factors affect system performance even though the system does not rely on them directly in order to operate. The organization’s general norms of behavior are part of its culture, whereas more specific behavioral norms and expectations about specific activities within the work system are considered part of its processes and activities.

Infrastructure includes human, informational, and technical resources that the work system relies on even though these resources exist and are managed outside of it and are shared with other work systems. For example, technical infrastructure includes computer networks, programming languages, and other technologies shared by other work systems and often hidden or invisible to work system participants.

Strategies include the strategies of the work system and of the department(s) and enterprise(s) within which the work system exists. Strategies at the department and enterprise level may help in explaining why the work system operates as it does and whether it is operating properly.

How to using wxWidgets in code::blocks

Because it is too long if it become one with "How to install wxWidgets in code::blocks" so I seperate them in two posting

Create a wxWidgets project in Code::Blocks

On the Code::Blocks Start Page, select "Create a new project"; alternatively, open the File menu, highlight "New" and select "Project..."
Select "wxWidgets project"
1.The first page is an introduction, which you can choose to skip in the future.
2.Select which version of wxWidgets you will be using. If you followed the instructions above, you should select "wxWidgets 2.8.x".
3.Set your project title and location.
4.Enter author details if you wish (not required).
5.Select options for automatic code and file generation.
6.Select wxWidgets' location. It's highly recommended that you use a global variable for this: enter "$(#wx)" (without quotes). If you haven't already defined this global variable, the global variables dialog will appear; for the base path, select your wxWidgets installation location. You don't need to fill in the other paths.
7.Select debug and/or release configurations for your project. The debug configuration at least is recommended.
8.Choose your wxWidgets build options. These must match the options used when you built wxWidgets! If you followed the directions above, select all three of the options under "wxWidgets Library Settings". If you are using wxPack: wxPack includes each version, so you may select whichever options you prefer. The other settings on this page are not related to the wxWidgets build options; you may use them or not as you prefer. In order to avoid using a debug wxWidgets build (as recommended), you must select "Configure Advanced options" and then leave "Use __WXDEBUG__ and Debug wxWidgets lib" unchecked on the next page.
9.Select additional libraries if required. You should not need to select any of these for normal usage.



Build and Run


Select "Build and run" (F9) to, well, build and run. If all goes well, your wxWidgets basic program should appear.

wxWidgets Build Options Explained

What do the BUILD, SHARED, MONOLITHIC, and UNICODE options mean?

BUILD
BUILD controls whether a debug version (BUILD=debug) or release version (BUILD=release) of wxWidgets itself is built. In the vast majority of cases you will only need a release version of wxWidgets, since you won't be interesting in debugging wxWidgets itself. You can still create debug builds of your own programs that link to a release build of wxWidgets.
-> A debug build of wxWidgets creates libraries with a "d" suffix -- for example, "libwxmsw28d.a"/"wxmsw28d_gcc_custom.dll".
-> A debug build of wxWidgets creates the folder "mswd" or "mswud" in the wxWidgets library output folder.
-> A release build of wxWidgets creates libraries without the "d" suffix -- for example, "libwxmsw28.a"/"wxmsw28_gcc_custom.dll".
-> A release build of wxWidgets creates the folder "msw" or "mswu" in the wxWidgets library output folder.

SHARED
SHARED controls whether a DLL (SHARED=1) or static (SHARED=0) version of wxWidgets is built. With a DLL build, compile times are faster and the executable size is smaller. The total size of a single executable plus the wxWidgets DLL is greater, but multiple executables can use the same DLL.
-> A DLL build of wxWidgets creates import libraries (such as libwxmsw28.a) and DLLs (such as wxmsw28_gcc_custom.dll). You must include the DLL when you distribute your program.
-> A static build of wxWidgets creates static libraries only (such as libwxmsw28.a), and you do not need to distribute a wxWidgets DLL.

MONOLITHIC
MONOLITHIC controls whether a single library (MONOLITHIC=1) or multiple component libraries (MONOLITHIC=0) are built. With a monolithic build, project setup and development are much easier, and you only have one DLL to distribute if you're using a DLL build. With a non-monolithic (multilib) build, several different libraries are built and you can avoid linking with the entire wxWidgets codebase for programs that don't need it. You do have to ensure that you choose the correct component libraries.
-> A monolithic build of wxWidgets creates a single wxWidgets import library (such as libwxmsw28.a) and a single DLL (such as wxmsw28_gcc_custom.dll).
-> A multilib build of wxWidgets creates multiple import libraries (libwx28_base.a, etc.) and multiple DLLs.
-> Additional static libraries are always created with any wxWidgets build (libwxexpat.a, libwxjpeg.a, etc.). These libraries do not normally need to be used with DLL builds of wxWidgets, but they are required when using static builds.

UNICODE
UNICODE controls whether wxWidgets and your program use wide-character strings with Unicode support. Most programs for Windows 2000 and later should do so. Earlier versions of Windows don't have the necessary Unicode support. You should always use wxWidget's _("string") and _T("string") macros to ensure that your hardcoded strings are the correct type.
-> A Unicode (UNICODE=1) build of wxWidgets creates libraries with a "u" suffix -- for example, "libwxmsw28u.a"/"wxmsw28u_gcc_custom.dll".
-> A Unicode build of wxWidgets creates the folder "mswu" or "mswud" in the wxWidgets library output folder.
-> An ANSI (UNICODE=0) build of wxWidgets creates libraries without the "u" suffix -- for example, "libwxmsw28.a"/"wxmsw28_gcc_custom.dll".
-> An ANSI build of wxWidgets creates the folder "msw" or "mswd" in the wxWidgets library output folder.


source : http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

Friday, September 9, 2011

How to install wxWidgets in code::blocks

First what is wxWidget?
wxWidgets is a C++ framework providing GUI (Graphical User Interface) and other facilities on more than one platform. Version 2 currently supports all desktop versions of MS Windows, Unix with GTK+, Unix with Motif, and MacOS. An OS/2 port is in progress.

Then how?

Download wxWidgets
You can choose to download the wxWidgets source code and compile it yourself, or download the "wxPack", a precompiled version.
The wxWidgets sources are a much smaller download, but you must also spend some time compiling them.
wxPack is a much larger download, but you don't have to spend time compiling it or worry about build options.
wxWidgets Sources
The current recommended version of wxWidgets to use is 2.8.10. Click here to download the wxWidgets 2.8.10 sources for Windows (wxMSW-2.8.10-Setup.exe; 12.2 MB). You can check the wxWidgets download page to see if a newer stable version is available. It is highly recommended that you install the sources to a path without spaces. You should choose a volume with at least 300 MB of free space.

wxPack
wxPack makes the next step of building wxWidgets unnecessary. The current stable release of wxPack is v2.8.8.04, based on wxWidgets 2.8.8. Click here to download wxPack v2.8.8.04 (wxPack_v2.8.8.04.exe, 315.9 MB). You can check the wxPack download page to see if a newer stable version is available. It is highly recommended that you install wxPack in a path without spaces. You should choose a volume with at least 700 MB of free space for MSVC, or 2.2 GB of free space for MinGW/GCC.
Build wxWidgets

This step is unnecessary if you are using wxPack
Open up a command prompt for building. If you are using MinGW/GCC, simply use the standard Windows command shell (open the Start menu, click "Run...", enter "cmd" and hit OK). If you are using MSVC, you should use the special command shell which sets up the correct environment variables for you. If you use a version of MSVC which required you to download the Platform SDK separately, ensure that whichever command environment you use includes the Platform SDK tools and paths as well as the standard compiler tools and paths.

Change to the wxWidgets build directory (where is the path you extracted the sources to; typically C:\wxWidgets-2.8.9):
cd \build\msw

Execute the build command. The recommended command to use for MinGW/GCC is:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
The recommended command to use for MSVC is:

nmake -f makefile.vc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1

This step will generally take a long time; faster PCs may expect 30-minute build times, and slower PCs can take as much as several hours.

If using more recent versions of GCC, many warnings will occur during the build. This can slow the build process noticeably; you may want to redirect the warnings to a text file by appending "2>errlog.txt" to the build command, or supress them entirely by appending "2>nul".

See the section below titled "wxWidgets build options explained" for details on the meaning of the BUILD, SHARED, MONOLITHIC, and UNICODE options. These options are critically important, because they define the basic wxWidgets development environment you will be using. You must duplicate them exactly when running Code::Blocks' wxWidgets project wizard.

s
source : http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

Tuesday, August 30, 2011

Tuesday, 30 Aug 2011

Now I am alone in my boarding house
my friend have to go to Semarang to visit his family
and just like usual I am in my room
and doing some activity like playing or watching
ahh and downloading of course
LoL

Wednesday, August 24, 2011

Holiday

And now is holiday
but I can't go home
and also have a lot of work to do

Thursday, August 11, 2011

Atlas



tomorrow is Atlas
a large event for 1st years ITB's students
and also a tough days for me

just do it

Wednesday, August 10, 2011

Sudoku Solver



I just finish my sudoku solver program
it is one of my homework this weekend
but with it now I can solve some sudoku that I can't solve
(althought it will need a long time)

And I like this problem
^_^

Tuesday, August 9, 2011

Chess 4 player



I think it is more interesting than normal chess
it usually played 2 on 2

but can you imagine if it was
1 vs 1 vs 1 vs 1

First Class in This Term

Yesterday was my first class
and with only four classes that I attended, I have got 3 homework
1 make a program that can solve a sudoku and the other only make an essai

plus my unfinished job
that I have to make video and module

and also there a work from my lab

it just begin

Image Quality Upload Google+ vs Facebook

One of my senior say that Image Quality Upload in Google+ is BETTER than Facebook

Actually I don't do this personaly because I often upload image
and I still use it only to comment my friend status

Friday, July 22, 2011

Panda and Rabbit

one day a rabbit and a panda are taking joyous walk in the woods
suddenly, panda's stomach feels strange.. like he needs to go
so panda asks rabbit to find the restroom with him
"oh yeah! rabbit, there's something i need to ask you"
"when you are using the toilet, are you afraid of getting poop on your fur?"
rabbit answered
"um, i've never been bothered by this problem, i'm not scared at all"
so they begin to search for a restroom in the woods,
they walk..
they walk..
suddenly panda asks worriedly again
"rabbit! i must ask you again. are you afraid of getting poop on your fur?"
rabbit answered
"panda! i'm telling the truth!"
"i'm not scared at all!"
panda and rabbit resume their search in the forest
they finally arrive in front of the door to the restroom
panda asked again
"rabbit! i must ask you again with all seriousness!"
"are you really not afraid of getting poop on your fur?"
rabbit answered with confidence
"panda! i told you twice already!"
"i'm not scared at all"
so.. after panda finished in the restroom
he uses rabbit to wipe his bottom

Flash D_FREAK

video D_FREAK
just another work from template
^_^

Sunday, May 22, 2011

FSL TEAM


edited by : Ve
^_^


Friday, May 6, 2011

Heppy B'day

Afrikaans Veels geluk met jou verjaarsdag!
Albanian Urime ditelindjen!
Alsatian Gueter geburtsdaa!
Amharic Melkam lidet!
Arabic Eid milaad saeed! or Kul sana wa inta/i tayeb/a! (masculine/feminine)
Armenian Taredartzet shnorhavor! or Tsenund shnorhavor!
Assyrian Eida D'moladukh Hawee Brikha!
Austrian-Viennese Ois guade winsch i dia zum Gbuadsdog!
Aymara (Bolivia) Suma Urupnaya Cchuru Uromankja!
Azerbaijani Ad gununuz mubarek! -- for people older than you
Ad gunun mubarek! -- for people younger than you
Basque Zorionak!
Belauan-Micronesian Ungil el cherellem!
Bengali (Bangladesh/India) Shuvo Jonmodin!
Bicol (Philippines) Maogmang Pagkamundag!
Bislama (Vanuatu) Hapi betde! or Yumi selebretem de blong bon blong yu!
Brazil ParabÃ…½ns a voc!
ParabÃ…½ns a voc,
nesta data querida muitas felicidades e muitos anos de vida.
Breton Deiz-ha-bloaz laouen deoc'h!
Bulgarian Chestit Rojden Den!
Cambodian Som owie nek mein aryouk yrinyu!
Catalan Per molts anys! or Bon aniversari! or Moltes Felicitats!
Chamorro Biba Kumplianos!
Chinese-Cantonese Sun Yat Fai Lok!
Chinese Fuzhou San Ni Kuai Lo!
Chiness-Hakka Sang Ngit Fai Lok!
Chinese-Mandarin qu ni sheng er kuai le
Chinese-Shanghaiese San ruit kua lok!
Chinese-Tiociu Se Jit khuai lak!
Chronia Polla NA ZHSHS
Croatian Sretan Rodendan!
Czech Vsechno nejlepsi k Tvym narozeninam!!
Danish Tillykke med fodselsdagen!
Dutch-Antwerps Ne gelukkege verjoardach!
Dutch-Bilzers Ne geleukkege verjoardoag!
Dutch-Drents Fellisiteert!
Dutch-Flemish Gelukkige verjaardag! or Prettige verjaardag!
Dutch-Frisian Fan herte lokwinske!
Dutch-Limburgs Proficiat! or Perfisia!
Dutch-Spouwers Ne geleukkege verjeurdoag!
Dutch-Twents Gefeliciteard met oen'n verjoardag!
Dutch Hartelijk gefeliciteerd! or Van harte gefeliciteerd met je verjaardag!
English Happy Birthday!
Esperanto Felichan Naskightagon!
Estonian Palju onne sunnipaevaks!
Euskera Zorionak zure urtebetetze egunean!
Faroes ( Faroe island ) Tillukku vid fodingardegnum!
Farsi Tavalodet Mobarak!
Finnish Hyvaa syntymapaivaa!
French (Canada) Bonne Fete!
French Joyeux Anniversaire!
Frisian Lokkiche jierdei!
Gaelic (Irish) L‡ breithe mhaith agat!
Gaelic (Scottish) Co` latha breith sona dhuibh!
Galician (Spain) Ledicia no teu cumpreanos!
Georgian Gilotcav dabadebis dges!
German-Badisch Allis Guedi zu dim Fescht!
German-Bavarian Ois Guade zu Deim Geburdstog!
German-Berlinisch Allet Jute ooch zum Jeburtstach! or Ick wuensch da allet Jute zum Jeburtstach!
German-Bernese Es Muentschi zum Geburri!
German-Camelottisch Ewllews Gewtew zewm Gewbewrtstewg. Mew!
German-Frankonian Allmecht! Iich wuensch Dir aan guuadn Gebuardsdooch!
German-Lichtenstein Haerzliche Glueckwuensche zum Geburtstag!
German-Moselfraenkisch Haezzlische Glickwunsch zem Gebordsdach!
German-Plattdeutsch Ick wuensch Di allns Gode ton Geburtsdach!
German-Rhoihessisch Ich gratelier Dir aach zum Geburtstag!
German-Ruhr Allet Gute zum Gebuatstach!
German-Saarlaendisch Alles Gudde for dei Gebordsdaach!
German-Saechsisch Herzlischen Gliggwunsch zum Geburdsdaach!
German-Schwaebisch Aelles Guade zom Gebordzdag!
German-Wienerisch Ois Guade zum Geburdsdog!
German Alles Gute zum Geburtstag!
Greek Eytyxismena Genethlia! or Chronia Pola!
Greenlandic Inuuinni pilluarit!
Gronings (Netherlands) Fielsteerd mit joen verjoardag!
Gujarati (India) Janma Divas Mubarak!
Gujrati (Pakistan) Saal Mubarak!
Guarani (Paraguay Indian)] Vy-Apave Nde Arambotyre!
Hawaiian Hau`oli la hanau!
Hebrew Yom Huledet Same'ach!
Hiligaynon (Philippines) Masadya gid nga adlaw sa imo pagkatawo!
Hindi (India) Janam Din ki badhai! or Janam Din ki shubkamnaayein!
Hungarian Boldog szuletesnapot! or Isten eltessen!
Icelandic Til hamingju med afmaelisdaginn!
Indonesian Selamat Ulang Tahun!
Irish-gaelic La-breithe mhaith agat! or Co` latha breith sona dhut! Or Breithla Shona Dhuit!
Italian Buon Compleanno!
Italian (Piedmont) Bun Cumpleani!
Italian (Romagna) At faz tent avguri ad bon cumplean!
Japanese Otanjou-bi Omedetou Gozaimasu!
Javaans-Indonesia Slamet Ulang Taunmoe!
Jerriais Bouon Anniversaithe!
Kannada (India) Huttida Habba Subashayagalu!
Kapangpangan (Philippines) Mayap a Kebaitan
Kashmiri (India) Voharvod Mubarak Chuy!
Kazakh (Kazakstan) Tughan kuninmen!
Klingon Quchjaj qoSlIj!
Korean Saeng il chuk ha ham ni da!
Kurdish Rojbun a te piroz be!
Kyrgyz Tulgan kunum menen!
Latin Fortuna dies natalis!
Latvian Daudz laimes dzimsanas diena!
Lithuanian Sveikinu su gimtadieniu! or Geriausi linkejimaigimtadienio progal
Luganda Nkwagaliza amazalibwa go amalungi!
Luxembourgeois Vill Gleck fir daei Geburtsdaag!
Macedonian Sreken roden den!
Malayalam (India) Pirannal Aasamsakal! or Janmadinasamsakal!
Malaysian Selamat Hari Jadi!
Maltese Nifrahlek ghal gheluq sninek!
Maori Kia huritau ki a koe!
Marathi (India) Wadhdiwasachya Shubhechha!
Mauritian Kreol mo swet u en bonlaniverser!
Mbula (Umboi Island, Papua New Guinea) Leleng ambai pa mbeng ku taipet i!
Mongolian Torson odriin mend hurgee!
Navajo bil hoozho bi'dizhchi-neeji' 'aneilkaah!
Niederdeutsch (North Germany) Ick gratuleer di scheun!
Nepali Janma dhin ko Subha kamana!
Norwegian Gratulerer med dagen!
Oriya (India) Janmadina Abhinandan!
Papiamento (lower Dutch Antilles) Masha Pabien I hopi aña mas!
Pashto (Afganistan) Padayish rawaz day unbaraksha!
Persian Tavalodet Mobarak!
Pinoy (Philippines) Maligayang kaarawan sa iyo!
Polish Wszystkiego Najlepszego! or Wszystkiego najlepszego zokazji urodzin!
wszystkiego najlepszego z okazji urodzin
Portuguese (Brazil) Parabens pelo seu aniversario! or Parabenspara voce! or Parabens e muitas felicidades!
Portuguese Feliz Aniversario! or Parabens!
Punjabi (India) Janam din diyan wadhayian!
Rajasthani (India) Janam ghaanth ri badhai, khoob jeeyo!
Romanian La Multi Ani!
Rosarino Basico (Argentina) Feneligiz Cunumplegeanagonos!
Russian S dniom razhdjenia! or Pazdravliayu s dniom razhdjenia!
Sami/Lappish Lihkos Riegadanbeaivvis!
Samoan Manuia lou aso fanau!
Sanskrit (India) Ravihi janmadinam aacharati!
Sardinian (Italy) Achent'annos! Achent'annos!
Schwyzerduetsch (Swiss German) Vill Glück zum Geburri!
Serbian Srecan Rodjendan!
Slovak Vsetko najlepsie k narodeninam!
Slovene Vse najboljse za rojstni dan!
Sotho Masego motsatsing la psalo!
Spanish Feliz Cumplea–os!
Sri Lankan Suba Upan dinayak vewa!
Sundanese Wilujeng Tepang Taun!
Surinamese Mi fresteri ju!
Swahili Hongera! or Heri ya Siku kuu!
Swedish Grattis pÃ…’ fÃ…¡delsedagen
Syriac Tahnyotho or brigo!
Tagalog (Philippines) Maligayang Bati Sa Iyong Kaarawan!
Taiwanese San leaz quiet lo!
Tamil (India) Piranda naal vaazhthukkal!
Telugu (India) Janmadina subha kankshalu!
Telugu Puttina Roju Shubakanksalu!
Thai Suk San Wan Keut!
Tibetan Droonkher Tashi Delek!
Tulu(Karnataka - India) Putudina dina saukhya!
Turkish Dogum gunun kutlu olsun!
Ukrainian Mnohiya lita! or Z dnem narodjennia!
Urdu (India) Janam Din Mubarak
Urdu (Pakistan) Saalgirah Mubarak!
Vietnamese Chuc Mung Sinh Nhat!
Visayan (Philippines) Malipayong adlaw nga natawhan!
Welsh Penblwydd Hapus i Chi!
Xhosa (South Afican) Imini emandi kuwe!
Yiddish A Freilekhn Gebortstog!
Yoruba (Nigeria) Eku Ojobi!
Zulu (South Afican) Ilanga elimndandi kuwe!

Wednesday, May 4, 2011

Dua Mind set

Sebelum sang ayah menghembuskan nafas terakhir, dia memberi pesan kepada ke 2 anaknya:

Anakku ada 2 pesan penting yg ingin ayah sampaikan kpdmu untuk keberhasilan hidupmu

Pertama : jangan pernah menagih piutang kepada siapapun

Kedua : jangan pernah thubuhmu terkena terik sinar matahari secara langsung."

HSang anak pun bingung dgn pesan ayahnya , dan akhirnya sang Ayah pun pergi utk selama2 nya

5 tahun berlalu sang ibu pun menengok sih bungsu dgn kondisi bisnisnya yg sangat memprihatinkan, sang ibu pun bertanya wahai si bungsu knp kondisi bisnismu demikian

Si bungsu menjawab aku mengikuti pesan ayah bu.. Sy di larang menagih piutang ke siapa pun sehingga banyak piutang yg tdk di byr dan lama2 habislah modal sy, yg ke 2 ayah melarang sy terkena sinar matahari secara lsg, dan sy hanya punya spd mtr, itulah sebabnya pergi dan pulang ktr sy selalu naik taxi...

Kemudian sang ibu pergi ke tmpt si sulung kali ini keadaan berbeda jauh si sulung sukses menjalankan bisnisnya.

Sang ibu pun bertanya wahai si sulung knp hidupmu sedemikian beruntung??

Sulung pun menjawab : ini krn aku mengikuti pesan ayah bu.. Yg 1 sy dilarang menagih piutang kpd siapapun. Oleh karena itu sy tdk pernah memberikan utang kepada siapapun sehingga modal sy tetep utuh..

Ke 2 sy dilarang terkena sinar matahari secara lsg, maka dengan mtr yg sy punya sy selalu berangkat sblm matahari terbit dan plg larut malam setelah matahari terbenam.. Sehingga para pelanggan tau toko sy buka paling pagi dan tutup paling larut

Note : Si Sulung dan Si Bungsu menerima pesan yg SAMA, namun masing2 memiliki sudut pandang/MINDSET berbeda shg MELAKUKAN cara yg berbeda sehingga mendapatkan HASIL yg berbeda....

Tuesday, May 3, 2011

Heppy B'day D_FREAK

Yesterday is D_FREAK 2nd b'day

viva D_FREAK

Monday, May 2, 2011

3N+1

Goal:
//genap dibagi 2
//ganjil dikali 3 ditambah 1
//digit maksimal 100 digit
//digitnya klo yg ini masih maksimum 255



Main.java:

package mat;

package math;

/**
*
* @author d_frEak
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
TigaNPlusSatu h=new TigaNPlusSatu();
h.setVisible(true);
}

}



TigaNPlusSatu.java:


package math;

import java.awt.Cursor;
import java.awt.TextArea;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.plaf.multi.MultiLabelUI;

/**
*
* @author d_frEak
*/



//genap dibagi 2
//ganjil dikali 3 ditambah 1
//digit maksimal 100 digit
public class TigaNPlusSatu extends JFrame{

public JPanel panel = new JPanel();
public JLabel tombol = new JLabel();
public TextArea jawab = new TextArea();
public JTextField text = new JTextField();

private String isi;
private int panjang=0;
private int angka[]=new int[255]; //untuk mencegah penyimpanan 1 di depan

private String sangka="";

private int a=0;

TigaNPlusSatu()
{
add(panel);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(800, 600);
setLocationRelativeTo(null);
setTitle("FUNGSI 3N+1");
setResizable(false);
setVisible(true);

//panel
panel.setLayout(null);
panel.add(tombol);
panel.add(jawab);
panel.add(text);

tombol.setBounds(100, 100, 100, 100);
jawab.setBounds(100, 300, 500, 200);
// jawab.setUI(new MultiLabelUI());
text.setBounds(100, 200, 500, 100);


//tombol
tombol.setText("Proses");
tombol.addMouseListener(new MouseListener() {

public void mouseClicked(MouseEvent e) {
proses();
}

public void mousePressed(MouseEvent e) {
}

public void mouseReleased(MouseEvent e) {
}

public void mouseEntered(MouseEvent e) {
setCursor(new Cursor(12));
}

public void mouseExited(MouseEvent e) {
setCursor(new Cursor(0));
}
});

//jawab
jawab.setText(null);

//text
text.setText(null);

}

private void proses()
{
StringToAngka();
while(panjang!=1 || angka[0]!=1) //diulang sampai 1
{
if(IsGenap()==1) //genap
{
BagiDua();
}
else //ganjil
{
TigaNPlusSatu();
}

Print();
}

sangka="";
}

private void StringToAngka()
{
isi=text.getText();
panjang=1;
if(isi==null)
{
angka[0]=0;
}
else
{
panjang=isi.length();
for(int i=0;i < panjang;i++)
{
angka[i]=Integer.parseInt(isi.substring(i, i+1));
}
}
}

private int IsGenap()
{
if(angka[panjang-1] % 2==0)
{
return(1);
}
else
{
return(0);
}
}

private int Genap(int i)
{
if(i % 2==0)
{
return(1);
}
else
{
return(0);
}
}

private void BagiDua()
{
int simpan=0;
int minusdigit=0;
if(angka[0]==1)
{
minusdigit=1;
}

for(int i=0; i < panjang; i++)
{
angka[i]=angka[i]+simpan;
if(Genap(angka[i])==1) //genap
{
simpan=0;
}
else //ganjil
{
simpan=10;
}
angka[i]=angka[i]/2;
}

if(minusdigit==1)
{
for(int i=0;i < panjang-1;i++)
{
angka[i]=angka[i+1];
}
}

panjang=panjang-minusdigit;
}

private void TigaNPlusSatu()
{
int simpan=1;
for(int i=panjang-1;i >= 0;i--)
{
angka[i]=angka[i]*3+simpan;
simpan=angka[i] / 10;
angka[i]=angka[i]%10;
}

//nambah 1 digit
if(simpan!=0)
{
for(int i=panjang-1;i >= 0;i--)
{
angka[i+1]=angka[i];
}
angka[0]=simpan;
panjang++;
}
}

private void Print()
{
for(int i=0; i < panjang; i++)
{
sangka=sangka+angka[i]+"";
}
sangka=sangka+"\n";
jawab.setText(sangka);
}
}

Saturday, April 23, 2011

Deadline oh deadline

when you were born
I depressed


when you were far away from me
I am glad I still can forget about you


when you were in the middle of your process
I still don't care about you



but now you are very near to me
and because of that I must be with you for some days

D E A D L I N E
E A D L I N E
A D L I N E
D L I N E
L I N E
I N E
N E
E

Saturday, April 9, 2011

D_FREAK

hmm.
this time I want to share
why I chose d_frEak to become my nick name

when I was in junior high school
I had a class which there are only 7 boys from 36 students in that class

what?? Like in heaven with 29 fairies...

No..no..no..
It like a war (7 vs 29)

Then 6 from 7 who didn't have a girlfriend in that time usually play card together
when breaktime, after school, or in class (don't tell anyone)

And if we arrange the first character from our name
then become
D_FREAK
that name was created in 2 May 2009

These are them
D: Danny Darmawan
F: Fendy Heryanto Koesnoto
R: Reynald Alexander G.
E: Eric Christopher (me)
A: Andreas Dwi Maryanto Gunawan
K: Kaleb Oktavianus

now you know why for me only 'E' which is capital

Thursday, April 7, 2011

graduation celebration

I just attend graduation celebration
it is very fun and wonderful I think
the song, film, ect

and there is the massage from one of graduate
2nd year = more play
3rd year = more tubes
4th year = more TA

so that's mean I who still 2nd year need to play more
wk3..

Wednesday, April 6, 2011

IRK or Basdat

until now I still confused between join IRK lab or Basdat lab

why IRK?
- K for komputasi, and I like that very much. Because it seem more similar to math than another lab

why basdat?
- when I was junior high school I like to "play" with database in MS Access and MySql. And now I take basdat lesson and study MySql which make me remember the past

fiuuuhhhh................
Friday I must make my decision

Tuesday, April 5, 2011

KAP 1000 words

now I still doing this work
my friend tell me that 1000 words is around 2 pages

but after I do it myself
I've write down 1.5 pages
and you know how many word is it?

it is only 375 words!!!

yeah still long way to go

Monday, April 4, 2011

TASM 2

thank to Adiguna
now I know how to print word

---------------------------------------------------

TData : JMP Prosess ; jump to Process
; first save the word in a label (example : Tes)
Tes DB 'D_FREAK'

Prosess:
LEA BX,Tes ; To get the first address from Tes
MOV CX,7 ; How many character you want to print

Looping:
MOV DL,[BX] ; move BX to DL
MOV AH,02h ; The service to print character
INT 21h ; Do the service!!
ADD BX,1 ; BX:=BX+1 or BX move to the next character's address
LOOP Looping ; Back to Looping
INT 20h
END TData

---------------------------------------------------

and about add I stil don't know much

they say just write
debug (yourfile).com
after compilation

then press
r,enter -> to see value all registers
t,enter -> to run the instruction one by one
q,enter -> to quit from debug

This day 4-4-2011

first I woke up late (6.45) and I had a class at 7.00
fortunately I could make it, I attended the class at 7.10

In that class my lecturer told me that there was an earthquake at 3.00
How I supposed to know because I begin to sleep at 2.30
so of course I still dreaming.

then after that I got a short massage from a friend
that I needed to print a proposal and delivered it before 9.00
so when my class end at 8.35

I ran from 6th floor to 1st floor then went to comlabs
but when I printed it, the printer was error so I couldn't print it

fortunately again one of my group
Lio just print it, then we ran from comlabs to programming lab
in 2nd floor of labtek v

and we make it at 8.58
2 minutes before deadline

it just two luck that I get this day
I don't know if I couldn't wake, maybe I couldn't attend the class
and also the proposal's deadline

Sunday, April 3, 2011

TASM

I just studying this programming language
after around 3 hour I spent
all I can do is only to understand

--------------------------------------------------------------

how to compile

--------------------------------------------------------------

open your CMD
cd to your TASM folder
write: (if my file name is d_frEak.asm)

TASM d_frEak.asm

then if success there is no error message

tlink/t d_frEak

then

d_frEak

--------------------------------------------------------------

how to print one character only

--------------------------------------------------------------

MOV AH,02h ; The service to print character
MOV DL,'U' ; DL = character you want to print
INT 21h ; print it !!
INT 20h ; end of program

Saturday, April 2, 2011

Something is missing

I don't know why but now I fell something is missing from me
It feels strange.

Althought I am sick, I am not thinking about my health.
Althought I have a lot of homeworks, I am not thinking about them.
Althought I have a lot of jobs, I am not thinking about them too.

It feels so empty.

And finally all I can do is make this note.

Friday, April 1, 2011

No One Left Behind

this word is my group motto
but do you know I thing about this motto

if it was an army, it means that there must someone who keep the rear so when the army move he/she can help anyone who was left behind.

but just you know that must be a risk job because he/she can be the one who was left behind from the army, because if it was an army it must always move forward or it couldn't finish their mission.

So do you want to become 'that' man???

My First Posting

Hello everyone I know that I just a new be.
But I'll try to write something
to share or to show what is in my mind