multiple-columns

Extract columns from text based table output

一个人想着一个人 提交于 2019-12-08 05:08:29
qfarm /load command shows me the load from my servers. Output: PS> qfarm /load Server Name Server Load Load Throttling Load Logon Mode -------------------- ----------- -------------------- ------------------ SERVER-01 400 0 AllowLogons SERVER-02 1364 OFF AllowLogons SERVER-03 1364 OFF AllowLogons SERVER-04 1000 0 AllowLogons SERVER-05 700 0 AllowLogons SERVER-06 1200 0 AllowLogons I need to display only first column (Server Name) and the second one (Server Load) and loop through them, in order to make some logic later, but it seems the powershell doesn't see it as object with properties: PS>

Binding items into ListBox multiple columns

笑着哭i 提交于 2019-12-08 03:16:52
问题 I am trying to add my data into multiple columns ListBox, I did it but I am facing a hard problem when trying to retrieve the Data from the list box. is there a way to put an object instead of text into a listBox row? <ListView Name="listBox1" ItemsSource="{Binding Items}" Margin="28,28,68,67" FlowDirection="RightToLeft" MouseDoubleClick="listBox1_MouseDoubleClick"> <ListView Name="listBox1" ItemsSource="{Binding Items}" Margin="28,28,68,67" FlowDirection="RightToLeft" MouseDoubleClick=

Xamarin.Forms multi column table GUI

﹥>﹥吖頭↗ 提交于 2019-12-08 02:32:29
问题 Is ListView the right option to create table, something like this ? Cell content is text only, but I need to be able to show something like drop down menu on cell touch with few most common options and text field for custom entry. There will be at max 80 to 100 lines data, usually much less. 回答1: ListView is indeed the best way to approximate a table. Here is an example... <ListView x:Name="listViewm" ItemsSource="{Binding MyItems}"> <ListView.Header> <Grid BackgroundColor="Black"> <Grid

R - Fill Column with values from any other columns

牧云@^-^@ 提交于 2019-12-08 02:31:16
问题 I have a data frame of 5 columns: 4 columns have values and the 1 column that is empty. I want to fill the empty column with any value from any of the 4 columns. Let's assume this is my dataframe df : Col1 Col2 Col3 Col4 Col5 11 11 2 2 2 23 4 4 15 15 I want my result to look like this: Col1 Col2 Col3 Col4 Col5 11 11 11 2 2 2 2 23 23 4 4 4 15 15 15 EDIT I applied the answers provided by everyone, but it still isn't working for some reason. If it helps, this is the dput(head(df)) of my actual

Batch - combining 3 columns of x, y, z values into 1 column without using MatLab

放肆的年华 提交于 2019-12-08 02:18:27
I have about 150 files containing 3 columns of x, y, z values and no header. x1 y1 z1 x2 y2 z2 x3 y3 z3 ... xn yn zn For our compress sensing algorithm, I need to have these values in one column only x1 y1 z1 x2 y2 z2 . . . xn yn zn How could I perform this batch operation for 150 files, without using MatLab? From my previous question , I believe this could be done by using sed . But batch processing 150 files effectively is beyond my ability. I am running on Win7 with cygwin installed. Any suggestion would be appreciated. Thank you for your help. Regards, ikel Edit: The delimiter is TAB

WPF Multicolumn Combobox

本秂侑毒 提交于 2019-12-07 21:00:33
问题 I have the following data template used for a multicolumn combo box: <DataTemplate x:Key="ShipViaKey"> <Grid Height="23" Width="Auto" ShowGridLines="False"> <Grid.ColumnDefinitions> <ColumnDefinition Width="100"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Text="{Binding Code}"/> <TextBlock Grid.Column="1" Text="{Binding Carrier}"/> </Grid> </DataTemplate> The combo box is defined like this: <ComboBox Grid.Row="0" Grid.Column="1" x:Name="CboShipVia"

One UL list split into multi columns with fixed height

↘锁芯ラ 提交于 2019-12-07 13:57:38
问题 I would like to create one UL list that will contain a variable number of LI elements. I would like the heigh of the container to be max 500px. Which means if i have more li elements that go over that 500px height i want it to turn into 2 columns. If there is more then can fit for 2 columns i would like it to turn into 3 columns. I have enough space to fix max 5 columns and the data will never go over that amount. Any idea how i can do this? Any jquery, css tricks? or do i need to handle each

R: How to change the column names in a data frame based on a specification

一曲冷凌霜 提交于 2019-12-07 13:32:18
问题 I have a data frame, the start of it is below: SM_H1455 SM_V1456 SM_K1457 SM_X1461 SM_K1462 ENSG00000000419.8 290 270 314 364 240 ENSG00000000457.8 252 230 242 220 106 ENSG00000000460.11 154 158 162 136 64 ENSG00000000938.7 20106 18664 19764 15640 19024 ENSG00000000971.11 30 10 4 2 10 Note that there are many more cols and rows. Here's what I want to do: I want to change the name of the columns. The most important information in a column's name, e.g. SM_H1455, is the 4th character of the

Datatables - Merge columns together

让人想犯罪 __ 提交于 2019-12-07 12:12:52
问题 I have these database columns, but I want them to be in one column. How would I do that? With mRender, I think? /* Address */ {"sTitle": "Address", "bVisible": true, "bSearchable": true}, /* City */ {"sTitle": "City", "bVisible": true, "bSearchable": true}, /* State */ {"sTitle": "State", "bVisible": true, "bSearchable": true}, /* Zip */ {"sTitle": "Zip", "bVisible": true, "bSearchable": true}, 回答1: provided that the columns returned by the datatables get are address, city , state, zip 1-4 if

replace the values using iflelse in R

自作多情 提交于 2019-12-07 11:05:31
问题 I have a very trivial question with the data as below : sample<-list(c(10,12,17,7,9,10),c(NA,NA,NA,10,12,13),c(1,1,1,0,0,0)) sample<-as.data.frame(sample) colnames(sample)<-c("x1","x2","D") >sample x1 x2 D 10 NA 1 12 NA 1 17 NA 1 7 10 0 9 20 0 10 13 0 Note: the number of observations with D=1 is same as D=0 Now, I want to create a variable x3 that has values related to D=0 when D=1 and values related to D=1 when D=0 . The expected output: x1 x2 D x3 10 NA 1 10 12 NA 1 20 17 NA 1 13 7 10 0 NA