Categories
Software development Web Windows

Consuming a PHP SOAP web service from C# client

Reading Time: < 1 minute

I need to create a SOAP client in C#, and in order to test it I need a SOAP web service. Since my hosting company uses MySQL/PHP technology stack, I am using this PHP Soap web service example.

For the C# soap client, I am following this example on stackoverflow. But there is one problem when I tried to run the example. I got the error (exception) like the following:
The content type text/xml; charset=ISO-8859-1 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.

Again I found this thread on stackoverflow which seems relevant. It talked about the custom message encoder developed by Microsoft, and Paul Morgado’s addition to the CustomTextMessageEncoder class (just add his method at the end of the class). There is one more thing, the configuration file for the app. In my case, it’s something like the following: (note the messageVersion and bindingElementExtensions definition, there was some error in the Microsoft documentation regarding the latter one).

Categories
iPhone app Software development Web

Software updates

Reading Time: 2 minutes

WordPress 3.1.1
Finally I got hands around my blog (this one stlplace) and did the WordPress upgrade. I put off the upgrade in the past primarily due to my laziness: there is no automatic update due to I was running on WP 2.0.2. The upgrade itself is not too bad, I followed those two articles on Backup database and Run manual update. I used phpMyAdmin for the WP database backup. For the WP upgrade the only tricky part for me is:

“…Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files)…”

I know “directory overwriting” generally works on Windows system, but we are talking about UNIX (Linux to be precise). The command I used goes like this (in the blog root directory):

cp -r -u new_wp-content_dir .
(here -r means recursive for directories; -u means update)
I believe it did the trick, as I can run upgrade database afterwards. After that I enabled the necessary plugins. The only plugin stopped working is the ultimate warrior tags. The rest are fine.

Btw, I also added WPtouch plugin so that this blog works better on iPhone.

Xcode 3.2.6
I found my old Xcode 3.2.2 can not handle block as it’s necessary to run Ray’s RSS reader example. Download the software from Apple, install, and found this “Base SDK missing” in the new Xcode. Did some google, the trick is to “use latest SDK” in the “project => build” setting. I noticed we can also build “older” targets by changing the target in “deployment target”. Obviously there is a limit as to how far we can go back (I have not checked that yet).

Btw, I found the iPhone 4 simulator looks cooler than iPhone 3 simulator 🙂

Categories
Web

Spammer stole my Yahoo email and sent out spam mails

Reading Time: < 1 minute

Friends, in case you received an email selling you Viagra online, which appears sent from my Yahoo email. I apologize. Obviously I don’t sell those. Some hackers used my Yahoo email and did this. Please ignore that mail. More information (prevention tips) about this tactic can be seen at:

I had my email account hacked into and emails sent out.?

I realized this problem as my Gmail acct is also in my Yahoo address book. Also, one friend asked me “huh”? I think this is not really brand new tactic, and I believe most people already know it. This note is just in case.

Categories
Web

Facebook, LinkedIn & Twitter

Reading Time: < 1 minute

Blogging is declining. My friend Wang Jianshuo reminds me about this trend. Obviously Jianshuo has much more authority on this because he started blogging on Sept 11 2002 and has a large followers at his blog.

On the other hand, I have joined Facebook, LinkedIn, Twitter this year (not necessarily in this order). And it seems to me all three websites are going strong. The main reason? I think it’s the networking effect. Facebook has been hot for a while, esp. among college students. LinkedIn got popular this year particularly since the recession made job search more difficult, and networking is much more important to land an interview or a job (compared to easy times). Twitter is more interesting, I noticed it changed slogan from “what’re you doing” to “what’s happening”. This precisely reflects the change of emphasis of Twitter, and the power of twitter, from Iran post-election to StockTwits (and many sites based on twitter, see 20 Twitter Apps you need to know).

Interestingly, I noticed one co-founder of Twitter, Evan Williams, is also the author of blogger. Maybe Evan already knows about this trend when he co-founded Twitter, which started a a mini-blog platform?

