Titan Fusion

Alexandar Tzanov's Personal Blog

Tag: development

  • Source Code DNA, a repository/library for code snippets in JS, PHP, Perl, C/C++ and Objective-C

    I have started a new section on Titan Fusion, specifically for programming. I have named it Source Code DNA. I am going to use it just as library/repository for various snippets of code, e.g. classes, functions, small scripts. At this time I am going to limit the content to the following languages: JavaScript, HTML5, CSS3, […]

  • How to use array element references inside query strings? [PHP]

    Using braces “{ }”, i.e. curly parentheses, will make your life very easy. The braces will allow you to use complex variable expressions inside strings. This is called complex (curly) syntax. In other words you are encapsulating your variable call structure so it is parsed by PHP before continuing with the string. If you are working with an array or nested arrays and you want to insert the array element values into a database, or use within a sting, you will have to define new dedicated variables, to which you will assign the value of the array element. Or you will have to utilize addition string concatenation. Both ways make your code longer and harder to read.

  • How to automatically redirect between HTTP and HTTPS [PHP]

    Using HTTPS allows for secure and encrypted communication between your web site and the visitor’s browser. Sometimes the transition doesn’t happen automatically so we need to enforce that secure communication between the server and the client, e.g. when using a shopping cart. One way to automatically switch from HTTP to HTTPS, using php, is a quick check of the HTTP indice in the $_SERVER array.

  • The iOS Design Cheat Sheet V2

    The iOS Design Cheat Sheet V2 by Ivo Mynttinen is an excellent reference tool if you are an iOS developer. Ivo has organized display sizes and resolutions, as well as some other hardware data, for each device into nice, easy to follow data tables.

  • How To Split a Phone Number [PERL]

    Phone numbers, as we know, are most commonly made of three elements (area code) prefix-number. If your program or a script has to process phone numbers some times it is useful to separate the three elements and store them in separate variables. Below I will show you how you can achieve this in Perl using the build-in substr function.

  • -(MP)- site progress.

    The news database is up and running. …

  • -(MP)- site back on-line.

    The -(MP)- site is back up and running.