Jeremy

Forum Replies Created

Viewing 15 posts - 256 through 270 (of 1,522 total)
  • Author
    Posts
  • in reply to: test.selected() for multiple options #9710
    Jeremy
    Keymaster

    Hi Nasim,

    When you use and on a test command, its success and failure will be executed in response to the conjunction, not to the main test alone

    One workaround is to embed each test inside a higher-up conjunction, eg:

    .wait( 
        newFunction( ()=>true ).test.is(true)
            .and( getScale("scale1").test.selected().failure(
                newText("required1").css({position:"relative",bottom:"270px"}).bold().color("red").print()
            ) )
            .and( getScale("scale2").test.selected().failure(
                newText("required2").css({position:"relative",bottom:"270px"}).bold().color("red").print()
            ) )
    )

    Jeremy

    Jeremy
    Keymaster

    Hi,

    1+3) You’ll need to split row.context at each <br> so you get a list of each line separately, so you can print one line on the page then use a Key element to wait for a keypress, then print the next line, wait for a keypress again, etc. If you want an alignment like you describe, you’ll need to use a table HTML element, which is not directly implemented as a PennController element, so you’ll need to use javascript to inject it in the page:

    newKey("next", " ")
    ,
    newText("context", "
    ").print() , ...row.context.split("
    ").map( line => [ newFunction(()=>{ const tableRow = document.createElement("tr"); const speaker = document.createElement("td"); const speech = document.createElement("td"); speaker.innerText = line.replace(/^([^:]+:).+$/,"$1").replace(/\n/gi,''); speech.innerText = line.replace(/^[^:]+:/,"").replace(/\n/gi,''); tableRow.append(speaker); tableRow.append(speech); document.querySelector("#context").append(tableRow); }).call() , getKey("next").wait() ] ).flat()

    2) You can add custom CSS to control visual rendering. In the case of the piece of code above, I’d suggest you target the table with something like this in global_z.css:

    table#context tr {
      padding-bottom: 0.5em;
    }
    table#context tr td {
      padding-right: 0.5em;
    }
    

    Jeremy

    in reply to: getting variable from csv, based on a text in a column #9705
    Jeremy
    Keymaster

    Hi Anna,

    I know we’ve already addressed these points by email, but I’ll post answers here too in case someone finds this post and wants answers

    1. It’s actually better to reserve Var elements for values that will only get set upon runtime. Column values are all preset (since they come directly from a pre-existing table) so using the javascript ternary conditional operator is to be preferred:

        newText("top", row.TOP).color(row.Coloring_code=="TOO" ? "blue" : "black"),
        newText("left", row.LEFT).color(row.Coloring_code=="OLO" ? "blue" : "black"),
        newText("right", row.RIGHT).color(row.Coloring_code=="OOR" ? "blue" : "black"),
    

    2. Including SetCounter("counter", "inc", 1); in your experiment will increase the counter earlier than by default, but the new value concerns the next participant: the current run will keep the same counter value that was assigned when the page was open. However, nothing guarantees that the next participant will indeed complete the experiment, and so you still risk ending up with unbalanced group assignments in your results. At the end of the day, there’s no way to *automatically* ensure you’ll have a balanced distribution, which is why the recommended method is to recruit participants using the server.py?withsquare=N method described int the tutorial, so you can easily manually control group assignment

    Jeremy

    in reply to: Lists randomization #9703
    Jeremy
    Keymaster

    All you need is to make sure you have the exact same possible values across the two tables. If you replace all the 1-digit group values from both tables with numbers starting with 5 then you could achieve that, as long as you don’t introduce another space character in front of 5 in one of the two tables

    The other solution would be to open the study table in a text editor (for example, the editor on the farm) and delete the space character in front of all the 1-digit group values

    Jeremy

    in reply to: Maze: comprehension question only in some trials #9700
    Jeremy
    Keymaster

    Hi Mandy,

    Apparently the way I wrote the success and failure commands, they don’t accept arrays of commands; instead, they require a comma-separated list of commands. Just add ... before ( row.QuestYN =="Y" ? [ to tell the script to coerce the arrays into a comma-separated list, like this: ...( row.QuestYN =="Y" ? [

    Jeremy

    in reply to: Lists randomization #9699
    Jeremy
    Keymaster

    Hi Yev,

    Your two tables to have 16 groups each, but only 7 groups are shared by the two tables (10,11,12,13,14,15,16). The other 9 groups are different:  1 (study) vs 1 (test),  2 (study) vs 2 (test), etc.

    Because   (the space character) comes before any digit in the alphabetical order, the second possible value of group for example in the study table is  2, but 10 in the test table (because 1 comes before 2 and 0 comes before 1). So any participant running with a counter value of 2 (or modulo 2) will be assigned group  2 from the study table, and group 10 from the test table

    Jeremy

    in reply to: Impossible to download results #9692
    Jeremy
    Keymaster

    Hi Casey,

    There shouldn’t be any need to pause data collection: as I said, incoming results are stored in memory until the operation completes. And as a matter of fact, that operation has just completed as I started typing this message anyway. That being said, I see a few results-saving tasks in the “retry set” of the database, so let me know if there are submissions you were expecting today that you don’t see appear in the next couple hours

    Other than that, you should now be able to access your results normally (I, for one, was just able to download a results file of 9k+ lines within a few seconds). Let me know if the issue persists or reoccurs

    Thank you,
    Jeremy

    in reply to: Impossible to download results #9690
    Jeremy
    Keymaster

    Hi everyone,

    Thank you for letting me know about this, and sorry for the inconvenience. Despite yesterday’s maintenance operation, the issue with accessing the results file persists because of the very important number of rows stored in the database. The fact that many people tried to access their results file in parallel after today’s announcement only made matters worse, unfortunately

    I am working on it, but be aware that will not be able to get the number of submissions (or the rows themselves) for some time, since I started an operation that blocks access to the rows of the database. For the same reason, incoming results will not immediately be added to the database, but they will be kept in memory to be added once the operation completes

    Thank you for your understanding,
    Jeremy

    in reply to: Server issues? #9682
    Jeremy
    Keymaster

    The mailing list consists of all the (non-manually unsubscribed) email addresses associated with an account on the farm. Double-check your email address in your profile under “Request change of email address” > “New email address”; if it’s incorrect, enter your current password in “Confirm your password” and your new email address in the appropriate field, and click “Send request” under that field

    Jeremy

    in reply to: Help with recording audio? #9679
    Jeremy
    Keymaster

    Hi,

    Amazon offers an “AWS Free Tier” plan which gives you free access to S3 and Lambda for 12 months. The PCIbex documentation has a page that describes how to send recordings to S3

    However, as you’ve probably noticed, the farm is suffering serious problems these days, so it’s unfortunately not the best time to set up a project on it

    Jeremy

    in reply to: Server issues? #9678
    Jeremy
    Keymaster

    Hello,

    The farm has been undergoing severe slowdowns for the past few days that cause many requests to fail. In case you haven’t received the general announcement that was sent to the mailing list, I am copying it below

    Apologies for the inconvenience,
    Jeremy

    Dear PCIbex Farm Users,

    As many of you will already have noticed, the farm is unfortunately continuing to experience massive slow-downs or be inaccessible. We are still investigating the cause of this, and hope to have an update soon. For the moment, we recommend pausing data collection and results retrieval. Rest assured that there is no reason to worry about projects or data you have on there, the current issues are just a matter of access, so there’s no risk of data loss.

    While we will try to get things back up and running ASAP, this may take a few days. We appreciate your patience and understanding!

    Best,
    Florian & Jeremy

    in reply to: loading the preview experiment #9672
    Jeremy
    Keymaster

    Hello,

    The problem comes from empty file greetings.csv, which causes the experiment’s loading step to crash. Fill the file and the experiment works again

    Jeremy

    in reply to: Problems downloading data #9671
    Jeremy
    Keymaster

    Hi,

    I have just restarted the servers, so the situation should be better for now. You can try to download your results again, and if it keeps hanging for more than 3 minutes, you should just refresh the page and try again. Unfortunately I haven’t identified or addressed the core of the problem yet, so the problem will likely surface again soon, in which case downloading the results will stall at times when the farm is overloaded with requests

    Apologies for the inconvenience,
    Jeremy

    in reply to: code doesn't get updated despite the 'saved' message #9670
    Jeremy
    Keymaster

    Hi Yev,

    I just restarted the servers, so the situation should be better now. I am still working on identifying and addressing the core problem though, so expect instability in the next few days

    Apologies for the inconvenience,
    Jeremy

    in reply to: Pick out items after randomization #9661
    Jeremy
    Keymaster

    Hi Nianpo,

    So, your Sequence line is Sequence( randomize(startsWith("Long") , randomize(startsWith("Short") ))), which corresponds to what I originally included in my post; what you included in your post, Sequence( rshuffle(startsWith("Short") , rshuffle(startsWith("Long") ))) does include “Short” trials

    There is a typo in the former, which I since corrected by editing my post, where the closing parenthesis of the first randomize only comes after the second randomize, effectively ignoring that one and thus just including the randomized “Long” trials. The line you want to use is Sequence( randomize(startsWith("Long")) , randomize(startsWith("Short")) )

    Jeremy

Viewing 15 posts - 256 through 270 (of 1,522 total)