Thursday, 15 May 2014

implode basket products - PHP -


I'm trying to list all the products related to all my sessions ['cart'] and implant them, not me Find out how in the Implode list, please help!

  $ list = ''; Forex Currency ($ _ session ['carriage'] AS $ key => $ qyt) {$ item [] = array ('size_id' => $ qyt ['size']); } $ Res = $ db- & gt; Execute ("SELECT s.name, p.item_num, p.name AS product_name, p.discount, s.price AS product_price, s.units product_size products from INNER P on P Product_id = s.product_id where s.id IN ("Implode (", ", / * list SIZES_ID HERE * /).") "Order by SDID DESC"); While ($ line = $ res-> GetNext ()) {   

given For example, two simple changes will be sufficient:

  foreach ($ _ session ['cart'] AS $ key => $ qyt) {$ items [] = $ qyt ['size' ]; } $ Res = $ db- & gt; Execute ("SELECT s.name, p.item_num, p.name AS product_name, p.discount, s.price AS product_price, s.units Product_Signs INNER products from P on P product_id = s.product_id where SI D. In (". Feroda (", ", $ item.") "Order by SID DESC"); While ($ line = $ res-> GetNext ()) { 

delphi - Is there a Static Constrctors/Destructors Help topic -


I know that in D 2010 they added support for stationary constructors and districts. Where can I find more information about them: syntax and samples?

They are described in the wiki: and.

Here's one.


How do you sum values inside a for loop in Matlab? -


I want to add acid to run the loop and then want to print the total value of all previous acidic values. My problem is just fine, it is currently printing only individual values, which is not acidic.

p> ans =

  2.1676  

This is my code

  pki = [7.7,3.9]; T = 2; N = 55; For i = 1: t; Acidic = Log 10 (1 / ((n-1) * (10 ^ -piki (I)))); Yoga (acidic) and  

edit - as Indicates, you do not need the t variable.

You do not have any semicolons on your line sum (acidic) , so MATLAB prints the result. But it seems that you have some other problems - acidic is a scaler, so the value is overwriting every time, maybe you want to do something like this:

  pki = [7.7,3.9] ; N = 55; Acidic = Log 10 (1 / ((n-1). * (10. ^ - pki)));  , . * , and .     operators. They tell MATLAB the element based on element conducting on the vectors. MATLAB tells print out the last  disp  line output value. 


java - J2EE war file redeployment changes not reflected -


मैंने निम्न के रूप में फ़ाइल index.jsp बनाया है

  & lt; form action = " "विधि =" पोस्ट "& gt; & lt; br & gt; प्रथम नाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "प्रथमनाम" आकार = "20" & gt; & lt; br & gt; उपनाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "आद्यानाम" आकार = "20" & gt; & lt; br & gt; & Lt; इनपुट प्रकार = "सबमिट करें" मान = "सबमिट करें" & gt; & lt; br & gt; & Lt; / प्रपत्र & gt;  

मैं इसे निर्यात करने के लिए और सब कुछ ठीक काम करता है। फिर बाद में मैं index.jsp को संशोधित करता हूं,

  & lt; फ़ॉर्म क्रिया = "ग्रीटिंग सव्रल" विधि = "पोस्ट" & gt; & lt; br & gt; प्रथम नाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "प्रथमनाम" आकार = "20" & gt; & lt; br & gt; उपनाम: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "आद्यानाम" आकार = "20" & gt; & lt; br & gt; & Lt; इनपुट प्रकार = "सबमिट करें" मान = "सबमिट करें" & gt; & lt; br & gt; & Lt; / प्रपत्र & gt;  

मैंने इसे फिर से निर्यात किया है, लेकिन परिवर्तनों को प्रतिबिंबित नहीं किया गया था। जब मैं स्रोत को देखता हूं, तो फॉर्म क्रिया अभी भी रिक्त के बराबर है मैंने अपाचे को फिर से शुरू किया है मैं लॉग को देखता हूं, यह मुझे दिखाता है कि इसे दोबारा नियोजित किया गया है .. लेकिन बदलाव नहीं दिखाई दिए।

मैंने विभिन्न ब्राउज़रों के साथ कोशिश की है, यह देखने के लिए ग्रहण को पुनरारंभ करें कि क्या परिवर्तन सहेजे गए हैं, अपाचे पुनः आरंभ करें कोई सुझाव? धन्यवाद

आप क्या कर रहे हैं, उपकरण का उपयोग कर रहे हैं, आप उनका उपयोग कैसे कर रहे हैं आदि पूरी तरह से अस्पष्ट यह वास्तव में मददगार होगा यदि आप अपने संदर्भ पर और अधिक जानकारी दे सकते हैं और स्पष्ट कर सकते हैं कि आप क्या कार्य कर रहे हैं वर्तमान में, अनुमान लगाने में आपकी मदद करना बहुत कठिन है ...

बस के मामले में, मेरा अनुमान है कि आपने वास्तव में युद्ध की तैनाती नहीं की थी यानी आपने इसे अपाचे बिमटेट की वेबएप निर्देशिका में कॉपी नहीं किया था (यह तथ्य कि आप अपाचे टोमक का प्रयोग कर रहे हैं मेरा दूसरा अनुमान है अपाचे आमतौर पर अपाचे HTTPD , वेब सर्वर को संदर्भित करता है)।


django - 'RelatedManager' object has no attribute -


मेरे पास इस तरह परिभाषित मॉडल है:

  वर्ग UserDetail (models.Model): प्रयोक्ता = मॉडल। फ़ॉरइन्ज (उपयोगकर्ता, डीबी_ इंडैक्स = ट्रू, अनन्य = ट्रू, संबंधित_नाम = 'विवरण') पसंदीदा = मॉडल। कई सारे माईफिल्ड (अनुच्छेद, संबंधित_नाम = 'अनुग्रहित', रिक्त = सत्य)  

और मैं ऐसा कुछ करने की कोशिश कर रहा हूं:

  आलेख = get_object_or_404 (अनुच्छेद, pk = id) request.user.details.favourites.add (लेख)   

यह काम क्यों नहीं कर रहा है?

मुझे यह त्रुटि मिल रही है:

'संबंधित प्रबंधक' ऑब्जेक्ट में कोई विशेषता नहीं है 'पसंदीदा'

मुझे लगता है कि विवरण सही प्रकार नहीं है, लेकिन ऐसा क्यों नहीं है? और मैं इस तरह से एक क्वेरी कैसे कर सकता हूं?

जब आप user.details तक पहुँचते हैं , यह UserDetail.user विदेशी कुंजी के backreference तक पहुँच जाता है। विदेशी कुंजी स्वयं यह निर्दिष्ट नहीं करती है कि एक उपयोगकर्ता में केवल एक ही UserDetail हो सकता है, इसलिए डीजेँगो आपको एक संबंधित प्रबंधक / देता है, जिसे आप फ़िल्टर कर सकते हैं और एक नियमित प्रबंधक की तरह क्वेरी तो आप ऐसा ही करते हैं कि आप अपने .objects मैनेजर्स में करते हैं। आप user.details.all () , user.details.filter () , user.details.get () के लिए पूछ सकते हैं, और इसलिए, जो आपको विधि और परिणामों के आधार पर एक खोजता, एक ऑब्जेक्ट या अपवाद देगी।


signal processing - DSP Algorithms Book -


I am searching for a book similar to "Comic Introduction to Algorithm" by Thomas Common in the direction of the DSP algorithm. Is DSP completely anything in the form of a coerman on the market?

Edit I should say that I am searching for a book that is in line with the light of Pakistan.

I'm a big fan, without introducing the Sampling DSP concepts, as well as implement simple filtering Confirmed mathematics for clarification. Cookbook equivalent: You know how to boil the water on a stove, but you are upset about rest.

A more advanced book is more of a businessman's book than text, it's overlap for the cleavation - explaining how to save FFT technology, in particular, I have never been completely I have come across. Cookbook equivalent: maybe it could be the pleasure of cooking, maybe the Corden Blue Tome

And implementing a radio in the software is great for taking some DSP concepts and bringing them into life. Cookbook equivalent: A journey through a specific dishes, and explains how "braiding" is in the way.

Hope this is being used for you!


.net - asp.net regular expression validator client side script error -


I have to find out that the input string has HTML / script tags and if there is such a valid error, then the following regular expression The verifier is:

  & lt; Asp: text box id = "txt" runat = "server" /> & Lt; Asp: RegularExpressionValidator ControlToValidate = "txt" runat = "server" id = "regexVal" EnableClientScript = "true" display = "dynamic" error message = "invalid content" text = "!" Validation expression = "& gt; (?: (? & Lt; t & gt; [^   

When I run this markup hosting page, I get a secret error with the message "Syntax error in regular expression". However, when I take the same regex and it uses the Reggae class from the system. Lesson Regular expression works just fine: like:

  Regex r = new Regex ("> (? :(? & Lt; t & gt; [^ & lt;] * )) "); R.IsMatch (@ "& lt; b & gt; This should be a validation error & lt; / b & gt;"); R.IsMatch ("It's OK");  

What am I missing

Update: WebResource.axd is having an error in the following JS function:

  function Regular Expression ViaductAdvanced ISValid (Val) {var value = Value Eatergate Value (Val Contralolidate); If (ValidateTrem (value) length == 0) true return; Var rx = new regExp (val.validationexpression); // This error occurs with error var matches = rx.exec (value); Return (matches! = Null & value == matches [0]); } I think the problem is that Javascript understands the regular syntax of the syntax. Does not come in. Grouping  

When you set EnableClientScript to true to RegularExpressionValidator makes ASP.NET your regular expression in JavaScript Control in order to enable client-side validation on you. In this case, javascript has named named groups (? ? ... <... <... code) and non-capturing group (? : ...) is not supported for syntax. Although these features are working in NAT JavaScript, it is struggling with them.

From:

On the client, the JScript Regular Expression syntax is used. On the server, the Regex syntax is used. Because JScript is a subset of regular expression syntax syntax syntax, it is recommended that you use the JScript regular expression syntax to generate the same result on both the client and the server.

There are two ways that you can improve it:

  1. Disable the client-side script generation and perform regular explorations on the server-side. You can do this by setting EnableClientScript to false .
  2. Modify the regular expression and remove the non-capturing group and named groups. If you need to capture in your regular expression, then (...) syntax should work correctly in both Javascript and .NET. You will then use the reference number in the sequence number used for the captured values ​​( $ 1 , $ 2 , etc.). [^ & Lt;] * See how the purpose should work.

I want to point out some other issues:

  • You do not have to capture the original regular expression if you want to , Then examine the existence of all the opening brackets. It has & gt; [^ & Lt;] * can be rewritten which will be simple and will work in the same way. It will not capture any value in the original string, but since you are using it in ASP.NET Verification control, it will not make any difference.
  • The way you are implementing , RegularExpressionValidator will only work if the match is successful in your case, you will be verified if your code is in the Gt; Blah Something I think is that you want to work it in another way.
  • If you select & gt; Regular expression in [^ & lt;] * , then regular expressions will still not work. I think you want to intend that the verification control attempts to match all the text in the text box . So if I type the & gt; Blah , then this match will be, but and lt; B & gt; Blah & lt; / B & gt; Because the regular expression says that string is a & gt; should begin with & gt; to allow text before . * & Gt ;. * [^ & Lt;] * would like to suggest something.