Category: Uncategorized

  • PHP: Get Current Domain Name

    PHP Quick Tip: I used this code when I was suddenly just got into a project and too lazy to meet and greet its configuration file to see how the current domain name was defined. I had to provide a link in a page but I don’t want it to be hard coded like this:…

  • Get DIV height in JavaScript

    [adinserter block=”34″] I’m going to show you how to get DIV height in JavaScript. I was in a situation when I have to animate a div by maintaining/grabbing/pausing its current height first but its height is not specified in the CSS and is dynamic. Anyway, this tutorial will focus on how to get the dynamic…

  • Paginating, Sorting and Displaying Data with CakePHP

    Updated last July 15, 2013: CakePHP 2.x Pagination Tutorial: Helper, Conditions, Limit, Sorting and More! Today I’m going to show you how easy it is for CakePHP to do pagination, sorting and displaying data from the database (I’m using MySQL). Pagination is useful if you have many rows of data, image if you have thousands…

  • CakePHP: Access Current Controller, Action and Parameters

    Hi guys, today I’m going to show you how to access or get CakePHP’s current page controller, action and parameters. I found this useful when high lighting certain elements of a page for example are tabs, sidebars, etc. that tells the user what part of the system or website they are currently in. For instance…

  • Ways to Fetch MySQL Query Result with PHP

    Note: This post only covers mysql_fetch functions and not PDO codes which are more updated. Hi guys, today we’re gonna take a look at the ways to fetch MySQL query results with PHP. I found 6 ways of doing it. I’m going to enumerate each one with its corresponding name, description, sample code, and output. I…

  • How To Get A Job In Tech

    How To Get A Job In Tech? Well, I currently have a job in the IT industry but not in these big and amazing  companies such as Google, Apple and Facebook. Honestly, I’ve been dreaming of getting a job at Google. Haha! I choose Google because I love their products such as GMail, Google Docs,…

  • Select All Records With Duplicates

    I wanted to select all records with duplicate session numbers (session_number) from my forms table so I’ll know if there are error of duplicate entries. I’m using MySQL Database. Select All Records With Duplicates Here’s a solution I found: SELECT session_numberFROM formsGROUP BY session_numberHAVING COUNT( session_number) > 1 Explanation: SELECT session_number-I’m just selecting session_number FROM…

  • Notepad++ Project Manager Plugin

    Hi guys! just another quick and simple post. I found this one very useful when I’m developing a website or web app in my localhost – Adding a project explorer/manager to my favorite editor Notepad++. I really love Notepad++ To achieve it: Go to Plugins Plugin Manager Show Plugin Manager Plugin Manager Will Load Available…

  • When Apple Called Google, an Icon Ambulance

    I thought Google and Apple are in conflict all of the time. I thought they hate each other so much because of Google Android and Apple iOS competition. But I was wrong. It is amazing for me to see that they treat each other as a friend. Vic Gundotra, the man behind Google Plus and…

  • Great Way to Upload, Resize and Crop an Image with PHP

    Hi guys! Today I want to share with you a great way (well, at least for me) to upload, resize and crop an Image with PHP. We’re gonna use a class here. I found this class really amazing and works well. This class is really easy and simple to implement. DOWNLOAD SOURCE CODE This is…