Questions tagged [measure]

Measuring means to determine how big is a certain entity. In computing, it's often referred to calculating the size(s) of a screen.

Measuring means to determine how big is a certain entity. In computing, it's often referred to calculating the size(s) of a screen.

936 questions
14
votes
6 answers

Why is my android custom view not square?

I created a custom view to display a gameboard for a game I'm developing. The gameboard needs to be a square at all times. So with and height should be the same. I followed this tutorial to achieve this. I added the following code to my custom…
Peter Fortuin
  • 5,041
  • 8
  • 41
  • 69
13
votes
1 answer

addOnLayoutChangeListener vs addOnGlobalLayoutListener vs post(Runnable r)

PROBLEM: Suppose we have simple case: we have view and we have to show some data on this view. We use static method showData(View view) to do this. I want to know the exact moment when view layout is measured and I can access getWidth() getHeight()…
comte1986
  • 149
  • 1
  • 5
12
votes
2 answers

How to measure execution time of a cucumber step

I'm looking for a way to measure the execution time of my cucumber steps. Using the junit format I managed to get some data about the execution time of the features and scenarios, but I would like to see the times of the steps inside the scenarios…
Zsolt
  • 1,464
  • 13
  • 22
11
votes
3 answers

How to apply one signature test to multiple positionals

I wrote some code in https://github.com/p6steve/raku-Physics-Measure that looks for a Measure type in each maths operation and hands off the work to non-standard methods that adjust Unit and Error aspects alongside returning the new value: multi…
librasteve
  • 6,832
  • 8
  • 30
11
votes
2 answers

Dstat CPU usage for one specific process

Is it possible to measure the CPU and memory for one specific process with dstat? There is possiblilities to measure the most consuming CPU with --top-cputime but is it possible to measure a specific one? I want to write to a file with --output to…
user4647247
11
votes
6 answers

Measure String inside RichTextBox Control

Can somebody please explain how I would go about measuring the string inside a richtextbox control so that the I can automatically resize the richtextbox control according to its content? Thank you Edit: I've thought about it, and since the below…
anon271334
10
votes
3 answers

Measure time, milliseconds or microseconds for Windows C++

How do you measure the execution time in milliseconds or microseconds in Windows C++? I found many method one calling time(NULL), but it measures time in seconds only and the seconds clock() (clock_t) measure CPU time, not the actual time. I found…
user3617694
  • 143
  • 1
  • 1
  • 8
9
votes
4 answers

Add native footer view to webview

I have a WebView and a native custom view I want to add underneath the WebView. I've tried wrapping the WebView inside a ScrollView, and while that does exactly what i want, the scrolling performance is really laggy and if a user flings the scroll…
AndroidNoob
  • 2,771
  • 2
  • 40
  • 53
8
votes
1 answer

measure() doesnt work properly with dynamic layouts and textView - Android

I want to convert a RelativeLaout view into a Bitmap. I've tried another answers and different options without success. My XML View is kind of: ----RelativeLayout -------ImageView -------TextView Every ones have wrap_content measures. As i need…
CROM87
  • 81
  • 1
  • 3
8
votes
3 answers

Measure in DAX to calculate YTD for chosen month only for Power BI

How to construct DAX measure to calculate sum of YTD value for specific month? Here we have FactTable grouped by months. FactTable is filled with both Actual data and Forecast data. The only way to know when Actual end is information in table [Cut…
Przemyslaw Remin
  • 6,276
  • 25
  • 113
  • 191
8
votes
1 answer

How to get text width when multiple spannable setting

I set span for spannableText and set it to TextView. After i want get width and height of this text. But the result does not take into account the change in the size of the text due to the set span. Next solution is work incorrect. return…
7
votes
2 answers

measuring text on scaled canvas

I've been struggling with text measuring and scaled canvases. When the canvas is unscaled, getTextBounds and measureText deliver accurate results. However, when the canvas is scaled both methods do not deliver results that match the actual size of…
P.Melch
  • 8,066
  • 43
  • 40
7
votes
5 answers

measure time in a function in C

I'm debugging an C application and I'd like to know how much time it spends in a particular function. I could change the source code and add some more code to do the measurement, but it doesn't seem right to me. I'd rather do it with external…
juzna.cz
  • 324
  • 3
  • 10
7
votes
3 answers

How to measure the execution time of an asynchronous function in nodejs?

I'm trying to get the execution/response time of an asynchronous function that executes inside a node-fetch operation, like the following async function getEditedData() { var a = await fetch(`https://api.example.com/resorce_example`); …
7
votes
7 answers

What's a good measure for classifying text documents?

I have written an application that measures text importance. It takes a text article, splits it into words, drops stopwords, performs stemming, and counts word-frequency and document-frequency. Word-frequency is a measure that counts how many times…
bodacydo
  • 75,521
  • 93
  • 229
  • 319
1
2
3
62 63