Posts

javascript - jquery selected how to select Checked checkboxes? -

this question has answer here: jquery: verify if in collection of inputs (of type checkbox) 1 checked 4 answers in html table have checkboxes colums following markup: <input type="checkbox" id="selection_2012-10-01-lin-c" class="selections" name="selection_checkbox" disabled="disabled"> <input type="checkbox" checked="checked" id="selection_2012-10-01-ade-c" class="selections" name="selection_checkbox"> on button click need validate if of check boxes selected, m using following code , getting false : var selectedlots = $('input[name^="selection_checkbox"]').prop("checked"); requriement count of selected checkboxes or true , please guide me how select this. thanks "requriement count of selected checkboxes...

core graphics - Creating an Arc Path in Objective-C -

i trying create arc path in xcode , code. cgpathaddarc(thepath,null,100,200,300,200,100,yes); this code works creates weird arc. wondering each number in code represents. trying create arc in form of half circle. suggestions? according apple documentation (which easy going http://developer.apple.com/ios ), first parameter path ref building. transform next (you've passed null). then, numbers, cgfloats: x x-coordinate of center point of arc. y y-coordinate of center point of arc. r radius of arc. startangle angle (in radians) determines starting point of arc, measured x-axis in current user space. endangle angle (in radians) determines ending point of arc, measured x-axis in current user space. and ending "clockwise" bool.

Java structure holding multiple variables that can be written and read as an integer? -

i sure exists, , believe did similar in c quite while bit fields, cannot think of how should this. basically have series of options can either on or off. these options describe operations application can perform on file e.g. structure { execute read write } if structure bit field able set structure value represents both read , write not execute (e.g. 3). if read structure give me 3 know given value execute should denied. bit field solution may not best solution in case though. definitely enumset 'zapl' recommended ( check here ) or have list of enum, latter makes more sense.

Does Python optimize lambda x: x -

so wrote code max/min assumes bottleneck on generating data (else i'd use max , min ), , takes key function, if not given uses identity function: if key none: key = lambda x: x and later: for in iterable: key_i = key(i) and since bottleneck on generator, question might moot, if there's no key, call lambda x: x every item. i assume python optimize identity function away. can tell me if does? or if doesn't, how expensive it? there way better without doubling line count (e.g. ternary operators)? good question ! optimizer see foo might identity function under predictable conditions , create alternative path replace it's invocation it's known result let's see opcodes : >>> def foo(n): ... f = lambda x:x ... return f(n) ... >>> import dis >>> dis.dis(foo) 2 0 load_const 1 (<code object <lambda> @ 0x7f177ade7608, file "<stdin>", line 2>) ...

Adding domain to Google App Engine -

i writing little app google app engine. point domain own google app engine application. domain has been in possession years , unused , parked @ host. when go add domain admin console, sends me google apps signup page. looks google apps gmail accounts, google drive space, etc, , have these items. not sure why it's trying force me signup account when trying point domain google app engine application. what doing wrong? need google apps account point domain gae application? i feel i'm doing wrong or missing obvious, have no idea be. you should sign google apps, not have use gmail, etc., domain name if don't want to. google trying move of services single platform, makes integration easier (e.g. authentication, user management, etc.)

amazon web services - Using a wildcard SSL with a CNAME pointing to EC2 instance -

i have cname on domain pointing amazon ec2 instance. utilize wildcard ssl certificate secure connection - https://secure.mydomain.com point ec2 instance. is such thing possible? unfortunately new both ssl certificates , ec2 instances. route 53 might come play? any appreciated, thanks! another option put cert on elastic load balancer, , point instance. makes easier scale, , don't have worry elastic ip's or configuration when rolling out new instances.

caching - django cache downloaded file on browser side with login_requried -

server side cache has plenty documents , convenient implement. more sever send http304 tell browser content haven't changed since last visit. like special use case, authorized user open file reading, , file won't change quite time. how tell browser cache file before authorization still needed ? possible ? know login_required decorator has conflict cache_page decorator