Hakan ŞEN Kişisel Günce - Etiket : for / http://www.hakansen.com

(asp) For each kullanımı

30 Ocak 2008

Asp de For Each benim cok sık kullandığım bir döngü biçimidir, her bir veri için kullanılabilir. örnek uygulamalarla daha kolay ve güzel anlatabilirim sanırım.

Kod:


<%
For Each veri In Request.ServerVariables()

Response.Write veri &" : " & Request.ServerVariables(""& veri &"") &"<br>"

Next
%>

şeklinde kullanıldığında tüm request.servervariables() değerlerinin listesini ve içeriğini verecektir.

Örnegin bir formdan veri post ettiniz ve bu verilerin listesini görmek istiyorsunuz, ben genellikle mail gönderme işlemlerinde bu seçeneği kullanırım, nedeni ise sürekli request.form şeklinde verileri alıp yazmak zor oluyor.

Kod:
<%

formdangelenbilgiler = ""
For Each x In Request.Form()
formdangelenbilgiler = formdangelenbilgiler & x &" : "& Request.Form(""&x&"") &"<br>"
Next

Response.Write formdangelenbilgiler
%>

şeklinde kullanırım genellikle hele hele uzun bir form oluşturmuşsam her input değerinin adını unutup da request oluşturmak için kesin ve kesin kullanırım bunu

umarım size bi yardımı dokunur.

Devamı
Yorumlar (5)
Tarih : 30 Ocak 2008 Çarşamba Saat: 11:50:22
Kategoriler : Programlama
Etiketler : asp, for each, next

A dan Z ye sıralama (ASP)

24 Ocak 2008

Bugün çok yazı yazdım herhalde ama olsun uzun süreler siteye bakmak pek aklıma gelmiyor, hazır gazı almışken yazıyım.

Bir kaç gündür Cosmo Mutfak sitesinin kodlarıyla uğraşıyorum, ve bir fihrist bölümü oluşturmam istendi.

Şimdi oturacak A B C D E ... diye tüm karakterleri yazmak uzun iş bunu kısa yapmanın bir yolu vardır herhalde diye düşündüm ve char list listesinden alıp kullanmaya karar verdim işte kodlar.


Kod:


<%

For b = 65 To 90 Step 1
Response.Write "<a href='?Harf="& Chr(b) &"'>"& Chr(b) &"</a> "
Next

%>

Devamı
Yorumlar (5)
Tarih : 24 Ocak 2008 Perşembe Saat: 18:39:04
Kategoriler : Makale, Programlama
Etiketler : chr, a dan z ye , a, z, asp, for next

Seçim Boyası Çıkarma Formülü

25 Temmuz 2007

Türkiye seçim hengamesini atlattı, şimdi hükümet senaryoları konuşuluyor. Ama oy kullanan herkesin bir sorunu var: Parmağa, tırnağa musallat olan seçim boyası.
Boyayı çıkarmanın bir formülü mevcut. Biraz külfetli ancak denemek isteyene, denenmiş tarif şöyle:
"Limon suyu, yarım çay kaşığı tuz ve 4-5 damla sirkeyle karıştırılıp 30 dakika bekletilecek. Ardından bir süre zeytinyağında bekletilmiş parmak, karışıma sokulduktan sonra yıkanacak!"

Devamı
Yorumlar (0)
Tarih : 25 Temmuz 2007 Çarşamba Saat: 14:02:07
Kategoriler : Sorun Giderme
Etiketler : seçim, boyası, çıkarma, formülü

Ömer Faruk Tekbilek Emre Altuğ Şaşkın Canlı Performans

19 Temmuz 2007



Sarı sıcak programından bir video

Devamı
Yorumlar (0)
Tarih : 19 Temmuz 2007 Perşembe Saat: 19:30:54
Kategoriler : Muzik & Video
Etiketler : Ömer Faruk Tekbilek, Emre Altuğ, Şaşkın, Canlı Performans, sarı sıcak, video

Snow - Informer

8 Haziran 2007



Whats up man! hey yo whats up!
Yeah whats goin on here.
Sick an tired of five-oh runnin up on the block here.
You know what Im sayin?
Yo snow, they came around here lookin for you the other day.
Word? word! bust it!

Chorus
Informer, you no say daddy me snow me Ill go blame,
A licky boom boom down.
Detective mon said daddy me snow me stab someone down the lane,
A licky boom boom down.
Informer, you no say daddy me snow me Ill go blame,
A licky boom boom down.
Detective mon said daddy me snow me stab someone down the lane,
A licky boom boom down.

Police them come an now they blow down me door,
One him come crawl through, through my window,
So then they put me in the back the car at the station,
From that point on me reach my destination,
When the destination reached, it was the east detention, where them
Whipped down me pants, looked up me bottom, so

Chorus

Bigger they are they think they have more power,
Theyre on the phone me say that on (every) hour,
Me for want to use it once an now me call me lover,
Lover who Ill be callin is the one tammy,
An me love her in me heart down to my belly,
Yes me daddy me snow me I feel cool an deadly,
As the one mc shan an the one daddy snow,
Together we-a loveem as a tor-na-do.

Chorus

Listen for me, you better listen for me now.
Listen for me, you better listen for me now.
When me rockin the microphone me rock it steady,
Yes sir, daddy me snow me are the article done.
But in the in an the out of a dance them they say where you come from,
People them say you come from jamaica,
But me born an raised in the ghetto thats the one I want you to know,
Pure black people mon thats all I mon know.
Yeah me shoes are tear up an me toes used to show,
Where me born in on the one toronto, so

Chorus

Come with a nice young lady. intelligent,
Yes shes gentle an irie.
Everywhere me go, me never left her at all.
Yes, its daddy snow me are the roam dance mon.
Roam between a dancin in a in a nation-a.
You never know say daddy me snow me are the boom shakata.
Me never lay-a down flat in that one cardboard box.
Yes say me daddy me snow me Ill go reachin at the top, so...

Chorus

Why would he?

Me sittin round cool with my dibbie dibbie girl,
Police knock my door,
Lick up my pal,
Rough me up an I cant do a thing
Pick up my line, when my telephone ring.
Take me to the station,
Black up my hands.
Trail me down, cuz Im hangin with the snowman,
What Im gonna do,
Im backed an Im trapped,
Slap me in the face an took all o my gap.
They have no clues an they wanna get warmer,
But shan wont turn informer!

Chorus

Devamı
Yorumlar (0)
Tarih : 8 Haziran 2007 Cuma Saat: 01:34:42
Kategoriler : Muzik & Video, Şarkı Sözü
Etiketler : snow, informer, mp3, video, klip, clip, youtube, video


eXTReMe Tracker