Jeking's profileWelcome To JJ's SapcePhotosBlogListsMore Tools Help
There are no photo albums.
Loading...

Welcome To JJ's Sapce

Please Enjoy youself when you are visting here.
2/26/2009

揭开正则表达式的神秘面纱 - UBB <-> HTML

http://www.regexlab.com/zh/regref.htm

        function up(str){
           str = str.replace(/</ig,'&lt;');
           str = str.replace(/>/ig,'&gt;');
           str = str.replace(/\n/ig,'<br />');
           str = str.replace(/\[code\](.+?)\[\/code\]/ig, function($1, $2) {return phpcode($2);});

           str = str.replace(/\[hr\]/ig,'<hr />');
          
           str = str.replace(/\[\/(color|font|backcolor)\]/ig,'</font>');
          
           str = str.replace(/\[size=(\d+?)\]/ig,'<font size="$1">');
          
          
           str = str.replace(/\[(sub|sup|u|i|strike|b|blockquote|li)\]/ig,'<$1>');
           str = str.replace(/\[\/(sub|sup|u|i|strike|b|blockquote|li)\]/ig,'</$1>');
           str = str.replace(/\[\/align\]/ig,'</p>');
           str = str.replace(/\[(\/)?h([1-6])\]/ig,'<$1h$2>');

           str = str.replace(/\[align=(left|center|right|justify)\]/ig,'<p align="$1">');
           str = str.replace(/\[size=(\d+)px\]([^\[]+)\[\/size\]/ig,'<font style="font-size:$1px">$2</font>');

           str = str.replace(/\[color=([^\[\<]+?)\]/ig, '<font color="$1">');
           str = str.replace(/\[backcolor=([^\[\<]+?)\]/ig, '<font style="background-color:$1">');
           str = str.replace(/\[font=([^\[\<]+?)\]/ig, '<font face="$1">');
           str = str.replace(/\[list=(a|A|1)\](.+?)\[\/list\]/ig,'<ol type="$1">$2</ol>');
           str = str.replace(/\[(\/)?list\]/ig,'<$1ul>');

           str = str.replace(/\[s:(\d+)\]/ig,function($1,$2){ return smilepath($2);});
           str = str.replace(/\[img\]([^\[]*)\[\/img\]/ig,'<img src="$1" border="0" />');
           str = str.replace(/\[url=([^\]]+)\]([^\[]+)\[\/url\]/ig, '<a href="$1">'+'$2'+'</a>');
           str = str.replace(/\[url\]([^\[]+)\[\/url\]/ig, '<a href="$1">'+'$1'+'</a>');
           return str;
        }

        function ubbtohtml(){
           str = up(document.getElementById("ifvalue").value);
           str = "<div style='font-size:14px;line-height:24px;'>" + str + "</div>";

            var win=new Ext.Window({
            title:"经理人网投稿预览",
            autoScroll:true,
            width:600,
            height:540,
            html:str
            });
            win.show();
        }

2/5/2009

Chinese love is “like a thermos – cold outside but hot inside.”

Chinese love is “like a thermos – cold outside but hot inside.”
 
Is it true?
1/15/2009

I was happy to have an interview at EnglishPod's studio

I took an interview at EnglishPod's Studio with hosts Erica and Marco. That's pretty cool and really useful experiences I have. Thanks EnglishPod's staff.

Please listen it by click here.

1/6/2009

New Resolution!

New year is coming, everybody must have his own new year resolution, so am I.
Just like one of my friend mentioned: - New year, new life!
I believe everything will be renewed in year 2009.

My resolutions are:

> to keep learning English, including writing, reading, listening, speaking. Especially, speaking is the most important.
> to study specialized knowledge of finance even including SAP if it's possible.


I'm going to stick to my resolutions, I really mean it! Trust me!
Let's wait and see!


5/7/2008

The early bird gets the worm

There is an Enlish idiom say "The early bird gets the worm" or "The early bird catches the worm".  It meaning success comes to those who prepare well and put in effort.

From today, I promise I will get up earlier than I used to do because I want to get much more worms. The worms to me is the money, I want to get promotion and money from my current job.

I did get up early this morning. Really, I awaked with alarm clock's help. Then I cooked breakfast for myself. I bet you must want to know what I have cooked. That is rice in vegetable soup. Hehe, what! Sounds so easy?! Yeah, I agree with you. But you should know every food cooked by yourself is delicious. I like my cook very much.

OK, I have to back to work now. I will come back here soon... Hot
3/28/2008

晕了,看房计划重新启动

今天早上收到中介的消息,说是原先说好卖方的房东因为突发事件房子不卖了。
哎,原本开开心心的事情就这样泡汤了...
明天早上去中介那里拿回我们之前付的定金,从今天开始,又要回到找房,看房的轮回中了。好累...
愿房价不要再涨,否则我真的买不起房子了,贷款买房都买不起了...
默默地祈祷...
3/24/2008

小订已付

找房看房是一个累人的过程。经过三个多月的漫长的看房,从杨浦到虹口,从宝山大华到普陀长宁,最终把目标锁定在静安区的一个建筑面积只有40平米的房子。
 
昨天算是一个值得纪念的日子,将意向金交给中介了(当然值得纪念的不只是这个Hot),不过能否按我们理想的价格成交(也不是一个小数目)还是一个未知数,完全依赖于房东的决定。但从中介的口气上来看,问题不是很大了。
 
这间房子虽小,但地处上海的中心区域,房价虽高,但必将是自己的小窝。不是有句话吗,“金窝银窝不如自己的草窝”!
目前没有其他的期望,只期望能够顺利的买下这间房子...
 
接下来还有很多事情要做,很多钱要付Sad(自己这些年攒的钱全部交出去了)。
 
我爱我家!
 
 
3/11/2008

作好规划切勿花钱受累 新婚买房之五大步骤

  第一步:学会理财,把钱管好
  要买房,钱就不能大手大脚的花了!面对房子这达几十万元的高额消费品,工薪阶层的你,需要好好计划一下自己的收入支出,为不久的幸福美屋打好经济基础。
  管钱我不太会,花钱我更不会。Tongue out
  第二步:作好规划,切勿花钱受累
  买总价多少钱的房子?面积要多大?打算向银行借多少钱?月供可以承受多少?打算供多少年?……这些都是小夫妻在选房前必须共同做好的功课。
  1、量力而行,明智计划,切勿用尽积蓄还负债累累
  2、选择合适的还款方式
  年轻人在贷款买房时,要考虑自己工作的稳定性,以及对未来几年结婚、生儿育女的支出等预算,从而选择适合自己的房贷。
  已经考虑成熟。Sun
  第三步:明确目标,耐心选房
  1、目标明确后才好选择:是工作第一,居住第一,还是投资第一?
  2、必备小知识以免上当
  耐心选房但毕竟房价走势不明,无心恋战...看好了就要下手!Mobile Phone
  第四步:签合同,明晰产权
  1、选好了房子,就到关键的签合同时刻了!
  签订购房合同四大步骤:一、慎签认购书二、防御不平等条约三、留神合同附件四、买卖合同需鉴证
  2、买房本是开心事,但为了房产证上一个名字而闹得要分手的情侣也不少见。
  感情再好也要“丑话说在前”,产权在白纸黑字上要写着归谁,还是要开诚布公的说清楚。否则,一不小心分手,房子却分不了,反而落下大麻烦。
  
  第五步:仔仔细细收楼,开开心心装修
  1、要收楼了!喜悦的心情挂上眉梢!尽管如此,心还是不能松懈下来,仔细验收、看清楚你的新居,避免货不对板!
  2、最后的装修。
  
1/22/2008

领导者的五个层级

领导者的五个层级

  “一个人如果连自己都领导不好,就不可能领导好别的任何人。”领导者应该更多的去做他应该做的事儿,而不仅仅是他喜欢做的事儿,因为人才都是不一样的,对于领导者来说懂不懂保护差异性,最终能不能管理好差异性,是非常重要的。把领导者划分出了五个层级:第一层次,只有职位头衔;第二层次,通晓以情动人,人际认同,靠良好的关系;第三层次。有业绩成果,他有了成果之后别人就会佩服他;第四层次,懂得人力资源开发;第五层次,做到众望所归。

  老子说,太上,不知有之,其次,亲而誉之,其次,畏之,其次,侮之。作为一个好的领导者,他为管理为员工所做的一切最终都是要向员工证明:企业不是个人的,而是属于大家的!

12/25/2007

How to Prioritize

How to Prioritize

May 22nd, 2007 by Steve Pavlina

Virtually every time management system teaches that you must prioritize your projects to make sure you’re working on what’s truly important instead of getting caught up in minor things.  However, few systems explain precisely how to do this.  How do you decide which task is really the most important at any given time?  Is it the one that’s most urgent, the one that will earn you the most money, the one that will produce the greatest long-term happiness, the one that will please your boss the most? If you don’t use an intelligent method of prioritization, you’ll lack consistency and bounce from one task to another with no rhyme or reason.

In this article I’ll share with you a simple and effective prioritization method adapted from the military.

From a pure military (i.e. non-political) standpoint, the goal of any engagement is to achieve victory by inflicting the greatest damage on your enemy with the least amount of resources.  Wouldn’t you say this is the essence of personal time management as well?  You want to make the greatest amount of progress towards your goals with the least amount of effort.

Objective

For prioritization to have any meaning, it’s imperative that you have a clear objective.  For the military your overall objective may be to achieve a decisive victory.  Your personal objective may be a set of goals, your mission statement or purpose, or even a state of being.  The role of prioritization then is to help you achieve this result with as little effort as possible.

Resources

The second consideration is the resources you have available.  Military resources include troops, guns, tanks, bombs, planes, fuel, supplies, etc.  Your personal resources include time, money, your social network, your physical energy, and so on.  Time is generally your scarcest resources because it cannot be replenished.

Prioritization

Now in order to prioritize intelligently, we need a method that tells us how to evaluate projects in terms of their overall importance.  Which projects will help us achieve our objectives most efficiently?

CARVER

A key component of military strategy is selecting the most important targets to attack.  But how do you know which targets are the most important?  Centuries of warfare have provided us with a reasonably intelligent answer.

CARVER is an acronym for a military method of target selection.  CARVER stands for Criticality, Accessibility, Return (or Recuperability), Vulnerability, Effect, and Recognizability.  I’ll explain what these are in a moment.

For every potential target, we assign a value of 1 (lowest) to 5 (highest) for each CARVER factor, thereby creating a CARVER matrix.  Then by summing the six CARVER values, we can calculate a total score for each target, and those scores represent the targets’ relative prioritization.  The higher the CARVER score, the more “important” a target becomes.

Now lets explore the six CARVER factors, and consider how we can apply them to personal projects.

Criticality.  How critical is the target with respect to the main objective?  Will it move you significantly closer to your goal, or is it a relatively puny and insignificant item?  A low criticality project might be cleaning out your garage.  It would be nice to do, but it’s probably not going to make that much difference in your life.

Accessibility.  Can you actually reach the target, or is it so well defended that attacking it directly is impossible?  Do you have the means to tackle this project immediately, or does it have prerequisites?  Starting a new business might not be very accessible if you work long hours and are living paycheck to paycheck, but asking for a promotion may be very accessible.

Return.  In military operations the term Recuperability is used here, referring to how quickly the enemy can recover from the destruction of the target.  There’s little point in attacking a target that can be rebuilt or replaced with minimal effort.  For personal effectiveness we’ll use Return instead.  How great is the expected return on your commitment of resources?  Developing a new passive income stream may yield a significant return, while watching the news may yield virtually none.

Vulnerability.  How vulnerable is the target?  What amount of resources will be required to take it out?  How vulnerable are the projects you’re considering?  A one-day project will score a high vulnerability rating, while a six-month project will score much lower.  Similarly, an inexpensive project is more vulnerable than an expensive one.

Effect.  If you successfully destroy the target, how widespread will the impact be?  If you successfully complete your project, what effect will it have on your life as well as the lives of others?  Writing a best-selling book may have a significant effect, while completing your tax return will have very little effect.

Recognizability.  Can we see the target well enough to attack it, or is it highly camouflaged or mobile?  Is your project crystal clear or totally fuzzy?  How easy is it to recognize the steps necessary to complete the project?  Have you completed this type of project before, or will you have to figure out the steps as you go along?  Clear goals with clear steps will score higher on recognizability than foggy goals with unclear steps.

Now let’s see how we can create a CARVER matrix to prioritize certain projects.  The 1-5 rankings for each factor are simply for the sake of example, so your own rankings may vary.  Keep in mind that these rankings are all relative to your primary objective, mission, or purpose.

  Criticality Accessibility Return Vulnerability Effect Recognizability Total
Write a book 5 3 3 1 5 3 20
Start a blog 2 5 2 5 4 4 22
Run a marathon 2 4 3 1 4 5 19
Make new friends 4 2 5 3 3 1 18

The numbers tell the story.  According to our CARVER matrix, the most important project to tackle next is to start a blog.  While it’s among the least critical items and won’t necessarily produce a great return for the time invested, it’s relatively easy and straightforward to do.  Next comes writing a book, which is a more critical long-term project (at least for our arbitrary person making these evaluations), but it will also require a lot more effort to achieve.  The worst project is making new friends, its main drawbacks being that it’s too fuzzy and ill-defined, so it might be wise to replace that one with a more specific project.

Even though we’re just using simple addition instead of a more complex weighting of these factors, CARVER does a fairly decent job of spitting out an intelligent prioritization of projects.  It’s really good at depicting which projects are worth the effort and which aren’t.  It also shows when you should tackle a piece of low-hanging fruit vs. initiating a really big project.

I used CARVER often when running my computer games business.  For example, my CARVER matrix suggested it would be wise to release an add-on for my top selling product instead of creating a whole new game from scratch.  Although the add-on wasn’t going to sell as well as a new game, it was a fairly straightforward two-week project that produced solid results.

Feel free to adapt the basic concept of CARVER to your specific needs.  You can assign extra weight to certain factors as well as introduce additional factors like enjoyment or financial payoff.  Just be careful not to get carried away.  The point of CARVER is to select a reasonably intelligent project and then get into action.  Don’t lose yourself in hours of analysis paralysis.

For group decisions you can even have each team member create their own CARVER matrix and then average the results.  You’ll quickly discover whether the team leader and team members are on the same page.

By using a simple system like CARVER, you’ll know which projects are important enough to deserve your attention and which are, relatively speaking, a waste of your time and energy.  You’ll benefit from greater consistency in decision-making and better results for your efforts.

Thanks for you read and you can get more information from http://www.stevepavlina.com/ which is really wonderful website.
 

Jeking Pan

Occupation
Location