I'm a Montreal-based engineer, photographer who loves tweaking, hacking and new technologies
When you make the Mac go to sleep but it just stays on with the screen black, you can use the
pmset -g
to display you current power management settings and see the entry for sleep that will tell you the problem causing process PID
If you have SSO enabled on SAP CRM, you can sometimes get stuck with your user on your computer’s certificate and you can’t get out of it with logout, delete cookies, no auto-login etc. But what you can do is add
?sap-user=DIFFERENTUSER
at the end of your usual sap/bc/bsp/sap/crm_ui_start/default.htm URL and the login dialog will prompt. Try it in conjunction with ‘Clear SSL state’ button in the Content tab of Internet Options
It was kinda off putting with my new iPhone 4S to find out that Apple makes SMS alerts ring twice (once on receive and one reminder) instead of having an LED light for alerts like in Android or Blackberry. Kind of a workaround rather than a real solution to the problem of how to find out I have alerts pending when I missed the first alert. Apple operates on a push principle and Google/RIM operates on pull.
Anyway, if I have reason to miss the first one, I most likely won’t notice the second one. It’s also misleading when it rings twice because you’d think there’s 2 messages.
To turn that functionality off, go to Settings->Notifications->Messages->Repeat Alert->Never.
If you tried to load an entreprise email account in the Email.apk app and the Exchange server enforces a minimun password, it could be pretty annoying. To get around it, you can start by getting a modified version of the app from shafty023 onto your rooted phone. Copy the app to your SD card. Then run
su mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system mv /sdcard/Email.apk /system/app/ chown root /system/app/Email.apk chgrp root /system/app/Email.apk chmod 644 /system/app/Email.apk reboot
I started off looking for a request time compiler of LESS for Django and initially found django-css which seems to serve the purpose great. Compressing static files on the fly is definitely a nice added bonus as well. It does so by containing a fork of django_compressor. But on further inspections, I jumped ship. The original project, django_compressor, sees a more regular update and is now Django 1.3 ready while the ‘successor’ isn’t. Funny thing is django_compressor supports compiling any CSS formats compilable via command line. With a better documentation overall, seems like the original has beat the sequel.
In the official Django logging docs, it wasn’t very clear about how to log to files. As you can understand, Django can use any Python logging classes that are all listed here. One of them is FileHandler. To use it, just add this to your settings.py
LOGGING = { ... 'handlers': { ... 'file':{ 'level': 'DEBUG', 'class': 'logging.FileHandler', } }, ... }
But the FileHandler class constructor needs more parameters. To add them, you have to add the parameter name key with its value into the dictionary.
LOGGING = { ... 'handlers': { ... 'file':{ 'level': 'DEBUG', 'class': 'logging.FileHandler', 'filename': 'debug.log', } }, ... }
Got a Logitech Performance MX on “special” at Best Buy this weekend (80$ for a mouse… what a slaughter) because I just have a laptop mouse and am tired of not having anything to rest my palm on. At first, it’s great. Looks like a race car, good performance, nice receiver, rechargeable on the fly etc. Then, something feels off… something uncomfortable. I turn the mouse over and the fatal flaw. The sensor isn’t placed at the center of the mouse but almost under your thumb…
Then I reconfirmed my discomfort. Since the box says that it’s the best mouse the “mice experts” came up with after making a billion mice, I figured I must be able to use it at the zenith of comfort. I closed my eyes and made the most natural horizontal draw (ie, rotate around a point on the wrist which is placed on the table such that the instantaneous motion of the mouse is the tangent of the arc I’m drawing). I look and the cursor is moving diagonally on the screen.
In order to produce the intended horizontal move, I had to either lift and move my wrist (very uncomfortable) or continuously extend and retract my wrist (very uncomfortable as well). You can also resolve this if you hold the mouse differently. If instead of putting the thumb into the intended groove, you rotate the mouse to compensate for the vertical move, you can also draw horizontal lines at the cost of having a gap under your palm.
Overall, it’s a sexy sleek black mouse but not necessarily ergonomically superior to the 2$ mouse you can get at any random stores. In other words, if you want to pay 100$ for it, you’d have to be willing to buy the different look, not rationalise it with ergonomics.
Suppose you want to make some web app that lets users input addresses. I would be nice to
Some governmental entities provide this information via public APIs but if you want a uniform service, why not use Google?
Fortunately, Thor Mitchell, a Google Product Manager, posted an excellent example code that does all of the above using Google Maps JavaScript API. Even better, it’s with the new V3 so it’s not obsolete anytime soon. It’s originally posted here in the comments of a blog by Gabe Sumner. It definitely deserves more recognition so here it is again as is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Map Simple</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var geocoder, map, marker;
var defaultLatLng = new google.maps.LatLng(30,0);
function initialize() {
geocoder = new google.maps.Geocoder();
var mapOptions = {
zoom: 0,
center: defaultLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(
document.getElementById("map_canvas"),
mapOptions
);
marker = new google.maps.Marker();
}
function validate() {
clearResults();
var address = document.getElementById('address').value;
geocoder.geocode({'address': address }, function(results, status) {
switch(status) {
case google.maps.GeocoderStatus.OK:
document.getElementById('valid').value = 'YES';
document.getElementById('type').value = results[0].types[0];
document.getElementById('result').value = results[0].formatted_address;
mapAddress(results[0]);
break;
case google.maps.GeocoderStatus.ZERO_RESULTS:
document.getElementById('valid').value = 'NO';
break;
default:
alert("An error occured while validating this address")
}
});
}
function clearResults() {
document.getElementById('valid').value = '';
document.getElementById('type').value = '';
document.getElementById('result').value = '';
map.setCenter(defaultLatLng);
map.setZoom(0);
marker.setMap(null);
}
function mapAddress(result) {
marker.setPosition(result.geometry.location);
marker.setMap(map);
map.fitBounds(result.geometry.viewport);
}
</script>
<style>
body {
font-family: sans-serif;
}
#address {
width:300px;
height:150px;
float: left;
margin: 10px;
}
#map_canvas {
width:256px;
height:150px;
margin: 10px;
}
#validate {
clear: both;
}
#results {
margin-top: 10px;
}
</style>
</head>
<body onload="initialize()">
<div>Address</div>
<textarea type="text" id="address"></textarea>
<div id="map_canvas"></div>
<div id="validate"><input type="button" value="Validate" onClick="validate()"></input></div>
<div id="results">
<table>
<tr><td align="right">Valid:</td><td><input type="text" id="valid" size="60"></input></td></tr>
<tr><td align="right">Matched:</td><td><input type="text" id="type" size="60"></input></td></tr>
<tr><td align="right">Result:</td><td><input type="text" id="result" size="60"></input></td></tr>
</table>
</div>
</body>
</html>Only 100 lines! It uses Google’s GeoCoding JavaScript API and you can fancy it up easily with jQuery. In the validate function, the results variable contains of course json formatted responses as described in Google’s docs. Looking at ‘address_components’ will give you the properly formatted address separated by parts which you can put into database.
For a backend solution, you can use pygeocoder, a Python library, to validate addresses.
A quickie:
import ipdb; ipdb.set_trace()
This puts a breakpoint in the code using ipdb. It has the advantage of having better formatted output, tab completion etc over the vanilla pdb
If you load a GIF file with PIL via Image.open(‘giffile.gif’) and then try to look at its pixels, you would get integers instead of tuples since the GIF pixels refers to one of the 256 colours in the GIF colour palette. The palette would then contain the RGB value of the pixel.
To avoid all this hassle and just get RGB tuple directly:
gif = Image.open('giffile.gif') rgbimage = GIF.convert ('RGB') rgbimage.getpixel((0,0)) >>>(231, 10, 54)
Used a NumPy array. Doesn’t work if the diagonal+1s are white of course.
import Image from numpy import array, zeros, uint8 line = Image.open('wire.png') # third dimension is for colours a = zeros((100, 100, 3), dtype=uint8) step = array([0, 1]) position = array([0, 0]) count = 0 # continue until when the next spot expected to be unfilled is filled while not max(a[tuple(position)]): # paint colour a[tuple(position)] = array(line.getpixel((count, 0))) # if reached a wall if max(position + step) > 99 or min(position + step) < 0 or max(a[tuple(position + step)]): # change direction step = (abs(step) ^ 1) * (-step[0] if step[0] else step[1]) # advance position += step count += 1 # convert to image Image.fromarray(a).save('swirl.jpeg')
a = array((1, 2, 3)) print a >>> array([1, 2, 3]) tuple(a) >>> (1, 2, 3)
Pretty lame right?
This tutorial will help you use ABAP to connect to any web service and process the resulting output. ABAP has native support for XML so it will be easiest to get your information in XML format rather than JSON and others. For this example, I will use a CBC’s news feed but it can be Digg top stories, Twitter, anything. The XML should look something like the picture below where each news article is enclosed in <ITEM> tags.
First, you need to use cl_http_client to create an instance of if_http_client for your get.
DATA client TYPE REF TO if_http_client. CALL METHOD cl_http_client=>create EXPORTING host = 'rss.cbc.ca' service = '80' proxy_host = 'my.proxy.com' proxy_service = '8080' scheme = 1 IMPORTING client = client.
Use proxy_host/proxy_service if you have a proxy server you need to go through. Scheme = 1 indicates HTTP, 2 is HTTPS. Next, you would set some parameters of the client.
client->request->set_method( if_http_request=>co_request_method_get ). client->request->set_version( if_http_request=>co_protocol_version_1_1 ). cl_http_utility=>set_request_uri( request = client->request uri = '/lineup/topstories.xml').
which puts your request as a GET method, sets the protocol to use HTTP 1.1 and sets your destination address. Then you perform your actual request and get the response synchronously:
client->send( ). client->receive( ). DATA bin TYPE xstring. bin = client->response->get_data( ).
This gives you a response in binary format. The next steps converts it into string:
DATA conv TYPE REF TO cl_abap_conv_in_ce. DATA response TYPE string. conv = cl_abap_conv_in_ce=>create( input = bin ). conv->read( IMPORTING data = response). client->close( ).
Now your XML response is in the response variable. Now to turn the XML into a series of ABAP objects. To do so, we will make use of ABAP’s CALL TRANSFORMATION keyword. It is well documented in the help documentations and makes use of a XSLT (or XSLT-like depending on the method you choose) template to transform XML into ABAP objects and vice versa. 2 native methods exist. You can either use the XSLT method in which case ABAP makes an identity transformation of ABAP into pseudo-XML which you can then manipulate into XML using your XSLT template. This results in a 2 step operation and is not symmetric. You can also use SAP’s proprietary Simple Transformation method where you define a XSLT-like template which makes the direct transformation between XML and ABAP objects. For this example, I will use the Simple Transformation method. Looking at the XML, there are some header tags for the feed, then there are news articles each in a <ITEM> tag with its own properties. My objective will be to get the title and description of each article. For it, I first create a structure in ABAP to match my desired data.
TYPES: BEGIN OF news, title TYPE string, description TYPE string, END OF news. DATA: feed TYPE TABLE OF news, article TYPE news. CALL TRANSFORMATION z_cbcnews SOURCE XML response RESULT root = feed.
after setting up the variables and types for the news, I call CALL TRANSFORMATION. Double clicking z_cbcnews will let me define my Simple Transformation template.
<?sap.transform simple?> <tt:transform xmlns:tt="http://www.sap.com/transformation-templates"> <tt:root name="ROOT"/> <tt:template> <rss> <channel> <title> <tt:skip/> </title> <link> <tt:skip/> </link> <description> <tt:skip/> </description> <language> <tt:skip/> </language> <lastBuildDate> <tt:skip/> </lastBuildDate> <copyright> <tt:skip/> </copyright> <docs> <tt:skip/> </docs> <image> <title> <tt:skip/> </title> <url> <tt:skip/> </url> <link> <tt:skip/> </link> </image> <tt:loop name="news" ref=".ROOT"> <item> <title> <tt:value ref="$news.title"/> </title> <link> <tt:skip/> </link> <guid> <tt:skip/> </guid> <pubDate> <tt:skip/> </pubDate> <description> <tt:value ref="$news.description"/> </description> </item> </tt:loop> </channel> </rss> </tt:template> </tt:transform> </tt:transform>
Following the XML format of the CBC news feed, I first ignored all the header elements. Then I looped into variables of type news in which had a tag. Then the <ITEM>’s and <DESCRIPTION> are matched into attributes of the news structure. Since the CALL TRANSFORMATION is call to output a table of news (feed), I end up with an internal table of news which I can then manipulate with ABAP such as:
LOOP AT feed INTO article. WRITE: / '=================================================================='. WRITE: / article-title. WRITE: / '==================================================================', /. WRITE: / article-description, /, /, /. ENDLOOP.
The end result should look something like this
On most virtualisation software like VMWare’s etc, the guest machine’s hotkeys which requires ctrl-alt (such as ctrl-alt-f1 etc for tty change in Linux) can be blocked because ctrl-alt is used to release mouse/keyboard with the VM software. If you use it only occasionally, you can first temporarily disable the release hotkey by pressing ctrl-alt-space then your intended hotkey such as ctrl-alt-f1
Trying to install VMWare tools from packages.vmware.com/tools repository in Ubuntu but getting a error while installing packages? There seems to be package dependency going back to open-vm-tools-kmod-generic but it doesn’t exist. When you try to install the next level of package, it would say
“PreDepends: vmware-open-vm-tools-kmod-… but it is not installable”
Unfortunately the VMWare Installation Guide isn’t clear on this matter whereas the Ubuntu documentation is much better. It shows that you can either use the open source version directly available via apt-get or you can build the kmod (kernel mods) from source using the source files in the VMWare repository.
One praise for the Chinese transport system. One full year after my travels to China, as I’m writing about my experiences, I think to myself, of all the sketchy travel plans and the random places I’ve been to at random times, never I’ve been lost or sent to the wrong place. The Chinese system of transport with its trains and planes and most importantly voyager busses is truly a marvel. While western system are more techno-intensive, the Chinese system is seemingly completely based on people with their pen/paper and the all important cellphone. You could be shopping for roadside snacks and if you mention you want to be in another city by tonight, he would whip out his phone book, make a couple of calls and arrange for you to be picked up right where you are by a motorcycle, driven to the gas station the driver of the long distance bus agreed to fuel up and pick you up at, board the bus and pay for the remainder of the bus’s trip for a nominal cut of the deal for the food vendor (often less than a dollar).
This is how I got to the bamboo forest, 蜀南竹海. And fuck the 20 minute motorcycle ride with a laptop and camera sling bag and a 20kg rucksack sucks ass.
Later, I found out I was the only person on the bus heading there. But it was ok. The bus driver, no less expert in his people business has already planned it out for me. He had arranged for another smaller van to wait for me at a road junction who took me into the forest without extra cost. While customers work with cash, the primary medium of exchange amongst these merchants seem to be something else. They work with a system of points/favours. A cab driver who convinces a customer that a tourist attraction is worthy of a visit? The cab gets his fare but he also gets points from the operator of the attraction that he can exchange for a free car wash for example.
Taken by a small van into the forest? Sounds like how every kidnap story begins? Perhaps. Was this the very thing every sketchy China stories has warned me against? Yes. But then again, isn’t this why I came to China? Magnificent sights yes but to figure out life as it is and not as a story, not as someone else’s experience.
So here I am at the bottom of the mountain forest. Here, I’ll rest a night before moving up the mountain in the morning. Besides, out here in the woods, there really isn’t anything to do after the sun sets. When I arrived at maybe 10pm, the owners seem to have gone to sleep long ago and woke up to make some simple food for me.
The next morning, a bit of sight seeing before heading to the middle of the mountain. The climate here is truly peculiar. The descriptions of romanticized historical war stories have not exaggerated their descriptions of the battlefields. This forest does give the feeling of fictions. Extremely dense fogs, accentuated mountainous terrains and heavy vegetation makes one think a massive ambush might spring right out of the woodworks at any time.
The fog is so dense that standing at the bottom of a house, I couldn’t see the top of it. When it clears slightly, I can catch a momentary glimpse of waves of fogs traveling through the trees downhill before the vision becomes filled again.
Not only the visibility is almost zero, the place is incredibly humid as well. This would serve as a solid preparation for Hong Kong as I sweat my ass off climbing wet slippery moss-laden rocks leading up the mountain.
Just as I’m invigorating myself in this amazing sight, some more “professional” tourists zipped by the mountain road in their black Audis. Then we have the men in suits and the women in high heels in what would otherwise be a treacherous mountain.
As a side note, wedding photography is really going on in China. Most importantly, many of them are outdoors in scenic areas.
Since 丽江 (Lijian), I was somewhat influenced by the restaurant owner who says he takes every single landscape pictures with a tripod. So now with his tripod, I’ve been eager to try it out and see the difference. The busy streets of Lhasa wasn’t suitable and the Bamboo forest is my first opportunity to test it out. What a hassle… So glad it was a carbon fiber tripod instead of a metal one.
Even away from the bustling city, from the stressful and the superficial, people still find all sorts of ways to make money. They would even direct trekking routes to loop over water a couple of time such that it becomes uncrossable without paying rafters.
Then a huge trek to the mountains for I don’t know how many hours. Along the way, I passed by a filming spot of Crouching Tigers, Hidden Dragons (could imagine why people would want to film here). On the cliff edges of the mountain, I have no idea how high up I am. With the fog, I couldn’t see a meter off from me. And then the winds came and occasionally, for 5 seconds, I would see the other peaks of the mountain. Incredibly, people have built complexes of temples and houses right into the sides of the mountain.
The next day, after eating some fresh chickens from the backyard, I rented a bamboo raft and only got a long round stick for a paddle. While I was struggling in the water, the woman sitting in their waterfront restaurant-house, playing mahjong with her bunch of friends would occasionally scream at me: “Paddle with it!”. Then why not give me a real paddle? Having given up after a while, I just sat down in the raft, bathed in sunshine and ate sunflower seeds for half an hour.
After over a week of staying in 兰州 wrongfully thinking it is one of the better cities in China, I decide it’s time to finally move on. Next target is 成都 (Chengdu) although it’s a bit out of the way. The main purpose is to see the aftermath of the May earthquake. I don’t have much skills in the way of assistance but maybe they could need a photographer. My roommate Eric was just there about 20 days prior and said the city’s full of action and that he left the same day of arriving since he can’t do anything to help and everyone else is busy at work.
For me, the trip to 成都 is a bit filled with the unexpected. First the trip in via railway. One of the main annoyances in China, perhaps reflected by the inertness of its media, is that when something goes wrong, you’re never told what’s wrong or offered an explanation especially in the state owned sectors such as transport. I got on the train thinking an easy overnight trip but waking up in the morning ready to leave, the city is nowhere in sight. Later did I find out from fellow passengers that the path is detoured through 西安 (Xi’an) due to impassable tunnels in the previous route because of the earthquake. A totally reasonable rationale but only if they’ve told the passengers in advance. I would have planned to stop in 西安 to visit first instead undertaking this 24+ hour trip.
Arriving finally in Chengdu, I quickly dropped my stuff at a hotel and started walking around to see if there are any visible consequences of the earthquake. By this time, the throng of these “agents” who try to get you to stay at their hotels are becoming less of the nuisance and can be actually useful. All the crazy stories that I’ve been filled with about China where following one of them will end up with me in a dark corner attacked and robbed is simply becoming less and less likely. These people are simply people like me trying to make a living. They may be pushy to do business but nothing shamefully dishonest or illegal.
Expecting tents and rushing supply trucks etc, the city looked like nothing had happened more than anything else. The most discernable thing was a crack in the wall of my hotel room. After a week of staying in proper hotels in Lhasa, this habit is becoming hard to lose and comfort hard to give up. I have mostly stayed in hotels instead of hostels from this point on. Not a particularly regrettable thing now that I realize how much more expensive everything is here in Canada compared to the difference of prices in the accommodations.
The next day was going to be my only day in 成都 and what a day it was! Still unused to the idea of taking taxies for short hops, traversing 成都 on foot definitely turned out to be quite a walk. The city had a rather interesting layout where major streets are eccentric circles.
In a Buddhist temple in the middle of the city, I have enjoyed one of the least touristic religious environments in China yet. Monks are there seemingly to pursue a higher purpose than to serve as an attraction, people are praying as a part of their routines, religious scholars from the Southern and Tibetan disciplines are present to learn and exchange teachings. In the back garden, the old are doing Tai Chi and the young are debating the purpose of life with Monks.
Despite this, commercialization is even more present. As I’ve learnt in Lanzhou, almost every city in China has a “technocity” or a massive conglomeration of malls that sell nothing but cameras, computer parts, gadgets, a geek’s dream coming true. Here in 成都, 盐市口. As almost every other Chinese city would have, 盐市口 is a shopping district. Paved with stone patterns, this roughly 4×4 blocks of plaza is lined with multistory shops or big domestic and international brands. A microcosm of new ideals, clean, modern, shinny, open, capitalistic, this center is a big attraction to China’s new middle class.
I’m writing in Hong Kong today in a small gap between papers and exams about the trip from over 4 months ago. Time definitely flies and I’m picking up writing again because I’ve looked at the website today and just realized how interested I am at the stuff that I’ve already forgotten. So before I forget more, I will record it.
I pick up the story from the night in Namco. The first night went by ok. No one got murdered. I made a few photographer friends while there and decided to get up early in the morning to photograph the sunrise and little did I know that this is the start of a long curse I will suffer (hint, it has something to do with photographing the sunrise). I got up, my bedsheet was wet because the container box – house we lived in was leaking. So to top the beautiful morning off… there was no sunrise (visible). My 广东 (Guangdong) friend was feeling like shit. He wasn’t that much better off the day before and this high altitude reactions definitely kicks in with age. And he somehow convinced me that there’s nothing left to see here and that I should leave with him… The shitty thing about travelling in group. Well, I did. A richer photographer was doing his express one-day-a-city travel of the west in his SUV and was nice enough to bring us to 当雄 (Dangxiong) for the train. My Guangdong friend didn’t like him and calls him 大款 (big shot) for traveling with too much style. Too bad I didn’t get to horse ride with one of horses whose owner literally followed us the day before for an hour relentlessly trying to get us to ride her horse without saying anything convincing but by just repeating the same thing over and over for an hour. p.s. her skin was pretty badly burnt just from the UV for living at such a high altitude.
At 唐古拉 (Tang Gu La) mountain at 5200m above sea, the train unexpectedly stopped and it wasn’t until 2 hours later did the train continue moving. Passengers were completely uninformed during the period and it was only until the day after that I found out through newspapers on my mobile phone that we suffered 3 level 5 earthquakes and were very near the epicenter.
Then my subsequent trip to 兰州 (Lanzhou) was completely unplanned and unexpected. I knew nothing of the city previously and only got off there because the train ride would be too long otherwise. And since 兰州 was the first “big” city have I have yet stayed at by myself, I stayed for way longer than I should have since the following cities are all better and because by objective standards, 兰州 is a pretty poor and shitty city for China.
But my first impression was definitely nice. It has some really nice pedestrian streets and public squares. Even the superstores are big like Walmart but have 4 floors. It’s also among the areas in China that has the highest concentration of Muslims. And they definitely have some very impressive mosques. And it also happens to be the only place I’ve ever been kicked out of a religious building for visiting respectfully. In an interesting conversation I had with a hawker in the Islamic section of the city, I asked him why is he not attending one of the 5 daily prayers taking place right now, as his faith requires. He answers, if he does, no one will be watching his shop and making money. The stereotype seem to apply in most of China where the Hui minority (who are Muslims) are more adept at making money. Even when I was in Tibet, I was hearing speculations of an underlying Tibetan protocol during the March unrests where forgive my bluntness they wanted to oust the Han and kill the Hui since they are taking their business away. We first stayed in a really shitty place since my 广东 friend, who’s still with me, have a different mentality than northerners do when it comes to traveling. While we think during travels and while away from home, one should care less about money and more about taking care of themselves, who are in more vulnerable states, by eating well and resting in nice places where for him, it’s about spending as little as possible. In the end, we paid roughly 30RMB a day each.
Here in 兰州 I was first exposed to the Chinese “Internet Bars” (one of the reason I ended up staying in 兰州 for longer than I planned) with tons of impressively priced deals for playing computers overnight and excellent service to keep you comfortable and fed, it became only a rarity for customers to leave in the middle of the night. For roughly 25 cents an hour, the internet bars are always full with kids served with powerfully geared computers, extremely fast internet and a vast amount of software, games and movies (all illegal of course).
The next day in Lhasa, I got to the train station and bought a ticket to 纳木错 (Namtso), the highest lake in the world at some 4700m above sea. The train station is really something… It’s actually a lot nicer than the Lhasa airport but for some dumb reason, they both had to be hundreds of kilometers away from the city. The inside of the train is amazingly nice as well and rivals the Thalis or something. Compartments are pressurized and have oxygen supplies. The ride to 当雄 (Dangxiong), the nearest city, is short and at the platform, only 2 people came off so of course, we, me and a guy from 广东 (Guangdong), the province on top of 香港 (Hong Kong), decided to group up for our trip to the lake.
There’s a little town that’s set up for tourists right next to the lake. Well, it’s not really a town, just a group of container-like temporary houses and the hosts stay there for a few months during the summer and move back out into the city during winter. And not every car can make it there. Most Japanese cars can’t and just stall on the way due to lacking oxygen.
Out here, the feeling’s very different than from Lhasa. The extra 1000m in altitude makes a difference. Climbing mountains here is very time consuming. What would normally take 20 minutes would take an hour. It’s fine when I’m not moving though. Everything is indeed a bit less forgiving than before. First, there’s always the risk of pulmonary edema at this altitude. I can’t take any risk of catching a cold as apparently, it will always end up becoming pneumonia and can be live threatening. There has been several cases of (older) photographers who comes to the lake for its magnificent view just like me and never making it past the first night or passing away as they’re being driven out in ambulances towards the train station. Hilltops are impossible to stay at without more professional clothing. Hard and dry wind made my skin feel very uncomfortable and cool despite having like 4 layers of cloth, half of them being very solid windbreakers elsewhere.
Besides the environment the people of course feels very different as well. They seem…. harsher. Just gotta be more careful about what to say and one thing I’ve observed is absolutely horrible. The parents would “train” their kids to become beggars at young age. On seeing tourists, the parents would send out kids to trail the tourists and follow them for 10 minutes sometimes. Of course, you can’t give them money or 10 other families would mark you as the prey of the day and send their kids (without mentioning that they’re giving a nod to the horrible way of life the kids would be used to) and you can’t get angry at them because they would then send the husbands out to beat you down.
But that doesn’t change the fact that the scene there is absolutely amazing. Despite very harsh winds, the surface appears very calm and is so blue it’s surreal. The entire lake is surrounded by snow peaked mountain ranges. Since the locals don’t actually live there permanently, they have no other income or occupations beside the tourism industry. Half of them are herdsmen only to have steeds for tourists like horses and yaks. The entire hillside’s yaks are there only so tourists can take pictures with them.
As the night sets on the first day, it truly did feel like we’re on our own. The law definitely has no presence here. The only sheriff-ish dude is a normal looking Tibetan dude like everyone else there. There are 2 Han Chinese stores (whose owner, we later found out, lived 2 very hard years before security got a bit better here) in the settlement and at night, as we’re having supper and drinking tea, we closed the windows, dimmed the lights and begun our first rounds of discussion in our temporary communists’ assembly.
A light day today. I’ve visited 大昭寺 (Jokhang Temple) and 小昭寺 (Ramoche Temple). 大昭寺 can be said to be the most important temple of all Tibet and its support beams is filled with embedded teeth from pilgrims from 青海 (Qinghai) who can’t make it to Lhasa and therefore would have fellow pilgrims bring one of his tooth to the temple as to fulfill his wishes. Again, the Buddha statue brought over by 文成 princess is the holiest possession of the temple. I was told coming out of the temple that the land in front of the temple, now dedicated to hawkers trying to sell souvenirs, was still a body of water a few years back and the lake that previously stood where the temple is is completely gone now. Unfortunately, there were no monks in any of the temples I’ve visited in the recent days. Later, I found out from a tour organizer that they’ve all been invited to be “reeducated” somewhere… Also very unfortunately, I couldn’t photograph these locations.
The day after, I moved to 日喀则 (Shigatse). This place gives a very different vibe than Lhasa that is hard to explain. First, it’s dusty as fuck here! Enough that my nose hurts. I think in all of China that I’ve seen so far, I’d be the only male to wear a face mask… very confidence inspiring. Besides that, this place feels more authentic than Lhasa in some way. The Han seem to be opening bigger stores and look richer, the Tibetans seem more traditional and the monasteries actually have monks in them and the Muslims are a lot more prominent as well. In all, this place feels a lot more “China” and is hardly distinguishable from other cities if it weren’t even higher in altitude than Lhasa.
p.s. they have a very strict traffic regulation in that part of China and vehicles have to go through checkpoints and receive tickets for the earliest time they can arrive at the next checkpoint. This makes speeding essentially pointless since if they speed and arrive early at the checkpoint, they will have to way before proceeding through.
The next day, I visited another very well known monastery, 扎什伦布寺 (Tashilhunpo Monastery). 日喀则 is supposedly under the watch of the Panchen Lama who is also referred to as a living god. Apparently here, during March, no incident happened because their living god resides here in the city. The same afternoon, I took the bus out back to Lhasa, abandoning my initial plans to visit the Everest because the presence of the Olympic flame is making the procedures to get in extremely hard. I have to apply for special permits to approach the national border and having a foreign passport is making that a lot harder. I’d also have to wait for next week because it was the weekend.
Wanted to go to 哲蚌寺 but unfortunately, it was blocked off by unarmed Armed Police. They were from other provinces and haven’t even visited the city yet. They were under the jurisdictions of the local cops. I did manage to go into the Potala Palace in the morning though. I think the Tibetans take religion more seriously and in a more integral manner than anyone else I’ve seen. Everyone shows respect for religions sites and from prayer wheels to mumbled sacred scripts, that respect is well built into their daily lives.
The Potala temple is an impressive compound that started as a welcoming site for the incoming Han princess 文成 who brought along a statue of the first Buddha represented during his 12th year of age. Atop the palace, the princess threw her ring to decide the site to house the statue and it landed in a lake. Then, the entire lake was filled to construct the temple 大昭寺 which is still the holiest of temples in Tibet and the destination of most pilgrims. The fifth Dalai Lama, one of the most meriteous Dalai Lama, enlarged it mostly to its current size as the seat of power. His merit is reflected in the size of his 灵塔 (a tower tomb) which is constructed with many tons of solid gold. The Potala temple itself and all its contents is truly a testament of the power of the ruling classes of feudal Tibet. The palace itself is built with rocks and wood, both of which don’t originate from Lhasa. As the terrain is too inhospitable for working animals, all the large timbers used as structural members and rocks were moved by slaves from far cities. It is unfortunate that today, the palace holds a strong ownership over photographs and pictures are not allowed inside the palace.
The bottom of the palace is a Zhol village for the palace’s serfs. I’ve visited the jail and seen the actual sheets of human skins whose pictures have been floating around the web. The interior of the palace itself glows with luxury. The tomb of every Dalai Lama is housed inside the palace and every Buddhist artifacts is said to be worth more than entire cities let alone towers of Dalai Lamas that are weighed in tons with gold. Even the 13th Dalai Lama, whose power was stripped by the late Qing dynasty, received a glorious crypt for having repented for inviting foreign English influence into Tibet during its years of independence. His tomb is so filled with gold and jewels that it’s the only area in the palace that is off limits to visitors.
The night scene of the palace is no less glorious than during the day. Searchlight beams light up the entire palace. During my day of visit, I’ve been hearing more rumours of money involved in the March 14th incident. That 100¥ was given to everyone who’s willing to cause troubles.
… and still alive!
OHhhhhh WTF!!!! Some one knocks on my door, I open and it’s a fucking cop. I was ready to jump for my knife and the guy hands me 5¥… Turns out he’s just the security for the hotel and he’s handing me the change for the Lhasa beer they just delivered to my room. Xiao lives another day!!
I got up too late today and sights around Lhasa closes early. Potala temple can only be entered during the morning so I ended up walking around the city and reading in bookstores for another day. Forget the whole ethnicity thing yesterday, it’s actually extremely easy to recognize 汉 (Han) from 藏 (Tibetan), I just haven’t seen any non-Tibetans yesterday in the East side of the city. But moving towards the Potala temple and to the west of it, almost everyone is clearly Han. Even the cops are more Han than Zang. Funny thing is no buildings in the Han majority area is damaged. But here, I can clearly see that the fancier stores are owned by Han Chinese.
The square in front and the park behind the Potala temple are very nice and relaxing. Tibetans are playing chess and turning their prayer wheels and the Han tourists are taking pictures and walking around with their shopping bags.
The entire west side of the town seems to be a giant car dealership and nothing’s damaged here. The police presence is a bit higher on this side too. The most intense security I’ve seen so far is a command vehicle with loudspeakers mounted on the roof.
Getting into Tibet
My next problem… no one knows how to do it. But from the bits and pieces I’ve gathered for a whole day in Shangri-la, there is still hope. But before that, I went to visit 松赞林寺 (Ganden Sumtseling Monastery). It’s the second biggest monastery-palace after Potala temple.
———————————-
Now to get in Tibet, no one would sell me a plane or bus ticket because I have a passport and after finally finding someone who knows a bit about this subject in a hotel, I understood that the travel permit can only be done from inside Tibet and then mailed out. The cost is high and the waiting period is long. Then, it is when I decided, fuck it, I’ll go it with a sketchier method. I still have a registration paper from when I was young and only a photocopy will suffice. Officially, it expired as soon as I got my Canadian citizenship but there was no way for them to know. So boom, I got my plane tickets. But I didn’t realize how well connected or informed the Chinese police is…
More shots of “downtown” Shangri-la:
Lhasa
I got in Lhasa, finally. Coming out of the airplane, the whole oxygen thing is first a lot better than I thought. There is no real hard impact and you just feel tired for the first 20 seconds and don’t feel it again. The landscape coming in from the plane is quite something. The land is much more barren than Yunnan and goes through a variety of terrains.
Taking the bus into Lhasa, the city is surprised me. Because in itself, Lhasa is very much like any other big Chinese city. The roads are broad and clean, the vehicles on the road are similar and the people are busy and well dressed. Once on the streets, the Tibetans in the city give the same vibes (never mind, Tibetans aren’t as likely to babble with any outsiders and suck at getting things done) as the people in any other cities and the atmosphere is much more welcoming than Shangri-la. The city is well developed with buses, water and electricity everywhere. Businesses are everywhere and no one seem to be just wondering around aimlessly. There’s no religious fanatics or beggars. First thing I wanted to notice is the ethnicity distribution and proportion but as hard as I try, I can’t tell the differences. Some are clearly Han Chinese because their skin is much paler and some are clearly Muslims or Tibetans looking at their complexion and cloth/headdress but the far majority are just dark skinned people with black hair and black eyes. One clear evidence of class distinction that stands above other though is the presence of little taxi-tricycles and visibly, the riders are mostly Tibetans and the passengers are all Han Chinese.
After some contact, the Tibetans are very friendly people and no much different from people from the central plains. Their views on order and social structures are also digestible and in fact, quite equivalent with people from the other provinces. It’s hard to picture how they could bring themselves to the streets and through violence burn down other people’s homes etc. I am eager to find out but first, I’m taking a trip to 色拉寺 (Sera Monastery) for their philosophical debate session.
k… no debates, so then, dumb enough of me, I decided to climb the mountain behind it. The monks in the monastery seem to really take this material world as irrelevant. The buildings are essentially unmaintained with broken windows everywhere and there’s just shit everywhere around the monastery. The sounds of the buzzing flies are just deafening. Other than that, the monastery seem pretty empty and I’ve seen no more than 10 monks.
——————————————–
The serious part
After coming back into the city, I walked around the local markets and surroundings and the damages from March are still very visible. There are burnt buildings everywhere but there seem to be something off. First, there seem to be no concentrated location for the destruction where the buildings are critically damaged. The damage is pretty widespread and the burnt buildings seem to be very evenly distributed in distance and equally damaged. There are never 2 adjacent buildings both burnt down or any building completely destroyed. Businesses have already returned to operation, sometime within the canvas where the building previously was but now with no walls or doors. There are very small amounts of repairs being done as well. But besides these relics of destruction, no sign of tension is detectable. It feels like everyone has forgotten the incident.
Number 1 questioned, a storekeeper, Tibetan. He sells crafts and cultural souvenirs essentially and sells them now in a little stall outdoors. He sells outside now because his store was burnt down and his inventory looted this March. He speaks of the event like a victim and says he doesn’t know where those group of aggressors suddenly emerge from and have never seen those people before. He also speaks of Tibet’s separation from China as a marginal thing. Then he carried on to pushing me to buy a prayer wheel from him.
The second person I questioned is in the food market. He is also a Tibetan and his store and his home was burnt down. He seems to be very eager to talk about it but before I can ask him more, the market’s public security guy, who looks Tibetan but I couldn’t be sure, told me to stop asking questions and stop taking pictures. At least he didn’t ask me to delete them.
Some distance North, another group of stores burnt. Here, there’s a gang standing in front of it and all stared at my camera while and then discussed something amongst them. It’s when I noticed that there’s a pretty professional video camera on the second floor of that same building pointing across the street towards a temple entrance that I decided it’s time for me to leave. The group followed me for a short distance before giving up. I have no idea who they were but I decided it was enough for today.
Thinking I’m safe back at the hotel, there’s more shit brewing there as well. The hotel registration? well it wasn’t just a guestbook. The whole hotel industry is completely connected with the police and they’re not taking any time. Apparently during the afternoon while I was gone, the police visited to ask how did I manage to get into Tibet without a Travel Permit. I better get out of here real fast.
I’m now in 小中甸 (Xiao Zhongdian), a Tibetan town. The atmosphere is very different all the sudden. I’m alone again this time and now that there’s no one to talk to, I write. Sorry that any previous attempt to keep the blog in a chronological order is completely gone now.
小中甸 is on a plateau 3.8 km above sea level. I went there on recommendation from a restaurant owner whose website is i.cn.yahoo.com/lj_dongbahouse. But once I got there on bus, I thought to myself: “shit… there’s nothing here”.
I went from the cozy and friendly ambiance of 丽江 (Lijiang) to the vast emptiness of Shangri-La
I did end up seeing a village at some point down the path. Not too many people, I’d guess 30 max, Tibetans. The houses are all slanted and crumbly but the people are extremely nice. They would all greet me warmly and then laugh about me while saying stuff in Tibetan. But this would all change once I get into the city.
But getting into the city is a first challenge. 小中甸 is truly just a gas station on the side of the highway. My hopes are to catch bus heading for Shangri-la on the way and hop in. I did end up making it back to the road by 7 but every bus on the way were full. Then the skies got darker and darker and colder and colder. At this point, I just wanted to get out and hoped to hitch hike with some nice locals driving tractors or something and make the 30km to Shangri-la but there were no locals driving around. Then I was hungry enough that I just wanted to buy my way out and offer a shitload of money to anyone with a vehicle but the only people left on the road are snobby rich tourists in their Hummers and Audis and none would stop for a guy with 2 packs on the side of the road. Then, as if mercy was offered, a travel bus appeared after 10 minutes of complete silence and stopped next to me…
Once in the city, the atmosphere isn’t much better. This place is not exactly the paradise or Shangri-la as the British author James Hilton would have described. This place is cold, and cold in every way. First of all, almost every second store in the city is a knife store. The entire place is dark and the streets dirty. The people don’t seem as friendly either and the hotel staff suck at keeping the place in shape.
Benro M-227 n6 and KS-1 Review
These are the new tripod and head I’ve just bought. Benro is a Chinese brand who tries to copy the french bra
nd Gitzo and the Swiss brand Arca down to every detail.
I bought them from the same restaurant owner as mentioned above. He has like 4 tripods and this is his second best set. The tripod itself is very solid and also decently light. Its legs are made of carbon fiber and makes a plasticky sound when hit. But at least it isn’t cold by touch like metals. The entire set is waterproof and the structure is very solid. Once the spikes go in the ground, it won’t move. The ballhead is smooth and the motion is natural. It is very easy to tilt and control to get the angle I want. There’s many axis of motion besides the obvious rotations of the ball. Horizontal motion is controlled by a knob at the bottom of the head and the entire head shifts up and down as well. In all, the value is superb and I could have ended up with a much cheaper tripod if I bought a better known brand.
Ummm…. Vancouver is very niiiiiiiice. Just in general, it feels cleaner and more modern. Probably since they don’t get 100000m of snow or have hockey fans trashing the city like us. The buildings are quite more stylish and are a lot more glassy, probably because of weather too. Even the electric buses and the lack of a subway adds to the nicer-climate-feel of the city. You won’t even hear those buses creeping up to you until you get hit. The view down every street is amazing with snow peaked mountains in the background and cherry blossoms in the foreground.
Lost Lagoon and Stanley Park also gives a nice relaxing ambiance and are just nice places to take a break. There’s shores and sand everywhere and the whole pace of the city seem to be slower and more relaxing. It’s definitely a nice place to have little retreat house when I get old.
Next stop…. Nanaimo