การใช้ PHP เขียนข้อมูลสร้าง PDF File

fpdf module with multicell
fpdf module with multicell

30 มิ.ย.56 มีโอกาสดู 2 เรื่อง สำหรับเรื่องแรก คือ cygwin กับ freebasic ที่ดูมาแล้วหลายวัน วันนี้สรุปว่า freebasic ยังทำงานบนสภาวะจำลอง linux ได้ไม่ดีนัก แต่เป้าหมายคือการทดสอบบน cygwin จึงเปลี่ยนไปใช้ open-cobol ก็พบว่าทำงานเข้ากันได้กับ cygwin ตั้งแต่ปรับแก้คำสั่งใน compiler แล้วก็แปล sourcecode ใหม่ด้วย gcc แล้วได้ compiler จากนั้นก็เขียนภาษา cobol นำมาแปลด้วย compiler ตัวใหม่ที่ปรับแก้คำสั่งแล้ว สรุปว่าเรียบร้อยดี

ส่วนเรื่องที่สอง เรื่องการใช้ php อ่านข้อมูลไปเขียนลง PDF file เพื่อ download ไปใช้งาน
โจทย์ที่ทราบมาจาก ภสุ (นักศึกษาที่ทำโปรเจค) คือต้องการเขียนข้อมูลฟิลด์เดียว แต่มีหลายบรรทัดลงแฟ้ม pdf แต่ฟังก์ชัน cell จะทำให้ข้อมูล 1 ฟิลด์ไหลไปเรื่อย ๆ จนทับข้อมูลส่วนอื่นในบรรทัดนั้น ไม่มีการตัดบรรทัด ส่วน multicell ก็มีปัญหานิดหน่อย  มีประเด็นแลกเปลี่ยน ดังนี้
1. การเขียน content-type เป็น pdf นั้น (เป็นเรื่องที่กรพูดถึง)
คำสั่งพื้นฐานของ PHP ออกแบบมาให้เขียน header แล้วผู้ใช้ก็ load file ไป
อาจถูกใช้เพื่อป้องกันการเข้าถึงแฟ้ม pdf โดยตรง
แต่เทคนิคนี้ไม่ได้ใช้ php เขียนข้อมูล เพื่อสร้าง pdf ใหม่ แต่เน้น load file ที่มีอยู่

header(“Content-type: application/pdf”);
header(“Content-Length: $len”);
header(“Content-Disposition: inline; filename=foo.pdf”);
readfile($filename);

2. multicell จะเลื่อนตัวชี้ไปบรรทัดใหม่ (ซันแนะนำมา)
สามารถตัดข้อมูลเป็นหลายบรรทัดได้ แต่ pointer จะขึ้นบรรทัดใหม่หลังใช้ multicell
หากต้องการเขียน cell ต่อไปก็ต้องไปเริ่มบรรทัดใหม่ จึงไม่สามารถใช้ multicell
เป็นฟิลด์แรกของแต่ละบรรทัดข้อมูล
3. เทคนิคการตัดบรรทัดข้อมูล แล้วแสดงผลแยก cell
วิธีข้างล่างนี้ยุ่งยากน่าดู ทำให้นึกถึงการเขียน graphic บน java แต่นี่คือ pdf
download module FPDF ได้ที่
http://resource.thaicreate.com/upload/script/pdf-thai.zip

<body><?php
require(‘fpdf.php’);
define(‘FPDF_FONTPATH’,’font/’);
$pdf=new FPDF();
$pdf->AddPage();
$pdf->AddFont(‘angsa’,”,’angsa.php’);
$pdf->SetFont(‘angsa’,”,36);
$pdf->Cell(0,20,iconv( ‘UTF-8′,’TIS-620′,’เธชเธงเธฑเธชเธ”เธต’),0,1,”C”);
$pdf->SetFont(‘angsa’,”,10);
$pdf->Cell(50, 3 ,’ธรณีนี่นี้ เป็นพยาน เราก็ศิษย์มีอาจารย์ หนึ่งบ้าง เราผิดท่านประหาร เราชอบ’);
$pdf->Cell(30,3,”ธรณีนี่นี้เป็นพยาน”,1,”L”);
$pdf->Cell(30,3,”ธรณีนี่นี้เป็นพยาน”,1,”L”);
$pdf->ln(11);
$pdf->SetFillColor(255,255,0);
$pdf->Rect(10, 40, 40, 10,”F”);
$pdf->Rect(50, 40, 40, 10);
$pdf->Rect(90, 40, 40, 10);
$pdf->SetFont(‘angsa’,”,10);
// ===
$pdf->Cell(50, 3 ,’ธรณีนี่นี้ เป็นพยาน เราก็ศิษย์มีอาจารย์ ‘);
$pdf->Cell(30,3,”ธรณีนี่นี้เป็นพยาน”,0,”L”);
$pdf->Cell(30,3,”ธรณีนี่นี้เป็นพยาน”,0,”L”);
$pdf->ln();
$pdf->Cell(50, 3 ,’หนึ่งบ้าง เราผิดท่านประหาร เราชอบ’);
$pdf->ln();
$pdf->Cell(50, 3 ,’เราบ่ผิดท่านมล้าง ดาบนั้น คืนสนอง’);
$pdf->ln(5);
// ===
$f = time();
$pdf->Output(“$f.pdf”,”F”);
echo “<a href=’$f.pdf’>here</a>”;
// http://www.fpdf.org/en/script/script3.php
// http://www.fpdf.org/en/doc/multicell.htm
// http://www.select2web.com/fpdf/fpdf-lesson-14.html
?>
</body>

