Friday, December 30, 2011

My new Patent is dead

After some extensive search, I found others have already got the idea, so the process is aborted. Good thing is now I have more time for World of Tanks!

Monday, December 26, 2011

Patent Process

My previous patent is still in progress. I responsed to a request late (due to my own fault) but thanks for a great gentalman in USPTO, I was able to continue the patent without extra fee. Now I just got another idea on games (will discuss more once I file the patent), and found that I have totally forget how to do it and have to re-learn everything. So I decide to blog it, in case me or others need this info. First, I suggest you go to this web site : http://www.uspto.gov/patents/process/index.jsp and obtain a customer number. There are 3 catagories of patent, most likely yours will be a Utility patent (a design patent is for looks and plant patent is for plants). Here I only talk about Utility Patents. First, go to https://efs.uspto.gov/efile/portal/efs-unregistered, because I was unregisted. If you are like me, had an idea suddenly and don't have a customer number, this is the only way. Fill in the following forms: 1. Oath of declared field 2. Specifications and Claims: http://www.uspto.gov/patents/resources/general_info_concerning_patents.jsp#heading-14 3. Go to http://www.uspto.gov/web/patents/accelerated/ae_accelerated_examination_tutorial.pdf and fill in SB28 (A petition to make an application special for accelerated examination), PREX.SRCH (search) and PREX.SUP.DOC (search results) 4. Submit using https://efs.uspto.gov/efile/portal/efs-unregistered

Monday, December 12, 2011

Tim Tebow

A great read on Tim Tebow, from WSJ

Saturday, November 26, 2011

Limitless

One of our friend rented this video when he visited us. I always wanted to see this one but never got time, so I was really happy. The movie was cool, tight and clean, keep me guessing till the end. However the ending was not very good (spoiler after this), I hate the idea of drugs can actually be good.... Kind of like the gene in the bottle and you asked it to grant you more wishes. Anyway, my friend did suggested a much better ending, that the main character is bluffing.. Of course that will be a tragic ending and I won't sleep well.

Wednesday, November 23, 2011

World of tanks 7.0 might have replay feature

Noticed it in the 7.0 public test patch. Now that is a good feature to have!!

Thursday, November 17, 2011

NHibernate metadata reader closed problem

Encountered that exception, had no idea what it is. Googled and some people suggest it is a bad table, some suggested it is the session out of scope. None fits my situation. So I go ahead setup the nhibernate/active record/fluent source, did some debugging. What happened is someone is using StructureMap's ObjectFactory.Get() method inside a domain model's constructor, and while nhibernate is constructing that object, the constructor is doing more nhibernate calls via IOC. That is just bad, and now it is solved :-)

Tuesday, November 1, 2011

XMan First Class

Last weekend I finally got sometime and rent X-Man First Class from redbox. This is a good movie (maybe because I am a long time X-Man fun), good plot, some part of it is a bit too unrealistic (the teleport demon). A little bit of modification will be good, maybe make it take time to teleport (else he can zip out of trouble, instead of stay at the danger at end).

Tuesday, October 18, 2011

R.I.P Dennis Ritchie

Such tragedy. Just a few days ago it was Steve Jobs, now Ritchie. I am so sorry I didn't post this on time. Ritchie is not as famous as Jobs, but I do fee just as important. He is the co-funder of C language, I still remember the feel when I switched from basic to C. C is simple and flexible (so flexible my wife still have nightmares with pointers), I feel in love with it more and more. Of course time moves on and we went to C++/Java/C#, but you can see C in all of them. Attached is a link to The Development of the C Language.

Thursday, October 13, 2011

Warren Buffet might owe billions in taxes

