Posts

php - Cannot connect html5 forms to my sql database? -

i have html5 document requesting input user form(saved employee.php). also have created php document (sqlconnectionprocess.php) connecting forms local database. using xampp , phpmyadmin. employee.php: <html> <body> <form name="employeedatabase" action="sqlconnectionprocess.php" method="post"> <link rel="stylesheet" href="css.css"> <h1>employee database</h1> employe card no: <input type="text" name="cardno" ><br><br> employee no: <input type="text" name="employeeno" ><br><br> employee name: <input type="text" name="employeename"><br><br> nationality: <input type="text" name="nationality"><br><br> profession: <input type="text" name="profession"><br><br> dob: <input type="text" name="d...

java - camel : Unable to read BODYSTRUCTURE -

i using apache camel mail read emails account. particular mail, stuck on there , throws exception "unable read bodystructure" . not mark mail read. mail received after not read camel service. 317422 [camel (emailtoewscontext) thread #0 - imaps://outlook.office365.com] warn org.apache.camel.component.mail.mailconsumer - caused by: [org.apache.camel.runtimecamelexception - failed extract body due to: unable load bodystructure. exchange: exchange[][mailmessage@0x55f69873]. message: com.sun.mail.imap.imapmessage@7a97bfa9] org.apache.camel.runtimecamelexception: failed extract body due to: unable load bodystructure. exchange: exchange[][mailmessage@0x55f69873]. message: com.sun.mail.imap.imapmessage@7a97bfa9 @ org.apache.camel.component.mail.mailbinding.extractbodyfrommail(mailbinding.java:275)

ruby on rails - Cheapest solution for external postgresql hosting -

i running several websites on heroku postgresql databases. of them smaller websites few visitors still need more 10.000 rows, makes quite costly $9/month per website. for of them there not load or lot of data. don't have high demands on availibility either. low price, simple usage, 10.000+ rows storage, , external access demands. i have no experience in installing databases , not wish maintain database. need store data , leave @ that. is $9 / month @ heroku cheapest solution can find this? php websites mysql-databases free quite suprised how pricy store data rails. although discouraged heroku, can share same instance of postgres db between many apps. have do, environment variables app , set them other ones. please check post .

order - Django TypeError unsupported operand type(s) for +: 'dict' and 'int' -

i created through model can add order field m2m field having problems auto incrementing order field via def number() below. when add object, typeerror unsupported operand type(s) +: 'dict' , 'int' , i'm not sure why. ideas? models.py: class playlist(models.model): user = models.foreignkey(settings.auth_user_model, default=1) name = models.charfield(max_length=50) tracks = models.manytomanyfield(track, through='playlisttrack') def __str__(self): return self.name class playlisttrack(models.model): def number(): last_order = playlisttrack.objects.all().aggregate(max('order')) if last_order == none: return 1 else: return last_order + 1 track = models.foreignkey(track) playlist = models.foreignkey(playlist) order = models.positiveintegerfield(default=number) class meta: ordering = ['order'] as mentioned in docs, aggregate() ...

c++ - Visual Studio 2015: is a set of const pointers allowed? -

we upgrading vs2015 soon, , found in breaking changes list: const elements the c++ standard has forbidden containers of const elements (such vector or set). visual c++ 2013 , earlier accepted such containers. in current version, such containers fail compile. source i wondering if knows if applies set. know map can still contain const pointers keys, since const anyway. an example: std::set<const qobject*> can still this? think not, according post on site of microsoft. const qobject* pointer to a const qobject . pointer still modifiable. const qobject* const make pointer const . since microsoft article talks const objects, const qobject* not , example fine.

SWIG - float array in struct to c# - SWIGTYPE_p_float -

i have question. i'm trying use swig wrap native dll, contains struct looking this: typedef struct { int x; float y[const1]; float z[const2]; } mystruct; and c# representation y , z not array, swigtype_p_float. there way tell swig interpret float y[const1] array, , not swigtype_p_float? have tried "memberin" , "typemap", no success. thanx in advanced...

jquery - How to bind to localStorage change event on different pages of the same site? -

i know how bind change event localstorage if same page opened in 2 tabs ( this topic ) , need similar effect, if had 2 pages of 1 site opened in different tabs. ideas? make example you, check want? http://www.yoursite.com/page1.html <html> <head> <title>page 1</title> </head> <body> <input type="text" id="value"/> <button id="save">save</button> </body> <script> function $id(id){ return document.getelementbyid(id); } function addhandler(ele,trigger,handler){ if(window.addeventlistener){ ele.addeventlistener(trigger,handler,false); return false; } window.attachevent(trigger,handler); } function savetostorage(){ var value = $id('value').value; window.localstorage.setitem('key',value); } addhandler($id('save'),"click",savetostorage...