ชัย ราชวัตรถูกแจ้ง 3 ข้อหาหนัก โพสต์หมิ่นนายกฯปู

แจ้ง 3 ข้อหาหนัก “ชัย ราชวัตร” โพสต์หมิ่นนายกฯปู
ที่มา เดลินิวส์ออนไลน์

ชัย ราชวัตร
ชัย ราชวัตร

จาก ASTV ผู้จัดการรายสัปดาห์ อ้างอิงว่า ได้ข้อความจาก twitter ของ ชัย ราชวัตร ซึ่งสงสัยว่าจะเป็น Fan page หรือ Time line แต่ละสื่อก็จะแตกต่างกันไป เพราะระดับการเข้าถึง social media แต่ละบริการ มีความแตกต่างกัน

http://www.manager.co.th/Daily/ViewNews.aspx?NewsID=9560000053468

ทนายความ “นายกฯ ยิ่งลักษณ์” หอบหลักฐานขึ้น สน.ดุสิต แจ้งความดำเนินคดี “ชัย ราชวัตร” ข้อหาดูหมิ่นประมาทเจ้าพนักงานขณะปฎิบัติหน้าที่ หมิ่นประมาทโดยการโฆษณา และ ความผิดตาม พ.ร.บ.คอมพิวเตอร์ หลังโพสต์ข้อความฉาวในเฟซบุ๊กส่วนตัว ระบุถือเป็นการติชมโดยไม่สุจริต ไม่มีมูลความจริง ให้ร้ายทำให้เสื่อมเสียชื่อเสียง


เมื่อเวลา 15.20 น. วันที่ 3 พ.ค.2556
ที่ สน.ดุสิต นายนรวิชญ์ หล้าแหล่ง จากสำนักงานอาภาวิชญ์ทนายความธุรกิจและการบัญชี ในฐานะทีมทนายความ น.ส.ยิ่งลักษณ์ ชินวัตร นายกรัฐมนตรี เดินทางมาเเจ้งความดำเนินคดีนายสมชัย กตัญญุตานันท์ หรือ “ชัย ราชวัตร” การ์ตูนนิสต์ล้อการเมืองชื่อดัง กรณีนายสมชัยได้แสดงความคิดเห็นทางการเมืองอย่างรุนแรงผ่านทางเฟซบุ๊กส่วนตัว โดยเขียนข้อความเปรียบเรื่องผู้หญิงขายบริการ เปรียบเทียบกับเหตุการณ์ที่ น.ส.ยิ่งลักษณ์ ชินวัตร นายกรัฐมนตรี ไปปาฐกถาเรื่องประชาธิปไตยเวทีประชาธิปไตยที่ประเทศมองโกเลีย โดยมี พ.ต.อ.ภัทรภณ สนิทวงศ์ ณ อยุธยา ผกก.สน.ดุสิต มารับมอบหนังสือ

นายนรวิชญ์ กล่าวว่า ในวันนี้ได้รับมอบหมายจากนายกรัฐมนตรีให้มาเเจ้งความดำเนินคดีกับนายสมชัยในข้อหา

1. ดูหมิ่นประมาทเจ้าพนักงานขณะปฎิบัติหน้าที่
2. หมิ่นประมาทโดยการโฆษณา
3. ความผิดตาม พ.ร.บ.คอมพิวเตอร์

เนื่องจากนายสมชัยได้โพสข้อความทำนองหมิ่นประมาทในเฟซบุ๊กส่วนตัว ซึ่งถือเป็นการติชมโดยไม่สุจริต ไม่มีมูลความจริง และเป็นการให้ร้ายทำให้เสื่อมเสียชื่อเสียง ซึ่งตนได้นำเอกสารและหลักฐาน อาทิ ภาพการโพสต์ข้อความผ่านทางเฟซบุ๊กของ ชัย ราชวัตร และข่าวจากสื่อออนไลน์ มามอบให้กับเจ้าหน้าที่ตำรวจ ขณะที่เบื้องต้นยังไม่มีการเรียกร้องค่าเสียหาย อย่างไรก็ตาม ทางเจ้าหน้าที่ตำรวจ ได้รับเรื่องดังกล่าวไว้เพื่อดำเนินการต่อไป

http://mufbkzw.udon-city.com/show_newudon.php?id_prd=3888
http://www.go6tv.com/2013/05/3.html
http://www.manager.co.th/crime/viewnews.aspx?NewsID=9560000076273
http://director.sakonarea1.go.th/index.php/login/93-3
http://www.dailynews.co.th/crime/201922

