Posts

normalize - Properly normalizing a dual quaternion -

i'm having trouble dual quaternions, , believe it's because they're not normalized. a, b , a' dual quaternions latter conjugated. when doing this: q = * b * a' should theoretically end q = b if , b normalized. in cases, don't, , it's messing whole skeletal hierarchy. many pages show norm of dual quaternion ||q|| = sqrt(qq'), means taking square root of dual number, , have no idea how that. right i'm dividing whole thing length of real part. i've been searching around days, still have yet find code example on how use dual quaternions. feel know theory pretty well, still can't work. not difficult. of interest computer graphics unit dual quaternions, i.e. ||q|| = 1. leads to: qq' = (r, d)(r*, d*) = (rr*, rd* + dr*) = (1, 0) q = dual quaternion. r = real part, d = dual part. see, unit dual quaternions dual part vanishes. need calculate magnitude real part. problem reduced calculating magnitude of simple quaternion. , calc...

optimization - Assembly uses CALL ESI 3 times on GetTickCount why? -

can explain why gettickcount called 3 times in row when 1 result used? this isn't whole function of assembly part has gettickcount many times. don't think it's human error in programming that? sort of optimization trick or compiler screw up? the output below ollydbg 00412eb0 /$ 81ec f4010000 sub esp,1f4 00412eb6 |. 53 push ebx 00412eb7 |. 55 push ebp 00412eb8 |. 56 push esi 00412eb9 |. 8b35 14b24d00 mov esi,dword ptr ds:[<&kernel32.gettick>; kernel32.gettickcount 00412ebf |. 57 push edi 00412ec0 |. ffd6 call esi ; [gettickcount 00412ec2 |. ffd6 call esi ; [gettickcount 00412ec4 |. ffd6 call esi ; [gettickcount 00412ec6 |. 8bc8 mov ecx,eax 00412ec8 |. b8 cdcccccc mov eax,cccccccd 00412ecd |. f7e1 mul ecx 00412ecf |. c1ea 03 shr edx,3 0041...

html - jQuery .css does not add display:block; for all divs -

hi jquery script not add display block same mane divs, first one. js $("#sidecontrol_container").mouseenter(function(){ settimeout( function(){ $('#packet_name').css('display','block'); },310); $( "#sidecontrol_container" ).animate({ width:"230px" }, 300 ); }); $("#sidecontrol_container").mouseleave(function(){ $('#packet_name').css('display','none'); $( "#sidecontrol_container" ).animate({ width:"40px" }, 300 ); }); html <div id="sc_wraper"> <div id="packet_name">1</div> </div> <div id="sc_wraper"> <div id="packet_name">1</div> </div> css #packet_name{ height:40px; width:190px; float:right; display:none; } it adds first div name packet_name <div id="packet_name" style="display...

recursion - Cascading reveal in Python Minesweeper -

i working on recursive function reveal contents of spaces around zero. getting type error "typeerror: unsupported operand type(s) -: 'list' , 'int'" code. want code (when given location) reveal spaces around not mines until there number. import sys game import * gameio import * import random rows = int(sys.argv[1]) cols = int(sys.argv[2]) mines = int(sys.argv[3]) def main(): mat = buildmatrix(rows,cols) status = buildmatrix(rows,cols) minematrix = placemines(mat) smatrix = processmatrix(minematrix) print("here minefield: ") displayboard(smatrix,status) array = [int(i) in input("enter row , column: ").split()] first = uncover(status,smatrix,array) displayboard(smatrix,status) return main() def minecascade(m,mat,r,c): if (mat[r][c] == '&'): if (m[r][c] == '*'): return elif (m[r][c] == 0): if (r > 0) , (c > 0): ...

jsf 2 - Primefaces....Getting Rowindex from Datatable in bean class -

sir, how can selected rowindex of primefaces datatable in bean class.? customer details

HTML: need help reducing white spaces between image table rows -

i managed reduce white space between images on same row of table blogger.com, can't life of me figure out how reduce white space between rows of images. below html have. suggestions? <table border="0" cellpadding="0" cellspacing="5" style="width: 900px;"> <tbody> <tr><td valign="top" width="209"> <img src="url" height="130" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px width="200"/> ... <img src="url" height="130" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px width="200"/> </tbody></table> you missing " before width=...

vb.net - how to make a loop until an event in visual studio? -

how make loop until event in visual studio ? i want value of label datagrid cell, until user clicks on button1. can me code ? logic: do .. ... textbox1.text = datagridview1.selectedrows(0).cells(0).value.tostring until button1.click why want loop @ first place? label value once set doesn't change. if want label value empty can try setting empty once button1.click event triggers.