Tuesday, 1 December 2015

So you want to make an Operating System ?

First thing we need to do is creating Disk Operating System. The most common.
So, how?

So what are the components?
1. Hardware
2. Application program
3. User
4. Operating system

What are the operating sytem in this world?
1. UNIX
2. MS-DOS

So, what are hardware in this world?
A lot-lot

How to run a DOS?
You can use VMWare Player to run it.

Jadi apa saja yang dilakukan oleh DOS?
1. Nomor interupt hardware
2.
Jika dulu elemen adalah air, api, tanah dan udara.
Sekarang elemen adalah cahaya, suara dan cuaca/temperatur. Siapa yang bisa mengontrol ini yang menang.


Apa itu cahaya? (defenition)
Cahaya adalah gelombang elektromagnetik.

Apa yang bisa kita lakukan pada cahaya? (method)
Dibengkokkan, dibelokkan(reflect),  dihentikan?, dikurangi (reduce?),

Apa saja properti cahaya? (properti)
Sudut cahaya


Javascript

Javascript is a computer code that can do these thing to your webpage:
1
1. HTML
- add an home page
- add an about page
2. CSS
- add site.css
- edit index.html add script link href & add div id main in the body
- edit about.html add link href to site.css

3. Javascript
- add script.js --> script hanya menampilkan tanggal
- edit homepage: add footer, include script.js (script that you just created)

4. Edit stylesheet
- add table, etc
- add customer.html: add data table dan footer.

5. Adding Navigation
- edit script.js --> add something on behalf of something.
- stylesheet
- edit index.html --> add <nav id="nav01">
- edit about.html ---> add <nav id="nav01"> below body tag
- edit customers.html --> add <nav id="nav01"> below body tag

6. Fetching data
1. AppML
2. JSON

CSS

Fundamental of CSS are:
# targetting id

CSS are code that can modify these upon your html tag:
1. background-color (keyword: background-color)
2. text-color (keyword: color)
3. padding
4.
5.


CSS box model
Keyword: text, padding, border, and margin (Te,Pad,Bor,Mar)

Monday, 30 November 2015

Javascript: Outputting text

I want to output a text into/inside a local paragraf instead of using canvas. How can I do that?

There are 5 steps you need to do:
1. First thing you need to define the paragraph where you want to the text to showed up. Like this:
<p></p>

2. Second thing, you need to insert a span tag into that paragraph tag. Like this below:
<p><span></span></p>

3. Third, you need to give an id to that span tag; just the opening tag, not the closing tag. Like this below:
<p><span id="here"></span></p>

4. Last you need to define below inside your script tag:
<script>
document.getElemenytById("here").innerHTML="<your text>"

</script>

5. Last, finish, run the code.

Warning: Remember to use .innerHTML not .value.

For complete code:
<body>
<p><span id="here"></span></p>

<script>
document.getElementById("here").innerHTML = "<your text>"
</script>
</body>

Javascript: Converting hexadecimal to decimal

I want to convert hexadecimal value (for i.e. "0xff") to a decimal value, how can I do this?

1. Put your hexadecimal-value into a string and then into a variable, like this below:
var a = "0xff" //don't forget the double-quotes

2. then use a function like this:




I usually dealing hexadecimal value with color.
Test