Posts

jquery - custom nivo slider slideshow -

i want customize nivo slider slideshow bullets appear in inner image. the slideshow nivo slider looks this: http://demo.dev7studios.com/nivo-slider/ i want customize bullets this: http://wowslider.com/automatic-jquery-slider-noir-squares-demo.html bullets appear in right corner of image. how can this? please me. simply adding following css should trick: .slider-wrapper{ position:relative; } .theme-default .nivo-controlnav{ position:absolute; top:15px; right:15px; padding:0px; z-index:9; }

java - Best approach (if any possible) in windows for getting live screen image -

i want capture frame in display on screen of windows pc regardless of being displayed bitmap or image file or similar. until used java robot api , c++ api, can capture desktop , windows etc. cannot capture that's being drawn using overlay videos or directx games. capturing while video playing returns image video region black , when in game returns image of desktop game isn't running! is there standard method capturing on screen (like in fraps etc.)? or need make custom driver each graphics card (impossible) the following code capturing screenshots java: http://www.codinguide.com/2010/04/capture-screen-shot-from-java.html hope helps.

java - How to send payload data using sitebricks web client using http delete method -

i using sitebricks http client send http requests rest service. question how send payload data delete ? post method accepts data parameter webclient<subnetid> client = web().clientof(deleteuser()).transports(user.class).over(json.class); //client.post(user) <-- ok ! client.delete(); // <-- delete not accepts user !!! ok guys, discussion raised in here answer.

How to redirect folders to index.php using .htaccess? -

folder structure: /index/ /upload/ /something/ these folders don't have .htaccess in them(and shouldn't). when accessing http://site.com/something redirects http://site.com/something/url=something , not desired. rewriteengine on # rewritebase /base/ # rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php?url=$1 [l,qsa] adding rewrite condition appending '/' @ end of folders makes additional(and unnecessary) request, not nice. how write rule folders sent directly front controller without unwanted redirects? try adding additional condition exclude existing directories: rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php?url=$1 [l,qsa]

UIwebview open document (pdf) in other app -

hello everyone, trying open pdf file in uiwebview other app. can display popup this. screen http://i33.tinypic.com/axv1i.jpg i write code this. put delegate also. uidocumentinteractioncontrollerdelegate -(void)webviewdidfinishload:(uiwebview *)webview { //other code if([filetype isequaltostring:@"pdf"]) { nslog(@"it pdf file."); //other code save nsdocumentdirectory , path // file://localhost/var/mobile/applications/024d40ff-4518-4526-beab- 2a0679fd6308/documents/iphone_user_guide.pdf nsurl *pdfurl = [nsurl fileurlwithpath:pathtodownloadto]; uidocumentinteractioncontroller *doccontroller = [uidocumentinteractioncontroller interactioncontrollerwithurl:pdfurl]; [doccontroller setdelegate:self]; [doccontroller presentopeninmenufromrect:cgrectzero inview:self.view animated:yes]; } } - (uiviewcontroller *) documentinteractioncontrollerviewcontrollerforpreview: (uidocumentinteractionc...

ruby - Using rubzip2 and paperclip in rails, how to you create a temporary zip file and save it to paperclip? -

i had code preciously zipped load of files, created zip file in tmp file system , added files there. i'm trying make more efficient using ruby's tempfile store file in code instead of manually writing tmp directory myself , deleting later on. i've written code try , it… def zip_up_files require 'zip/zip' t = tempfile.new(["temp-filename-#{export_type}", '.zip'], :type => 'application/zip') zip::zipoutputstream.open(t.path) |z| #pop files in zip... end #save has_attachment :download on model self.download = file.open(t.path) self.save #delete tempfile... t.close end this sucsfullt saved tempfile .download on model. if navigate saved zip file it's not zip file garbled text document. wondering if there's missing creation or saving of zip before get's saved modle. i've tried putting type tempfile creating. looks zip's missing mimetype. i'm not sure, can help? thanks! the...

javascript - how to add comma in textfield in html web page -

this question has answer here: how print number commas thousands separators in javascript 35 answers i have web page in input data <input /> , 1000 want 1,000 not change id value show becuase using same id in other calculation if 1,000 show nan... how can avoid this? <input type="text" id="test" onblur="addcommas()"> <script> function addcommas(nstr){ var offset = nstr.length % 3; if (offset == 0) return nstr.substring(0, offset) + nstr.substring(offset).replace(/([0-9]{3})(?=[0-9]+)/g, "$1,"); else return nstr.substring(0, offset) + nstr.substring(offset).replace(/([0-9]{3})/g, ",$1"); } alert(addcommas("1234567")); </script> i have got code forum... have idea how make function simple shows in input box when id value ...

html - Javascript function not working properly in IE<10 -

