multiple-columns

Bootstrap 3 responsive columns of varying heights

本小妞迷上赌 提交于 2019-12-01 07:31:11
问题 EDIT The pricing tables' content will all be dynamically generated, I cannot predict their height, I'm simply using the 400px case for the diagram. So I can't set a static height to each column as a fix. I have 8 pricing tables They are all similar heights close to 400px, with the largest (red square) being 430px and the smallest at a height of 390px. Responsive class for columns: class="col-lg-3 col-md-4 col-sm-6" HTML layout: <div class="row"> <% columns.each do |column| %> <div class="col

data frame lookup value in range and return different column

泄露秘密 提交于 2019-12-01 07:04:31
I have two data frames and wish to use the value in one ( DF1$pos ) to search through two columns in DF2 (DF2start, DF2end) and if it falls within those numbers, return DF2$name DF1 ID pos name chr 12 chr 542 chr 674 DF2 ID start end annot chr 1 200 a1 chr 201 432 a2 chr 540 1002 a3 chr 2000 2004 a4 so in this example I would like DF1 to become ID pos name chr 12 a1 chr 542 a3 chr 674 a3 I have tried using merge and intersect but do not know how to use an if statement with a logical expression in them. The data frames should be coded as follows, DF1 <- data.frame(ID=c("chr","chr","chr"), pos=c

How to constuct a column of data frame recursively with pandas-python?

喜夏-厌秋 提交于 2019-12-01 05:11:22
Give such a data frame df : id_ val 11111 12 12003 22 88763 19 43721 77 ... I wish to add a column diff to df , and each row of it equals to, let's say, the val in that row minus the diff in the previous row and multiply 0.4 and then add diff in the previous day: diff = (val - diff_previousDay) * 0.4 + diff_previousDay And the diff in the first row equals to val * 4 in that row. That is, the expected df should be: id_ val diff 11111 12 4.8 12003 22 11.68 88763 19 14.608 43721 77 ... And I have tried: mul = 0.4 df['diff'] = df.apply(lambda row: (row['val'] - df.loc[row.name, 'diff']) * mul + df

data frame lookup value in range and return different column

末鹿安然 提交于 2019-12-01 04:23:03
问题 I have two data frames and wish to use the value in one ( DF1$pos ) to search through two columns in DF2 (DF2start, DF2end) and if it falls within those numbers, return DF2$name DF1 ID pos name chr 12 chr 542 chr 674 DF2 ID start end annot chr 1 200 a1 chr 201 432 a2 chr 540 1002 a3 chr 2000 2004 a4 so in this example I would like DF1 to become ID pos name chr 12 a1 chr 542 a3 chr 674 a3 I have tried using merge and intersect but do not know how to use an if statement with a logical

CSS 3 animation “transform: scale” on column element doesn't work on chrome

放肆的年华 提交于 2019-12-01 03:46:38
问题 I encounter an issue in Chrome v44, I tried to zoom in on the image in item of column with a "transform: scale(1.1)", the animation doesn't work… And if I try on firefox it works well! I think the problem is due to chrome but I'd like to know if someone found a workaround. .column-wrap { columns: 3; } .column-item { background-color: red; } .column-img-wrap { margin: 0; overflow: hidden; } .column-img { display: block; max-width: 100%; height: auto; transform: scale(1); transition: transform

Java sort based on two columns

我的未来我决定 提交于 2019-12-01 03:38:23
Lets say I have table like this: String | Int1 | Int2 "foo" 5 0 "faa" 4 1 "zaa" 0 1 "zoo" 4 2 "laa" 4 3 "loo" 1 4 What I would like to get is table like this: String | Int1 | Int2 "foo" 5 0 "laa" 4 3 "zoo" 4 2 "faa" 4 1 "loo" 1 4 "zaa" 0 1 First thing that happens is sort based on column Int1 . Second thing that happens is sort of based on column Int2 but only on rows that have same numbers in column Int1 How should I approach this problem without using any database engine? You'd normally do this with a List<Item> where Item is a type containing all three values ("foo", 5, 0 for the first row,

How to make div same height as parent (displayed as table-cell)

懵懂的女人 提交于 2019-12-01 02:05:48
I got a container div containing three child divs (vary in content) - each as tall as the tallest one. I managed this by setting the container to display:table and the child divs to display:table-cell etc. Everything worked just fine, until... I inserted a new div inside one of the child divs and tried to make it height:100% - so it would stretch to the same height as its parents, but that did not work. Please see my JSFiddle: http://jsfiddle.net/bkG5A/ Any help would be greatly appreciated! HTML <div class="container"> <div class="child"> a<br />a<br />a </div> <div class="child"> a<br />a<br

Multiple columns to UITableView in iOS

∥☆過路亽.° 提交于 2019-12-01 00:38:36
I am loading data into an array from MySQL, and I would like to populate them in UITableCiew . How can I add multiple columns (in my case 4) to UITableView ? I was able to load the row data but I do not understand how I can divide it up into columns. Is UICollectionView an option? If it is, how can I go about it? Quamber UICollectionView is available in Available in iOS 6.0 and later and therefore cannot be used if you want to support earlier version. And as per your requirement you need to display a GridView So to support earlier versions and get other cool features you can use other

How to efficiently find the ideal column count for strings of a certain width?

柔情痞子 提交于 2019-11-30 23:06:39
问题 I have n strings of different length s 1 , s 2 , …, s n that I want to display on a terminal in c columns. The terminal has a width of m characters. Each column i has a certain width w i which is equal to the width of the longest entry in that column. Between each pair of columns there is a certain amount of space s . The total width of all columns including the space between cannot be larger than the width of the terminal ( w 1 + w 2 + … + w c + ( c - 1 ) · s ≤ m ). Each column shall contain

awk search column from one file, if match print columns from both files

孤街醉人 提交于 2019-11-30 21:04:33
I'm trying to compare column 1 from file1 and column 3 from file 2, if they match then print the first column from file1 and the two first columns from file2. here's a sample from each file: file1 Cre01.g000100 Cre01.g000500 Cre01.g000650 file2 chromosome_1 71569 |655|Cre01.g000500|protein_coding|CODING|PAC:26902937|1|1) chromosome_1 93952 |765|Cre01.g000650|protein_coding|CODING|PAC:26903448|11|1) chromosome_1 99034 |1027|Cre01.g000100 |protein_coding|CODING|PAC:26903318|9|1) desired output Cre01.g000100 chromosome_1 99034 Cre01.g000500 chromosome_1 71569 Cre01.g000650 chromosome_1 93952 I've