Posts

javascript - JQuery change input field -

i working on webpage contains input field needs changed programmatically using stored string php variable. this jquery code , doing need. $(function(){ $('.start').click(function(e) { var currentpage = "<?php echo $name;?>"; $('input').val(currentpage); $('.textfield').prop("disabled", true ); $('.textfield').css('cursor','not-allowed'); }); }); when click start button name inserted input element, when click submit button, error message popup "field required". question is, why changed input value doesn't work. if add or remove letter submit button working , there no field message popup. thanks disabled fields won't submitted forms. hence, says "field required". there property can helpful in kind of situation. use readonly property. replace following line in code instead of disabled property. $('.textfield').prop("readonly", true ); ...

fatal exception in android studio after compiling -

hi beginner in android studio while performing fragment example in android studio got error while running of project while clicking button in app shows message "unfortunately app has stopped".i have checked in log shows following don't know how solve it.??? com.example.xxx.xxx e/androidruntime﹕ fatal exception: main java.lang.classcastexception: com.example.xxx.xxx.menufragment cannot cast com.example.xxxx.xxxx.textfragment @ com.example.xxxx.xxx.menufragment.onlistitemclick(menufragment.java:28) @ android.app.listfragment$2.onitemclick(listfragment.java:160) @ android.widget.adapterview.performitemclick(adapterview.java:301) @ android.widget.abslistview.performitemclick(abslistview.java:1584) @ android.widget.abslistview$performclick.run(abslistview.java:3399) @ android.widget.abslistview$1.run(abslistview.java:4653) @ android.os.handler.handlecallback(handler...

html - Combine several font tags by Javascript -

please me! i`m using ckeditor html text box editor ( http://ckeditor.com/ ) in system. when choose style text, editor generates several font tags text <font size="3"> <font color="#ffff00">header</font> </font> but system recognized format <font size="" color="" face=""> is possible change behavior ? my main idea write javascript onchange method editor. in method i`m going parse generated html text , convert necessary format. could please give advises ? in wrong case, best javascript solution parse generated html ? thanks advises.

ios - UINavigationBar disappears when performing segue -

i encountered problem in app. i have have uinavigationbar in pages, , created uinavigationcontroller 'embed in' first page. uinavigationbar appears on it, when perform segue first page (by instating new view controller , presenting it) navigation bar doesn't appear on second view controller. check segue presenting or pushing second page. check out segue properties, if it's presenting selection of 'modal' on segue property of attribute inspector. on presenting view controller won't navigation bar. navigation bar when push segue. and if want presenting animation on push using segue, can go custom segue. here link. http://www.appcoda.com/custom-segue-animations/

jquery - How to handle dynamically created tr in table -

i working ajax user can request multiple ajax @ single time. each user request creating tr in table show current process of user request. user can request multiple file @ time. in table 2 files uploading multiple time linux command. and ajax code :- $('#mxf').on('submit', function(event){ event.preventdefault(); d = new date(); $.ajax({ url : $(this).attr('action'), type : $(this).attr('method'), datatype: 'json', data : $(this).serialize(), beforesend: function() { var row = '<tr>'; row += '<td>'+$('#fileid').val()+'</td>'; row += '<td>'+$('#ndrive').val()+'</td>'; row += '<td>date</td>'; ...

python - How to close contour over outline rather than edge - OpenCV -

Image
tl;dr: how measure area enclosed contour rather contour line itself i want find outline of object in below image , have code works cases. thresholding , adpative thresholding not work reliably ligthing changes. use canny edge detection , check area ensure found proper contour. however, once in while, when there gap cannot closed morphological closing, shape correct area of contour line instead of whole object. what use convexhull , returns contour around object. however, in case object curves inwards along top , convexhull isn't approximation area anymore. i tried using approxpolydp area gets returned of contour line rather object. how can approxpolydp return similar closed contour around object, convexhull function does? code illustrating using above picture: import cv2 img = cv2.imread('img_0.jpg',0) cv2.imshow('original', img) edges = cv2.canny(img,50,150) cv2.imshow('canny', edges) contours, hierarchy = cv2.findcontours(edges,...

fortran - The minimum and maximum floating point exponent of a real number -

how can minimum , maximum exponent 32- , 64-bit real numbers? doing work avoid underflows , overflows , need know numbers. i need base floating point numbers. is possible in fortran equivalent of ilmach ? for non-zero reals, numeric model looks s*b^e*\sum_{k=1}^{p}f_k*b^{-k} . to value of base b use radix() . minimum , maximum values of exponent e can found exponent combined tiny , huge . use, intrinsic :: iso_fortran_env, : real32, real64 print 1, "real32", radix(1._real32), exponent(tiny(1._real32)), exponent(huge(1._real32)) print 1, "real64", radix(1._real64), exponent(tiny(1._real64)), exponent(huge(1._real64)) 1 format (a," has radix ", i0, " exponent range ", i0, " ", i0, ".") end