size

How do I make the black bars on the side of an HTML5 Video on iPad disappear?

大憨熊 提交于 2019-12-05 12:34:16
I'm working on a WebApp that is supposed to run mostly on iPads. The App plays several videos and has some interactive components as well. My problem is cosmetic: even though the HTML5 Video Tag works fine, the custom controls that I've created control the video/audio playback just fine, for the life of me I can't figure out how to make the black bars on the side of the video disappear. The embedding is completely standard: <video id="video" src="./video/video.mp4" width="1024"></video> I just want the damn video to be exactly as wide as the iPad screen, but no matter what size I specify,

How to automatically adjust the TextView height according to the size of the String?

一世执手 提交于 2019-12-05 12:32:15
I want to know how to automatically adjust the size of the TextView according to the length of the String . I am getting some data from another Intent as a String and storing it in a TextView . If I leave it small, the whole text won't fit and only half of it is displayed. If I leave a big space for the TextView it does not look nice on the screen. The solution I found online was using extends TextView and using this method gives errors in my class and I have to change a lot of functions because of this Use a multi-line TextView and set layout_height to wrap_content : <TextView android:layout

How to get the size of a range in Excel

此生再无相见时 提交于 2019-12-05 12:19:32
问题 Using VBA, is it possible to get the size of a given range in terms of pixels or units? (I don't care which unit as I am only using it to relate to other measurements with the same unit). Thanks. 回答1: The overall dimensions of a range are in its Width and Height properties. Dim r As Range Set r = ActiveSheet.Range("A4:H12") Debug.Print r.Width Debug.Print r.Height 回答2: The Range object has both width and height properties, which are measured in points. 来源: https://stackoverflow.com/questions

String memory usage in Golang

倖福魔咒の 提交于 2019-12-05 11:39:24
I was optimising a code using a map[string]string where the value of the map was only either "A" or "B". So I thought Obviously a map[string]bool was way better as the map hold around 50 millions elements. var a = "a" var a2 = "Why This ultra long string take the same amount of space in memory as 'a'" var b = true var c map[string]string var d map[string]bool c["t"] = "A" d["t"] = true fmt.Printf("a: %T, %d\n", a, unsafe.Sizeof(a)) fmt.Printf("a2: %T, %d\n", a2, unsafe.Sizeof(a2)) fmt.Printf("b: %T, %d\n", b, unsafe.Sizeof(b)) fmt.Printf("c: %T, %d\n", c, unsafe.Sizeof(c)) fmt.Printf("d: %T,

C89: signed/unsigned mismatch

丶灬走出姿态 提交于 2019-12-05 11:12:21
Are signed/unsigned mismatches necessarily bad? Here is my program: int main(int argc, char *argv[]) { unsigned int i; for (i = 1; i < argc; i++) { // signed/unsigned mismatch here } } argc is signed, i is not. Is this a problem? "signed/unsigned mismatches" can be bad. In your question, you are asking about comparisons. When comparing two values of the same base type, but one signed and one unsigned, the signed value is converted to unsigned. So, int i = -1; unsigned int j = 10; if (i < j) printf("1\n"); else printf("2\n"); prints 2, not 1. This is because in i < j , i is converted to an

Resize QStackedWidget to the page which is opened [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-05 10:33:31
This question already has answers here : Qt QStackedWidget Resizing Issue (3 answers) Closed 5 years ago . I want my QStackedWidget to resize to the page which is opened. I got a lot of widgets attached to the first page, but the rest pages have only one button. So they stay so big, and the first page is ok. How can I make my QStackedWidget to have the size of the page being viewed. The reason why i want to do this is that I have three different options, and after that I have other things. If I change to the mode where there is a button and then a lot of white space, I don´t see why doesn´t it

setSize not influencing size of button

こ雲淡風輕ζ 提交于 2019-12-05 10:17:59
I have a sample code : import java.awt.*; import javax.swing.*; import javax.swing.border.BevelBorder; public class AWT extends JFrame { public static void main(String[] args) { final JFrame frame = new JFrame(); frame.setPreferredSize(new Dimension(600, 450)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBackground(Color.green.darker()); Button btn_1 = new Button("Button 1"); btn_1.setBackground(Color.green.darker()); btn_1.setSize(40, 100); Button btn_2 = new Button("Button 2"); btn_2.setBackground(Color.green.darker()); btn_2.setSize(40, 100); Button btn_3 = new Button(

Which would make a Class file bigger? import java.awt.*, or a bunch or single import statements? [duplicate]

我只是一个虾纸丫 提交于 2019-12-05 10:13:38
This question already has answers here : Why using a wild card with a Java import statement bad? (14 answers) Closed 6 years ago . Okay, so if I had a project that used: import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Dimension; import java.awt.Font; import java.awt.Color; import java.awt.Polygon; Would it make the Class file smaller to use: import java.awt.* I'm thinking against it because I'm importing a lot of things I don't need. I'm thinking for it cause it makes the file have a lot less characters. Kent Boogaart No difference. These are a compile-time construct only

iphone : sizeWithFont method does not identify the '\\n' from string

只愿长相守 提交于 2019-12-05 10:08:50
I am using below code to calculate the size for the label for a string. NSString * str = @"It's \n that \n don't \n"; CGSize size = [str sizeWithFont:[UIFont fontWithName:@"Verdana" size:12.5] forWidth:300 lineBreakMode:UILineBreakModeWordWrap]; NSLog(@"Height : %f Width : %f ",size.height,size.width); But id does not consider \n characters from the string to change the line. When I display this string on a label and set it numberOfLines property to some 4 or 5 , label does consider the \n and go to the next line. How can I calculate the height for the lable considering the \n's from the

HSQLDB and .lobs file size

那年仲夏 提交于 2019-12-05 09:34:08
I'm using a HSQLDB database in Java which stores files in a column defined as a BLOB. When I add a table row with a file/BLOB to my table the .lobs file increases in size of the file/BLOB. When I add another file to my table it increases in size again (2 x BLOB size). So, I implemented a test method which iterates 10 times and writes the same file to my table and deletes it right after the insert. Now, my .lobs file is 10 x file size... even though I've deleted all the table rows which contained the file. I've tried to execute CHECKPOINT DEFRAG but nothing happens. The .lobs file stay the same