Story from http://www.humanevents.com/article.php?id=45889 Which states in past years, Buffet sometimes have billions in Unrecognized Tax Benefits. Just to make sure I didn't get it backwards, I did some research, and here is one from http://mays.tamu.edu/media/documents/2009/09/16/rego_2009.pdf:
Tax planning strategies that reduce tax liabilities on tax returns generate “tax benefits,” which may or may not be recognized in financial statements. When a firm recognizes a tax benefit on a tax return and records an offsetting liability in the financial statements to account for the contingent liability associated with that tax position, we refer to the tax benefit as being “unrecognized.” The liability for unrecognized tax benefits is also commonly referred to by tax practitioners as the tax contingency or the tax cushion.
So there you go, Buffet, who claims he didn't pay enough tax (and want to pay more), have taken tax benefits that his firm think IRS might not allow. And that is what we call a hypocrite.

Thursday, October 6, 2011

R.I.P Steve Jobs

Even though I am on vacation and is really tired from a full day of activities, I just have to drag myself off the bed and do a short note. Just 2 days ago me and a friend was taking about how amazing Jobs is, how fiction like his life was, and now he becme a legend. Just want to say Jobs well done!

Thursday, September 29, 2011

Battle Of The Scheldt

World of tanks have a special, lead me to watch the video for "Battle Of The Scheldt" on youtube. The Canadians fought it and lost many people, there were internal fights about who should get the glory etc (i.e. not acceptable if US was not present...) and at the end, not one Canadian officer is invited to the victory celebration.

Wednesday, September 21, 2011

New game on the way

Assuming if I got time, I finally got a new idea of a game, will call it "Ivy of Life". Hope it won't be just another incomplete project of me :-) Also excellent SC game Janbi vs Fantasy. http://www.youtube.com/watch?v=G2WC0ltpnbQ&feature=feedu_more

Wednesday, September 7, 2011

Corrupted Unions and Corrupted management

Usually when there are Union/management conflict, I blame the Unions. Can't help it. Even though Unions have their purpose in the old age, today's Unions are generally corrupt, lazy and greedy (Rubber room teachers making 100k+retirement benefits). However in this post is about corrupted management. This is a story about per-bankrupcy Delta CEOs. The CEO tied his salary to company cash flow (note, not profit). Then what he did is he borrowed money to increase cash flow, so he got compensated more. He also spent a lot of money setup a multi-million dollar fund. With help of big money and big lawyers, the fund is setup so that nothing can touch it, not even if the company went bankrupt. That is why we need fiduciary laws, so we can nail those corrupted CEOs, neither them nor the Unions is good for our economy. (By they way, I heard this story form other people, and I don't have time to confirm it independently).

Monday, September 5, 2011

Hough Transform

I was doing some research on de-skew a image, and found this page about Hough Transform A interesting read, and the idea is very simple and easy to use. It is very interesting as how presenting data in a different way will lead to a much easier understanding of it. The other example I can think of is Fourier Transform, I have done multiple applications that requires FFT, and it do wonders to some instances. A note about FFT is the 2D FFT. I remember had the question about if doing vertical FFT on a FFTed graph make sense, but since I was a bad student (always want to play games first) never asked this question. Think back, the way 2d FFT is performed makes no sense, but since it does present a usable solution (for compression etc) we are just doing it :-)

Thursday, August 25, 2011

Source Code

Rented Source Code and have some buddies over and watched together (yes I am cheap and use redbox), feels like the good days back in college :-)

It is a good movie, good ideas (impossible in real life though) and I like the ending, although I think if the ending is 1 minutes early it will be a more artistic ending.

Very similar to Inception, but I would think Inception is more physically possible.

After the movie are some discussions on physics and string theory. I heard about string theory before but imagined the 12 dimension thing is totally crap. But after yesterday's discussion it sounds a bit plausible, acutely like the idea that all 5 different modules are just the 5 projections from the 12 dimension final theory (Still think it is more close to crap though, epically CERN didn't find the practical).

Monday, August 15, 2011

Cisco VPN service network troubles

Wife suddenly started to complain about trouble to connect to our server (at home). I thought a simple reboot will fix the problem but nope. Can ping other computer from server but can't ping the server from other computers.

Firewall is off, and after some research I found it is the Cisco VPN service. As long as the VPN service is started, even if VPN is not connected it will still prevent connections.

