Daily Archives

Articles indexed Sunday November 11 2012

Page 3/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do I get a Broadcom Wireless BCM43225 card working?

    - by DanFritz
    During the installation of my Ubuntu 12.10 I could use the wireless connection for extra updates. After the installation I updated Ubuntu and it installed 74 new updates, after that no wireless connection (say what!). So I did try some stuff, I followed the tutorial to load the windows drivers using ndiswrapper (https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper) but I always get that the ndiswrapper module is not loaded (but I did install the extra 3 packages, still doesnt work). ndiswrapper-source ndiswrapper-dkms ndiswrapper-common Please somebody help! Thanks a lot

    Read the article

  • DPKG errors after upgrade to 12.10

    - by James Wulfe
    So I was doing fine then i upgraded my system to 12.10 and now i cant get my system to update all of its packages properly. no matter what i do, cleaning apt cache, manual install using dpkg, etc, i just cant get them to install. what is happening here and how do i fix this. if i would have thought 12.10 would be this much of a hassle i would have never upgraded..... here is a sampling of the code that returns from "apt-get -f install" Preparing to replace usb-modeswitch-data 20120120-0ubuntu1 (using .../usb-modeswitch-data_20120815-1_all.deb) ... /var/lib/dpkg/info/usb-modeswitch-data.prerm: 4: /var/lib/dpkg/info/usb-modeswitch-data.prerm: dpkg-maintscript-helper: Input/output error dpkg: warning: subprocess old pre-removal script returned error exit status 2 dpkg: trying script from the new package instead ... /var/lib/dpkg/tmp.ci/prerm: 4: /var/lib/dpkg/tmp.ci/prerm: dpkg-maintscript-helper: Input/output error dpkg: error processing /var/cache/apt/archives/usb-modeswitch-data_20120815-1_all.deb (--unpack): subprocess new pre-removal script returned error exit status 2 /var/lib/dpkg/info/usb-modeswitch-data.postinst: 7: /var/lib/dpkg/info/usb-modeswitch-data.postinst: dpkg-maintscript-helper: Input/output error dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/network-manager_0.9.6.0-0ubuntu7_i386.deb /var/cache/apt/archives/pcmciautils_018-8_i386.deb /var/cache/apt/archives/unity-common_6.10.0-0ubuntu2_all.deb /var/cache/apt/archives/whoopsie_0.2.7_i386.deb /var/cache/apt/archives/usb-modeswitch_1.2.3+repack0-1ubuntu3_i386.deb /var/cache/apt/archives/usb-modeswitch-data_20120815-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) It is also just these 6 packages only. no other packages have given me this kind of trouble. well i should say as of now. It was just 5, but them i got an update for unity, and now unity-common is added to the trouble makers. which prevents me from further upgrading the actual unity package as this package is a dependancy.....

    Read the article

  • Compiz problems in Ubuntu 12.10

    - by Antonio Raffaele Iannaccone
    I have installed ubuntu 12.10 x64 on my notebook and I wanted to make a little customization in the UI, so i downloaded Compiz Settings Manager and opened it up. Once I opened it up, I found out that in the compiz are not all those settings and animations (that I could apply like on the photos, videos etc.) so I reinstalled it few times. Once I get bored with the reinstalling I checked one field in there and Ubuntu (OS) started to get "lagged" (Dash get hid, OS started to do not respond very well). So please, can anyone help me? How can I customize my ubuntu without get lagged and with all the animations that have to be available in the compiz? Thanks to all! thank you! It seems that it helped to fix the Dash-hide problem, but I still do not have all the animations and features that have to be in the Compiz (program). Can you help me with this too please? Thanks a lot!

    Read the article

  • How does juju expose work?

    - by user84471
    If I expose my service, for instance teamspeak server, on what address it will be running? On my server address? For example: my server has an address of 158.37.15.167. If I deploy teamspeak from my local network (10.0.0.0) connected to the server, how will it be seen in the 158.37.15.167 network? When I run juju status I get this: public-address: nodeTWO.localdomain instead of an IP address. My juju status: http://pastebin.com/z99Bhx9G

    Read the article

  • Slow transfer to external USB3 hard drive

    - by JMP
    Trying to backup data from hard drive before reloading windows following some issue with its load. Having trouble with the file transfer to a USB3/2 external hard drive NTFS. Getting transfer speed of about 116.7kB/sec. In other words its taking about 5 hours to transfer 1.4GB. I've got about 80GB to go. So the transfer is going to take 11days. Seems a little on the slow side. Am I missing something? Is there a way to make this faster. No issue with the external drive transferring this amount in windows. But don't have that option at the moment.

    Read the article

  • Vmware installation over ubuntu sever 12.04 lts

    - by Sandeep
    How to install vmware workstation 7.1.6-744570.i386 on Ubuntu Server 12.04 lts. i installed it but error is coming . Vmware kernel module updater Unable to build kernel module. See log file /tmp/vmware-root/setup-8887.log for details. make[2]: * [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1 make[1]: * [module/tmp/vmware-root/modules/vmmon-only] Error 2 make[1]: Leaving directory /usr/src/linux-headers-3.2.0-27-generic-pae' make: *** [vmmon.ko] Error 2 make: Leaving directory/tmp/vmware-root/modules/vmmon-only' please provide the solution for this

    Read the article

  • Where to ask a question about startups?

    - by Wolfpack'08
    I've got some questions about how to better run my web application development business, which has only been running for a little more than two years. It's still in its early phases, as I consider the first five years the 'early years'. Being inexperienced with business in general, I always have a lot of questions as to whether I am making the right decisions (for example, I often worry about my hiring practices, and I often worry that I may have priced new products wrongly). Is there a good site on the Stack Exchange to ask questions about things like this (for example, this site, the Project Management site, the Salesforce site, or perhaps the Personal Finance site)? I'm combing through questions and answers on each of these sites, now, and I can see questions that mimic my own. Nothing precisely the same, but things that are similar on all sites. Apart from just reading through previously asked questions, what is a good way to get a sense of whether or not my question fits on a site in the exchange? If you recommend going out of the exchange, please also let me know.

    Read the article

  • phpBB - display a public message when the whole board is private

    - by Sparky672
    In my installation all discussion forums/boards are private and can only be seen after a user registers and admin approves their membership. This is working. When a user first comes to the main phpBB page and they're not logged in, they can see very little except for the login and registration functions. Now I'm trying to configure phpBB to display a Read Me posting that is available to general public before registration or login. The problem is that I'd have to create a whole "public" forum and it would likely contain only one topic thread called "Read Me". The users would have to click into the public forum and then click again to get into the Topic called "Read Me". Is it possible to have a Topic thread outside of a forum? If not, is there another, better, way to achieve this? I just want to display a message, maybe a few short paragraphs to the public, explaining the purpose of the Forum and that they must register and wait for approval in order to gain additional access. I'm not seeing anything like this in the ACP. Thank-you.

    Read the article

  • How does Against The Wall create an infinite wall?

    - by Zolani13
    There is a game called Against The Wall, developed by Michael P. Consoli. It's a fantastic game, as I've always been stumped at how the game creates an infinitely spanning wall. In the game, you can fall forever, and the wall will keep spanning. I can fall as long as I like, and still be able to climb back to where I was before. The game is developed in Unity. How can a game do this without crashing, or creating some kind of memory overload?

    Read the article

  • How can I make smoother upwards/downwards controls in pygame?

    - by Zolani13
    This is a loop I use to interpret key events in a python game. # Event Loop for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_a: my_speed = -10; if event.key == pygame.K_d: my_speed = 10; if event.type == pygame.KEYUP: if event.key == pygame.K_a: my_speed = 0; if event.key == pygame.K_d: my_speed = 0; The 'A' key represents up, while the 'D' key represents down. I use this loop within a larger drawing loop, that moves the sprite using this: Paddle1.rect.y += my_speed; I'm just making a simple pong game (as my first real code/non-gamemaker game) but there's a problem between moving upwards <= downwards. Essentially, if I hold a button upwards (or downwards), and then press downwards (or upwards), now holding both buttons, the direction will change, which is a good thing. But if I then release the upward button, then the sprite will stop. It won't continue in the direction of my second input. This kind of key pressing is actually common with WASD users, when changing directions quickly. Few people remember to let go of the first button before pressing the second. But my program doesn't accommodate the habit. I think I understand the reason, which is that when I let go of my first key, the KEYUP event still triggers, setting the speed to 0. I need to make sure that if a key is released, it only sets the speed to 0 if another key isn't being pressed. But the interpreter will only go through one event at a time, I think, so I can't check if a key has been pressed if it's only interpreting the commands for a released key. This is my dilemma. I want set the key controls so that a player doesn't have to press one button at a time to move upwards <= downwards, making it smoother. How can I do that?

    Read the article

  • Finding the normals of an oriented bounding box?

    - by Milo
    Here is my problem. I'm working on the physics for my 2D game. All objects are oriented bounding boxes (OBB) based on the separate axis theorem. In order to do collision resolution, I need to be able to get an object out out of the object it is penetrating. To do this I need to find the normal of the face(s) that the other OBB is touching. Example: The small red OBB is a car lets say, and the big OBB is a static building. I need to determine the unit vector that is the normal of the building edge(s) the car is penetrating to get the car out of there. Here are my questions: How do I determine which edges the car is penetrating. I know how to determine the normal of an edge, but how do I know if I need (-dy, dx) or (dy, -dx)? In the case I'm demonstrating the car is penetrating 2 edges, which edge(s) do I use to get it out? Answers or help with any or all of these is greatly appreciated. Thank you

    Read the article

  • How do I draw a scene with 2 nested frames

    - by Guido Granobles
    I have been trying for long time to figure out this: I have loaded a model from a directx file (I am using opengl and Java) the model have a hierarchical system of nested reference frames (there are not bones). There are just 2 frames, one of them is called x3ds_Torso and it has a child frame called x3ds_Arm_01. Each one of them has a mesh. The thing is that I can't draw the arm connected to the body. Sometimes the body is in the center of the screen and the arm is at the top. Sometimes they are both in the center. I know that I have to multiply the matrix transformation of every frame by its parent frame starting from the top to the bottom and after that I have to multiply every vertex of every mesh by its final transformation matrix. So I have this: public void calculeFinalMatrixPosition(Bone boneParent, Bone bone) { System.out.println("-->" + bone.name); if (boneParent != null) { bone.matrixCombined = bone.matrixTransform.multiply(boneParent.matrixCombined); } else { bone.matrixCombined = bone.matrixTransform; } bone.matrixFinal = bone.matrixCombined; for (Bone childBone : bone.boneChilds) { calculeFinalMatrixPosition(bone, childBone); } } Then I have to multiply every vertex of the mesh: public void transformVertex(Bone bone) { for (Iterator<Mesh> iterator = meshes.iterator(); iterator.hasNext();) { Mesh mesh = iterator.next(); if (mesh.boneName.equals(bone.name)) { float[] vertex = new float[4]; double[] newVertex = new double[3]; if (mesh.skinnedVertexBuffer == null) { mesh.skinnedVertexBuffer = new FloatDataBuffer( mesh.numVertices, 3); } mesh.vertexBuffer.buffer.rewind(); while (mesh.vertexBuffer.buffer.hasRemaining()) { vertex[0] = mesh.vertexBuffer.buffer.get(); vertex[1] = mesh.vertexBuffer.buffer.get(); vertex[2] = mesh.vertexBuffer.buffer.get(); vertex[3] = 1; newVertex = bone.matrixFinal.transpose().multiply(vertex); mesh.skinnedVertexBuffer.buffer.put(((float) newVertex[0])); mesh.skinnedVertexBuffer.buffer.put(((float) newVertex[1])); mesh.skinnedVertexBuffer.buffer.put(((float) newVertex[2])); } mesh.vertexBuffer = new FloatDataBuffer( mesh.numVertices, 3); mesh.skinnedVertexBuffer.buffer.rewind(); mesh.vertexBuffer.buffer.put(mesh.skinnedVertexBuffer.buffer); } } for (Bone childBone : bone.boneChilds) { transformVertex(childBone); } } I know this is not the more efficient code but by now I just want to understand exactly how a hierarchical model is organized and how I can draw it on the screen. Thanks in advance for your help.

    Read the article

  • How do I make custom functions chain-able with jQuery's?

    - by sergio
    I need a "callfront" or "precall" (the opposite of "callback" ¿?) to add in MANY places before an animation occurs in an existing plugin, To be used like e.g. $(some_unpredictable_obj).preFunct().animate(… The problem is, as I said they are MANY places, and all of them are different animations, on different objects. I can TELL where all of them occur, but I don't want to add over and over the same code. I actually have to add both a function before and after those animations, but I think I can use the callback for all of them. In a perfect world, I'd like to replace every animate(property, duration) by preFunct().animate(property,duration).postFunct() preFunct and postFunct don't need parameters, since they are always the same action, on the same object. This could be an amazing addition to "jQuery" (an easy way to jQuerize custom functions to be added to the normal chain (without messing with queues) I found this example but it will act on the applied element, and I don't want that because, as I said above, all the original animations to be added to are on different elements. I also found jQuery.timing, but it looks cooler the chain-able function :) Thanks.

    Read the article

  • how do i release the auto increment serial nos that are missing

    - by mmdel
    i have a table with auto increment field and i am using transactions when inserting new data. now i find there are a few serial nos that are missing. suppose the last serial no was 475, now when i insert new row, the serial allotted to it is 481. how do i correct this. table_A fields ID(Auto increment),Name,Address table_B fields ID(Auto increment FK TO table_A ID),Tel,Fax,Email,Salesman table_C fields ID(Auto increment FK TO table_A ID),monthly_commitment mysql_query(BEGIN); $a = mysql_query("INSERT INTO table_A VALUES('','name','address')"); $b = mysql_query("INSERT INTO table_B VALUES('','tel','fax','email','salesman')"); $b = mysql_query("INSERT INTO table_C VALUES('','monthly commitment')"); if(($a) && ($b) && ($c)){mysql_query("COMMIT");} else {mysql_query("ROLLBACK");}

    Read the article

  • What is default javac source mode (assert as identifier compilation)?

    - by waste
    According to Orcale's Java7 assert guide: source mode 1.3 (default) — the compiler accepts programs that use assert as an identifier, but issues warnings. In this mode, programs are not permitted to use the assert statement. source mode 1.4 — the compiler generates an error message if the program uses assert as an identifier. In this mode, programs are permitted to use the assert statement. I wrote such class: package mm; public class ClassTest { public static void main(String[] arg) { int assert = 1; System.out.println(assert); } } It should compile fine if Oracle's info right (1.3 is default source mode). But I got errors like this: $ javac -version javac 1.7.0_04 $ javac -d bin src/mm/* src\mm\ClassTest.java:5: error: as of release 1.4, 'assert' is a keyword, and may not be used as an identifier int assert = 1; ^ (use -source 1.3 or lower to use 'assert' as an identifier) src\mm\ClassTest.java:6: error: as of release 1.4, 'assert' is a keyword, and may not be used as an identifier System.out.println(assert); ^ (use -source 1.3 or lower to use 'assert' as an identifier) 2 errors I added manually -source 1.3 and it issued warnings but compiled fine. It seems that Oracle's information is wrong and 1.3 is not default source mode. Which one is it then?

    Read the article

  • Powershell: splatting after passing hashtable by reference

    - by user1815871
    Powershell newbie ... I recently learned about splatting — very useful. I ran into a snag when I passed a hash table by reference to a function for splatting purposes. (For brevity's sake — a silly example.) Function AllMyChildren { param ( [ref]$ReferenceToHash } get-childitem @ReferenceToHash.Value # etc.etc. } $MyHash = @{ 'path' = '*' 'include' = '*.ps1' 'name' = $null } AllMyChildren ([ref]$MyHash) Result: an error ("Splatted variables cannot be used as part of a property or array expression. Assign the result of the expression to a temporary variable then splat the temporary variable instead."). Tried this afterward: $newVariable = $ReferenceToHash.Value get-childitem @NewVariable That did work and seemed right per the error message. But: is it the preferred syntax in a case like this? (An oh, look, it actually worked solution isn't always a best practice. My approach here strikes me as "Perl-minded" and perhaps in Powershell passing by value is better, though I don't yet know the syntax for it w.r.t. a hash table.)

    Read the article

  • Tabular.vim : how to align on the first occurrence of 2 different delimiters placed at the beginning of Words?

    - by ThG
    I have installed the Tabular plugin, which works very well for me, as long as there are no complicated regexes involved… But I have this list : one @abc @rstuvw &foo three @defg &bar four @mn @opq &kludge &hack twelve @hijkl &baz &quux I wish to align it that way (on @… first, then on &…) : one @abc @rstuvw &foo three @defg &bar four @mn @opq &kludge &hack twelve @hijkl &baz &quux which means I have 3 problems at the same time : align on the first occurrence of 2 different delimiters (@ and &) which are not really delimiters but "special characters" at the beginning of Words This is far beyond my understanding of both regexes and Tabular.vim How should I proceed ?

    Read the article

  • qmake translations doesn't seem to work

    - by gordebak
    I have a Qt app with a Czech translation. I can get my translation compiled and installed fine with the following code. But when I run the app, translation doesn't work. What am I missing? I even tried to chmod 644 to change the permissions of the translation file, but it didn't work either. Thanks in advance. TRANSLATIONS += cs_CZ.ts isEmpty(QMAKE_LRELEASE) { win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease unix { !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 } } else { !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease } } } updateqm.input = TRANSLATIONS updateqm.output = qm/${QMAKE_FILE_BASE}.qm updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -q qm/${QMAKE_FILE_BASE}.qm updateqm.CONFIG += no_link target_predeps QMAKE_EXTRA_COMPILERS += updateqm INSTALLS += translations translations.path = /usr/share/app translations.files = qm/cs_CZ.qm

    Read the article

  • vb Syntax error in INSERT INTO statement

    - by user201806
    im new in vb, i was create a program to connection ms access but when i run the program it get syntax error in Insert into statement, OleDbExpection was unhandled here my code Public Class Form2 Dim cnn As New OleDb.OleDbConnection Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtdate.Value = DateTime.Now cnn = New OleDb.OleDbConnection cnn.ConnectionString = "Provider=Microsoft.Jet.Oledb.4.0; Data Source=C:\Users\John\Documents\db.mdb" End Sub Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click If Not cnn.State = ConnectionState.Open Then cnn.Open() End If Dim cmd As New OleDb.OleDbCommand cmd.Connection = cnn cmd.CommandText = "INSERT INTO sr(names,add,tel,dates,prob,serv,model,snm,acc,sna,remark)" & _ "VALUES ('" & Me.txtname.Text & "','" & Me.txtadd.Text & "','" & Me.txttel.Text & "', '" & _ Me.txtdate.Text & "','" & Me.txtpro.Text & "','" & Me.txtser.Text & "','" & Me.txtmod.Text & "', '" & _ Me.txtsnm.Text & "','" & Me.txtacc.Text & "','" & Me.txtsna.Text & "','" & Me.txtrem.Text & "')" cmd.ExecuteNonQuery() cnn.Close() End Sub End Class it's there any wrong with my code?

    Read the article

  • Android: How to properly exit application when inconsistent condition is unavoidable?

    - by Bevor
    First of all I already read about all this discussion that it isn't a good idea to manually exit an Android application. But in my case it seems to be needed. I have an AsyncTask which does a lof of operations in background. That means downloading data, saving it to local storage and preparing it for usage in application. It could happen that there is no internet connection or something different happens. For all that cases I have an Exception handling which returns the result. And if there is an exception, the application is unusable so I need to exit it. My question is, do I have to do some unregistration unloading or unbinding tasks or something when I exit the application by code or is System.exit(0) ok? I do all this in an AsyncTask, see my example: public class InitializationTask extends AsyncTask<Void, Void, InitializationResult> { private ProcessController processController = new ProcessController(); private ProgressDialog progressDialog; private Activity mainActivity; public InitializationTask(Activity mainActivity) { this.mainActivity = mainActivity; } @Override protected void onPreExecute() { super.onPreExecute(); progressDialog = new ProgressDialog(mainActivity); progressDialog.setMessage("Die Daten werden aufbereitet.\nBitte warten..."); progressDialog.setIndeterminate(true); //means that the "loading amount" is not measured. progressDialog.setCancelable(false); progressDialog.show(); }; @Override protected InitializationResult doInBackground(Void... params) { return processController.initializeData(); } @Override protected void onPostExecute(InitializationResult result) { super.onPostExecute(result); progressDialog.dismiss(); if (!result.isValid()) { AlertDialog.Builder dialog = new AlertDialog.Builder(mainActivity); dialog.setTitle("Initialisierungsfehler"); dialog.setMessage(result.getReason()); dialog.setPositiveButton("Ok", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); //TODO cancel application System.exit(0); } }); dialog.show(); } } }

    Read the article

  • How security of the systems might be improved using database procedures?

    - by Centurion
    The usage of Oracle PL/SQL procedures for controlling access to data often emphasized in PL/SQL books and other sources as being more secure approach. I'v seen several systems where all business logic related with data is performed through packages, procedures and functions, so application code becomes quite "dumb" and is only responsible for visualization part. I even heard some devs call such approaches and driving architects as database nazi :) because all logic code resides in database. I do know about DB procedure performance benefits, but now I'm interested in a "better security" when using thick client model. I assume such design mostly used when Oracle (and maybe MS SQL Server) databases are used. I do agree such approach improves security but only if there are not much users and every system user has a database account, so we might control and monitor data access through standard database user security. However, how such approach could increase the security for an average web system where thick clients are used: for example one database user with DML grants on all tables, and other users are handled using "users" and"user_rights" tables? We could use DB procedures, save usernames into context use that for filtering but vulnerability resides at the root - if the main database account is compromised than nothing will help. Of course in a real system we might consider at least several main users (for example frontend_db_user, backend_db_user).

    Read the article

  • Java regex skipping matches

    - by Mihail Burduja
    I have some text; I want to extract pairs of words that are not separated by punctuation. Thi is the code: //n-grams Pattern p = Pattern.compile("[a-z]+"); if (n == 2) { p = Pattern.compile("[a-z]+ [a-z]+"); } if (n == 3) { p = Pattern.compile("[a-z]+ [a-z]+ [a-z]+"); } Matcher m = p.matcher(text.toLowerCase()); ArrayList<String> result = new ArrayList<String>(); while (m.find()) { String temporary = m.group(); System.out.println(temporary); result.add(temporary); } The problem is that it skips some matches. For example "My name is James", for n = 3, must match "my name is" and "name is james", but instead it matches just the first. Is there a way to solve this?

    Read the article

  • sqlite3 not found but it was already added as reference

    - by Joef Clarin
    System.DllNotFoundException was unhandled Message=Unable to load DLL 'sqlite3': The specified module could not be found. I already reference the DLL. I check it on Debug folder and it was there. I also search how to "include" it in the project but they don't specifically explain how to do it. I'm following this example: http://www.codeproject.com/Articles/22165/Using-SQLite-in-your-C-Application

    Read the article

  • c# short if statement not working with int? (int=null)

    - by kobe
    I am trying to shorten my code by using short-if: int? myInt=myTextBox.Text == "" ? null : Convert.ToInt32(myTextBox.Text); But I'm getting the following error: Type of conditional expression cannot be determined because there is no implicit conversion between '' and 'int' The following works: int? myInt; if (myTextBox.Text == "") //if no text in the box myInt=null; else myInt=Convert.ToInt32(myTextBox.Text); And if I replace the 'null' in integer (say '4') it also works: int? myInt=myTextBox.Text == "" ? 4: Convert.ToInt32(myTextBox.Text);

    Read the article

  • How to clear all activity in android?

    - by Sushant
    I have one main activity "Dashboard" with a action bar containing home screen icon and exit button , i go to activity A -activity B -activity C from dashboard screen . Now on C, i click on action bar dashboard icon which bring to me on Dashboard screen . Now i go to activity E -activity G-activity H from dashboard screen . From H i press exit button , it come to C screen . When again click on exit i go through me out of application. Why there is need to press 2 times exit button for exit application . On Home Screen Icon :- public void onClickHome(View view){ final Intent intent = new Intent(getBaseContext(), Dashboard.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); getBaseContext().startActivity(intent); //goDashboard(); } ON exit button :- AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(getString(R.string.logoutDialogTitle)); alert.setMessage(getString(R.string.logoutDialogMessage)); final OnlineBookApp app = (OnlineBookApp) getApplicationContext(); alert.setPositiveButton(getString(R.string.logoutDialogCancel), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }); alert.setNegativeButton(getString(R.string.logoutDialogOk), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { //finish(); //stopService(new Intent(getBaseContext(), DatabaseSyncService.class)); // // moveTaskToBack(true); //// stopService(new Intent(getBaseContext(), DatabaseSyncService.class)); // System.runFinalizersOnExit(true); // android.os.Process.killProcess(android.os.Process.myPid()); //moveTaskToBack(true); // finish(); // app.SetIsExit(true); Intent intent = new Intent(getApplicationContext(), Dashboard.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("EXIT", true); startActivity(intent); } }); alert.setNeutralButton(getString(R.string.logoutDialogLogout), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { //finish(); //stopService(new Intent(getBaseContext(), DatabaseSyncService.class)); //finish(); //app.SetIsExit(true); //stopService(new Intent(getBaseContext(), DatabaseSyncService.class)); app.logout(); Intent intent = new Intent(getApplicationContext(), Dashboard.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("EXIT", true); startActivity(intent); } }); alert.show();

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >