Rabu, 02 November 2011

Google Reader

http://www.google.com/reader/view/feed/http://[namawebsite]/feeds/posts/default?source=ignitionfork

Sabtu, 23 April 2011

Membuat Pivot dalam MySQL

Buat Database
CREATE TABLE exams ( pkey int(11) NOT NULL auto_increment,name varchar(15),
exam int, score int,PRIMARY KEY  (pkey));


Isi Database

insert into exams (name,exam,score) values ('Bob',1,75);
insert into exams (name,exam,score) values ('Bob',2,77);
insert into exams (name,exam,score) values ('Bob',3,78);
insert into exams (name,exam,score) values ('Bob',4,80);

insert into exams (name,exam,score) values ('Sue',1,90);

insert into exams (name,exam,score) values ('Sue',2,97);
insert into exams (name,exam,score) values ('Sue',3,98);
insert into exams (name,exam,score) values ('Sue',4,99);


Tampilkan Database

mysql> select * from exams;
+------+------+------+-------+
| pkey | name | exam | score |
+------+------+------+-------+
| 1 | Bob | 1 | 75 |
| 2 | Bob | 2 | 77 |
| 3 | Bob | 3 | 78 |
| 4 | Bob | 4 | 80 |
| 5 | Sue | 1 | 90 |
| 6 | Sue | 2 | 97 |
| 7 | Sue | 3 | 98 |
| 8 | Sue | 4 | 99 |
+------+------+------+-------+
8 rows in set (0.00 sec)


Buat Query

mysql> select name,sum(score*(1-abs(sign(exam-1)))) as exam1,
sum(score*(1-abs(sign(exam-2)))) as exam2,

sum(score*(1-abs(sign(exam-3)))) as exam3,

sum(score*(1-abs(sign(exam-4)))) as exam4

from exams group by name;

+------+-------+-------+-------+-------+
 name | exam1 | exam2 | exam3 | exam4 |

+------+-------+-------+-------+-------+
 Bob  |    75 |    77 |    78 |    80 |
| Sue  |    90 |    97 |    98 |    99 |

+------+-------+-------+-------+-------+
2 rows in set (0.00 sec)

Minggu, 24 Oktober 2010

Windows 7 Bermasalah dengan Petunjuk Baterai

Saya sudah menggunakan Windows 7 selama 8 bulan. Saat ini Icon Battery pada System Tray menampilkan pesan "Consider Replacing Your Battery". Saya sempat kecewa karena belum ada setahun batterainya sudah nge-drop. Akhirnya saya cari artikel tentang permasalahan tersebut. Berikut hasil pencariannya. Silahkan dibaca baik-baik.

Bagi yang sudah mencicipi sistem operasi windows terbaru, Microsoft Windows 7 mungkin ada yang memiliki masalah dengan baterainya. Seakan diberikan peringatan akan kondisi baterai yang sudah ngedrop, padahal baterai dalam kondisi penuh. Anomali peringatan baterai ini memang sedang diselidiki pihak Microsoft.

Battery180_original

Dalam pernyataan resminya, pihaknya menyatakan :

"Microsoft has been made aware that some computers running Windows 7 receive a warning that the battery needs to be replaced when the battery is new or in good health. In conjunction with our hardware partners, we are investigating this issue. The warning received on some computers using Windows 7 uses firmware information (information about hardware status provided by the PC itself) to determine if battery replacement is needed. We are working with our partners to determine the root cause of what appear to be erroneous warnings and will update the TechNet forum with information and guidance as it becomes available.

The battery notification is new functionality in Windows 7, so the notification itself should not be an indication that customers are having this issue. Windows Vista and Windows XP did not display notifications when it was time to replace the battery. Customers who have already confirmed their battery is fine should contact Microsoft technical assistance for help."

Permasalahan ini dicurigai karena ada salah peringatan yang dihasilkan dari Windows 7. Windows 7 menggunakan fitur pada baterai laptop modern yang bisa melaporkan kepada windows akan kesehatan baterai. Jadi misalnya, baterai yang biasanya penuh setelah di charge selama 5 jam kini akan penuh setelah dicharge selama 2 jam. Notifiskasi ini di windows 7 barupa ikon battery meter dan sebuah pesan "Consider replacing your battery". Notifikasi ini baru dijalankan di Windows 7 dan tak ada sebelumnya baik di Vista maupun di XP.

Jadi, pada kesimpulannya, isu baterai di Windows 7 memang membuat seakan-akan performa baterainya menurun 40 persen dari kapasitas sesungguhnya dan membuat pengguna yang sebelumnya akrab dengan XP maupun Windows terheran-heran dengan peringatan baterai di sistem operasi terbaru ini.

Sumber: http://www.edittag.com/astaga/