Monday, January 26, 2015

Weekend classes for Foundation of iPhone Programming (IOS101) and Foundation of Android Programming (AND101)

In March, there will be two weekend classes for:

IOS101 - Foundation of iPhone Programming
Course Fee
S$1097 (nett; no GST)
If your company is sponsoring you for the training, your company can enjoy 400% tax deductions/ allowances and/or 60% cash payout for investment in innovation and productivity improvements under the Productivity and Innovation Credit (PIC) scheme. For more details, check out the Productivity and Innovation Credit page. 
Schedules
Start DateEnd DateDetailsCategory
Wed Feb 25 2015Thu Feb 26 2015PDF
Mon Mar 09 2015Tue Mar 10 2015PDF
Sat Mar 28 2015 (WEEKEND CLASS)Sun Mar 29 2015PDF
Mon Apr 13 2015Tue Apr 14 2015PDF



AND101 - Foundation of Android Programming
Course Fee
S$1097 (nett; no GST)
If your company is sponsoring you for the training, your company can enjoy 400% tax deductions/ allowances and/or 60% cash payout for investment in innovation and productivity improvements under the Productivity and Innovation Credit (PIC) scheme. For more details, check out the Productivity and Innovation Credit page. 
Schedules
Start DateEnd DateDetailsCategory
Mon Jan 26 2015Tue Jan 27 2015PDF
Sat Mar 07 2015 (WEEKEND CLASS)Sun Mar 08 2015PDF
Mon Mar 16 2015 CONFIRMEDTue Mar 17 2015PDF
Wed Apr 01 2015Thu Apr 02 2015PDF



If you are working during the weekdays and don't have time to attend the usual courses, this is a good chance for you to learn during the weekends!
Venue
Bayview Hotel Singapore
30 Bencoolen Street
Singapore 189621  

If your company requires in-house training, you can contact us to customize the topics to meet your training requirements. We train worldwide! We have conducted customized classes in the United States, Norway, Denmark, Japan, China, Hong Kong, Taiwan, and Thailand. 
Trainer


