Posts

javascript - Website not working properly because of jquery not loading -

Image
this website not mine . use guest. recently stoped working , owners doesn't seem take care of it. there way fix using console or plugin ? looks there error loading jquery. you can try inject obsolete version of jquery in browser, try (in console): (function(){ $.noconflict(); // turns off namespace $ newer jq var script = document.createelement('script') script.src="https://code.jquery.com/jquery-1.6.4.min.js" document.body.appendchild(script) })()

java - Server response doesn't match the list size -

i have server developped in spring framework. when try control response browser web pasting url, seems list (response.java's field) has right size (that same of list returned method getfourmyobject() ), i've tried print in server's console size , it's not equal 1. but when response android application, doesn't recognize other myobject first. so in controller's server response's list has different size received size client. my server's code: @requestmapping("/") public class routecontroller extends restgatewaysupport { @requestmapping(value = "/",method = requestmethod.get) public string index (){ return "index"; } @requestmapping(value = "/objectize",method = requestmethod.get) public @responsebody response objectize(@requestparam(value="time", defaultvalue="-1") string time, @requestparam(value="id", defaultvalue=...

c# - Telegram client updates and API requests over same session -

i'm coding custom c# telegram client starting tlsharp , modified in order support layer 54. i want handle both receiving updates telegram servers , using api without opening separate session this. the problem multithreaded access socket connected telegram server. here scheme: telegramclient <------- socket_1[(session_1)] --------> telegramserver the problem in order receive updates telegram server use while(true) cycle schematized as: while(true){ data_cipher = await socket_1.receive() // listen new stuff socket_1 data_plain = decrypt(data_cipher) // decrypt processupdate(data_plain) // process update } now if want ,for example, query telegram servers list of chats in registered, have access socket_1 in order send request, , wait answer, socket_1 in listening , can't access it. one solution use vector of request processed after update has been received, idea this: list<request> pending_requests = new list<request>() // l...

javascript - Toggle checkboxes on PHP table -

i have table checkbox in table header, used toggle checkboxes below it. i've add javascript function checkbox in header, far selects top checkbox (one checkbox) instead of of them. suggestions or advice on i've done wrong or research? html table header code: <thead> <tr> <th><center><input type="checkbox" value="" id="cbgroup1_master" onchange="togglecheckboxes(this,'cbgroup1')"></center></th> <th>sender</th> <th>receiver</th> <th>subject</th> <th>date</th> </tr> </thead> php table code: $table .= ' <tr> <td><center><input type="checkbox" id="cb1_1" class="cbgroup1"></center></td> <td><a href="pm_message.php?u='.$log_username.'&pmid='.$pmid.'" onclick=...

inheritance - C# How to add a property setter in derived class? -

i have requirement have number of classes derived single base class. base class contains lists of child classes derived same base class. all classes need able obtain specific values may obtained class -or- it's parent depending on derived class is. i looked @ using methods rather properties want make values available .net reporting component directly accesses exposed public properties in reporting engine excludes use of methods. my question 'best practices' method of implementing setter in derivedclass without having publicly available setter in baseclass public class baseclass { private baseclass _parent; public virtual decimal result { { return ((_parent != null) ? _parent.result : -1); } } } public class derivedclass : baseclass { private decimal _result; public override decimal result { { return _result; } // can't use setter here because there no set method in base class throws build error //set { _result = value; ...

c# - Check if an array exists in a BsonValue type -

i have bsonvalue abc , looking way check if contains array or not. structure below: "abc":[ "key1": "value1", "key2": "value2", . . "mno":{ "pqr":[ "valuefirst", "valuesecond" ] }, . . ] in c# code when try check if array pqr exists if(abc["mno"]["pqr"] != null) , keynotfoundexception. wrong on part index abc pqr or mno when doesn't exist. so, how can abc stored bsonvalue checked existence of these , overcome exception? thought of using filter . works bsondocument (please correct me if wrong). work around this?

javascript - HTML page reloads automatically -

i have html page given below: $(document).ready(function() { var showchar = 380; var ellipsestext = "..."; var moretext = "read more"; var lesstext = "read less"; var lesshtml=""; var morehtml=""; var content = $(".more").html(); if(content.length > showchar) { var lastchar = content.charat(showchar); if(lastchar == '/'){ showchar = showchar+1; } var c = content.substr(0, showchar); var h = content.substr(showchar-1, content.length - showchar); var lesshtml = c + '<span class="moreelipses">'+ellipsestext+' <a href="" class="morelink">'+moretext+'</a></span>'; var morehtml = content + '<span><a href="" class="morelink">'+lesstext+'</a></span>'; $(".more").html(lesshtml); } $(...