Questions tagged [fill]

fill refers to the process of assigning and rendering a color or pattern to the set of coordinates within the outline of a shape.

References

1838 questions
4
votes
2 answers

Fill entire 2D Array (Tetris board) with Tetris pieces, no spaces left over (Java)

Let's say I have a 2D int array.. int[][] board = new int[10][20]; public void initBoard() { for(int r = 0; r < 10; r++) for(int c = 0; c < 20; c++) board[r][c] = 0; } 0 means no piece The pieces are represented by 1-7; 1 -…
4
votes
3 answers

css h1 font-size as big as width

Is it possible to tell a h1 to size the text so it fills the full 100% width of the element? Like this. code:

FOO

BAAR

Philip
  • 6,827
  • 13
  • 75
  • 104
4
votes
3 answers

How bad is opening and closing a SQL connection for several times? What is the exact effect?

For example, I need to fill lots of DataTables with SQLDataAdapter's Fill()…
Eren
  • 284
  • 2
  • 10
4
votes
1 answer

Can one use memset to fill an array of std::complexs?

Specifically, I'm wondering if this line: memset(cjzyp,(0,0),size_cjzy*sizeof(std::complex)); will fill cjzyp, an array of complexs, with the complex zero value ((0,0)).
4
votes
1 answer

How can I change the edge line color when using the 'fill' function in Mathematica?

When using the filling function in Mathematica, I would like to change the style of the edge line in a way that it has a) the same color like the filling/no edge line b)it will be below/covered by another curve that frames the filling as an edge…
4
votes
4 answers

Initializing an integer array using memset and an int value - fails

I am writing host code for a CUDA program, so I am stuck using standard C functions. I am having a problem with initializing the elements of an integer array using the memset function. I was under the impression you could use memset to initialize…
Blake
  • 75
  • 1
  • 2
  • 10
4
votes
3 answers

How do I auto-fill lines in brackets in emacs (markdown-mode)?

I'm relatively new to Emacs, but have been experimenting with it to see if it would be worth switching. I write in Markdown and use pandoc to convert to whatever I need. In case it matters, I'm running Emacs 23.3.1 on Ubuntu 12.04. I'm a graduate…
Brian Hamilton
  • 349
  • 2
  • 7
3
votes
7 answers

2d Array in Spiral Order

I'm trying to fill an array in spiral order. So far, I can print the array in spiral order, but is there a way to modify the array so that i can fill it in spiral order and then just print the array? I'd like it to go in decreasing order like a…
Dior
3
votes
1 answer

Filling contours but leaving contained regions unfilled

I have this python code that supposedly fills the contours of an image, but leaves the holes contained in it unfilled. This is what I want: But this is what I get: I've tried specifying the contour hierarchies for filling with cv2, but I can't get…
Nico
  • 75
  • 5
3
votes
1 answer

Clear an already set "fill" property in CSS to get defaults back for an SVG

I'm using a platform that within it's own CSS it sets the fill property as so: .tatsu-svg-icon-custom svg * { fill: currentColor; } This ends up with an SVG I am adding being black in this instance - which is not helpful. This particular SVG is…
Brett
  • 19,449
  • 54
  • 157
  • 290
3
votes
2 answers

Fitting text into a fixed-size div

I have a fixed size div which I need to fill with text. I need to only fill it with as much text will fit into it, and I need to know the offset in the string where it cut off. Right now I am doing it by saving the div's current height then setting…
Seth Carnegie
  • 73,875
  • 22
  • 181
  • 249
3
votes
2 answers

Filling up histograms with ggplot - Changing colours

I am learning how to use the R and ggplot library and got stucked with the challenge to change the colour of the following Histogram! I did manage to change the full colour from the graph but it was with solid colours! I wanted to get count with…
3
votes
2 answers

What is the time complexity of new Array(n).fill('apple') in JavaScript?

I was searching for the answer to this question but was not able to find any. What is the time complexity of new Array(n).fill('apple')? For n=5, this will create an array with 5 'apple' strings: ['apple', 'apple', 'apple', 'apple', 'apple'] My…
danny jung
  • 39
  • 1
  • 1
3
votes
3 answers

R Tidyverse: Carry forward values for non existing variables

I do have a problem, that I can't seem to solve efficiently. Say the result of my loop is the following (which is made up). library(tidyverse) mytib <- tribble( ~year, ~month, ~shop_id, ~inventory, 2019, 01, "A", 200, 2019, 01, "B", 300, …
minimouse
  • 131
  • 10
3
votes
1 answer

Mixed fill color in ggplot2 legend using geom_smooth() in R

When plotting two regression curves using geom_smooth() in ggplot2, for the fill color, the legend picks the one where the confidence intervals intersect. I do think this behaviour arises when the overlapping area is proportionally bigger that the…
Sileo
  • 307
  • 2
  • 18