Saturday, 5 December 2015

By default

Margin-top is:
Margin-bottom is:
Padding-top is:
Padding-bottom is:
width:
height:

Natrium can live harmony with Clorine.
Targetting
Styling
Positioning

Hard to remember Word and Number?

Word?
Try this for instances Nemesis
Backward it: sisemeN

Try this for instances Nefarious
Backward it: souirafeN


Number?
Two digit number:
29
Try to convert it to word, for i.e: 29 is RG or ZG

Three digit number:
781
Try to covert it to word, for i.e: 781 is TBI

Friday, 4 December 2015

Linux/Unix Command Line

Go/navigate filesystem

1. Print all working directory
$ pwd
/home/ccuser/workspace

2. Lists all files & folder in the current working directory
$ ls
2014  2015  hardware.txt   
By default ls list all files & folder in the current working directory alphabetically.

3. Switches into any directory that you specify, in this case directory "2015".
$ cd 2015

4. Move up one directory from current working dir
$ cd ..

5. Create one directory, in the current working dir, in this case directory "media"
$ mkdir media                 

6. Create "empty" file in current working directory
$ touch keyboard.txt

Copy, moves and delete files

1. Listing files that hidden
$ ls -a

2. Listing files & folder in tables / long format.
$ ls -l

3. Listing files $ folders in time manner
$ ls -t

4. Copying a file or files
$ cp * superman/

$ cp superman



5. Delete a file
$ rm waterboy.txt

delete a folder (recursive)
$ rm -r slapstick

Redirection

Redirect an input

Redirect an output
$ echo "Hello"

Redirect an output to text file (>)
$ echo "Hello" > hello.txt
and then:
$ cat hello.txt

example(2):
$ cat oceans.txt > continents.txt
Warning: > will overwrite all original content inside continents.txt

example(3) append:
$ cat glaciers.txt >> rivers.txt
>> will take the standard output of the command on the left and appends (adds) it to the file on the right.

Here, the the output data of rivers.txt will contain the original contents of rivers.txt with the content of glaciers.txt appended to it.

example(4)
$

Codecademy.CSS.Session2

1. Make the <h3> color #cc6666 and the <h2> color #8a2be2
Answer:
h3 {
color: #cc6666;
}
h2{
color: #8a2be2;
}
2. Use emphasize (em) or font-size
3. Set the font-family of the <h1> header to serif, <h2> to sans-serif, <h3> to cursive.
Answer:
h1 {
font-family: Serif;
}
h2 {
font-family: Sans-serif;
}
h3 {
font-family: Cursive;
}
4. Set backup value of h1 times as an option before serif, set backup value of h2 verdana as an option before sans-serif,
h1 {
font-family: Times, Serif;
}
h2 {
font-family: Verdana, Sans-serif;
}

5. Set div's background-color to #cc0000
Set height's to 100px
Set width to 100px
Answer:
div {
background-color: #cc0000;
height: 100px;
width: 100px;
}
6. Table: set tds's height to 50px. Give your tds a border of 1 px dashed blue. Give your table a border of 1px solid black.
Answer:
td {
height: 50px;
border: 1px dashed blue;
}
table {
border: 1px solid black;
}
7. Give your a selector a color of #cc0000 and a text-decoration of none.
Answer:
a {
color: #cc0000;
text-decoration: none;
}
8. Add a pair of <h1></h1> tags inside the body of our HTML page. Your h1 header can say anything you want!
Then, on the CSS tab, make its font-family to Verdana and its color to #576D94.
Add a pair of <p></p> tags below your h1 header and set the font-size to 18px and its color to #4a4943
Answer:
h1 {
   
font-family:Verdana;
   
color:#576D94;
}
p {
   
font-size: 18px;
   
color: #4a4943;
}

9. Set the p font-family to Garamond and set a backup font of Serif. Give h1 a backup font of sans-serif.
Answer:
p {
font-family: Garamond,Serif;
}
h1 {
font-family: Verdana, Sans-serif;
}

10. Add an image and set its width and height to 300px and 100px and give your image of 1px solid #4682b4
Answer:
In index.html
<img src="http://bit.ly/NnVbxt">
In stylesheet.css
img
{
width: 300px;
height: 100px;
border: 1px solid #4682b4;
}
11. Add a link using <a href="url">Link text</a> into your HTML page and set link's text-decoration to none and its color
to #cc0000.
<a href="http://www.codecademy.com"></a>
Add this in the stylesheet.css
a {
text-decoration:none;
color:#cc0000;
}

Codecademy.CSS.Session1

1. make the text inside <span></span> tags blue.
answer:
span {
color: blue;
}

2. Tell the span selector that you want the font-family to be cursive.
answer:
span{
font-family: cursive;
}

3. Insert a <link> to stylesheet.css in index.html between/inside your <head></head> tags.
answer:
<link type="text/css" rel="stylesheet" href="stylesheet.css">
4. Most tags are not self-closing
5. Make the font color of the p selector green.
answer:
p {
color: green;
}
6. One selctor many properties
Underneath your color:green property-value pair (but befor the final }!), set the font-family to Garamond and the font-size to 24px.
Answer:
p{
color: green;
font-family: Garamond;
font-size: 24px;
7. Make all the h3 headings red.
Set all the paragraphs to the Courier font-family.
The second paragraph text between
<span></span>tags. Set teh background-color of that <span> to 'yellow'
Answer:
h3 {
color: red
}
p {
font-family: Courier;
/* Remember to capitalize first character of your color */
}
span
{
background-color:yellow;
}
8. Put semicolon!
9. Commented out p selector
Answer:
/*
p {
color:red;
}
*/

Wednesday, 2 December 2015

Semua orang mempunyai otak, tapi tidak semua orang mampu menggunakannya.


Semua tag-HTML bisa menggunakan semua style CSS. Tapi lebih spesifik, biasanya tag:
1. <a> selalu dipakaikan style:
text-decoration
2. Footer selalu dipakaikan copyright