Monday, July 21, 2014

Cordova on android is case sensitive for file/directory names!

I was playing on VS cordova development, and everything working on the Ripple plugin with chrome.  But deploy the app to the android has some wierd errors.

One of the HTML page doesn't load, claiming something like "Application Error
network error. (file:///android_asset/www/tutorial.html)".  It take me a long time to figure out what the problem is.  The file I'm referencing has a capital letter, where inside HTML, I'm referecing it as lowercase. This will pass the ripple emulator, but will fail on Android.  And I've to make sure I change both VS file name and the file name on the file system to make them match.

Similarily, the directory names, and all other referencing css/js file names are case sensitive.

I wish that VS editor understands it, and can some how warn me..




Sunday, May 4, 2014

我父母对吃秋葵治疗高血糖的一些感受


晚上取少量秋葵,约每人两根像小拇指大小的,或每人一根像中指大小的,洗净,切成片,放入约300ml的杯中。烧一壶开水,倒入杯中。用开水是因为可以给秋葵消毒,用以杀死细菌。将含开始泡制的秋葵的杯子放置一晚。第二天早晨起床后,吃早饭前,将杯中的水全部喝下,特别是要把泡出来的粘液全部喝下去。为了把粘液喝干净,喝完后可以加点水,搅动一下继续喝。剩下的秋葵不要浪费,可以和其它菜一起烹饪。
我们按此方法吃进行试验,大概3周就有很好的效果。空腹血糖一人从120-130 6.7-7.2)降到1055.8)左右,一人从1055.8)左右降到854.7)左右。停服一段时间之后,血糖会渐渐回升,可以重新按上述方法服用,保持血糖值正常。

据有的文章介绍,秋葵的粘液可以阻止或减少血糖的吸收,这大概就是秋葵降血糖的原因,所以,在饭前服用效果才好。

Saturday, December 15, 2012

My personal view: solutions for American's Gun Control

As Gun related tragety keep happening in U.S., the U.S. government is on another try to control the American guns.  Though I doubt their will be much progress this time either.

From my point of view, it's not this or that.  People have the right to have guns, though they also have the duty to not harm innocent people.

I have a few possible solutions.

First one: let people to decide who can have guns and who should not have guns.  Community based organization, with voting each year, should have control of the power in a community.

1. Each community center should  form a Gun Under Control Society, with by-laws that is voted by the society.
2. To buy a gun and own guns, people must apply for licenses from Gun Under Control Society
3. Each year, the Gun Under Control Society should renew license to the gun owners, based on the society's own by-law.
4. Make it illegal to have guns without licenses

Second one: Learn from auto insurance industry.  Allow the auto insurance companies to also have the gun insurance.  Treat guns as cars, require license, yearly renewal.  And the insurance is to pay off to people who get hurt by guns.  I'm sure the auto insurance industry will come up with efficient ways to evaluate people, to see if they are responsible enough for getting guns.

Looks like my 2nd solution would be the best one.  Spread the word, and let's act on it.

Xinyang Qiu




Saturday, November 5, 2011

How to create a asp.net virtual application with SQL CE 4.0 in GoDaddy shared hosting account

 

I tried to create a simple asp.net WCF site using SQL CE 4.0 on my GoDaddy shared hosting account today.  I need to do the following in order to deploy the application successfully.  I’m using Visual Studio 2010 Ultimate.

1. In my WCF application, right click and choose “Add Deployable Dependencies” context menu, select “SQL Server Compact” and choose OK.  This will copy all the assemblies that I need to the bin directory

image

 

2. I use the Visual Studio build in publish feature to do the publish, something like following:

image

3. I chose IIS with Fx 4.0 in GoDaddy account.  I deployed my WCF application to a sub directory, which I need to convert to “Virtual Application” by using GoDaddy’s IiS Manager, like following:

image

4. I also need to give the App_Data directory writable permission for application in FTP File Manager

image

Finally, my application works.  I didn’t realize this is so hard.  I wish GoDaddy supports web deploy technology, which Visual Studio will be able to deploy much easier.

Have fun.