chinese · geeky · personal · rants

Women and Science

“Did you know if you push the button on one of the barbie dolls, she will say ‘Math is hard! Let’s go shopping!’ That’s why we don’t have many women in the field of computer science.” – Ted Neward said at the nofluff open discussion and the crowd bursted into laughter. I looked around and… Continue reading Women and Science

chinese · news n politics · personal · rants

First time watching the Olympics as a U.S. citizen

Citizenship vs. Nationality Nationality: Membership of a nation in the sense of ethnic group (a group of people who share a common ethnic identity, language, culture, descent, history, and so forth). This meaning of nationality is not defined by political borders or passport ownership. Citizenship: Citizenship is determined by jus soli, jus sanguinis, or naturalization,… Continue reading First time watching the Olympics as a U.S. citizen

chinese · personal

我们,是否都在为童年疗伤?

年初当我忧郁症很糟时我和心理医生谈到我童年和成长的一切不幸. 他说每个人或多或少都在为童年疗伤. 童年是我们最需要呵护和爱的时候. 但许多人的童年恰恰是最无助最受伤害的时候. 这种伤害对不同的人照成很不同的影响. 有些人选择自暴自弃放弃前途. 有些人变得过分内向,很难沟通. 而有些对他来说几乎是奇迹现象会很成功很正常,几乎无法想像会有不幸的童年. 他很赞美我的表现,认为我是属于奇迹的一类.但我不知道这种赞美我是否可以接受. 无论表面上多么的成功正常,内心深处的痛楚与针扎不是可以完全抹去的.时间可以帮助淡忘但无法消除. 有些话题还是无法碰触. 从某个角度上来讲,我们是很孤独的. 没有许多人愿意倾听伤心往事.就算愿意,真正了解理解的又有几个? 因为得不到知音,我们就深藏一些很重要的情感. 在失眠的夜里,日记里涂写着. 所以我在这里写着. 因为有些童年和成长的点滴还是会在我脑海里浮现,提醒着我我人生中很难弥补的缺陷和让我深夜难眠的不安.

geeky · javascript

jQuery mobile 1.2 alpha release popup to work within a page

Holy crap, I thought I was going to die. I couldn’t figure out for the life of me how to get the new jQuery mobile popup to work within a jQuery mobile page. The documentation just shows the sample code outside of a page. Outside of a page it works just fine. But as soon… Continue reading jQuery mobile 1.2 alpha release popup to work within a page

geeky · javascript

jQuery ON (syntax difference from live)

Since jQuery live is marked as deprecated. I thought it’d be a good thing to switch to use jQuery on. I was at first shocked to find out that “ON” did not work like “LIVE”. Without digging very far, I simply switched my old syntax that had to It worked for non dynamically generated DOM… Continue reading jQuery ON (syntax difference from live)

geeky · java

Spring JdbcTemplate to get db function output

e.g. SQL returns a String value. Do this using Spring JdbcTemplate via: See any big issue doing it this way? I personally don’t. I assume Spring will throw a SQL exception if for any reason the function errs out?

rants

The worst flying experience in my life so far: United Airlines

When we got to Denver international airport last night to return to Iowa, we found our flight was delayed from 8:50pm to 10:50pm. First of all, when there is no weather problems, you just don’t expect flights to be delayed. As disappointing as it was at first, we viewed it as somewhat a norm. When… Continue reading The worst flying experience in my life so far: United Airlines

geeky · javascript

Javascript Hoisting

Hey for those who think they really know javascript, what do you think the following code will do: Then, run the following http://jsfiddle.net/dodozhang21/NaLxn/ Were you expecting 1? so WTF? Look up javascript hoisting 🙂

geeky · java

Jackson Ignore Property/Convenience Method

Here’s something I learned about Jackson and you may run into it. What gets serialized by default? Properties of an object are initially determined by process called auto-detection: all member methods and fields are checked to find: “Getter” methods: all no-argument public member methods which return a value, and conform to naming convention of “getXxx”… Continue reading Jackson Ignore Property/Convenience Method

geeky · java

Java Generics – conditionally instantiate a class

From Class to list of Enums So if I want to instantiate a class via some condition, I can do the following but still how do I know what type to use? https://github.com/dodozhang21/JavaGenerics