sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo apt-get -y autoremove
12/17/2016
Debian : Update Current Software
12/16/2016
Debian - Apt-get : NO_PUBKEY / GPG error
gpg --keyserver pgpkeys.mit.edu --recv-key public_key
gpg -a --export public_key | apt-key add -
3/19/2015
Delphi not run : d7reg.exe cannot be found !!!!
Invalid Delphi license
- Delete your registry.slm file from the .borland directory within your user's folder with in Documents and Settings.
- Run the D7Reg.exe file from within your Delphi7 Bin directory.
- Follow the registration steps (you don't have to register now!)
- All done. Open Delphi7 as normal.
10/26/2013
Dev with Mac
http://net.tutsplus.com/tutorials/tools-and-tips/setting-up-a-mac-dev-machine-from-zero-to-hero-with-dotfiles/
10/06/2013
JetBrains Intellig IDEA 12 & Java 1.7* & Mac 10.8
>> Edit IntelliJ IDEA 12/Info.plist Change JVMVersion From 1.6* to 1.7*
>> open -a /Application/IntelliJ IDEA 12.app
>> see About for infomation of java version
********
At the moment all our products require Apple JDK 1.6 to be installed in order to run on Mac. JDK 1.7 from Oracle is not officially supported yet and has known problems that stop us from using it by default.
To force running under JDK 1.7 edit /Applications/.app/Contents/Info.plist file, change JVMVersion from 1.6* to 1.7* :
JVMVersion 1.7*
- See this answer for the known problems with JDK 1.7.
- IDEA_JDK environment variable can be used to override the selected JDK, you may need to run the product from the Terminal so that it sees your environment variables (Mac OS limitation): open -a /Applications/
.app/ . - Application About dialog will show the actual JDK version.
Infomation from : http://www.sencha.com/forum/showthread.php?233071-Sencha-Touch-2.x-with-Phonegap-Cordova-2.0
7/08/2013
Responsive CSS Framework Comparison
Bootstrap vs. Foundation vs. Skeleton
http://responsive.vermilion.com/compare.php
- Twitter Bootstrap : http://twitter.github.io/bootstrap/
2/18/2013
Fail2ban : unban
How to unban fail2ban
1. #iptables -D fail2ban-SSH -s XXX.XXX.XXX.XXX -j DROP
2. #iptable -L --line-numbers
#iptable -D [chain] [chain-number]
3. #fail2ban-client get [rule-name]actionunban [xxx.xxx.xxx.xxx]
1. #iptables -D fail2ban-SSH -s XXX.XXX.XXX.XXX -j DROP
2. #iptable -L --line-numbers
#iptable -D [chain] [chain-number]
3. #fail2ban-client get [rule-name]
11/27/2012
10/08/2012
9/10/2012
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
change file vsftpd.conf
allow_writeable_chroot=YES
ที่มา : http://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/
allow_writeable_chroot=YES
ที่มา : http://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/
9/03/2012
การคำนวณ
การคำนวณเปอร์เซนต์
จำนวน/ผลรวม = เปอร์เซ็นต์
การคำนวณหาจำนวน กรณีทราบผลรวมและเปอร์เซนต์
ตัวอย่าง
ถ้าคุณซื้อคอมพิวเตอร์ราคา $800 และอัตราภาษีขายคือ 8.9% คุณจะต้องจ่ายค่าภาษีเป็นจำนวนเงินเท่าไร ในตัวอย่างนี้ คุณต้องการค้นหาว่า 8.9% ของ 800 เท่ากับไร
วิธี
800 คูณด้วย 0.089 (8.9/100) เพื่อหาจำนวนภาษีขายที่จะต้องชำระ ($71.20)
(8.9/100) * 800 = 71.20
การคำนวณหาเปอร์เซ็นต์ กรณีทราบผลรวมและจำนวน
ตัวอย่าง
ถ้าคุณตอบถูก 42 คะแนน จากคะแนนเต็ม 50 คะแนน คำตอบที่ถูกต้องคิดเป็นกี่เปอร์เซ็นต์
เมื่อต้องการคำนวณผลลัพธ์นี้ ให้ตั้งค่าแผ่นงานตามที่แสดงต่อไปนี้ หรือคัดลอกตัวอย่างลงในแผ่นงานเปล่า
วิธี
42 หารด้วย 50 เพื่อหาเปอร์เซ็นต์ของคำตอบที่ถูกต้อง (0.84 หรือ 84%)
จำนวน/ผลรวม = เปอร์เซ็นต์
การคำนวณหาจำนวน กรณีทราบผลรวมและเปอร์เซนต์
ตัวอย่าง
ถ้าคุณซื้อคอมพิวเตอร์ราคา $800 และอัตราภาษีขายคือ 8.9% คุณจะต้องจ่ายค่าภาษีเป็นจำนวนเงินเท่าไร ในตัวอย่างนี้ คุณต้องการค้นหาว่า 8.9% ของ 800 เท่ากับไร
วิธี
800 คูณด้วย 0.089 (8.9/100) เพื่อหาจำนวนภาษีขายที่จะต้องชำระ ($71.20)
(8.9/100) * 800 = 71.20
การคำนวณหาเปอร์เซ็นต์ กรณีทราบผลรวมและจำนวน
ตัวอย่าง
ถ้าคุณตอบถูก 42 คะแนน จากคะแนนเต็ม 50 คะแนน คำตอบที่ถูกต้องคิดเป็นกี่เปอร์เซ็นต์
เมื่อต้องการคำนวณผลลัพธ์นี้ ให้ตั้งค่าแผ่นงานตามที่แสดงต่อไปนี้ หรือคัดลอกตัวอย่างลงในแผ่นงานเปล่า
วิธี
42 หารด้วย 50 เพื่อหาเปอร์เซ็นต์ของคำตอบที่ถูกต้อง (0.84 หรือ 84%)
การคำนวณหาผลรวม กรณีทราบจำนวนและเปอร์เซ็นต์
ตัวอย่าง
เสื้อเชิ้ตตัวหนึ่งราคา $15 ซึ่งเป็นราคาขายที่หักส่วนลด 25% จากราคาเต็ม เสื้อเชิ้ตตัวนี้มีราคาเต็มเท่าไร ในตัวอย่างนี้ คุณต้องการค้นหาว่า 75% ของจำนวนเท่าไรจะเท่ากับ
วิธี
หาร 15 ด้วย 0.75 เพื่อหาราคาเดิม (20)
การคำนวณผลต่างระหว่างตัวเลขสองจำนวนเป็นเปอร์เซ็นต์
ตัวอย่าง
คุณมีกำไร $2,342 ในเดือนพฤศจิกายน และ $2,500 ในเดือนธันวาคม กำไรของสองเดือนนี้เปลี่ยนแปลงกี่เปอร์เซ็นต์ ให้ใช้ฟังก์ชัน ABS รวมทั้งตัวดำเนินการลบ (-) และหาร (/) ในการคำนวณนี้
วิธี
ส่วนต่างระหว่างจำนวนที่หนึ่งและจำนวนที่สองหารด้วยค่าสัมบูรณ์ของจำนวนที่หนึ่ง ทำให้ได้เปอร์เซ็นต์ความเปลี่ยนแปลง (0.06746 หรือ 6.75%)
ค่าสัมบูรณ์์
ค่าสัมบูรณ์ของจำนวนใด ๆ คือ ระยะทางที่จำนวนนั้น ๆ อยู่ห่างจากศูนย์ (0) บนเส้นจำนวนไม่ว่าจะอยู่ทางซ้าย หรือทางขวาของศูนย์ ซึ่งค่าสัมบูรณ์ของจำนวนใด ๆ จะมีค่าเป็นบวกเสมอ กล่าวคือ
1 มีระยะห่างจาก 0 เท่ากับ 1 หน่วย นั้นคือ ค่าสัมบูรณ์ของ 1 เท่ากับ 1
-1 มีระยะห่างจาก 0 เท่ากับ 1 หน่วย นั้นคือ ค่าสัมบูรณ์ของ -1 เท่ากับ 1
เราจะใช้สัญลักษณ์ที่ใช้แทนค่าสัมบูรณ์ คือ | | เช่น
| -4 | คือ ค่าสัมบูรณ์ของ -4 คือ 4
| 6 | คือ ค่าสัมบูรณ์ของ 6 คือ 6
ที่มา : http://office.microsoft.com/th-th/excel-help/HP001141712.aspx
http://th.wikipedia.org/wiki/%E0%B8%84%E0%B9%88%E0%B8%B2%E0%B8%AA%E0%B8%B1%E0%B8%A1%E0%B8%9A%E0%B8%B9%E0%B8%A3%E0%B8%93%E0%B9%8C
http://th.wikipedia.org/wiki/%E0%B8%84%E0%B9%88%E0%B8%B2%E0%B8%AA%E0%B8%B1%E0%B8%A1%E0%B8%9A%E0%B8%B9%E0%B8%A3%E0%B8%93%E0%B9%8C
7/27/2012
SuPHP – chmod All Files 644, All folders 755
When switching from DSO to SUPHP in cpanel (a must for anyone who takes security seriously on a public webserver), one must pay careful attention to the insecure permissions of user’s public_html folders. The following commands will look in every user’s html folder and make the appropriate CHMOD to allow php to properly execute under SUPHP. Don’t forget to also check for files owned by ‘nobody’ or ‘root’ — they will also fail with a 500 error.
How to ..
from : http://djlab.com/2009/06/cpanel-suphp-chmod-all-files-644-and-all-folders-755/
find /home/*/public_html/ -type d -print0 | xargs -0 chmod 0755 # For directories
find /home/*/public_html/ -type f -not -name "*.pl" -not -name "*.cgi" -not -name "*.sh" -print0 | xargs -0 chmod 0644 # For files
find /home/*/public_html/ -type f -name "*.cgi" -print0 -o -name "*.pl" -print0 -o -name "*.sh" -print0 | xargs -0 chmod 0755 # For CGI/Scripts
How to ..
from : http://djlab.com/2009/06/cpanel-suphp-chmod-all-files-644-and-all-folders-755/
7/19/2012
Mobile Network Code
A Mobile Network Code (MNC) is used in combination with a Mobile Country Code (MCC) (also known as a "MCC / MNC tuple") to uniquely identify a mobile phone operator/carrier using the GSM/LTE, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks. The ITU-T Recommendation E.212 defines mobile country codes.
more : http://en.wikipedia.org/wiki/Mobile_Network_Code
more : http://en.wikipedia.org/wiki/Mobile_Network_Code
Mobile Network Code
A Mobile Network Code (MNC) is used in combination with a Mobile Country Code (MCC) (also known as a "MCC / MNC tuple") to uniquely identify a mobile phone operator/carrier using the GSM/LTE, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks. The ITU-T Recommendation E.212 defines mobile country codes.
more : http://en.wikipedia.org/wiki/Mobile_Network_Code
more : http://en.wikipedia.org/wiki/Mobile_Network_Code
5/29/2012
Apache mod rewrite
RewriteRule ^old\.html$ new.html
Command Flag
[R] Redirect you can add an =301 or =302 to change the type.
[F] Forces the url to be forbidden. 403 header
[G] Forces the url to be gone 401 header
[L] Last rule. (You should use this on all your rules that don’t link together)
[N] Next round. Rerun the rules again from the start
[C] Chains a rewrite rule together with the next rule.
[T] use T=MIME-type to force the file to be a mime type
[NS] Use if no sub request is requested
[NC] Makes the rule case INsensitive
[QSA] Query String Append use to add to an existing query string
[NE] Turns of normal escapes that are default in the rewriterule
[PT] Pass through to the handler (together with mod alias)
Skip the next rule S=3 skips the next 3 rules
[E] E=var sets an enviromental variable that can be called by other rules
Command Flag
[R] Redirect you can add an =301 or =302 to change the type.
[F] Forces the url to be forbidden. 403 header
[G] Forces the url to be gone 401 header
[L] Last rule. (You should use this on all your rules that don’t link together)
[N] Next round. Rerun the rules again from the start
[C] Chains a rewrite rule together with the next rule.
[T] use T=MIME-type to force the file to be a mime type
[NS] Use if no sub request is requested
[NC] Makes the rule case INsensitive
[QSA] Query String Append use to add to an existing query string
[NE] Turns of normal escapes that are default in the rewriterule
[PT] Pass through to the handler (together with mod alias)
Skip the next rule S=3 skips the next 3 rules
[E] E=var sets an enviromental variable that can be called by other rules
tag:
Apache,
Mod rewrite
5/11/2012
Android : Debug certificate expire d on dd/mm/yyyy
Debug certificate expire d on dd/mm/yyyy
1. remove debug.keystore
2 project -> clean all
**** http://www.mobiledevguru.com/Article/tabid/66/articleType/ArticleView/articleId/37/-Error-generating-final-archive-Debug-certificate-expired-on-ddmmyyyy-.aspx
1. remove debug.keystore
2 project -> clean all
**** http://www.mobiledevguru.com/Article/tabid/66/articleType/ArticleView/articleId/37/-Error-generating-final-archive-Debug-certificate-expired-on-ddmmyyyy-.aspx
5/04/2012
HTML5 ROCKS:A NON-RESPONSIVE APPROACH TO BUILDING CROSS-DEVICE WEBAPPS
http://www.html5rocks.com/en/mobile/cross-device/
4/02/2012
Centurion : CMS Open source
Centurion is an open source application which is both a fully-functional CMS and a base/framework for building project-specific content management/admin systems.
Subscribe to:
Posts (Atom)