I upgraded wordpress software for this blog to version 2.5.2. After that none of the posts that had devanagari (unicode) text looked okay. After comparing the configuration files, I discovered that the troubling variable is DB_CHARSET. The default config setting is 'utf8'. But if you have been updating the software versions, your database table is probably in 'latin-1' charset, though wordpress has been saving unicode data to the tables. Once you remove the DB_CHARSET setting (or setting it to latin-1 or ''), things return to normal.
The setting is in the file wp-config.php in the wordpress install directory.
The value before change:
The value after change:
So maybe I should try to recreate the tables with correct charset defined in mysql some day ?
Google has launched appengine which provides developers with a platform SDK (python based!) and hosting with access to own Google BigTable database! This competes with Amazon.com's SQS , S3 (storage) and EC2 (hosting) services which are used by many startups... The applications will get google's massively scalable infrastructure, failover. Apps would also be able to easily use google's user authentication, analytics and other google API's.
Finished the following books: Great book on investing! Very easy to read and short too! Joel Greenblatt describes a "magic formula" to rank stocks (based on two criteria: Return on Assets and Earnings yield (reverse of P/E!), rank stocks with higher numbers for both. Add the two ranks and rerank based on sum of the two ranks). Then buy a basket of 20-30 stocks who are top ranked and hold them for 1 year. Sell them all after 1 year, re-apply the formula and buy new stocks with highest rankings. Rinse and Repeat. Based on backtesting with different ways, this portfolio has handily beaten the market averages. I wonder why backtesting was only done for past 13 years when comprehensive US market data is available for 75+ years.
The strategy seems sound and is well supported by theory. (High ROA companies means, good earnings on slim assets. High Earnings yield means they are currently cheap. Using the book's website you can very easily find the rankings and stocks that you need. The only problem I see with this strategy is implementation. Buying and selling 30 stocks every year (60 transactions) is not cheap (okay, I am an index fund person - 0.19% fund expenses). I could possibly use buyandhold.com or foliofn.com, but they are not cheap. Also the author might turn the website into a paysite (so you have to use something like moneycentral.com to screen your stocks. I will make a couple of mock portfolios to keep watching the strategy for sure.
I guess I am not a Malcom Gladwell person! This book was on my to-read list for a long time and though I liked the basic premise of the book, somehow I was disappointed by the presentation. I had the exact same reaction after I finished Blink. Anyway...
Today's speaker was Morgan Dene Oliver who is a CEO of OliverMcMillan, a real estate development and management firm. While his projector was getting fixed, he started by doing some show-of-hands about who in the audience:
1. believes "Art and Design" are essential for their future success ? (Many hands went up)
2. believes they are left brained ? (some - much less that I anticipated)
3. believes that people can use both left and right side of their brain ? (Huh ? almost all hands)
Then he offered some introduction about the left and right brain functions and recommended a book by Daniel Pink: A Whole New Mind which talks about how your right brain is going to help you achieve differentiation. Morgan also mentioned that Creativity, Tenacity as very important values for entrepreneurs. "You can always find someone who is more brilliant than you, but not someone who is more creative than you". With this theme, the presentation started. On the showcase were several of the stunningly beautiful and familiar buildings in La Jolla, UTC, Downtown area. He touched upon how they started to introduce complete community-in-a-building feeling to all their development, the importance of location for real-estate (I have yet to see any real-estate guy not utter location-location-location phrase in any talk), strategically buying properties in downturn and also some of the mistakes that they made and some of the unfortunate bad timings. Someone asked about Green Buildings (eco friendly) in San Diego downtown and his answer was that this was no longer a fad, but a requirement. Also mentioned about supporting the art tax bill from all commercial development. Had an interesting advice for real estate locations - buy properties near art galleries, gay communities!
This was the first professional seminar. Leo Spiegel is a managing partner with Mission Ventures, a hi-tech venture capital firm. Leo has been a president of Digital Island, CEO of Sandpiper Networks. He is also a member of Dean's advisory Council of Rady School of Management, UCSD.
This was an interesting and engaging presentation about Leadership Lessons (the subtitle was funny but I cannot remember it). One interesting thing was that all the slides were a single point followed by a cartoon describing that. Presentation Zen!
The actual message in the presentation was same-old. Good values, Vision, Choose Great People. Common sense (so uncommon in practice!). The anecdotes after each point were very interesting. The following question-answer session was also great - He talked about the startups in San Diego and Orange County area, the profiles of the companies they are currently "incubating" (Entropic, Slacker - which he was very enthusiastic about), his greatest investments so far...
All in all, a great kickoff to the seminar series.
John Mutch has been a CEO of HNC software and was appointed the CEO of Peregrine Systems by Federal Bankruptcy court. He took Peregrine Systems from bankruptcy condition to the price tag of $425 millions (HP was the buyer). Since then he started a MV Advisors, an "Activist hedge fund".
What is an Activist Hedge Fund ? The strategy is to find technology companies which are undervalued compared to peers because of corporate governance issues and organize shareholder activism to improve them and in the process create market value. They do this by establishing big stock positions (starting from 4.9 percent which keeps you under SEC radar!), bargaining for board seats and then improving matters by possibly restructuring products, reviewing executive compensation, spin-off, merge as necessary and kick away non-performing executives!
An interesting business model and a good conversation...
Here is a quick tip for extracting audio from youtube videos. I assume you have a reasonably recent linux distribution. (Things might work on other operating systems as well as all the applications that I mention below are ported to other operating systems)
Step 1: Download the flash video file from youtube. Either use greasemonkey script or a python script to extract it. (I use the python script way BTW) You can also use the online site VideoDL.org to show you the download link.
Step 2: Use ffmpeg or mplayer to extract audio from the flv file that you just downloaded:
ffmpeg -i f7v9NhmF3SY.flv johny.mp3
mplayer -dumpaudio f7v9NhmF3SY.flv -dumpfile johny.mp3
I keep forgetting some of the functions in excel and it is embarrassing to search for the same things every time.
PERMUT(n, r) = nPr = n! / (n - r)!
COMBIN(n, r) = nCr = n!/((n-r)!r!) FACT(n) = n! = 1*2*3*...*n BINOMDIST(s, n, p, cumul) Probability that there will be exactly s successes in n trials, each trial having a success probability of p (cumul = FALSE). If cumul is true it returns the probability that there will be at most s successes in n trials.
I just upgraded django tree which recently merged in the unicode support. This immediately broke django templates for venus. Here is what you need to change in planet/shell/dj.py to account for new django changes:
> ss = t.render(context)
> if isinstance(ss,unicode):
This is probably due to render returning unicode strings which need to be converted to byte-streams.
Update: I found out that my changes broke it for people using older version of django. I have updated the patch above to account for that.
I needed to reset the django admin password and found this page which tells us how to do this. It did not work for me, however I tried to get the user object explicitly, reset the password and save it and it worked!
Here is a session describing the behavior:
> python manage.py shell
In : from django.contrib.auth.models import User
In : u=User.objects.all()
In : u.password
In : u.set_password('testme')
In : u.save()
In : u.password
In : q=User.objects.get(id=1)
In : q
Out: <user : root>
In : q.set_password('testme')
In : q.save()
In : q.password
Maybe this is related to queryset caching, which would print the same password even after calling set_password. But it looks like in the first method, the password does not even get written to the database. This might be a bug. I will need to run more tests and report (or possibly patch) it...
Update: Perhaps I am not clear in the above post. The weirdness is that in the above two scenarios u and q should essentially reference the same user object, but calling set_password (and later save) method on the u reference does not seem to work (i.e. the password attribute remains unchanged and changed password cannot be used on the admin pages) but calling the same method on q reference seems to work!
Update2:I got it finally. Thanks all (Esp SmileyChris) ! every array slice is a new query! so in the first solution, I need this to make it work:
u.password # to display current hash (Query #1)
q=u # (Query #2)
u.password # (Query #3) this should print updated hash!
I received the following in email forward. It is supposedly a customer support call to Idea Cellular. It sounds like it is a staged conversation, but is hilarious anyway! Knowledge of marathi is recommended 😉
I am looking for a flash media player which can play audio/video content in browser. I am currently using del.icio.us's playtagger for now, but it is limited to mp3 only (I had to change the code a little bit to prevent it from adding multiple inclusions - my changed code is here) and it does not allow rewind/forward.
I also looked at this post which suggests using google video player, which would be nice as it could then also play video files, but it consumes a lot of real estate on the pages. There is also this website mentioned which is nicer but that player is bigger than I want too... And it is probably not a fair use as it is undocumented use...
I also checked out the odeo player, which is nice but you need to host the files on odeo, which is a no-no.
Here are my requirements for this with a scorecard for Playtagger and Google:
Easy to use. No need to add tag soup for each file. (Del.icio.us + Google -)
Small size on the page (need to collapse the buttons until user clicks on play button) (Del.icio.us + Google -)
Ability to rewind/fast forward (Del.icio.us - Google +)
Play different media formats (mp3/wav/ogg/avi/mpeg video, possibly realmedia) (Del.icio.us - Google +)