Wei-Meng Lee is a technologist and founder of Developer Learning Solutions (http://www.learn2develop.net), a technology company specializing in hands-on training on the latest mobile technologies. Wei-Meng has many years of training experiences and his training courses place special emphasis on the learning-by-doing approach. His hands-on approach to learning programming makes understanding the subject much easier than reading books, tutorials, and documentations. His name regularly appears in online and print publications such as DevX.com, MobiForge.com, and CoDe Magazine. Contact Wei-Meng at weimenglee@learn2develop.net

Sunday, January 25, 2015

Article - Getting Started with the Apple WatchKit

Getting Started with the Apple WatchKit


Buzz keeps growing around the Apple Watch, scheduled for release in early 2015. Will your apps be ready? Grab Apple's new WatchKit (released November 18) and speed-read Wei-Meng Lee's instructions on using these new tools to gear up your programming as the time winds down to arrival of the Watch.
As promised, Apple announced the WatchKit on November 19, 2014 with the release of the Xcode 6.2 beta and the iOS 8.2 Software Development Kit (SDK). With this release of the WatchKit, developers will be able to build third-party apps that run on an Apple Watch (when the watch is released in early 2015). This release of the WatchKit requires each Apple Watch app to be tethered to its accompanying iPhone app running on the user’s iPhone. The ability to develop fully native Apple Watch apps is not available in this release; Apple expects it to be available sometime in 2015.
This article gets you started with Apple Watch programming. Here I’ll briefly discuss the different types of applications that you can create; in subsequent articles, I’ll go into detail on each type of application.
Want to learn more about Apple Watch Programming? Come and join us in this upcoming IOS302 -  Advanced iOS - Apple Watch Programming course:
Course Fee
S$1297 (nett; no GST)
If your company is sponsoring you for the training, your company can enjoy 400% tax deductions/ allowances and/or 60% cash payout for investment in innovation and productivity improvements under the Productivity and Innovation Credit (PIC) scheme. For more details, check out the Productivity and Innovation Credit page. 
Schedules
Start DateEnd DateDetailsCategory
Fri Jan 16 2015Fri Jan 16 2015PDF
Fri Feb 27 2015 CONFIRMEDFri Feb 27 2015PDF
Wed Mar 11 2015Wed Mar 11 2015PDF
Venue
Bayview Hotel Singapore
30 Bencoolen Street
Singapore 189621  

If your company requires in-house training, you can contact us to customize the topics to meet your training requirements. We train worldwide! We have conducted customized classes in the United States, Norway, Denmark, Japan, China, Hong Kong, Taiwan, and Thailand.

Friday, January 23, 2015

Swift Tip - Using format specifier

In Swift, if you want to apply a format specifier to a double or float value, you can use the String class's format:arguments: method, like this:

            var temperature = 1.235567
            var temperatureStr = String(format:"%.2f", temperature)
            // temperatureStr is now 1.24


Thursday, January 22, 2015

PHP Tip - Check if a date is a weekend

Given a particular day, month, and year, you want to check if this date is a weekend. You can do so via the following helper function:

    function isWeekend($day, $month, $year)
    {
        //---set time zone---
        date_default_timezone_set('Asia/Singapore');
$time = mktime(0, 0, 0, $month, $day, $year);
$day = date('w', $time);
return ($day == 0 || $day == 6);
    }
    


This use this function, simply pass it the day, month, and year:
    
    if (isWeekend(23,1,2015)) {
        echo "Yeah, weekend!";
    } else {
        echo "Nah, weekday";
    }

HRD101 - Getting Started with Raspberry Pi

If you have always been intrigued by the Raspberry Pi, this is your best chance to get your hands dirty and discover the cool projects you could do with this US$40
computer.

Among the various topics you will learn, you will also learn how to:
1. Build a surveillance system using a Webcam
2. Build a video streaming server
3. Build a Web server using Apache, PHP,  and MySQL
4. Build a RSS News Feed Reader using an external LCD screen

Course Fee
S$799 (nett; no GST)
If your company is sponsoring you for the training, your company can enjoy 400% tax deductions/ allowances and/or 60% cash payout for investment in innovation and productivity improvements under the Productivity and Innovation Credit (PIC) scheme. For more details, check out the Productivity and Innovation Credit page. 
Schedules
Start DateEnd DateDetailsCategory
Thu Mar 26 2015Thu Mar 26 2015PDF
Venue
Bayview Hotel Singapore
30 Bencoolen Street
Singapore 189621  

If your company requires in-house training, you can contact us to customize the topics to meet your training requirements. We train worldwide! We have conducted customized classes in the United States, Norway, Denmark, Japan, China, Hong Kong, Taiwan, and Thailand.

MySQL Tip - Sorting date represented as a string

Sometimes, when designing your database table, you may use a string format to represent a date. For example, to represent Nov 5, 2014, you might use the format DD/MM/YYYY, resulting it to be stored as 05/11/2014.

However, when retrieving multiple rows contain dates, this might pose a problem when it comes to sorting the items based on dates.

To resolve this, convert the date string to datetime value using the MySQL STR_TO_DATE() function, together with the format string representing the date. The following statement allows you to sort the date correctly:

SELECT * FROM TABLE ORDER BY STR_TO_DATE(STARTDATE, '%d/%m/%Y')";

Tuesday, January 20, 2015

PHP Tip - Getting location of visitor

Very often, you want to know the location of your web site visitor's, such as country, region, and other location information. You can do so via passing the IP address of the user to this free site: http://www.geoplugin.net/json.gp. It will then return you a JSON string containing detailed location information pertaining to the specified IP address.

To use this site in PHP, you can create a function, like the following:

function getLocationUsingIP($ip) {        
    $result = @json_decode(file_get_contents(
        "http://www.geoplugin.net/json.gp?ip=" . $ip));
    if($result && $result->geoplugin_countryName != null)
    {
        $location['region'] = $result->geoplugin_region;
        $location['city'] = $result->geoplugin_city;
        $location['country'] = $result->geoplugin_countryCode;
        $location['latitute'] = $result->geoplugin_latitude;
        $location['longitude'] = $result->geoplugin_longitude;
    }
    return $location;
}    

To call it, call the function by passing the IP address of the user (obtainable via $_SERVER[REMOTE_ADDR]):

    $location = getLocationUsingIP($_SERVER[REMOTE_ADDR]);    
    echo $location['region'] . "<br/>";
    echo $location['city'] . "<br/>";
    echo $location['country'] . "<br/>";
    echo $location['latitute'] . "<br/>";
    echo $location['longitude'] . "<br/>";

To learn more about PHP and MySQL programming, enrol in the WEB103 - Web Development using PHP and MySQL course (2-days).
Course Fee
S$1097 (nett; no GST)
If your company is sponsoring you for the training, your company can enjoy 400% tax deductions/ allowances and/or 60% cash payout for investment in innovation and productivity improvements under the Productivity and Innovation Credit (PIC) scheme. For more details, check out the Productivity and Innovation Credit page. 
Schedules
Start DateEnd DateDetailsCategory
Tue Feb 03 2015Wed Feb 04 2015PDF
Thu Mar 05 2015Fri Mar 06 2015PDF
Mon Apr 06 2015Tue Apr 07 2015PDF
Venue
Bayview Hotel Singapore
30 Bencoolen Street
Singapore 189621  

If your company requires in-house training, you can contact us to customize the topics to meet your training requirements. We train worldwide! We have conducted customized classes in the United States, Norway, Denmark, Japan, China, Hong Kong, Taiwan, and Thailand.

IOS305 - Developing Secure iOS Applications

In this new course - IOS305 - Developing Secure iOS Applications, you will learn how to develop safe and secure iOS apps. You will learn:

* How to save user's credentials using the iOS KeyChain
* How to save the KeyChain data on iCloud so that user can access the same secured information on multiple devices
* How to securely save user's confidential data using symmetric and asymmetric encryption and encryption.
* How to consume a secure REST API service
* How to use Touch ID on the iPhone and iPad to authenticate users
* How to build secure user interfaces so that user's private information are protected
Course Fee
S$799 (nett; no GST)
If your company is sponsoring you for the training, your company can enjoy 400% tax deductions/ allowances and/or 60% cash payout for investment in innovation and productivity improvements under the Productivity and Innovation Credit (PIC) scheme. For more details, check out the Productivity and Innovation Credit page. 
Schedules
Start DateEnd DateDetailsCategory
Fri Feb 06 2015Fri Feb 06 2015PDF
Wed Apr 15 2015Wed Apr 15 2015PDF
Venue
Bayview Hotel Singapore
30 Bencoolen Street
Singapore 189621  

If your company requires in-house training, you can contact us to customize the topics to meet your training requirements. We train worldwide! We have conducted customized classes in the United States, Norway, Denmark, Japan, China, Hong Kong, Taiwan, and Thailand.

Monday, January 19, 2015

Android Tip - Connecting to a Wireless Network Programmatically

If you want to programmatically set your Android device to connect to a particular wireless network, you can use the WifiConfiguration and WifiManager classes:

        EditText txtNetworkName = (EditText) 
            findViewById(R.id.txtNetworkName);
        EditText txtPassword = (EditText) 
            findViewById(R.id.txtPassword);

        WifiConfiguration wifiConfiguration = new 
            WifiConfiguration();
        wifiConfiguration.SSID = String.format("\"%s\"", 
            txtNetworkName.getText().toString());
        wifiConfiguration.preSharedKey = String.format("\"%s\"", 
            txtPassword.getText().toString());

        WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
        int netId = wifiManager.addNetwork(wifiConfiguration);

        if (wifiManager.isWifiEnabled()) { //---wifi is turned on---
            //---disconnect it first---
            wifiManager.disconnect();
        } else { //---wifi is turned off---
            //---turn on wifi---
            wifiManager.setWifiEnabled(true);
        }
        wifiManager.enableNetwork(netId, true);
        wifiManager.reconnect();

The above code snippet connects to a WPA-secured wireless network. It first checks if WiFi is enabled, turn if on if it is not, and then connects to the specified network.

To do the above, you need the following permissions in your AndroidManifest.xml file:

    <!--you need this to check if wifi is enabled-->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <!--you need this to use wifi to connect to a network-->
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

AND302 - Developing NFC Apps

NFC (Near Field Communication) is one of the most under-used features of Android. Despite its usefulness, a lot of users are unaware of the power of NFC and how to use it to enhance the user experience. In this case, you will learn what NFC is, how to create apps that reads and writes information to tags, and how to automate your daily tasks using NFC. In addition, you will also learn ho
w to exchange data between Android devices using Android Beam.
Course Fee
S$699 (nett; no GST)
If your company is sponsoring you for the training, your company can enjoy 400% tax deductions/ allowances and/or 60% cash payout for investment in innovation and productivity improvements under the Productivity and Innovation Credit (PIC) scheme. For more details, check out the Productivity and Innovation Credit page. 
Schedules
Start DateEnd DateDetailsCategory
Fri Jan 09 2015Fri Jan 09 2015PDF
Mon Feb 23 2015Mon Feb 23 2015PDF
Thu Apr 09 2015Thu Apr 09 2015PDF
Venue
Bayview Hotel Singapore
30 Bencoolen Street
Singapore 189621