Showing posts with label Non Technical. Show all posts
Showing posts with label Non Technical. Show all posts

Wednesday, October 21, 2020

Do I Have a Problem with NParks

 I have been posting messages and articles about NPark's not doing a proper job. It all started some years ago. I reported a tree fallen over the McRitchie route. No replies whatsoever.

In Jan 20 2013, I went cycling with a Facebook cycling group, saw quite a number of cyclist fell at Mandai PCN. The path was covered with slippery moss.

In March 2013, I posted in Facebook cycling group that PCN is not cycling friendly.  See https://jnhiew.blogspot.com/2013/03/is-pcn-really-for-cyclists.html. The host suggest me to give a list of actual places that needs improvement. I went from Woodlands to Yishun then showed a list of the issues faced. There are 32 photos I took. Some are rectified over time. Below is just some of it. It showed almost 90 degree turns and exit into pedestrian path with obscured view.





Jan 22 2014 saw a tag that is not appropriate. How does the MP plant a family of plant as a tree?


April 12 2014 mentioned about badly designed PCN.



July 10 2014. Mentioned Daily Farm PCN become a jungle.


August 21 2014 saw a tag that is badly misspelled.


August 20 2014. Flooding again.


Jan 18 2015. Algae problem on PCN.


July 25 2015. Careless work.



April 3 2016 noticed an error on the position of Chestnut Nature Park. Posted it on Facebook. It has been corrected.


Nov 27 2017, flooded PCN.


April 30 2017 tried the new PCN. Not a good experience.


May 1 2017, jumping the gun. Misleading. Make people think that it is completged.


July 25 2017 Unchecked work again.


On 30 March 2019 the coast to coast 36KM route was launched. I mentioned on FB cyclist group that it is not cyclist friendly thus is for walking only. See https://www.facebook.com/groups/lovecyclingsg/permalink/2209026995821303. It  provoked a few people. However, I coolly explained that it is the media that says its for cycling and that I do not obliquely say NParks did a poor job. But actually 36KM is not for average people. It starts from Coney island which is quite a distance from bus stop. Since it is not cyclist friendly, it is not suitable for cycling also. So it is neither here nor there. I would question why they design a hiking only route instead of catering to both pedestrians and cyclist too.




Jan 10 2020, New Flora and Fauna web is a let down. It has since then been redesigned.



 Oct 18 2020 another web fumble.


Oct 21 2020, yet another fumble in information technology.



Oct 21 2020 You would expect NParks update its web page on PCN tracks. Its not. The new Changi Airport PCN is yet to appear after one and half week of its debut. I guess they are more interested in Jurassic Miles instead.


Nov 11 2020 posted on Facebook group and Tweeter about PCN being blocked and a sign to "dismount and push" because accidents happened there.


Nov 12 All the species of trees have gone missing.




Dec 8 2020 commented on TODAY group about Jurassic Mile being a PCN yet is too narrow with many pedestrians around and the hated "dismount and push" signs.



After all the above posts, people may just wonder whether I am indeed finding faults with NPark. My motto on Windows into Life is "Veni Visi Scripsi" (I came I saw I wrote). It spells exactly the attitude when I am writing the posts. NParks is not the only one I mentioned. It just happen that I come across problems while looking for something else that is of interest to me. NParks happened to be related in the things I looked at.


Friday, October 02, 2020

玄幻小说

 近来无聊的去看网上玄幻小说。看了几篇后有感想。他们大都采用同种格式。都有抄袭的嫌疑。不但是抄袭而且一直重复。以下是一些范例。

1. 穿越 - 死后穿越到另一个世界。附体于另一个人的身体。美名为夺舍。

2. 进阶 - 故事通常为武术。可以进阶。 进阶时是以梯级式而不是线性累进的。跟网上游戏一样。

3. 夺宝 - 时常有秘境开放。有进阶上限。进去时会分开。时间到会自动弹出。宝物常有武功传承,武器,药物,进阶等。

4. 异兽 - 像人一样有阶段。生体内有灵晶。

5. 竞选 - 不同形式的武术比赛。

6. 地位 - 进了宗门有外门,内门,精英等分别。要往上爬就必须进阶或比赛。

7. 闯关 - 通常有几层的。失败的会被弹出或死亡。

8. 成神 - 不少小说主人会成神或仙。会升仙。

9. 同阶无敌 - 通常是越阶挑战。

10. 灵药 - 灵药生长地一定有灵兽保护。

11. 天谴 - 进阶到某种程度,修炼超世而受天惩罚降下九道雷劈。

12. 不死 - 人被打死死了灵魂可以离体找人夺舍重生。

13. 储物戒指 - 可大量的储存物资。

14. 离题 - 作者会加上个人写作感想或请求。

15. 法则 - 武功的一种。时间与空间法则为最厉害。

16. 领域 - 另一种武功。

17. 大话 - 在打斗前对方常说的话。

18. 自废 - 对方常没开打就叫主角自废后给他全尸或自己断手脚。

如果情节完美结束那还可以接受。某些作者半途以主角死亡结束或没头没尾的完章。有一个作者完全迷失情节搞到主角变成另一个人然后突然结束。









Tuesday, July 02, 2019

中国五千年跳不出去的九大定律

拜读了题目文章后 (刊在《历史开讲了》),觉得那是人类的问题不是中国独特问题。这问题是在于权力与控制。如果中国是真正民主制度就可大大减少定律问题。下面是我的见解。

1.象牙筷定律

这是人类贪婪的特性。没有限制的话就会造成恶性循环。如果不是民主制度话就无法限制这恶性循环。

2.兔死狗烹定律

这是人类独裁问题。当没有敌人的时候就会内斗。没有法律的话就会造成此现象。没有民主的话就权力至上无法无天。

