30 June 2013

Mac(10.8.4) could not login qnap(3.8.0 or later) NAS via AFP

This weekend, I realize that I could not access my photo library via AFP. My Qnap was version 3.8.2. I did try to update firmware to latest version 4.0.1. but the problem remains. at end, I restore firmware 3.7.3. finally the problem been solved. it was difficult to find out where it is problem. I had try a lot of different settings on mac. it turn out the NAS has problem.



--
Xiaoyu Guan (Sam)
http://goo.gl/TpmBs

21 September 2012

postgis convert geometrycollection to linestring or point

SELECT ST_AsEWKT(the_geom)
FROM
(SELECT ST_Locate_Between_Measures(
ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
(1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo;
st_asewkt
-----------------------------------------------------------------
GEOMETRYCOLLECTIONM(LINESTRING(1 2 3,3 4 2,9 4 3),POINT(1 2 3))
--Geometry collections are difficult animals so dump them
--to make them more digestable
SELECT ST_AsEWKT((ST_Dump(the_geom)).geom)
FROM
(SELECT ST_Locate_Between_Measures(
ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
(1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo;
st_asewkt
--------------------------------
LINESTRINGM(1 2 3,3 4 2,9 4 3)
POINTM(1 2 3)

This is example script from postgis manual. 
after you dump geometrycollection, you can select linestring .



--
Xiaoyu Guan (Sam)
http://goo.gl/TpmBs

21 October 2011

why I like iphone instead of android phone?

because android project is actually very close project. Not real open source project.
e.g. google does not release android 3 source code.
and I got another source from http://www.visionmobile.com/blog/2011/07/the-open-governance-index-measuring-openness-from-android-to-webkit/
it is the most 'close' openness project...

OpenSource is not just a label. but for google it is for marketing.
--
Xiaoyu Guan (Sam)
http://goo.gl/TpmBs

16 August 2011

QNAP TS-212 default load mod_rewrite.so

you can simply put phpinfo.php file in the httpdoc root.
Loaded Modules core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_log_config mod_env mod_setenvif mod_version prefork http_core mod_mime mod_dav mod_status mod_autoindex mod_asis mod_cgi mod_dav_fs mod_dav_lock mod_vhost_alias mod_negotiation mod_dir mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_php5

--
Xiaoyu Guan (Sam)
http://goo.gl/TpmBs

29 July 2011

[mac]play QNAP movie from Frontrow solution

the solution is very simple, you need to create a alias of your qnap movie folder, and drag this alias to your mac default movies folder. then start your frontrow... 



--
Xiaoyu Guan (Sam)
http://goo.gl/TpmBs

24 July 2011

how to downgrade mac os from lion to snow leopard

step 0, suppose you have a fully time machine backup
step 1, insert snow leopard installation dvd into mac and rebook it.
step 2, when boot screen show up, press and hold "C"
step 3, snow leopard installation menu will show up, on toolar choose restore from time machine.
step 4, in the time machine choose your latest backup from list, click next and next.
after 3~4hours, your mac will back to SL.
the reason why I downgrade mac os is globalscan iscsi not support lion, or because lion change api , not compatiable with original softwares. 
the second reason is my cannon dpp is not working neither. 
the third reason is lion full screen apps which seems like not support duo monitor. full screen apps is always 'full screen' on one monitor.
the four reason is because in 5 min I found the above three bugs, I feel lion is like vista 2. 

luckily, I have timemachine. after 4 hours restore, my mac back to alive with my iscsi target.



--
Xiaoyu Guan (Sam)
http://goo.gl/TpmBs