Posts

HTML form upload for ODT files / MIME type for *.odt -

i'm looking html form upload odt-files. need know parameter accept . <form method="post" action="upload.php" > <input type="file" name="file_upload" accept="" /> <button type="submit">upload</button> </form> with search in stackoverflow found have define correct mime type. for odt mime type application/vnd.oasis.opendocument.text the html code has that: <form method="post" enctype="multipart/form-data" action="upload.php" > <input type="file" name="file_upload" accept="application/vnd.oasis.opendocument.text" /> <button type="submit">upload</button> </form>

Automatically creating python script from GUI in Blender -

i have python script generated automatically actions in gui, such playing script replicate whole scene. the purpose able go on actions fine tooth comb later editing , revision. the idea seems intuitive, since every action in blender has equivalent python command (which displayed 1 clicks various buttons). one possible solution copy & paste info window. have searched 'history logging', 'history exporting', 'autocreate script', 'actions file', 'history file', , many variations on these themes - no avail.

javascript - Upload And Remove image -

i have upload button on web page, if upload image should show preview below , upload image should show next image , third should show next second image , on, , once click click "x" image should removed. here code <!doctype html> <html> <head> <meta charset=utf-8 /> <title>image preview</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> </script> <script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"> </script> <script> var blank="http://upload.wikimedia.org/wikipedia/commons/c/c0/blank.gif"; function readurl(input) { if (input.files && input.files[0]) { var reader = new filereader(); reader.onload = function (e) { $('#img_prev') .attr('src', e.target.result) .height(200); }; reader.readasdataurl(input.files[0]); }...

css - Is there any way to shape the submit button of the HTML form? -

Image
i'm creating html page forms. in want shape submit button arrow below (not below, i'm expecting 2d arrow)... is there way that... if you're interested using background image can use this: button{ background: transparent url(shape.jpg) no-repeat; border: none; box-shadow: none; width: 250px; /*img width*/ height: 350px; /*img height*/ }

html5 - Full screen in embedded videos from Youtube -

i want see screen full of embedded video getting black borders on left , right have included allow full screen in coding also.how remove borders , see stretched video? attaching code , screen shot .! screen shot of borders <iframe id="vid" width="100%" height="100%" src="https://www.youtube.com/embed/rdih8givr9i?autoplay=1&amp;modestbranding=0&amp;controls=0&amp;showinfo=0&amp;rel=0&amp;allowfullscreen=true"></iframe></div> the answer more complicated. "allowfullscreen" there displaying "fullscreen" button. (although it's kind of strange ) to make behave want to, have @ this explanation (the section " <iframe> ") basically, need put video in div full width of website (what did) , css magic make correct height.

ios - how to detect moving object in live video camera using openCV -

i using opencv ios application detect moving object in live video camera, not familiar use of opencv please me. other way welcome . - (void)viewdidload { [super viewdidload]; self.videocamera.delegate = self; self.videocamera = [[cvvideocamera alloc] initwithparentview:self.view]; self.videocamera.defaultavcapturedeviceposition = avcapturedevicepositionback; self.videocamera.defaultavcapturesessionpreset = avcapturesessionpreset352x288; self.videocamera.defaultavcapturevideoorientation = avcapturevideoorientationportrait; self.videocamera.defaultfps = 30; self.videocamera.grayscalemode = no; [self.videocamera start]; // cv::backgroundsubtractormog2 bg; } - (void)processimage:(cv::mat&)image { //process here cv::cvtcolor(image, img, cv::color_bgra2rgb); int fixedwidth = 270; cv::resize(img, img, cv::size(fixedwidth,(int)((fixedwidth*1.0f)* (image.rows/(image.cols*1.0f)))),cv::inter_nearest); //update model bg...

Speeding up complex Numpy Matrix multiplications (Point cloud) -

i have around 200 3d points need multiply rather complex 2d projection matrix. using numpy , loop, iterating through 3d point cloud, applying matrix transformations , getting data. this seems rather slow. there way might able vectorize this, or use kind of speed techniques (maps, pools etc.) f = matrix([ [735.4809, 0., 388.9476, 0.], [0., 733.6047, 292.0895, 0.], [0., 0., 1.0000, 0.] ]) vehiclerpy = self.getrt(roll=roll, pitch=pitch, yaw=0., x=imux, y=imuy, z=imuz); sonartocamera = self.getrt(roll=rtroll, pitch=rtpitch, yaw=rtyaw, x=rtx, y=rty, z=rtz); spacematrix = matrix([ [(sqrt(r**2 - (y/(cosd(roll)*cosd(pitch)))**2)*sind(theta))], [(y/(cosd(roll)*cosd(pitch)))], [(sqrt(r**2 - (y/(cosd(roll)*cosd(pitch)))**2)*cosd(theta))], [1] ]) finalmatrix = f*vehiclerpy*sonartocamera*spacematrix; uvmatrix = matrix([ [finalmatrix.item(0)/finalmatrix.ite...