เท่าที่อ่านข่าวน่าจะเข้า มาตรา ๑๔ .. (๒) นําเข้าสู่ระบบคอมพิวเตอร์ซึ่งข้อมูลคอมพิวเตอร์อันเป็นเท็จ โดยประการที่น่าจะเกิด ความเสียหายต่อความมั่นคงของประเทศหรือก่อให้เกิดความตื่นตระหนกแก่ประชาชน
ตามมาตรานี้ ต้องระวางโทษจําคุกไม่เกินห้าปี หรือปรับไม่เกินหนึ่งแสนบาท หรือทั้งจําทั้งปรับ

ชัย ราชวัตร โพสต์เฟซบุ๊กระบุ
เตรียมเข้ารายงานตัวคดีถูกนายกฯฟ้องหมิ่น ลั่นไม่ใช่คนตาขาวคิดหนีคดี

เมื่อวันที่ 3 มิ.ย.2556 นายสมชัย กตัญญตานันท์ หรือ ชัย ราชวัตร การ์ตูนนิสต์หนังสือพิมพ์ไทยรัฐ ได้โพสต์ข้อความผ่านเฟซบุ๊คส่วนตัว “Chai Rachawat” ว่า ว่างเว้นจากการสื่อสารกับเพื่อนพ้องบนเฟซบุ๊คในระยะนี้ ด้วยเหตุคดีที่ถูกน.ส.ยิ่งลักษณ์ (ชินวัตร นายกรัฐมนตรี)ฟ้องร้องข้อหาหมิ่นประมาทกำลังเข้าสู่กระบวนการทางกฏหมาย การโพสต์ข้อความอะไรออกไปต้องระมัดระวังเป็นพิเศษ เพื่อไม่ให้เป็นภาระเพิ่มแก่ทีมกฏหมาย จึงต้องสงบปากสงบคำไปก่อน และใคร่ขอชี้แจงทำความเข้าใจ 2 เรื่องดังนี้

1. ตามที่สำนักงานตำรวจแห่งชาติมีหมายแจ้งมาให้ไปรายงานตัววันที่ 5 มิ.ย.นี้ กำลังขอคำปรึกษาจากทนายเพื่อกำหนดวันไปรายงานตัวเอง จะเป็นวันไหนยังไม่แน่นอนครับ แต่การข่มขู่คุกคามกันว่าจะออกหมายจับนั้นอย่าหวังว่าจะมีวันนั้น คน ๆ นี้ไม่ใช่คนตาขาวจนคิดหนีคดี

2. ตามที่หลายท่านได้ quote นสพ.โพสต์ทูเดย์ว่าผมกำลังจะวางมือ เป็นความจริงที่ผมให้สัมภาษณ์คุณชัยฤทธิ์ไปเช่นนั้น ภารกิจสุดท้ายคือการวางมือจริง ๆ แต่ผมยังไม่วางอาวุธของผมแล้วเดินหันหลังกลับในขณะที่เพื่อนร่วมทางยังติดพันอยู่กับการสู้รบ แม้จะถูกพันธนาการด้วยขื่อคาของกฏหมายหรือเหตุใดก็ตาม ถ้ายังส่งเสียงให้กำลังใจเพื่อนได้ด้วยเสียงร้องเท่านั้นก็จะแหกปากร้องครับ

หากมีอะไรคืบหน้านอกเหนือจากนี้จะรายงานให้ทราบเป็นระยะ ๆ ครับ

http://www.posttoday.com/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B8%87/226129/%E0%B8%8A%E0%B8%B1%E0%B8%A2-%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%A7%E0%B8%B1%E0%B8%95%E0%B8%A3-%E0%B8%A2%E0%B8%B1%E0%B8%99%E0%B8%9E%E0%B8%A3%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%AA%E0%B8%B9%E0%B9%89%E0%B8%84%E0%B8%94%E0%B8%B5%E0%B8%AB%E0%B8%A1%E0%B8%B4%E0%B9%88%E0%B8%99%E0%B8%99%E0%B8%B2%E0%B8%A2%E0%B8%81%E0%B8%AF

สัมมนา ทางรอดทีวีดาวเทียม อยู่หรือไป

ทีวีดาวเทียม
ทีวีดาวเทียม

เรื่องทีวีดาวเทียม น่าสนใจ เพราะหลายครั้งไปเดินร้านขายเครื่องใช้ไฟฟ้า ก็จะเห็นการประชาสัมพันธ์ และโปรโมชั่น ดี ๆ และ ถูก ๆ คิดแล้วอยากจะติดทุกจานเลย
สมาคมโทรทัศน์ดาวเทียม จัดสัมมนา “ทางรอดทีวีดาวเทียม” เปิดวิสัยทัศน์ให้สมาชิกได้ใช้เป็นข้อมูลในการตัดสินใจที่จะดำเนินกิจการในช่วงหัวเลี้ยวหัวต่อ ซึ่ง กสทช.จะออกใบอนุญาต 14 ปี และกำลังจะประมูลโทรทัศน์ดิจิตอลภาคพื้นดิน วันที่ 26 มิถุนายน 2556 ตลอดวัน ที่อิมแพ็ค เมืองทองธานี

