Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Sunday, August 14, 2011

Scripting Languages: PHP, Perl, Python, Ruby

a side-by-side reference sheet
  1. arithmetic and logic
  2. strings 
  3. dates and time 
  4. arrays 
  5. dictionaries 
  6. functions 
  7. execution control 
  8. environment and i/o 
  9. libraries and modules 
  10. objects 
  11. reflection 
  12. web 
  13. java interop 
  14. history
 http://hyperpolyglot.org/scripting

Thursday, March 18, 2010

TraceWatch

[Screenshot]TraceWatch Real Time Web Stats and Traffic Analysis Lets you keep track of the visitors to your website in real time with detailed statistics and deep analysis using an innovative user interface for FREE and helps you make your website more effective. Can be easily installed on any website supporting PHP and MySQL. You only need to upload some files to your server.
http://www.tracewatch.com/

Tuesday, February 23, 2010

jQuery's getJSON

I recently had a struggle getting jQuery's $.getJSON function to work on Internet Explorer (IE6 & IE7). I tried and tried to debug the javascript, but was getting no where. After giving up for a while and coming back to it the next day, I thought of checking the target file—the file jQuery was fetching asynchronously—for problems.

It turns out that IE doesn't like JSON encoded documents that are specified as UTF-8. Not sure what the problem is, but the document has to be returned in a format IE likes. If not, IE will not allow jQuery to process it. Now, I had a header on this file that specified the content-type and charset. But, I changed it and instead I put only the content-type at the top of my JSON-returning PHP files:

header("Content-Type: application/json");

Why does IE balk at UTF-8 specified charsets for JSON-encoded responses?? Who knows. But, from the research I've done, specifying the charset in the HTTP header is not something that is required.

http://firelitdesign.blogspot.com/2009/07/jquerys-getjson.html

Sunday, September 13, 2009

Formaldehyde

PHP and Web Development are perfectly married but Ajax interactions have always been difficult to debug. Applications like Firebug are extremely useful to deploy, debug, and generally for Web Applications development. These kind of softwares are still running via browser but both JavaScript and PHP require hard test, being dynamic programming languages, as dynamic is an Ajax interaction. There are several ways to debug Ajax calls but honestly I have never found one able to be integrated without effort and easy to manage directly via JavaScript and/or Firebog or whatever console is there ... This is the reason I have created a single, well tested, widely compatible and fast Error Debugger, where all we need to do is to require_once this single file for each Ajax called page. Everything else will become so natural that you will ask yourself why on earth nobody created such simple solution before. Most advanced PHP frameworks integrate an error manager able to make deploy and debug easier. Unofrtunately, too often these frameworks are not that simple to configure or are not scalable enough, even if what we are trying to do is extremely simple. For these cases and every other, Formaldehyde could be integrated without effort, at all! To better understand how Formaldehyde will change our daily WTF during Ajax interactions, words cannot compete with code and images.

http://code.google.com/p/formaldehyde/
http://code.google.com/p/formaldehyde/wiki/FirePHP

Monday, August 17, 2009

"FAQ"-ing PHP vs Hi-Level languages

php > $a = array('a','b','c');
php > unset($a[1]);
php > var_dump($a);
array(2) {
[0]=>
string(1) "a"
[2]=>
string(1) "c"
}

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = ['a', 'b', 'c']
>>> a
['a', 'b', 'c']
>>> a.pop(1)
'b'
>>> a
['a', 'c']
>>> a[2]
Traceback (most recent call last):
File "", line 1, in
IndexError: list index out of range
>>> a[1]
'c'
>>> a[0]
'a'
>>>

Wednesday, January 14, 2009

dBug

Features
  1. PHP version of ColdFusion’s cfdump.
  2. Outputs colored and structured tabular variable information.
  3. Variable types supported are: Arrays, Classes/Objects, Database and XML Resources.
  4. Ability to force certain types of output. Example: You can force an object variable to be outputted as an array type variable.
  5. Stylesheet can be easily edited.
  6. Table cells can be expanded and collapsed.
How to use
  1. include_once("dBug.php");
  2. new dBug($myVariable);


http://dbug.ospinto.com/

Tuesday, January 13, 2009

pChart - a PHP class to build charts

pChart is a PHP class oriented framework designed to create aliased charts. Most of todays chart libraries have a cost, our project is intended to be free. Data can be retrieved from SQL queries, CSV files, or manually provided. This project is still under development and new features or fix are made every week.

Focus has been put on rendering quality introducing an aliasing algorithm to draw eye candy graphics. Rendering speed has been dramatically enhanced since the first version, we'll still continue optimising the code!



http://pchart.sourceforge.net/

Tuesday, December 2, 2008

PHP / Ruby-style Javascript

A lot of people are familiar with PHP's functions, and though Javascript functions are often quite similar, some functions may be missing or addressed differently. The Javascript implementations should be as compliant with the PHP versions as possible, a good indication is that the PHP function manual could also apply to the Javascript version.

Porting crucial PHP functions to Javascript can be fun & useful. Currently some PHP functions have been added, but readers are encouraged to contribute and improve functions by adding comments. Eventually the goal is to save all the functions in one php.js file and make it publicly available for your coding pleasure.

If you choose to contribute, let me know how you want to be credited in the function's comments. You may also want to subscribe to RSS so you receive updates whenever new functions are posted.

http://kevin.vanzonneveld.net/

JS.Class 2.0
JS.Class is a library designed to facilitate object-oriented development in JavaScript. It implements Ruby’s core object, module and class system and some of its metaprogramming facilities, giving you a powerful base to build well-structured OO programs.

http://jsclass.jcoglan.com/
http://www.randomhacks.net/articles/2007/07/01/ruby-metaprogramming-javascript-rspec-bdd