Wednesday, June 25, 2008

garanti bankası 4. levent paramatik

metrodan sağa dönüp çıkınca bulnan paramatik şu an itibarıyla çalışmıyor ve yandaki akbankdan para çekerseniz 3 buçuk lira para alıyor. illaki düşen olur haberi olsun.....

Tuesday, June 24, 2008

Linq ve Hibernate

uzun süredir duyduğum linq yu inceleme fırsatım oldu en sonunda ilk elden :) genelde videolarda veya makalelerde görüyordum. olay özünde hibernate in görselleşmiş hali. sabahdan akşama ofisde hibernate xml leri ve pojolarıyla oynamakdan obje kusacam yakında ordan biliomki hibernate çok kolay değil.ve microsoft bu esnada piyasaya çıkıyor var olan orm yapısını yine şükela biçimde ambalajlıyor.

var olan asp.net projesine linq kabiliyeti nasıl kazandırılıyor:
1- projeye sağ tıklayıp "Add New Item" seçiliyor. çıkan ekranda da "LINQ to SQL Classes" seçiliyor örnek ekran görüntüsü

ve sadece bu adım var olan projeye bir dbml dosyası ekliyor.
2-sonraki adım dahada kolay hemen sağda duran server explorerdaki database'inizden açılan panele table ları sürükleyip bırakmak isimlerini istediğiniz gibi ayarlamak örnek görüntü

işte bu kadar classlar hazır koda gir yaz dio adam nereye ne koycan napacaksan :)

hemen kod örneğide verim screen shotdaki classları kullandım:
var p1 = (from p in db.Photos
where p.user_id == (Guid)Membership.GetUser().ProviderUserKey
orderby p.created
select p).First();

bu kod bize gidip photos tablosundan login olunulmuş user a ait fotoların ilkini getiriyor. çok tatlı olmuş çok. bu var keywordüde yeni c# 3 le gelio. compile time da tipi belirlenen değişken tanımlama yöntemi. eskiler bilir vb6 daki variant a benzemio bi satır aşşada p1=3; dersek compile da hatayı verio aynen.

asıl bomba hareketleri denemedim bu arada insan merak edio bu linq nanesi sqlite ile yada mysql ile ne derece anlaşabilio :)

linq yu denedikden sonra yine son zamanlarda asp.net dünyasında MVC muhabbetleri duyuyordum ona bakim dedim ilk elden deneme şansım olmadı ama symphony veya cakephp nin ambalajlanmışıda yolda henüz deploy edilebilir bi versiyonu yokmuş ama bu video öle dedi.

Sunday, June 22, 2008

Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner.

I was having same problem which explained in tha linked page. but this page did not solve my problem. how I solve this issue:
1- download sql management studio express
2- in the tree open security node and right click on "sa" user and enable "sa" login.
after that I easily design my database in diagram.

Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner.

Sunday, June 08, 2008

Applet Sign / Applet imzalamak

uzun süredir ingilizce yazmaya uraşırken iyicede boşlamışdım blogu. zatende muhim bişe yokdu yazcak bugün ilk defa bir appleti imzalamam gerektiğini gördüm. applet bir oyun appleti. ve bir soket açıp servera bağlanması gerekiyordu. lokalde çalışan jar dosyası siteye koyunca exception atar oldu. security exception not allowed falan ulan noluo hani çalışıodu bu bende. anadımki soket açıcak dosya okicak yazcak yani IO işi yapcak bi appletse sign edilmesi gerekirmiş. aradım güzel doc yok bu yazdığımda çok resmi ve açıklayıcı olmicak ama ben olayı şöyle çözdüm.

1. adım jdk ile gelen keytool.exe ile bir key oluşturmalı
2. adım jarsigner.exe ile imzalamak(sign) istediğimiz jarı imzalıoz.

örnek komutlar:

C:\Program Files\Java\jdk1.6.0_04\bin>keytool -genkey -validity 99999 -alias signTavlaFiles1 -keystore compstore -keypass kpi135 -dname "cn=Özkan Pakdil" -storepass ab987c

C:\Program Files\Java\jdk1.6.0_04\bin>jarsigner -keystore compstore -storepass ab987c -keypass kpi135 -signedjar TavlaApplet.jar TavlaApplet1.jar signTavlaFiles1

benim aklıma takılan bi "validity" konusu oldu normalde bu parametreyi vermezseniz 6 aylık sign edio warning verio. keyfime tavlaappleti buldum oynuom bunun içinde para vermenin ne alemi var ama dimi :) garip millet nerden sikceni şaşmış.

Saturday, May 31, 2008

Tuesday, May 06, 2008

server client programming

here is the deal about the server client programming which is port numbers and their limit its about 65 thousands. I know its not a really big number about if you are planing to serve counts more then 65 thousands.

here is the solutions about it. iocp and p2p networking. I am reading both of those big topics. I think if you are planing to do something big p2p will be the real solution. at least throwing bandwidth of the server to client its easy way to go with p2p. I read jxta and I can say that its absolute solution about java and server part. there are some problems about .net and c# part but. in developing games in this situation its acceptable to build a applet for it :)

Saturday, May 03, 2008

pg_restore

I know its been a long time I have not write anything. because I have not learn or done any new things. I dont want to write regular meaningless blogs here. anyway today I tried to restore a pg_dump out file to another postgresql server.

that pg_restore looks nice but in first try it started print lines of the file that was strange. at the end I learned that if we give the name of the database it will restore data to there. otherwise it works like scanner for a dump file.

here is the command: pg_restore -d dbName backupFileName

after that it does not print anything to stdout just starts restoring the data. if anyone knows how to show which table is being restored in that time that would be nice. because now I am cleaning some useless data with pgadmin manually.

speed test hyperoptic