ดร.นิพนธ์ นาคสมภพ นายกสมาคมฯ กล่าวว่า “วันที่ 26 มิถุนายน นี้เป็นวันครบรอบก่อตั้งสมาคม 4 ปี และเป็นช่วงเวลาที่สมาชิกสมาคมฯ ต้องเปิดวิสัยทัศน์เพื่อตัดสินใจในช่วงหัวเลี้ยวหัวต่อว่าจะตัดสินใจกำหนดแผนที่ให้ช่องรายการของตนเองเดินไปทางไหน จะเข้าร่วมประมูลทีวีดิจิตอลภาคพื้นดิน จะพัฒนาเป็นทีวีดิจิตอลผ่านดาวเทียม หรือเป็นเพียงผู้ผลิตรายการป้อนสถานีโทรทัศน์

ช่วงเช้าเป็นการสัมมนาเพื่อกำหนดนโยบายองค์กรเริ่มจาก กสทช. ผศ.ดร.ธวัชชัย จิตรภาษ์นันท์ บรรยายทิศทางของ “ตัวแปรในการออกใบอนุญาต 14 ปี” ต่อด้วยแนวคิดของนักวิชาชีพอาวุโสจากช่องรายการโทรทัศน์ โครงข่าย และดาวเทียม เปรียบเทียบความแตกต่างช่องรายการระหว่างฟรีทีวีดิจิตอลผ่านดาวเทียมและผ่านเสาภาคพื้นดิน

ช่วงบ่ายเป็นการเสวนาเพื่อกำหนดแนวทางการทำงาน เริ่มทิศทางการหารายได้จากโฆษณาทั่วไป โฆษณาขายตรง การเช่าเวลา และการผลิตโฆษณาให้ถูกกฎหมาย ต่อด้วยความคาดหวังที่จะให้โทรทัศน์ดาวเทียมกำกับและดูแลกันเองโดย กสทช. สุภิญญา กลางณรงค์ และปิดท้ายการสัมมนาด้วยโอกาสในการรับทุนวิจัยและพัฒนาโทรทัศน์ โดย รศ.พนา ทองมีอาคม

นภาศักดิ์ โคตรวิบูลย์ ประธานจัดงานเสวนา กล่าวว่าการสัมมนาครั้งนี้ได้รับความสนใจจากสมาชิกและผู้เกี่ยวข้องจำนวนมาก ท่านที่ต้องการเข้าร่วมกรุณาติดต่อล่วงหน้าเพื่อที่สมาคมจะได้จัดที่นั่งให้พอเพียง ทางโทรศัพท์ 089 785 0265, โทรสาร 02-277-6265 หรือ อีเมล : stathailand@gmail.com

http://www.manager.co.th/Home/ViewNews.aspx?NewsID=9560000076252

เอ็ดเวิร์ด สโนว์เดน ผู้แฉโปรแกรมปริซึม ถูกตั้งข้อหาจารกรรม

เอ็ดเวิร์ด สโนว์เดน ผู้แฉโปรแกรม ‘ปริซึม’ ถูกตั้งข้อหาจารกรรม
ไทยรัฐออนไลน์
22 มิถุนายน 2556, 17:35 น.
trace
trace
กระทรวงยุติธรรมสหรัฐฯ แจ้งข้อหาจารกรรมความลับและขโมยทรัพย์สินของรัฐบาล ต่อ “เอ็ดเวิร์ด สโนว์เดนผู้ออกมาเปิดโปงโครงการลับสำหรับดักข้อมูลโทรศัพท์ รวมถึงอีเมล์และอินเทอร์เน็ตของสหรัฐฯ…
สำนักข่าวต่างประเทศรายงานเมื่อวันที่ 22 มิ.ย.56 ว่า กระทรวงยุติธรรมสหรัฐฯ แจ้งข้อหาจารกรรมความลับและขโมยทรัพย์สินของรัฐบาล ต่อนายเอ็ดเวิร์ด สโนว์เดน อดีตเจ้าหน้าที่เทคนิคของหน่วยสืบราชการลับกลางสหรัฐฯ (ซีไอเอ) และอดีตเจ้าหน้าที่ของสำนักงานความมั่นคงแห่งชาติ (เอ็นเอสเอ) ผู้ออกมาเปิดโปงโครงการลับ “ปริซึม” ของสหรัฐฯ ซึ่งถูกใช้ในการดักข้อมูลโทรศัพท์รวมถึงอีเมล์และอินเทอร์เน็ต นอกจากนี้ ยังมีรายงานว่า สหรัฐฯ เตรียมยืนขอส่งผู้ร้ายข้ามแดนไปถึงฮ่องกงด้วย
ข้อมูลจากเอกสารของศาลแขวงตะวันออกแห่งรัฐเวอร์จิเนีย ซึ่งเพิ่งได้รับการเปิดเผยเมื่อวันศุกร์ที่ผ่านมา ระบุว่าศาลได้รับคำร้องแจ้งข้อหาขโมยทรัพย์สินของรัฐบาล, เผยแพร่ข้อมูลความมั่นคงแห่งชาติโดยไม่ได้รับอนุญาต และจงใจเปิดเผยข้อมูล ซึ่งเป็นความลับของหน่วยข่าวกรอง แก่นายสโนว์เดนเมื่อที่ 14 มิ.ย.56 โดยแต่ละข้อหามีโทษจำคุกสูงสุดไม่เกิน 10 ปี
ศาลยังได้ดำเนินการเพื่อขอให้รัฐบาลของฮ่องกง จับกุมตัวนายสโนว์เดนตามหมายจับชั่วคราวด้วย
อย่างไรก็ดี นายสโนว์เดนมีสิทธิ์ยื่นอุทธรณ์ ซึ่งสามารถระงับกระบวนการส่งตัวผู้ร้ายข้ามแดนได้ชั่วคราว ด้านรัฐบาลฮ่องกงยังคงนิ่งเงียบเกี่ยวกับเรื่องการส่งตัวนายสโนว์เดนให้แก่สหรัฐฯ แต่ช่วงที่ผ่านมาประชาชนจำนวนมากออกมาเดินขบวนเรียกร้องให้รัฐบาลปกป้องนายสโนว์เดน และสิทธิส่วนบุคคลขั้นพื้นฐาน ขณะที่เจ้าหน้าที่ตำรวจฮ่องกงปฏิเสธรายงานของสื่อท้องถิ่น ซึ่งระบุว่า ณ ตอนนี้ นายสโนว์เดนถูกคุมตัวอยู่ในเซฟเฮาส์ของตำรวจ
ทั้งนี้ นายสโนว์เดน กล่าวหาสหรัฐฯ ว่า ใช้โปรแกรมที่เรียกว่า ปริซึม ในการเก็บรวบรวมข้อมูลการใช้โทรศัพท์และอินเทอร์เน็ต อ้างว่าสหรัฐฯ แอบแฮกข้อมูลเครือขายคอมพิวเตอร์ของจีนและฮ่องกงมานานหลายปีแล้ว เรื่องนี้ทำให้สหภาพยุโรปและอีกหลายประเทศ ออกมาเรียกร้องให้สหรัฐฯ ชี้แจงข้อเท็จจริง.

