Posts

Function row_number()

Image
Function row_number() เป็นฟังก์ชันที่ใช้ในการนับแถวของข้อมูลที่ไม่ซ้ำกัน ข้อมูลตัวอย่างจริงๆ ยังไม่มี Column a เพิ่มเข้ามาทีหลังจาก Function row_number() ความต้องการแสดงข้อมูล      ต้องการให้แสดงข้อมูลรวมของแต่ละ Series และต้องการดูจำนวนเลขที่ของใบ (Number) ว่ามีข้อมูลกี่ใบ โดยที่ทำการเขียน SQL ดังนี้   select series, sum(amount) sum_amount, sum(a) sum_a from      (select *, case when row_number() OVER (PARTITION BY Number,Series ORDER BY Number,Series) = 1 then 1 else 0 end as a from testdb..table_1) as t group by series

การตรวจสอบ IP นี้ออนอยู่หรือเปล่า

เป็นการเรียกใช้คำสั่ง Ping ใน Command Prompt นั่นเอง Dim MyPing As Boolean = My.Computer.Network.Ping("IP Address")

Set Port DOTA Clients & FifaOnline2

1. เปิด notepad ขึ้นมาครับ แล้วพิมพ์ข้อความล่างนี่ลงไป แล้วเซฟเป็น .bat นะครับ @echo off for /f "tokens=16 delims=." %%i in ('ipconfig ^find "IP Address"') do set IP=%%i set /a dotaport=6000+%IP% ECHO Setting PortDota CDKey %dotaport% reg add "hkcu\Software\Blizzard Entertainment\Warcraft III\Gameplay" /v "netgameport" /t reg_dword /d "%dotaport%" /f :Port Fifa Online 2 ECHO Setting Port Fifa Online 2 %dotaport% echo port=%dotaport% > "d:\FifaOnline2\Port.ini" 2. ไฟล์เดียวใช้ได้ทุกเครื่องครับ.. ไปดับเบิ้ลคลิ๊กใช้งานที่เครื่องนั้นๆเลย แป๊บเดียวเสร็จเช่นกัน 3. ตรงเลข 6000 สีน้ำเงิน คือเลขพอร์ทเริ่มต้นที่ต้องการนะครับ บางคนอาจเปลี่ยนเป็น 7000 4. bat file นี้จะทำการหาเลขท้ายของ ip เครื่องลูกให้เองนะครับ แล้วเอามาบวกเพิ่มเป็นเลขพอร์ทเพื่อเซ็ตให้กับตัวเกมเราอ่ะนะครับ.. **แนวคิด คือ สมมติมี Computer 30 เครื่อง IP 192.168.1.1 - 192.168.1.30 เอาตัวเลขจากข้อ 4.มาใช้ เช่นใช้เป็น 7000 จะได้เบอร์ Port ดังนี...

Net Config Server For Share of Windows XP

net config server /autodisconnect:1 Default = 15   หมายเหตุ ใช้ในกรณีที่ Windows XP Shared ให้ผู้ใช้งานแต่ความสามารถของ Windows XP รองรับได้แค่ 10 Session เท่านั้น ดังนั้นให้จำกัดเวลาให้ Session น้อยลงเหลือเพียง 1 นาทีพอ เพื่อช่วยให้ใช้งานได้มากขึ้น

วิธีการสร้าง Quick Lunch ที่หายไป

1. เปิดโปรแกรม Notepad แล้วพิมพ์ดังนี้ [Shell] Command=2 IconFile=explorer.exe,3 [Taskbar] Command=ToggleDesktop 2. เซฟให้เป็น Quick Lunch.scf

Deltree New Generation

1. สร้างไฟล์ Batch เช่น c:\deltree.bat โดยมีข้อมูลดังนี้ @echo off if {%1}=={} @echo Syntax: DelTree Folder&goto :EOF if not exist %1 @echo Syntax: DelTree Folder - Folder %1 does not exist.&goto :EOF pushd %1 if %ERRORLEVEL% NEQ 0 @echo Syntax: DelTree Folder - Folder %1 does not exist.&goto :EOF del /q /f "*.*" for /f "Tokens=*" %%i in ('dir %1 /B /A /AD') do rd /s /q "%%i" popd 2. วิธีการใช้งาน ให้ไปเรียกที่ Command c:\deltree.bat "C:\tmp\test" จะทำการลบข้อมูลทั้งหมดเหมือนการใช้ deltree บน dos เลย แต่จะไม่ลบ Folder Test ทิ้ง

วิธีการ Clear Cache DNS ของ Client

C:\>ipconfig /flushdns Windows IP Configuration Successfully flushed the DNS Resolver Cache. C:\>ipconfig /registerdns Windows IP Configuration Registration of the DNS resource records for all adapters of this computer has been initiated. Any errors will be reported in the Event Viewer in 15 minutes..