Identify, study and solving the issues always is an enjoyment for me. As in my first print of the 3DBenchy that shown in the previous post - The Journey of Anet A8 Part 1 - Setup & Stock Printing, I knew my printer is not optimized.
This post records all my journey on the upgrades, mods, tuning I had done at my printer.
Saturday, December 29, 2018
Sunday, October 28, 2018
The Journey of Anet A8 Part 1 - Setup & Stock Printing
After 1 years of dragging, finally i brought a 3D printer. As the engineer, maker and beginner, I had chose a DIY and cheapest 3D printer I can get in market - Anet A8 which cost me USD 145/= together with 1 Kg of white PLA filament.
This post will record first month of my experience with Anet A8 start with setting up hardware to printing experience.
This post will record first month of my experience with Anet A8 start with setting up hardware to printing experience.
Thursday, April 12, 2018
mBlock 3 Arduino Extension for 2-Wheel Robot Car
This project is for 9 year old students to able to program this robot car. It uses mBlock (Scratch-based) with drag-and-drop programming.
We are introducing robotics and programming to 9 year old primary students with extreme budget constraint. With some research, we managed to come up with this solution. I will hereby share the material and idea behind this project.
mBlock 3 is built based on Scratch 2.0. Scratch is a programming tools for kids; it allows kids to program code by dragging and dropping the "blocks". mBlock enhances Scratch to allow it to talk to Arduino.
What I had done was build an extension for mBlock 3 with predefined parameters to allow the kids to instruct the robot car to move or play music.
Detailed instruction is included, click here for detail.
We are introducing robotics and programming to 9 year old primary students with extreme budget constraint. With some research, we managed to come up with this solution. I will hereby share the material and idea behind this project.
mBlock 3 is built based on Scratch 2.0. Scratch is a programming tools for kids; it allows kids to program code by dragging and dropping the "blocks". mBlock enhances Scratch to allow it to talk to Arduino.
What I had done was build an extension for mBlock 3 with predefined parameters to allow the kids to instruct the robot car to move or play music.
Detailed instruction is included, click here for detail.
Workspace Environment Monitor - enVMon
Ever care about the place you may spend one-third of a day? enVMon captures noise level, air quality, UV level, temperature and humidity.
This monitoring station will monitor the Ultra-Violet and sound level, temperature, humidity and air quality (CO2). All the above parameters are the common factors for a safe working environment.
The objective of this project is to place this monitoring station in the working environment and monitor it, compare the data and send notifications when the parameters reach the threshold.
Detail of the project is at here.
Monday, October 31, 2016
Susurri - The Secret Message Service
Tuesday, June 30, 2015
Tool for encode, decode and formatter for common use data
After long 4 years, finally get a technical oriented job again. No more manager but solution architect.
In this post I will share a web tool able to below task
Hereby is the link J.Dencoder
- Hex - Ascii Converter
- Base64 encoder and decoder
- BCD encoder and decoder
- ASN.1 Decoder
- XML Formatter
- JSON Formatter
- CSS Formatter
- SQL Formatter
Hereby is the link J.Dencoder
Wednesday, January 11, 2012
Password-less SSH Authentication Validation
Password-less SSH login is widely use inside a trusted network. System administrator will use this method to remotely execute some task specially in a batch scripting. However, this method sometime may failed in certain circumstances for example host name change, accidentally remove the public key or private key or run the script using different user.
So validation and alerting is very important on Password-less SSH Authentication. Hereby is the script to perform validation, it has been tested on RHEL and CentOS.
So validation and alerting is very important on Password-less SSH Authentication. Hereby is the script to perform validation, it has been tested on RHEL and CentOS.
Wednesday, December 14, 2011
Project Euler and Me
Thanks to Ailin and Adam that introduce me the Project Euler and now I am totally addicted with it. After 8 years not using C as my primary programming language, is time for me to pick it up and do something with C ideology - small footprint with great performance!Below is the question from Project Euler and the code I had written to solve it. Feel free to download them then make it better or give comment and suggestion on the solution. Programmer ROCKS!
Friday, December 9, 2011
FORM validation with jquery.ajax
When <FORM> validation meet the JQUERY.AJAX
Below are the basic <FORM> with validation before the form submitted.
1 <script>
2 function validateform() {
3 $.ajax({
4 type: "POST",
5 url: "/country/checkcountry",
6 data: "code="+countrycode+"&name="+countryname,
7 dataType: 'json',
8 success: function (data, status) {
9 if (data.result != 'OK') {
10 console.log('check ok');
11 return false
12 } else {
13 console.log('check not ok');
14 return true
15 }
16 },
17 error: function (data, status) {
18 console.log('check error')
19 return false
20 }
21 });
22 console.log('should never show');
23
24 return false; //For testing purpose, it should be return true
25 }
26 </script>
27
28 <FORM action="/country/addcountry" method="post" onsubmit="return validateform()">
29 ..........................
30 </FORM>
At the first glance, the java script seem logically fine. Actually, there are TWO major issue in that java script!
Below are the basic <FORM> with validation before the form submitted.
1 <script>
2 function validateform() {
3 $.ajax({
4 type: "POST",
5 url: "/country/checkcountry",
6 data: "code="+countrycode+"&name="+countryname,
7 dataType: 'json',
8 success: function (data, status) {
9 if (data.result != 'OK') {
10 console.log('check ok');
11 return false
12 } else {
13 console.log('check not ok');
14 return true
15 }
16 },
17 error: function (data, status) {
18 console.log('check error')
19 return false
20 }
21 });
22 console.log('should never show');
23
24 return false; //For testing purpose, it should be return true
25 }
26 </script>
27
28 <FORM action="/country/addcountry" method="post" onsubmit="return validateform()">
29 ..........................
30 </FORM>
At the first glance, the java script seem logically fine. Actually, there are TWO major issue in that java script!
Wednesday, December 7, 2011
Document.getElementById return null
The problem
Document.getElementById() - The most useful and common use features while developing in javascript. Some how this function call will failed unexpected without any javascript error. The most common error for this function is returning a NULL even we can 100% confirm the element with correct ID is there!
The catch
Come on, this is not a browser issue nor javascript issue. There are few possible that trigger this issue. Listed below is what I faced before, if you have more please share by replying a comment. TQ.
1. ID had been used more than once in a HTML page
Check is the ID the element has been used more than once in a HTML. The most easier way to debug is right click on the web browser and click VIEW SOURCE (CTRL U). From there use the find tool to search for the ID that document.getElementById() cannot found.
2. Nested <FORM>
document.getElementById() return null while trying to get a <FORM> element? Make sure that the <FORM> element you try to get is not under another <FORM> element! This error is usually happen while using PHP framework or template based framework.
Try to move the inner <FORM> element out from the parent form. For Symfony PHP framework, sometime this is hard to archive because we are good programmer that make our code modular enough to screw ourselves up :P . In this case, you can use the SLOT concept in Symfony to solve this problem.
You know something is not listed here, please reply a comment to share. TQ.
Document.getElementById() - The most useful and common use features while developing in javascript. Some how this function call will failed unexpected without any javascript error. The most common error for this function is returning a NULL even we can 100% confirm the element with correct ID is there!
The catch
Come on, this is not a browser issue nor javascript issue. There are few possible that trigger this issue. Listed below is what I faced before, if you have more please share by replying a comment. TQ.
1. ID had been used more than once in a HTML page
Check is the ID the element has been used more than once in a HTML. The most easier way to debug is right click on the web browser and click VIEW SOURCE (CTRL U). From there use the find tool to search for the ID that document.getElementById() cannot found.
2. Nested <FORM>
document.getElementById() return null while trying to get a <FORM> element? Make sure that the <FORM> element you try to get is not under another <FORM> element! This error is usually happen while using PHP framework or template based framework.
Try to move the inner <FORM> element out from the parent form. For Symfony PHP framework, sometime this is hard to archive because we are good programmer that make our code modular enough to screw ourselves up :P . In this case, you can use the SLOT concept in Symfony to solve this problem.
You know something is not listed here, please reply a comment to share. TQ.
Sunday, October 30, 2011
Thursday, October 27, 2011
Tuesday, October 11, 2011
Monday, October 10, 2011
Panes Freezer - The jquery plugin
About
When working with large table, it gets a bit frustrating, when you go to read the data in a distant row or column and the headings at the top of the page or down the side of the sheet disappear.If you are like me, you're never quite sure if you are looking in the right spot so you scroll back and forth trying to read first the heading and then the data, heading then the data, until you're almost sure you have it right.
To avoid this back and forth waste of time, use this jquery plugin. This plugin allows you to lock specific rows and columns so that they will always be visible on screen no matter how far you scroll to the right or down.
Idea of this plugin is no existing coding modification need to be done, just with additional <DIV> and call the plugin code shown below, that's all!
$('#mydiv_1_0').panesfreezer({
'headerrow': 1,
'headercolumn' : 1
});Demo
Supported browser
Below table show the supported browser for this plugin| No | Browser | Version | OS | Support |
|---|---|---|---|---|
| 1 | Google Chrome | 14.0.835.202 m | Windows 7 | Y |
| 2 | Firefox | 7.0 | Windows 7 | Y |
| 3 | Safari | 5.1 | Windows 7 | Y |
| 4 | Internet Explorer | 9 | n/a | n |
Links
jquery plugin page - http://plugins.jquery.com/project/panesfreezerGithub page - https://github.com/comcrazy/Panes-Freezer/
Author blog - http://comcrazy-devcenter.blogspot.com/ @ http://comcrazy.info/
Thursday, October 6, 2011
MySQL Schema and Index Optimization Example
Transaction logging is a essential activity for telco industry. These records are important to resolve customer dispute or technical support activity. This post will discuss about MySQL schema and index optimization on a table that store huge amount (20 Millions ++ per day in one table) of transaction record.
Thursday, September 8, 2011
Javascript Multi-Dimension Array to JSON Converter
The Problem
Lately ask by one of my programmer - How to pass a javascript multi-dimension array back to PHP? First thing strike in my mind, JSON.stringify! But after some quick reading and testing, found out that stringify does not support cyclic data structures.
Then brainstorming session begin. Why need to pass in multi-dimension array, why not this and why not that... And last, he just said "This is the way I want, can you make it happen or not?".
Thanks for his challenge, here by is the solution.
Lately ask by one of my programmer - How to pass a javascript multi-dimension array back to PHP? First thing strike in my mind, JSON.stringify! But after some quick reading and testing, found out that stringify does not support cyclic data structures.
Then brainstorming session begin. Why need to pass in multi-dimension array, why not this and why not that... And last, he just said "This is the way I want, can you make it happen or not?".
Thanks for his challenge, here by is the solution.
Thursday, August 18, 2011
Path Finding in PHP
Lately create a path finding algorithm example using PHP for my junior to refer. Hopefully this code will also benefit others who look for same solution.
Saturday, May 28, 2011
Symfony Admin Generator Framework Skeleton
Symfony is a very useful PHP framework, specially the admin generator features! Just define the database schema, run few command and without writing a single code (errr.... sort of) the basic CRUD (Create Read Update Delete) functionality is ready! In addition, table listing, search features (with filtering function) and batch action is there too! It's amazing and thanks to Symfony developer effort on this.
However, the output still lack of other essential features like
However, the output still lack of other essential features like
- Site header and site footer
- User authentication, user account, user permission and user group.
- Menu system
- and so on....
Friday, May 13, 2011
PHP Pear Mail Test Kit
Requested by the support team, I had build a PHP page that able to test the functionality of the PHP Pear Mail module.

The features included

The features included
- Validate installation of PEAR
- Validate installation of PEAR Mail module
- Support all send mail options that supported by PEAR Mail - mail, direct sendmail, SMTP.
- Enable or disable SMTP authentication.
- Full validation on user input
- ALL in a SINGLE file, easy to install.
Subscribe to:
Posts (Atom)