ถึงเวลาย้ายจาก Mysql ไป MariaDB

mariadb and mysql
mariadb and mysql

MariaDB กำลังจะมาแทน MySQL

mysql was replaced with mariadb
mysql was replaced with mariadb

http://www.unixmen.com/10-easy-steps-to-upgrade-from-mysql-to-mariadb-on-centos-6-4/

หลัง Oracle ซื้อ MySQL การพัฒนาที่เคยเป็นไปอย่างต่อเนื่องในฐานะ Open Source ก็เปลี่ยนไป ด้วยท่าทีของการเป็นผู้ทำธุรกิจซอฟท์แวร์ ฝั่งนักพัฒนาทั่วโลกเห็นท่าไม่ค่อยดีก็เริ่มทะยอยย้ายฐานไป MariaDB เพราะเรื่องนี้ผู้พัฒนาเลือกได้ และมีเวลาเลือกซะด้วย

transaction per second
transaction per second

+ http://slashdot.org/topic/bi/mariadb-vs-mysql-a-comparison/
+ http://blog.mariadb.org/mysql-man-pages-silently-relicensed-away-from-gpl/
+ http://fedoraproject.org/wiki/Features/ReplaceMySQLwithMariaDB
+ http://www.admin-magazine.com/Articles/MariaDB-vs.-MySQL
+ https://mariadb.org/
+ http://dev.mysql.com/

Oracle is killing MySQL
by Nick Farrell

The founder of MySQL Michael Widenius “Monty” claims that Oracle is killing off his MySQL database and he is recommending that people move to his new project MariaDB. In an interview with Muktware Widenius said his MariaDB, which is also open source, its on track to replacing MySQL at WikiMedia and other major organizations and companies.

He said MySQL was widely popular long before MySQL was bought by Sun because it was free and had good support. There was a rule that anyone should get MySQL up and running in 15 minutes. Widenius was concerned about MySQL’s sale to Oracle and has been watching as the popularity of MySQL has been declining. He said that Oracle was making a number of mistakes. Firstly new ‘enterprise’ extensions in MySQL were closed source, the bugs database is not public, and the MySQL public repositories are not anymore actively updated.

Widenius said that security problems were not communicated nor addressed quickly and instead of fixing bugs, Oracle is removing features. It is not all bad. Some of the new code is surprisingly good by Oracle, but unfortunately the quality varies and a notable part needs to be rewritten before we can include it in things like MariaDB. Widenius said that it’s impossible for the community to work with the MySQL developers at Oracle as it doesn’t accept patches, does not have a public roadmap and there was no way to discuss with MySQL developers how to implement things or how the current code works.

Basically Oracle has made the project less open and the beast has tanked, while at the same time more open versions of the code, such as MariaDB are rising in popularity.

Oracle Makes More Moves To Kill Open Source MySQL
by Alex Williams

18 ส.ค.55 Oracle is holding back test cases in the latest release of MySQL. It’s a move that has all the markings of the company’s continued efforts to further close up the open source software and alienate the MySQL developer community.

The issue stems back to a recent discovery that the latest MySQL release has bug fixes but without a single one having any test cases associated with it.  That creates all sorts of problems for developers who have no assurance that the problem is actually fixed.

