Posts

java - How can I utilize SimpleDateFormat with Calendar? -

i've got gregoriancalendar instances , need use simpledateformat (or maybe can used calendar provides required #fromat() feature) needed output. please, suggest work arounds permanent solutions. try this: calendar cal = new gregoriancalendar(); simpledateformat dateformat = new simpledateformat("dd-mm-yyyy"); dateformat.settimezone(cal.gettimezone()); system.out.println(dateformat.format(cal.gettime()));

cocoa touch - how to integrate myspace into my iPhone App -

possible duplicate: implementation of myspace , linkedin in iphone i new iphone technology i using api in json. need integrate myspace app how can done? try this: http://code.google.com/p/myspaceid-iphone-sdk/

php - Check if a field/propertry exists in a variable of type object -

i using zend_search_lucene, index website. site indexes not entirely similar. have, few fields, , have many fields. trying create similar index through different types of table, that's why encountering kind of error. now, when display result. call fields, not present in result generates error. tried check isset seems totally skips row. foreach ($hits $hit) { $content .= '<div class="searchresult">'; $content .= '<h2>'; $title = array(); if(isset($hit -> name)) $title[] = $hit -> name; if(isset($hit -> title)) $title[] = $hit -> title; // part fatal error. $content .= implode(" &raquo; ",$title); $content .= '</h2>'; $content .= '<p>'.$this->content.'</p>'; $content .= '</div>'; } how check if there such $hit -> name present in $hit the problem experiencing v...

vb.net - Joining two tables in the dataset -

i having data set in vb.net 2 tables 1 table filled using oracle databse , 1 sql 2005. how can join these 2 tables in dataset is looking for: how join 2 datatables using c#

javascript - how to create pc calculator script in php -

i have 2 tables 1 category , 1 products. want pc calculator. i have fields generated dynamically based on database. how can write script make this. <table align=center width=100% border=1 cellspacing=1 cellpadding=3> <tr> <th>category name</th> <th>product name</th> <th>price</th> </tr> <tr class="odd"> <td>speaker</td> <td> <select name="1" size="1" id="1"> <option value="1200.00">intex</option> <option value="2100.00">creative</option> <option value="1400.00">intex 2.1</option> <option value="2000.00">intex 2.1 woofer</option> </select> </td> <td><div id="t1" class="pr...

form mysql query in php -

i've got following queries need execute in php. problem need set queries before execution of main query. set queries set @center = geomfromtext('point(33.3666667 35.1666667)'); set @radius = 1; set @bbox = concat('polygon((', x(@center) - @radius, ' ', y(@center) - @radius, ',', x(@center) + @radius, ' ', y(@center) - @radius, ',', x(@center) + @radius, ' ', y(@center) + @radius, ',', x(@center) - @radius, ' ', y(@center) + @radius, ',', x(@center) - @radius, ' ', y(@center) - @radius, '))' ); and main query select users_profile.id, glength(linestring(users_profile.location,geomfromtext('point(33.3666667 35.1666667)'))) * 100 distance users_profile intersects( users_profile.location, geomfromtext(@bbox)) , (glength(linestring(users_profile.location,geomfromtext('point(33.3666667 35.1666667)'))) * 100) < 10 order distance ho...

ghc - How to execute a command right after a fetch or pull command in git? -

i cloned ghc (glasgow haskell compiler) repository. in order build compiler, need several libraries, of them available git repositories too. in order ease ones live, ghc hackers included script sync-all that, when executed, updates dependent repositories. now question: how can make git execute ./sync-all pull after did git pull automatically? heard using hooks, don't know, have do. a post-receive or post-update hook used kind of task, executed after each push. difference between post-receive , post-update hooks in arguments: post-receive both old , new values of refs in addition names. the missing piece is: where hook executes itself? the blog post " missing git hooks documentation " (a great) contributor mark longair sheds light on this: the current working directory git directory . so, if bare repository called “ /src/git/test.git/ ”, current working directory – if non-bare repository , top level of working tree “ /home/ma...