minimize

How do I detect when my window is minimized with wxPython?

大城市里の小女人 提交于 2019-12-10 13:47:34
问题 I am writing a small wxPython utility. I would like to use some event to detect when a user minimizes the application/window. I have looked around but did not find an event like wx.EVT_MINIMIZE that I could bind to. Anyone know of a way that can be used to detect this? 回答1: Add a handler for the wx.EVT_ICONIZE event. 来源: https://stackoverflow.com/questions/890170/how-do-i-detect-when-my-window-is-minimized-with-wxpython

Minimize activity on back key press

北城以北 提交于 2019-12-10 03:26:38
问题 OnBack Key press i want to minimize the application, How can i do this??? public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { //Here i want to put minimize code.. pls give me this statement return true; } return super.onKeyDown(keyCode, event); } Thanks 回答1: public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { this.moveTaskToBack(true); return true; } return super.onKeyDown

Is it possible to minimize the console in python with the standard librairy (without extra module)?

余生长醉 提交于 2019-12-09 18:48:08
问题 I wrote a program that uses the console. Most of the time, the user must see the console informations. For a specific function from command line, I would like to run the script without the console rises. I just don't want see the window but it can be in the task bar. I know I can use extra modules (gui, win32,..) to do that but I would like to use the standard python librairy. Is it possible to do that? The program should run on Windows. (python 2.7) I specify... I know I can use pythonw.exe

How to use an HTML minifier with underscore templates

只愿长相守 提交于 2019-12-09 16:38:15
问题 I have some templates for my frontend code, like: <div class="row"> <div class="my-header col-md-1"> <!-- comments --> {{ title }} </div> <div class="my-container col-md-11"> {% if (content) { %} {{ content }} {% } else { %} <p>Empty</p> {% } %} </div> </div> And I'm using grunt-contrib-jst to store them all in a single file and then on another build step will be included in a single JS file and that file is pushed to the CDN. This part is working perfectly, but I want to use the

How to minimize a function over one input parameter in R

假装没事ソ 提交于 2019-12-09 04:44:38
问题 Suppose I have a function that is defined as following myFunction = function(input1, input2, input3) { # do something with input and then return } and now I want to minimize myFunction over only the first input, namely, input1 , while fixing the other parameters. In R, it seems that there are some prepacked functions like nlm , optim , etc. But the documentation doesn't really explain how to do the problem above. For example, it seems that optim can only minimize a function over only 1 input?

minimize vb.net forms to mdiparent bottom eg. adobe photoshop

笑着哭i 提交于 2019-12-08 12:53:03
问题 vb.net 2008 I have 1 mdiparent and many child forms. on clicking minimize button of child form it should minimize and display at the botton of mdiparent and not in taskbar. like in adobe photoshop. Is it possible to do? if yes how? 回答1: You need to set the child Form's MdiParent Property to your MdiContainer. This example assumes two Forms one named Form1 and the other named Form2. All properties are being set programmatically. Public Class Form1 Public Sub New() InitializeComponent() Me

Minimizing a system windows form in tray in C# without seeing it hanging where taskbar

旧巷老猫 提交于 2019-12-08 10:28:48
问题 this.ShowInTaskbar = false; this.WindowState = FormWindowState.Minimized; //this.visible = false (Hotkeys stop working forever but the grey rest of the form would disappear from above taskbar) ReRegisterHotkeys(); I use the code above to minimize my application with a tray icon. Now the minimized rest of my form hangs still in the left right corner a little above the taskbar where the start button resides. Visible is only the forms grey titlebar with the little "x" to close it and its caption

Add-in makes Excel crash when starting minimized

。_饼干妹妹 提交于 2019-12-08 07:35:45
问题 I start Excel from within my C# WinForms application using Process.Start(...) (this has a reason). I want to start it in background, without distracting the user, so I try to start it minimized or hidden. In both cases, I experience a very weird behavior: After some seconds, Excel restores the window (even makes it visible if it's hidden) and then crashes saying: "Microsoft Office Excel has encountered a problem and needs to close. (Win XP crash message.)" The same thing happens if I start

scipy.optimize with SLSQP. 'Singular matrix C in LSQ subproblem'

﹥>﹥吖頭↗ 提交于 2019-12-08 07:12:46
问题 I'm trying to minimize a dot product of 2 vectors but it doesn't work and I have no idea why. Can someone please help me? I have a matrix c of this form: c = [[c11, c12, c13, c14, c15], [c21, c22, c23, c24, c25]] I want to get a matrix p of this form: p = [[p11, p12, p13, p14, p15], [p21, p22, p23, p24, p25]] I want to maximize this value : c11*p11 + c12*p12 +c13*p13 + c14*p14 + c15*p15 + c21*p21 + c22*p22 +c23*p23 + c24*p24 + c25*p25 To get that I convert the c and p to 1-D vector and do the

scipy.optimize.minimize keep track of objective function

送分小仙女□ 提交于 2019-12-08 05:26:41
问题 I'm working with scipy.optimize.minimize , and I'm optimizing 3 parameters with a function like this def foo(A, x, y, z): test = my_function(A[0], A[1], A[2], x, y, z) return test In this answer I found some insight: How to display progress of scipy.optimize function? So I came up with this function: def callbackF(Xi, x, y, z) global Nfeval print '{0:4d} {1: 3.6f} {2: 3.6f} {3: 3.6f} {4: 3.6f}'.format(Nfeval, Xi[0], Xi[1], Xi[2], foo(Xi, x, y, z)) Nfeval += 1 So my code will look like this