i'm new python/django , created simple django website using pycharm. site works fine running on computer, i'm lost when comes taking site onto host (dreamhost). i'm able upload files correct directories fine, , believe made correct changes database on mysql. i'm not sure go there though. right now, page shows files rather site. direction appreciated. much! you should not run django application using python manage.py runserver on production. how run application on django depends on server (apache, nginx) want use for apache - https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/ for nginx - https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-14-04 the mysql database should, of course, exist , have correct credentials. or, if choose use sqlite, file should accessible, readable , writable www-user (may different depending on linux distributive)
i have made rest web service send smss using hsdpa usb modem. using smslib in java send smss. every time web service invoked, create gateway start service, send message, stop service , remove gateway. takes 20 seconds each message. found starting service takes lot of time. part of code use send smss service.getinstance().addgateway(gateway); service.getinstance().startservice(); outboundmessage msg = new outboundmessage(phonenumber, message); if (service.getinstance().sendmessage(msg)) { result = "message sent successfully!!"; } else { result = "could not send message."; } service.getinstance().stopservice(); service.getinstance().removegateway(gateway);//remove gateway is there way can start service once if not started , use send message when ever web service invoked? why dont group messages , send in 1 go? service.getinstance().sendmessages(messa...
why must define variables twice in header file? differences there between these variables? the first definition here: @interface mycontroller: uiviewcontroller { nsinteger selectedindex; } the second definition here: @property (nonatomic) nsinteger selectedindex; what you're seeing required in earlier versions of objective-c, isn't more. in first versions of objective-c used next until new runtime introduced (with objective-c 2.0 on mac os x), instance variables had declared part of class's structure in @interface . reason if subclassed class, compiler needed know instance variable layout of class see @ offset put subclass's instance variables. when properties introduced, synthesized properties had "backed" instance variable in class's structure. therefore had declare both instance variable , property. all of above no longer true. newer objective-c less fragile in way looks instance variable...
Comments
Post a Comment