3. 包围定律

这也是人类独裁问题。因为没有民主就成绝对包围。

4.敌戒定律

生存法律。有了民主才会有”敌人“。敌对政党时常会盯着你。那你会时时提防被攻击。

5.朋党定律

朋党不是问题。那个社会没有朋党? 不受控制的朋党才是大问题。民主制度才能有些控制。

6. 黄宗义定律

独裁主义以上制下。最下层的老百姓跟本无能力反抗。如果是民主制的话就不是大问题。

7.五世而斩定律

这也是独裁主义才会有的。庸才会被推为首领。民主制是民选。无能的话跟本上不了台。

8. 权大欺主定律

人类通病。权大就不受控制特别是掌握握军权的。民主制度也无法。这就看其他军人会不会反抗。人民也可以反抗不过只手对不了枪杆。

9. 皮毛定律

也是独裁问题。 语言自由是民主制才有的。只有霸权社会才控制语言自由。

总而言之,有真正的民主制度才会防止这九大定律的重复。当然民主制度也有其弊病。




Thursday, June 20, 2019

Communicating with Apple Web Services (GSX) via Filemaker 2

My previous blog on the same subject is 3 years ago. Since then Apple has changed from using XML to JSON as a means of transferring data. Therefore there is a need to show how to do it with JSON.

JSON (Javascript Object Notion) by its name, is a Javascript feature but it has extended its use to many other applications. It is a format of storing data just like XML except it is more human readable when you format it nicely.

Fortunately, FileMaker has caught up with the latest trend by including a few JSON related functions. It is not that easy to use those functions to compose JSON but it is very much easy to get data from JSON.

To create simple JSON you just need to use $example =JSONSetElement("";"elementkey";"elementvalue";1) and it will create a nice JSON '{"elementkey":"elementvalue"}'. However, if you want to insert nested JSON then it is a bit tedious.

For example, you want to create a key that contains an array with one key and  value. First you must create the key and value as a JSON like last paragraph. Then you have to create an array to contain that JSON like $array= JSONSetElement("[]";0;$example;3).

Finally you then create the root element like $root=JSONSetElement("";"root";$array;4). You have created a JSON '{"root":[{"elementkey":"elementvalue"}]}'. This format is generally used by Apple in GSX in both request and response.

If it is a simple JSON that need to store a small set of data with fixed keys, it is better to create the JSON with unique values for each element that needs to be changed like "~!1", "~!2" etc. After that use substitute function to replace the "~!x" sequence. Two lines instead of 3. In actual fact, one line encompassing both action can be done by just using the JSON as source of substitute directly. In this way you could reuse the same code repeatedly or even store it as custom function.

The parameters used in JSONSetElement can be found at. JSONSetElement.

Getting values from "elementkey" in the above JSON is easy. $value=JSONGetElement($root;"root[0].elementkey")

If you looking at this blog first then I suggest you go to the previous blog on the same subject first to get an understanding.


Saturday, June 15, 2019

Exercising by Heart Beat

Normally one would want to exercise with some repeatable routine. Some go for fixed time. Others go for distance. More health conscious people will want to stick to an exercise/training routine depends on the type of exercise done.

I usually go for speed based exercise as I do walking and cycling. Recently, I am obsessed with heart beat based exercise. It is not scientifically proven but based on the ample talks about lowering heart beat, a controlled heart beat during exercise moves one towards lowering it. It will be good for controlling hyper tension, high blood pressure.

Before launching on the methods used to keep heart beat within a range during exercise, it will be good to about the basis of heart beat measure. According to scientific figures, the maximum heart beat a human can have is 220 beats per minute (BPM). Individual person's maximum heart beat is 220 - number of years of your age. People who exercise constantly will have their maximum heart beat considerably higher than normal people's heart beat.

Minimum heart beat depends on individual. Some athletes have resting heart beat around 40 BPM. Most people's heart beat is between 60 - 100 BPM. Children aged 6 -15 is around 70 - 100 BPM.

My range of heart beat I want to control while walking is 99 - 108. It is at the lower end of medium exercise range. The reason is to avoid excessive sweating. It is not easy to control the heart beat at this range as any lower than 98 BPM means I am out of medium exercise range. This is especially true if I don't do warm up before walking. It tends to fluctuate very much till the body is warm up.

Monitoring heart beat while cycling is a bit dangerous. However, all vehicle drivers including motor-cyclist have to keep monitoring their speed while driving. Their speed is very much higher. Just ensure that the coast is clear before you take a peek at the heart beat monitor. I only do it while cycling on long stretch of PCN or cycling path.

Depending on the type of cycling done, the heart beat range can be different. Usually, if I want to go for speed, I abandoned heart beat monitoring. Just go fast till your limit. On the other hand, for standard exercising, I go for 155 plus minus 10. It is at a comfortable heart rate without stress. Coincidentally, 155 is my maximum heart beat (theoretically).  Individuals must try and error to find a comfortable cycling speed for themselves.

At 155 BPM the speed of travel is basically below the 25 KPH limit of PCN. It is therefore safe and within the regulation.

GARMIN Connect has a stress measurement statistic page. It is to show how often you get stressed. My stress region is generally non existing except at the beginning  and end of exercise. It could be a result of my method used but there is no proof and I don't bother to prove it.

Below is a typical walking speed and heart beat chart.






Friday, April 26, 2019

NUS Peeping Tom Case

In olden days when internet was not that popular. Any such offence simply gets unnoticed even if the accused gets persecuted. The victim does not have any further say as to whether the punishment is just.

With the IoT, at least the victim can voice out the feeling of injustice. Although the victim's post on social media could be viewed as 'doxxing', it is still a victim's voice. Where else could the victim voice out the frustration.

