Posts

Weird Java runtime error -

i keep getting error during runtime , have no idea causing it. believes there file missing? caused by: java.io.filenotfoundexception: c:\program files\java\jdk1.7.0_07\lib\currency.data what currency.data , can suggest why happening, jdk isn't old since we're in 7u17 now. exception in thread "awt-eventqueue-0" java.lang.internalerror @ java.util.currency$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.util.currency.<clinit>(unknown source) @ java.text.decimalformatsymbols.initialize(unknown source) @ java.text.decimalformatsymbols.<init>(unknown source) @ java.text.decimalformatsymbols.getinstance(unknown source) @ java.text.numberformat.getinstance(unknown source) @ java.text.numberformat.getnumberinstance(unknown source) @ java.util.scanner.uselocale(unknown source) @ java.util.scanner.<init>(unknown source) @ java.util.scanner.<init>(unknown sour...

How to get number of rows in a SQL Server 2008 query -

how number of rows sql query? i tried : set @records = count(*) select * [inventory].[tbl_receipts] field_tag = '1234' but giving 1. wrong above code? actually there no row, should give output 0 when execute select * [inventory].[tbl_receipts] field_tag = '1234' it giving result 0 use set @records = (select count(*) [inventory].[tbl_receipts] field_tag = '1234')

php - How to merge the output of two associative arrays with no unique keys? -

i've got feeling stuck seemed trivial task. please take @ $data array. data skeleton multilevel menue. $data['name'] contains names given menue points/buttons , $data['url'] corresponding links. array dimensions $data['name'] , $data['url'] in sync - exact same nodes, same element count , on. having started write simple output function - names first. know code isn't pretty works. beat me mind aches when mentioning recursion ;) nevertheless primitive way leads proper output. in second step needed add url information corresponding names/buttons fail , begun feel dumb. while iterating through $data['name'] need pointer current element , use corresponding url $data['url'] nope - associative array way leads dead end. keys aren't unique way ... easy sigh array shortened version of original 1 generated 150 pages long word document still growing , changing. any ideas how output button-names + corresponding url...

database - Mass insert data at end of MySQL field -

how go mass inserting ending </div> tag defined field name in mysql? thanks heaps. consider using concat command: update jos_content set fulltext = concat( fulltext, '</div>' ) id = 7; if wanted update records in single query, remove clause above. please note, depending on server side language you're using, you'll want setup parameterized query prevent sql injection or other hacks.

java - wait( ) function not running properly -

i new using wait( ); feature. thought had right, not run. cannot figure out went wrong looking @ examples. can me out, please? in advance! public class mainactivity extends activity { private imageview splash; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.splash); initialize(); } private void initialize() { splash.setvisibility(view.visible); try { wait(5000); } catch (interruptedexception e) { e.printstacktrace(); } mainmenu(); } private void mainmenu() { setcontentview(r.layout.mainmenu); } logcat: 04-04 23:08:40.075: e/trace(2555): error opening trace file: no such file or directory (2) 04-04 23:08:48.345: e/androidruntime(2555): fatal exception: main 04-04 23:08:48.345: e/androidruntime(2555): java.lang.runtimeexception...

php - AJAX Query for Multiple Dynamic Forms with varying ID's -

this in header, jquery.min.js included: <script type="text/javascript"> //<![cdata[ $(function() { $("form.ajax").submit(function(e) { var $this = $(this); e.preventdefault(); $.ajax({ url: 'index.php', type: 'post', data: $this.serialize(), success: function() { //alert(response); } }) return false; }); }); //]]> </script> this example form dynamically generated: <form id="dash_73" method="post" class="ajax"> <fieldset> <input type="hidden" name="action" value="ajax_purchase_ticket" /> <input type="hidden" name="lottery_id" value="73" /> <div class="left1"> <button type="submit" name="dash" form="dash_73" id="button_73-1" v...

php - Mysql get column names then results -

say have query information in particular database have different schemas. for example, may have: db1 [id] [blah] [shibby] & db2 [id] [yadda] [etc] [andsoforth] then run query needs return: a) field names table header b) results table cell the query generated form via post in order set variables determine database information from. the below me column names, need populate remainder actual results. echo "<table>"; echo "<tr>"; $qcolumnnames = mysql_query("show columns ".$db) or die("mysql error"); $numcolumns = mysql_num_rows($qcolumnnames); $x = 0; while ($x < $numcolumns) { $colname = mysql_fetch_row($qcolumnnames); $col[$colname[0]] = $colname[0]; $x++; } foreach($col $key){ echo "<th>$key</th>"; } echo "</tr>"; echo "</table>"; you database, mean fields table? have first part - get column names - , implode string array ...