So problem solved :-)

Wednesday, August 10, 2011

MS security updates

Yesterday night I posted about how I got a virus by just using IE9 to view drudge report (even after I denied the UAC requests), MS released 13 patches, once of them is this:

Cumulative Security Update for Internet Explorer 9 for Windows 7 for x64-based Systems (KB2559049)

Download size: 20.9 MB

You may need to restart your computer for this update to take effect.

Update type: Important

Security issues have been identified that could allow an attacker to compromise a system that is running Microsoft Internet Explorer and gain control over it. You can help protect your system by installing this update from Microsoft. After you install this item, you may have to restart your computer.

More information:
http://go.microsoft.com/fwlink/?LinkID=221946

Help and Support:
http://support.microsoft.com

Win 7 Internet Security 2011 – Unregistred Version scam

I was browse Drudge report and all of a sudden a UAC dialog popup, the details shows "File Operation". I know it must be a virus and closed it. Then another dialog popup as well, "File Operation" and there is GUID in details (too bad I didn't record it). I denied it as well.

To my surprise, a Win 7 Internet sccurity 2011 window appeared, definitely not from brower, and shows virus scanning in progress!!! I denied the UAC and IE9 still changed my computer??!!

On the internet, saw the blog with same problem. He run security scan (MSSE) and fixed the bug. I will try to do the same.

http://geekswithblogs.net/mikebmcl/archive/2011/05/01/fake-anti-virus-software-psa-win-7-internet-security-2011.aspx

WOT 6.6 patching now

This morning wake up early and wanted to play WOT. To my surprise WOT is patching. I thought it will start patching at 7 like usual, I guess not. Can't wait for this patch, my Panhther will be changed and a PantherII will be added :-)

Sunday, July 31, 2011

WOT test server up

Yep, I spend over 10k gold to get the IS4, and is a bit disapointed. A bit slow, and I was killed rather faster during my first 2 trials....

Thursday, July 21, 2011

Starcraft match, Baby vs Killer

http://www.youtube.com/watch?v=1VXIE0o9Qbo&feature=feedu

See link above. I was surprised by who finally win :-)

Thursday, July 14, 2011

javascript math

So what is 70.18*100 in javascript? It might be surprise you that the result is 7018.00000000001.

And number.toFixed() should fix this nicely.

Another interesting thing about jqGrid. I have a date column that requires a customized format but needs to be sorted as date. I did some research and none of the online solution works (my jqGrid version is 3.6.5). So I download the source, and what's going on is jqGrid parse the date with y,m,d,h,i,s A (as year, month, date, hour, minute, second, AM/PM). So the solution is:

sorttype: 'datetime', datefmt: 'm-d-y h:i:s A' (I am mm-dd-yyyy hh:mm:ss AM/PM format).

Wednesday, July 6, 2011

Cool jQuery UI

Haven't been doing scripts for a while, and there is one from msdn that looks pretty cool: http://msdn.microsoft.com/en-us/scriptjunkie/hh127352.aspx

Kind of surprised how easy it is doing round corner UIs :-)

Sunday, June 26, 2011

OSL JD vs Flash

Another great battle between 2 best players.
http://www.youtube.com/watch?v=DExusOePdSA&feature=feedu

Friday, June 24, 2011

This is just amazing!!

It is called domino music. If you have never seen this before, prepare to be wooed....

http://www.youtube.com/watch?v=C_CDLBTJD4M&feature=player_embedded

Monday, June 13, 2011

My Lowe got destroyed by T54

Yep, to my surprise, my Lowe, a heavy tank in a 1v1 frontal attack, got destroyed by T54, a medium tank...

Sunday, May 22, 2011

World of tanks matching

