Home
Blog
Marc Lester Tan
Categories
Android (25)
Arduino (8)
Others (4)
Coursera (2)
Personal (2)
Presentations (2)
Appengine (1)
Investing (1)
Ios (1)
Presentation (1)
Python (1)
Quadcopter (1)
Posts
158 posts
««
«
1
2
3
4
»
»»
Shortest Distance to a Character
Aug 23, 2019
One minute read
Here’s another tricky easy LC problem. ...
Kotlin
Leetcode
Matrix Cells in Distance Order
Aug 23, 2019
2 minutes read
To solve this easy LC problem, my initial idea was to use a TreeMap<Int, Pair<Int, Int>> to store the distance and its corresponding coordinate. TreeMap automatically sorts the keys during insertion so that will save us some time instead of sorting the keys ourselves. ...
Kotlin
Leetcode
Leaf Similar Trees
Aug 22, 2019
One minute read
This problem can be easily solved using recursive way. ...
Kotlin
Leetcode
First Bad Version
Aug 20, 2019
One minute read
This easy LC problem was asked in one of my past interviews (Facebook) which I think I didn’t really answered very well. ...
Kotlin
Leetcode
Maximum Depth of Binary Tree
Aug 20, 2019
One minute read
Another tree traversal easy LC problem. ...
Kotlin
Leetcode
Smallest Range I
Aug 20, 2019
One minute read
Here’s another short answer for an easy LC problem. ...
Kotlin
Leetcode
Reverse Words in a String III
Aug 19, 2019
One minute read
I solved this easy LC problem in less than 10 seconds :D ...
Kotlin
Leetcode
Middle of the Linked List
Aug 19, 2019
2 minutes read
My first solution for this easy LC problem involves traversing the whole linked list to find the total length. Then calculate the mid point and then use this to traverse the linked list again starting from root until mid point. ...
Kotlin
Leetcode
Increasing Order Search Tree
Aug 18, 2019
One minute read
Tree traversal problems are very common in LC and this easy-level LC problem looks difficult at first but once you find out the pattern, implementing the solution in recursive way is very easy. ...
Kotlin
Leetcode
Available Captures for Rook
Aug 17, 2019
2 minutes read
I tried to simplify the solution for this easy LC problem but I guess this could’ve been the simplest I can get to. Not a beautiful code but this’ll do for now. ...
Kotlin
Leetcode
Projection Area of 3D Shapes
Aug 17, 2019
One minute read
At first, the problem looks very difficult as it involves multi-dimensional array and projections but the graph in the example really gives out the clue about how to solve this problem. ...
Kotlin
Leetcode
Maximum Depth of N-Ary Tree
Aug 15, 2019
One minute read
Easy LC problem again but this time the problem doesn’t support Kotlin yet so my solution will be in Java. ...
Kotlin
Leetcode
Sort Array By Parity II
Aug 14, 2019
3 minutes read
Here’s another easy-level LC problem. My initial solution uses two pointers: One to keep track of the index of the next even number and another for odd number. ...
Kotlin
Leetcode
Merge K-Sorted Lists
Aug 14, 2019
One minute read
This is a Hard-level Leetcode problem although the solution looks very trivial to me. ...
Kotlin
Leetcode
Squares of Sorted Array
Aug 13, 2019
One minute read
I solved this problem in like, maybe 5 seconds haha. ...
Kotlin
Leetcode
Total Hamming Distance
Aug 13, 2019
2 minutes read
My initial solution to this medium leetcode problem uses Kernighan’s way to calculate the number of 1’s in a binary: ...
Kotlin
Leetcode
Height Checker
Aug 13, 2019
One minute read
I really liked the solution to this problem as the code is extremely short. Thanks to Kotlin’s built-in operators. ...
Kotlin
Leetcode
Defanging an IP Address
Aug 13, 2019
One minute read
Just take a look at how easy it is to solve this Easy-level Leetcode question using Kotlin: ...
Kotlin
Leetcode
Candy Dispenser
Jun 14, 2017
4 minutes read
At Google I/O 2017, people who completed the IoT Codelabs were given an awesome reward: A Pico Maker Kit for Android Things. It’s basically another hardware development platform just like Raspberry Pi and Intel Edison. ...
Hello Android Things
Jan 12, 2017
One minute read
...
Moving to Silicon Valley
Sep 18, 2015
One minute read
Whoah, it’s been a while since I last blogged and all I can say is, now that I’m starting a new life in California, I think I will try to push myself to post more personal stories and technical articles. ...
GDG GeorgeTown Devfest Slides
Nov 17, 2014
One minute read
Here are the slides for the Android Wear presentation that I presented in GDG GeorgeTown’s first ever Devfest + Gdays last November 15, 2014. ...
Android
Presentations
Reading Heart Rate Data from Samsung Gear Live
Jul 8, 2014
One minute read
Here’s a quick tutorial on how to get data from the heart rate sensor in your Samsung Gear Live watch. ...
Android
SAP Inside Track Singapore 2014
Jan 11, 2014
One minute read
Here are the slides for my talk @ SAP Inside Track Singapore 2014 entitled: Rapid Prototyping with Grails on HANA Cloud Platform. ...
Android
Presentations
Instagram Network Analysis
Dec 1, 2013
7 minutes read
Introduction Social networking has become one of the most important topics in recent times because of the several social networking sites that have now become part of our day-to-day living. There’s a huge amount of information that we can gather from analyzing these social network. ...
Coursera
Network Analysis
GDG Kota Kinabalu Devfest Talk
Nov 29, 2013
One minute read
I just want to share the slides that I’ve used during my talk in GDG Kota Kinabalu Devfest last November 16, 2013. My talk is all about Arduino and Android. In the presentation, I briefly discussed the overview of Arduino and presented simple demonstrations of using Google ADK. ...
Presentation
Android
GDG Devfest
Visualizing CrazyFlie Flight Data
Oct 19, 2013
5 minutes read
In this post, we are going to explore one of the smallest quadcopters that are available in the market: CrazyFlie and how we can use node.js, d3.js, socket.io and html5 to visualize the flight data. CrazyFlie is a nano quadcopter from Bitcraze, a swedish company, whose goal is to provide an open-source hardware design and firmware for developing small quadcopters. ...
Quadcopter
Android
Others
WallpaperManager and OutOfMemory
Oct 16, 2013
3 minutes read
While working on an app that sets the wallpaper in Android, I’ve encountered this weird issue with the WallpaperManager API. Initially I thought this will be a very easy and straighforward task because the WallpaperManager APIlooks simple. You just have to get an instance and call setStream() or setBitmap() depending on the type of your source. ...
Android
Social Network Analysis and Online Courses
Oct 9, 2013
3 minutes read
So it’s my first week in the Social Network Analysis and my 4th week in Programming in Scala by Martin Odersky which are both available as online courses in coursera. I’ve tried enrolling to several online courses before but I never finish a single one because of several factors: being so lazy to work on assignments, day job, personal projects. So hopefully, I can finish at least one of them :) ...
Social Network
Coursera
The DigiX Development Board
Jun 25, 2013
One minute read
It’s my first time to back a Kickstarter project and it felt really good to be part of a community that helps small/budding companies launch their products. I’ve seen so many awesome Kickstarter projects before but it always felt like they are too expensive for me or I don’t have any use for them. ...
Arduino
New Blog Title, new UI and Investments
Jun 19, 2013
One minute read
I’ve decided to change the blog title to something more ‘generic’ because I’m thinking of shifting the type of my posts to a mix of technical stuff and lighter topics such as personal stories and other non-technical stuff. I’ve also changed the color theme so something ‘light’ just to give it a new look. ...
Personal
Investing
Leap Motion and Android: A Match Made In Heaven
May 26, 2013
5 minutes read
Leap Motion is cool and so is Android so in this post, I’ll explain how to put them together to control a very simple fighter plane in 3D space. The example 3D application was taken from Rajawali’s example and you can take a look at its source code here. ...
Android
Leap Motion
Fix the missing R.java on ADT 22
May 23, 2013
0 minutes read
...
Android
Connecting Android to Arduino using Bluetooth
Jul 17, 2012
6 minutes read
There are multiple ways of how you can connect an Android device to an Arduino board. You can use wifi module, a usb cable or a bluetooth module. In this post, we will try to explore the connection between the two devices using bluetooth. ...
Android
Arduino
Geocoding and Accessing Google Doc using Python Script
May 16, 2012
2 minutes read
I have a list of around 1000+ churches that contains the name of the church, simple address, the residing priest and some contains mass schedules. I thought it will be nice if we can get the latitude and longitude based on the given address. The way I do it before is to manually search the address in Google Maps and get the latitude/location by centering the marker and executing the javascript below: ...
Python
Others
Heart Rate Monitor using Android and Arduino
May 2, 2012
2 minutes read
Last week I decided to buy some stuff from local reseller of Arduino. I bought a Kyto Heart Sensorthat transmits heart pulses to a receiver via radio frequency. The RF receiver can then be interfaced to an arduino and then pass the results to an Android device for visualization. ...
Android
Arduino
Fixing the ADK Library to work with Arduino 1.0
Apr 6, 2012
2 minutes read
If you’ll try to create a sketch using the Android ADK library on the latest version of Arduino (1.0 as of this writing), you will get several errors just like this: Damn it I accidentally deleted the images! This is because they renamed some header files and also changed the signature of some commonly used functions. ...
Android
Arduino
How to use a Tricolor LED and a Mini Buzzer
Apr 3, 2012
3 minutes read
...
Android
Arduino
Controlling a Micro-Servo
Mar 29, 2012
2 minutes read
...
Android
Arduino
Sensing Light Variations using LDR
Mar 26, 2012
2 minutes read
...
Android
Arduino
Getting Started with Android and Arduino
Mar 26, 2012
5 minutes read
Writing applications on Android is cool but writing applications on Android that can talk to the physical world is totally awesome. I recently bought a Seeduino ADK Board, which is actually a clone of an Arduino board that has support for the Android Accessory Development Kit. You can find more information about Seeduino here. ...
Android
Arduino
Pixel Playground using Renderscript Compute API
Feb 22, 2012
3 minutes read
...
Android
ListView Row Highlight
Feb 13, 2012
2 minutes read
Basically the idea behind this post is to show unobtrusive way of informing the user that something has changed in the data. When using ListView in Android and the backing data has changed, most of the time, I just call notifyDatasetChanged() and voila, ListView will automatically refresh the UI for me. But I noticed that this isn’t particularly good for the user as most of the time he has no idea that something has changed. ...
Android
Sharing Apps on Android via Bluetooth
Feb 12, 2012
3 minutes read
There are times when you just want to share a particular application on your phone to a friend and as developer, I encountered this problem several times when I want to let my friend try out an application on his/her phone. ...
Android
Phone Phreaking/Hacking
Dec 15, 2011
2 minutes read
I suddenly missed all the phone phreaking/hacking I’ve done back in 1999. It all started when someone introduced me to this group of teens calling themselves as “Liners”, most of the them are from Marikina and Pasig area. Basically these “liners” originated from cross-line party, a “bug” in the analog PSTN where multiple people can hear everyone simultaneously. ...
Others
Eircom SSID
Oct 11, 2011
One minute read
...
Others
Converting Bitmap to Grayscale
Aug 21, 2011
2 minutes read
I’m just going to share this simple snippet to convert your colored bitmap to grayscale. I’ve used this before because my application needs to communicate to a server which will just extract the image features using SURF. It doesn’t really need the color information so we decided that we can remove the color information so save up few kbps and eventually speed up the transfer. ...
Android
Android Development using Maven
Aug 21, 2011
2 minutes read
...
Android
Alphabet for Android Developers
Aug 21, 2011
One minute read
I just noticed that there are equivalent short URLs for Google’s android-related sites. I hope you’ll find this useful. ...
Android
Custom SeekBar Preference
Aug 17, 2011
One minute read
I just would like to share the code that I’ve posted in the Google Devs mailing list when someone asked about the SeekBar Preference. This allows you to popup a seekbar that you can use to adjust some properties like volume, difficulty and other things where a slider will be useful. ...
Android