Posts

ipad - Split view in portrait mode! -

apple provide split view landscape not portrait mode. there way achieve splitview in portrait mode also? [splitviewcontroller sethidesmasterviewinportrait:no]; this work. api not documented(private). thanks, manjunath for ios5+, go detailviewcontroller . detailviewcontroller should have uisplitviewcontrollerdelegate . , drop code in: - (bool)splitviewcontroller:(uisplitviewcontroller *)svc shouldhideviewcontroller:(uiviewcontroller *)vc inorientation:(uiinterfaceorientation)orientation{ return no; } this trick. , public api.

Django reset_password_confirm TemplateSyntaxError problem -

when use django.contrib.auth.views.password_reset_confirm without arguments @ works , can render template without problem, when adding uidb36 , token arguments fails. caught noreversematch while rendering: reverse 'django.contrib.auth.views.password_reset_confirm' arguments '()' , keyword arguments '{'uidb36': '111', 'token': '1111111111111'}' not found. most issue urls.py. need setup right pattern grab uidb36 , token values passed url parameters. if not, throw similar error see above. something like: (r'^reset/(?p<uidb36>[0-9a-za-z]+)-(?p<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', {'template_name' : 'registration/password_reset.html', 'post_reset_redirect': '/logout/' }) registration/password_reset.html - custom template logout - custom logout action

html - php reservation system -

i m creating project php , html use.i create ticket reservation system university.firstly,the user choose date , number of persons wants reserve tickets.then,by pressing next button,he see list of events available in date checked in previous step.this list static,so think have create data base have data , if users selects ex monday,he see data events monday.could please me because have no big experience php?i have created 2 screens html , css 1st let me know how create data base data , secondly how connect them day oprtions! thanks lot! take at: php 101: simple seat reservation system

sql - It is possible to do a autonumber sequence in a SELECT on Oracle? -

i need task in oracle don't know how can possible this. ok, need select when define autonumber sequence on-the-fly. for example: select autonumber(1, 9000) auto some_table and result be auto ------ 1 2 3 4 5 6 7 8 9 10 ... 9000 this possible do? there oracle build in function me doing this? select rownum dba_objects, dba_objects rownum <= 9000;

php - mysql chinese column -

to store chinese characters in mysql, recommended store them utf8 or ucs2? (i using char , varchar) also, have seen utf8 uses 4 bytes of data store values. how many ucs2 use? i have seen utf8 uses 4 bytes of data store values. how many ucs2 use? utf-8 consists of variable length characters ranging 1 3 bytes, ucs2 (utf-16) fixed 2 bytes per character. to store chinese characters in mysql, recommended store them utf8 or ucs2? i have no experience chinese characters, top answer question answers basic question quite nicely: difference between utf-8 , utf-16? from there: most reasonable characters, latin, cyrillic, chinese, japanese can represented 2 bytes. unless exotic characters needed, means 16-bit subset of utf-16 can used fixed-length encoding, speeds indexing. it seems chinese characters, ucs-2 tends save storage space. if web project, tend use utf-8 because more widespread encoding, , standard in web world. additional arguments utf-8 here: sho...

django - how to restart single apache site on a ubuntu vps rather than all sites -

i've got ubuntu vps , apache mod wsgi installed , serving django sites. however have restart of apache rather site have amended , going bit shonky if tell clients have restarted site cos updated site. is there tutorial somewhere teach me how configure this? couldnt find 1 in googles keywords soup. i'm using virtualenvs if helps. assuming use mod_wsgi in daemon mode on unix/apache 2.x system run django , have shell access machine need touch wsgi configuration project. touch your_project.wsgi see mod_wsgi documentation on reloading source code , django - mod_wsgi wiki more references.

python - file_downloads..want to download an uploaded file -

hi project upload excel file , display content in template. have uploaded excel file in django using models.filefield .now want download particular file @ defined location(project).i trying click on uploaded file giving me error page not found (404) request method: request url: http://localhost:8001/admin/ikapp1/fileupload/2/file/erode/erode_3.xls/ file upload object primary key u'2/file/erode/erode_3.xls' not exist. shot in dark, omit last slash in url? indicates want directory.