Netizens have various views and comments even politicians chipped in. The following are comments on some of it.

1. The police. The police have decided not to prosecute the accused based on their reasoning that the offender is just a first offender with no traits of such offensive behavior. They therefore give the accused a 12 month conditional warning. If they prosecute the offender then there will be a permanent record which will ruing a person's life even before he get started in life.

2. NUS. NUS is like any educational institution, which is supposed to uphold individual's privacy and integrity. The initial punishment is suspense from a semester, banned from entering campus residence and write a letter of apology to victim.  I am not here to judge the punishment but it does looks like a slap on the hand. Of course I can't say how much punishment is enough but it is not even near the police's punishment level. There are already 20 NUS previous cases in last 3 years and there is no review on how to stop it. They finally apologize and get to hold a review on this.

3. The accused. Beside being given punishment by Police, NUS, Great Eastern, he only express "no excuse" in a ST interview. No public apology was given  as far as I can see.

4. The victim. As said before, her post could be viewed as 'doxxing'. There are better ways to express frustration than to identify the person with pictures in social media.

5. 'Trial by social media'. Those against voicing out saying it is TBSM. However, if this wasn't brought up, nobody knows about it and the vicious cycle continues unabated and unknown. At least now we know that Police have their reason and NUS no longer wants to keep it quiet.

6. Great Eastern. As a company, it cannot be seen to be doing nothing. Firing the accused is the only way out.

7. Agrarian. The company cuts ties with NUS on condition that NUS expel the accused. I don't think this is the right way. It becomes issuing a threat to NUS. Others simply says that the company join in to the media rush to be heard and seen, a typical business tactic.

8. A blogger seems to be biased against the victim in her lengthy blog on the issue. She question about the rights of the accused future. One other post that talks about the blog question how she feels if she or her family member is the victim.

9. Tan Kin Lian is giving support to the accused. He portrayed them as victims. If he is referring to 'doxxing' then it may be true. It depends on who is viewing the incident at what instance? I will be grossly unjust if the focus is only on the consequence of the victim's action than the voyeur's action. It reminds me of the "Singapore Kindness movement" which sides with the perpetrator rather than the wronged.

9. Right to be forgotten. Singapore has this Personal Data Protection Act in place. This should give the accused back his life.




Wednesday, October 31, 2018

Cantonese as a Language

Recently there are a spat of talks about Cantonese being a Language. To be fair, it is a language distinct from Mandarin (Putonghua).  Cantonese exists since before Qin Dynasty and later developed into NanYue in 204BC.  During the Tang dynasty, intermix between the Han and Guangdong, Guangxi people reached critical mass. These people refers to themselves as Tang people.  As a group who spoke a distinctive language from the Middle Chinese, it is deemed to be a language.

It is quite difficult to define Cantonese as a dialect as it is very distinguished from Mandarin. They are mutually unintelligible with each other. Cantonese used to say that their Language is older than PuTongHua (the official Chinese Language). There's a story about Cantonese almost become the official language of China after the XinHai Revolution in 1912 but was beaten by a small margin (Wikipedia). Whether the story is true is still arguable. Since the communist takeover in 1949, Putonghua is the common language. But since Hong Kong and Macao has not returned to China, Cantonese is the common language there.

Canton province since the Qing dynasty has been the only opening to the world, it is not surprising that many of the emigrants are Cantonese. Thus there is always an urge to define Cantonese as a language.

People in Hong Kong has always strive to distinguish themselves from Chinese. It is therefore not surprising that they actively promotes Cantonese as a Language thereby distinguishing themselves from Mandarin speaking Mainland Chinese.

There are many arguments for Cantonese as a Language.

1. Cantonese is older than Putonghua. Actually, they all developed from Middle Chinese on a different path. Putonghua is indeed developed later.

2. Tang poems are written in Cantonese. Tang poems are based on Middle Chinese. Some may have sounded more correctly in Cantonese while others simple does not sound right. Mandarin obviously does not really fit well too since Middle Chinese is used then.

3. UN has defined Cantonese as a language. UN did list Cantonese as a language together with other major spoken language of China. In the order of number of people speaking specific language in the world, Mandarin is the most (14%).  Wu (Shanghainese) gets 1.2%. Yue (including Cantonese) only gets 0.89% (Wikipedia). It is undeniable that it is a language listed by UN. But saying that UN recognize it as a language (not a dialect) is a bit far fetched.

4. There are claims that UN define Cantonese as one of the six "leading language in daily use" (粵語為日常六種主要用語). It is very much doubtful this is real. Yue (including Cantonese) is 24th in the list of world's most spoken language according to Wikipedia. Wu language has even higher usage than Yue. There is no definitive link to this saying in UN.

