//Update: I prepared a simple Android app that features a Google Map with markers that form clusters together when zoomed out. Check it out: Simple Android Map Clustering on GitHub. This “dev note” of mine will give you a rough idea on how to add a Google Map to your Android up from an empty […]
programming
Laravel update from v.5.0.35 to v.5.2.32 hiccups and solutions
I tried to update Laravel 5 today and here were the steps I had to take. First checked my Laravel version before the update:
|
1 2 |
$ php artisan --version Laravel Framework version 5.0.35 |
Edited composer.json in my laravel’s root folder like such:
|
1 2 3 |
"require": { "laravel/framework": "5.2.*" } |
Run this on command line:
|
1 |
composer update |
You might need to delete root folder’s composer.lock file before the update can actually […]
Laravel 5: Create controller under new folder and routing
So here I am on a Sunday, trying to make progress with a personal Laravel 5 site I need to work on. As I bear with the noise outside in the street (some crazy neighbors set up a swimming pool IN THE STREET! :oops:), I’m trying to figure out how too create a new Laravel […]
Android Development: Permission denied when running ./gradlew in Mac
I’m using a Mac at the moment to work on my Android app projects. For some reason I need to run ./gradlew in the terminal, but I was getting this error: -bash: ./gradlew: Permission denied To fix this, what I did was run the following commands:
|
1 2 |
Mac-mini:projname moi$ chmod +x gradlew Mac-mini:projname moi$ ./gradlew |
After those commands, my Mac downloaded numerous files […]
Android Studio and the 64K methods limit (DEX error)
Hi! I’ll share a few tips with you on how to find out the number of methods that your Android app has. I’m gonna show you a few tools such as APK file methods counter, and an Android plugin that will show you the number of methods each imported class or dependency has. These will […]
CSS / JavaScript: Twitter Bootstrap center modal vertically on mobile web view
I’ve been working with modal boxes using Twitter Bootstrap. And the page I’m working on needs to be viewed in mobile devices. The modal looks nice and centered when viewed on desktop, but when run in mobile web browsers, it’s aligned to the top. Someone on StackOverflow suggested the use of a helper div plus […]
JavaScript: Get current function name
getCallingFunctionName() is the important function here.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function getCallingFunctionName() { var re = /function (.*?)\(/ var s = getFunctionName.caller.toString(); var m = re.exec( s ) return m[1]; } function myCurrentFunction(){ var func_name = getCallingFunctionName(); alert(func_name); //displays "myCurrentFunction" } myCurrentFunction(); |
Source: Can I get the name of the currently running function in JavaScript?
Android: Switch into another activity
To switch into another activity, the method we use is startActivity(). This is what starts another Android activity:
|
1 2 |
Intent i = new Intent(this, NameOfActivity.class); startActivity(i); |
Replace NameOfActivity with the name of any activity you’d like to switch into.
Android: Basic WebView Tutorial
A WebView lets you pull a web page and display it in your Android app. It doesn’t take long to implement an Android WebView. Read on. I’ll show you how. AndroidManifest.xml First, open your manifest file to add this permission for INTERNET:
|
1 |
<uses-permission android:name="android.permission.INTERNET" /> |
The web page won’t be loaded into your app without this permission. […]
PHP dynamic variable names tutorial
I think it’s very convenient for us developers, being able to name our variables dynamically. I’ll show you how to do it in PHP. 🙂 For example, we have variable $foo with “bar” as value like this:
|
1 2 |
<?php $foo = "bar"; |
If we want to create a variable named based on the “value” of variable $foo, this is […]