Posts

c# - Find the content of a TextBox inside a DataTemplate with multiple rows -

i have code: <stackpanel> <itemscontrol itemssource="{binding position}"> <itemscontrol.itemtemplate> <datatemplate> <grid> <grid.columndefinitions> <columndefinition width="2*" /> <columndefinition width="*" /> <columndefinition width="*" /> <columndefinition width="*" /> <columndefinition width="80" /> </grid.columndefinitions> <textbox grid.column="0" text="{binding name}" margin="5" /> <textbox grid.column="3" text="{binding id}" margin="5" /> <button grid.column="4" content="x" click="delete" /> </grid> </datat...

android - How to put pin on google map permanently that show our address? -

i want put info window on marker 1 arrow button , text , want click event of arrow in google maps android api v2. if using google maps sdk android can use googlemaps.setmylocationenabled(true) show location permanently on map. please see at sdk reference more infos or read this question .

exception - ElasticSearch 0.90.2 StreamCorruptedException on asking port 9300 -

i've unpacked elasticsearch-0.90.2.zip on windows xp, , started bin/elasticsearch.bat. i've set java_home c:\program files\java\jre7, problem @ first run. i'm trying connect google chrome 27.0.1453.116. according elasticsearch.yml, "elasticsearch, default, binds 0.0.0.0 address", 0.0.0.0:9200 responds 108 (net::err_address_invalid). localhost:9200 or 127.0.0.1:9200 responds correctly: { "ok" : true, etc. localhost:9300 responds 324 (net::err_empty_response), , displays streamcorruptedexception in console window: [2013-07-25 10:42:30,419][warn ][transport.netty ] [happy birthday] exc eption caught on transport layer [[id: 0x478ae9b7, /127.0.0.1:1627 => /127.0.0.1 :9300]], closing connection java.io.streamcorruptedexception: invalid internal transport message format @ org.elasticsearch.transport.netty.sizeheaderframedecoder.decode(sizeh eaderframedecoder.java:27) @ org.elasticsearch.common.netty.handler.codec.fra...

sql - Identify Digits in text field in MS Access -

how possible identify values text in text field for instance; col1 thy1 d881 d282 rm01 d114 kaar 5555 kaar kaar expected results results digits digits digits digits digits kaar digits kaar kaar i tried below, doesn't work though select iif(tab1.col1 "[!0-9]", tab1.col1, "with digits") results tab1 please clarify thanks select col1 tab1 col1 not "%[0-9]%" you should harness power of "where" clause. update: since want preserve order , replace improper values "with digits", correct clause should this: select iif(tab1.col1 "%[0-9]%", "with digits", tab1.col1) results tab1; note "%" signs, make sql match 0-9 position of tab1.col1 .

python - How does CouchDB handle updating views after I update a particular document? -

i have database of size 200mb,and around 10 views written on it. gives me view file occupies around 3-4gb on disk all docs in db updated once everyday interval of minute between each update,so number of documents constant.(number of docs=number of minutes in 24 hours) when update doc it's new revision , compact db immediately(to delete old rev) after,what happens view file?do values in b-tree updated new values,or there new entry on b-tree,hence increasing size of view file? what best way handle situation while conserving disk space , ensuring speed of views?

c# - Generic method to compare 2 strongly typed list -

i have following method compares 2 list (of same type) , returns differences. how make method accept lists of type? var differences = list1.where(x => list2.all(x1 => x1.name != x.name)) .union(list2.where(x => list1.all(x1 => x1.name != x.name))); to difference between 2 sets (with order independency , multiplicity independency), can use: hashset<t>.symmetricexceptwith(ienumerable<t>) . public static ienumerable<t> getsymmetricdifference<t>(ienumerable<t> list1, ienumerable<t> list2, iequalitycomparer<t> comparer = null) { hashset<t> result = new hashset<t>(list1, comparer); result.symmetricexceptwith(list2); return result; } in case, use it: var difference = getsymmetricdifference(list1, list2, new mycomparer()); with custom comparer: public class mycomparer : iequalitycomparer<mytype> { public bool equals(mytype x, mytype y) { return x.name.equals(...

c# - New line disappears after Invoke -

i've got silly minor problem here. context, using c#, i'm communicating between sockets , want display output worker threads. i have these lines display output: txtoutput.appendtext("client - sending following message: " + encoding.utf8.getstring(bytes) + environment.newline); txtoutput.invoke(new action(() => txtoutput.appendtext("client - server returned message: " + str + environment.newline))); the first line added program's main thread, second worker thread. the first line shows fine, second 1 too. when sequence again, first line b pasted onto second line a, second line b looking correct again. second line's newline disappearing, don't understand why or how fix this. can try this. think problem encoding. when send message: string message = input(textbox ex); utf8encoding utf8 = new utf8encoding(); byte[] encodedbytes = utf8.getbytes(message); and keep code @ receive. i tested following: public partial clas...