30.11.08

勇于承担大任,善于从小处做起


1. Create a plan for each day--use the plan to organize your day, but don't be married to the plan--remain flexible.
每天做一个计划——用这个计划来安排你的日子,但不要过于死板,要保持灵活性。
2. Keep a list of your priorities in view. Measure your to-dos and planned actions against them.
将考虑中的事情按主次列一个表,衡量它们的重要性并且有计划地对待。
3. Ask of each new task before you: "Who is the best person to be doing this task?"
对你面临每一个新任务的时候问一句,谁是完成这个任务的最佳人选?
4. Ask specifically for what you want, including conditions of satisfaction, and timeframes. Don't expect people to read your mind.
明确的提出你需要的东西,包括满意的条件以及时间的构成。不要指望别人了解你的心思。
5. Skip the morning news on TV. It's primarily negative. Skip the late night news on TV. It's even more negative than the morning news. Go to sleep earlier, read, or write a journal.
不要看早间新闻, 它们大多是消极的。不看晚间新闻, 它们更消极。早点上床,阅读或写一篇日记。
6. Start each day with 30-60 minutes of reading--business, educational or inspirational.
每天早上阅读30-60分钟——可以是商业的,有教育意义的或是启发心智的书籍。
7. Refine and clarify your vision. Where are your actions taking your organization?
精练地阐明你的见解。你行为的最终目的是什么?
8. Whatever you are currently complaining about--stop it.
无条件放弃你现下所有的抱怨。
9. Use the 80/20 rule to your advantage.
80/20的准则对待你的收益。(注:80/20的准则——销售额的80%来自20%的客户或20%的产品,停止把你80%的时间花在只有20%生意的80%的顾客和产品上, 将你80%的时间化在带来80%生意的的顾客和产品上。)
10. Work on one item at a time.
在一个时间内集中精力做一件事情。
11. Put your basic values into writing.
把你的基本价值观写下来。
12. Put your goals (all of them) into writing.
把你所有的目标写下来。
13. Do your next day's planning at the end of the day.
一天结束前为第二天做好计划。
14. Be networking conscious.
有意识地建立关系网。
15. Establish a reading/learning program.
制订一个阅读或者学习计划。
16. Ask the question, where is the strategic or competitive advantage?
问这样一个问题,自己的战略或者竞争优势在哪里?
17. Figure out what you are very good at doing--delegate or outsource the rest.
确定你最善于做的是什么——将其它事委派或外包给别人做。
18. Analyze the cost/benefit of what you are doing. It may be more cost-effective to delegate or outsource.
为你正做的工作做一个成本效益分析。也许把这项工作委派或外包给别人是更加划算的。
19. Ask yourself, "Is what I am doing the highest value contribution I can make now?" If not, don't do it.
问你自己:我正在做的事情能让我获得最大的利益回报吗?,如果不是,那就不要去做。

[转贴,找不到出处了。谢谢原创了]

23.11.08

I really hate 5460!

I had a dream last night that our highschool classmates had a meeting...
Very interesting and vivid like reality... chat with the gate guard "DaYe", see the notice board...
everything is similiare and familiar...
It made me missing the past time this morning.

I login to the 5460 to review the classmates...
Same as before, 5460 really get me frustrated, confused and irretated... I can not find what i want. rubbish, just rubbish... i don't know what the people of 5460 think about all day! why just spend a little time think for the USERS not YOURESELF!!


Anyway, link to my mother school to see my old dreams (good or bad).
http://www.zhengzhong.net.cn/

20.11.08

Excel Function - Match() & Index() - 组合赵某列最大值所对应其他列的值

MATCH

Returns the relative position of an item in an array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.) that matches a specified value in a specified order. Use MATCH instead of one of the LOOKUP functions when you need the position of an item in a range instead of the item itself.

Syntax

MATCH(lookup_value,lookup_array,match_type)

Lookup_value is the value you use to find the value you want in a table.

*Lookup_value is the value you want to match in lookup_array. For example, when you look up someone's number in a telephone book, you are using the person's name as the lookup value, but the telephone number is the value you want.

*Lookup_value can be a value (number, text, or logical value) or a cell reference to a number, text, or logical value.

Lookup_array is a contiguous range of cells containing possible lookup values. Lookup_array must be an array or an array reference.

Match_type is the number -1, 0, or 1. Match_type specifies how Microsoft Excel matches lookup_value with values in lookup_array.

*If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value. Lookup_array must be placed in ascending order: ...-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE.