Categories
Web

How do you know about visitors to your website ?

Reading Time: < 1 minute

How much Google knows about you? The google dashboard. I found out the google search I did last Saturday on “enable root on Mac” (by going to google => “My Account” => “web history”). I believe there is a setting a google user can change to disable google to collect the data. But for me sometimes it could be useful because I want to repeat an old search I did a while back. A related question for business is:

How do you know about visitors to your website?
My title may be a bit misleading, I think a better question is how do you measure the performance of your web site? In other words, which page is highly viewed, which page gets no attention etc. Here comes web analytics (Wiki). Web analytics came of age lately as Omniture being bought by Adobe recently.

Google analytics
Google analytics is a free web analytics service offered by Google (Wiki entry here). Setup tutorial (video, link here)

Categories
Web

How to use Scottrade Gainskeeper(tm)?

Reading Time: 2 minutes

Gainskeeper ™ is a little program keeps tracks of stock cost basis, and the profit and loss. Scottrade provides this service to its customers. This program is not without problems (for me), such as mess up positions and long/short term profit/loss. It seems to me the program improved quite a bit lately, or it could be that now I learned how to use it. Another interesing program (or web site) is cakefinancial, which can keep track of your 401k, IRA and stock brokrage accounts from various financial institutions. Walt Mossberg did a good introduction on this lately.

Back to Gainskeeper. The main thing I pay attention to is: big gainer and big losers. Here is how I used it. Go to Realized Selling Acitivity (Summary), select year (2008). Last year, we all know it’s a terrible market. Here is my big losers (loss > $1,000):

Categories
Web

Order Domino’s pizza online

Reading Time: 2 minutes

Through the years I have bought books, digital cameras, computers, mouse, shoes and many other things on the web, from Amazon, eBay, buy.com, Sears, Zappos and so on. In some stores I could pick up the merchadise at the store (Sears, for one). I did that at Circuit City before its bankrupcy.

But today is my first time to order Pizza online. In the past, what I usually do is call the store, tell them what I want (usually I have a coupon). Today I decided to do something different (I don’t have a coupon anyway). So I went to Domino’s at around 11:25 AM. The steps are pretty straight forward.

Categories
Web

Google finance new interface, dividend screener

Reading Time: < 1 minute

Google finance released the new interface last week. I did not feel comfortable with it at first sight, but after reading its explaination and spent some time on it, I am feeling more comfortable with it now. One quick thing, those who are interested in financial statements may complain where is the good old financial statement for a particular stock? Again check top left panel (a lot goodies there), click on “financials” you will see the income statement, balance sheet, and cash flow. In other words, they did not take away anything, my guess is they try to add new things and present the information better. Another minor feature is: they finally added the opening price of a stock, in the past, they only have stock closing price. This is not revolutionary, but something nice to have. On a related matter, now you can see their monthly stock chart in real fashion. In the past they merely connect the closing price of each day, which is still the case with 3 month (or longer) stock chart.

Dividend stock screener
Since I am talking dividend recently, I am creating this stock screener. Criteria:

Categories
Web

Google finance stock screener II

Reading Time: < 1 minute

Yahoo tech-ticker

Criteria
* 20% quarterly year-over-year revenue growth
* 25% quarterly year-over-year earnings growth
* Trades at a P/E ratio below 12

Apply it in Google finance stock screener (here is the link), it finds 134 companies (this number could change as the stock price, PE ratio changes daily).

Categories
Web

What is Twitter

Reading Time: < 1 minute

A poor man’s blog.

A microblog service which shutdowns from time to time without notice (in the old times, until Hillary’s guy called to delay the shutdown yesterday).

A gossip with limit of 147 character.

A tool appears used by Iranian opposition and youth to exchange information on campaign and protest.

A tool used by Dell to sell $3 million hardware (DellOutlet, source: WSJ).

…a tool the big brother thinks it’s too hot for its people 😀