Posts Under Interesting Category
What is xmlrpc.php?
It is a script which allows clients to make procedural calls over the net. As it says in the name, the encoding is XML and because it is used on websites we can make the fair assessment that it uses the HTTP protocol. If we break the name down we get: XML transmition via Remote Procedure Calls. So you are still not sure what this is all about? Read on…..
Ternary Operation
If you do not know what the Ternary operator is, or do not use it while you are coding, let me be the first to tell you how much you are missing out! The Ternary operator looks like this: “?“, that’s right, it’s a question mark! My favourite way of using it is to shorten Conditional If Statements, so let me show you what I’m on about. The long way:…
Test Your Password Strength
I came across this site today and it’s quite an interesting one as it works out the approximate time it would take a desktop pc to crack the password. Check it out here.
How to Hire a Hacker
I came across a very interesting and quite funny read, take a look here for How to Hire a Hacker: http://www.setec.org/hirehacker.html
Weird Pagination on a Google Page
Not sure how long this one will last, but for now: Go to: http://www.google.co.za/search?q=MFI/06/ASA-778658&hl=en&start=0&sa=N If you scroll to the bottom, there are 4 pages (pagination), press Next, now there are only 2, WEIRD HUH!
Turbo C++ in DosBox for Windows 64bit
I had to compile a C++ application under a DOS environment and was running Windows 7 64bit. Firstly, Turbo C++ is a 32 bit x86 application and therefore will not run when initialised from an x64 environment. This can easily be solved by installing the DOS Emulator called DosBox. One can then mount the Turbo C++ folder as a drive and install it under a subdirectory. e.g. mount c c:\PathToMyTurboCppDirectory\…
Actionscript2: Split string by line length with & without word-wrap
Split string into sentences by max line length. This uses a character array but doesn’t use word-wrapping. var personalMessage:String = "You got this far so we reckon that you could be curious enough to learn a little more, we’ll contact you shortly to answer any questions you may have."; _root.myArray = new Array(); _root.myArray = personalMessage.split(""); _root.mySentences = new Array(); var currentCharCount:Number = 0; var currentCharItem:Number = 0; var currentCharString:String…
Search and Replace Anchor Href using Javascript
I have a site that is under development and it was made really badly so I needed a quick way to replace all anchors on page to the relevant path. The problem is because it was a testsite that lived away from the public facing domain, the anchors had to be changed because they were all coded in as absolute paths. I included a JavascriptDebug file and put the following…
Set line leading / line spacing in flash actionscript 2
This is how to add text leading using Actionscript 2 for Flash. var txtFormat:TextFormat = new TextFormat(); txtFormat.leading = 5; // change this to whatever you need it to be ttt.setTextFormat(txtFormat); ttt2.setTextFormat(txtFormat);</span> There is also a GUI way of doing this: Select your textfield and and under the paragraph section, set the top/right hand icon (Line Spacing) to whatever you like.
MySQL Main Query Types used in PHP to select, insert, update and delete data
MySQL Main Query Types SELECT SELECT * FROM tablename INSERT INSERT INTO tablename (col1, col2, col3,..) VALUES (val1, val2, val3,…) UPDATE UPDATE tablename SET `col1`=`val1`, `col2`=`val2`, `col3`=`val3`,… DELETE DELETE FROM tablename WHERE `col4`=`val6` Note You will use a lot of WHERE clauses as well along with the above. e.g. SELECT * FROM tablename WHERE `id`=’15′ In PHP Calling to MySQL is really easy in PHP, just use the mysql_query() function….
Add a month to selectable date range – Date Chooser – Actionscript 2
I have been working on a project where I need to select a date range starting today and ending a month from now, so the user cannot select anything in the past or over a month from now. This is how I did it: There is an instance of DateChooser on the stage with Instance Name “calDate”. var todayDate:Date = new Date(); dateBeginDay = todayDate.getDate(); dateBeginMonth = todayDate.getMonth(); dateBeginYear =…