Posts

android - Making list items width adjust dynamically to occupy the whole list width size -

basically i'm trying achieve pull few strings server, , create buttons number of strings, buttons must occupy whole screen (horizontally). problem each time different data items width must dynamic i've tried put weights items doesn't work. possible achieve such thing list? edit: <android.support.v7.widget.recyclerview android:id="@+id/gametypelist" android:layout_width="match_parent" android:layout_height="wrap_content"/> this item: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="0" android:layout_weight="1" android:layout_height="match_parent" android:orientation="vertical"> <button android:fontfamily="sans-serif" android:layout_width="wrap_con...

Convert SOAP multiref to java Object -

may please me transform following soap request data java collection, have tried not getting expected result. may see reference below in second part have transformed java soap request. <multiref id="id1" soapenc:root="0" soapenv:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:map" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <item> <key xsi:type="soapenc:string">orderincrementid</key> <value xsi:type="soapenc:string">ord-4426</value> </item> <multiref href="#id3"/> </multiref> <multiref id="id3" soapenc:root="0" soapenv:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:map" xmlns:ns3=...

mysql - PHP generate ticket for queue system and able to reset the ticket number on the next day -

i want use php make simple queue system ticket generate when customer choose option. main requirements are: generate ticket number format (eg. c0001, e0001), alphabet represent different option customer choose. able reset number next day (staff click reset button). each records need stored in mysql. below got, got 2 table (ticket_id , ticket) , 1 trigger: ticket_id create table `ticket_id` (`ticket_id` int(5) not null) engine=innodb default charset=latin1; ticket create table `ticket` (`ticket_id` int(5) not null, `ticket_name` varchar(5) not null default '''0''', `ticket_type` varchar(25) not null, `ticket_time` datetime not null ) engine=innodb default charset=latin1; trigger create trigger `tg_ticket_insert` before insert on `ticket` each row begin insert ticket_id values (null); set new.ticket_name = concat('a', lpad(last_insert_id(), 4, '0')); end newticket $query = "insert ticket (ticket_type, ticket_t...

php - Parse feed media group with array of children -

i have xml feed: <item> <title>title</title> <media:group> <media:content url="http://example.it/image.jpg" type="image/jpeg"> <media:thumbail url="http://example.it/image.jpg" type="image/png"/> <media:credit>credit</media:credit> </media:content> <media:content url="http://example.it/image2.jpg" type="image/jpeg"> <media:thumbail url="http://example.it/image2.jpg" type="image/png"/> <media:credit>credit2</media:credit> </media:content> </media:group> </item> this php code read it: $rss = new simplexmlelement($url); foreach ($rss->channel->item $item) { $title = $item->title; } no problem reading "title" item, how can read "url", "thumbnail", "credit" each m...

html - 100% width in three-column layers? -

having html: <div class="images_portfolio panel-widget-style"> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imagelink"><img src="x.jpg" alt="" /></a> <a href="imageli...

javascript - php file_get_contents working but need to set URL paths to CSS and JS -

i have following: if (isset($_get['orderid'])){ echo file_get_contents("http://www.tuffnells.co.uk/podlookupresults.aspx?__eventtarget=&__eventargument=&__viewstateguid=7ca82b1d-b722-4cdc-b74a-b338d8577ffa&__viewstate=&__eventvalidation=%2fwedaaevvxd1oyelevemr0vhcmypaome%2fdwqd43eodzej3p%2fm4u4pgxq6tlupsjfqzqbazffj%2f1lmlglyhfagz1yhzm8bjowvgaj8c3e%2b2bvmpt91kjxchjnasonqdi2zfsuasuvzpithildcdtilhcjncqg4cxrbv5vpfqbeogs2x52ad%2feb%2byr%2bej68pan2ciykze%3d&ctl00%24ctl16%24tbheadersearch=search..&ctl00%24maincontent%24tbaccountref=01484267&ctl00%24maincontent%24tbconsignmentref=".$_get['orderid']."&ctl00%24maincontent%24tbdestpostcode=".$_get['postcode']."&ctl00%24maincontent%24btndopodlookup=search+again"); } which once have working use ajax pull here testing it, think need set paths js , css files pulls through /scripts/ /css/ etc... there way apply in front of them tuffnells.co.uk/ don...

How to pre-load SASS custom utilities (variables and mixins) with webpack -

i loading utilities , assets in base.scss so @import "_variables"; @import "_mixins"; ... i have tons of modules in application , doing many changes in these modules. so importing base.scss in header of each of scss files causing trouble , seems redundant. tried using sass's includepaths didn't resolves @import declarations. there way can auto import utilities without having @import manually in each file? this loader job https://github.com/shakacode/sass-resources-loader adding webpack config sassresources: [ './path/to/vars.scss', './path/to/mixins.scss' ] update check implementation out in action in this boilerplate