Posts

Django jquery ajax remote validate returns TypeError: Cannot read property 'apply' of undefined -

i trying validate 1 field of form using jquery & validate.js in django. i've read many posts, regardless of various examples, fails on same error. simply use remote method included in plugin. last 1 hit , simplest code sample, same result: jquery.validate.js:1594 uncaught typeerror: cannot read property 'apply' of undefined. exception occurred when checking element id_client_code, check 'remote' method. @ function.$.ajax (jquery.validate.js:1594) @ $.validator.remote (jquery.validate.js:1529) @ $.validator.check (jquery.validate.js:777) @ $.validator.element (jquery.validate.js:492) @ $.validator.onfocusout (jquery.validate.js:300) @ htmlinputelement.delegate (jquery.validate.js:423) @ htmlformelement.dispatch (jquery-3.2.1.slim.min.js:3) @ htmlformelement.q.handle (jquery-3.2.1.slim.min.js:3) @ object.trigger (jquery-3.2.1.slim.min.js:3) @ object.simulate (jquery-3.2.1.slim.min.js:3) here views.py section remote, returns false expected when called...

android - Picasso, image not shown -

i using class implements googlemap.infowindowadapter. i want show image loaded internet inside info window: @override public view getinfocontents(final marker m) { //carga layout personalizado. view v = inflater.inflate(r.layout.info_windows_origen, null); string info = m.gettitle(); string direccion = m.getsnippet(); string url = m.getsnippet(); ((textview)v.findviewbyid(r.id.info_window_nombre)).settext("punto de partida"); ((textview)v.findviewbyid(r.id.info_window_placas)).settext(info); ((textview)v.findviewbyid(r.id.info_window_estado)).settext(direccion); imageview imgprofile =(imageview)v.findviewbyid(r.id.info_window_imagen); sharedpreferences prefs = getapplicationcontext().getsharedpreferences(misdatos, context.mode_private); string imagen = prefs.getstring("imagen", "por_defecto@email.com"); log.d("boton origen ...

python - Imgur API: Dictionary values magically turns into None? -

i know voodoo magic isn't cause of - sure seems it! i have following code snippets, making use of imgur api. imgur object client imgur api uses , contains attribute credits displays number of access credits user has on website. imgur = imgurpython.imgurclient(client_id, client_secret) calling: imgur.credits returns credits normal, i.e.: {'clientlimit': 12500, 'userreset': 1503185179, 'userlimit': 500, 'userremaining': 0, 'clientremaining': 12000} however when attempt call dictionary in later function: def check_credits(imgur): ''' receives client - , if there not credits left, wait until credit refills - i.e. pause program ''' credits = imgur.credits credits_remaining = credits['userremaining'] reset_time = credits['userreset'] if credits_remaining < 10: print('not enough credits, remaining: %i' % credits_remaining) ...

php - Can access WSDL only with proxy. Straight access does not work -

i getting error: fatal error: uncaught soapfault exception: [wsdl] soap-error: parsing wsdl: couldn't load ' http://217.194.255.193:8080/work/ws/ws1.1cws?wsdl ' : failed load external entity when try access wsdl in browser cyclic authorization issue if password doesnt fit. i have tried use several anonymizers, of them act browser itself, 1 of anonymous services worked , managed see file. anybody has ideas can cause such problem? here code using: ini_set("soap.wsdl_cache_enabled", "0"); header('content-type: text/html; charset=utf-8'); $client = new soapclient("http://217.194.255.193:8080/work/ws/ws1.1cws?wsdl", array( 'login' => 'log', 'password' => 'pass', 'trace' => true, 'features' => soap_use_xsi_array_type, ) );

angularjs - Running mocha tests by file not by folder -

Image
i wanted implement unit testing framework on angular1 codebase , trying analyze best way organize unit test files. have decided use mocha js testing framework. documented in mocha js reads off tests 'test' folder. wanted make able read off based on filename, because designed folder structure keep related components together, , better include unit test file related components. possible?? attached image of folder strucutre. wanted make "page_test.js"

c# - how can we configure null removable components(object field) of a class? -

suppose have class components(object fields) of them can null(removed) suitable create new class without (component) field or use interface handle it. suppose have several components can removed objects thx in advance public class class1{ component1 component1; component2 component2; component3 component3;//can null (removed) component4 component4;//can null (removed) } public class class2{//removed component3,component4(new class) component1 component1; component2 component2; } public class class3{//removed component3(new class) component1 component1; component2 component2; component4 component4; } public class class4{//removed component4(new class) component1 component1; component2 component2; component3 component3; } or use interface public interface icomponent1{ } public class component1:icomponent1{ } public class nocomponent1:icomponent1{ } public interface icomponent2{ } public class component2:icomponent2{ ...

javascript - Parse Facebook Login Error: "You must initialize FacebookUtils before calling logIn" -

i trying use facebook login on parse cordova. $cordovafacebook.login(['email'], function(response) { parse.facebookutils.login('email', { success: function(user) { console.log('success fb login') // handle successful login }, error: function(user, error) { // handle errors , cancellation console.error(error) } }); }, function(error) { console.error(error) }); and in .run block on app.js , have window.fbasyncinit = function () { parse.facebookutils.init({ appid: fbappid, autologappevents: true, xfbml: true, status: true, cookie: true, version: 'v2.4' }); fb.appevents.logpageview(); console.log('parse fb loaded') // loadparse() }; however, on logger when run app on ios device, never see "parse fb loaded". when run on browser, do see "parse fb loaded". whenever try login via facebook on device, error you must initialize facebookutils before...