Posts

ios7 - Notification not coming on Device but terminal showing Sent Successfully in iOS -

i have added apns app using ray wenderlich tutorial i followed exact steps mentioned in tutorial when sent notification terminal using simplepush.php,i got message connected apns. message delivered no notification has been received @ end.i have added token id , phass-phrase. please help.

css - Change text color of selected option item in php -

i want change background color of selected option item in php coulnd that. add indicator(*) begining of selected option bellow code not need that. need change text color of selected form item in php. adding style="background-color:red" $a works.! <select name="dest"> <?php $a=''; $sql2 = "select evaperiod evaluationperiod"; $query2 = mysql_query($sql2); if(mysql_num_rows($query2)>0) { $x='20'; $guncel=''; while($result=mysql_fetch_array($query2)) { $period = $result['evaperiod']; if($period==$donemm) $a=...

c# - Retrieving Building Blocks from user generated Word document -

i've searched far , wide, , haven't found proper solution yet. first off, winforms application using .net 4.0 , devexpress. i've been attempting retrieve building blocks (watermarks, cover pages etc) word documents (.docx), or @ least user generated template files (.dotx), user uploads application, saved database. i must able retrieve building blocks used in file. i have tried lot of different ways of retrieving them, can retrieve them built-in building blocks.dotx file, located in: c:\users\<username>\appdata\roaming\microsoft\document building blocks\1033\14\built-in building blocks.dotx i haven't figured out how extract them user generated file. here work in progress code i've been using (many iterations can debug it): private void savebuildingblock(string savedfile) { try { microsoft.office.interop.word.applicationclass wordapplication = null; wordapplication = new microsoft.office.interop.word.applicationclass(); micros...

php - Wordpress - save filter settings into cookie -

i have custom post type in wordpress, custom filters. i able save user's filter cookie, when comes posts lists, last filter set automatically. i have code saving cookie: function set_newuser_cookie() { if ( is_admin() && $_get['post_type'] == 'tickets') { setcookie('bs_tickets_filter', $_server['query_string'], time()+3600*24*100, cookiepath, cookie_domain, false); } } add_action( 'init', 'set_newuser_cookie'); this code saves whole query string cookie, like: orderby=status&order=asc&s&post_status=all&post_type=tickets&action=-1&m=0&status=0&type=0&priority=0&state=2135&author&paged=1&mode=list&action2=-1 how can set filter again, when user comes posts listing? i think solved this: function bs_set_filter_cookie() { if ( is_admin() && $_get['post_type'] == 'tickets' ) { // if theres filter requ...

django - A model with a defined field throws an AttributeError when accessing it -

i have django 1.5 app custom user model. has following field (among bunch of others): class user(models.model): ... reporting_period = models.charfield( max_length=20, choices=reporting_periods, null=true, blank=true, default=none ) company = models.foreignkey( company, null=true, blank=true, default=none ) this model has following function defined: def get_reporting_period(self, company_reporting_period=none): if not self.reporting_period: if not hasattr(self, '_company_reporting_period'): if company_reporting_period: self._company_reporting_period = company_reporting_period else: self._company_reporting_period = self.company.reporting_period return self._company_reporting_period else: return self.reporting_period occasionally, get_reporting_period function throws attributeerror (...

css - word break a long sentence by word -

"subject 10% service charge per room per night. cancellation or amendments can made 2 days prior arrival. otherwise, 1 nights’ room rate levied. first night guarantee required @ time of reservation , 1 night room rental charged credit card provided in event of no show, late cancellation or amendment. if dispute arises, hotel rainbow hong kong reserves final decision." i use css properties "word-break:break-all", did not well. there still word being break up. ** need 'word-wrap' property ** use one word-wrap:break-word;

php - Timezones and summer time in different states -

i have problem php imap timezones. i have server download emails users accounts. , users can view email on website. i set php timezone of server utc 0 , want users see receiving time of emails timezones. problem summer time because timezone change of 1 hour. example: gmail give me email received time in utc (0) @ 7:00. in italy, timezone utc +1 can add 1 hour time, 8:00. but in italy have summer timezone utc must +2 not +1 not countries have this. ask if exists maybe online service can give me correct offset must add hour showing correct time. thank in advance. in italy time zone swaps between cet , cest cannot hard-code using names not reflect fact. need use geographical identifiers europe/rome : <?php $utc = new datetimezone('utc'); $rome = new datetimezone('europe/rome'); $winter = new datetime('2013-12-31', $utc); $summer = new datetime('2013-08-31', $utc); $winter->settimezone($rome); $summer->settimezone($ro...