Posts

Featured post

javascript - Js, document.getElementById("ID").innerHTML, error -

hello i'm new javascript, , i'm try write out code test site , i'm having problems, dow below code , keep getting error , can't figure out why. typeerror: null not object (evaluating 'document.getelementbyid("h3").innerhtml = "<h3>you date!</h3>"') this second method tried using. i'm trying have have version list first 1 had pull .js file , build table, didn't work thought try this, guess happened? not working my code i'm using below. if can amazing. thanks, dakmessier var current = "1.0"; function get_latest(){ document.getelementbyid("bob").innerhtml = current; } if (local != current){ document.getelementbyid("get").innerhtml = "<button><a href=\"bla\">get latest update!</a></button>"; } else if (local == current){ document.getelementbyid("h3").innerhtml = "<h3>you date!</h3>"; } else { document.g...

jquery - jqGrid update specific column data with out refreshing the entire column? -

i using jqgrid in project . want update/refresh specific column data out refreshing entire grid. please give me idea that. here possible solution. can use 'setcell' in jqgrid set value specific cell in column. see fiddle here: https://jsfiddle.net/99x50s2s/4/ i hope above fiddle give idea complete task. <table id="sg1"></table> <div id="psg1"></div> <br> <button type="button" id="setcolumnbtn">update 'amount' column</button> jquery("#sg1").jqgrid({ datatype: "local", gridview: true, loadonce: true, shrinktofit: false, autoencode: true, height: 'auto', viewrecords: true, sortorder: "desc", scrollrows: true, loadui: 'disable', colnames:['inv no','date', 'client', 'amount','tax','total','notes'], colmodel:[ {name:...

javascript - Create a java script function in c# -

i'm developing winform application , want use google api v3 calculate barycenter of polygon. , have lng , lat in database. want call java script function in c# i'm new found using htmlelement can me here code tried doesn't give result. webbrowser webbrowser1 = new webbrowser(); string url = ("c:\\users/guenafai/desktop/topapplication/topapplication/baryscripts.htm"); console.writeline("je suis laaaaaaaaaaaa"); webbrowser1.navigate(url); htmlelement head = webbrowser1.document.createelement("head"); htmlelement scriptel = webbrowser1.document.createelement("script"); scriptel.setattribute("src","https://maps.googleapis.com/maps/api/js?key=aizasyaxby6ydvnzou0tk2rkrdmbnebn3gn1svk"); ihtmlscriptelement element = (ihtmlscriptelement)scriptel.domelement; string script = @" function baryc(){ var boundss = new google.maps.latlng...

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

when creating stub in ocmockito, use calls stub out method calls , return values: [given([stubobject mymethod]) willreturn:somevalue]; the problem have if don't define method method gets called during test, default seems to return nil . can lead sneaky bugs since real methods asserted never return nil , therefore return value not tested in code calling method. is there way change default behavior or maybe test if called on object apart few methods i'm stubbing? no, ocmockito stubs "nice". if want "strict" stubs, ocmock may suit better.

sql - Error using the DATEDIFF syntax -

i'm trying find age of employees sample database using code: select empno, firstnme, lastname, job, birthdate, datediff(hour,birthdate,getdate())/8766 age employee job '%r'; but keep getting error : "hour" not valid in context used.. sqlcode=-206, sqlstate=42703 this using ibm data studio 4.1. assuming you're using db2 , doesn't support datediff or getdate() . instead, subtract dates , use current date : select empno, firstnme, lastname, job, birthdate, (current date - birthdate)/365.25 age employee job '%r'