*If match_type is 0, MATCH finds the first value that is exactly equal to lookup_value. Lookup_array can be in any order.

*If match_type is -1, MATCH finds the smallest value that is greater than or equal to lookup_value. Lookup_array must be placed in descending order: TRUE, FALSE, Z-A, ...2, 1, 0, -1, -2, ..., and so on.

*If match_type is omitted, it is assumed to be 1.

Remarks

*MATCH returns the position of the matched value within lookup_array, not the value itself. For example, MATCH("b",{"a","b","c"},0) returns 2, the relative position of "b" within the array {"a","b","c"}.

*MATCH does not distinguish between uppercase and lowercase letters when matching text values.

*If MATCH is unsuccessful in finding a match, it returns the #N/A error value.

*If match_type is 0 and lookup_value is text, you can use the wildcard characters, question mark (?) and asterisk (*), in lookup_value. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.

INDEX

Returns a value or the reference to a value from within a table or range. There are two forms of the INDEX function: the array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.)

Free IP Logger

[script language="JavaScript" src="http://freehostedscripts.net/iplogger.php?site=ID10549"][/script]

"[]"-->"<>"

19.11.08

格物致知

As there is ALWAYS a way!

16.11.08

心有多静,路就能走多远

心无物欲,即是秋空霁海;座有琴书,便成石室丹丘。

割肉饲鹰

14.11.08

大道存乎一理


珠帘寨


(西皮导板)昔日有个三大贤,(原板)刘关张结义在桃园。弟兄们徐州曾失散,古城相逢又团圆。关二爷马上呼三弟,张翼德在城楼怒发冲冠。耳边厢又听(流水)人呐喊,老蔡阳的人马来到了古城边。城楼上助你三通鼓,十面旌旗壮壮威严。哗喇喇打罢了头通鼓,关二爷提刀跨雕鞍。哗喇喇打罢了二通鼓,人有精神马又欢。哗喇喇打罢了三通鼓,蔡阳的人头落在马前。一来是老儿命该丧,二来弟兄得团圆。贤弟休回长安转,就在这沙陀过几年,落得个清闲。

13.11.08

Editplus语法高亮实现是Python 编辑调试环境

为了实现语法加亮和自动完成功能,我们必须下载两个文件,下载地址为
http://www.editplus.com/files/pythonfiles.zip ,解压到editplus 的安装目录下。压缩包有三个文件,此处我们用到两个,python.acp 文件和python_extd.stx 文件。
Acp 文件是自动完成文件,stx 文件是语法加亮文件。怎样加载呢?方法如下:
tools->preferences->Setting & syntax 下,首先新建一个文件类型,我们命名为python,扩展名(file extensions)栏里我们填入py。在syntax file 栏里我们找到刚才下载的python_extd.stx 文件,在Auto completion 栏里找到python.acp 文件,在Function Pattern 栏里填入:
[ \t]*def[ \t].+:
这样我们就可以通过Ctrl+F11 快捷键直接显示出python 文件中的函数列表。

这时我们打开一个python 文件,就可以看到有语法加亮了。但是我们在编辑的时候会发现一个问题就是,在输入冒号后,没有自动缩进,当然,如果我们手工缩进后会发现后面的输入也进行了同样的缩进,怎样让editplus 自动识别冒号然后直接缩进,并且如何修改缩进的长度呢?我们可以看到一个Tab/Indent 标签,打开他可以看到Tab,Indent 的选项,分别填入自己习惯的距离。我两个都填入4,并且选中Insert spaces instead of tab 和Enable auto indent。然后在Auto Indent open 里填入一个冒号“:”。

find max Mises stress and Moment, output the displacement and moment at some timestep

