This file contains hidden or 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
/* | |
Ini adalah class aksesAccount.java yang digunakan sebagai -> | |
pengakses dari class Mahasiswa.java dan sub class Account.java | |
Lihat induk classnya (Mahasiswa.java) : https://gist.github.com/agusmakmun/843ca4d91365024a7121 | |
Lihat sub classnya (Account.java) : https://gist.github.com/agusmakmun/e7d8a4d2a566c5b7058d | |
@author Summon Agus (L200130113) | |
@blog bloggersmart.net | |
*/ | |
public class aksesAccount { |
This file contains hidden or 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
/* | |
@author Summon Agus | |
@blog bloggersmart.net | |
*/ | |
public class WithOutSpace { | |
public static void main(String[] args) { | |
String name = "You and"; | |
System.out.println("All Character is: "+name.replaceAll("\\s","").length()); | |
} |
This file contains hidden or 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
/* | |
Ini adalah class SegiEmpat.java | |
Lihat class Pemanggilnya (getSegiEmpat.java): https://gist.github.com/agusmakmun/3ab29fd94476a65e2e94 | |
@author Summon Agus (L200130113) | |
@blog bloggersmart.net | |
*/ | |
public class SegiEmpat { | |
private int panjang = 20; //ganti dengan double untuk melihat perubahannya. | |
private int lebar = 10; |
This file contains hidden or 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
/* | |
Ini adalah class getSegiEmpat.java | |
Lihat class utamanya (SegiEmpat.java): https://gist.github.com/agusmakmun/4036d5bac8699145046e | |
@author Summon Agus (L200130113) | |
@blog bloggersmart.net | |
*/ | |
public class getSegiEmpat { | |
//pemanggilan | |
public static void main(String [] args) { |
This file contains hidden or 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
/* | |
Ini adalah script cecker Admin, dengan menggunakan 2 constructor yang berbeda. | |
Dan 1 method berupa apakahAdmin(), digunakan untuk check admin. | |
Lihat soalnya : https://gist.github.com/agusmakmun/3255042298910fd3f2c5 | |
Lihat pemanggilannya : https://gist.github.com/agusmakmun/a22db6e9a879f03545f8 | |
@author Summon Agus | |
@blog bloggersmart.net | |
*/ | |
public class CekUser { |
This file contains hidden or 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
/* | |
Ini adalah script untuk pemanggilan output CekUser(). | |
Lihat soalnya : https://gist.github.com/agusmakmun/3255042298910fd3f2c5 | |
Lihat class utamanya : https://gist.github.com/agusmakmun/7ecaaf3b0caf799a1905 | |
@author Summon Agus | |
@blog bloggersmart.net | |
*/ | |
public class PanggilCekUser { | |
public static void main(String[] args) { | |
CekUser cek = new CekUser("Admin", "Admin"); |
This file contains hidden or 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
/* | |
Ini adalah Soal Check User | |
Lihat class utamanya : https://gist.github.com/agusmakmun/7ecaaf3b0caf799a1905 | |
Lihat Pemanggil Outputnya : https://gist.github.com/agusmakmun/a22db6e9a879f03545f8 | |
@author Summon Agus | |
@blog bloggersmart.net | |
*/ | |
Class User { | |
//fields: |
This file contains hidden or 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
#!/usr/bin/python | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
GPIO.cleanup() | |
GPIO.setwarning(False) | |
GPIO.setup(17, GPIO.OUT) | |
GPIO.setup(27, GPIO.OUT) | |
print "Light On" | |
GPIO.output(17, GPIO.HIGH) | |
GPIO.output(27, GPIO.HIGH) |
This file contains hidden or 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
>>> import urllib | |
>>> testfile = urllib.URLopener() | |
>>> testfile.retrieve("http://mpsound.ga/uploads/tracks/1721469648_2006899744_556355825.mp3", "sample123.mp3") | |
('sample123.mp3', <httplib.HTTPMessage instance at 0xb6e4984c>) | |
>>> | |
import urllib2 | |
url = "http://translate.google.com/translate_tts?tl=en&q=text" |
This file contains hidden or 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
# File Alarm mp3: http://www.tusfiles.net/fazxijby04ke | |
import os, time | |
minute = 60 | |
hours = minute * minute | |
print 'Alarm dalam 1 Menit..' | |
while True: | |
time.sleep(minute) #ganti sesuai keinginan |