-->

Wednesday, May 14, 2008

How to learn new programming languages

Help me, I'm a late adopter.

How do I learn new programming languages and start using modern web apps without getting frustrated and angry?

I was full-time technical trainer for years (I still do it freelance). I've also taught all sorts of classes to people aged two to eighty. Yet reading your long, well-written* question, I still feel I don't have enough information to help.I'm grappling with "Why don't I like learning new things?" Many adults have this feeling. Usually, it's because learning (which is a joy to infants and young
children) becomes tarnished in school. It becomes un-fun, and from then on people associate it with pain. Also, painful or not, you were forced to do it in school. As a grownup, you have to find self-motivation. That's tough when -- if your schools were like mine -- you weren't trained to train yourself.
......
See more about this question in:http://ask.metafilter.com/91364/Help-me-Im-a-late-adopter

How to add label cloud to blog

相信这是很多人期待的功能吧。以前用Delicious为Blogger添加标签云,现在我们的方法更简单。请于修改之前备份你的模板。Step1:我们知道,Blogger beta的代码分为三部分:样式表、布局、Widget。第一步我们不需要展开代码,添加CSS代码。找到 ]]></b:skin> ,并将CSS添加在其之前。

/* Label Cloud Styles----------------------------------------------- */
#labelCloud {
text-align:center;font-family:arial,sans-serif;
}
#labelCloud .label-cloud li{
display:inline;background-image:none !important;padding:0 5px;margin:0;vertical-align:baseline !important;border:0 !important;
}
#labelCloud ul{
list-style-type:none;margin:0 auto;padding:0;
}
#labelCloud a img{
border:0;display:inline;margin:0 0 0 3px;padding:0
}
#labelCloud a{
text-decoration:none
}
#labelCloud a:hover{
text-decoration:underline
}
#labelCloud li a{}
#labelCloud .label-cloud {}
#labelCloud .label-count {
padding-left:0.2em;font-size:9px;color:#000
}
#labelCloud .label-cloud li:before{
content:"" !important
}

Step2:添加布局部分代码。我们仍然要先找到 ]]></b:skin> ,但这一次我们要在它之后、Head之前添加以下代码:


<script type="'text/javascript'">// Label Cloud User Variablesvar lcBlogURL = 'http://YOURBLOG.blogspot.com';var maxFontSize = 20;var maxColor = [0,0,255];var minFontSize = 10;var minColor = [0,0,0];var lcShowCount = false;</script>

修改YOURBLOG为你的名字,其中关于颜色,文字大小等值可以自定义,以跟你的Blog色调打配。简单介绍一下,maxFontsize表示字体最大值,minFontSize表示字体最小值,minColor表示颜色最浅值,maxColor表示颜色最深值。

Step3:最后要修改的是Widget本身了。继续往下看就会找到Label的Widget类似这一句:

<?xml:namespace prefix = b /><b:widget id="'Label1'" title="'Labels'" type="'Label'/" locked="'false'">

如果你没有展开代码,只需要用以下代码替换这一行;相反,你要替换整个Widget。

<?xml:namespace prefix = b /><b:widget id="'Label1'" title="'Label" type="'Label'" locked="'false'"><b:includable id="'main'"><b:if cond="'data:title'"><h2><?xml:namespace prefix = data /><data:title></data:title></h2></b:if><div id="'labelCloud'"/><script type="'text/javascript'">// Don't change anything past this point -----------------function s(a,b,i,x){if(a>b){var m=(a-b)/Math.log(x),v=a-Math.floor(Math.log(i)*m)}else{var m=(b-a)/Math.log(x),v=Math.floor(Math.log(i)*m+a)}return v}var ta=0var c=[];var labelCount = new Array();var ts = new Object;<b:loop values="'data:labels'" var="'label'">var theName = "<data:label.name/>";ts[theName] = <data:label.count/></b:loop>for (t in ts){if (!labelCount[ts[t]]){labelCount[ts[t]] = new Array(ts[t])}}tz = labelCount.length-1;lc2 = document.getElementById('labelCloud');ul = document.createElement('ul');ul.className = 'label-cloud';for(var t in ts){for (var i=0;3 > i;i++) {c[i]=s(minColor[i],maxColor[i],ts[t]-ta,tz)}var fs = s(minFontSize,maxFontSize,ts[t]-ta,tz);li = document.createElement('li');li.style.fontSize = fs+'px';li.style.lineHeight = '1';a = document.createElement('a');a.title = ts[t]+' Posts in '+t;a.style.color = 'rgb('+c[0]+','+c[1]+','+c[2]+')';a.href = lcBlogURL+'/search/label/'+encodeURIComponent(t);if (lcShowCount){span = document.createElement('span');span.innerHTML = '('+ts[t]+') ';span.className = 'label-count';a.appendChild(document.createTextNode(t));li.appendChild(a);li.appendChild(span);else {a.appendChild(document.createTextNode(t));li.appendChild(a);}ul.appendChild(li);abnk = document.createTextNode(' ');ul.appendChild(abnk);}lc2.appendChild(ul);</script><noscript></noscript><b:include name="'quickedit'/"></b:includable></b:widget>original:http://sunr.blogspot.com/2006/10/blogger-v30_02.html<br /></b:include><b:widget id="'Label1'" title="'Labels'" type="'Label'/" locked="'false'"><b:include name="'quickedit'/"></b:include></b:widget>