วันศุกร์ที่ 6 พฤศจิกายน พ.ศ. 2558

Explain the significance of “dead beef”

Explain the significance of “dead beef”

Answer: DEADBEEF is a hexadecimal value that has was used in debugging back in the mainframe/assembly days because it was easy to see when marking and finding specific memory in pages of hex dumps. Most computer science graduates have seen this at least in their assembly language classes in college and that’s why they expect software engineers to know it. From wikipedia: 

“0xDEADBEEF (“dead beef”) is used by IBM RS/6000 systems, Mac OS on 32-bit PowerPC processors and the Commodore Amiga as a magic debug value. On Sun Microsystems’ Solaris, it marks freed kernel memory. On OpenVMS running on Alpha processors, DEAD_BEEF can be seen by pressing CTRL-T.[3]”

วันจันทร์ที่ 26 ตุลาคม พ.ศ. 2558

Windows 10 Cannot Open Other Computer in Network

1. gpedit.msc > Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options > Network access: Sharing and security model for local accounts

2. A fix for this issue appears to be setting HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\AllowInsecureGuestAuth (DWORD) to 1.

วันอังคารที่ 13 ตุลาคม พ.ศ. 2558

Code สำหรับสุ่ม vn สำหรับตรวจสอบ แพทย์ละ 10 vn

SELECT name, vn, hn, vstdate
FROM (
SELECT name, vn, hn, vstdate,
@num := IF(@doc = name, @num + 1, 1) AS row_number,
@doc := name AS dummy
FROM vn_stat
LEFT OUTER JOIN doctor ON doctor.code = vn_stat.dx_doctor
WHERE vstdate BETWEEN "2015-09-01" AND "2015-09-30"
AND position_id = "1"
ORDER BY dx_doctor
) AS x WHERE x.row_number <= 10;

วันพุธที่ 8 กรกฎาคม พ.ศ. 2558

Connect to iTunes to use Push Notifications

วันนี้ได้โจทย์ใหม่มา หลังจากเปิดแอพใน IOS จะมี Dialogue ขึ้นมาว่า

Connect to iTunes to use Push Notifications

วิธีแก้ง่ายๆ (จากการค้นหาในอินเตอร์เน็ต) ดังนี้

  1. เข้า Setting > iTunes
  2. Logout ออกจากระบบก่อน
  3. ปิดเครื่อง 1 ครั้ง จากนั้นเปิดขึ้นมาใหม่
  4. เข้า Setting > iTune อีกครั้ง
  5. login เข้า iTunes ใหม่เป็นอันใช้ได้

 15 - 1

มีบาง comment บอกว่าให้ใช้วิธี backup & restore ใหม่ผ่าน iTune บนคอมพิวเตอร์ ท่าทางจะยาก เอาวีธีข้างบนน่ะแหละ ง่ายกว่า

วันพุธที่ 11 มีนาคม พ.ศ. 2558

ลบรายชื่อเด็กที่ลงทะเบียนเข้าบัญชี 3

เรื่องมีอยู่ว่า รพ.มะนัง ปรึกษาว่าในบัญชี 3 (ทะเบียน Well baby Clinic) มีรายชื่อคนนอกเขตรับผิดชอบเข้ามาโดยไม่ทราบง่าใครเพิ่ม
เลยทำการ สั่ง Query เพื่อหาเด็กนอกเขตในบัญชี เพื่อลบออก
select pw.* from person_wbc pw
left outer join person p on pw.person_id = p.person_id
left outer join village v on p.village_id = v.village_id
where v.village_id not in ("1","3","11","23")
order by v.village_moo
อันนี้เป็น Script Query เผื่อครั้งหน้ามีอีก