import odbAccess
odb = session.openOdb('case14.odb')
Moment = 'SM'
Stress ='S'
elemset = odb.rootAssembly.instances['PART-1-1'].elementSets['BEAMELEM']
maxMises = -0.1
maxSM1 = 0.0
maxSM2 = 0.0
maxSM3 = 0.0
maxStep1 = "_None_"
maxStep2 = "_None_"
maxStep3 = "_None_"
maxStep4 = "_None_"
maxFrame1 = -1
maxFrame2 = -1
maxFrame3 = -1
maxFrame4 = -1
i = 1
for step in odb.steps.values():
# print 'Processing Step:', step.name
for frame in step.frames:
# print 'frame inc:', frame.incrementNumber
# print 'frame no:', i
allFields = frame.fieldOutputs
stressSet = allFields[Stress]
momentSet = allFields[Moment]
stressSet = stressSet.getSubset(region=elemset)
momentSet = momentSet.getSubset(region=elemset)
for stressValue in stressSet.values:
if (stressValue.mises > maxMises):
maxMises = stressValue.mises
maxElem1 = stressValue.elementLabel
maxStep1 = step.name
maxFrame1 = i
for momentValue in momentSet.values:
if (abs(momentValue.data[0]) > abs(maxSM1)):
maxSM1 = momentValue.data[0]
maxElem2 = stressValue.elementLabel
maxStep2 = step.name
maxFrame2 = i
if (abs(momentValue.data[1]) > abs(maxSM2)):
maxSM2 = momentValue.data[1]
maxElem3 = stressValue.elementLabel
maxStep3 = step.name
maxFrame3 = i
if (abs(momentValue.data[2]) > abs(maxSM3)):
maxSM3 = momentValue.data[2]
maxElem4 = stressValue.elementLabel
maxStep4 = step.name
maxFrame4 = i
i = i + 1
OutStressMomentfile = open('stressmoment.txt','w+')
print 'Maximun Mises %f in elem %d frame # %d Step: %s'%(maxMises,maxElem1, maxFrame1,maxStep1)
OutStressMomentfile.write(' Max Mises: ')
OutStressMomentfile.write(str(maxMises))
OutStressMomentfile.write(' in elem: ')
OutStressMomentfile.write(str(maxElem1))
OutStressMomentfile.write(' at frame: ')
OutStressMomentfile.write(str(maxFrame1))
OutStressMomentfile.write(' at step: ')
OutStressMomentfile.write(maxStep1)
OutStressMomentfile.write('\n')
print 'Maximun SM1 %f in elem %d frame # %d Step: %s'%(maxSM1,maxElem2, maxFrame2,maxStep2)
OutStressMomentfile.write(' MaxSM1: ')
OutStressMomentfile.write(str(maxSM1))
OutStressMomentfile.write(' in elem: ')
OutStressMomentfile.write(str(maxElem2))
OutStressMomentfile.write(' at frame: ')
OutStressMomentfile.write(str(maxFrame2))
OutStressMomentfile.write(' at step: ')
OutStressMomentfile.write(maxStep2)
OutStressMomentfile.write('\n')
print 'Maximun SM2 %f in elem %d frame # %d Step: %s'%(maxSM2,maxElem3, maxFrame3,maxStep3)
OutStressMomentfile.write(' MaxSM2: ')
OutStressMomentfile.write(str(maxSM2))
OutStressMomentfile.write(' in elem: ')
OutStressMomentfile.write(str(maxElem3))
OutStressMomentfile.write(' at frame: ')
OutStressMomentfile.write(str(maxFrame3))
OutStressMomentfile.write(' at step: ')
OutStressMomentfile.write(maxStep3)
OutStressMomentfile.write('\n')
print 'Maximun SM3 %f in elem %d frame # %d Step: %s'%(maxSM3,maxElem4, maxFrame4,maxStep4)
OutStressMomentfile.write(' MaxSM3: ')
OutStressMomentfile.write(str(maxSM3))
OutStressMomentfile.write(' in elem: ')
OutStressMomentfile.write(str(maxElem4))
OutStressMomentfile.write(' at frame: ')
OutStressMomentfile.write(str(maxFrame4))
OutStressMomentfile.write(' at step: ')
OutStressMomentfile.write(maxStep4)
OutStressMomentfile.write('\n')
OutStressMomentfile.close()
timeFrame = odb.steps['Step-2'].frames[2002]
displacement = timeFrame.fieldOutputs['U']
Pipenode = odb.rootAssembly.instances['PART-1-1'].nodeSets['PIPENODE']
PipenodeDisp = displacement.getSubset(region=Pipenode)
OutDispfile = open('Disp.txt','w+')
OutDispfile.write("Node ")
OutDispfile.write("x disp ")
OutDispfile.write("y disp ")
OutDispfile.write("z disp\n")
for v in PipenodeDisp.values:
print 'Node label =', v.nodeLabel
OutDispfile.write(str(v.nodeLabel))
OutDispfile.write(" ")
print 'x disp =', v.data[0]
OutDispfile.write(str(v.data[0]))
OutDispfile.write(" ")
print 'x disp =', v.data[1]
OutDispfile.write(str(v.data[1]))
OutDispfile.write(" ")
print 'x disp =', v.data[2]
OutDispfile.write(str(v.data[2]))
OutDispfile.write("\n")
OutDispfile.close()
SMoment = timeFrame.fieldOutputs['SM']
SMoment = SMoment.getSubset(region=elemset)
OutMomentfile = open('Moment.txt','w+')
OutMomentfile.write("Element ")
OutMomentfile.write("SM1 ")
OutMomentfile.write("SM2 ")
OutMomentfile.write("SM3 \n")
for m in SMoment.values:
print 'Elem label =', m.elementLabel
OutMomentfile.write(str(m.elementLabel))
OutMomentfile.write(" ")
print 'SM1 =', m.data[0]
OutMomentfile.write(str(m.data[0]))
OutMomentfile.write(" ")
print 'SM2 =', m.data[1]
OutMomentfile.write(str(m.data[1]))
OutMomentfile.write(" ")
print 'SM3 =', m.data[2]
OutMomentfile.write(str(m.data[2]))
OutMomentfile.write("\n")
OutMomentfile.close()
odb.close()

