Wednesday, 26 October 2011

pythonchallenge2

http://www.pythonchallenge.com/pc/def/ocr.html

I need study more about Python.
because I solved this by using non-coding way.

Sunday, 23 October 2011

pythonchallenge1

http://www.pythonchallenge.com/pc/def/map.html

I know

Not a smart way but i did
import string
for i in range(len(oStr)):
for a in range(len(string.ascii_lowercase)):
if a<=23:
if oStr[i:i+1] == string.ascii_lowercase[a]:
oNewStr = oNewStr[:i]+string.ascii_lowercase[a+2]+oStr[i+1:]
else:
if oStr[i:i+1] == string.ascii_lowercase[a]:
oNewStr = oNewStr[:i]+string.ascii_lowercase[a-24]+oStr[i+1:]


"i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url."

==============12/25===================
here is the way to using string.maketrans()
follow the example, and here is my code.
text="g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."
intab = "abcdefghijklmnopqrstuvwxyz" #string.ascii_lowercase,
outtab = "cdefghijklmnopqrstuvwxyzab"#string.ascii_lowercase[2:]+string.ascii_lowercase[:2]
from string import maketrans
trantab = maketrans(intab, outtab)#
print text.translate(trantab);





pythonchallenge0


========================================
'It is Vbscript

oMother = 2
oMulitNumber = 38

function oCount (mot,num)
'for i = 1 to num
oCount = mot^num
'next
end function
answer = oCount (oMother,oMulitNumber)

logmessage answer

Friday, 21 October 2011

Term III Week2 Note





12 edge cycle for finger
fit the size with concept
think: fiinger nile
http://goldennumber.net/hand.htm
think how withe
making four fake fingers
group plawn and finger
scale it with concept
make base shape plawn first
slice 4 edge in pawn
then more 4 edges for one finger
delete up to down 3 rows polygon which will connect to finger
finding form of hand
make sure there has geo between two fingers

Saturday, 8 October 2011

Term III Week1 Note




Image Plane
  • nurb plan -set scale on x,z depend on pic's dimensions.
  • Align side view and front view
  • freeze transform
  • Duplicate then parent
  • assign image-lamber
camera focal Length 90
x-ray mode
cinlider 16
assing martrial
Making ref Arm
  • adjust pivot by press "Insert" key
  • parent
  • group
  • layer
point constrant
add loop edge
normal
brige
fill hole
addpend
keybord B for soft selection
Shift+. glow selection
Shift+, sub selection
show verts info
to the edga ring and collapes Ctrl+right mouse
Snap
split

Wednesday, 28 September 2011

VBScript XSI rename objcet

'input a name that you want to replace
removeName = "cs_em5902_CTRL_Mocap_rig_"
replaceName = ""

'auto select object inculd remoueName
SelectObj "*"+removeName+"*"
dim list
set list = GetValue( "SelectionList" )

'rename MK_set node
if list.count > 0 then
for each maker in list
oldName = maker.Name
maker.Name = Replace(oldName, removeName, replaceName)
LogMessage maker.Name
next
end if

Wednesday, 21 September 2011

Python : reName selected objects in mobu

from pyfbsdk import*
lModelList = FBModelList()
FBGetSelectedModels( lModelList )
lcropL= 1
lcropR= 1
#lPatten=""
#lNewName=""
if len( lModelList ) == 0:
    FBMessageBox( "Message", "Nothing selected", "OK", None, None )
else:
    modifiedmodels = []
    for model in lModelList:
        print model.Name[lcropL:-lcropR]
        #model.Name = model.Name[lcropL:]
        #model.Name = model.Name[:-lcropR]
        #model.Name = model.Name.replace( lPatten, lNewName )