After a battle, the program crashed and asked me to send a report. Since then, I'm able to match a team, but cannot open the play screen any more. In Active Monitor, the Userkernel is not responding.
Here is a solution, this works to my case, may be not applicable for other problems that cause userkernal not responding.
1. Open Terminal.
2. enter "rm -r ~/Library/Application\ Support/LolClient" and press return button.
enter "rm -r ~/Library/Caches/LolClient" and press return button.
3. Reopen LOL it should be work.
These commands just clear caches and some configuration of LOL, so it is safe. Alternatively, you can open the path with Finder and delete the folders there.
Denny Mo's blog
Sunday, 9 March 2014
Sunday, 29 December 2013
Install zend debugger for php 5.4.x on Mac OSX 10.9 64bit
After updating to OSX10.9, the default php shipped with OSX is updated to 5.4. Zend.com doesn't publicly provide a zend debugger for php5.4. The files used in this article are shipped with zend server. Here is the steps to install zend debugger for php5.4 on Mac OSX 10.9 64bit.
Step 1. Download ZendDebugger.so (download link) from https://github.com/mkb2000/zend_debugger.
Step 2. Put ZendDebugger.so to somewhere like /Library/WebServer/Documents/zend_debugger.
Step 3. Modify php.ini. The default configuration file used by Mac OS is at /private/etc/php.ini. Admin permission is required to modify this file. So go to /Applications/Utilities and open Terminal. Enter sudo nano /private/etc/php.ini. Jump to the end of this file and add
Step 1. Download ZendDebugger.so (download link) from https://github.com/mkb2000/zend_debugger.
Step 2. Put ZendDebugger.so to somewhere like /Library/WebServer/Documents/zend_debugger.
Step 3. Modify php.ini. The default configuration file used by Mac OS is at /private/etc/php.ini. Admin permission is required to modify this file. So go to /Applications/Utilities and open Terminal. Enter sudo nano /private/etc/php.ini. Jump to the end of this file and add
[zend_debugger]Control+x to save this file. You'd better comment out Xdebug if it is enabled. (There is also a full version of debug configure available at https://github.com/mkb2000/zend_debugger/blob/master/debugger.ini which is shipped with zend server.)
zend_extension="/the/path/to/the/folder/you/made/in/step2/ZendDebugger.so"
zend_debugger.allow_hosts=127.0.0.1, localhost
zend_debugger.expose_remotely=always
Step 4. Download dummy.php from https://github.com/mkb2000/zend_debugger/blob/master/dummy.php. Put it in your web server root document fold. By default, it is /Library/WebServer/Documents.
Step 5. Restart apache. In Terminal, enter sudo apachectl restart.
Step 6. Choose to use zend debugger in zend studio or eclipse.
Monday, 2 December 2013
iOS development: CLLocationManager gets some problem to monitor regions
By using the CLLocationManager and <CLLocationManagerDelegate>, people can make geoRegions to be monitored by system . And get notified when user location enter that region. How to use them, see: https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009497-CH1-SW1
However, according to my tests on Simulator and discussion on forum (https://devforums.apple.com/message/251046#251046), the performance of the region features are poor. In Simulator, the - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region method often get triggered 2km far away from the defined region, regardless the desired accuracy (cllocationManager.desiredAccuracy=kCLLocationAccuracyBest) and the radius of region ([CLCircularRegion alloc]initWithCenter:o.coordinate radius:o.radius identifier:name).
The discussion on forum implies that the region features are based on cell and the accuracy could only be at kilometre level. I haven't test it on device. But currently, it seems not qualified to use for small region detection.
iOS development: customise GPS path for Simulator
When developing location-based apps, sometimes we want to simulate a path or movements on Simulator. Xcode provides the ability to change "current user location". Rather than a single location, it can also continuously change the "current user location". And it looks like the user travels along a route. To enable this, a GPS path file is required. Here is a way to create a path for Xcode to run after.
Step 1. Generate gpx file.
Go to http://www.bikehike.co.uk/mapview.php or some similar websites to generate a gps path file which ended with .gpx. Download it, and it shall looks like:
<metadata>
<time>2013-12-02T12:35:19Z</time>
<bounds minlat="-37.900140" minlon="144.662850" maxlat="-37.897000" maxlon="144.673920" />
</metadata>
<rte>
<name>swhereTwerribee</name>
<number>1</number>
</rte>
Step 1. Generate gpx file.
Go to http://www.bikehike.co.uk/mapview.php or some similar websites to generate a gps path file which ended with .gpx. Download it, and it shall looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<rtept lat="-37.897000" lon="144.673920">
<ele>13</ele>
<time>2013-12-02T12:35:19Z</time>
<name>pt0</name>
</rtept>
...
...
...
<rtept lat="-37.897970" lon="144.671830">
<ele>13</ele>
<time>2013-12-02T12:36:35Z</time>
<name>pt1</name>
</rtept>
</gpx>
Step 2. Modify the gpx file.
This format is not compatible with Xcode. So we need to do some fix. First, delete the content which is meaningless for Xcode (shown above). Then, replace all rtept with wpt . It should looks like this after modification:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<wpt lat="-37.897000" lon="144.673920">
<ele>13</ele>
<time>2013-12-02T12:35:19Z</time>
<name>pt0</name>
</wpt>
...
...
...
<wpt lat="-37.897970" lon="144.671830">
<ele>13</ele>
<time>2013-12-02T12:36:35Z</time>
<name>pt1</name>
</wpt>
</gpx>
Step 3. Load the modified gpx file to Xcode.
After launching app from Xcode and running it in Simulator, go back to Xcode and add the gpx file to your project (following graph). Then the your new location/path will be showed in this list. Click to choose it.
Step 4. Check it.
When your app is still running in Simulator, click the "home" button of your iPhone/iPad Simulator. Then open the default map app, and show the current location. The movement will be exactly the same as you made from http://www.bikehike.co.uk/mapview.php.
Something worth mention:
1. Several default movements are available from Simulator menu ->Debug->Location.
2. The speed of customised path seems possibly to be controlled by the <time> rag in gpx file? I am not sure about this. But anyway, you can set the speed when you make the path on the website.
Friday, 8 November 2013
yahoo stock data url
Historical quotes can be requested for any period in the past. To request historical quote an URL in the following format is used:
http://ichart.finance.yahoo.com/table.csv?s=MSFT&a=02&b=13&c=2001&g=d&ignore=.csv
The following lists the parameters of this URL
Parameter | Description |
s=MSFT | Symbol for quote requested |
a=02 | Start month of quote requested (Zero based). 00-January, 01-February, 02-March, etc |
b=13 | Start day of quote requested |
c=2001 | Start year of quote requested |
g=d | Frequency of quote requested. Value d here stands for "Daily" |
An example of the returned data is as follows:
Date,Open,High,Low,Close,Volume,Adj Close
2012-05-03,31.88,31.90,31.61,31.76,31501300,31.76
2012-05-02,31.85,31.93,31.64,31.80,37385300,31.80
2012-05-01,32.05,32.34,31.95,32.01,43832300,32.01
2012-04-30,31.98,32.11,31.92,32.02,35697200,32.02
2012-04-27,32.12,32.22,31.88,31.98,41419100,31.98
...
Here's a neat way to download stock data from Yahoo, perhaps into a spreadsheet (so you can play with the data):
http://finance.yahoo.com/d/quotes.csv?s= a BUNCH of STOCK SYMBOLS separated by "+" &f=a bunch of special tags
for example: http://finance.yahoo.com/d/quotes.csv?s=XOM+BBDb.TO+JNJ+MSFT&f=snd1l1yr
where some special tags are:
a | Ask | a2 | Average Daily Volume | a5 | Ask Size |
b | Bid | b2 | Ask (Real-time) | b3 | Bid (Real-time) |
b4 | Book Value | b6 | Bid Size | c | Change & Percent Change |
c1 | Change | c3 | Commission | c6 | Change (Real-time) |
c8 | After Hours Change (Real-time) | d | Dividend/Share | d1 | Last Trade Date |
d2 | Trade Date | e | Earnings/Share | e1 | Error Indication (returned for symbol changed / invalid) |
e7 | EPS Estimate Current Year | e8 | EPS Estimate Next Year | e9 | EPS Estimate Next Quarter |
f6 | Float Shares | g | Day's Low | h | Day's High |
j | 52-week Low | k | 52-week High | g1 | Holdings Gain Percent |
g3 | Annualized Gain | g4 | Holdings Gain | g5 | Holdings Gain Percent (Real-time) |
g6 | Holdings Gain (Real-time) | i | More Info | i5 | Order Book (Real-time) |
j1 | Market Capitalization | j3 | Market Cap (Real-time) | j4 | EBITDA |
j5 | Change From 52-week Low | j6 | Percent Change From 52-week Low | k1 | Last Trade (Real-time) With Time |
k2 | Change Percent (Real-time) | k3 | Last Trade Size | k4 | Change From 52-week High |
k5 | Percebt Change From 52-week High | l | Last Trade (With Time) | l1 | Last Trade (Price Only) |
l2 | High Limit | l3 | Low Limit | m | Day's Range |
m2 | Day's Range (Real-time) | m3 | 50-day Moving Average | m4 | 200-day Moving Average |
m5 | Change From 200-day Moving Average | m6 | Percent Change From 200-day Moving Average | m7 | Change From 50-day Moving Average |
m8 | Percent Change From 50-day Moving Average | n | Name | n4 | Notes |
o | Open | p | Previous Close | p1 | Price Paid |
p2 | Change in Percent | p5 | Price/Sales | p6 | Price/Book |
q | Ex-Dividend Date | r | P/E Ratio | r1 | Dividend Pay Date |
r2 | P/E Ratio (Real-time) | r5 | PEG Ratio | r6 | Price/EPS Estimate Current Year |
r7 | Price/EPS Estimate Next Year | s | Symbol | s1 | Shares Owned |
s7 | Short Ratio | t1 | Last Trade Time | t6 | Trade Links |
t7 | Ticker Trend | t8 | 1 yr Target Price | v | Volume |
v1 | Holdings Value | v7 | Holdings Value (Real-time) | w | 52-week Range |
w1 | Day's Value Change | w4 | Day's Value Change (Real-time) | x | Stock Exchange |
y | Dividend Yield |
http://www.jarloo.com/yahoo_finance/
Saturday, 8 June 2013
instal memcache on ubuntu
A good article on installation of memcache on ubuntu 12.04:
https://www.digitalocean.com/community/articles/how-to-install-and-use-memcache-on-ubuntu-12-04
https://www.digitalocean.com/community/articles/how-to-install-and-use-memcache-on-ubuntu-12-04
Subscribe to:
Posts (Atom)