Posts

sql server - php to call MSSQL query and compare two dates? -

sql server - php to call MSSQL query and compare two dates? - ahoy there all, bit stuck , need help. i calling external mssql (not mysql) database linux server , display results after today's date. here code: $today = date("y-m-d");// current date $date = strtotime(date("y-m-d", strtotime($today))); $todaysdate = date( 'm j y g:i:s:000a', $date ); //converts mssql standards $query = "select dateofarrival atable dateofarrival > '". $todaysdate ."'"; when run query, displays results, doesn't give flying hoot where. i guessing because comparing date string? not sure on 1 though. any thoughts? give thanks in advance! update: here echoed query string. $query = "select dateofarrival atable dateofarrival > 'jan 10 2012 12:00:00:000am'"; date examples stored in db: feb 28 2004 12:00:00:000am oct 14 2009 12:00:00:000am may 18 2011 12:00:00:000am apr 10 2012 12:00:00:000am...

java - Tooltip in swing -

java - Tooltip in swing - i made tool tip comportment in swing using html tags _graph.settooltiptext("<html><div style=\"width: 300px; height: 100px;" + " overflow: auto; border: 0;<p style=\"padding:2 5 2 5;\"></div>please wait..."); here _graph object of component. problem is, if info exceeds need scroll not happening.please suggest me create scrollbar. default tooltips basic: lable-like component, limited text-only (except html). mentioned, way more fancy tooltips extend jtooltip , allow graph component homecoming custom tooltip in createtooltip. example , pitfalls discussed on @ otn java html swing scrollbar tooltip

java - Android Autocomplete TextView drop down width -

java - Android Autocomplete TextView drop down width - i want dropdown of auto finish textview cover entire screen width. normal behaviour of autocomplete textview such covers width of edittext (screenshot below). how do ? should default maps app in android. http://developer.android.com/reference/android/widget/autocompletetextview.html#attr_android:dropdownwidth by putting value -1 or fill_parent should work java android

php - Str_replace not removing tags in message string -

php - Str_replace not removing tags in message string - i echoing contents of table using foreach, problem getting date @ top of page, when looking @ 1 line preview date , nil more. if remove date fine , can see first line of template. trying remove date tag preview using each. using next code, doesnt seem doing lot, far can see have things right ?. echo '<div class="messagerow">'; // pulls message foreach above $emlmsg = $row->emailformmessage; // trying remove date replacing blank contents of string value. $dateremove = ''; // str_replace supposed remove {date} tag along paragraph tags wrapped in. $emlmsgfiltered = str_replace(array('<p>{date}</p>'), array($dateremove), $emlmsg); // echo filtered message here, minus date....but still there ?? echo $emlmsgfiltered; echo '</div>'; edit >>>>>> requested, html code <p>{date}</p> <p>dear {name} thanky...

android - How would i store a number/string into R.string.xx? -

android - How would i store a number/string into R.string.xx? - with code, programme forcefulness close(error) ***public view x = findviewbyid(r.string.nfoname);*** @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.information); //edittext ***final edittext infoname=(edittext)findviewbyid(r.id.infoname);*** //clear,confirm button clear = (button)findviewbyid(r.id.buttonclear); button confirm = (button)findviewbyid(r.id.buttonconfirm); //clear button clear.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { // todo auto-generated method stub infoname.settext(""); } }); //confirm button confirm.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { ***x=(view) infoname.gettext();*** } }); } the 1 * source of error program function: if user clicks confirm, name set r.string.nfoname use...

intergrating database for android app -

intergrating database for android app - is there way integrate mobile database app? if so, extremely hard? have not yet started on code, know how can done , measures encompasses such want integrate database android app. i following: user search restaurant nearby...they think know name of restaurant, begin typing letters. if type u, restaurants start "u" show up. 1 time find restaurant looking for, click on , information. can done? give thanks you. afaik, how works, company have database need give url takes search term parameter , returns either xml (or) json response. need invoke url appending search terms (entered user) help httpclient api android, homecoming corresponding results either xml (or) json. if json response can utilize android jsonobject api parse response. if xml response, need utilize sax/dom parsers. android database

ruby - trouble in passing select tag values in a rails application -

ruby - trouble in passing select tag values in a rails application - new on rails, having problem in passing select_tag value(in view file) controller. my view controller file like class projectstatuscontroller < applicationcontroller def index @projects = project.find(:all, :select => "name") end def show lookup = params[:project] @rows = project.find_by_lookup(lookup) end end and view file like <% form_tag("project_status", :controller => "projectstatus", :action => "show", :method=>'get' ) %> <%= select_tag 'project', options_from_collection_for_select(@projects,"id", "name"),:onchange => "this.form.submit();" %> <% end %> <% if !@rows.nil? @rows.each |row| end %> <%= row[:name] %> <% end %> what want accomplish - based on selected value select tag want display information(on same view page) of se...