Posts

android - wait to asynctask finish from another asynctask -

im is querying a DB with an asyntask that works in an object, and this object is a The problem is that I do not know the way to wait for query results before trying to use methods from this object. This taps point is the reason for exception. I tried with this time and it works, but I know it has not been done properly. // With this constructor I create an asyntask which db empresa = new Empresa (id_empresa); / * While (! Empresa.consulta_terminada) {// none of the advice on this question) * / Log.e ("EMPRESA NOMBRE", empresa.getNombre ()); Sita = new Sita (Itenario, Hora_Farmato, Empressia); Citas.add (cita); Sorry for my english and thanks! Pass a runnab for AsyncTask, and open it on postExecute (). Or use handler and handler thanks to doing async tasks, this will be more flex.

how i change background for all activity android -

I put an image for all the activity in my app (in style.xml ...). How can I change the background for all my activities dynamically, is it possible to change the properties of a theme dynamically? Thank you for your help / P> getWindow () can change setBackgroundDrawable (...); . GetWindow () setBackgroundDrawableResource (...); See the docs.

How to find strings and put them in a list only once in python? -

I have some string in the list like: a = ['Android' . Bros. "Android" Brosser URL 'Android' Messaging "FutureShop" FutureShop Filler "FutureShop" Filter Hello '' FutureShop. Test 'Test' Test. Hello '] What do I have to do, get names of all these stars (Android, FutureShop, Test) and put them in a list. The list will then appear: b = ['Android', 'FutureShop', 'Test'] i.e; There should not be a string more than once. Edit / Note: I did not know about using the set in Python first, this is why I asked this question. Well assume that they are in the list: A = ['Android', 'Android. Bros. ',' Android. Brosser Url ',' android ' Messaging ',' FutureShop ',' FutureShop ' Filler ',' FutureShop. Filter Hello 'You can do this: b = list (set (set (set) (set (set (' set ',' test ',' test.Hello ...

c - When the new value specified for SO_RCVBUF in setsockopt() will take effect? -

My query is related to the "SO_RCVBUF" option in the SetCopy () API when the new value specified for SO_RCVBUF in SetOp () is effective Will happen? I am testing the flow control of TCP / IP and below is my environment. The client program is a slow reader and it has a socket to test the flow control, after setting the connection to 5000 bytes Before reducing the value of SO_RCVBUF and getting data, I am decreasing it. I hope that, after sending 5000+ bytes, the client should wait for the program to read. But the server sends the program data to ~ 60000 bytes. After that the server program client will wait to read. When the customer reads 55,000 bytes, I am getting a new value to get buffer (5000 bytes). Is it expected? I think the effect of setocketopt () should be immediate. The initial value of receiving the buffer should not have any effect after the codecot (). Regards, Pacific I think that you connect () Before calling, SO_RCVBUF should be set, because it...

vba - Changing Permissions on a live *.mdw file? -

If I write the code to change the permissions / users a *. Mdw add a file; What *. Mdw file is live, while I can run that code? Another word while people are still using it? I am using MS Access 2003. Yes, you can and '* .mdw' file is actually MDB database 'user'; And changes in the 'group' collection are written together there.

know the start date and the latest date on a table on SAS -

I am very fresh in the SAS world, however, although I used SAS during my studies last year but theoretical knowledge On the hands is not the same as knowledge. This is my problem. I have tables on the SAS, which look like the example below: Table 1 date var_1 var_2 var_3 var_4 var_5 1957 m1. . . . 1957 m2. . . 23.5 1957 m3 1.2. . 23.6 1957 M4 1.3. 23.7 1957 M5 1.4 0.123 23.8 1957 M6 1.5 0.124 23.9 1957 M7 1.6 3.0 0.125 23.10 1957 M8 1.7 3.1 0.126 23.11 1957 M 9 1.8 3.2 0.127 23.12 1957M10 2.1 1.9 3.3 0.128 23.13 1957M11 2.2 1.10 3.4 0.129 23.14 1957 M12 2.3 1.11 3.5 0.130 23.15 As you have guessed, each variable is a time serial that is on its authority and date, there is also a time series, which are numerical except column column column That is a character var_1 will start in October (or M10) in 1957 and the latest date will be December (or M12) in L 957 var_4 ac October will (or M10) began in 1 9 57 and the latest date would be December (M 12). I have tried the f...

android - Navigation Drawer and MapFragment -

I want to know what is the right approach to implementing mapping with a navigation drawer I already have this work Was doing fine, but I'm reading some documents and maybe it can cause problems in the future. Then, my main square where the navigation drawer has been implemented, it is very common the following selectItem () method: the home activity activity Enhances {// ... // content like purchases (), etc. // ... Private Zero SelectItem {if position (position == 0) {// position 0 navigation drawer piece piece = new mapframement () is the mapped option; Piece Manager Piece Manager = getFragmentManager (); FragmentManager.beginTransaction () .replace (R.id.content_frame, fragment) .commit (); } MDrawerList.setItemChecked (status, true); SetTitle (listaElementosDrawer [status]); MDrawerLayout.closeDrawer (mDrawerList); }} Mapfragment, which is a fragmented piece of main activity, is as follows: the public class spreads the Mapfraggment fragment {public mapfragment...