In Qualtrics, how to customize timer length? - timer

I'm hoping to set up a survey in Qualtrics which will be fixed to last 30 minutes for every participant. This is due to the majority of the survey consisting of audio prompts which are played on a fixed schedule (and using timers to auto-advance to the next audio prompt).
My problem is that there are a few instances in which participants are asked to complete blocks of questions about what they just listened to, and obviously people will differ in the amount of time they take to complete these sections. I was hoping I could somehow track the time (in seconds) a participant spends on these self-report sections, then have a timer page at the end of the self-report, customized to delay participants from advancing but based on how long they took to finish the self-report.
For example, let's say after listening to blocks 1,2, and 3 (which are all timed audio), I want all participants to spend a total of 3 minutes on blocks 4,5, and 6 (which consist of self-report questions) before moving to block 7. If John finishes blocks 4,5, and 6, in 2.5 minutes, I'd then like John to wait for 30 seconds before continuing to 7. If Sally finishes blocks 4,5, and 6 in 2 minutes, I'd like her to wait 60 seconds before continuing.
Hope that makes sense, and greatly appreciate any advice!

The variable ${e://Field/Q_TotalDuration} always contains the current number of seconds since the beginning of the survey.
You can add a javascript to the last question in Block 6 where you pipe in Q_TotalDuration and hide the Next button until you hit the time limit, then show the Next button.

Related

multiple percentages at one time in solidity

hello i have found a code that can (in solidity) divide an amount 50 /50 and send it off my problem is that i need to be able to change the amounts in percentages of a whole amount and i am not sure how to go about this. to clarify i take 10 percent of a transaction and it gets sent to say a tax wallet and I need part of this say 3% to go towards a burn wallet and 2% to a mint wallet and 5% to go to lp I don't need the mint or burn function or auto lp just the method of automatically dividing it up when its deposited into the initial 10%s wallet. thank you ahead of time .
i tried searching for several hours last night and I could only find a script that did 5050 but with no percentages that i could modify on my own .

Need help finding a logical solution solving a problem

Given the variable 'points' which increases every time a variable 'player' collects a point, how do I logically find a way to reward user for finding 30 points inside a 5 minutes limit? There's no countdown timer.
e.g player may have 4 points but in 5 minutes if he has 34 points that also counts.
I was thinking about using timestamps but I don't really know how to do that.
What you are talking about is a "sliding window". Your window is time based. Record each point's timestamp and slide your window over these timestamps. You will need to pick a time increment to slide your window.
Upon each "slide", count your points. When you get the amount you need, "reward your user". The "upon each slide" means you need some sort of timer that calls a function each time to evaluate the result and do what you want.
For example, set a window for 5 minutes and a slide of 1 second. Don't keep a single variable called points. Instead, simply create an array of timestamps. Every timer tick (of 1 second in this case), count the number of timestamps that match t - 5 minutes to t now; if there are 30 or more, you've met your threshold and can reward your super-fast user. If you need the actual value, that may be 34, well, you've just computed it, so you can use it.
There may be ways to optimize this. I've provided the naive approach. Timestamps that have gone out of range can be deleted to save space.
If there are "points going into the window" that count, then just add them to the sum.

how to efficient compute multi flink stream result from one source

for example:
There is a video play log, with format as:
user_id, video_id, play_duration, video_duration, country, request_date
I want to compute:
a. number of play event in last minute
b. number of play event today
c. the top10 most popular video (be played times) in last hour
d. the top10 most active user (play times) in last hour
In above 4 tasks, they consume same source, but with three different time window.
Are there any efficient solution to fulfill these jobs without start 3 or 4 jobs to duplicate consumption.
You can have a single job that splits the stream 4 ways, and then attach one of these window operators to each of the duplicated streams. You can do the splitting with either split/select, or with side outputs.

Why is total time taken by Google Dataflow more than sum of times taken by individual steps

I am really unable to understand why is the total elapsed time for a dataflow job so much higher than time taken by individual steps.
For example, total elapsed time for the dataflow in picture is 2 min 39 sec. While time spent in individual steps is just 10 sec. Even if we consider the time spent in setup and destroy phases, there is a difference of 149 secs, which is too much.
Is there some other way of reading the individual stage timing or I am missing something else?
Thanks
According to me 2 min 39 sec time is fine. You are doing this operation reading file and then pardo and then writting it to bigquery.
There are lot of factor involved in this time calculation.
How much data you need to process. i.e - in your case I don't think you are processing much data.
What computation you are doing. i.e your pardo step is only 3 sec so apart from small amount of data pardo do not have much computation as well.
Writing it to bigquery - i.e in your case it is taking only 5 sec.
So creation and destroy phases of the dataflow remains constant. In your case it is 149 sec. Your job is taking only 10 sec that is dependent on all three factor I explained above.
Now let assume that you have to process 2 million record And each record transform take 10 sec. In this case the time will be much higher i.e 10 sec * 2 million records for single node dataflow load job.
So in this case 149 sec didn't stands in-front of whole job completion time as 149 sec is considered for all record process 0 sec * 2 million records.
Hope these information help you to understand the timing.

Where would arrays be used? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
Suppose that a fast-food restaurant sells salad and burger. There are
two cashiers. With cashier 1, the number of seconds that it takes to
complete an order of salad is uniformly distributed in
{55,56,...,64,65}; and the number of seconds it takes to complete an
order of burger is uniformly distributed in {111,112,...,,129,130}.
With cashier 2, the number of seconds that it takes to complete an
order of salad is uniformly distributed in {65,66,...,74,75}; and the
number of seconds it takes to complete an order of burger is uniformly
distributed in {121,122,...,,139,140}. Assume that the customers
arrive at random times but has an average arrival rate of r customers
per minute.
Consider two different scenarios.
• Customers wait in one
line for service and, when either of two cashiers is available, the
first customer in the line goes to the cashier and gets serviced. In
this scenario, when a customer arrives at the restaurant, he either
gets serviced if there is no line up, or waits at the end of the line.
• Customers wait in two lines, each for a cashier. The first customer
in a line will get serviced if and only if the cashier for his line
becomes available. In this scenario, when a customer arrives at the
restaurant, he joins the shorter line. In addition, we impose the
condition that if a customer joins a line, he will not move to the
other line or to the other cashier when the other line becomes shorter
or when the other cashier becomes free.
In both scenarios considered,
a cashier will only start serving the next customer when the customer
he is currently serving has received his ordered food. (That is the
point we call “the customer’s order is completed”.)
... Simulation
For
each of the two scenarios and for several choices of r (see later
description), you are to simulate the customers
arriving/waiting/getting service over a period of 3 hours, namely,
from time 0 to time 180 minutes, where you assume that at time 0 there
is no customer waiting and both cashiers are available; The entire
period of 3 hours is to be divided into time slots each of 1 second
duration. At each time slot, with r/60 probability, you make one new
customer arrive, and with 1 − r/60 probability you make no new
customer arrive. This should give rise to an average customer arrival
rate of r customers/minute, and the arrival model will be reasonably
close to what is described above. In each time slot, you will make
your program handle whatever necessary.
... Objectives and
Deliverables
You need to write a program to investigate the following.
For each of the two scenarios and for each r, you are to divide the
three-hour simulated period into 10-minute periods, and for every
customer arriving during period i (i ∈ {1,2,...,18}), compute the
overall waiting time of the customer (namely, from the time he arrives
at the restaurant to the time when his order is completed. You need to
print for each i the average waiting time for the customers arriving
during period i. Note that if a customer arriving in period i has not
been served within the three-hour simulated period, then his waiting
time is not known. So the average waiting time for customers arriving
in this period cannot be computed. In that case, simply print “not
available” as the average waiting time for that period.
So, this program deals with hours, minutes, and seconds.
Would it be best to make a three-dimensional array as such:
time[3][60][60]
A total of three hours, with 60 minutes within, with 60 seconds within.
Alternatively, I was thinking that I should make a "for-loop" with this structure:
for (time=0;t<10800;t++)
Every iteration of this loop will represent one second of the three hour simulation (3hx60mx60s=10800 seconds).
Am I on the right track here guys? Which method is more plausible. Are there other arrays that are critical for this program?
Help is appreciated, as always!
It's almost always best to have your internal representation of time be in seconds; you'll have a much easier time working with your for loop than with a three-dimensional array. One nice convention is to write it as
MAX_SECONDS = 3 * 60 * 60
for (t=0;t<MAX_SECONDS;t++)
The data structure to look into for this project is, appropriately enough, a queue. This can be implemented using arrays, but will require some extra work.

Resources