jymden.com


  • (PHP) simple picture/file upload script

    Here is a simple tutorial script that uploads a file to a folder on the server. In this example it is assumed that the file is an image and it will be outputted on screen in an img-tag. But the file uploading mechanics works for any file type. [php] <?php if(isset($_POST[‘submit’])) { $temp_name = $_FILES["file"]["tmp_name"];…

  • How to make OSX use MAMP php instead of system version

    Getting OSX to install Laravel properly is a minor nightmare. Here are some good instructions on how to get it to use MAMP php instead of the broken default one that comes with OSX. https://gist.github.com/irazasyed/5987693

  • (Android) Delay method call

    This is how you could delay a method call for a given amount of time. I’ve used this to have an alert dialog pop up a few second after starting an activity. This will fire myMethod() after 3000 miliseconds: [java] Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { myMethod(); }},…

  • (Android) Check if Google Play Store is installed on device

    Here’s a quick way to check if Google Play Store is installed. I use this to keep activities that use in-app billing from crashing on devices that doesn’t have Google Play Store. Works fine in the emulator as well. If the method returns false, I’ll just give the user an alert telling them they need…

  • (Android) Simple confirm dialog

    [java] private void confirmDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder .setMessage("Are you sure?") .setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { // Yes-code } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog,int id) { dialog.cancel(); } }) .show(); } [/java]

  • (Android) Fast Android emulator

    This Android emulator is fantastic www.genymotion.com

  • (Android) Tabbed activity with fragments tutorial

    Here is a really nice and clean tutorial for making an activity with tabs. http://www.androidhive.info/2013/10/android-tab-layout-with-swipeable-views-1/

  • CSS font stack

    Great site for pulling out css for webfonts: http://cssfontstack.com

  • YouTube Tutorials

    My all time favorite tutorial maker Derek Banas has an extensive catalogue of programming tutorials on his Youtube channel. I’ve used those a lot, especially in my studies. His series on design patterns are golden! I really like the tempo in them. Very hands-on and very organised. He has a bunch of videos that covers…