Add comment (0)
PHP and Facebook freelancer
transfer OpenX server to another host
OpenX is ads delivery server. If you want to transfer it from one host to another follow the steps bellow:
Read more...
Add comment (0)
Memcached on Windows (xammp)Install memcached as a service
Install memcache PECL lib
repair QIF format for NLB
I use NLB (Nova Ljubljanska Banka) and I wanted to import data to Quicken.
The problem was, that NLB only supports QIF or CVS export and Quicken only supports limited QIF import. When I looked more deeply I found out that the problem occurs because of the date format. NLB exports date as DD.MM.YYYY and Quicken expects date to be MM/DD/YYYY. This can easily be achieved with search and replace functionality built in almost every text editor. I use a free Notepadd++. Open qif file in your editor, go to search and choose Regular expression mode. You can find all occurrences of a date with expression D(.*)\.(.*)\.(.*) and replace it with expression D\2\\1\\3 Let me know if I helped ;) Facebook IFrame and Ajax require_login()
Another day another bug (or just weird behavior) in Facebook platform.
Read more...
When calling $facebook->require_login() from anywhere else then a canvas page it is caught in an endless loop. XFBML fb:serverFbml not rendering solution
If you want to use FBML within iFrame, you should use XFBML fb:serverFbml tag.
However the examples provided in documentation don't work. And I spent quite some time to figure it out. You should set the Connect URL to the same url as your Canvas Callback URL. btw. you can test your XFBML here. Zend_Log_Writer_Db - Customising table columns
Zend offers different logging possibilities. I won't present them all.
Read more...
But basics remain. By default there are timestamp, message, priority and priorityName entries. If you want to log your own entry you have to deal with event array. To add a custom field use setEventItem() method. ampersand (&) operator - used for assigning reference$object1 = new SomeClass();
Now I have objects of the same class but they are independent from each other. If I change propertyX of the $object1 propertyX of $object2 will stay unchanged. This is so called pass-by-value behavior that was default behavior in PHP 4. We could enforce pass-by-reference bahavior with use of ampersand operator &. In PHP 5 default behavior changed a bit (btw. thanks for correcting me Phil!). Objects in PHP 5 will be passed as references (this does not apply for variables).References in PHP are a means to access the same variable content by different names. Static methods and properties
I assume you know the difference between class and an object. If not, read this!
Read more...
A static method is basically the same as a non-static, but there is one difference: a static method is accessible without needing an instantiation of the class. Because you access a static element via a class and not an instance, you do not need variable that references an object. Instead you use the class name following :: To access a static method or property from within the same class you should use self keyword instead of pseudo variable $this. Class vs Object - the difference explainedClassA class is a code template used to generate objects. It is some sort of a blueprint that describes the object.In PHP a class name can be alphanumerical string that cannot begin with a number. Class code must be enclosed with braces and it consists of attributes and operations. Exampleclass Car {
ObjectAn object is data that is structured according to the template defined in a class. It is instance of a class.Example$myCar = new Car();In real world, you'll often find many individual objects all of the same kind. As an example, there may be thousands of other cars in existence, all of the same make and model even owned by the same person. Each car was built from the same blueprint. In object-oriented terms, we say that the car is an instance of the class of objects known as cars. Education kills creativity
Imagination is more important than knowledge is a famous quote by Albert Einstein. I've always agreed. One that has imagination can learn. But you can never learn imagination by traditional methods. Just the opposite! Traditional methods kill creativity and they kill imagination!
Yesterday I've stumbled upon a video of Sir Ken Robinson talking about this topic. He has some very good points. It's worth to have a look! Enjoy :) |
|
|
|
More Articles...
|
| Page 1 of 2 |