Nugroho's blog.: 2008

Sunday, December 28, 2008

Problem with Checkbox



unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Image1: TImage;
CheckBox1: TCheckBox;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
m,n:integer;

implementation

{$R *.dfm}
procedure lingkaran;
begin
form1.Image1.Canvas.Brush.Color:=clwhite;
form1.Image1.Canvas.Ellipse(m-77,n-77,m+77,n+77);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
m:=75;
n:=57;
//buat kotak putih//
form1.Image1.Canvas.Brush.Color:=clwhite;
form1.Image1.Canvas.Rectangle(0,0,form1.Image1.Width,form1.Image1.Height);
//buat pohon//
//buat lingkaran//
if form1.CheckBox1.Checked=true then begin
lingkaran;
end;
form1.Image1.Canvas.Brush.Color:=clblue;
form1.Image1.Canvas.Ellipse(m-7,n-7,m+7,n+7);
end;


end.

Saturday, December 27, 2008

opensuse11.2


Posted by ShoZu

It's captured when I am chatting with Supri.

opensuse11.2


Posted by ShoZu

It's captured when I am chatting with Supri.

Friday, December 26, 2008

Sound on my HP tx2510us (tx2500) using OpenSuSE 11.1 64 bit linux


Posted by ShoZu



you must have
-kernel-source
-gcc
-make
-xmlto (many tutorial forget it, causing error on make step)

you must dowload
-linuxPkgxxx from realtek.com, that is alsa customized by realtek or simply realtek HD driver for linux

you must
1. unzip it
2. cd to where path you unzip it
3. cd alsa-lib
4. ./configure
5. sudo make install
6. cd ..
7. cd alsa-tool
8. ./configure
9. make
10. sudo make install
11. cd ..
12. cd alsa-driver
13. ./configure
14. make
15. sudo make install
16. sudo alsaconf (press Enter whenever you are prompted to choose something :))
17. exit
18. restart (maybe you have heard the sound of KDE end session)
19. pray
20. ... (maybe, you want to run amarok, :))

hope it usefull

Sound on my HP tx2510us (tx2500) using OpenSuSE 11.1 64 bit linux


Posted by ShoZu



you must have
-kernel-source
-gcc
-make
-xmlto (many tutorial forget it, causing error on make step)

you must dowload
-linuxPkgxxx from realtek.com, that is alsa customized by realtek or simply realtek HD driver for linux

you must
1. unzip it
2. cd to where path you unzip it
3. cd alsa-lib
4. ./configure
5. sudo make install
6. cd ..
7. cd alsa-tool
8. ./configure
9. make
10. sudo make install
11. cd ..
12. cd alsa-driver
13. ./configure
14. make
15. sudo make install
16. sudo alsaconf (press Enter whenever you are prompted to choose something :))
17. exit
18. restart (maybe you have heard the sound of KDE end session)
19. pray
20. ... (maybe, you want to run amarok, :))

hope it usefull

Tuesday, December 23, 2008

Figuring how digikam work


Posted by ShoZu

Sound problem on tx2510us (2500 series) within OpenSuSE 11.1 64 bit linux


We must work hard (and prepare for not sleep about a night) in order to make this laptop speak.

I have no time now (and must sleep :)), but as soon as I am getting up, I'll write what I'd done.

Posted by ShoZu

Sound problem on tx2510us (2500 series) within OpenSuSE 11.1 64 bit linux


We must work hard (and prepare for not sleep about a night) in order to make this laptop speak.

I have no time now (and must sleep :)), but as soon as I am getting up, I'll write what I'd done.

Posted by ShoZu

Configuring Broadcom Wifi on my tx2510 (2500) within OpenSuSE 11.1 64 bit linux


The simplest way is by update broadcom driver and firmware using OpenSuSE repository. (I think it just enough to upgrade firmware only)

The hard way is compile using STA driver obtained from Broadcom site.

and .......... yes, the wifi is succesfully on. Hm, how can we life without wifi?

Posted by ShoZu

Configuring Broadcom Wifi on my tx2510 (2500) within OpenSuSE 11.1 64 bit linux


The simplest way is by update broadcom driver and firmware using OpenSuSE repository. (I think it just enough to upgrade firmware only)

The hard way is compile using STA driver obtained from Broadcom site.

and .......... yes, the wifi is succesfully on. Hm, how can we life without wifi?

