September 26, 2008

How to retreive current date and time in Pocket Scheme

Unfortunalelly I could not find proper procedure for getting current date and time. But it is possible to use WinApi functions. In our case we will import GetLocalTime funtion from Kernel32.dll.
This funcion requires a pointer to structure SYSTEMTIME:
void WINAPI GetLocalTime(
__out LPSYSTEMTIME lpSystemTime
);
And after calling this function this structure will be filled with data:

typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME,
*PSYSTEMTIME;
Here is Pocket Scheme code that imports function GetLocalTime and usage.

(require "w32.dll")

(define *kdll*
(cond-expand
(windows-nt "kernel32.dll")
(windows-ce "coredll.dll")))

(define GetLocalTime
(w32:foreign-procedure *kdll* "GetLocalTime" '(w32api void lpvoid)))

; outputs current year
(let ((rgw (make-raw-vector 8 'u16)))
(begin
(GetLocalTime rgw)
(display (raw-vector-ref rgw 0)) ; outputs current year
)
)

September 15, 2008

Відпочинок у Туреччині

Готель Phaselis Princes (Turkey - Antalya - Kemer - Tekirova)
From Turkey 2008


Приємні меморізи:

1. Гора Тахтали та деякі види готелю
2. Види готелю
3. Мій фотоальбом
4. Відео-підбірка готелю

Пісеньки міні-діско (пароль solvek.com)

NAZLANMA - Клубна пісня готелю
Виконавець: Турецька співачка Aşkın Nur Yengi
Скачати MP3

Текст пісні (турецькою мовою):

Yine aylar var, geceler sensiz
Gözüm yollarda, ben çaresiz
Sensiz Ah'larda, ah günahlarda
Sevgiye hasret, feryatlarda

Hadi gel yapma ne olur
Bu ne hırs söyle ne gurur
Ayrılık seni de vurur beni de vurur

Hadi gel gel gel ne olursun gel
Hadi nazlanma hayat çok kısa
Hadi gel gel gel bu hasret yeter
Hadi nazlanma sonra bu aşk biter