Posts

css - Make div keyboard-scrollable in jQuery Mobile? -

from can tell, although jquery-mobile-powered pages can contain divs overflow set scroll or auto, , these divs can scrolled one-screen bar or mouse wheel, cannot scrolled using arrow keys, page-up/page-down, or home/end. instead, official "page" div (with data-role="page") absorbs input. perhaps other divs can't acquire focus, i'm not sure. is there way around this? edit: jsfiddle of simple example: https://jsfiddle.net/qogz0shx/ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js"> </script> <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.css"/> <style> #outer { overflow:scroll; height: 50vh; width: 50vw; } #inner { height: 500vh; width: 500vw; } ...

python - Requests: Explanation of the .text format -

i'm using requests module along python 2.7 build basic web crawler. source_code = requests.get(url) plain_text = source_code.text now, in above lines of code, i'm storing source code of specified url , other metadata inside source_code variable. now, in source_code.text , .text attribute? not function. couldn't find in documentation explains origin or feature of .text either. requests.get() returns response object ; object has .text attribute; not 'source code' of url, object lets access source code (the body) of response, other information. response.text attribute gives body of response, decoded unicode . see response content section of quickstart documentation: when make request, requests makes educated guesses encoding of response based on http headers. text encoding guessed requests used when access r.text . further information can found in api documentation, see response.text entry : content of response, in unicode. ...

WinAPI: set fill color of a readonly textbox -

i have program winapi (c++) complete. problem want set fill color of text box , textbox readonly. when set textbox readonly, can't fill white. , when don't, can filled white. how create textbox: createwindow(l"edit", text, ws_child|ws_visible|ws_border|es_readonly|es_right, left, top, width, height, hwnd, (hmenu)id, hinst, null) and code in winproc: case wm_ctlcoloredit: settextcolor((hdc)wparam,rgb(0,0,255)); setbkcolor((hdc)wparam,rgb(255,255,255)); setbkmode((hdc)wparam, transparent); return (lresult)getstockobject(white_brush); you'll want use wm_ctlcolorstatic read-only text boxes; see docs wm_ctlcoloredit .

encoding - Lighttpd and Python web page: Cannot not convert data into an integer -

please, making easy python web page without framework. have problem if tried value tuple #!/usr/bin/env python3 # -*- encoding: utf-8 -*- import cgitb cgitb.enable() # code here # .... # months in slovak language months = ('január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december') month = int(last_day_of_month(today).strftime("%m")) # code here # ... # print ("\t" + '<title>{0} {1}' + str(months[month-1]) + ' ' + str(year) + '</title>') here got error: cannot not convert data integer it works if months defined in ascii, like: months = ('janury', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december') this works ri...

logging - Spring Integration: How to know when a work flow completes? -

Image
i working on adding logging/monitoring functionality multiple spring integration deployments. want create logger transaction @ start of workflow , close log transaction @ end of workflow. @ end of logger transaction send out logs , metrics centralized logging server. @ end of day want see logs messages went through workflows across multiple spring integration deployments. the spring integration deployments across lot of teams , cant count on each team add logging code me, want write code run across spring integration deployments. to start log transaction,the solution use global-channel interceptor on set of inbound messaging channels. workflows built across deployments use same set of inbound channels, start log transaction interceptor run. pass logger transaction details part of message headers but having trouble figuring out solution ending transaction. workflows can synchronous asynchronous. not endpoints within workflow have output channel. any strategies/ideas on how ...

php - SimpleXML multidimensional nodes -

i have xml this: <properties> <property>name</property><value>john</value> <property>surname</property><value>wayne</value> <property>age</property><value>33</value> <property>blaaa</property><value>blaa</value> </properties> i have parse , used this: $xle = simplexml_load_file('xml.xml'); foreach ($xle->properties $properties) {     foreach ($properties->property $property) {         echo $property, "<br />\n";     }     foreach ($properties->value $value) {         echo $value, "<br />\n";     } } i came far, need like "property = value" "name = john" my code outputs : name surname age blaa john wayne 33 blaa each value following sibling property element. can express xpath quite easily: following-sibling::value[1] will give <value> element if <property> ...

xaf - devexpress get field from last row in child list -

i need in this. have table (master) , table b (child). i'm using devexpress xaf. need evaluate last row in child , show users in master table a. lets table has followind fields: oid, employee, address [name] = persistent filed employee lets table b has following fields: oid, employee (references tbale a), status (open, assigned, closed), status date the child table has @ least 2 records each master record: oid employee status status date 1 mark open 2015-12-12 2 mark assigned 2015-12-13 3 mark closed 2015-12-29 so far used this: [persistentalias("tableb[status != 'closed']")] public getstatus { {return evaluatealias(getstatus)}; } i want show in master table a, each employee, last status of child list. when run code, open, because different closed, want if last line in table b status = closed, should return closed. don't know if explayned right! ideas? t...