Questions tagged [dimension]

In physics and mathematics, the dimension of a space or object is informally defined as the minimum number of coordinates needed to specify any point within it. In the dimensional modeling, a dimension is a table in a star schema of a data warehouse. It is collection of reference information about measurable event. Dimensions categorize and describe data facts and measures in way that support meaningful answers to business questions.

Dimension table

A dimension is a table in a Star Schema or Snowflake schema of a data warehouse. It is collection of reference information about measurable event. These events are known as facts and stored in a fact table. Dimensions categorize and describe data warehouse facts and measures in way that support meaningful answers to business questions. They form the core of dimensional modeling.

Dimensions provide the "who, what, where, when, why, and how" context surrounding a business process event. Every dimension table has a single primary(surrogate) key. The primary key is embedded as a foreign key in any associated fact table. Dimension tables are usually wide, flat denormalized for analyzing data.

Links

782 questions
6334
votes
32 answers

What is the difference between px, dip, dp, and sp?

What is the difference between the units of measure px, dip, dp, and sp?
422
votes
10 answers

Load dimension value from res/values/dimension.xml from source code

I'd like to load the value as it is. I have two dimension.xml files, one in /res/values/dimension.xml and the other one in /res/values-sw360dp/dimension.xml. From source code I'd like to do something like…
Héctor Júdez Sapena
  • 5,329
  • 3
  • 23
  • 31
109
votes
6 answers

1D Number Array Clustering

So let's say I have an array like this: [1,1,2,3,10,11,13,67,71] Is there a convenient way to partition the array into something like this? [[1,1,2,3],[10,11,13],[67,71]] I looked through similar questions yet most people suggested using k-means…
E.H.
  • 3,271
  • 4
  • 19
  • 18
67
votes
3 answers

Inconsistency when setting TextView font size in code and in resources

The official documentation does not seem to answer this, or I can't figure it out. Element (nevermind the AlertDialog, it happens on any TextView as well): TextView tv = (TextView) dialog.findViewById(android.R.id.message); Inconsistency. Case…
davidcesarino
  • 16,160
  • 16
  • 68
  • 109
56
votes
6 answers

Value equals to match_parent or fill_parent in dimens.xml?

Based on here on XML Attributes section I specify following in my dimens.xml: -1dp @dimen/match_parent
Rendy
  • 5,572
  • 15
  • 52
  • 95
55
votes
6 answers

Difference between android dimension: pt and dp

The documentation says that 160 dp (density-independent) equals 1 inch. And 72 pt is also 1 inch. So I don't see why android define a dp measurement while it seems to work the same as points. Can anybody explain that? Why should I use dp if I can…
Herbert
  • 559
  • 1
  • 5
  • 3
43
votes
2 answers

How to see rectangular marquee selected area size without cropping it ? in photoshop cs 5

How can i see rectangular marquee selected area size without cropping it ? It is very easy in paint.net but i have to do in photoshop cs 5. While selecting an area i should be able to see the dimensions of selected area. How can i do that ? Also…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
33
votes
1 answer

Measuring text width/height without rendering

Is there any way to get an estimate for text width without rendering the actual elements? Something like canvas TextMetrics? Case: I need to estimate element heights for ReactList. To do that I'd need to know roughly how much space the text elements…
Seppo420
  • 2,041
  • 2
  • 18
  • 37
22
votes
3 answers

How do I set the size of the visible area of a form, minus heading and borders?

I would like to set my form to be exactly 300*300 excluding heading and borders. If I use Size property, it does include these values. Is there any way how to do it?
Mocco
  • 1,183
  • 2
  • 12
  • 25
22
votes
3 answers

Android get layout height and width in a fragment

I am working on a fragment and I want to get the dimension of a layout contained in the xml fragment layout. When I try the code RelativeLayout myLayout = view.findViewById(R.id.myLayout); myLayout.getHeight(); it returns 0. I need these…
lory105
  • 6,112
  • 4
  • 31
  • 40
19
votes
3 answers

Calculate Euclidean distance between 4-dimensional vectors

Let's say I have two 4-dimensional vectors (i.e. a and b) as follows: a = {a1, a2, a3, a4} b= {b1, b2, b3, b4} How do I compute the Euclidean distance between these vectors?
user3583442
  • 209
  • 1
  • 2
  • 4
18
votes
3 answers

Dimension, Only changing the width/height

How do I only change the width or height of a component that requires a Dimension object? Currently I do it like this: jbutton.setPreferredSize(new Dimension(button.getPreferredSize().width, 100)); But I have a feeling that I'm doing it the wrong…
Patrick
  • 351
  • 1
  • 4
  • 15
18
votes
4 answers

Android - ConstraintLayout percentage using dimens

There is a question How to make ConstraintLayout work with percentage values? and its answers show how to use the percentages:
17
votes
2 answers

How to get screen's physical size (i.e. in inches)?

I'm trying to figure out how to get the physical dimensions of a device's screen via Javascript. So far, my conclusion is that it's currently impossible, but I hope someone can prove me wrong :). So far I have tried to get this information by…
Felix
  • 88,392
  • 43
  • 149
  • 167
16
votes
11 answers

How to tell if current running Apple Watch size/dimension is 38mm or 42mm?

We know that there are two screen sizes for Apple Watch: 38mm and 42mm. The WKInterfaceDevice class provides a readable property named screenBounds. I wrote an extension for WKInterfaceDevice, trying to add a method to detect current device…
tounaobun
  • 14,570
  • 9
  • 53
  • 75
1
2 3
52 53