Posts

Featured post

c - Making file wrap around when using fwrite -

c - Making file wrap around when using fwrite - i using embedded scheme running linux.i utilize ramdisk filesystem on embedded target. application captures real-time info , standard c "fwrite" file in ramdisk fs.as there limited amount of memory , set max size file , cause fwrite wrap around circular buffer. there way in manner transparent application ? prefer application remain unchanged when migrate filesystem on storage device (esata) having much larger capacity. there's no built in method of achieving this. the best alternative write little wrapper function takes care of file write while maintaining count of number of bytes written. once has reached maximum size set should phone call rewind() (or fseek() etc.) go start of file. it might easier utilize mmap() memory map file , treat circular buffer. 1 time again need implement wrapping yourself. c linux embedded ramdisk

objective c - Should NSWindowController always be the superclass of a window controller? -

objective c - Should NSWindowController always be the superclass of a window controller? - when reading apple's cocoa tutorial, window controller regular class , while understand fine suppose, wouldn't improve subclass nswindowcontroller? if right, nswindowcontroller convenience class has lot of functionality required window controller implemented, right? is there reason why not utilize class? you don't have to. i've implemented controllers window inherited nsobject , if didn't need added functionality of nswindowcontroller . objective-c cocoa nswindowcontroller

flex - Is it possible that zipping an swf file results in a bigger file? -

flex - Is it possible that zipping an swf file results in a bigger file? - when gzip swf file, size goes 1,21 mb 1,86 mb... so, question bit answered myself. real question how possible? guess, colleague of mine said, swf binary , can't compressed anymore. conclusions zipping swf files shouldn't done. swf encoded, , encoding includes compression. it's possible if intend compress compressed file, compression result in bigger file. happens when seek zip jpeg or png file, example. what colleague said not true though. there lot of binary files can compressed. example, bmp files. flex flash gzip

jquery ui checkbox and php problem -

jquery ui checkbox and php problem - so have list of checkboxes gets added dynamically - trying style them using jquery ui checkbox. problem can styled one. there ways create workaround dynamic id's on input tags , labels each input tag via jquery ? here syntax trying: <div id="format"> <input id="check_<?php echo $category['category_id']; ?>" type="checkbox" name="selected[]" value="<?php echo $category['category_id']; ?>" /><label for="check_<?php echo $category['category_id']; ?>">d</label> </div> jquery code: $(function() { $( "#check" ).button(); $( "#format" ).buttonset(); }); thanks! try once: $("input[id^='check_'] > label[for^='check_']").css('color', '#f3f3f3'); php jquery user-interface checkbox

Delphi DeHL Deserialize XML File in newer class? -

Delphi DeHL Deserialize XML File in newer class? - i utilize dehl serilize xml , class in delphi , if add together property class , seek deserialize xml file. have error : ‘deserializing « \tapp\fobject\test » failed. serializer reported it’s missing or other entity read!’. i understand quite problem there way set default value instead of error ? alex reply me : you should able — annotating “part2″ field [xmlnullable]. tell xml serializer set “part2″ field nil if not have xml node. note while possible it’s not recommended. deserialized content should serialized original types otherwise “bad things” may happen. i inquire question long time ago on site not able find inquire question : http://alex.ciobanu.org/?p=285#comments xml delphi xml-serialization delphi-2010 dehl

python - How to print query output in Html using google app engine -

python - How to print query output in Html using google app engine - entity kind :football entity key :ag9kzxz-ywnxdwl0d29ybgryfqsscezvb3riywxsgicagica8iskda id : 5681726336532480 email (string) manutd@gmail.com identity (string) manchester united this info in datastore. want search details based on input(emailid) . so, if input email detail, want fetch corresponding club name , print on html page. have written next code class searchapp(webapp2.requesthandler): def get(self): #self.response.out.write(que) name=self.request.get('last_name') player_key=football.query() #qry=football.key(5891733057437696) qry=player_key.filter(football.email==name) #for qry2 in qry: self.response.out.write('<b>%s</b> wrote:' % qry.identity()) from understood, qry object, need utilize loop , print result in qry2.email , qry2.identity . reason, not able hence commented part. need know how fetch d...

css - Owl Carousel Auto Width with margin not working -

css - Owl Carousel Auto Width with margin not working - i have fixed height on images , need maintain image in proportion screen width gets smaller. #owl-demo .item img { display: block; width: auto; height: 300px } this works fine until need set margin in between images. #owl-demo .item { margin:0 10px 0 10px; } the margin won't show , images side side still. margin show if set width: 100% #owl-demo .item img { display: block; width: 100%; height: 300px } but image no longer in proportion. i tried owl's own demo , case. if inspect 1 of images , alter code @ top width: auto see margin no longer works. need remove max-width: 100% img tag bootstrap also. http://owlgraphic.com/owlcarousel/demos/images.html looks you're using version 1.3.x try upgrading version 2 , you'll fine. css owl-carousel