DiscuzX 2.5 正式版伴随 2012 中国站长年会发布在今朝

DiscuzX 系列最新版本 DiscuzX 2.5 正式版已经发布,今天在北京国际会议中心也正举行已举办7年的中国站长年会。

DiscuzX 2.5 本次升级的新看头,从在论坛门户里增加了一些类社交元素,提供各大平台的手机客户端,类似苹果的应用中心商店,在线自动升级等等的亮点。背后技术也有大幅改动,整体性能,程序结构都有改进。

请到Discuz.net官方网站体验一下新版: http://www.discuz.net.

请到这里下载 DiscuzX2.5 源码: http://www.discuz.net/thread-2744369-1-1.html.

Micropolis an open source version of Simcity

Simcity is a city building simulation game developed by Electronic Arts, and Micropolis is an open source version of Simcity released under LGPv3 license.

Read this article written by the author Will Wright who developed Micropolis in 1992 when he worked in Simcity.

Micropolis is mainly written in Python/C++ at server side and Flash as the client side, it can play on any browsers.

Micropolis is on Facebook Application – http://apps.facebook.com/micropolisonline

View its source code – http://code.google.com/p/micropolis/

Adobe Photoshop Touch bring professional image combining on tablets

No more headache combining, editing for your images on your tablet.

Adobe Photoshop Touch bring professional imaging onto your tablet, you can editing image, apply professional effect by touch and share to your friends to Facebook or Adobe Creative Cloud right from your apps.

Learn more:

http://www.adobe.com/sea/products/photoshop-touch.html?trackingid=JRZCZ

Showcase on Socket IO for Web and Mobile

This is the showcase of Socket IO Library (written in Node JS) which brings the real time web sockets for the web and mobile.

I had created a video to showcase the features.

In the demo, the sample application is a stock application that have list of companies along with the data. The data will be changed every second and the changed data is reflected on web pages, iPhone Simulator, and my New ipad (Real device) in real time.

I had deployed the server side page at here: http://deep-moon-3881.herokuapp.com/, for you, you can open multiple browser window to see the changes of data. But the key here is the changing data can be broadcasted to native mobile apps instead of web HTML.

Walkaround for Titanium 1.8.x deploy apps on Xcode 4.3 and iOS 5.1

Xcode 4.3 and iOS 5.1 are released and believed that many developers had upgraded to that. However, Titanium 1.8.x still not officially support Xcode 4.3 and iOS 5.1.

By the way, this is the walk around for Titanium 1.8.x to deploy apps on Xcode 4.3 and iOS 5.1, learn more at http://developer.appcelerator.com/blog/2012/03/titanium-and-xcode-4-3-revisited.html

The detailed steps that I had gone through:

1) Make sure if you have Xcode 4.3.1 installed, and then, you may execute:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

For me, I switched to /Developer, where my Xcode installed there.

2) Kindly download ios-sim, and copy over to the Titanium SDK path as listed in the link.

(However it is not enough to work in my machine and need following steps)

3) Open Titanium Studio, do a full clean rebuild for your apps, do not care if your iOS SDK Version just showing 5.0, but not 5.1.

4) After that, open Xcode 4.3.1.
If your apps name is MyApps, you probably see MyApps, MyApps-iPad, MyApps-iPhone, MyApps-universal in your schemes. Kindly select MyApps and choose your proper device (ipad or iPhone).

5) Modify your Project Build Settings -> Architectures, make sure Debug / Release all use Standard (armv7), and select iOS 5.1.
For Targeted Device Family, if you want to deploy your apps on iPhone, then you choose just iPhone, or iPad, or both (iPhone/iPad).

The Step 3 – 5 worked on my machine. Now I successfully deploy my existing iOS Apps on my iPhone and new iPad that running iOS 5.1.

Note: Titanium Version 2 that will released in April was announced to support iOS 5.1.

Apache Mahout A Machine Learning Library

Apache Mahout which is a Java based machine learning library released under Apache License.

Currently Mahout supports mainly four use cases: Recommendation mining takes users’ behavior and from that tries to find items users might like. Clustering takes e.g. text documents and groups them into groups of topically related documents. Classification learns from exisiting categorized documents what documents of a specific category look like and is able to assign unlabelled documents to the (hopefully) correct category. Frequent itemset mining takes a set of item groups (terms in a query session, shopping cart content) and identifies, which individual items usually appear together.

