วันอังคารที่ 30 สิงหาคม พ.ศ. 2554

iis7 กับ asp

ต้องการใช้ asp บน windows 7 จะต้องกำหนดค่า ใน iis เลือกใช้ asp asp.net อื่นๆที่ต้องการก่อน
ใน windows on or off

วันศุกร์ที่ 26 สิงหาคม พ.ศ. 2554

clone ghost unmont


clone ghost unmont

case study  26/8/54 
เมื่อทำการ clone hd แล้ว พบว่า มองไม่เห็น partition of slave hd เพราะไม่ได้ mount
จะใช้ patition magic ดูก็ไม่เห็น partition ที่ clone มา ใช้ tools ใน hiren ชื่อ find partition and mount ก็ได้แค่เห็นว่า มี partition ที่ clone มาแต่ไม่สามารถทำให้ visible ได้

แต่พบ tools ชื่อ disk genius 3.2 ก็สามารถ เรียกใช้ partition ที่ไม่ได้ unmount  ได้ โดยทำ rebuild or restore formated partition
 

วันพุธที่ 24 สิงหาคม พ.ศ. 2554

กล้อง cctv h.264 model 9808

การ์ด cctv h.264 model 9808 ติดตั้งบน window xp sp3 ทำหน้าที่เป็น CCTV Server อยู่หลัง firewall ใช้ ubuntu 8.10 เป็น proxy และ gateway
โดยทำการ forward port TCP/IP9000 9001 9002 20009 ตามค่าปรกติ ในเอกสารคู่มืือที่ให้มา
ตอนที่ซื้อมาราคาการ์ด 3000-4000 จำมะได้น่าประมาณนี้  ซื้อมาให้ที่
office ประมาณเดือน 2/2554 และผมมาเขียนบทความให้ทีหลัง

ภาพหน้าต่าง login เมื่อ remote เข้ามาโดย ใช้ internet explorer (บังคับให้ใช้ได้เฉพาะ ie เท่านั้น)



















ภาพในเครื่อง cctv server(ด้านล่าง)























ผมได้เขียน สคริปเพิ่มเติมเพื่อให้สามารถรู้ได้ว่าใครรีโมตเข้ามาในขณะนี้
โดยทำเป็นไฟล์ bat ทำงานบน cctv server ตั้งชื่อ ว่า useron.bat

@echo off
set b=0
:x
cls
set /a b=b+1
echo round = %b% , peroid in second = 5
netstat -n | findstr /i /r "9001"
PING 1.1.1.1 -n 5 -w 1000 > null
if %b% EQU 10 set  b=0
goto x

หรือดาวน์โหลดไฟล์ UserOn.bat ได้ที่ลิงค์   http://www.upload-thai.com/download.php?id=22e1d46e301fed04526e47871f50e954

ภาพข้างล่างเมื่อมีเครื่องใดรีโมตเข้ามาดูกล้อง ในวงแลนเดียวกัน
















ภาพข้างล่างเมื่อ remote จาก เครื่องข้างนอกเข้ามา


วันอาทิตย์ที่ 21 สิงหาคม พ.ศ. 2554

รวบรวม script น่าสนใจ 1

1. dhtml HTML event (js ในบรรทัดเดียว) สังเกตไม่ต้องมี ; ต่อท้ายก็ได้
<html>
<body>
<h1 onclick="this.innerHTML='Ooops!'">Click on this text</h1>
</body>
</html>
2. ดู this และการอ้าง id
<html>
<head>
<script type="text/javascript">
function changetext(id)
{
id.innerHTML="Ooops!";
}
</script>
</head>
<body>
<h1 onclick="changetext(this)">Click on this text</h1>
</body>
</html>

หรือ 1 ตัวอย่าง
<html>
<head>
<script type="text/javascript">
function lighton(id)

{
id.src="bulbon.gif";
}
function lightoff(id)
{
id.src="bulboff.gif";
}
</script>
</head>
<body>
<img id="myimage" onmousedown="lighton(this)" onmouseup="lightoff(this)" src="bulboff.gif" width="100" height="180" />
<p>Click and hold to turn on the light!</p>
</body>
</html>

3. การเปลี่ยน style ด้วย html dom
 current HTML element this.style.property=new style
<h1 onclick="this.style.color='red'">Click Me!</h1>
specific HTML element document.getElementById(id).style.property=new style
<h1 id="h1" onclick="document.getElementById('h1').style.color='red'">Click Me!</h1>
4.อีก case กรณี current html element ไม่ต้องใส่ this ก็ได้
<html>
<body>
<h1 onmouseover="style.color='red'"
onmouseout="style.color='black'">
Mouse over this text</h1>
</body>
</html>




วันเสาร์ที่ 20 สิงหาคม พ.ศ. 2554

grand manager (web app) ปรับใหม่

วันนี้ได้ปรับปรุงหน้าเวป Web App ของ บริษัทฯ ใหม่
เพิ่มโลโก้ แก้เนื้อสคริปบางส่วน





javascript html dom checkbox

กรณีโค้ดด้านล่าง คือ checkbox ที่สร้างโดย msoffice excel เมือต้องการ เซตค่า กาในช่อง checkbox