It’s pretty clear that Oracle is trying to make it as difficult as possible to use MySQL. The result is a wave of unsettlement in the developer community about what Oracle considers open and what it sees as closed. The move is causing problems for developers in all manner of ways as expressed here and here.

MySQL is the popular database used by developers throughout the world.  Oracle gained control of the software distribution when it acquired Sun Microsystems in 2010.

According to a post on MariaDB, MySQL has used a testing framework called mysql-test since 1999. Over the years tests have been built for new features and regression tests that guarantee that a bug fix is permanent. Developers such as those from Facebook and Twitter rely on the testing framework. At Twitter, MySQL serves as the “persistent storage technology behind most Twitter data: the interest graph, timelines, user data and the Tweets themselves.”

It also appears that Oracle pulled the revision history for MySQL. The revision history groups changes to the millions of lines of source code into what are known as change sets. A change set shows the changes for a particular feature. It shows who made the bug fix, when and why. By removing the revision history, Oracle will keep developers guessing about what is fixed and what is not.

For observers, these moves do not look like simple oversights. More so, it appears that Oracle is making its revision tests and histories closed source. It’s not so surprising knowing Oracle and its history.

But it does raise questions for the open source community about what to do as seen in the comments on Hacker News.

I like what one commenter said about the issue. Forget Oracle. It really is time to move on.

http://techcrunch.com/2012/08/18/oracle-makes-more-moves-to-kill-open-source-mysql/

Why Oracle Won’t Kill MySQL
by Victoria Barret, Forbes Staff

It’s tempting to speculate that Oracle ‘s bid for Sun Microsystems is a convenient way to kill off open-source database wonder, MySQL. But MySQL’s former chief executive, Mårten Mickos, sees things differently. If anything, Oracle badly wanted MySQL.

The reason: Microsoft .

Oracle Chief Larry Ellison Larry Ellison might become a friend of open source, after all, if it helps him get at his long-time enemy, Microsoft. Sun acquired MySQL last year for $1 billion. Oracle was rumored to also be a bidder. How sweet, then to get MySQL a year later in a cheap deal for a slew of other businesses. (Oracle is paying $5.6 billion for Sun excluding its cash and debt piles.)

Mickos talked with Forbes on Monday after the Oracle-Sun deal was announced.

Forbes: What’s your initial reaction to the news that Oracle wants to acquire Sun?

Marten Mickos: It’s amazing, and not entirely surprising. Oracle has the money and is a long-term, strategic player. They went into applications to compete with SAP and have successfully done this. Now they want to out-compete Microsoft.

Microsoft’s database business is the fastest growing. Oracle can use MySQL to achieve a stronger developer community.

But doesn’t that risk cannibalizing Oracle’s database business?

MySQL is growing like crazy. That hasn’t hurt Oracle. MySQL works for Web-based applications. Oracle is for older, legacy applications. Oracle might as well cannibalize themselves, then have someone else do it.

You don’t think they’ll just kill the business? They’ve let Siebel’s online efforts languish and could do the same here.

They can kill the business. But I don’t think they will. Larry Ellison is smart. MySQL was getting around 70,000 downloads a day when I left. It’s an amazing grip on young developers. Having MySQL makes business sense for Oracle.

How will this deal impact MySQL’s community of developers? One might say they’re now working for “the man.”

Any popular open-source project has multiple communities. They don’t care who owns it. They care whether it works. There’s a vocal minority that will say a lot about this. But MySQL has an installed base of 12 million. You and I pay attention to this stuff, but lots of developers probably don’t even know MySQL is owned by Sun.

InnoDB (an open-source technology that Oracle acquired in 2005) is still very popular. It’s run surprisingly autonomously. That’s really the issue. Will Oracle run MySQL separately, or try to merge it with other groups? They could mess it up.

How?

By slipping it into the database division. Then you’ll see turf wars. The power of MySQL is its openness. Oracle is different. They don’t have their bug database public, for example. You risk losing the philosophy of MySQL and its edge in the market.

Or, there’s a risk they give it away as a freebie. One of MySQL’s strengths is that it has a business model.

But my belief is that Oracle’s executives understand this.

So were Larry’s anti-open source rants all bravado?

Yes, of course. I think he loves open source. I am just speculating, but he is an outside-of-the-box thinker. And it will allow him to compete creatively with Microsoft, his favorite enemy.

http://www.forbes.com/2009/04/20/mysql-marten-mickos-technology-enterprise-tech-mysql.html

โปรแกรม dia วาดภาพแล้วได้ source code

dia และ java
dia และ java

22 มิ.ย.2556 ใช้ dia 0.97.2 ปี 2556 ที่สามารถเรียกใช้ผ่าน flash drive โดยไม่ต้อง install ลงเครื่องก่อน พบว่าใช้งานไม่ต่างกับรุ่นก่อนหน้านี้  ที่ทดสอบเมื่อปี 2006 เป็น dia 0.95 + gtk+ ที่ใช้วาด class diagram แล้วจัดเก็บเป็น .code และ .java ซึ่งแฟ้ม .java สามารถนำมา compile ผ่าน Java compiler ได้ หากวาด class diagram 2 ภาพ ก็จะได้แฟ้ม .java จำนวน 2 แฟ้มตามชื่อคลาส โดยมีตัวอย่าง code ดังต่อไปนี้

