QuickTip: Store Undefined and Null in Class/Table Rows on Parse.com

Update: Parse is shutting down. So you should start migrating.

Parse store undefined and null

I’ve been working on an Android app backed by Parse.com to make my development process faster and easier. So while coding the app I made a decision to have 2 classes (tables) called Conversations and User (exists by default). Conversations has a field called userId that should essentially store the objectId from User class. But some conversations are created by guest so for those records I decided to store NULL or “nothing” (undefined) under the userId column rather than Pointers which is what the column type is.

Continue reading “QuickTip: Store Undefined and Null in Class/Table Rows on Parse.com”

Quick Tip: Android Change Action Bar SearchView Hint (Placeholder) and Text Color

There are times when you’ll want to change the hint (placeholder) color and the text color of a SearchView widget. Here’s a small snippet that’ll allow us to do it:

Continue reading “Quick Tip: Android Change Action Bar SearchView Hint (Placeholder) and Text Color”

PHPExcel Set URL Font Styles (Color and Underline)

When creating excel files using PHPExcel, on setting a hyperlink the cell value’s styling is generally not affected. This happens on purpose to give us more control on how we want to format our content. Usually this is how we’d set a hyperlink:

Continue reading “PHPExcel Set URL Font Styles (Color and Underline)”

Fixing Laravel Basic Auth Failure

Today, as I deployed my Laravel application, I received an email from my client mentioning that the basic authentication wasn’t working on the production server. I tested promptly and indeed it wasn’t. This was really strange for me as locally all was well. I got stuck at the problem for quite sometime. Searching on Google made me realize that a lot of people have been facing the same conundrum. But finally as usual, I found out the solution not too late.

Continue reading “Fixing Laravel Basic Auth Failure”

Mac OS X Setting Up Initial Tools for a Web Developer

About an year ago I bought a Macbook Pro Retina and completely switched from Ubuntu (older PC) to Mac. In this guide (for starters) I’ll quickly show how to install and setup various important softwares and tools that are essential for web development like apache, php, mysql, ruby, python, node, redis, mongo, git, wget via Homebrew which is a package manager for OS X. It is similar to the Advanced Packaging Tool (APT) on Debian or Ubuntu.

Continue reading “Mac OS X Setting Up Initial Tools for a Web Developer”

Change Active State of Links in Sticky Navigation on Scroll

Based on the design decisions made by you on your website (or webapp), you might probably end up having a sticky navigation, one that keeps on showing up in the view port as you scroll up or down. In such a situation, it’s a common desire to have the links in the navigation bar be scrollbar-aware and change their active state as the user scrolls through the page. Let’s see how to do this.

Continue reading “Change Active State of Links in Sticky Navigation on Scroll”