I love WOT so far, even bought gold (to make my progression faster and to support the game). There is one thing that I really hate about the game. When I am on a lower tire tank and got matched in a higher tire tank game, I was unable to do damage at all sometimes. My IS bounce off on M6 all the time, my M3 bounce off on M4 (from a distance). In the last game, all shells from my M3 bounced off the M4 (I fired maybe 14 shoots, and earned him "Steel Wall". Errrrr.

The M3 is 2 tires below M4, so that is fine, but in one game, during a frontal attack, all my shells from my IS bounced off a KV3 while it killed me????

Saturday, May 14, 2011

Thursday, April 21, 2011

iPod is killing US jobs

This is old news, I wanted to blog about it.

In short, "Rep. Jesse Jackson Jr (D-IL) spoke on the house floor saying how he believed that the iPad was "eliminating thousands of American jobs." LOL, not sure how he got elected.

Monday, April 18, 2011

Big regrets

Now I really regret that I have not bought the heavy pre-order package for World of Tanks. A bit worried that I might be caught by wife, bought the light package instead. Now I found that the M6A2E1 is almost impossible to penatrate by my best guns....

Sunday, April 10, 2011

Flash vs. Bisu!

Very nice Starcraft fight, commentary by Nuke.

World of tanks will wipe soon

I went ahead and bought a $45 package, just to show my support. Really wished if they could offer me a way to not wipe my account, 2 month of hard work!!

Saturday, April 2, 2011

Paul Graham on Tablets

I think it is just a great read. Kind of showed how good hardware helps innovation. The PC world on the other hand used to be race to the bottom. Still remember how dyanmic ram wins over static ram Back when I read the first book on CPUs, I can't understand why people would save half the transistor count and make the product slower. However the use of SDRAM is a good choice, as that small performence is not as good as adding a accelerometer.

Interesting discussions

I started a topic on broken toys, and there are flames but the discussions are worth a ready I believe.

Monday, February 28, 2011

Census money income statistics

This link from http://www.census.gov/compendia/statab/cats/income_expenditures_poverty_wealth.html is a much better presenter of income sensus. Even allows to copy and past:

YEAR$15K25K$35K$50K$75K over
196710.7% 11.3% 14.0% 22.1% 25.6% 16.3%
19709.2 10.6 12.0 20.8 26.2 21.1
1980 8.8 10.5 11.4 17.1 24.8 27.4
1990 8.6 9.4 10.2 15.6 22.4 33.8
2008 8.1 9.0 9.7 13.6 19.4 40.3

I was going to use this table as evidence that lower tax rates prompt more middle people to higher brackets, but because I don't have the data in 50s, it is not conclusive.

Thursday, February 24, 2011

family income statistics

This is for my own reference so I don't forget.

this links to census.gov's family income statistics over year :http://www.census.gov/prod/www/abs/p60.html.

Now I would like to do is mine out the data and make an inflation adjusted table of how people are doing over the years and compare with US top marginal rates: http://www.truthandpolitics.org/top-rates.php

Tuesday, February 22, 2011

World of Tanks

Played this MMO (or FPS), and LOVED it! Maybe it has something to do with my love of WWII tanks. Even the Leichtractor is not so bad :-)

Monday, February 14, 2011

How different are you from a Christian

I compiled a list of requirements to be a Christian, most likely not complete. #6 and #8 is likely the most impossible, I will never give my bank account to my neighbor at least.

1. No idol worshiping
2. don't kill
3. don't steal
4. don't enoy your neighbor's belongs, including his/her wife/husband (2x2 metrix)
5. respect your parents
6. Respect the sabboth and don't work on that day. (Jew/Christian/Islam only)
7. Don't judge other people
8. love your neighbor as you love yourself
9. donate 1/10th to charity.

Saturday, January 22, 2011

I fixed my own f1.4 EF 50mm!!!!!

Yes, this is a great day for me!!!

The lens that I loved most, the Canon f1.4, recently got stuck. I had it for 2 years now and I loved it, sharp images, fast shutter even when inside homes. Great for kids, and great for people like me who don't like flash.

And yet for several month now, the AF system only able to auto focus at one direction. And a week ago it finally got totally stuck, I can't adjust focus manfully.

Went online, and other people are complain about the same thing. The Canon f1.4 lens has a weak point, the front. If you push it too hard it could get stuck.

