Tuesday, March 10, 2015

Running Apache Cordova (formerly Adobe PhoneGap) on Windows

To build cross platform mobile apps based on web apps, Apache Cordova (formerly Adobe PhoneGap) is handy. This is a basic guide, so expect naive suggestions.

You might want to use the cloud build service instead of following this steps.

Requirements (customized from http://phonegap.com/install/)
1) Launch   NodeJS installer from administrator command prompt (must for Win8)
2) Disable desktop.ini and thumbs.db  (otherwise builds will fail)
Disable creation of desktop.ini from windows registry
Disable Windows thumbs.db files from being created
3) Install Git, choose custom, install optional UNIX tools that replaces sort/find.


Instructions from step 4 assumes there is no proxy. For proxy, follow (adapted from)
npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://proxy:port_here
npm config set https-proxy http://proxy:port_here
npm --proxy http://proxy:port_here install -g packagename



4) Install ant from command line:
npm install -g ant
5) Install PhoneGap from command line:
npm install -g phonegap
6) Install Cordova from command line:
npm install -g cordova



If your proxy is 192.168.1.15 and port is 8080, it would look like
npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://192.168.1.15:8080
npm config set https-proxy http://192.168.1.15:8080
npm --proxy http://192.168.1.15:8080 install -g ant
npm --proxy http://192.168.1.15:8080 install -g phonegap
npm --proxy http://192.168.1.15:8080 install -g cordova




7) For Android development,
7.1) install JDK (choose 32/64 bit as appropriate)
7.2) ensure system PATH variable is set to find java inside bin directory and JAVA_HOME is set to the directory/folder above the java bin folder
7.3) install Android SDK or Studio (SDK+IDE) matching JDK 32/64 bit
Set ANDROID_HOME
https://spring.io/guides/gs/android/
http://stackoverflow.com/questions/26356359/error-android-home-is-not-set-and-android-command-not-in-your-path-you-must-ful




8)  In case this is your first time installation of app outside google play store, in your android phone,
Open "Settings" from the Apps screen or notification bar, and then choose "Security."
Scroll down to Device Administration, and then check the "Unknown Sources" option.

9) Read PhoneGap documentation and follow up to (including) Command line interface
Before each build, search in your project directory/folder and delete desktop.ini and thumbs.db in case they came while copying/pasting folders. You might have to enable showing hidden files.

Test in emulator:
c:\>   cordova emulate android
Test in device:
plugin android phone to a USB2.0 port in your PC
c:\>   cordova run android

10) If you share the files over email / link, tell them, when prompted, to choose "Package Installer" or "Verify and install" to launch setup. Both works. Then to Click open. Sometimes installation from email attachments fails, it might be a good idea to upload somewhere and share the download link.



Monday, May 17, 2010

List Currently Executing SQL Queries

http://sam.curren.ws/index.cfm/2007/8/4/Currently-Running-Queries-on-SQL-Server-2005
http://blog.sqlauthority.com/2009/01/07/sql-server-find-currently-running-query-t-sql/
http://snippets.dzone.com/posts/show/8429


Notes on status (runnable, running, suspended ...):
Mr. Ashish from scalabilityexperts.com told that SQL OS (?) manages tasks and resource allocation and switches among tasks (recall process scheduling, execution pool in OS)

Wednesday, November 29, 2006

SRM 328 Round 1

Last night, November 29, 2006, after I returned from BU, I was very tired and sleepy. After I had my dinner and came online, I found brother Fuad Hussain from BUACM (a part of BUCC). He was attending the same SRM that I intended to attend earlier, yesterday.

SRM is Single Round Module, a type of contest held at TopCoder, http://www.topcoder.com

I was glad that he recognised the first problem (250 points) as a Necklace problem well known from an older contest that we both attended individually at http://online-judge.uva.es/contest

Inspired by his attendance, I also competed and solved that problem.
Though this problem was different but, both solution had common initial part. I was happy that I solved it on 2nd try.

At BRAC University, I guess he is one of the most energetic ACM contestants among us (BUACM: BRAC University Computer Club - Programming Contest Wing).