Posts

javascript - Script works fine in any WebKit based browser but doesn't in Firefox -

I have a script (using WordPress) header.php which looks like this: window.addEventListener ( "DOMContentLoaded", function (event) {fixedMenu.init ( "Title-container", 0); fixedMenu.init ( "event type-cover", 20); window.addEventListener ( ' Fixed menu.txt ("Event-Type-Cover");}); var session = "& lt ;? php $ _SESSION [' Lang ']? & Gt; ";}); After this script I include a long script with the script scr = "" tag. window.addEventListener ("DOMContentLoaded", function (event) {Today = document.getElementById ("Today-Events");; = Document.getElementById ("Upcoming events"); past = document.getElementById ("past-events"); Texter = document.getElementById ("Event-Type"); Changesme ();}); This works fine in any webkit browser, the code is launched, but Firefox does not load other event listeners (I do not know how it loads or not, But if I need i...

using __gte in django queryset -

I have a search where this is doing. Template & lt; Input class = "category-slider-3" type = "text" name = "year" & gt; see yrs = request.POST.get ('year') user = user.object.filter (years_of_exp__gte = yrs) This returns years_of_exp to all users regardless of the queryset numbers, if I put 100 or 40 or 44 or 78 in the search box, I get all the users Even if they have DB in years_of_exp 2. Why is this happening? Maybe something is wrong doing You are retrieving yrs as a string and the integer is the comparison of the value , Which will result in comparisons like this: '2' & gt; = 100 Unfortunately (for you) is true in dragon 2. X You must enter yrs for an integer: yrs = int (request.post.get ('years'))

php - Does Laravel's Validation class Sanitize? -

I was unable to find any information in the document or not whether the validation class has cleaned the data or not. Everyone uses verification classes for obvious reasons, but I do not see any hygiene. For example, take a form with 2 input fields, names and details. In this case, only the name is required to handle form submissions: Verifier :: create (Input :: All (), array ('name' = & gt; 'required | Minimum: 2 ')); Assume that according to most tutorials (and documentation), there are no errors with verification, I will use the bus; SomeModel :: create (array ('name' => Input :: get ('name'), 'description' => Input :: get ('description') ); Will this class clear the data? Or can I expect that the exact data entered in the data form will be the same? At least 2 characters are not required Any direction is appreciated. As far as I know Laravel has not sanitized add it to composer.json "frozenn...

java - Call a method when fragment is visible to user -

I need to execute a method when the fragment is visible (for the user). Example: I button 2 (button 1 and button 2), 2 pieces (piece 1 and piece 2) and method loadImages () within square pieces 2. When I want to change "2 button" to piece 2 with Piece 2 and then user after the slice 2 (to call) loadImages () . I the ribs in the fragment square () but this method calls the method before the fragment appears and it does some delay in infection. I tried setUserVisibleHint () also did not work. A good example is the Instagram app when you click on the profile, it first loads the profile activity and then imposes all the images I hope someone I can greatly appreciate your help Thank you. I'm a little confused about what I'm trying to do with you. It looks like the images are loading too fast for you ... Does this mean that your pictures are ready to be displayed? And this is a bad thing? My guess (and this is just an estimate) is that Instagra...

javascript - Why must ".text(x)" and not ".text = x" be used in jQuery? -

इस तरह से असाइन करें $ ('# myelement')। Text = 'कुछ पाठ '; नेत्रहीन कोई प्रभाव नहीं है क्या उपरोक्त jQuery द्वारा अनदेखा किया गया है? इसके बजाय, यह होना चाहिए $ ('# myelement')। पाठ ('कुछ पाठ'); क्लाउडियो के संदेश में मेरी टिप्पणी का विस्तार करते हुए, आप वास्तव में परीक्षण की जगह ले रहे हैं। () संग्रह के भीतर समारोह। अगली बार जब आप $ ('# myelement') को कॉल करते हैं, तो एक नया संग्रह बनाया जाता है, शायद आप कभी इसे नोटिस नहीं करेंगे, लेकिन अगर आप संग्रह को संग्रहीत करते हैं, तो आपको समस्या दिखाई देगी: & lt; span id = "myelement" & gt; सामान & lt; / span & gt; Var mye = $ ('# myelement'); Mye.text = 'बकवास'; mye.text ( "बकवास"); उस कोड को देखते हुए, पाठ का पाठ बदला नहीं जाएगा। मध्य रेखा को बाहर कीजिए और यह हो जाएगा।

Matlab - Text file names from Cell array -

I have created a cell array that passes through 50 text files which I need to analyze. However, Example: Example: Nickel = {'file1.txt' 'file2.txt'}; Vec = textread (nickel {1}, '% n', 'headerline', 23); If I input the actual file name ('file1.txt') into the treaded function, then I get the vector that I want, but it does not reference the cell can. Thank you!

filepicker.io drag and drop with images over 2 meg -

Whenever I use filepicker.io, I get the following error with the images that use the drag and drop method Doing more than 2 meg. / P> Unfair reference references: DIALOG_URL is not defined Thus html is. & lt; Div class = 'draganddropimage uploadhelp' id = "exampleDropPane" & gt; & Lt; / Div & gt; and javascript is filepicker.setKey ('xxxxx'); Var option = {"multiple": true}; Filepicker.makeDropPane ($ ('# exampleDropPane') [0], {multiple: true, mimap: 'image / *', maximum: "10485760", dragent: function () {// $ ("# pb"). AddClass ('show'); $ ("drop to upload");}, drag: works () {// $ ("# pb"). AddClass ('show') ; $ ("# Files" dropdown). Html ("leave file here");}, progress: work (percentage) {$ ("# exampleDropPane"). Text ("uploading (" + + "+"% ") ; // Alert (percent); // $ ("# pb...