width

Constant bar width in a barplot array in R

╄→尐↘猪︶ㄣ 提交于 2019-12-09 03:38:46
问题 I am trying to make a (1 row, 3 column) array of barplots that all have the same bar width . All three bar plots have a different number of observations and hence the width of the bars end up different for each plot (i.e. plot with the most observations has the narrowest bars and the plot with the fewest observations has the widest bars). I understand from the barplot {graphics} R documentation that, "Specifying a single value will have no visible effect unless xlim is specified" However, my

how to get number of characters in line in console that my process is bind to?

不打扰是莪最后的温柔 提交于 2019-12-09 02:02:05
问题 Rephrasing my question: width of a console in term of characters. This in windows is set by default to 80 but user can change it, how to get this value ? 回答1: You can use the GetConsoleScreenBufferInfo function. CONSOLE_SCREEN_BUFFER_INFO csbi; if(!GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)) { // an error occourred cerr<<"Cannot determine console size."<<endl; } else { cout<<"The console is "<<csbi.srWindow.Right-csbi.srWindow.Left<<" wide."<<endl; } 来源: https:/

100% Height & Width of container div tag not working

只愿长相守 提交于 2019-12-08 21:15:02
问题 I have a following layout of my web page. Following CSS code gives me 100% Height & Width in Internet Explorer 9. While same does gives me 100% width in FF & Chrome but not 100% height. I tried several example most of them have the same issue. I have use same code on http://jsfiddle.net/cwkzq/3/ here if i view same it FF it gives me 100% height as well as width. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> html, body { height: 100%;

android layout resizing parent without resizing the childs

走远了吗. 提交于 2019-12-08 19:14:39
问题 TLDR version: When I resize the parent: Explanation: in an android application, I have a parent layout and inside it multiple relative layouts. <LinearLayout android:id="@+id/parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" > <RelativeLayout android:id="@+id/child1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/transparent"> </RelativeLayout>

Responsive media query not working in Google Chrome

爷,独闯天下 提交于 2019-12-08 15:25:58
问题 I have written a piece of CSS code to fluidly switch my site layout's width based on the user's screen width. If the user has less screen estate available, the layout's width increases to fill more of the window and leave less whitespace, and if they have more space, the layout shrinks to maintain an appealing look. I use the following code to achieve this: #bg{ background:-webkit-linear-gradient(90deg, #0f0f0f 0%,#222222 400px); background:-moz-linear-gradient(90deg, #0f0f0f 0%,#222222 400px

Is there a way to set width of <input type='file'/> for showing in Firefox?

爷,独闯天下 提交于 2019-12-08 14:53:55
问题 All the CSS attributes apply to the <input type='file'/> don't work on FF, but work on most other browsers. Just can't even set the width. Any solution? No JS please. 回答1: Have you set the size attribute? <input type="file" name="datafile" size="40"> Firefox doesn't support setting the size via CSS. 回答2: I wouldn't have a clue if anyone still finds this thread, but just in case... input[type="file"] { max-width: 100%; } ...worked for me. Cuts the overlap off, but at least it doesn't over- or

Calculating the width of an element?

若如初见. 提交于 2019-12-08 14:00:06
问题 I'm trying to get the width of a div so that I can echo it out in php. Can anyone give me a pointer as how to achieve this? Basically, I'm wanting to develop a 'responsive' <div> which will display the width of the parent <div> in php in a responsive template. Obviously, in different window sizes, the responsive template changes width size and I just need to find a way to output this width and echo it out in php. JQuery is already running in the background, so I could tap into that... Just

opencv error: assertion failed (size.width>0 && size.height>0) in unknown function line 261

筅森魡賤 提交于 2019-12-08 13:34:41
问题 This is my code: #include<opencv\cv.h> #include<opencv\highgui.h> using namespace cv; int main(){ //create matrix to store image Mat image; //initialize capture VideoCapture cap(0); cap.open(0); //create window to show image namedWindow("window",1); while(1){ //copy webcam stream to image cap>>image; //print image to screen imshow("window",image); //Error line //delay 33ms waitKey(33); } } The error I get: opencv error: assertion failed (size.width>0 && size.height>0) in unknown function file

Dynamic Content For Jquery Marquee - Dynamic Width Also?

∥☆過路亽.° 提交于 2019-12-08 11:44:45
问题 I'm adding dynamic content from a database to a marquee I found online. The problem is - the content length varies widely and the script needs a set, static width for it to work properly. I either need to figure out a way to generate the width while I'm pulling the content, or to have the script auto generate width for items. It's a very to the point script I found on here actually. Here's a JSFiddle to see how it works. For those who don't like JSFiddle here's some simple html/css <h1>This

div not floating along the preceding div with float property set to left

倖福魔咒の 提交于 2019-12-08 09:12:43
问题 Which CSS rules explain the following sceanrio: Assuming I have the following HTML CSS snippets HTML: <div id="main"> <div id="first"> first div float left </div> <div id="second"> second div does not have a float property set and appears in a new line instead of next to the first div </div> </div> CSS: #first float: left What I am wondering about is, why the second div floats next to the first div, only when its width is set. If I replace the second div with a paragraph, it also floats next