<OBJECT class=shape id=sv_ot height=25 width=146
classid=CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002F3 v:shapes =
"_x0000_s1027"><PARAM NAME="VariousPropertyBits" VALUE="1015023635"><PARAM NAME="BackColor" VALUE="14737632"><PARAM NAME="ForeColor" VALUE="2147483656"><PARAM NAME="MaxLength" VALUE="0"><PARAM NAME="BorderStyle" VALUE="0"><PARAM NAME="ScrollBars" VALUE="0"><PARAM NAME="DisplayStyle" VALUE="4"><PARAM NAME="MousePointer" VALUE="0"><PARAM NAME="Size" VALUE="3863;661"><PARAM NAME="PasswordChar" VALUE="0"><PARAM NAME="ListWidth" VALUE="0"><PARAM NAME="BoundColumn" VALUE="1"><PARAM NAME="TextColumn" VALUE="65535"><PARAM NAME="ColumnCount" VALUE="1"><PARAM NAME="ListRows" VALUE="8"><PARAM NAME="cColumnInfo" VALUE="0"><PARAM NAME="MatchEntry" VALUE="2"><PARAM NAME="ListStyle" VALUE="0"><PARAM NAME="ShowDropButtonWhen" VALUE="0"><PARAM NAME="ShowListWhen" VALUE="1"><PARAM NAME="DropButtonStyle" VALUE="1"><PARAM NAME="MultiSelect" VALUE="0"><PARAM NAME="Value" VALUE="0"><PARAM NAME="Caption" VALUE="ทำงานล่วงเวลา"><PARAM NAME="PicturePosition" VALUE="458753"><PARAM NAME="BorderColor" VALUE="2147483654"><PARAM NAME="SpecialEffect" VALUE="2"><PARAM NAME="Accelerator" VALUE="0"><PARAM NAME="GroupName" VALUE="Sheet1"><PARAM NAME="FontName" VALUE="Arial"><PARAM NAME="FontEffects" VALUE="1073741824"><PARAM NAME="FontHeight" VALUE="180"><PARAM NAME="FontOffset" VALUE="0"><PARAM NAME="FontCharSet" VALUE="0"><PARAM NAME="FontPitchAndFamily" VALUE="2"><PARAM NAME="ParagraphAlign" VALUE="1"><PARAM NAME="FontWeight" VALUE="400"></OBJECT>

ให้ใช้ javascript

if ("<%=rs2.fields("sv_ot")%>" =="1")
{
document.getElementById("sv_ot").value=true;
}
else
{
document.getElementById("sv_ot").value=false;
}


web app ใบรายงานบริการประจำวัน(SVR)

โปรแกรมใบรายงานบริการประจำวัน(SVR)เป็นในส่วนของ web app






unterminated string constant error

error เกิดจาก บางส่วนในข้อความภายใน พบ vbcrlf หรือ chr(10)และ chr(13)
ทำให้เกิด unterminated string constant error ทำให้ไม่สามารถแสดงผมได้ เมื่อเขียนด้วย
javascirpt หรือ vbscript

วิธีแก้ ให้ ทำการ replace ค่า vbcrlf เป็น ค่าว่าง หรือ "" ก็ไม่เกิด error

ข้างล่างโค้ดตัวอย่าง

<%
'col5 sv_detaillocation
col5 =rs2.fields("sv_detaillocation")
col5=Replace(col5,vbcrlf,"")
sp_col5=Split(col5,"]")
j=5
For i=0 To 9
datacol5=Mid(sp_col5(i),2)
irowcol= "r" & i+1 & j
%>
<script language=JavaScript>
document.getElementById("<%=irowcol%>").innerHTML="<%=datacol5%>";
</script>
<%
Next
%>

วันอังคารที่ 9 สิงหาคม พ.ศ. 2554

วันจันทร์ที่ 8 สิงหาคม พ.ศ. 2554

mu central world

งาน เปิดตัวมิว บูล mu blue 7/8/2554

www.muo.in.th
ผมไปในงานมา ก็เลยถ่ายรูปเก็บมาไว้ เพราะปรกติไม่ค่อยชอบออกไปไหนเท่าไร
ถ้าเป็นร้านเนต
-จะได้ แบนเนอร์ ให้มีชื่อร้านได้
- ac 5 ac
-ได้ อีก 1 ac ใช้ close beta
-ได้ item devil ใช้ open
-โปรเตอร์ 2 แผ่น











วันอาทิตย์ที่ 7 สิงหาคม พ.ศ. 2554

favicon image to icon online

http://www.prodraw.net/favicon/generator.php

การทำ favicon.ico โดยการโหลด ภาพ image ใดๆ ให้ทาง web service แปลงภาพให้เป็น .ico โดยให้เรากำหนดขนาดได้ เช่น 16*16



Tips for FavIcon: Download above favicon.ico file and upload it to your website. Then add the code below after your <head> tag in your HTML:

<link rel="shortcut icon" href="favicon.ico" >


16*16


24*24

32*32

map google ร้านจีเทค

ร้านจีเทค 80/18 ซ.รามคำแหง24 แยก8 ถ.รามคำแหง24 แขวงหัวหมาก เขตบางกะปิ กรุงเทพฯ
โทร 02-718-8228 02-718-9193



ดู ร้านจีเทค เนต&เกมส์ ในแผนที่ขนาดใหญ่กว่า





"this code for google map ร้านจีเทค"

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?f=q&source=s_q&hl=th&geocode=&aq=&ie=UTF8&msa=0&msid=204409339073533196340.0004a8bfffb882f24b5b0&sll=13.771413,100.690193&sspn=0.588875,1.056747&ll=13.754851,100.619745&spn=0.01459,0.018239&z=15&output=embed"></iframe><br /><small>ดู <a href="http://maps.google.com/maps/ms?f=q&source=embed&hl=th&geocode=&aq=&ie=UTF8&msa=0&msid=204409339073533196340.0004a8bfffb882f24b5b0&sll=13.771413,100.690193&sspn=0.588875,1.056747&ll=13.754851,100.619745&spn=0.01459,0.018239&z=15" style="color:#0000FF;text-align:left">ร้านจีเทค เนต&เกมส์</a> ในแผนที่ขนาดใหญ่กว่า</small>


"this image"