Posts

jquery - AJax does not work with bootstrap-select -

jquery - AJax does not work with bootstrap-select - i found flask-jquery-ajax example user selects item vehicle "make" drop downwards menu, vehicle "model" drop downwards menu populated making ajax request list of models create selected. i tried replace drop-down menus bootstrap-select , include class="selectpicker form-control" in sec drop-down menu not more populated after first drop-down has been chosen. this html template: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>flask jquery ajax drop downwards menu example</title> <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" > <link rel="stylesheet" type="text/css" href=//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/css/bootstrap-select.min.css> <link rel=...

common lisp - Scope of variables inside functions -

common lisp - Scope of variables inside functions - this question has reply here: why function homecoming different value every time? 4 answers unexpected persistence of info [duplicate] 1 reply i have written function returns prime factorization of numbers n less 20. function uses allow create list of exponents, , increments exponents when finds n divisible prime. in lisp interpreter (both gcl , clisp), when phone call next function once, right factorization when phone call sec time, sum of factorizations of first , sec function - isn't scope of exponents limited within of let!? why isn't exponents beingness re-assigned value '(0 0 0 0 0 0 0 0) ? how can re-write function withstand multiple calls? (setf primes '(2 3 5 7 11 13 17 19)) (defun fac...

bash - Unix shell user input phone number -

bash - Unix shell user input phone number - i trying write script check whether user has entered valid phone number , check against records.txt file. i have next code. when come in phone number not recognize it. i not sure how implement check against text file? echo "enter phone number xxxxxxxx: " read phonenumber while [ "$phonenumber" != [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] ] echo "please come in phone number xxxxxxxx: " read phonenumber done echo $$phonenumber pause you need include start , end anchors in regex if want validate phone numbers of 8 digits or otherwise, take numbers has more 8 digits. #!/bin/bash echo "enter phone number xxxxxxxx: " read phonenumber pat="^[0-9]{8}$" while [[ ! $phonenumber =~ $pat ]] echo "please come in phone number xxxxxxxx: " read phonenumber done echo $phonenumber bash shell unix

validation - JideFX validators don't work -

validation - JideFX validators don't work - am newbie javafx. want create simple form out-of-the-box validation. library have chosen jidefx. tried repeat showcase (which poor taste) - http://www.jidesoft.com/jidefx/jidefx_validation_developer_guide.pdf. have stackoverflowerror result only. validator called. haven’t exception if validation ok. using javafx-8, java 8, eclipse luna, jidefx 0.9.1 (tried 0.9.1-b128 too). have suggestions? code bellow. simplevalidator.java public class simplevalidator implements validator { @override public validationevent call(validationobject param) { if (param.getnewvalue() != null && !param.getnewvalue().tostring().isempty()) { homecoming validationevent.ok; } else { homecoming new validationevent(validationevent.validation_error, 1, "error"); } } } logincontroller.java public class logincontroller { private stat...

Is it possible to add a facebook like button in the web app using python flask? -

Is it possible to add a facebook like button in the web app using python flask? - i trying implement simple webapp on click of button pulls info database , displays on webpage.as part of need implement facebook button , comment box it? possible using python flask framework? presumably, you're using templates build flask app. if so, you'd add together image link facebook page flask template controls headers/footers (assuming want 'like' button in header/footer), e.g. <a href="http://www.facebook.com/your.facebook.page"><img src="/path/to/facebook/icon/facebook.png" alt="friend on facebook" title="become [your.company] fan"></a> python flask

jpa - Ignore persistence unit definitions that have PersistenceUnitTransactionType = RESOURCE_LOCAL -

jpa - Ignore persistence unit definitions that have PersistenceUnitTransactionType = RESOURCE_LOCAL - i have wildfly 8 container , ear persistence.xml inside. there multiple persistence units defined. is there way ignore process of persistence unit definitions have persistenceunittransactiontype = resource_local @ deployment of ear ? i able tell wildfly ignore specific peristence-unit in peristence.xml adding property <properties> <property name="jboss.as.jpa.managed" value="false" /> </properties> so wildfly not ignore peristence-units persistenceunittransactiontype=resource_local property set. jpa wildfly

php - Using next AUTO_INCREMENT id within query? -

php - Using next AUTO_INCREMENT id within query? - i know similar questions have been asked, none of them seem work i'm attempting. i'm developing scheme mysqli/php takes sound files, uploads them, renames them, , stores name. problem is... need name of file "uploadedfile_[$id_here].mp3" i've got entire upload scheme working properly, i'm on lastly step... getting id work. the id column in table auto_increment. need find out how "predict" auto_increment id given upcoming new row , tag on end of sound file name means of variable. one method i've attempted is: $result = mysqli_query($conn, "show table status 'test_table'"); $row = mysqli_fetch_array($result); $nextid = $row['auto_increment']; print $nextid; but doesn't homecoming results. connections file should configured i've used other queries , works fine. thanks in advance! it depends on how frequent code run, surely? auto-...