5. Cantonese is an official language in Hong Kong, Macao. Chinese constitution 中华人民共和国宪法》19.5 states that Putonghua is promoted as common language throughout the country.  中华人民共和国国家通用语言文字法》section 2 states that the common language is Putonghua. Section 8 of the same article indicates each race has the freedom to develop and use their own language. Even Putonghua is only stated as national common language not "Official language". How did Cantonese being defined as "official language"? (https://www.zhihu.com/question/22600638).

It is undeniable that Cantonese is indeed a language. There is no point citing unclear or untrue facts about it as a language.




Thursday, August 31, 2017

新加坡视障人士协会常年会议回顾 - 中文版


最近我参加了视障人士协会(SAVH)的常年大会。 这只是一个典型的常年大会,一个会长正在朝着一个方向前进,但是成员却有其他的想法。

故事始于去年的常年大会。 去年,会长试提出7修正案。

1。删除以下内容:协会成员由绝大多数视障人员组成。

2。将无视障会员的永久会员费从150元提高至500元,普通会员费从15元提高至100元。

3。增加以下“少于一年会籍的会员无权在任何年度或特别大会上投票。”

4A。 删除“视障者7人”,“无视障者6人”,“给执行委员会简单多数”,“3人视障者”。 添加“最多5视障者”

4B。如果上述4a通过,则修改“co-opt 6名成员”,成“co-opt 10名成员”。

5。加上“由指定的无视障会员共同签名”。

6。添加以下内容:在本宪法中,具有小于6/60的矫正视力最好的人应为被视为“视障者”。

去年周年大会上交流热烈。 一方面,会长试图删除一些被认为阻碍扩大协会的宪法声明。 另一方面,成员认为这些修正案威胁到他们的权利。 最后,这些修正案都不能通过三分之二的投票要求。

今年会长再次提出5项修正案。 有3项特别令人感兴趣的修正案。

1.去年提案的第一项再次提交。

2. 项目3再次完全相同。

3。去年提案的第4a和4b项改为“不低于30%”,代替“视障者最多5名”。 这意味着视障者3.9人。

这次会议不是那么热烈。 上述3项提案均未超过三分之二多数。

从两年的建议来看,不得不认为会长正在努力做到以下几点。

1.删除宪法第5条中的绝大多数视障人士。

2.通过让新成员加入,以阻止他们的投票通过或拒绝,以防止成员中的团体试图推动他们的意见。

3.将视力障碍人数减至“视障者至少3名”-第6.8条规定的最低限度。

会长甚至在大会通知中附上了日期为28/7/2017的个人信息。 他强调,目的是“吸引新鲜,有活力和有才能的个人,无论是否视障者”如果无视障者的数量有配额地位,我们将无法这样做“。 如果他的意图对无视障者和视障者都是中性的,那么他为什么主张对执行委员会会员进行“30%或更多”的配额,并且抱怨宪法第6条和宪法中同一宪法条款中的“简单多数” “宪法第4条 会长说的话显然有冲突。 或者也许他的陈述仅适用于“会员”部分,不包括“执行委员会会员”部分。

我在会上问提出“30%以上”的理由。 我没有得到直接的答复。 我想原因是给予一视障者至少有一个最小的保障,否则这使得修正案听起来非常恐怖。 而且要符合宪法第6.8条的规定。 我想知道根据会长的“不管是否视障”的理论,他为什么不去除”3个视障“条款。 但是,删除该条款后,会使建议的修订更为威胁性。

会长的信息的总体语气是他想要更多地增加无视障者到协会。 那已经有偏见了。 社会已经偏向无视障者。 新加坡的残疾人士为获得“残疾人权利公约”而努力奋斗,会长认为简单多数的条款是一个障碍,同时非常强调让无视障者成为视障人士协会

让双方加入更多的会员加入协会,没有求不到才能的问题? 新加坡大约有3000名视力障碍人士。 我相信2999无视障者足以填补人才库。 如果视障者无法支付会员费用,为什么不免费或仅仅是收1元的象征? 提供每年15000元会消耗大量资源? 巧合的是,2999名无视障者会员缴交了45,000元的会费。 视障会员费用还不够?

即使是经济困难,我相信这些“有天赋”的视障人士没有问题成为成员,同样数量的无视障者也可以加入。 执行委员的数量最多为13个,co-opt最多为6个,您需要拥有大量的“才华”? 它甚至没有20个成员的分量。

在常年大会之前,总裁还举行了一次对话会议,强调与常年大会通知相同的信息。 也许在会长看来,他看到宪法规定的限制给视障的简单多数。 他认为视障者不符合无视障者的标准,所以他试图删除限制无视障者人数的条款,使他能更有目的地在协会任职。

当前,SAVH是视障人士协会。 人们会认为它应该是绝大多数视力障碍的成员。 然而,该协会实际上是在1951年以“新加坡为盲人协会”的名义开始的。以它的名义,它被认为是由无视障成员组成的,目的是帮助视障者。 会员组合会包括视障和无视障者是不足为奇的,在以前和现在都一样。 随着宪法的改变,发生了以下重大变化(一些取自会长的信)。

1. 1983年 - “宪法被修改为限制无视障成员人数占总成员人数的多数”。 “宪法”第4.1条改为“成员由会员组成的大多数视障人员”。

2. 1987年 - 协会名称改为“新加坡视障人士的协会”。 值得注意的是,总统信中没有提到这一点。

3. 1994年 - “变更配额严重限制了我们吸引和招聘合格人才和人才在执行委员服务”。 “宪法”第6.1条规定视障者在执行委员成员数量并宣告“将会给执行委员会一个简单的多数”。

会长在提及上述第1项和第3项时提到“因为没有记录的原因”。 很奇怪,两个日期是在没有发现背后的原因的情况下被发现的。 所有会议记录的所有记录都有保存在档案中,会长究竟如何确定哪一年作出修正。 尽管这些记录只是提出了一些修正案和三分之二成员的批准,但它已经说明了很多。

从修正案本身来看,这一变化明确的说明要在非常有偏见的世界中为障碍者会员和执行委员在协会里提供了多数的成员条款。 这些修正案没有寻求绝大多数条款。 只是给视障者带来轻微的优势。 毕竟,一名成员在周年大会上提到的,这是视障协会。 会长试图恢复项目1和3。

让我们来看看协会的一些目标

3.1 作为视障人士的协会。

3.3促进和鼓励视障人士更多地参与管理其事务和活动以及协会的管理。

3.4努力消除建筑,态度,社会,文化,教育,就业以及阻碍社区视力残疾人全面融入和平等对待的其他障碍。

以前的修正是符合上述目标的,而会长的建议似乎违背了上述目标。 会长正在试图从无视障中获得“才能”,而不是,在会议期间一名成员提出的,“为残障人士提供机会发展”。

从现有人才库中挖掘出来,而不是让视障人士参与,确实更有成效,但这违背了宪法的目标,从而打败了协会的整体宗旨。 为什么要在执行委员让绝对多数的无视障者参与,同时在目标是“促进和鼓励视力障碍者更多地参与协会管理”的条例下,将视障者减少到最低限度。

会长通过取消会员限制以获得更多有才华的无视障成员参加协会的想法也脱离了协会目标的范围。 协会根据其目标3.1为“视障者的协会”。 通过消除视障人士的绝大多数,他正试图迎接更多的无视障成员参与协会事务。 它如何为3.1和3.3的目标迈进? 如果他们想要在执行委员做出贡献,他们才需要成为会员。 正如另一位成员所说,“你不需要成为协会的成员”。

会长担心无视障者的人才将“转向其他志愿福利组织”。 一位成员指出,自1983年以来,现行宪法已经到位,无志愿者人数不足。 事实上,有些人转移了,但还有其他人自愿参加。

一位会员提到在会长任期内,“没有一个视障人被提名为增选(co-opt)“。 在这里,您可以清楚地看到会长在执行委员增选的选择。 总统明确表示,他想消除无视障人增选局限。

视障者可以自己操作而不用无视障者吗? 在过去的岁月里,这可能是真实的,但在现代,一个只视障者组成的组织并不罕见。 香港盲人联盟就是这样一个例子。

SAVH为寻求平衡而包括无视障者为成员。 无视障者不应该试图为自己的优势而努力。 他们应该保持协会的目标,并努力让更多的视障者参与。

“删除多数成员”和“不少于30%的执行成员”修正案的投票结果显示很多成员的意见。 20名成员同意“删除多数成员”修正案。 这还不到会员名单数目的五分之一。 31名成员投票同意“不少于30%的执行成员”。 这大约是三分之一的成员人数。 前者显示,成员绝大多数反对删除视障人士多数成员条款。 后者至少有30%是赞成的,因为该条款仍然受到成员选举的限制。 我有关于后者一个事实的故事,但我不会说明。

在选举新视障的执行委员时,值得注意的是,一名研究院博士级会员输给了一名按摩按摩师。 看来成员们不在乎执行委员的成员选择是否是人才。这与会长的方向有所不同。 看看会长或执行委员会成员是否会选择这样的“人才”是很有趣的。

一名议员试图提出议案,以永远防止失败的动议再次被提升。 在这样的想法是有点极端。 执行委员会议员否决这项议案,因为根据宪法没有提前提交。 值得注意的是,法律顾问说“没有任何妨碍让成员不能提出修正案”。 连续两年,会长已经提出了两个相同的议案,我想他会一次又一次的表决直到通过。 在法律上,他可以通过任何无道德考虑来做到这一点。 看看他是否会在明年再次这样做是有趣的,因此继续保持同样的故事,把协会的目标和成员的意见放在一边。

最终,像常年大会上的一个成员提到,所有成员都应该致力于视障人士的利益,而不是争取谁应该拥有多数。

点击英文版部落格


Thursday, June 29, 2017

北京故宫中轴线偏差


上图是一个YouTube视频。 论点是“元代人为中轴线偏差”。后来又看了郭晓强的文章(http://idea.cas.cn/viewdoc.action?docid=42614)觉得后者有理由。

郭晓强说夔中羽是用北京时间不是北京当地时间。这话没错。元朝时都还没格林威治标准时间那理有北京统一时间?

每四年都有多一天。因为是用阳历。元朝用阴历。阳历是辛亥革命后才用的。夔中羽用2004年的天文日历。会不会有时差呢?

夔中羽自己做了日晷。用2004年的天文日历为准。视频没说怎样调准。会不会是太不科学的量法吧?正确的做法应该用日晷确定何时是零地点正午后才来与故宫中轴线比较。元朝人大概也是如此量法。

当然与700年前的正午标准时间比现在正午时间那可要一切都不变。事实是如此吗?我们连元朝人哪月量的都不知道。地壳一直在移动。地球又不是正园形绕太阳转动。轴心也不是与太阳成正角。而且宇宙都一直在膨胀。用如此简陋的量法真的很难说服人。

当然以一个外行人来批评学者是不对的。不过外行人都觉得不大对,其他学者又没说那又是谁对呢?


Monday, April 03, 2017

Boycott the Earth Hour Stunt?

Read the article "If you really care about climate change, you should boycott the ridiculous Earth Hour stunt" on "Independent" by Adam McGibbon.

He thinks that "Earth Hour" is a stunt. It is a stunt. It is a drive that bring the awareness of climatic changes to the public. The aim is not to actually make an effort to reduce the climatic change effect during the hour. It is just as a "symbol" (according to Wikipedia). Without the mass drive, many don't even get to be aware of such efforts without WWF drive.

I have not heard of the author or his activities before. He might be doing a great job to bring awareness on his part. However, his effort is limited to what he can do. Whatever he is doing has not reach to my end of the world yet. At least WWF is driving towards general awareness worldwide. Both are doing something towards bringing awareness of climatic change to the people. Why try to discredit what WWF is doing?

In is article he said "just 90 of the world's largest companies are responsible for 2/3 of all carbon emissions." What can he do to stop these companies? Isn't that the companies produced based on demand? Without bringing awareness to the general public, small bands of environmentalists could not even touch them.  

Let's just work on climatic change reduction in each's own way without trying to discredit other's effort.







Thursday, February 16, 2017

Filemaker Xpath

While doing communications with Apple GSX, I have to constantly receive XML from GSX. Filemaker does not have functions that handle XML in variables.  Normally, I would use BaseElements plugin function BE_XPath to do the node extraction. But due to its functionality, BE_Xpah treats nodes differently. If there is only one node with a specific node name, it can easily be extracted by using "//mynode". If there is multiple nodes with the same node name then it is a issue. You must use a array style like "//mynode[x]" to get the correct value.

If the XML format is always constant, there is no problem. However, if the XML returned can be one or more nodes of the same name, it is an issue. It ended up that I have to check whether there is multiple node of the same name by trying to parse "//mynode[x]" first to see it has a value then go to the appropriate routine to extract the single or multiple nodes. It is a hassle. Moreover, the script needs the BaseElements plugin. Filemaker Go does not have the capability to use Plugins.

I tried to lookup for scripts that is available in the internet. There are some but its codes are a bit too complicated to comprehend. It may be due to efficiency, they try to use as little script steps as possible to achieve results. Many resort to use "Evaluate" function. I tried as far as possible to avoid using "Evaluate" thus do not want to use it.

Fortunately, two of the scripts uses the same functionality provided by Andy Knasinsky (http://www.briandunning.com/cf/1). It triggers my mind that I could use the same method to extract nodes. I don't have Filemaker Pro Advanced so cannot copy the custom function. Therefore, I start doing my own script.

To start off, I use the same convention of defining the Xpath. The convention is like this "//mynode[x]". It is an array like node name that starts with "//". I will then have to detect whether there is a "[x]" defined. Filemaker has a function called "position". The syntax is as belows

Position[text;searchstring;start; occurrence]

Now if there is no "[x]" defined then I just set "occurrence" to one else get the value of "x" as "occurrence" value. Since "Position" always requires a "start" and "occurrence", The x value is useful to define which instance the node name occurs. Both the start node and end node position can be extracted this way.

With the use of "Middle" function, I am then able to define the exact position of the node value and extract it.

The following is the code. I can't copy and paste as FMP does not have the capability of copy and past the script to text. I do screen capture instead. The script name is "GetNode".

Well, life is not as simple. There will be instances where the same node name appears inside other node. Therefore, it is necessary to define the specific path to the node hence the term "Xpath".

It turned out that this is made easy by the above script. Since the above script is just text manipulation, it can actually retrieve the other child nodes. The syntax of Xpath is like "//node1/node2". It can be more than two and with array like syntax.

I just break up the nodes then loop it in sequence. For example, first I get "node1" then retrieve the node value (including child nodes). Then, I get "node2" based on node1 result. If there is a third child node, then I get the node2 result and look for the node value. In this way, I can get any value from the XML. Below is the script. I name it as "GetPath"



You can just do "Execute Script" and call the "GetPath" script. The script parameter will be
your xml and the xpath separated by a Filemaker carriage return symbol. You will then get the ScriptResult to get the node value.

There is a script in the above script named "Remove Subnode". This script is a result of having an XML that have subnodes that have nodenames same as the root node. If the subnode is above the root node of the same name, the subnode value gets extracted instead. It is, therefore, important to remove the subnodes as the path does not point to the subnode.


After doing the script, I felt that it is still very troublesome if I were to pull a list of values from the XML. A list script is written just to do this. The parameter supplied is the XML, the specific path, and the list of nodes that I want to get. An interesting point is that there is a need to get one or more subnodes in the list. Therefore, I set the node name with an extra "[]" to indicate that it is a subnode. It will then pull the subnode XML as value.
Ignore the Base64 comment as I though the list might be interrupted by the delimiter. It turned up that Base64 adds more trouble. Then I realize that I must compact the XML by removing all CR, LF, TAB, and extra spaces. This means that the CR delimiter is not found in the data itself thus abandoned the idea.



I make no effort to combine the script steps so that it will be easy to read by any novice. Any how, the script should not be used for XML that is tens of thousands of lines long. Try to "compress" the scripts if you need to extract large number of data from XML. It is not within my scope to show you how to use one script line to do complex calculations.

By the way, the XML has to be well formed and error free.


Thursday, January 01, 2015

Time travel the non-scientific explanation (aka common sense)

People are always intrigued by the idea of time travel. Is it even remotely possible? The following is an effort to try to see the possibility of it in a lay man's way.

First the 'time' element must be explored. What actually is 'time'? Early humans observed the rising and setting of the sun. They also observed the seasonal cycle. Therefore they call the cycle concept 'time'. Time is therefore a concept not a physical property.


As technology improves, people want to have a more precise definition of 'time' cycle. The therefore invented the thing called clock. Clock is supposed to be a machine that measures 'time'. It does resembles the cycle that man observes earlier. But does that actually make 'time' a physical property? It does represents a instrument to define cycles of its motion from the moment it starts to the moment it reaches back to the same position. We probably can call it a cycle of motion. But that does not equates to the 'dimension' (length, breath, and height) that we can measure physically. Generally, time is referred to as the fourth dimension. It is at best man's effort to quantify a measurement of a concept. There are a lot of theories about the space-time (4 dimensions).


With the clock, they invented another concept called 'speed'. The definition of 'speed' is distance divided by time. Its the beginning of mixing physical property with a concept. Obviously people will not regard 'time' as a concept now as they can now 'measure' it. Lets just leave the argument alone as it is not the topic of discussion. 

With the avent of 'speed', peoole start to measure all kind of things. The speed of light is thus derived. The next thing come into mind is that if one could travel faster than the speed of light, one could end up in the future . Thus the concept of time travel comes into being. The next obvious question is whether we could go back in time.


Going back in time already happening right now. The sunlight we see now is actually 8 minutes and 20 sec ago when it happened. We can actually see cosmic activities that happened billion years ago. The real question is going back to our own past. Now if we travel away from the place where we started at 300000 KM per sec (speed of light). We can only see the moment when we started (assuming the speed is 300000 KM in one sec). To see the moment before that, we have to travel much faster than that. At twice the speed of light we barely see the moment one second before hand.


Hold on. Now that we are 0.6 million KM away. How big is the picture that we can see? If you use a standard 50 mm camera (see the image the same size as real one) to take a picture of the starting position, you can practically see nothing. We actually need a huge telescope to see the starting point. How big is the telescope? I let you do the calculation yourself. Did I mention that it takes a few seconds to focus properly?

On the other hand, since the light has not reach us from the cosmic event, we are actually in their 'future' right? So if we travel fast enough towards it, can we reach it at the state in the past? It is equivalent to say that if you fires a gun at me but then I travel fast enough I can reach you before you do it. That is a interesting question. Can you reach a physical event before it happens? Common sense will tell you that it is not possible. No matter how fast we travel, we take time to do it. By the time we reach the object, the event is already gone. Seeing an event is not equal to be in the same physical event. That's why I say 'time' is a concept.

Let us now focus on the idea of travelling forward to the future. Well, before the light start to move, it does not exist. Just like before you switch on the light, you see no light. It is as simple as that. So, even when we tried to travel faster than speed, it still does not exist. 

Obviously some one will argue that what we are seeing now is actually in the past. It will remain an unknown at best.

We see in motion pictures that people travel to the past/future and interacts with the events in the past. Well, that remains only in fiction stories. Remember my very first message that 'time' is a concept? It is not real and cannot coexist with the present.

My concept of time is therefore 'a measure of event that occurred by comparing it with a device that has a constant cycle". It is not a physical property. We use time to predict what is the physical condition after a certain cycle that occurred. Like for example, I travel at 15 KPH for one hour. I can predict where am I after the cycle is completed. 

Time travel is therefore purely imagination. It should remain a flawed science fiction.




Sunday, November 25, 2012

Adding markers that shows picture in Google Maps

Previously I posted a blog about putting pictures in Google Map. It requires the pictures to be geotagged. What if you have a picture in Picasa but does not have geotagging? Here is how to go about adding bookmarks into Google Maps that shows a picture.

Assuming you are using Chrome for this purpose. Open Picasa and navigate to the picture you want to add to Google Maps (Gmaps henceforth).  Right click on the picture itself and choose "copy image url" ("Copy Image Location" in Firefox"). On Gmap, create a marker. Add a title. On the "Description" choose "Rich Text". You will be presented with a list of icons just above the text box. Choose "insert image" (icon that looks like a picture). On the URL input box, just "paste" (CTRL_V). Click "OK" and you get your picture as a marker.

The default markers have a "Camera" icon. Use that instead. Just click on the icon after you placed a marker. It is on the top left corner. Scroll down and you can choose the "camera" icon.

If you are more venturous, You could add your picture as icon. While choosing the icon, you can click on "Add an icon". On the URL prompt just "paste" again. I would not advice to do this as pictures are not icons. Moreover, you don't really see much of the picture when it is squeezed into an icon size.



Friday, November 16, 2012

GPS on mobile phones

GPS devices used to be specialized device that could be used for finding your location and to navigate from point to point.

Another use of it is for sports enthusiasts to record their workouts. It can record tracks, altitude, speed, and duration.

One other use of GPS is to GeoTag Gif files in what we called Exif information. You don't have to remember where you took the pictures. They remember it for you. There are applications that could show you the exact location where the pictures were taken.

When Android included it in its design, every Android now comes with GPS. The default use is Google Maps. It showed the location of the Android in maps. The camera in Android has the ability to GeoTag photos you take.

As time goes on, more and more developers wrote apps that make use of GPS. There are now numerous apps that is related to GPS.

One use of GPS in Android has evolved such that somebody else can track your Android from their mobile or even web. It can be user initiated or remote requested tracking.

User initiated tracking is usually the user that manually or automatically send the location information to another user. This is primary used for informing the remote person on your location. Automatic sending of the location information is used for sending the information without the user's intervention. Sometimes it is even done without the user's knowledge.

Remote initiated tracking is usually done with the app already installed in the user's Android. Some developer even use the rights of user's Google account to install the tracking app remotely and to set various functionality like GPS, Wifi, BT etc to on or off. They can even wipe your phone clean remotely. Scary huh?

Let's just concentrate on our GPS tracking business. With the app installed, remote monitoring person can simply use email, internet access or SMS to remotely control the Android to send out the location information via the same or another channel.

Not all Android users subscribes to mobile data. This is especially true for Prepaid Card users. Therefore, certain app are specially written just to use SMS as the controlling channel. Usually it is done by sending to the Android a certain predefined code word. The app inside the Android will be activated and will send back to the remote person the location information as a SMS. It is usually in url form so that remote person can click on the url in the SMS and view the address in Google maps or browser or which ever app that could read the GPS format.

What is the use of having another person know your location? It actually have a number of users. It is primarily used to find out the location of the Android or the person using it. This means that if you lost your handphone, you can actually send a SMS to the phone to locate it. If it is the person that is your interest, it is most probably for tracking/finding the whereabouts of your spouse, children, colleagues, old folks, pets or just between friends.

Some social/business app even use the method to track a group of people and display all the tracked information in one map.

Do you know that there are actually many Android users that does not know what is the use of the GPS? By turning the GPS on, it actually saps your battery. If you don't have a need for GPS, turn it off to give your handphone a bit of extra juice to last the day.




Thursday, November 15, 2012

How to show pictures along tracks in Google Maps

I have a number of pictures in Picasa. All of them have been geotagged. The maps in Picasa can show the pictures but it does not have the route that I have gone through while taking the pictures.

Sports-Tracker app did allow the showing of the routes with the pictures. I was thinking in the same line and thus was scratching my head as to how should I go about doing it.

By trial and error, I found in Picasa a link that says "View in Google Earth". Clicking on it actually create a kml file in my local directory. It then occur me to import this into the maps that I create in "My Places". When I did this, the pictures actually showed in the map exactly as in Picasa's map. Clicking on the picture icons will show a larger picture as a pop up.

First go to your particular album. Click on the "View Map" at the bottom right hand corner. When the map with the pictures are shown, click on "View in Google Earth". A KML will be saved in your directory.

I then export my route as "tracks" gpx. Using gpx2kml.com, I converted it to kml and imported this also into the same map I created earlier. And what you know? It appears exactly as in Sports-tracker.

Even if I do not have the GPS track recorded while in the trip. I could easily create the tracks by manually plotting the route. It worked just fine.

With the pictures and the route. The next thing is to add Markers where you can state when you were at that spot and a description of the spot. This makes a perfect Trip Logger record.

A word of caution. If you have way too many pictures, your map will become paged thus spoiling the fun. See my earlier post about showing such paged map in one place.

Finally, you may have to delete the "description". Google may complain that the string is too long. Anyhow, the html cannot be displayed properly thus deleting it is always a sensible thing to do.

You may want to put titles in Picasa for individual pictures. It will be imported as marker title.


Cycling in PCN

PCN is the short form of Park Connector Network by Nparks. It is a trail for walkers and cyclists. Some of it are actually off road trails for hikers and mountain bikers. Some of the scenery along the route are spectacularly nice.

Although there are plans to have a Round Island PC. At this moment it is still not yet complete. That does not stop me from using it for round island cycling.

I have put in some effort to retrace the existing PC in PCN on Bike. It showed the routes as well as information that is of interest to cyclists. It also contains temporarily routes that goes on road to connect between the PCs.

I have plotted a round island route which uses mostly PCN routes and some part on road. This is the route in MapOmeter Round Island mostly on PCN. I will be going on the route next month.

I really hope the round island route will be complete soon.


Wednesday, October 27, 2010

Junk Mail Proof Letter Box and SingPost

Regarding the Junk Mail Proof Letter Box and SingPost. Town Council simply ask me to opt out (according to their reply to me). They are not going to stop SingPost.

According to ST reporter Irene Tham in her article "Locked out of Competition?", IDA replies "it is not an area that the IDA policies."

SingPost has a reply in Stomp. They are obligated to deliver "addressed or unaddressed."

So what is the result? No where to turn to.

Well in that case we should be obligated to return it via the "return mail" letter box as the junk mail is "wrongly addressed". Don't throw it away as it is deemed by SingPost as legitimate. If you throw it away you are unethical. You are throwing away an admail which is "not addressed to you" and which SingPost deemed it as legitimate "mail".

Since the admail is not addressed to you, it should be a wrong delivery as it is not addressed to you. You are, therefore, obligated to return the wrongly delivered mail to the sender via SingPost. In this way, you keep the lobby area of your HDB Block clean and did a good civil service. SingPost can't complain that you throw junks into the "return letter" letter box otherwise they slap themselves.

Tuesday, October 26, 2010

SingPost and Junk Proof Letter Box

It used to be quite disgusting when your fellow residents simply drop the junk mail on to the floor in front of the Letter Box. Like myself, they are also so sick of the countless daily dosage of the junk mail. I still remember the first day when I moved in and checked the letter box. It was jam packed with junk.

The installation of "junk mail proof letter box" seemed to be a timely relief.

Actually the new letter box come as a surprise. There was no letter informing us of the change. One day you walked to the letter box and find empty and void at the place where it used to be. Then you notice some stickers with arrow pointing you to the new location.

The newly moved letter box looks totally shameful. It was dusty and dirty all over. Dust was even found inside the letter box. How the dirt gets into the letter box is anybody's guess. Since my letter box was actually at the side of the letter box set, I think the worker actually puts his hand into my letter box as a grip support.

It goes on for a few week till there is a letter informing us to collect the new letter box. I was quite glad when the keys was collected. It signals the new era of "No Junk Mail".

When I get the first ever junk mail from the letter box. I was quite surprised. How did the junk mail get into the box. The lid on my letter box is openable but is latched and can only be unlatched from the inside after you opened the letter box with your key.

On the next day, I happened to go downstairs and a post delivery man was putting in mails. I realize that he actually put in a junk mail into the letter boxes. I also noticed that there are quite a lot of fliers on his bike when he moved the bicycle pass me. Now, how did this happen? Then I realize that SingPost was privatized. This is, perhaps, another way they could earn money.

Since my new letter box is junk mail proof type, I would think that it is designed to prevent junk mails from getting in. Even the mail delivery person has no rights to put in junk mails right?

I wrote in to SingPost to check out. Their reply is candid. They simply say that they do put in "admail" and even indicate to me the schedule of what junk mail they put in.

Stop there! Why are they doing it? Is it not my letter box is now "junk mail proof"? On what authority can they put in "junk mail" while all others are now not able? If they can put in one, what is stopping them from not putting a whole bundle of it. In which case, what then is the "junk mail proof letter box" is for huh?

Does the Town Council install the "junk mail proof letter box" to benefit us or SingPost? Surely the former is the case. If SingPost can bypass that purpose and enjoy the monopoly of it then I may ask again "who benefits from the junk mail proof letter box"?

I am writing to MP, Town Council, forum, blogs, facebook etc. to highlight this strange behavior of SingPost. Hopefully more people can query the various authorities of this oddity.