Skip to main content

Posts

Showing posts from December, 2004

RTaKeyman Bookmarklet v2.0

RTaKeyman The above bookmarklet is for English to Tamil transcription. This should work like a Input Method Editor on web page forms. The first version I tried didn't work well and so this bookmarklet version. Version 2.0 2004-12-27 1.0 2004-12-12 Usage Make a bookmarklet with the above link. Point to a web page where you want to enter Tamil characters and click the bookmarklet. This will initialize the keyman for that page. Then start typing on the forms; RTaKeyman will transcribe the characters whenever it sees a space, carriage return and tab. To-do Turning on/off keyman (i.e., to enter both Tamil and English). Help and other user interfaces. Credits Sundar for informing the necessity and for being a beta tester

Storing unicode texts in MySQL with phpMyAdmin

Today, I've received a personal mail/request from Sivanantham Hemamalini, working for IT leisure in Singapore. Since I was in company when received the mail, I couldn't answer immediately. If I understand the question right, it is about inputting Unicode texts especially Tamil in phpMyAdmin. PhpMyAdmin 's default characterset is iso-8859-1 and so if we enter anything in the form, browser will convert it into numerical html entities. Say for example, if we enter தமிà®´் and submit the form, it will convert it to & #2980;& #2990;& #3007;& #2996;& #3021; . Because of this browser's behavior, it will be difficult to store the Unicode text as it is. Solutions Immediate solution I could think of is changing or forcing the browser's character encoding into utf-8. In Mozilla Firefox, it can be set via View -> Character Encoding -> Unicode (UTF-8) Another elegant solution might be changing the phpMyAdmin configurations so that it send

NETELLER - Privacy and security design flaw

Yesterday, colleague of mine brought to my notice about a payment system called NETELLER and it's merchant API named NETELLER Direct API V4 . This NETELLER Direct API V4, helps the merchant to collect amount from users. It's simple--same just like early Authorize.net , along with the required amount you collect the user's id and password and post them to their API URL and they'll send you back with success or error codes in XML format. The major problem with these types of system is security and privacy --you lose both as you're forced to type your username and password in alien web page. If I remember right, this is was the case with Authorize.net and they changed their design to something like PayPal . The PayPal design is somewhat better as you never type or forced to type your username and password in other alien web pages. The alien merchant web page uses NETELLER Direct API V4 is forced to get user's NETELLER account and password. I'm much s

Google used PHP?

I wanted to know what are the pages in Google are powered by PHP . I have tried various keywords including "inurl"--but it produced huge list. So I tried "filetype:php" and it worked very nice. The real keywords are php filetype:php site:google.com Google used PHP?

Brainbench and PHP

Personally I never thought that Brainbench certification would help in career. In July 2004, Brainbench has announced free tests for certain duration and I'd just took PHP 4 examination. Surprisingly I scored only 4.53 --though the score is less than what I expected, I could get Master certification there! It was really a good experience. Recently, I'm very much surprised by the fact that many employers are contacting me by looking at my Brainbench transcript . Brainbench really rocks! Here is my semi Brainbench referral link , which may not work, but I'm interested to test it.

Interview question #3

I came out with another interview question to find out the candidate's visualizing power : The object is chessboard --you know it has black and white squares. How will you visualize the chessboard in terms of mathematical formula? How will you visualize/depict the same in PHP code?

Interview question #2

This is related to PHP's array . An array has number of elements. All elements are integers and unique, which means there is no repetitive integers. (e.g.) $foo = array(7, 5, 9, 13, 2, 8); You have to sort the array, provided: You should scan the elements only once. You're not allowed to compare the elements when sorting. (i.e., you're not supposed to use any comparison operators) Sorted resultant array may not be the source array. How will you do that?

htmlspecialchars() bug in blogger.com

Found a strange htmlspecialchars() bug in blogger.com The title of my blog is <?php echo 'R. Rajesh Jeba Anbiah'; ?> , but blogger.com doesn't convert the html entities in the title when it spits out. Because of this bug, the title doesn't appear in my blog--browser just treats it as a broken html tag. This bug could have been fixed by using htmlspecialchars() , if it's powered by PHP . Also, noticed that this compose box eats any texts entered such. I gonna report this bug.

Interview question #1

Since I have been asked to interview experienced PHP programmers, I was preparing few interview questions. I came to know, most of the people ask questions found in the Internet; most of them are like "What is the function used to connect MySQL DB in PHP". Personally, I don't like these types of questions; I'd thought the person must apply ideas what he was taught in colleges--finally I came out with one question: A product vendor has Quantity Vs. Price data like 1 -> Rs. 50 2 -> Rs. 95 3 -> Rs. 140 .... like upto 1 million data. He wants a system, which gives the price when the quantity is provided. For example, if you provide the quantity value as 2, then it should provide Rs. 95. How this system can be designed? As expected, all the people said about using database tables and quering on quantity. I have asked them to find out a system which doesn't use databases--provided the accuracy of the system may not be 100%--it may give at least 90% ac