Posts

selenium - Open a calendar that appears only on clicking the right side of an input box -

Image
i have calendar opens on clicking on black arrow(marked in image). black arrow appear on hovering right extreme of input box. tried click on input tag, not show calendar arrow doesn't appear. how can make calendar appear? this how element looks in inspecting it. <input type="week" name="startweek"> im using selenium web-driver java. i have found solution this. workaround pass date directly calendar element using sendkeys method. getelement(calendar).sendkeys( "03012016") ; this enter date directly onto calendar field.

Can android read the serial number of the USB charger -

is there way android device can read serial number (or other id) of usb charger? charger functional usb host , not power wires used. i have tried use usbaccessory ( https://developer.android.com/guide/topics/connectivity/usb/accessory.html ), null result of getparcelableextra(usbmanager.extra_accessory). best regards, ivan

python - Print an sqlalchemy row -

all i'd print single row of sqlalchemy table row. say have: from sqlalchemy import column, integer, string sqlalchemy.ext.declarative import declarative_base base = declarative_base() class atable(base): __tablename__ = 'atable' id = column(integer, primary_key=true) name = column(string(255), nullable=false) then i'd output looks this: id: 1 name: therowname preferable without having hard code in table columns, i.e. more generally. i've tried: atable = atable() ... #add values etc. print atable print str(atable) print repr(atable) print atable.__table__.c as thought implementing __str__ , __repr__ , again lack generality request. there many questions on covering table row json, that's not want, care more visual output - doesn't need machine readable afterwards. to clear - want general method print "col: value" without hardcoding column names? not use sqlalchemy much, __str__ method should ...

c# - Transform XML returned from a web request using XLST -

i see several questions close none cover it: how apply xslt stylesheet in c# xslt transform of xml using xml data web form how transform xml structure generated request web services i can cobble these worry passing through many steps efficient. what have this, read xml http web request: webrequest request = webrequest.create(url); webresponse response = request.getresponse(); stream stream = response.getresponsestream(); streamreader streamreader = new streamreader(stream); string xml = streamreader.readtoend(); this before need apply xlst transform needed. have (possibly null) xslcompiledtransform object. so want add block like: if(transform != null) { xml = transform.transform(xml); } clearly isn't possible written. see stringreaders , xmlreaders can created inefficient xml string , push object? can use stream or streamreader objects directly support same basic flow, optional transformation? personally ...

angular - How to add preloader to every http request(angular2)? -

in angular2 app want show preloader(locking screen) every time http request starts , hide after request ends. subscribe method allows detect when request successful, has errors or completes. think it`s bad idea write code of preloader every time call subscribe method on request. how can detect request starts/ends(except in subscribe method)? what way add preloader every request? i extend http class below , add service containing observable / subject notified when http request executed export class customhttp extends http { constructor(backend: connectionbackend, defaultoptions: requestoptions, private _notifierservice:notifierservice) { super(backend, defaultoptions); } request(url: string | request, options?: requestoptionsargs): observable<response> { this._notifierservice.notifybeforerequest(); return super.request(url, options); } get(url: string, options?: requestoptionsargs): observable<response> { this...

ibm mobilefirst - How to deploy adapter to local MFP server with CLI? -

i have been looking mfp cli doc how deploy adapter local mfp server can't find one. can't find 1 in mfp adapter . what command? run command mfp push push adapter locally running mobilefirst server.

html - How to give 2 different colours of the font to the vertical text, in order to text 1 and text 2 was in one "div class"? -

two texts saved on "background-color: blue" test. have 2 "div class": 1) vertical-text1 (text color ---> white) 2) vertical-text2 (text color ---> yellow + font-weight: bold) my code: <div class="video_info"> <div class="vertical-text1">text 1</div> <div class="vertical-text2">text 2</div> </div> .video_info { position: fixed; left: 30px; top: 70%; } .vertical-text1 { transform: rotate(-90deg); color: white; background-color: #0000ff; position: absolute; left: -190px; top: -215px; width: 400px; } .vertical-text2 { transform: rotate(-90deg); color: yellow; font-weight: bold; background-color: #0000ff; position: absolute; left: -40px; top: -350px; width: 100px; } how give 2 different colours of font vertical text, in order text 1 , text 2 in 1 "div class"? i don't think can have...