Playlist MyTV untuk smart TV berserta intisari rancangan bermula RM4.99 sebulan. Selanjutnya →

September 2014

session_regenerate_id() old data not copied to new session ID

11 Mei 2014, 1:36 am

Ahad, 11 Mei 2014, 1:36 am0 In PHP I’m using MySQL with Memcached backend for storing session information. Every few minutes I need to regenerate the session ID to prevent replay attack. However when using session_regenerate_id(true), sometimes session data from old ID are not copied to the new regenerated ID. Therefore everytime when the session […]

Using database in Windows Phone app

11 Mei 2014, 12:33 am

Ahad, 11 Mei 2014, 12:33 am0 Database in windows phone app is using LINQ to SQL, a .NET component that provide infrastructure for managing relational data as objects (reference). Creating and manipulating the database require a few steps from defining the data structure to querying the database For this example, we have a database named […]

Create event based component in C#

10 Mei 2014, 8:20 pm

Sabtu, 10 Mei 2014, 8:20 pm0 This post is about how to create event based component in C# for Windows Phone. Assuming that we have XAML class that interact with data model component, we’re using event to pass the data around. In model class, create delegate and event property. Delegate is property that define the […]

Method calling thread for Titanium module (Android)

8 Mei 2014, 11:49 pm

Khamis, 8 Mei 2014, 11:49 pm0 When creating method for a Titanium module in Android, using @Kroll.method annotation, this method will be invoked on KrollRuntimeThread. This is important to know if that method is accessing UI component, such as TextView or WebView, since all UI related components must be handled on main thread. @Kroll.method annotation […]

Merge XAML and code-behind file in Visual Studio

7 Mei 2014, 10:18 pm

Rabu, 7 Mei 2014, 10:18 pm0 When you’re importing Windows Phone view file (XAML + its class file) into a project, it’s shown in Visual Studio as separate files. Compared to when you’re creating a new view file, its class file (code-behind) is grouped behind the XAML file. To ‘merge’ these two files, you need […]

DataContractJsonSerializer missing assembly reference

7 Mei 2014, 10:05 pm

Rabu, 7 Mei 2014, 10:05 pm0 DataContractJsonSerializer class is declared under System.Runtime.Serialization assembly. Even when the assembly is already added to project reference, it’s still complaining about missing assembly. It’s actually included in System.Servicemodel.Web assembly. Include it to your Windows Phone project reference will solve the error. Mei 2014ShareTweetSaveSendCopy