minimize

Structure of inputs to scipy minimize function

前提是你 提交于 2019-11-27 11:49:31
I have inherited some code that is trying to minimize a function using scipy.optimize.minimize . I am having trouble understanding some of the inputs to the fun and jac arguments The call to minimize looks something like this: result = minimize(func, jac=jac_func, args=(D_neg, D, C), method = 'TNC' ...other arguments) func looks like the following: def func(G, D_neg, D, C): #do stuff jac_func has the following structure: def jac_func(G, D_neg, D, C): #do stuff What I don't understand is where the G input to func and jac_func is coming from. Is that somehow specified in the minimize function,

Disabling Minimize & Maximize On WinForm?

匆匆过客 提交于 2019-11-27 11:24:20
WinForms have those three boxes in the upper right hand corner that minimize, maximize, and close the form. What I want to be able to do is to remove the minimize and maximize, while keeping the close. I also what to make the close minimize the form instead of closing it. How can this be done? The Form has two properties called MinimizeBox and MaximizeBox , set both of them to false . To stop the form closing, handle the FormClosing event, and set e.Cancel = true; in there and after that, set WindowState = FormWindowState.Minimized; , to minimize the form. Bind a handler to the FormClosing

How do I put a Java app in the system tray?

随声附和 提交于 2019-11-27 06:01:44
I have a little control-panel, just a little application that I made. I would like to minimize/put the control-panel up/down with the systemicons, together with battery life, date, networks etc. Anyone that can give me a clue, link to a tutorial or something to read? Michael Myers As of Java 6, this is supported in the SystemTray and TrayIcon classes. SystemTray has a pretty extensive example in its Javadocs: TrayIcon trayIcon = null; if (SystemTray.isSupported()) { // get the SystemTray instance SystemTray tray = SystemTray.getSystemTray(); // load an image Image image = Toolkit

Minimize a window in WPF?

大城市里の小女人 提交于 2019-11-27 05:41:31
问题 How do you minimize a window programmatically when using windows WPF ? I can seem to find a .Resize attribute? 回答1: set WindowState = WindowState.Minimized; 回答2: You are looking for the Window.WindowState property. It is a dependancy property and when changed will set the Window.RestoreBounds property , so you can always restore to the size before the change. See the enumeration here. myWindow.WindowState = WindowState.Minimized; 回答3: this.WindowState = WindowState.Minimized; 回答4: For those

Qt hide minimize, maximize and close buttons

陌路散爱 提交于 2019-11-27 03:20:57
问题 Do you know how to hide minimize, maximize and close buttons of title bar in Qt. I especially need to hide it on QMainWindow. 回答1: Set this window flags Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint Note, that on some platforms it behaves in different way. For example on Mac OS X it Disables, (not hides) close/minimize/maximize buttons 回答2: If you are using Qt qml then, to remove minimize, maximize and close button, set the frameless window flag in the window function in your

Minimizing all open windows in C#

心不动则不痛 提交于 2019-11-26 22:04:52
I saw this C++ code on a forum which minimizes all open windows #define MIN_ALL 419 #define MIN_ALL_UNDO 416 int main(int argc, char* argv[]) { HWND lHwnd = FindWindow("Shell_TrayWnd",NULL); SendMessage(lHwnd,WM_COMMAND,MIN_ALL,0); Sleep(2000); SendMessage(lHwnd,WM_COMMAND,MIN_ALL_UNDO,0); return 0; } How can I access the FindWindow and SendMessage API function and the HWND type in C#.net? PInvoke.net is your friend :-) using System; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]

How to hide a JFrame in system tray of taskbar

主宰稳场 提交于 2019-11-26 19:56:05
I'd created a JFrame and want to hide in taskbar (in windows not visible right in the bottom but hidden in the tray menu items ). Can anybody tell me how to do that? Did I need to make some changes in System settings of windows ? for example, you might have seen some download managers , team viewer , 4shared desktop , etc. are hide in taskbar's tray menu items. Mohammad Faisal import java.awt.*; import java.awt.event.*; import javax.swing.JFrame; import javax.swing.UIManager; /** * * @author Mohammad Faisal * ermohammadfaisal.blogspot.com * facebook.com/m.faisal6621 * */ public class

What do you use to minimize and compress JavaScript libraries? [closed]

走远了吗. 提交于 2019-11-26 19:35:57
What do you use to minimize and compress JavaScript libraries? I use YUI Compressor . Seems to get the job done well! I've used YUI Compressor for a long time and have had no problems with it, but have recently started using Google Closure Compiler and had some success with it. My impressions of it so far: It generally outperforms YUI Compressor in terms of file size reduction. By a small amount on simple mode, and by a lot on advanced mode. Simple mode has so far been as reliable as YUI Compressor. Nothing I've fed it has shown any problems. Advanced "compilation" mode is great for some

PyQt4 Minimize to Tray

不打扰是莪最后的温柔 提交于 2019-11-26 19:20:00
问题 Is there a way to minimize to tray in PyQt4? I've already worked with the QSystemTrayIcon class, but now I would like to minimize or "hide" my app window, and show only the tray icon. Has anybody done this? Any direction would be appreciated. Using Python 2.5.4 and PyQt4 on Window XP Pro 回答1: It's pretty straightforward once you remember that there's no way to actually minimize to the system tray. Instead, you fake it by doing this: Catch the minimize event on your window In the minimize