10.11.08

Show IP & address - <<-((

(div align="center")(img border="0" src="http://ip.chinaz.com/ipshow.asp"/)(/div)

code of visitor's map

[script src="http://widgets.amung.us/map.js" type="text/javascript">WAU_map('0u0njbpowxk6', 420, 210, 'neosat', 'default-pink')

Python script in ABAQUS to read displacement and write to a file

import odbAccess
odb = session.openOdb('case3.odb')
timeFrame = odb.steps['Step-2'].frames[99]
displacement = timeFrame.fieldOutputs['U']
Pipenode = odb.rootAssembly.instances['PART-1-1'].nodeSets['PIPENODE']
PipenodeDisp = displacement.getSubset(region=Pipenode)
myoutfile = open('tryout.txt','w+')
myoutfile.write("Node ")
myoutfile.write("x disp ")
myoutfile.write("y disp ")
myoutfile.write("z disp\n")
for v in PipenodeDisp.values:
print 'Node label =', v.nodeLabel
myoutfile.write(str(v.nodeLabel))
myoutfile.write(" ")
print 'x disp =', v.data[0]
myoutfile.write(str(v.data[0]))
myoutfile.write(" ")
print 'x disp =', v.data[1]
myoutfile.write(str(v.data[1]))
myoutfile.write(" ")
print 'x disp =', v.data[2]
myoutfile.write(str(v.data[2]))
myoutfile.write("\n")
myoutfile.close()
odb.close()

6.11.08

Guass-Jordan解线性方程组



subroutine UWAPIPE_GuassJordan(n,K,dF,du)
!
!! solve linear equations using Guass-Jordan method
use UWAPIPE_module
implicit none

integer, intent(in) :: n
real(kind=gp), dimension(n,n), intent(in) :: K
real(kind=gp), dimension(n), intent(in) :: dF
real(kind=gp), dimension(n), intent(out) :: du

integer :: i, j
real(kind=gp), dimension(n,n+1) :: Mat
real(kind=gp), dimension(n+1) :: temp

Mat(:,1:n) = K(:,:)
Mat(:,n+1) = dF(:)
du = 0.0_gp
do i = 1, n
do j = i+1, n
if (abs(Mat(j,i))>abs(Mat(i,i))) then
temp(i:n+1) = Mat(i,i:n+1)
Mat(i,i:n+1) = Mat(j,i:n+1)
Mat(j,i:n+1) = temp(i:n+1)
end if
end do
Mat(i,i:n+1) = Mat(i,i:n+1)/Mat(i,i)
do j = 1, n
if (j /= i) then
Mat(j,i:n+1) = Mat(j,i:n+1) - Mat(j,i)/Mat(i,i)*Mat(i,i:n+1)
end if
end do
end do
du = Mat(:,n+1)
end subroutine UWAPIPE_GuassJordan

5.11.08

三家店


[西皮流水]
将身儿来至在大街口
尊一声过往宾朋听从头
一不是响马并贼寇
二不是歹人把城偷
杨林与我来争斗
因此上发配到登洲
舍不得太爷的恩情厚
舍不得衙役们众班头
实难舍街坊四邻
与我的好朋友
舍不得老娘白了头
儿想娘亲难叩首
娘想儿来泪双流
眼见得红日坠落在西山后
叫一声解差把店投

3.11.08

偶感

认真听别人说话,认真考虑别人的问题,不要逃避,决断早晚要下,不如尽快做出