Sayfalar

1 Ocak 2012 Pazar

AutoCAD: AutoLisp Kodlarıyla Yıldız Çizme

AutoCAD'de verilen yarıçap ölçüsünde yıldız çizmek için iki farklı AutoLisp kodları aşağıdadır. Kodlar İnşaat Mühendisi Mehmet Şahin Güvercin'e aittir. Kendisine teşekkür ederiz.
Lisp Nedir? AutoLisp Nedir? AutoLisp ile Programlama Nasıl Yapılır? AutoLisp Programı Nasıl Çalıştırılır? AutoLisp Programı Nasıl Yüklenir? sorularına cevap için tıklayınız.

Yıldız çizen AutoLisp Kodu. Örnek 1
;Yıldız çizimi. Örnek 1
;Kodlama: Mehmet Şahin Güvercin
;1/1/2012

(defun c:yildiz (/ a1 a2 m1 m2 m3 m4 p0 n r p dx dy)
  (setvar "cmdecho" 0) (command "undo" "group") (vl-load-com)
  (setq a1 (* (/ 18.0 180) pi) a2 (* 4 a1) a1 (- a1 a2) n nil m nil
        m1 '(40 . 0.0) m2 '(41 . 0.0) m3 '(42 . 0.0) m4 '(91 . 0) p0 '(0 0)
        r (getreal "\n Yarıçap: "))
  (repeat 5 (setq n (append n (list (polar '(0 0) (setq a1 (+ a1 a2)) r)))))
  (entmake
    (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity")(cons 67 0)(cons 39 0.0)
    (cons 100 "AcDbPolyline") (cons 90 10) (cons 70 1)(cons 43 0.0)(cons 38 0.0)
    (cons 10 (nth 0 n)) m1 m2 m3 m4 
    (cons 10 (nth 2 n)) m1 m2 m3 m4 
    (cons 10 (nth 4 n)) m1 m2 m3 m4 
    (cons 10 (nth 1 n)) m1 m2 m3 m4 
    (cons 10 (nth 3 n)) m1 m2 m3 m4))
  (while (/= (car (setq p (grread T 1))) 3)
    (setq p (cadr p) dx (- (car p) (car p0)) dy (- (cadr p) (cadr p0)))
    (vla-transformby
      (vlax-ename->vla-object (entlast))
      (vlax-tmatrix
        (list (list 1 0 0 dx) (list 0 1 0 dy) '(0 0 1 0) '(0 0 0 1))))
    (setq p0 p) (redraw (entlast) 3))
  (redraw (entlast) 4) (command "undo" "e") (prin1)
)

24 Aralık 2011 Cumartesi

Picasa ile web albüm(resim galerisi) oluşturma


Picasa ile web albüm(resim galerisi) oluşturma. Picasa'ya şablon(template) ekleme. Eklenen şablon ile resim galerisi oluşturma.
Aynı videoyu dailymotion.com'da izleyebilirsiniz

3 Aralık 2011 Cumartesi

Vb6 ile Bios Tarihi Okuma

Vb6 ile Bios Tarihini Alan Kodlar:
Yeni proje oluşturun Form1’e Label1 ekleyiniz.
Aşağıdaki kodları Kod penceresine ekleyiniz.

Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long

Private Sub Form_Load()
    'Form1'e Label1 ekleyiniz
    Label1.Caption = "Bios tarihi: " & BiosTarihi
End Sub

Function BiosTarihi()
Dim Ret
Dim rSonuc As Long, rDegerTipi As Long, strTampon As String, TamponBoyutu As Long, rDegerAdi As String
Const HKEY_LOCAL_MACHINE = &H80000002
rDegerAdi = "SystemBiosDate"
rAnahtar = "Hardware\Description\System"
RegOpenKey HKEY_LOCAL_MACHINE, rAnahtar, Ret
rSonuc = RegQueryValueEx(Ret, rDegerAdi, 0, rDegerTipi, ByVal 0, TamponBoyutu)
If rSonuc = 0 Then
    If rDegerTipi = 1 Then
        strTampon = String(TamponBoyutu, Chr$(0))
        rSonuc = RegQueryValueEx(Ret, rDegerAdi, 0, 0, ByVal strTampon, TamponBoyutu)
        If rSonuc = 0 Then
            BiosTarihi = Left(strTampon, InStr(1, strTampon, Chr$(0)) - 1)
        End If
    End If
End If
RegCloseKey Ret
End Function

26 Kasım 2011 Cumartesi

İlk yerli tablet. e-Tab

%100'ü yerli olmasa da Türkiyede üretilen ilk yerli tablet ünvanına sahip General Mobile e-tab üretim videosu ve özellikleri.



Related Posts Plugin for WordPress, Blogger...

dogs