grandf.java
/*
*/
class grandf {
public String g = 5;
public final int grand() {
}
}

father.java
/*
*/
class Father {
public double f;
private final String ma() {
}
public final fa() {
}
}

http://www.thaiall.com/uml/dia.htm
http://www.thaiall.com/flowchart
http://www.thaiall.com/article/chantra.htm

แปล freebasic ใหม่ใน cygwin

freebasic ใน cygwin
freebasic ใน cygwin
นำ source ของ freebasic มาแปลใหม่
ผ่าน cygwin บน windows xp
กว่าจะแปลผ่านคำสั่ง install-standalone.sh
กับคำสั่ง install-cygwin.sh ก็ค้นกันเหนื่อยเหมือนกัน
ที่แน่นออก ก็เหมือนยกออก
install-cygwin.sh ต้องใช้รุ่น 0.20b
เพราะมี genimplibs.bas มาให้แปลเป็น .exe ใน lib/win32/def
ส่วน install-standalone.sh ที่เป็น source
ต้องติดตั้ง compiler แล้ว copy fbc.exe ไปวางใน root of source
ต่อไปจะหาเวลาเก็บหน้าจอเรื่องพวกนี้ไว้ที่
http://www.thaiall.com/cygwin
ตอนนี้ทดสอบกับ drive D ที่ไม่ติด deepfreeze
ทำให้ย้อนรอยกลับไม่ได้
ถ้าย้อนก็ต้อง download cygwin ขนาด 6 GB กว่า ใช้ทั้งคืนเลยครับ

เรื่องดีดี แสดงไม่ดีกับ firefox กับ chrome

header & footer in xhtml
header & footer in xhtml

บ่นตามปาะสาคนที่เด็ก ๆ เรียกว่า “ลุง”
ผมเป็นพวกมีอดีต เห็นเรื่องดีดีทีไร .. แล้วอดกลุ่มใจไม่ได้
เพราะเตรียมสอนจาวาแก่นักศึกษา แล้วพบ tag <DD>
ที่เคยใช้สิบกว่าปีก่อนแล้ว ในเว็บเพจต่าง ๆ ที่ต้องจัดย่อหน้า
พบว่า browser : firefox กับ chrome
แสดงผลผิดเพี้ยนไป แต่ ie ก็ยัง ok
จะให้ดีก็ต้องตามแก้ ตามเวอร์ชัน ตามตามกันไป .. จนหมดแรง

มี HTML Tag จำนวนไม่น้อยที่หายไปกับกาลเวลา
ที่มาตรฐานใหม่ไม่รองรับ เช่น <DD>
ในภาษา PHP ก็เช่นฟังก์ชัน split ซึ่งการเลิกบริการอาจมีหลายคำ
เช่น DEPRECATED หรือ Not available

แล้วก็ต้องไล่ตามมาตรฐานกันเรื่อยไป
1.  HTML 3
2. HTML 4.01
3. XHTML
4. HTML 5

ที่หนักสุด คือ HTML 5 ที่บอกว่ามาแล้ว (นานแล้วด้วย)
แต่ยังไม่เป็นที่สิ้นสุด ไม่เป็นมาตรฐานเดียว กำลังพัฒนาอยู่
เห็นเขาเรียกว่า ยืดหยุ่น (Flexible)
เพียงแต่ code เก่า ๆ ของผมไม่ยืดตาม ก็เลยเห็นปัญหาเป็นประจำ

Nielsen เผย จำนวนของคนที่เป็นเจ้าของทีวีจะลดลงในปี 2012

online tv
online tv

Nielsen .. บริษัทเก็บสถิติชื่อดังแดนมะกันคาดคะเนว่า ตัวเลขของผู้ที่จะซื้อทีวีไว้ที่บ้านจะลดลงในปี 2012 เป็น 114.7 ล้านครัวเรือน จาก 115.9 ล้านครัวเรือน ซึ่งวิเคราะห์ได้ว่านี่จะเป็นสัญญาณบ่งบอกถึงจุดจบของยุค TV หรือเปล่า โดยสถิติดังกล่าวทาง Nielsen ได้เก็บตัวเลขจากครอบครัวที่ใช้เพื่อดูรายการทั่วไปเท่านั้น ไม่รวมการใช้งานกับ Blu-ray DVD หรือการดูทีวีผ่านอินเตอร์เน็ต ใด ๆ ทั้งสิ้น เนื่องจากทุกวันนี้ผู้คนส่วนมากในประเทศสหรัฐฯ นิยมที่จะเช่าหรือดูรายการผ่านทางโลกออนไลน์กันเนื่องจากความเร็วของอินเตอร์เน็ตบ้านเค้าสูงมากทำให้การรับชมผ่านอินเตอร์เน็ตเป็นเรื่องง่าย ๆ คล้ายกับการเปลี่ยนช่องปกติเลยทีเดียว แถมมีตัวเลือกที่มากมายกว่ารายการปกติอีกด้วย

