There are times when I keep running git status or git branch to check which branch I’m on and I just found that I could do something to show the name of my current Git branch on my Terminal prompt, thanks to a colleague. In the following screenshot I’m working in the directory “sample_app”, on […]
Technology
Setup/update Ruby on OS X El Capitan 10.11.5
I need to learn Ruby on Rails for my new job. I’m a little thrilled about this chance to learn a new language, and I’m trying to get started with it on my Macbook which runs OS X El Capitan 10.11.5. I already have Ruby here, I don’t remember if pre-installed though. It’s out of […]
Manila homemade cakes, cupcakes, cookies, brownies & more desserts at The Tiny Cakery
Update: We have rebranded into Catzie’s Cakery. When I’m not busy tapping codes on my keyboard, I either watch anime or bake. And there’s this “tiny” baking business in Manila I’m running, and really have a good time baking for people – friends, family, and even people I haven’t met prior to handing over their […]
Simple SMS Reader app in Android using BroadcastReceiver class
Before I began coding Android apps, I was amazed how verification processes go like this: The Android app tells you they’ll send you an SMS containing verification code, and that you need to enter such code into a text field on the Android app. But when you receive the SMS, the verification code appears on […]
Mac OS: How to batch edit file extension via Terminal
Today I had a directory of images whose file name extensions are .jpeg. I need them as .jpg but I didn’t want to rename them one by one. Here’s how we can change the file extensions in a directory by batch. And by the way, I am on Mac OS El Capitan version 10.11.5 with […]
Installing Laravel 5 on Apache in Mac OS X El Capitan
Last time, I wrote a guide on How to install Laravel 5 in Windows with XAMPP. I’ve been coding more often on Mac computers recently, and now I need to setup Laravel on a MacBook Pro, so I decided I’ll write a guide on how to install Laravel 5 on Mac OS X El Capitan […]
Add “options menu” to an AppCompatActivity (Android App Development)
Adding an “options menu” to an Android app’s Activity is quite simple. This is an example of what an Android options menu looks like. Look at the icon that looks like 3 dots vertically stacked. My dev environment status as of writing this Android Studio version: v. 2.1 OS: Mac OS X El Capitan v. […]
How to disable auto-renewal of Sun Cellular MB99 or MB250 mobile Internet subscriptions
Turn off auto-renewal of Sun Cellular mobile Internet subscriptions: Sun Cellular auto-renewed my MB99 and MB250 on my postpaid account, to my surprise. I also couldn’t turn it off. Right now I’m still waiting for feedback from Sun Cellular’s support team. Here’s what you can try though: Text “DATA OFF” to 9999 or Text “MB99 […]
Java: method to convert degrees into directions (16-wind compass rose)
I’m working on a weather app for Android. The data for wind direction that I get from the weather API is in form of degrees (0 to 360). I want to display wind direction in a user-friendly format such as N (North), NNE (North-northeast), NE (Northeast), ENE (East-Northeast), E (East), ESE (East-Southeast), SE (Southeast), SSE […]
Android app development: click a ListView item programmatically
I’m going to share a code snippet that you may use to programmatically click a ListView item in your Android app. This will not simply highlight the desired ListView item, but also trigger the onItemClick listener. This code is what I placed in a Fragment’s onLoadFinished() method:
|
1 2 |
int default_position = 2; listView.performItemClick(listView.getChildAt(default_position), default_position, listView.getItemIdAtPosition(default_position)); |
Simply replace the default_position value with the […]