Posts

ios - tableView tag wrong after moveRowAtIndexPath method -

i have view 7 tableviews representing 7 days of week. each tableview initialized tag 0 6. made longpressure recognizer in cells access right tableview: - (ibaction)longpress:(uigesturerecognizer *)sender { self.clickedpoint = [sender locationinview:self.view]; // down subview user clicked uiview *clickedsubview = [self.view hittest:self.clickedpoint withevent:nil]; if( [clickedsubview.superview iskindofclass:[customcell class]] ) { // selected tableview uitableview *selectedtableview = (uitableview*)clickedsubview.superview.superview; nslog(@"selected tag: %d", selectedtableview.tag); } } when press cell tags shown correctly. problem when move row inside of tableview. when moverowatindexpath: in tableview , longpress, tag of tableview made moverow gets tag of last longpress of tableview. example: i moverow in table tag 2. longpress table tag 5. go longpress table of tag 2 time log tag = 5 (the 1 before). if longpres...

css - Menu color change onclick -

i have menu similar ones in stackoverflow.com using dnn. how change color of selected menu? i have managed change color while hovering (using css), having trouble this. can achieve effect of changing color of clicked item using css? the (anchor) tag has :active state on click. try using trigger.

if statement - PHP check phone prefixes -

the code kinda big want avoid posting here. http://codepad.org/arzh7ya9 trying load bunch of numbers array. these numbers have prefixes whereever local, mobile or shared. $this->callarr contains numbers such 46703920293:402 or 4629304921:94 (number:duration of call). can see 4670 1 prefix , 46 another. may seem confusing @ first later local call , first mobile call. what doing: each number in callarr, first explode seperate number , duration. remove country code in case 46 grab first 2 numbers. 46703920293 magically turn 70 indicating mobile number. each number go through pricelist array $this->pricearr. pricearr have following structure number:price:type:oa. example: 4670:0.65:mobile:0.15 pricelist contain prefix. oa = opening costs call. on line 27 check if length of $number (which pricelist prefix) == 2. if it's 46 number local. if it's not remove 46(country code). issue @ line 41. can find mobile matches, free cost , shared. have issues grabbing lo...

mysql - Get total number of rows from subquery? -

i have query like select row1, row2 ( select b.row21, count(b.row21) hits table2 b b.row22 = 'foo' or b.row22 = 'bar' group b.row21 having hits = 2 ) b inner join table1 on (b.row21 = a.row1) row2 = 123 limit 10 now clearly, result limited first additional where , limit . so how retrieve amount of rows returned subquery without needing execute seperately? you can in mysql using variables: select row1, row2, @rn numrows ( select b.row21, count(b.row21) hits, @rn := @rn + 1 table2 b cross join (select @rn := 0) const b.row22 = 'foo' or b.row22 = 'bar' group b.row21 having hits = 2 ) b inner join table1 on (b.row21 = a.row1) row2 = 123 limit 10; you run risk mysql could rewrite query in different way, might avoid generation of rows. sql compilers smart enough this. don't think mysql smart.

jquery - how to get a javascript date from a week number? -

how can date of first day of week week number , year, in javascript (or jquery)? example : week 30 , year 2013 thanks in advance ! var d = new date(year, 0, 1); var days = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; d.setdate(d.getdate() + (week * 7)); console.log(days[d.getday()]); try this

Multiple Addresses for a FHIR resource Practitioner -

in resource definition of practitioner ( http://hl7.org/implement/standards/fhir/practitioner.htm ), 1 address can set. these problem managing physicians national identifier (rpps in france). physician can have several addresses, can work in public hospital , private organization in same time, instance. physicians have more 10 active addresses. how deal ? thanks in advance. if want have single resource, can use extensions send additional address repetitions (or other element need or don't have enough repetitions in core resource). premise allowing 1 reptition in "core" resource majority of systems support one, didn't want try forcing multiple repetitions. extensions, you're in no way limited cardinality indicated. in near future (though after publication of first dstu), we'll go through resources , identify elements maxoccurs=1 theoretically possible have more 1 , define standard extensions sending repetitions (just encounters common use...

types - Is it possible to combine two or more different highstock charts into one? -

i combine 2 chart types one. instance have @ top candlestick ( http://www.highcharts.com/stock/demo/candlestick-and-volume ) , underneath column range ( http://www.highcharts.com/stock/demo/columnrange )? yes possible, take @ example: http://www.highcharts.com/stock/demo/candlestick-and-volume