I was heart broken on this. The lens is expensive, and when it gone bad and I have to go back the the default lens, the difference is too big to accept.

Finally I went online and did some research, found this and this.

Initially I doubted my ability to fix the lens, but decided to give it a try. After about 1.5 hours, I finally did it!! Followed the second link, and the instructions are great!!! Some of the instructions I didn't understand initially, but I figured everything out with some practice.
Thanks to those authors.

Step 3, pop ears on he plastic protection piece in the mount was the hardest, what you need to do is push the ears toward the center and push the inner plastic ring outward at the same time.
I also had trouble removing the wires, pushed on the wrong piece lol.

Anyway, I am very very happy about this. Every since I decided to really believe in God, I have encountered multiple difficulties. First my old company started laying off and salary cuts, then the lens. But all was resolved in surprising manners. A recruiter called me and land me a better job, and now a quick fix and I am happy in multiple fronts!

Monday, January 17, 2011

Working part time

As you know I change job recently, trying to get a job with better security and pay. Well, my new job is very nice, pays better, but I am not sure about the security part. My new company is hiring too many people (or at least I feel that way), and I am a bit worried.

Lucky for me, my old company wants me work part time for them. With babies at home, spare time is in short supply, but I do need to keep in touch so I don't lose the relationship. When I was young I used to think that I am a good programmer and will never need to worry about jobs. But now I am older and need to support a family, this is a must.

Friday, January 14, 2011

Wonder Girls

I am about 2 years too late, but recently I found this amazing video on youtube.

If you have not seen this before, you will not be disappointed. Wonder girls are a Korean group, and I don't understand most of it except "Nobody nobody but you"!


Enjoy!

Sunday, January 9, 2011

Gini Coefficient

I was watching a lecture and heard the term "Gini Coefficient". See http://en.wikipedia.org/wiki/Gini_coefficient. A very interesting concept. Lecturer linked Gini with how developed the country is, the better (lower) the coefficient, the better the country is developed. The reason is simple, the system will became more efficient when people gets closer to their fair share of the game.

Actually, in a real world, the coefficient will never reach to 0. Also it will be inefficient if the coefficient gets to 0, because that means no one is getting rewards when they work harder. And I think that is one of the main reasons that even in the most developed countries, the coefficient is around 0.3.

However in a developed world, it should never be too high. The reason is if the place is fair, all people should have the same access to education etc, so with a even start, the majority of people should be around the same level.

It is also interesting to note that the lecturer noted that during the 1930's, when the Soviet Union was doing their X year progressive plans, the system works so much better that even the intellects in US think it is the way to go. However the system of government central planning didn't stand the test of time, and eventually the pitfalls shows up, the system is so inefficient that the Soviet union has to import food because of production problems.

Anyway, as I am from a communist country, here is from my high school political book "The system that gives better productivity will replace the less efficient ones". That was a rough translation. Only in the original book it was predicating communism will over take the world. Just amazing what 10 or 20 years of time can prove.

Thursday, January 6, 2011

Some Javascript basics

I used javascript for many years, did many things that solved hard problems at work. However I recently changed work, and this company used javascript heavily.

Through my recent debugging and fixing of the code, I found some old javascript tricks that I never know!!

1. === and !==. "===", the triple equal sign, means compare with type. So even though 2=="2" is true, 2 === "2" is false because their types are different. Same with !==. I found this one while I was reading jQuery code.

2. function closures.
(function(){
//do something without affect globals.
})();

2. call and apply.
Suppose you have a function doSomething(a,b). You can call itwith a new "this" by using call and apply. i.e

3. arguments
It is a variable made available by javascript that contains current function call's arguments.

function doSomething(a,b){
alert(this.id + ' ' + a + b);
}
var obj = {id:'me'};
var func = doSomething;
func.call(obj, 1, 2);
(function(){func.apply(obj, arguments);})(1,2);

the above code will show "me 12" twice.

Because I never know those before, the first time I saw them, I thought they are either typos or some home made functions!!