Posted by ShoZu

OpenSuSE 11.1 on my TX 2510US (2500 series)


The first look is..... not so impresif. Yup, KDE 4 is cool but:
-no WiFi connection, my broadcom is shown in network setting, but I have some warning (and sugestion) when I switched the Wifi button and run dmesg. uh..
-no sound, aaaargh

At this point, its enough to think that I must working hard to 'normalizing' this, hopefully, cool SuSE

Posted by ShoZu

OpenSuSE 11.1 on my TX 2510US (2500 series)


The first look is..... not so impresif. Yup, KDE 4 is cool but:
-no WiFi connection, my broadcom is shown in network setting, but I have some warning (and sugestion) when I switched the Wifi button and run dmesg. uh..
-no sound, aaaargh

At this point, its enough to think that I must working hard to 'normalizing' this, hopefully, cool SuSE

Posted by ShoZu

My TX2510US


I got many accident (yeah, truely accident: crash, fall from my motor, with cool rolling style landing on road) the day I buy this tabletPC. Anyway, here is the spec:
1GB RAM (I didnt' satisfied with this)
2GB AMD X2 64-bit (mean dual core)
3 port USB (didnt' know whereas its1.0 or 2.0)
VGA port....

accesories:
bluetooth
card reader
remote control (work with WMP only)
stylus
expansion port 3

and Vista Home Premium Preinstalled+trial office 2007+ bunch of other trial software

I append to install OpenSuSE 11.¹on it, hope it work.

Posted by ShoZu

di Warung dekat MIPA Selatan


-Berangkat kuliah
-Pengantar Mekanika Klasik
-Bro Fredrick Presentasi (Gaya Sentral...)

(seperti biasa, setelah presentasi yang "sukses", pasti ada traktiran)

-tentu saja ambil makanan sebanyak-banyaknya, mumpung gratis

................

dan ternyata yang mbayar semua Pak Steven,..........

dalam rangka ultah pernikahan beliau,

yeah..., semoga langgeng

Posted by ShoZu

Fuuton Rasengan Shuriken, heheh...


mau berangkat kuliah

Posted by ShoZu

Saturday Rainy Morning at MIPA UGM


Posted by ShoZu

hmm, its too late


Posted by ShoZu

Sunday, November 30, 2008

Selamat jadi CPNS di UNDANA Kupang, Penny...


The Journal:
1. Asrama Putri Bone (Uni, Pram, Arif, Finta, Verra, Hijrah)
2. 7 Sup Konro, 2 Iga Bakar, 2 Jus Avokad Kopi, 2 Jus Avokad, ¹Es Teh, ¹Es Jeruk, ¹Jus Wortel, ¹Jus Pisang, ¹Jus Mangga (Uni, Pram, Arif , Finta, Verra, Hijrah, Ellida, Immel, Wahyu)
3. Ramai Mall Malioboro (Uni, Pram, Verra, Hijrah, si kembar ketinggalan)
4. Post Mode Gejayan (Uni, Pram, Verra, Hijrah, si kembar ketinggalan)
5. Asrama Putri Bone (Uni, Pram, Verra, Hijrah, si kembar akhirnya bisa menyusul, plus Kak Aras plus Mardia)
6. Di kost, tidur, sendiri...

Posted by ShoZu

Saturday, November 29, 2008

Using Telkomsel Flash, W960i and OpenSuSE Linux


Attach your w960i to computer, make sure it is in "normal mode"

create file wvdial-flash.config in folder /etc (you must be login as root, or at least copy to /etc folder as root)

[Dialer Defaults]
Modem=/dev/ttyACM1
Baud=115200
Init1=ATZ
Init2=ATQ0 V¹E¹S0=0 &C¹&D2
Init3=
Phone=*99#
Username=internet
Ask Password=0
Dial Command=ATDT
Stupid Mode=1
Compuserve=0
Force Address
Idle Seconds=0
Dial Message1=
Dial Message2=
ISDN=0
Auto DNS=1


using wvdial (as root):
#wvdial --config /etc/wvdial-flash.config

if you got error, try to play 2nd line e.g Modem=/dev/ttyACM2 (it sometimes occur when i detach the phone and attach it again)

Enjoy.

Posted by ShoZu

The Answer of My Introduction Mathemathical for Physicist (Jawaban ujian Fismatku)


I use fortran to generate x n y position:

below is the code

PROGRAM Grafik
IMPLICIT NONE
REAL :: gaya,ygaya,k,ky,a,ay,m,v,vy,t,x,y,z
REAL :: sbx,sby,sbz,g,fx,fy,fz
REAL :: r,dt,dx,dy,dz,dv,dvy,theta,phi
INTEGER :: i,j,n
r =100
g =10
n =50
k =10000
ky =1000
t=0
dt=0.001
OPEN (80, FILE = 'data.dat', STATUS = 'NEW', FORM = 'FORMATTED')
WRITE(80,*) ' i t x y'
CLOSE(80)
OPEN(80, ACCESS = 'APPEND', FILE = 'data.dat', FORM = 'FORMATTED')
DO i=-n,n
x=i
x=x/10
IF (x .NE. 1) THEN
!y=(2+x-x*x)/(x-1)/(x-1)
z=2-x-x*x
vy=(x-1)*(x-1)
y=z/vy
END IF
WRITE(80,81) x,y
8¹FORMAT(e14.7,' ',e14.7)
END DO
CLOSE(80)
END PROGRAM Grafik

compile using:

$gfortran grafik.f90

that syntax has output a.out
run using:

$./a.out

It'll create file named data.dat and generate number of f(x)=(2-x-x^2)/(x-1)^2

plot using kst :
$kst -x ¹-y 2 data.dat

It means kst will plot a graph using 1st column as x-axis and 2nd column as y-axis of data.dat

to simplify that procedure, I create text file named run.sh contain:

rm *.dat
gfortran grafik.f90
./a.out
kst -x ¹-y 2 data.dat

make run.sh executable
then run:
$./run.sh



.........dan mereka hidup bahagia berdua selamanya.

Posted by ShoZu

Hiks! Hore...


Benar-benar dikerjain Penguin sepagian,

uh 3 jam yang menyebalkan

Selamat bu Yus (hehe)

Posted by ShoZu

Thursday, November 27, 2008

Hore

Finally, I'm able to conquer Telkomsel Flash+W960i+OpenSuSE10.3

Wednesday, November 26, 2008

Telkomsel Flash

Trying telkomsel Flash on my OpenSuSE 10.3

not successfull yet

Internet by Phone as Modem

Tonight, I spend my time by surfing to internet
I don't care even my M3 was run out pulse

just fun

Monday, November 24, 2008

dr Sardjito

di bagian kulit kelamin, uh

Sunday, November 23, 2008

I Know You Here

You're in my head
I pray for your voice
everytime I slip away

Thought I don't understand
the reason I'm grounded here
in eternity

Help me to save my soul
surrender to your grace

Take me right where I stand
You know that I know you here

Saturday, November 22, 2008

Weekend at Alagaesia

Yeah, this morning I met Eragon and I promised him to spend my weekend with him, Roran and Saphira.

so, here I am

stubborn?

Its hard to believe that you're explode just a minute after we're...

night november

Its rain tonight, and my heart is stabbed

Its cold tonight, and my head is frozen

it just like tears flew as we are cryin',

my blood refuse. to flow

and like river in the winter, it gonna hard

Thursday, November 20, 2008

hhh...

Hanya karena dia tak mencintaimu dengan cara yang kau inginkan, bukan berarti dia tak mencintaimu dengan sejuta cara lainnya.

Hanya karena Tuhan tidak memberi apa yang kita inginkan, bukan berarti Dia tidak memberi apa yang kita butuhkan.

Ku masih hidup
Dia masih mencintaiku

Wednesday, November 19, 2008

First on Fortran

My first program written in fortran is below


!================================================
PROGRAM Grafik

IMPLICIT NONE
!declare variable
REAL :: gaya,ygaya,k,ky,a,ay,m,v,vy,t,x,y,z
REAL :: sbx,sby,sbz,g,fx,fy,fz
REAL :: r,dt,dx,dy,dz,dv,dvy,theta,phi
INTEGER :: i,j,n
!initial value
r =100
g =10
n =10000
k =10000
ky =1000
t=0
dt=0.001
!dx=0.01
m=10
v=0
x=10
y=10
vy=0
!create new file named data.dat (you may change the extension. I used that as I think .dat is cool extension )
OPEN (80, FILE = 'data.dat', STATUS = 'NEW', FORM = 'FORMATTED')
WRITE(80,*) ' i t x y'
CLOSE(80)


OPEN(80, ACCESS = 'APPEND', FILE = 'data.dat', FORM = 'FORMATTED')
!the algorithm
DO i=1,n
gaya=-k*x
a=gaya/m
dv=a*dt
v=v+dv
dx=v*dt
x=x+dx

ygaya=-ky*y
ay=ygaya/m
dvy=ay*dt
vy=vy+dvy
dy=vy*dt
y=y+dy
t=t+dt

!write the result of calclation to data.dat
WRITE(80,81) i, t, x, y
81 FORMAT(i7,' 'e14.7,' ',e14.7,' ',e14.7)
END DO

CLOSE(80)


END PROGRAM Grafik
!===========================================

save to grafik.f90 then compile using this syntax
$gfortran grafik.f90

that'll produce file named a.out

run using
$./a.out

and data.dat will appear
to plot the graphic using value in data.dat I use kst

$kst -x 2 -y 3 data dat

mean kst will use 2nd column as x-axis n 3rd as y-axis


Yeah, I know that the steps look boring, so I used sh script below to generate it automatically.
using kwrite, create text file like below:
rm *.dat
gfortran grafik.f90
./a.out
kst -x 2 -y 3 data.dat

save as run.sh, make it executable then run:
$./run.sh




!I also used script below to generate x, y, z in text file and plot it using kst
!
!DO i=1 ,100
! dt=i
! dt=dt/100
! sbx=r*sin(dt)
! sby=r*cos(dt)
! sbz=dt
! WRITE(80,81) sbx, sby, sbz
! 81 FORMAT(F10.2,' ',e14.7,' ',e14.7)
!END DO

!DO i=1, n
!DO j=1, n
! theta=i
! phi=j
! sbx=r*sin(theta)*cos(phi)
! sby=r*sin(theta)*sin(phi)
! sbz=r*cos(theta)
! !sbz=2
! WRITE(80,81) i, j, sbx, sby, sbz
! 81 FORMAT(i7,' ',i7,' 'e14.7,' ',e14.7,' ',e14.7)
! PRINT*, 'theta: ',i,' -------------'
! PRINT*, 'phi: ',j,' -------------'
! PRINT*, 'sb-x :', sbx
! PRINT*, 'sb-y :', sby
! PRINT*, 'sb-z :', sbz
!END DO
!END DO



There is something strange in two script above. The result is x, y, z (THREE variable) but why the plot is just in TWO axis? Err..., that the weakness of kst.

At prior time :), I used gnuplot to generate "3D" picture--of course, it just projection of z-axis (or x-axis if you using left-handed coordinate)--but I have'nt yet found to automating it using .sh script.

If you like to using gnuplot:
$gnuplot
>plot "data.dat" using 2:3 (oops, that still 2D. Plotting data.dat using 2nd and 3rd column)



>splot "data.dat" using 2:3:4 (that is.)


I've skimmed "man gnuplot" but did'nt found how to do it automatically

anybody can help me automating it using gnuplot?


oh yeah, almost forget, I use Linux.

night

I lay in the bed
hearing a crow of bats

it's night and no one here but me

I won't die tonight, maybe
but I did'nt felt live

Even my head is full of inspiration
my spirit is empty

someone
help me
blow my attitude

that's what I need at now

in the middle of the night

Well, it's time to start anything seriously. And prove that I'm physicist
323f (5) amp (1) android (12) apple (7) arduino (18) art (1) assembler (21) astina (4) ATTiny (23) blackberry (4) camera (3) canon (2) cerita (2) computer (106) crazyness (11) debian (1) delphi (39) diary (286) flash (8) fortran (6) freebsd (6) google apps script (8) guitar (2) HTML5 (10) IFTTT (7) Instagram (7) internet (12) iOS (5) iPad (6) iPhone (5) java (1) javascript (1) keynote (2) LaTeX (6) lazarus (1) linux (29) lion (15) mac (28) macbook air (8) macbook pro (3) macOS (1) Math (3) mathematica (1) maverick (6) mazda (4) microcontroler (35) mountain lion (2) music (37) netbook (1) nugnux (6) os x (36) php (1) Physicist (29) Picture (3) programming (189) Python (109) S2 (13) software (7) Soliloquy (125) Ubuntu (5) unix (4) Video (8) wayang (3) yosemite (3)