This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Usefull bash command | |
Resize Image >> | |
convert -resize 50% source.png dest.jpg | |
convert -resize 1024X768 source.png dest.jpg | |
Compress jpeg | |
jpegoptim *.JPG –max=50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
<!--//--><![CDATA[//><!-- | |
jQuery(document).ready(function($) { | |
$(window).scroll(function() { | |
if($(this).scrollTop() != 0) { | |
$("#toTop").fadeIn(); | |
} else { | |
$("#toTop").fadeOut(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// animation of navigation | |
$(function() { | |
$('.nav-collapse .nav li a').bind('click',function(event){ | |
var anchor = $(this); | |
$('html, body').stop().animate({ | |
scrollTop: $(anchor.attr('href')).offset().top - $('.navbar-inner').height() - ($('.navbar-inner').height()/4.8) | |
}, 1500/*,'easeInOutExpo'*/); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PabrikSepeda { | |
public static void main(String[] args) { | |
Sepeda ThrillAgent = new Sepeda(); | |
ThrillAgent.merk = "Wim Cycle"; | |
ThrillAgent.kecepatan = 0; | |
ThrillAgent.tambahKecepatan(); | |
ThrillAgent.tambahKecepatan(); | |
ThrillAgent.tambahKecepatan(); | |
ThrillAgent.tambahKecepatan(); | |
ThrillAgent.tambahKecepatan(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sepeda { | |
public int posisiGigi; | |
public int kecepatan; | |
public String merk; | |
Sepeda() { | |
this.posisiGigi = 3; | |
this.kecepatan = 20; | |
this.merk = "Polygon"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PabrikSepeda2 { | |
public static void main(String[] args) { | |
Sepeda Dominate = new Sepeda(); | |
Dominate.cetakKecepatan(); | |
Sepeda RodaTiga = new Sepeda("Family", 100); | |
RodaTiga.cetakKecepatan(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Burung { | |
public int jmlSayap; | |
private int jmlKaki; | |
protected String jenis; | |
String warna; | |
public void setJmlKaki(int jumlah) { | |
this.jmlKaki = jumlah; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TamanBurung { | |
public static void main(String[] args) { | |
Burung Kakatua = new Burung(); | |
// Ini akan berhasil | |
Kakatua.jmlSayap = 2; | |
System.out.println("Jumlah sayap kakatua: "+Kakatua.jmlSayap); | |
// Ini akan error, karena private | |
// Kakatua.jmlKaki = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Vertebrata { | |
public int tulangBelakang; | |
Vertebrata() { | |
this.tulangBelakang = 1; | |
} | |
public void jalanKaki() { | |
System.out.println("Hewan sedang berjalan..."); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Aves extends Vertebrata { | |
int sayap; | |
Aves() { | |
this.tulangBelakang = 30; | |
} | |
public void jalanKaki() { | |
System.out.println("Burung sedang berjalan..."); | |
} |