PHP & More

A technical blog about programming in PHP and about technology in general: programming, workarounds and troubleshooting

How do you declare a static variable in a JavaScript function? Not with the word “static“. In JavaScript “function” is a variable type similar to “object“. The difference is that the reference to a function inside itself is not this but arguments.callee. An example of using arguments.callee is the following function that returns itself: function …

Continue reading

cURL is a tool used for browsing the web from the shell or command-line. It supports many internet protocols, such as HTTP, FTM, POP3, IMAP, SMTP and more. See the full list here. With libcurl installed in your system and the C API, you can browse using a C program. You can also install the …

Continue reading

You probably know the SWF file format. This is not just a movie, but also can be an interactive application. SWF files can be created with the Ming PHP extension. You can get information on how to install and use the extension here. The movie format can be extended with a special scripting language, named …

Continue reading

There are other languages in which you can write LibreOffice macros. One of them is Javascript. If you’ve installed the package “libreoffice-script-provider-js”, you can write Javascript macros. In Linux’ you can use apt-get or rpm to install it. Javascript macros can be edited from LibreOffice, and is ready to run without compilation. .In the Developer …

Continue reading

I think using a spreadsheet document for Sudoku and Kakuro puzzles is great because those documents contain cells where you can place your content: numeric value and text. As you probably know, Kakuro puzzles have squares split by diagonal lines into triangles. The cells split into triangles are not provided by the office suite and …

Continue reading