Wednesday, December 16, 2015

Appengine jar files problem (appengine, java, eclipse)

After importing an appengine project into eclipse from git, you may run into some appengine jar problem.  some appengine jar files may not be included yet.

solution:
disable and re-enable "Use Google App Engine" (in project->properties).
This should re-add the jar files.

Friday, December 4, 2015

where to download objectify jar

Download it from maven central repository.
http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.googlecode.objectify%22

You may also need to include its dependency libraries, guava.

Obviously, we can directly include it by adding it to maven pom, but some projects may not run maven.  so we still need the jar file.

Objectify jar used to be available from google code (https://code.google.com/p/objectify-appengine/downloads/list), but google code has closed.

Tuesday, November 10, 2015

Put google appengine eclipse project on git

There are some sample .gitignore for eclipse project out there.  However, if you are doing a google appengine eclipse project, don't use those .gitignore.  The easiest thing is to include .classpath, .settings/, and .project in git for the appengine eclipse.   That way, when you import project, it will still work.  

However, your version of appengine jars may be different.  So you may want to change the jar files in war/WEB-INF/lib/



Wednesday, May 8, 2013

Bitcoin Mechanics


Here are a little bit of info about Bitcoin's inner workings.  

Note I am still a newbie in bitcoin.  I appreciate your help in correcting and editing it if you find any issue.


Transactions
All transactions in bitcoins are public.  This is how bitcoin system prevent someone from double-spending a coin as all transactions are public and viewable by everyone.  

One place to view the info of each these transaction is http://blockchain.info.

When you sends a bitcoin, you will sign the transaction with your private key.  Your public key is known to others, so others are able to verify that you are the sender using your public key.  Along with the transaction, you will also sign the transaction whereby you receive the bitcoin.  That way, your previous ownership of the coin can be verified so we know that you had the ownership of those coin you sent.


Proof of work

Proof-of-work is a task/work that require certain computation efforts, but is rather easy (computationally small effort) to check that the effort is made.  

Proof-of-work was proposed for stopping spam by requiring the sender to do a proof of work.  To most sender, the additional computational effort is not detrimental.  But to spammers who need to send millions or billions of email, the computational effort in every proof-of-work adds up quickly.  It becomes a deterrent to them.  

A proof-of-work may be taking a string, and finding an appending string that can be hashed into a hash with a certain number of proceeding 0s.  

Bitcoin uses proof-of-work in bitcoin mining.  The following explanation comes from Wikipedia.
"The mining process or proof-of-work process involves scanning for a value that when hashed with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required, but can always be verified by executing a single hash" (http://en.wikipedia.org/wiki/Bitcoin)


Blockchain

The new transactions has to be incorporated into bitcoin blockchains.  The mining node will take the transaction records, and find a "proof" (a string of numbers) that combined with the transaction records, will generate a hash with a certain number of proceeding 0s.  This will require a lot of tries and guesses to find that proof.  Once that is found, the miner can add a reward to it, where by they get reward for doing this work.  This is called bitcoin mining.

Friday, October 14, 2011

Maven Install on Mac


On Mac OS X 10.6, you will likely find maven already installed.


To check:
> mvn --version

> whereis mvn
/usr/bin/mvn

> ls -l /usr/bin/mvn
lrwxr-xr-x  1 root  wheel  24 Feb 26  2010 /usr/bin/mvn -> /usr/share/maven/bin/mvn

Most likely, your mvn is linked to /usr/share/maven/bin/mvn

> ls -l /usr/share/maven
lrwxr-xr-x  1 root  wheel  23 Oct 13 18:14 /usr/share/maven -> java/apache-maven-2.2.1


However, you may want to install a particular version of maven rather than the version 

Simply download maven at http://maven.apache.org/download.html
uncompress the file to get apache-maven-2.2.1 folder.  place that folder inside /usr/share/java/ folder.  

Remove the original /usr/share/maven link and link it to the new maven version. 
> sudo rm /usr/share/maven
> sudo ln -s /usr/share/java/apache-maven-2.2.1 /usr/share/maven

To check that things are done correctly:
> ls -l /usr/share/maven
> mvn --version

Thursday, July 21, 2011

Javafx 2.0

Javafx 2.0 beta is released.  GA is scheduled in Q3 2011.

The big change is they finally get rid of javafx script.  Javafx will now uses Java as its language.
This is a welcoming change.  Quoting Javafx PM in oracle: "most java developers want to use the same language to develop their UI".
Potentially, this enables developers to build web applications where frontend and backend use the same language. 

Monday, April 25, 2011

Android Tablets Prediction - Android Tablets to surpass iPad

Earlier last year, I predicted that Android will surpass iPhone in sales volume.  The prediction was proven correct.  
(http://nextgenapp.blogspot.com/2010/08/wow-android-prediction-update-my.html, http://nextgenapp.blogspot.com/2010/06/android-prediction.html)

Now, I want to put forward another prediction.  Android tablets will surpass iPad sales just like Android phones surpassed iphone sales.  It may take a year or two, but it will eventually happen.

The reason is simple.  The combined innovation of multiple players will eventually overtake one single company.  As long as Apple's iOS remains a closed system, the result will be inevitable.  The history will likely repeat itself.

When I gave the prediction last year about Android will surpass iPhone, I did not think it was a difficult prediction to make.  But many many people were very skeptical about that prediction.  With the Android's success, I have a higher confidence level about my prediction this time and I certainly think there will be less skepticism about my prediction this time around.  

Let's see how things play out.

Sunday, March 6, 2011

Installing AIR Runtime on Android emulator

You can find the Air Runtime.apk in Flex sdk, Flash Builder, or Flash CS5.
Then use Android's command line adb tool to install Runtime.apk.  Apk files are Android package files.

On Flash Builder Burrito, the emulator Runtime.apk is at:
/sdks/4.5.0/runtimes/air/android/Emulator/Runtime.apk

On a terminal, go to android sdk platform-tools folder
> cd /platform-tools
> ./adb -e install -r

eg.
> cd /Applications/android-sdk-mac_x86/platform-tools
> ./adb -e install -r "/Applications/Adobe Flash Builder Burrito/sdks/4.5.0/runtimes/air/android/Emulator/Runtime.apk"

After installation, you can go to emulator's settings-> applications -> android applications, you should see "Adobe AIR" as one of the application.

Done.

Saturday, December 11, 2010

Require Flash Builder 4 for Egit and MecurialEclipse yet?

I just tried install Egit and MecurialEclipse on Flex Builder 3, but looks like it is not compatible with Flex Builder 3.  I guess I'll have to upgrade to Flash Builder 4.
I believe Flex Builder 3 is based on Eclipse 3.2.

Wednesday, December 1, 2010

Thursday, August 5, 2010

Installing AIR SDK onto Flex SDK (Mac)

Here is a good instructions for installing AIR SDK onto your flex builder's Flex SDK for Mac.
http://radleymarx.com/2010/02/install-air-2-osx/  (by Radley Marx)

Monday, August 2, 2010

Wow! Android Prediction Update - My Prediction Comes True!

Wow, wow, wow!  My prediction about Android selling more phones than iPhone has come true, much sooner than I predicted.  I am wrong in how soon this will occur.  It happened this quarter already!  

According to Nielsen, 
"In terms of subscriptions over the past month, Android has surpassed iPhone in new users, with 27 percent of smartphone subscribers going with Android compared to the iPhone’s 23 percent. "
 
http://phandroid.com/2010/08/02/android-edges-past-iphone-in-smartphone-subscriptions/
http://www.androidguys.com/2010/08/02/nielson-android-outsells-iphone-handsets-q2/

Solution to "Problem using as3corelib and HTTService"

I encountered this error message in one of my AIR projects.

VerifyError: Error #1053: Illegal override of concurrency in mx.rpc.http.mxml.HTTPService.

It looks like the same error as the one described in:
http://forums.adobe.com/thread/681351?tstart=0

Steps to reproduce:
This occurs after I download as3corelib.swc 0.93 and put in my Flex project's libs folder.  Inside my app, there is an mx:HttpService.
It looks like some sdk incompatibility.

Solution:
Instead of putting downloaded as3corelib.swc into libs folder.  Copy and paste as3corelib source code into your own project.  You can download the source code by using svn from http://as3corelib.googlecode.com/svn/trunk/

For example, I only use JSON library.  So I just need to copy com.adobe.serialization.json folder to my project.

Android Prediction Update - AdMob predicts more Android than iPhone by end of this year

Admob's prediction is a lot more aggressive than my prediction.  They predict more Android users than iPhone users by end of 2010.
http://venturebeat.com/2010/07/12/mobilebeat-android-users-will-surpass-iphone-users-by-end-of-2010/

Android Prediction Update - rumor, Verizon to have iPhone next year

When I made a prediction, I did put in a condition.  If Apple do let other carriers to carry iPhone, it may change my prediction.

Android Prediction Update - 1.7m iPhone4 in 3 days, 3m iPhone4 in 3 weeks

Although news said that 1.7m iPhone4 sold in 3 days and 3m iPhone4 sold in 3 weeks, I still believe Android will eventually be able to outsell iPhone within a year, unless iPhone is open to other carriers.

Monday, July 12, 2010

Update on Android Prediction - 160000 Android Activations a day

A few day after my "Android Prediction" post, where I think that there will be at least one quarter where Android outsells iPhone (in one year), Google said there are 160000 Android activations a day.  More data point to support my prediction.  I couldn't ask for a better timing in that announcements.  :)

source:
http://techcrunch.com/2010/06/23/160000-android-phones-sold-per-day/

Thursday, June 24, 2010

Creating more secure swf app

This is a good article on creating more secure swf app
http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps.html

If your primary focus is on making the data secure in transit, then you should read the "encrypting data" section.  That is how I found this article.  I had a need to encrypt data in transit.
http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps_12.html

Hope it helps.

Saturday, June 19, 2010

Android Prediction

The tipping point of Android and iPhone is coming very soon.

When I say tipping point, I mean when Android will outsell iPhone (not the total devices in the market, but the number of devices sold in that quarter) in one quarter in US.  This tipping point should come very quickly barring Apple pulling something drastic (like opening up iPhone to carriers other than AT&T)

Since early 2009, I have believed that Android will eventually surpass iPhone.  That belief has not changed.

The combined innovation of multiple players will eventually overtake one single company.  As long as Apple's iPhone remain a closed system, the result will be inevitable.  The history will likely repeat itself.

Let's look at the PDA market in the past.  At the time that Palm has 90% market share, I believed that Windows Mobile (at the time called PocketPC) will eventually overtake Palm.  It may take a long while, and it did take several years.  But Microsoft eventually was able to overtake Palm in PDA area.

However, I cannot say that my belief at that time is correct, at that time, I based my belief on gut feeling alone.  However, looking back, it appears that several signs were already present at that time that partially foretell such outcome.

It seems that when a new thing is introduced to consumers, it must be very simple to use for it to catch on.  Palm was a master of that.  However, as time goes on, people demanded more choices, options, and functionalities.  aThat is where the combined industry ecosystem comes in that can overtake a single company.  In another word, smart phone market would have been as vibrant if it wasn't for Apple's iPhone.  iPhone is a superb devices to convert users to smart phone users, but it also opens the door for the users to accept other smart phones.  And that is where Android can excel eventually.

Wednesday, May 26, 2010

App stores - mobile, flash, and beyond

Here are some of the appstores.