Posts

ruby on rails - javascript code or json objects as ajax response? -

I am reading railway guides, especially I am reading this: The part which is a bit confusing to me. It says that if Action Actions receives an AJAX request, it will return the JavaScript code which will include the user in the page. I have found other solutions in which the client gets the json object (instead of the JavaScript code) and creates the respective DOM elements and inserts them on the page. My questions are: What is the json object? Receive and create DOM elements and get them better than receiving the JavaScript code on the page and executing it so that the new content is added to the page? What are the best practices about this? In this example, what will get the AJAX call? Javascript code, a Jason object or both? There is no right or wrong way in the example that you have quoted, Ajax calls to Javascript will be received, which will then be executed in the browser. However, it is likely that you want to embed html in javascript feedback. For example, a rai...

extjs4.2 - How to determine which menu item I'm working with in changeHandler with ExtJs? -

जब एक मेनू आइटम चुना जाता है और मेरा changeHandler लागू होता है ( फ़ंक्शन (cycleBtn, ActiveItem) ), मैं किस आइटम के साथ काम कर रहा हूं यह निर्धारित करने के लिए क्या एक्स्टजे सिस्टम की सिफारिश की जाती है? आइटम का टेक्स्ट इस्तेमाल करना आदर्श नहीं है क्योंकि यह बदल सकता है। अन्य चौखटे अक्सर एक मूल्य विशेषता प्रदान करते हैं जो प्रदर्शित वास्तविक टेक्स्ट से अलग हो सकता है जो कि आप किस आइटम के साथ काम कर रहे हैं यह सही ढंग से निर्धारित करने पर भरोसा किया जा सकता है। क्या एक्स्टजेन्स की कोई संपत्ति है, क्या मैं चयनित आइटम पर सटीक रूप से पता लगा सकता हूं कि मैं किस आइटम पर कार्य करने के लिए काम कर रहा हूं? जाहिर है, मैं इसे अग्रिम में भी सेट करवाता हूं। आप idId के बजाय itemId का उपयोग कर सकते हैं क्योंकि itemId कंटेनर को स्थानीय, इस मामले में मेनू। आपको केवल यह सुनिश्चित करने की ज़रूरत है कि आइटम मेनू का मेनू आइटम में अद्वितीय है।

html - Can i eliminate down button on tag? -

Image
& lt; Datlist & gt; is an HTML tag, which uses elements to order and select them. When I call it & lt; Input & gt; , then it gives me I do not want to see the list before I type it, before the item is like this, I can finish this button on it. & lt; Input & gt; is a feature for? ALSO No There is no answer for this question! To delete the down arrow, try using the following in your CSS : Input :: - WebKit-Calendar-picker-pointer {display: none; } Example

c++ - QtCreator: symbol(s) not found for architecture x86_64 issue on Mac OS Mavericks -

I am trying to compile a C ++ program using QT. When I try to compile, I get this output: not found symbol for architecture (s) x86_64 linker failed in command failure code 1 (for viewing invitations -V Use) What can I do? Why is this happening? I have already tried my project file in QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 (as suggested in this post) but it has given this problem Did not solve. Any thoughts? Edit: How it looks like my project file: TEMPLATE = app CONFIG + = console CONFIG - = app_bundle CONFIG - = qt Source + = main.cpp \ a.cpp \ b.cpp \ c.cpp \ headers + = \ ah \ bh \ ch

javascript - Load error is not captured by try catch block -

मेरे पास एक कोड है: try {...} पकड़ (त्रुटि) {...}; में प्रयास करें ब्लॉक, एक फ़ंक्शन कॉल है जो सर्वर से अनुरोध करता है जब सर्वर पर कोई संसाधन नहीं होता है, तो एक त्रुटि उठाई गई है (जैसा कि मैं Google क्रोम के डेवलपर्स टूल में देख सकता हूं): संसाधन लोड करने में विफल: सर्वर ने 404 की स्थिति और मैं इसे पकड़ ब्लॉक में पकड़ने की कोशिश कर रहा हूं, लेकिन त्रुटि पर कब्जा नहीं किया गया है। क्या यह एक विशेषता है जावास्क्रिप्ट के लोड लोड को try catch block आमतौर पर, जब एक सर्वर से जानकारी का अनुरोध करते हैं (उदाहरण के लिए, एजाक्स के माध्यम से, src तत्व का img सेटिंग आदि, सेटिंग करके), तो आप डॉन एक अपवाद प्राप्त नहीं करते हैं, लेकिन आपको एक त्रुटि इवेंट या कॉलबैक प्राप्त नहीं होता, कम से कम नहीं क्योंकि अनुरोध करने से पहले कोड समाप्त हो रहा है, इसलिए उस समय अपवाद फेंकना असंभव है। चूंकि आपने यह नहीं दिखाया है कि आप जानकारी का अनुरोध क्यों कर रहे हैं, यह अधिक विशिष्ट होना असंभव है, लेकिन यही कारण है कि आपको अपवाद नहीं मिल रहा है। उदाहरण के लिए, अगर एक एजेक्स अनुर...

c# - Why does using parameterized queries or entity framework prevent sql injection? -

I have a good understanding of SQL injection. This is when a SQL query that should be something like a customer from SELECT FirstName, LastName. Customer customer WHERE customer ID = @valueFromApplication changes like a query select first name, last name from customers WHERE CustomerId = ''; Drop Account Foo - Whenever users enter anything malicious in your app, website, customer .. I also know that we can only try to leave the attacker. To find the names of tables and get information from them. I also have a few things that help in preventing it: Using stored procedures that take parameters (SQL Server parametric Using SQL queries Using LINQ for entity framework / unit (C #, probably F #?) How can these things really be stopped? Having SQL injection? Why not the attacker only the malicious value that whatever the input is before Using and using the same result can pass. Your first example is parameter And is not insecure against SQL injection. ...

javascript - HTML5 offline authentication -

I'm looking for advice / criticism how best to use an HTML5 which is largely offline Is used. This application uses a combination of indexed, local and session storage so that the data can be stored so that it can be used offline, the data / pages are served through HTTPS. Its goal is to reduce the risk of data being viewed when the tablet / PC is lost / stolen Currently this application allows users to encrypt / password Stanford uses the JavaScript crypto library and then saves it in local storage if the user can successfully authenticate to the server if the application goes offline then use The subject has to be certified 'locally' against the encrypted user / password at the local location. In addition, an unencrypted user / password is stored in session storage, if the user successfully authenticates the server, it is used so that the application can periodically attempt to restore contact with the server. And could re-authenticate the user 'randomly...