quit

openssl hangs and does not exit

别等时光非礼了梦想. 提交于 2019-11-30 01:22:26
I am trying to use openssl to get a certificate, and it seems to keep hanging. I have done a lot of research but not all of the available options seem to work on Windows. openssl s_client -showcerts -connect google.com:443 > cert.txt I have tried this: openssl s_client -connect xyz:443 < quit.txt > cert.txt Where quit.txt contains "quit\n" from http://bytes.com/topic/php/answers/8802-automate-openssl-s_client-command-batch-php-script That did not work. I also looked at Openssl s_clinet -connect scripting. Force quit help I have also tried -prexit I have also looked into this as well and can't

Android - Perfect solution for quitting or terminating an application programmatically?

北城余情 提交于 2019-11-29 18:15:56
If my app encounters a particular error, I want to end my app without any trace of it remaining in the system. I have already seen many threads on this topic, specially these two. Is quitting an application frowned upon? How to quit android application programmatically The answers are great but the proposed solutions are too tedious and/or unnecessarily complex. Taking a cue from Neil Traft's answer in the first post above, I have found a perfect solution for such scenarios. System.exit(0) or android.os.Process.killProcess(android.os.Process.myPid()) both seem to work if you have only one

save variables after quitting application?

独自空忆成欢 提交于 2019-11-28 19:28:33
I want some variables to be saved, when I shut down my app and to load them after opening the app (for statistics in a game) How can I do this? EDIT: Here my code: TextView test1; String punkte = "15"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); SharedPreferences save = getSharedPreferences(punkte, 0); save.edit().putString("score", punkte); SharedPreferences load = getSharedPreferences(punkte, 0); String points = load.getString("score", "0"); test1 = (TextView) findViewById(R.id.test1); test1.setText(points); }

How to abort an interactive rebase if --abort doesn't work?

天涯浪子 提交于 2019-11-28 16:06:32
问题 I've got myself into a muddle via an interactive rebase, and I now wish to abort it. (i.e. go back to the point before I was dropped into interactive rebase mode, in my case via git pull --rebase .) The way to do this seems to be via git rebase --abort , but this doesn't work: $ git rebase --abort error: Ref refs/heads/master is at 55b388c141b1485b1acd9e050dbeb0eb90ef2ee7 but expected b918ac16a33881ce00799bea63d9c23bf7022d67 fatal: Cannot lock the ref 'refs/heads/master'. Could not move back

Android - Perfect solution for quitting or terminating an application programmatically?

▼魔方 西西 提交于 2019-11-28 14:12:03
问题 If my app encounters a particular error, I want to end my app without any trace of it remaining in the system. I have already seen many threads on this topic, specially these two. Is quitting an application frowned upon? How to quit android application programmatically The answers are great but the proposed solutions are too tedious and/or unnecessarily complex. 回答1: Taking a cue from Neil Traft's answer in the first post above, I have found a perfect solution for such scenarios. System.exit

does dealloc method being executed normally when quitting the application?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 13:56:11
I use code like the following (inside my appController.m for example) to do some cleanup when my application terminates... - (void) dealloc { [myObject release]; // myObject 's dealloc will not be called either !!! [arraySMSs release]; [super dealloc]; } This method never get called when the app quits! Why ? Is there a better place to do my clean up ? The fact that is not called addresses memory-leak issues ? Or the OS does take care of clean up ? Thank you... There is no reason for the system to ensure that every object is individually deallocated upon application termination. Doing so is

What is the correct way to programmatically quit an MFC application?

人走茶凉 提交于 2019-11-28 09:46:42
Using windows MFC C++. I have a third party app that calls a user-defined method in my CWinApp derived class. This method is called after InitInstance(). If there is an error in this method, such that an exception is thrown and caught in a try/catch block, I would like to exit the application from the catch block. What is the canonical and correct way to quit? UPDATE: Serge I believe is right that in InitInstance() returning false is the correct way to quit the application. However, now suppose I want to quit from a CDialog derived class's OnInitDialog() handler, what's the correct way to do

Correct way to quit a Qt program?

邮差的信 提交于 2019-11-28 03:21:44
How should I quit a Qt Program, e.g when loading a data file, and discovered file corruption, and user need to quit this app or re-initiate data file? Should I: call exit(EXIT_FAILURE) call QApplication::quit() call QCoreApplication::quit() And difference between (2) and (3)? QApplication is derived from QCoreApplication and thereby inherits quit() which is a public slot of QCoreApplication , so there is no difference between QApplication::quit() and QCoreApplication::quit() . As we can read in the documentation of QCoreApplication::quit() it "tells the application to exit with return code 0

save variables after quitting application?

北城以北 提交于 2019-11-27 12:30:04
问题 I want some variables to be saved, when I shut down my app and to load them after opening the app (for statistics in a game) How can I do this? EDIT: Here my code: TextView test1; String punkte = "15"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); SharedPreferences save = getSharedPreferences(punkte, 0); save.edit().putString("score", punkte); SharedPreferences load = getSharedPreferences(punkte, 0); String