Posts

passing anonymous function as parameter in javascript -

मेरे पास निम्न जावास्क्रिप्ट कोड है: EventsManager.prototype.hideContainer = function () {Var कि = यह; Var index = that.getNextUnreadEventIndex (); यदि (इंडेक्स! == -1) {EventsManager.animateHideLeft (function () // & lt; --- फ़ंक्शन को किसी अन्य फ़ंक्शन के पैरामीटर के रूप में देना {var unreadEvent = that.eventsList.splice (सूचकांक, 1) [0]; UnreadEvent.isEventOnFocus = सच; that.eventsList.push (unreadEvent); that.displayLastEvent ();}); }} यहां ईवेंटमॅनेजर.एनेटहैड-लिफ़्ट () फ़ंक्शन का कोड है: EventsManager.animateHideLeft = function (callback) {var p = document.getElementById () "eventsContainer"); Var width = parseFloat (p.style.width); अगर (चौड़ाई = चौड़ाई === "नाएन") चौड़ाई = 200; यदि (चौड़ाई & lt; = 10) {स्पष्टटाइमआउट (एफआर); अलर्ट (कॉलबैक का प्रकार); // & lt; - यह "अपरिभाषित" कॉलबैक () दिखाता है; } और {चौड़ाई = चौड़ाई - 10; P.style.width = चौड़ाई + "पीएक्स"; Fr = setTimeout (फ़ंक्शन () {EventsManager.animateHideLeft ...

php - Get all HTML comments on website with html simple dom -

I have tried to get all the comments from a website ( and -> ), but without luck. Here is my current code: Include ('simple_html_dom.php'); $ Html = file_get_html ('url'); Foreach ($ html-> Mill ('comment') as $ element) $ element- & gt; Plain text; Anyone have any suggestions on how to capture comments, at this time it is only giving me blank page I do not know how to parse regex the HTML, but & lt ;! - - (. *?) - & gt; You can use the same regex to search and find comments ...

python - Move data from Raspberry pi to a synology diskstation to present in a webpage -

I am looking for ideas, how the sensor data is displayed in a webpage, by which a Synology Diskstation Hosted, where data comes from sensors connected to Raspberry PI, it is being implemented in Python. I have put the sensors together, and they are connected to raspberry. I also have Python code, so I can read the sensor. I have a webpage and running on display on Python. But how do I get data from the disk? When the webpage is displayed, the reading is done entirely. Is there any type of webservice of Rasp? I've seen Pyro 4 but do not think it can be installed on the disc. Do you have a suggestion? I am not experimenting on this subject, but what do I do (instead of Raspberry PI Synology On) is to establish a database between Let's call your synonyms Server , and Raspberry PA Sensor customer . I will host a database on the server, and the sensor client. Data will either be pushed through webservices using an API or at a more low level if you want it fast (th...

PHP equivalent for javascript escape/unescape -

Assume I have a string: something when I I get it in JS: That's why I get this code by js. Can decode it in: document.write (unescape ('% 73% 6F% 6D% 65% 74% 68% 69% 6 e% 67')); I need the escape function in PHP which will do the same ( some encoding them: % 73% 6F% 6D% 65% 74% 68% 69% 6 e% 67 ) How to do this? PHP: crudelecode ( "Your Funty String"); JS: decodericompment ('% 20funky% 20string'); Do not use escape as it is being disliked.

android - How do I use instantiateItem correctly with a mixture of view and layouts objects? -

I am trying to get this code working: @Override public object instantiateItem (See group collection, condition of int) {see v = faucet; If (0 == position) {string data = " gt; body> yes there gt; & lt; html & gt;"; WebView wv = (webview) Find VVBIID (RaidView); Wv.loadData (data, "text / html", tap); V = wv; } And {layout influer vi = (layout inflator) CTT system system (references LAOUT_INFLATER_SERVICE); V = vi.inflate (R.Letter.Editor, empty); } Collection.addView (V, 0); Return vi; } I am copying this article here to create a horizontal swiping view by default: When I use this code, Crash Got Any Suggest I'm not collecting correctly by trying to insert a layout in ViewGroup? 03-20 14: 49: 55.037: Error / Android Randomime (25 9 90): Fatal Exception: main java.lang.NullPointerException com.EditorHyde.app.ba (unknown source) On Android. Support.v4.view.ViewPager.a (unknown source) android.support.v4.view.ViewPager.a at (unknown sour...

ASP.NET MVC - AJAX Postback vs Full post back -

Always use an AJAX postback instead of postback and why not pass in the model through JSAL, because one AJAX Postback is always fast? Complexity, the AJAX page for the most part is more complex, and more to jump through it There are quacks and hoops. Many people do not want to deal with it. Besides, Ajax is not always fast, it really depends.

javascript - find an element by style with jquery -

How can I get an element in an HTML document, whose style is the property? Here's an example: HTML: & lt; Ul & gt; & Lt; Li style = 'z-index = 1;' & Gt; E1 & lt; / Li & gt; & Lt; Div style = 'z-index = 8;' & Gt; Div & lt; / Div & gt; & Lt; Li style = 'z-index = 2;' & Gt; E2 & lt; / Li & gt; & Lt; Li style = 'z-index = 3;' & Gt; E3 & lt; / Li & gt; & Lt; Li style = 'z-index = 4;' & Gt; E4 & lt; / Li & gt; & Lt; Li style = 'z-index = 5;' & Gt; E5 & lt; / Li & gt; & Lt; Ul & gt; The question is how do I choose, for example: z-index = 4 . And how to select all with div to z-index = 8 ... If the style is set to inline, you can use an attribute selector: $ ('li' [style * =" z-index : 4 "] ') // z-index = 4 . The advantage of this method is that it is very fast. If the style is...