r,ggplot2,mathematical-optimization,minimize,maximize

This is called the diet problem and it is a popular introduction to linear programming (see, e.g., the first Google hit I found for the diet problem). Linear programming solvers through packages such as lpSolve can be used to solve many variants of the diet problem. For instance, consider the...

c#,wpf,xaml,fullscreen,maximize

You posted the answer on the MSDN forum, but not here, so here it is; The solution is to set the ResizeMode=NoResize when going to fullscreen. It seems that the AllowTransparency=True still has the regular border from the window, but just hides it, so when you maximize it tries to...

The reason is that you are setting MaxWidth to be too small when it's maximized. If the window is maximized, the size of Window will be 1382 x 744 (in order to "go to fullscreen". That's basically (1366 + 2*ClientWIndowEdges) x (768 - some amount stripped away from titlebar and...

java,swing,parent-child,minimize,maximize

The solution is using topFrame.setExtendedState(JFrame.MAXIMIZED_BOTH); instead of setState. Setstate only sets the state of the current frame, because i needed the parent frame i needed to use setExtendedState. Also missed some booleans to maximize/minimize when needed....

java,resize,jframe,jpanel,maximize

On resize the panel is immediately accepting the new preferred dimensions in updatePanelSize(), but on maximize/restore the panel is apparently ignoring the new preferred dimensions. I've added a call to revalidate(), to force the panel to update in those cases where it hasn't applied the new preferred dimensions. public void...

algorithm,tree,dynamic-programming,maximize

Lets say dp[u][select] stores the answer: maximum sub sequence sum with no two nodes having edge such that we consider only the sub-tree rooted at node u ( such that u is selected or not ). Now you can write a recursive program where state of each recursion is (u,select)...

r,optimization,solver,maximize,lpsolve

What if you added something similar to the way you did the roles to con? If you add t(model.matrix(~ Team + 0, DF)) you'll have indicators for each team in your constraint. For the example you gave: > con <- rbind(t(model.matrix(~ Role + 0,DF)), t(model.matrix(~ Team + 0, DF)), rep(1,nrow(DF)),...

kendo-ui,window,double-click,maximize,kendo-window

This is not a nice solution but might work, try toggling back to the previous size: // Window definition var win = $("#win1").kendoWindow({ width: "300px", height: "100px", title: "Window 1", actions: [] }).data("kendoWindow"); $(document).on('dblclick','.k-window-titlebar',function(e){ // Restore old size win.toggleMaximization(); }); ...

r,loops,intervals,mathematical-optimization,maximize

This optimization problem is essentially going to be impossible for any optimizer (such as optimize()) that assumes the objective function is smooth and has a single minimum. You didn't give a reproducible example, but here's an example of an objective function that's just about as ugly as yours: set.seed(101) r...

c#,forms,winforms,window,maximize

The best way to solve this I found is to use the RestoreBounds structure. When a window is maximized, RestoreBounds will refer to the old (non-maximized) size and position. Here is the code to find out these values. Simply save these values upon closing, and then when the program is...

Fairly simple when you write it down. Rephrasing the problem, you want to find the largest element to the right of each element. Now given the first example, this is: [1, 5, 3, 2, 7, 9, 4, 3] => [9, 9, 9, 9, 9, 4, 3] Now, notice the maximums...

c#,wpf,combobox,focus,maximize

There's something very strange going on with your Margin/Height/Width values. I'd strongly suggest that you start using grid rows and columns. In the long run you'll find that everything resizes and works much better in XAML when you do. Here's an update the tab control in your window. <TabControl Name="myTabControl"...

It sounds like you want a "3 column" interface where you have a TreeView on either side and Buttons in the middle to allow movement between the two. Assuming this is correct, you can accomplish your automatic resizing by using a TableLayout. Essentially, it would be like this: Add a...

matlab,function,optimization,maximize

Both your functions return a vector of values whereas fminunc requires that the function returns a scalar / single value. The error is pretty clear. The function fminunc is trying to find the best solution that minimizes a cost function, so what you need to supply is a cost function....

vb.net,taskbar,maximize,windows-taskbar,maximize-window

Use the form's Load event to set its maximum size, like this: Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.MaximumSize = Screen.FromRectangle(Me.Bounds).WorkingArea.Size End Sub Maximizing it now restricts the size to the monitor's working area, which is the monitor size minus the taskbars....