i have link, hides , shows fb:comments element <a onclick="comments(this)"> + comments ( <fb:comments-count href="http://some.url.com" fb-xfbml-state="rendered"> <span class="fb_comments_count">1</span> </fb:comments-count> ) </a> <div class=\"facebook-comments\"><!-- default style 'display:none'--> <fb:comments href=\"http://some.url.com" width="644" num_posts="10"> </fb:comments> </div> this comments() function: function comments(src){ //hide 'a' element called function src.style.display="none"; //show comments element src.parentnode.getelementsbyclassname('facebook-comments')[0].style.display="block"; return false; } this works fine in chrome, firefox, opera, safari , ie10 too, it's buggy in ie<10, happens when click + comments ...

c - I can't figure out what is wrong with my semaphore implementation -

i need implement producers , consumers in c89 using semaphores. i admit school assignment, going use pseudocode. it took me forever simplify code, can figure out wrong there 1 global variable: threadqueue ready; //global queue holds threads ready run these functions use in code. tried make them self-explanatory: newthread(function); //turns function thread rotatequeue(queue); //rotates queue head becomes tail , next becomes head add2queue(thread, queue); //adds thread queue runthread(newthread); //stops current thread, , runs newthread removehead(queue); //removes head of queue , returns here how designed semaphore: struct semaphore{ threadqueue queue; int val; } wait(semaphore s) { if(--s.val < 0) { add2queue(currentthread, s.queue); runthread(ready.head); } } signal(semaphore s) { if(s.val++ < 0) { add2queue(removehead(s.queue), ready); } rotatequeue(ready); runthread(ready.head); } finally ...

crud - Insert/Delete/Update With ZK MDB Microsoft Access database File Not work -

i cant insert/update/delete access mdb file on file mdb saw readonly, reason cant use command it? note: mdb file readonly note: software come zk fingerprint product code: 'b3-c/usb' "attendance management system" can work database.mdb, think can too. i try this: try cn.open() commandtext = "insert userinfo(userid,name) values(2,'madaraz')" sqldataadapter = new oledbdataadapter(commandtext, cn) sqlcombuilder = new oledbcommand(commandtext, cn) sqlcombuilder.executenonquery() catch er mysqlexception messagebox.show("error connecting database: " & er.message) cn.dispose() end try when try run above code not error has nothing happens don know going on. i hope expert can me thx guy in advance. if database file read only, won't work. remove read attribute mdb file.

html - Javascript for loop in a select box -

i have webpage form contains input fields , 1 of these listbox. inside listbox have add (in crescent order) numbers go 40000 99999 , increase 1000 every time. example: 40000 - 41000 - 42000 - 43000 ... 97000 - 98000 - 99000 - 99999 i wrote javascript function it's not working. here can see html code: <fieldset style="width:500px;"> <legend><font color="#d8d8d8"><b>required fields</b></font></legend> <font color="#ffffff"><b>player's name</b>:</font> <input type="text" name="nome" /> <font color="#ffffff"><b>vrs</b>:</font> <select name="cognome"> </select> <br /> </fieldset> here there's javascript function <script> var i=40000 for(i;i<42000;i=i+1000) {var select = document.getelementbyid("cognome"); select.options[select.options.length] = new option(i, ...

html - Why is my 100% height waaay oversized? -

i'm trying track down why background containers "background-overlay" , "background-gradient" pushing height of document beyond content displayed? i'm not sure what's going on here. simple. here template in work http://jordan.rave5.com/tmp/ i'm not sure code problem think 2 aforementioned classes. possible culprits: #background-overlay { z-index: 100; width: 100%; height: 100%; margin: 0; padding: 0; background-color: #273722; background-image: url(images/main-bg.png); background-repeat: repeat; background-attachment: fixed; opacity: 0.0; top: 0; bottom: 0; } #background-gradient { position: fixed; z-index: 200; width: 100%; height: 100%; ...

Rails and PHP encode64 not agreeing -

i'm try create hmac in rails , verify in php. rails shell: pry(main)>appsecret = '00916893840fe0a29dfdc261efd3a26a&' pry(main)>openssl::hmac.hexdigest('sha1', appsecret, 'get&http%3a%2f%2fopen.tianya.cn%2foauth%2frequest_token.php&oauth_consumer_key%3dfc69b18eb12bab1e9b35d1093c4de9290516cfdc4%26oauth_nonce%3dc09e4bf167fbc7eb374b1abb02b5268d%26oauth_signature_method%3dhmac-sha1%26oauth_timestamp%3d1366882036%26oauth_version%3d1.0') => "8494f6237ee6042a3da8848db21284be17bf6ade" php: $appsecret = '00916893840fe0a29dfdc261efd3a26a&'; $signature = base64_encode(hash_hmac('sha1', $appsecret, 'get&http%3a%2f%2fopen.tianya.cn%2foauth%2frequest_token.php&oauth_consumer_key%3dfc69b18eb12bab1e9b35d1093c4de9290516cfdc4%26oauth_nonce%3dc09e4bf167fbc7eb374b1abb02b5268d%26oauth_signature_method%3dhmac-sha1%26oauth_timestamp%3d1366882036%26oauth_version%3d1....