Posts

android - Dialog List With SQLite data -

i have code shows me list of items have in sqlite database. this list opening in screen clicking button. have problems need display list in same screen, can't open antoher screen, want use dialog wchich have items database. trying modify code ain't results. this code: public list<string> populatelist() { list<string> ugraduatenameslist = new arraylist<string>(); androidopendbhelper openhelperclass = new androidopendbhelper(this); sqlitedatabase sqlitedatabase = openhelperclass.getreadabledatabase(); cursor cursor = sqlitedatabase.query("relpregresppred", null, null, null, null, null, null); startmanagingcursor(cursor); while (cursor.movetonext()) { string descripcionrespuesta = cursor.getstring(cursor .getcolumnindex(androidopendbhelper.rdescripcionrespuesta)); undergraduatedetailspojo ugpojoclass = new undergraduatedetailspojo(); ugpojoclass.setrdescri...

Registering DLL's in Wix using self-registration -

two of library depends on third. latter library must copied system32 directory, 2 - programfiles directory. please advise on how deal registration of first 2 libraries. i need use self-registration. tried specify id of main library companion file, did not help. should do? msi's selfreg table doesn't support ordering operation of registrations. use quietexec custom action call regsvr32 /s in right order wouldn't myself. the optimal design not rely on self reg. have thoroughly exhausted using msi handle registration data designed do?

makefile - Cmake vs make sample codes? -

i wondering if there sample code makefile s ( make ) , cmakelists.txt ( cmake ) both same thing (the difference being 1 written in make , other in cmake ). i tried looking 'cmake vs make', never found code comparisons. helpful understand differences, if simple case. the following makefile builds executable named prog sources prog1.c, prog2.c, prog3.c , main.c . prog linked against libmystatlib.a , libmydynlib.so both built source. additionally, prog uses library libstuff.a in stuff/lib , header in stuff/include . makefile default builds release target, offers debug target: #makefile cc = gcc cpp = g++ ranlib = ar rcs release = -c -o3 debug = -c -g -d_debug incdir = -i./stuff/include libdir = -l./stuff/lib -l. libs = -lstuff -lmystatlib -lmydynlib cflags = $(release) progobjs = prog1.o prog2.o prog3.o prog: main.o $(progobjs) mystatlib mydynlib $(cc) main.o $(progobjs) $(libdir) $(libs) -o prog debug: cflags=$(debug) debug: prog mystatlib:...

preg replace - Clean string from html tags and special characters -

i want clean text html tags, html spacial characters , characters < > [ ] / \ * , i used $str = preg_replace("/&#?[a-za-z0-9]+;/i", "", $str); works html special characters characters doesn't remove : ( /*/*]]>*/ ) how can remove these characters? if using php looks like, can use: $str = htmlspecialchars($str); all html chars escaped (which better stripping them). if want filter these characters, need escape characters on chars list: $str = preg_replace("/[\&#\?\]\[\/\\\<\>\*\:\(\);]*/i","",$str); notice there's 1 "/[]*/i", removed a-za-z0-9 should want these chars in. can classify desired chars enter string (will give trouble accentuations á é ü if use them, have specify every accepted char): $str = preg_replace("/[^a-za-z0-9áÁéÉíÍãÃüÜõÕñÑ\.\+\-\_\%\$\@\!\=;]*/","",$str); notice there's never escape characters, unless example intervals (\a-\z fine, ...

Does dart support client SSL/TLS connections yet? -

i thinking of writing apple push notification server using dart. dart support client side ssl/tls certificates? yes! dart vm supports ssl/tls, , https. see http://code.google.com/p/dart/issues/detail?id=3950 , http://code.google.com/p/dart/issues/detail?id=3593 closed. :)

Flume agent throws java.net.ConnectException: Connection refused -

i have been using flume while now, have got agent , collector running on same machine. configuration agent: exec("/usr/bin/tail -n +0 -f /path/to/file") | agente2esink("hostname", 35855) collector: collectorsource(35855) | collector(10000) { collectorsink("/hdfs/path/to/sink","name") } facing issues in agent node: 2012-06-04 19:13:33,625 [naive file wal consumer-27] info debug.insistentopendecorator: open attempt 0 failed, backoff (1000ms): failed open thrift event sink hostname:35855 : java.net.connectexception: connection refused 2012-06-04 19:13:34,625 [logicalnode hostname-19] error connector.directdriver: expected active timed out in state opening 2012-06-04 19:13:34,632 [naive file wal consumer-27] info debug.insistentopendecorator: open attempt 1 failed, backoff (2000ms): failed open thrift event sink hostname:35855 : java.net.connectexception: connection refused 2012-06-04 19:13:36,635 [naive file wal consumer-27] info debug.i...

CMake to link against non numbered libraries -

how can instruct cmake link against non-numbered version of library? instance when using boost libraries have: find_package(boost components regex program_options required) target_link_libraries(main ${boost_program_options_library}) and executable links against libboost_program_options.so.1.49.0 . if try run executable in older machine fail because library can't found although know functionality present in library version. that doesn't work. though functionality there, exact api may not there. that's why unix linking system uses symlinks, linker accesses unnumbered symlink, dereferences when writing out list of dependencies, require same major version @ runtime. you have 3 choices: recompile on target machine older boost. distribute necessary boost library along executable. involves writing launch script sets ld_library_path before running. link against static boost libraries eliminate runtime dependency. use line before find_package: set(boo...