Technical Details
>
See more technical details
Technical Details
>See more technical details
LINQ มี 5 แบบด้วยกันคือ
1. LINQ to XML
2. LINQ to DataSet
3. LINQ to SQL
4. LINQ to Entities
5. LINQ to Object
Query Operator ใน LINQ มีหลายชนิดเช่น
Select,Where
,Join,GroupBy,OrderBy,ThenBy
,OrderByDescending,ThenByDescending,Cast,GroupJoin,SelectMany
Linq Example มาดูตัวอย่างกันครับ
using System;
using System.Linq;
public class TestLINQ
{
public static void Main()
{
string[] str = {"one","two","three","four","five"};
var q =from s in str where s.Length < 4 select s;
foreach (var a in q)
{
Console.WriteLine(a);
}
Console.ReadLine();
}
}
ตัวอย่างอื่นๆจะตามมาเร็วๆนี้ครับยังขาดอีก 4 ตัวที่เหลือ
มีอีกเพลงมาฝากเพราะอยากฟังเองอีกแล้ว
Come Back To Me : Utada Hikaru
MV ติดลิขสิทธิ์ห้ามเผยแพร่ ตามดูที่ Come Back To Me นะจ๊ะ
ส่วนเนื้อเพลงตามนี้เลย
Lyrics Come back to me
The rain falls on my windows
And a coldness runs through my soul
And the rain falls, oh the rain falls
I don’t want to be alone.
I wish that I could photoshop all
Our bad memories
Cause the flashbacks, oh the flashbacks
Won’t leave me alone
If you come back to me
I’ll be all that you need
Baby, come back to me
Let me make up for what happened
* (Come back) Baby come back to me
(Come back) I’ll be everything you need
(Come back) Baby come back to me
(Come back) Boy, you’re one in a million
(Come back) Baby come back to me
(Come back) I’ll be everything you need
(Come back) Baby come back to me
(Come back) You’re one in a million
(One in a million)
Oh, the inside(?) of Manhatten,
She goes shopping for new clothes
And she buys this, and she buys that
Just leave it alone.
I wish that he would listen to her
Side of the story
It isn’t that bad, it isn’t that bad
And she’s wiser for it now.
I admit I cheated (’mit I cheated)
Don’t know why I did it (why I did it)
But I do regret it (do regret it)
Nothing I could do or say can change
ซ้ำ *
Everything I ever did
Heaven knows I’m so afraid(?)
I was too dumb to see
You were always there for me
And my curiosity
Got the better of me
Baby take it easy on me
Anything from A to Z
Tell me what you want it babe
I open my heart to thee
You are my priority
Can’t you see you’ve punished me
More than enough already
Baby take it easy on me
Baby, take it easy on me
Baby come back to me
Baby come back to me
ซ้ำ *,*
La la la la
La la la la la la
La la la la la la
La la la
เพลงสุดประทับใจจากหนังเรื่อง music and lyrics
ไหนๆก็เพราะเอามาลงประดับ blog นี้ซะหน่อยแล้วกัน แบบว่าชอบส่วนตัวนะ 555+
สำนวนจากเพลงนี้
write off หมายถึง อย่าพึงหมดหวัง อย่างพึงสิ้นหวัง
Don't write me off : Huge Grant
Lyrics
It's never been easy for me
To find words to go along with a melody
But this time there's actually something on my mind
So please forgive these few brief awkward lines
Since I met you
my whole life has changed
It's not just my furniture
you've re-arranged
I was living in the past
But somehow you've brought me back
and I haven't felt like this since before Frankie said relax
and now I know based on my track record
I might not seem like the safest bet
All I'm asking you is
Don't write me off just yet
For years I've been telling myself the same old story
That I'm happy to live off my so called former glories
but you've given me a reason
to take another chance
now I need you despite the fact
that you've killed all my plants
and now I know
i've already blown more chances
than anyone should ever get
all I'm asking you is
don't write me off just yet
don't write me off just yet
จบแค่นี้ละกาน จะฟังและ ........
วันนี้หยิบ Ajax Control Toolkit ตัวหนึ่ง
มาดูกัน เจ้านี่ชื่อว่า TextBoxWatermark ชื่อแปลกแหะ
TextBoxWatermark is an ASP.NET AJAX extender
that can be attached to an ASP.NET TextBox control to get "watermark" behavior.
When a watermarked TextBox is empty, it displays a message to the user with a custom CSS style. Once the user has typed some text into the TextBox, the watermarked appearance goes away. The typical purpose of a watermark is to provide more information to the user about the TextBox itself without cluttering up the rest of the page.
ใน Html จะใช้ tag library ของ ajax ดังนี้
<ajaxToolkit:TextBoxWatermarkExtender ID="WM1"
runat="server"
TargetControlID="TextBox1"
WatermarkText="Number Here"
WatermarkCssClass="csswater" />
•TargetControlID - The ID of the TextBox to operate on :
Textbox ที่ทำ Relation ด้วย
•WatermarkText - The text to show when the control has no value :
ใส่ค่า Initail Value ลงไป
•WatermarkCssClass - The CSS class to apply to the TextBox when it has no :
Style Sheet
สรุปมันคือ Mask Value Default ไว้เวลาเราไม่ได้กำหนดค่าลง Text Box นั่นเอง
แต่ถ้าเราใส่ค่าลงไป property WatermarkText ก็จะถูกแทนที่ทันที่เพื่อเอาไป process ต่อไป
ลองเอาไปใช้ดูนะครับพี่น้อง....
เพลงเพราะๆสนุกเอามาฝากกันอีกแล้วจ้า
ชื่อเพลง Hot N' Cold
ศิลปิน Katy Perry
เนื้อเพลงอยู่ในเพลงเลยจ้า.......
===========================================
วันนี้ฝากไว้ก่อนวันหลังเจอเพลงมาใหม่จัดมาใหม่นะ ^ ^
วันนี้มาด้วยเรื่องของ IE กันบ้าง
ว่าด้วยเรื่อง เทคนิคไม่ให้ IE จำข้อมูลที่พิมพ์ใน Textbox
สำหรับ IE6--------เมนู tools แล้วก็เลือก
-internet options
-content tab
-autocomplete
-เอาเครื่องหมายถูกออกให้หมด
แล้วก็กดที่
- clear forms
- clear Passwords
OK
สำหรับ IE7--------เมนู tools แล้วก็เลือก
-internet options
-general tab
-กดปุ่ม Delete-กดปุ่ม Form Data
-กดปุ่ม Form
Password
Close
จบแค่นี้เองง่ายๆ ลองเอาไปใช้ดูนะครับ
หลายคนคงเคยสงสัยว่า Ajax คืออะไรวันนี้ผมไปเจอบทความดีๆจากเว็บนึงมาเอามาฝากกันครับ
เอแจ็กซ์ก (AJAX - Asynchronous JavaScript And XML)
เป็นกลุ่มของเทคนิคในการพัฒนาเว็บแอปพลิเคชันเพื่อ
ให้ความสามารถโต้ตอบกับผู้ใช้ได้ดีขึ้น โดยการรับส่งข้อมูลในฉากหลัง ทำให้ทั้งหน้าไม่ต้องโหลดใหม่ทุกครั้งที่มีการเปลี่ยนแปลง ซึ่งช่วยทำให้เพิ่มการตอบสนอง ความรวดเร็ว และการใช้งานโดยรวมเอแจ็กซ์นั้นไม่ใช่เทคโนโลยีใหม่ แต่เป็นเทคนิคที่ได้ใช้เทคโนโลยีหลายอย่างที่มีอยู่แล้วรวมกันดังต่อไปนี้:* XHTML (หรือ HTML) และ CSS ใช้ในการแสดงผลลัพธ์และรูปแบบข้อมูล* ECMAScript เช่นจาวาสคริปต์ ในการเข้าถึง Document Object Model (DOM) เพื่อใช้ในการแสดงข้อมูลที่มีการเปลี่ยนแปลงหรือโต้ตอบกับผู้ใช้* XMLHttpRequest ใช้ในการแลกเปลี่ยนข้อมูล asynchronously กับเว็บเซิร์ฟเวอร์* XML
ใช้เป็นรูปแบบข้อมูลในการแลกเปลี่ยน ซึ่งรูปแบบอื่นก็สามารถใช้ได้เช่นกันไม่ว่าจะเป็น HTML, JSON, EBML, หรือ เพลนเท็กซ์ ประวัติJeese Jams Garett นั้นเป็นผู้ที่ได้บัญญัติคำว่า เอแจ็กซ์ ขึ้นเมื่อปีพ.ศ. 2548 ซึ่งนึกขึ้นได้ระหว่างที่เขากำลังอาบน้ำ เพื่อหาคำสั้นๆ สำหรับอธิบายให้ลูกค้าของเขาทราบเกี่ยวกับเทคโนโลยีต่างๆ ที่ต้องการจะนำเสนอเอแจ็กซ์โดยตัวมันเองแล้วไม่ได้เป็นเทคโนโลยีหรือภาษาโปรแกรมชนิดใหม่ แต่เป็นการรวมกลุ่มของเทคโนโลยีที่มีใชัอยู่แล้วดังที่กล่าวข้างต้น โดยวิวัฒนาการของเอแจ็กซ์เริ่มต้นเมื่อปีค.ศ. 2002 ไมโครซอฟท์ได้ทำการคิดค้น XMLHttpRequest ขึ้นมาเพื่อเป็นทางเลือกในการเขียนโปรแกรมบนเว็บเพจ เพื่อใช้ติดต่อกับ เว็บเซิร์ฟเวอร์ ในการแลกเปลี่ยนข้อมูล ซึ่งในขณะนั้นมีแต่เพียง อินเทอร์เน็ตเอกซ์พลอเรอร์ เท่านั้นที่มีความสามารถนี้
ต่อมาเว็บเบราว์เซอร์อื่นๆ เช่นจาก มอซิลลา ไฟร์ฟอกซ์ ได้นำแนวคิดของ XMLHttpRequest ไปใส่ในเบราว์เซอร์ของตนด้วย จึงเริ่มทำให้มีการใช้อย่างกว้างขวางขึ้น จนปัจจุบันได้กลายเป็นมาตรฐานที่ทุกเว็บเบราว์เซอร์ต้องมีในตอนแรกนั้นไมโครซอฟท์เป็นผู้ที่ได้นำ XMLHttpRequest โดยใช้ใน Outlook Web Access ที่มาพร้อมกับ Microsoft Exchange Server 2000 ต่อมาเว็บไซต์อย่างกูเกิล ได้เปิดบริการใหม่ชื่อจีเมล ซึ่งใช้ XMLHttpRequest เป็นหัวใจหลักในการดึงข้อมูลจากเว็บเซิร์ฟเวอร์ จึงทำให้แนวคิดและเทคนิคการพัฒนาเว็บแอปพลิเคชันด้วย เอแจ็กซ์ เริ่มเป็นที่รู้จักกันกว้างขวางขึ้น จนปัจจุบันถือว่าเป็นหนึ่งในหัวใจหลักของแนวคิดเรื่อง Web 2.0
ข้อดีสามารถประมวลผลได้เร็ว เรียกดูข้อมูลได้ทันที โดยไม่ต้องรีเฟรชหน้านั้นๆขนาดการรับส่งข้อมูลเทคนิคเอแจ็กซ์นั้นสามารถสร้าง HTML ได้ในเครื่องผู้ใช้ ทำให้ขนาดข้อมูลนั้นเล็กลงในครั้งต่อๆไป เพราะสามารถส่งเพียงข้อมูล และคำสั่งจาวาสคริปต์ลงมาเฉพาะส่วนที่มีการเปลี่ยนแปลง แทนที่จะต้องส่งข้อมูลใหม่หมดมาทั้งหน้า. ซึ่งทั้งนี้ขึ้นอยู่กับการออกแบบของเว็บแอปพลิเคชันนั้นๆ
คร่าวๆก็ตามนี้ครับอยากดูกันเต็มๆไปดูได้ที่เว็บนี้เลยของเค้าดีจริง
http://www.thaicreate.com/tutorial/ajax-introduction.html
โบเก้ ที่เค้าเรียกๆกันคืออะไรกันนะ
เห็นเค้าถ่ายรูปไฟจุดเล็กๆเป็นฉากหลังลางๆเค้าเรียกกันว่าโบเก้ Bokeh ว่าแต่จริงๆแล้วเขาถ่ายกันอย่างไรนะมาดูที่ความหมายกันก่อนดีกว่า
โบเก้ คือ การถ่ายย้อนแสง โดยที่แหล่งกำเนิดแสงมีขนาดเล็ก เช่น แสงจากหลอดไฟดวงเล็กที่ประดับงาน แสงผ่านช่องว่างใบไม้ เป็นต้น และแหล่งกำเนิดแสงต้องหลุดระยะชัดลึกด้วย แล้วภาพของแหล่งกำเนิดแสงนั้นมีลักษณะเป็นดวงๆ โบเก้จะมีขนาดใหญ่หรือเล็ก ขึ้นอยู่กับรูรับแสงที่กล้องเปิด และลักษณะโบเก้เป็นวงกลม หรือ รูปหลายเหลี่ยมขึ้นอยู่กับม่านรูรับแสงภาพแรก ถ่ายใบไม้โดยโฟกัสที่ใบไม้ จะภาพไม่เกิดโบเก้
โบเก้ มันดีอย่างไร .......
คงทำให้ฉากหลังมีความน่าสนใจอีกแบบ กล่าวคือ โดยทั่วไป ฉากหลัง ถ้าไม่ชัดเจน ก็เบลอ แต่เมื่อฉากหลังเป็นภาพดวงๆ ก็น่าสนใจอีกแบบ
มีเทคนิคนำมาฝากด้วยการทำโบเก้ไปอ่านเจอจากที่อื่นเพื่อนๆลองไปดูกันนะ
http://pdamobiz.com/forum/forum_posts.asp?TID=188721&PN=1
http://www.tsdmag.com/forum/index.php?topic=779.0
มีเยอะแยะเลยลองทำมั่งดีกว่า 555