grid

Plotting a 3d data read from a file using mayavi

蓝咒 提交于 2020-01-16 04:28:27
问题 I have a data file in the following format: x y z f(x) f(y) f(z) I want to plot it using contour3d of mayavi: def fill_array(output_array,source_array,nx,ny,nz,position): for i in range(nx): for j in range(ny): for k in range(nz): output_array[i][j][k] = source_array[i][j][k][position] nx = 8 ny = 8 nz = 8 ndim = 6 x = np.zeros((nx,ny,nz)) y = np.zeros((nx,ny,nz)) z = np.zeros((nx,ny,nz)) fx = np.zeros((nx,ny,nz)) fy = np.zeros((nx,ny,nz)) fz = np.zeros((nx,ny,nz)) data_file = np.loadtxt(

Assignment Algorithm

你说的曾经没有我的故事 提交于 2020-01-15 20:20:00
问题 I need to assign N entities (each with possible parents and possible children) to M computation nodes while satisfying the following optimization conditions: Children of an entity want to be assigned to the same computation node (to maximize data locality among siblings) The distribution of entities should be as even as possible (i.e. no overtaxing of a single node). I'm looking for some suggestions on heuristic methods to solve this problem. I've read http://en.wikipedia.org/wiki/Assignment

Assignment Algorithm

£可爱£侵袭症+ 提交于 2020-01-15 20:19:49
问题 I need to assign N entities (each with possible parents and possible children) to M computation nodes while satisfying the following optimization conditions: Children of an entity want to be assigned to the same computation node (to maximize data locality among siblings) The distribution of entities should be as even as possible (i.e. no overtaxing of a single node). I'm looking for some suggestions on heuristic methods to solve this problem. I've read http://en.wikipedia.org/wiki/Assignment

Delphi XE5 FireMonkey TstringGrid cells don't accept keyboard input

旧街凉风 提交于 2020-01-15 15:57:30
问题 I am using a TStringGrid which is placed on a popup (TPopup). when the user click a button the popup will appear with the stringGrid. user will then insert some data in the cells then clicking an apply button on the popup which will update a data array. the popup is used as a metro style flyout as per firemonkey sample. the problem is that the string grid appears put when trying to edit a cell it doesn't accept any input from the key board. Any idea how to solve this problem. I am using

How to generate a word search grid that enables words using the same letter

时光总嘲笑我的痴心妄想 提交于 2020-01-15 15:26:58
问题 I'm trying to make a word-search grid with a list of given words. My problem is that some of the words don't appear properly. I have updated the code, see below I have tried to fix the previous error and now I am getting an out of range error that i cant fix, if anyone can help I would appreciate Note 1: I didnt include all the program functions, if required I will include them later The program takes in a text file like this: 9 9 white black blue green pink yellow red grey purple where the

CSS: How to let overflowing grid items not affect the defined grid?

拜拜、爱过 提交于 2020-01-15 10:17:42
问题 Consider the following 4 columns grid: .container { width: 400px; height: 200px; position: relative; } .grid-columns { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-column-gap: 30px; z-index: -1; } .grid-column { background-color: #ddd; } .columns { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); grid-column-gap: 30px; } .column { background-color: rgba(0, 0, 255, 0.5);

Ag-Grid : How to get the focused cell value

孤街醉人 提交于 2020-01-14 09:19:05
问题 How to get the focused cell value at the time focussing on the cell by using the keyboard arrow keys 回答1: You can either get the focused cell by using var focusedCell = gridOptions.api.getFocusedCell(); or use the onCellFocused event. Both give you the following properties: rowIndex: number column: Column Use the row-index to retrieve the row-node: var row = gridOptions.api.getDisplayedRowAtIndex(rowIndex); After that you can use those properties to retrieve the raw value of the cell: var

WPF Grid Column MaxWidth not enforced

血红的双手。 提交于 2020-01-14 08:59:53
问题 This problem stems from not being able to get my TextBlock to wrap. Basically as a last-ditch attempt I am setting MaxWidth on my container grid's columns. I was surprised to find that my child label and textbox still do whatever they want (bad children, BAD) and are not limited by my grid column's MaxWidth="200". What I'm really trying to do is let my TextBlock fill available width and wrap if necessary. So far after trying many variations of HorizontalAlignment="Stretch" on every known

vertical scrollbar in ExtJS GridPanel

半世苍凉 提交于 2020-01-14 07:15:15
问题 I'm working on a project where I have a single GridPanel on a page. The panel can display any number of rows and I have the autoHeight property set, which causes the GridPanel to expand to fit the number of rows. I now want a horizontal scrollbar because on some resolutions not all columns get displayed (and I cannot reduce the number of columns). If I set the autoHeight I have no horizontal scrollbar, if I do not set it and set a fixed height I have a horizontal scrollbar but the GridPanel

Powershell - Close Out-GridView after specific time

家住魔仙堡 提交于 2020-01-14 07:00:30
问题 I want that a Out-GridView closes after a specific time, e.g after 10 seconds. Not used to the windows powershell. Any answer helps. 回答1: Unfortunately, PowerShell doesn't natively offer finding and closing arbitrary GUI windows, but you can use the Add-Type cmdlet with ad hoc-compiled C# code that in turn uses P/Invoke declarations to access the Windows API. The following is a working example: It defines a distinct window title to use for the Out-GridView call so that the window can be