สมัยนี้เห็นเพื่อน ๆ พก iphone กับ ipad กันหนาตา .. สะดวก สบาย ..  นั่งดูคลิ๊ป ดูทีวีได้ทุกชาติ ทุกภาษา ดูหนังก็ยังได้ ..  มีนักศึกษามาเล่าว่า สมัยนี้ดูหนังชนโรงเป็นเรื่องธรรมดาไปแล้ว ที่เด็ดคือดูหนังก่อนโรง .. ฟังแล้วก็อึ้งไปเหมือนกัน

http://www.lcdtvthailand.com/news/detail.asp?param_id=830

Apple Introducting iOS7 – Official Video

ที่นั่นมีความงดงามลึกซึ้งและยาวนาน ในความเรียบง่าย ในความชัดเจน ในความมีประสิทธิภาพ
There’s a profound and enduring beauty in simplicity, in clarity, in efficiency.
[Apple Introducing iOS 7 – Official Video]
Jonathan Ive
Jonathan Ive
[Jonathan Ive] Source: LYBIO.net
We have always thought of design as being so much more than just the way something looks. It’s the whole thing. The way something actually works on so many different levels. Ultimately of course, design defines so much of our experience. I think there is a profound (ลึกซึ้ง) and enduring (ยาวนาน) beauty in simplicity, in clarity, in efficiency. True simplicity is derived from so much more than just the absence (ตัวตน) of clutter (ความยุ่งเหยิง) and ornamentation (การตกแต่ง). It’s about bringing order to complexity.
iOS 7 is a clear representation of these goals. It has a whole new structure that is coherent and then it’s applied across the entire system. We’ve considered the tiniest details, like refining the typography, to much larger ones like redesigning all the icons, and developing a grid system allowed us to achieve a much more harmonious relationship between individual elements. We’ve also incorporated a whole new palette of colors.
Distinct, functional layers help establish hierarchy and order, and the use of translucency (โปร่งแสง) gives you a sense of your context. These planes combined with new approaches to animation and motion; create a sense of depth and vitality(พลัง). The iPhone responding to your movements drives the parallax to create a whole new experience of depth.
In many ways, we’ve tried to create an interface that is unobtrusive (ไม่สร้างความรำคาญ) and deferential (ความเคารพ). One, where the design recedes and in doing so actually elevates your content; even the simple act of changing your wallpaper has a very noticeable effect on the way your iPhone looks and feels across the entire system.
While iOS 7 is completely new, it was important to us to make it instantly familiar. We wanted to take an experience the people know very well and actually add to it to make it more useful, to make it more enjoyable.
Craig Federighi
Craig Federighi
[Craig Federighi – Senior Vice President Software Engineering]
In addition to the redesign user interface iOS 7 comes with some great new features and enhancements. Now the controls you want to access quickly are all in one convenient place with control center. One swipe any screen opens up a set of useful controls and notification center is now available from the Lock screen, with a new at-a-glance view of your day.
Multitasking let you jump from app to app much more intuitively. It actually pays attention to which apps you use most and automatically keeps your content up-to-date in the background.
The new camera app introduces a new level of easy and versatility. Now you can just swipe between modes, from video to still to square, while using a new power filters. Your iPhone knows the time and location for each of your photos. The photos app uses this information to intelligently organize your pictures by clustering them in the Moments and Collections. And now with iCloud Photo Sharing, friends and family can contribute their own photos and videos to your shared albums.
With over 800,000 apps the App Store is the world’s largest app marketplace. iOS 7 now features the Popular Near Me, a new way to find a curated collection of apps based on your current location.
AirDrop makes it easy to share with people near you. When you’ve got something you want to share, AirDrop shows you your contacts close by. Just select who you want to share with and AirDrop does the rest. And if someone is not in your contacts they just activate AirDrop and you can send them files to.
Safari’s redesigned user interface, let’s you see more of your content, starting with full-screen browsing. The unified search field helps simplify searching, and there’s a new view for your bookmarks and also new way to see your Safari tabs.
Siri is now even more helpful and informative with integrated Twitter and Wikipedia and with new male and female voices, Siri sounds better than ever.
[Siri] Source: LYBIO.net
Okay I found this on Wikipedia.
[Craig Federighi]
And Siri can assist you in new ways by doing things like changing the settings on your iOS device.
[Siri]
Okay Bluetooth is on.
[Craig Federighi]
iTunes Radio is a great way to discover new music. We’ve created many featured stations drawing from the best selection of songs online. It’s easy for you to create your own stations and when you hear something you’d like to purchase it’s just a tap away.
[Jonathan Ive] Source: LYBIO.net
iOS 7 brings with it the most significant changes that we have made to the user interface, since the introduction of the very first iOS. To create, we brought together a broad range of expertise from design to engineering.
With what we’ve been able to achieve together, we see iOS 7 as defining an important new direction and in many ways a beginning.
Apple Introducing iOS 7 – Official Video. iOS 7 brings with it the most significant changes that we have made to the user interface, since the introduction of the very first iOS. Complete Full Transcript, Dialogue, Remarks, Saying, Quotes, Words And Text.