Posts

php - file_exist function won't work -

I have a function that checks that the mobile image is present, and if so, it will return the truth, no difference What I can do is that I can not work this function properly. public function mobileImageExist ($ image) {$ file = "images / $ image"; If (file_exists ($ file)) is true; return false; } I have also tried public function mobile imageexist ($ image) {$ file = dirname (__ file __). "/ Images / $ image"; If (file_exists ($ file)) is true; return false; } The $ image parameter that the function is being passed is just the name of the image eg: banner_mobile.jpg

html php get dom table - can't extract table data -

I'm trying to remove two tables when using Get HTML DOM, Can not do to get the information, only what I am getting on the following web page: Can you help in whatever you are doing wrong? The following PHP code is in use & lt ;? Php // How to use basic selector to retrieve HTML content for example ('../ simple_html_dom.php'); // Get from the DOM URL or $$ html = file_get_html ('http://www.lolking.net/now/euw/tallmangreen/'); // Find all links // foreach ($ html- & gt; ('a') $ e) // echo $ e- & gt; Href '& lt; Br> & # 39; & # 39; // Find All Image Foreign Currency ($ HTML- & gt; Find ('IMG' as $ E) echo $ e- & gt; Src '& lt; Br> & # 39; & # 39; // Find all images in the form of $ E as full tag foreign currency ($ html-> search ('IMG') echo $ e- & gt; External Text '& lt; Br> & # 39; & # 39; Find all div tags for $ e with id = gbar foreach ($ html- ...

php - my $_SESSION["message"] echoing everywhere even there is if -

I have a problem. I want to resume my message ("created subject", "subject failing creation" is not created or not) The problem is that the message is on every page, even if $ _ session ["message"] setting if is under the condition I really do not know where the problem is This is on my proceedings page ... if (isset ($ _ POST ["submit"])) {$ menu_name = mysql_prep ($ _ POST [" Menu_name "]); $ Position = (int) $ _POST ["status"]; $ Visible = (int) $ _POST ["visible"]; $ Query = "Include in topics ("; $ query. "=" Menu_name, position, visible "; $ query. =") VALUES ('{$ menu_name}', '{$ position}', '{$ visual } '; $ Result = mysqli_query ($ connection, $ query); if ($ result) {// success // $ _SESSION ["message"] = "created topic"; redirect_to ("manage_content.php"); } And {$ _SESSION ["message"] = "theme c...

python - How can I get useful data from lists in a list? -

The question is probably not very clear here. Here I have a list, like data structure: [[221.86797965649234, 490], [306.5453090728297, 400], [307.362157064 96666, 842]] How can I use an efficient method to get a new list I am [494,400,842]? Currently, my method list = [[221.86797965649234, 490] [306.5453090728297, 400], [307.362157064 96666, 842]] n NewList = []: newList.append (n [1]) If the original list contains more than one million items, it will be very slow, is there any effective way? Use: & gt; & Gt; & Gt; List = [[221.86797965649234, 490], [306.5453090728297, 400], [307.362157064 96666, 842]] & gt; & Gt; & Gt; [1] [4, 0, 400, 842] In the list, if your list contains more than a million items and actually becomes a performance problem, So by storing it in a database or using another approach, which lets you access it more carefully.

javascript - jqGrid: construct postData array using a function's return value -

शुभ संध्या, प्रारंभिक स्थिति अभी ग्रिड बनाते समय मैं स्थिर मानदंडों का उपयोग कर सर्वर से पैरामीटर को पास करता हूं: var $ grid = jQuery ("# ​​grid-table")। jqGrid ({url: '? c = grid.skill.GridSkill & amp; json & amp; o = get-data & amp; type = 1 ', postData: {' person_ref ': फ़ंक्शन () {वापसी $ (' # filter-person_ref ')। val ();},' country_ref ' : फ़ंक्शन () {वापसी $ ('# filter-country_ref')। val ();},}, mtype: 'POST', डेटाटाइप: "जेसन", colNames: self.columnTitles, colModel: self.columnNames, .. ।}); जटिल फ़िल्टर तंत्र (jqGrid नियंत्रण के बाहर) का उपयोग करते समय बनाए रखना बहुत मुश्किल है। वांछित दृष्टिकोण स्थिर दृष्टिकोण के बजाय, मैंने फ़ंक्शन कॉल का उपयोग करते हुए पोस्टडेटा मान सेट करने का प्रयास किया: / ** * अतिरिक्त फ़िल्टर को वामब्राह से अतिरिक्त फ़िल्टर फ़िल्टर में निकालने * / स्व .preparePostData = function () {var arrPostData = {}; // चयन बॉक्स से मूल्य प्राप्त करें ... के लि...

Get only top-level folders in IMAP -

क्या यह एक LIST या LSUB का उपयोग करके केवल शीर्ष-स्तरीय फ़ोल्डर्स को प्राप्त करना संभव है कमांड? मान लें कि मेरे पास निम्न फ़ोल्डर्स हैं (सी क्लाइंट को सूचित करता है, S सर्वर को इंगित करता है): सी: 0007 लिस्ट "" "*" एस : * सूची (\ हसनो चाइल्डलैंड) "।" "इनबॉक्स" S: * सूची (\ HasNoChildren) "।" "कचरा" एस: * सूची (\ हसनो चाइल्डलैंड) "।" "प्रेषित" एस: * सूची (\ हां चाइल्डलैंड) "।" "ए" एस: * सूची (\ हां चाइल्डलैंड) "।" "A.b" S: * सूची (\ HasNoChildren) "।" "A.b.c" S: * सूची (\ HasNoChildren) "।" "विज्ञापन" एस: 0007 ठीक सूची मैं एक विशिष्ट फ़ोल्डर के सबफ़ोल्डर को संदर्भ तर्क का उपयोग करके पुनः प्राप्त कर सकता हूं, जैसे: C: 0008 सूची "एक" "*" एस: * सूची (\ हां चाइल्डलैंड) "।" "ए" एस: * सूची (\ हां चाइल्डलैंड) "।" "A.b" S: * सूची (\ HasNoChildren) "।...

html - W3C Grayscale SVG Filters -

I'm trying to change the W3C greyscale filter found here: This ridiculous on webkit It's simple, but I'm also using it only because Gecko only supports filtering through filters: url (filter.svg) in CSS. I do not have much experience with SVG, and many times I have messed with them, they were very clear in percentage, but it is a bit more complicated with grayscale. So here's the code SVG file. & lt; Svg xmlns = "http://www.w3.org/2000/svg" & gt; & Lt; Filter ID = "Grayscale" & gt; & Lt; FeColorMatrix Type = "Matrix" value = "0.3333 0.3333 0.3333 0 0.3333 0.3333 0.3333 0.3333 0.3333 0.3333 0 0 0 0 1 0" /> & Lt; / Svg & gt; In particular, I'm looking at it for grayscale up to 90%, so that only 10% of color is visible, but I do not know how this filter works. I found this document here which is considered to be understood An easy way to do this is just to use The saturation type ...