The ex unit is not proportional on iOS - ios

I have noticed this strange issue on iOS.
On jsFiddle, 1ex equals 7px. You would assume that 10ex would be 70px. But it is actually 71px!
jsFiddle
The output on iOS7 iPad:
7 // 1ex in px
14
21
28
35
42
50
57
64
71 // 10ex in px
On Chrome and IE11, I confirmed that they are proportional.
I used getBoundingClientRect() so these values shouldn't be rounded. But the only reason I can think of is that they are indeed rounded values. Is this a bug?
I hope it is not "just because that's how the browser works". Because of this inconsistency, I'm having trouble calculating width of some components.

Related

gnuplot plot xy cspline with data points in order

Here is a minimum example:
set xrange [31:42]
set yrange [3.5:6.5]
set nokey
plot "-" using 2:3 smooth cspline
2015 34 4
2016 41 5
2017 40 6
2018 32 6
The result looks nice but ignores the time series:
minimal example using splot instead of plot:
set view map
splot "-" using 2:3:1 with line
2015 34 4
2016 41 5
2017 40 6
2018 32 6
The result is correct but does not look nice:
How can I smooth this as in the first example?
My solution: Make gnuplot output a complex graph without this troublesome non-monotonic curve to a LaTeX2e picture, draw this curve separately using the LaTeX2e TikZ package, and edit the picture to include the curve in the correct position and scale.
\addplot[smooth] coordinates {
(34,4)
(41,5)
(40,6)
(32,6)
}

WKInterfaceGroup spacing not perfectly 0 sometimes (WatchKit)

I set up a group in my WatchApp Storyboard which has a width relative to container 1 and height relative to container 0.5.
Inside this group I have 20 horizontal aligned groups with a width relative to container 0,05. The spacing of the group is set to 0 but when i set a background color to all groups I end up like this.
As you can see, some spacings are really zero but sometimes there is a small gap of about 1 px. Is this some sort of bug? Is it possibile to perfectly align the groups so that it looks like it is one solid background?
Please don't tell me, that I can set the background color of the first group. Obviously I know that, i need it to work like this!
Thanks!
I believe the problem is that the width of the screen isn't evenly divisible by 20. The width of the 42mm screen is 312 pixels, which divided by 20 is 15.6 pixels. Apple is probably truncating this to an integer value for performance, which results in the gaps.
I reproduced your problem and then, to test my theory, I created 8 groups instead of 20 and set them to a width of 0.125. This resulted in no gaps, which makes sense since 312 is divisible by 8.
The 32mm watch has a width of 272 pixels and, doing factorization of the two I got:
272 = 2 * 2 * 2 * 2 * 17
312 = 2 * 2 * 2 * 3 * 13
Which shows that eight columns is the maximum by which you can evenly divide both sizes.
If you have to have 20 columns, then I would set each to a fixed width, some at 15 and some at 16 pixels for the 42 mm, and 13/14 pixels for the 32 mm to get the layout you want.

JIRA 5 logo size issue

In JIRA 5
Administration -> System -> User Interface -> Look And Feel
when I changing logo with image size 57x30px (width/height)
Text from page: "The height of the logo image will be constrained to a maximum of 30 px.
Also, it is recommended to use an image with a 57 px width."
its displayed on jira page with size 187x40px (width/height) and looks very blurry.
How can I fix this? (disable logo stretches)
For those interested in Jira 6.4 and confluence 5.8...
In JIRA, the image size you want (without scaling) will be 30px tall. Any image height taller than 30 will be scaled to 30. JIRA automatically puts padding on your image 5 top 5 bottom...for total of 40 pixels high. JIRA will allow you to do an image wider than 57...it pushes the menu over..at least in the default theme.
In Confluence, for some reason the authors decided 5 pixels was not enough padding. So, they added 3 more. Top and bottom. For a total of 16 pixels of padding.
Yes, the confluence tag line below the image upload says, "limit to 48 pixels tall", but this is a lie. if you make it 48px tall, it will be scaled to 24 px tall. Then the 16 pixels of padding is added for a total hight of 40px.
I will be checking on Stash/Bamboo in the future.

Jasper report margins larger than what is set

I have a jasper report set to portrait letter, which, in pixel terms, translates to 612 x 792 in iReport. I have the left margin set to 17 pixels and the right set to 10. That leaves the single column width at 585 with no spacing.
Now, I have two vertical lines that are used to form the report's border, and they're positioned at x-coordinates 0 (for the left bar) and 585 (for the right). When this reported is executed, the resultant PDF looks perfectly fine. However, when I go to print, the two vertical lines are missing, and I have to select shrink to fit (which sets the zoom to 94% and displays everything).
I've done some experimenting, and, without shrinking the report at print time, the vertical lines need to be positioned at x-coordinates 2 (for the left) and 575 (for the right) in order to display, which translates into essentially an x-margin of 19 pixels. Playing around some more, if I set the left margin to 19, the left vertical bar displays at print time when positioned at x-coordinate 0.
Is something else setting the margins at 19 pixels aside from the jasper report itself? I can't find any culprits in the report itself that seem to be responsible for the discrepancy. Any help is greatly appreciated.
Most printers can't print up to the edge of a page. It sounds like you are hitting this limit. The print driver is detecting that the PDF doesn't fit inside the printer's printable area and allows you to shrink the content to fit what the printer supports.
This is just a guess. In my reports I use the Background-Band in iReport and draw a rectangle for the background of my reports.

Determine media size from ppd file

Ive got Dymo labelwriter 400. It works like a charm with a glabels on ubuntu. I am currently writing software to create automatic labels. for that I need to know the size of the png I want to print.
The paper I use is: Large Address, which is 89x36mm.
When I create and print such an image it is not taking the whole label. It is in fact 2/3 of the label size.
In ppd I found such thing:
*PageSize w102h252/30321 Large Address: "<</PageSize[102 252]/ImagingBBox null>>setpagedevice"
I imagine 102 252 is a size. I created such png in gimp, still is too small.
How can I determine what size should the image have to fit the label?
The size will be in points (72nds of an inch). For example, 8.5 x 11 (letter) size paper is shown as
<</PageSize[ 612 792 ] /ImagingBBox null>>setpagedevice
102 = 1.4 inches or 36mm
252 = 2.5 inches or 89mm

Resources