Learn more at https://cwiki.apache.org/confluence/display/MAHOUT/Mahout+Wiki

Have a QuickStart at https://cwiki.apache.org/confluence/display/MAHOUT/Quickstart

Overview for Functional Programming

In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state.

In practice, the difference between mathematical functions and notion of a “function” used in imperative programming is that the imperative function can have side effect, it changes the program state. Means the same language expression can have different results over time, but functional programming is not, the data is immutable, unchangeable, the same language expression always lead to same result.

Functional programming promotes higher order function, that it is able to pass function as a parameter to other function.

In JavaScript,


var len = function(list) {
return list.length;
}
var sum = function(list) {
var total = 0;
for(var i = 0; i < list.length; i++) {
total += list[i];
}
return total;
};
var avg = function(list) {
var total = c(list, sum);
return total / c(list, len);
};
var c = function(list, m) {
return m(list);
};
var a = [1,2,3,4,5];
c(a, sum); // 15
c(a, avg); // 3

Many languages support Closures, the popular one is JavaScript, F#, Erlang, Scala (JVM Language). Java 7 is adding support declaration of Lambda function. Excitingly, PHP 5.3.0 started to support anonymous function now.

Before Java 7 is introduced, we also can declare anonymous classes (a class without assigning reference). From inside the method of anonymous classes to access the variable outside the scope of the anonymous class, the variable should declared as final. Means, the variable must be immutable, unchangeable, otherwise it caused side effect.


final int a = 0;
new SomeClass() {
void someMethod() {
System.out.println("a: " + a);
}
}

But sometimes we want to achieve some simple computation, we may just define an anonymous function passed as an argument to other function.

More Information

PHP 5.3.x
http://jburrows.wordpress.com/2011/06/24/the-state-of-functional-programming-in-php-5-3-x/

 

Near Field Communication

Near Field Communication (NFC) technology makes life easier and more convenient for consumers around the world by making it simpler to make transactions, exchange digital content, and connect electronic devices with a touch.

A standards-based connectivity technology, NFC harmonizes today’s diverse contactless technologies, enabling current and future solutions in areas such as:

  • Access control
  • Consumer electronics
  • Healthcare
  • Information collection and exchange
  • Loyalty and coupons
  • Payments
  • Transport

Near field communication (NFC) is a set of standards for smartphones and similar devices to establish radio communication with each other by touching them together or bringing them into close proximity, usually no more than a few centimetres. Present and anticipated applications include contactless transactions, data exchange, and simplified setup of more complex communications such as Wi-Fi. Communication is also possible between an NFC device and an unpowered NFC chip, called a “tag”.

Comparison between NFC and Bluetooth

NFC Bluetooth
Network Standard ISO 13157 etc. IEEE 802.15.1
Network Type Point to Point WPAN
Range < 0.2m < 10m
Frequency 13.56 MHz 2.4–2.5 GHz
Set-up time < 0.1 s < 6 s

There is a rumor saying that iPhone 5 is one of the several devices that will shipped with NFC-enabled smartphones and probably released in year 2012.

Android 4.0 the just released version includes new features called Android Beam that equips Android device with NFC communication.

Google Wallets is a mobile payment solution released by Google that uses NFC to complete the tedious mobile payment process just a single touch.

Services in cities and countries that employed NFC technology

Singapore Mobile payments:MasterCard, DBS Bank, StarHub, EZ-Link, Gemalto
Malaysia Maxis FastTap

 

More about NFC (http://www.nfc-forum.org/aboutnfc/)

Titanium Studio 1.0.8 Update greatly improve module packager process

With latest Titanium Studio 1.0.8 update and its latest SDK 1.8.1, it is now easier to create Titanium iOS module and packaged into Titanium mobile apps. I am able to code the iphone torch controller (flash light) in Objective-C and compiled into module and invoked from Titanium JavaScript API.

Just to remember to change the Apps Project release to use armv7 (standard).

Last three weeks I tried to do the same thing in older version of Titanium Studio but I failed to make it even I followed the completed steps for manually creating module skeleton templates using command utility tool.

The latest Titanium Studio 1.0.8 Update really improve module packager process.