Posts

Featured post

Socket.connect doesn't throw exception in Android -

if put nonsense url no exception thrown , none of rest of code executed not rest of asynctask called method connects. try { socketcliente.connect(new inetsocketaddress("f", port), 2000); } catch (unknownhostexception e) { geterror("host doesn't exist"); return -1; } catch (ioexception e) { geterror("could not connect: host down"); return -1; } add catch statement. catch ( exception e ) { log.d(tag, e.getmessage(),e); toast.maketext(getapplicationcontext(), "unexpected error:" + e.getmessage(), toast.length_long).show(); } this write log , pop toast tell what's going on.

Ruby can not find the module (LoadError) under Windows -

i tried connect database using ruby (under windows). that: install ruby in c:\ruby193 install devkit (c:\ruby193\devkit). run "ruby dk.rb init", "ruby dk.rb install" downloaded rubygems (1.8.25). executed ruby setup.rb and: gem install rubyfb (adapter ruby firebird) after wrote short rb-script: require 'rubygems' require 'rubyfb' include rubyfb db = database.new('test.gdb') and got error: c:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 126: can't find module - c:/ruby193/lib/ruby/gems/1.9.1/gems/rubyfb-0.6.7/lib/rubyfb_lib.so (loaderror) this file exists, ruby can not find it. attempts rectify situation failed. i installed adapter, situation repeated - ruby can not find file. please advise. i having same problem. had copying c:\program files\firebird\firebird_2_5\bin\fbclient.dll c:\ruby\bin .

android - Cant execute delete query properly using rawQuery -

i want deleting rows of table info comparing table type , code goes below. not getting error or exception still unable delete data. please suggest me string query = "delete info _id in " + "( select a._id " + " info a, type b," + " a.t_id = b._id , b.type_name = 'petrol' )"; try{ database.rawquery(query,null); }catch (exception e){ e.printstacktrace(); } the method sqlitedatabase.rawquery() meant querying --> select statement. to modify data raw sql, need use sqlitedatabase.execsql() .

mysql - How to join multiple occurrences of record against master record with filter -

i have table shows big library of products. i have several filters can applied table via kendo grid, problem having concerns mysql. i have date range filter, needs filter list of products when sold. the issue having because product have sold more once, causes product lines duplicate, because example 4 "datesold" rows 1 product. know why is, can't figure out how syntax filter: select ... parts_library left join parts_sale_dates psd on psd.partlibid = parts_library.id when applying date filter this: select ... parts_library left join parts_sale_dates psd on psd.partlibid = parts_library.id psd.datesold >= ? another issue doing: select ... parts_library left join parts_sale_dates psd on psd.partlibid = parts_library.id makes query take donkeys because there 500,000 products. i think looking "between": select ... parts_library pl left join parts_sale_dates psd on psd.partlibid = pl.id psd.datesold between <date1> ,

reporting services - Compare SSRS report values with C# variables -

i have compare data contained in rendered ssrs report (chart , tablix values example) variables stored in c# application. how can done? so far know generating report in xml , parsing xml desired data. there easier way achieve without user interaction? alternatively, there way drop report chart/tablix data array or list in c#? you have 1 special requirement there... might if tell why want this, because there may other solutions actual problem . having said that, if want "compare data contained in rendered ssrs reports" "variables stored in c#", have best approach already. given approach, seem suppose there's user interaction needed generate xml, it's not: there's the ssrs web service can run reports without users intervening. the render method allows specify format: format type: system.string format in render report. argument maps rendering extension. supported extensions include xml, null, csv, image, pdf, html4.0, html3.2,

Azure storage emulator cannot connect to LocalDB -

i have problem azure storage emulator, refuses connect localdb. used work fine before created odbc connection using named pipe. happened: i needed access data in database mathematica, generated odbc connection. odbc not connect (localdb)\v11.0, used named pipe instead. since then, azure has stopped work. upgraded sdk2.0, did not help. tried run dsinit.exe, get: found sql instance (localdb)\v11.0. creating database developmentstoragedb20 on sql instance '(localdb)\v11.0'. cannot create database 'developmentstoragedb20' : network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified). 1 or more initialization actions have failed. resolve these errors before attempting run storage emulator again. please refer http://go.microsoft

jquery - How to manipulate DOM after new elements have been inserted? -

i working on woocommerce/wordpress site @ moment , on checkout page, when submit form, submits through ajax , if there errors (required fields not filled in etc), page inserts html , lists fields need filled in. i have jquery places newly inserted html in page new place on page doesn't work. woocommerce code inserted on submit (if errors): <ul class="woocommerce-error"> <li><strong>first name</strong> required field.</li> </ul> my code: var wc_errors = jquery('ul.woocommerce-error'); jquery('.errors_placeholder').append(wc_errors); it might useful note javascrript file loaded before woocommerce javascript file. thanks guys try following: $(document).ready(function() { var wc_errors = $('ul.woocommerce-error'); $('.errors_placeholder').appendto(wc_errors); }); you need in $(document).ready function tell jquery dom ready. check out example