samsanto

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • in reply to: .zip file problems #6888
    samsanto
    Participant

    Cache problem. yikes. I think I’m good now! Thanks for all your help, I really appreciate it.

    -S

    in reply to: .zip file problems #6886
    samsanto
    Participant

    Yes, done! Thank you.

    in reply to: .zip file problems #6884
    samsanto
    Participant

    Yeah, my experiment is on the PCIbex Farm. Here’s the demo link:
    https://farm.pcibex.net/r/mRRSNl/

    I’m not sure if this is helpful, but when I run the study from your demonstration link, it works perfectly fine. When I downloaded a copy of your experiment and upload it to my account, I get all the aforementioned errors and it does not run… not sure if that is relevant?

    in reply to: .zip file problems #6882
    samsanto
    Participant

    So I guess I’m confused why it would work for you, but not me?

    I get the timeout error when I try to click https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip (the connection is not secure even though its https?)

    The zip downloads successfully when I go to just https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip (no www)… however when I try to do PreloadZip("https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip") in my study code (no www) I get the No ‘Access-Control-Allow-Origin’ header is present error… I’m not sure where I’m going wrong here. I tried running the code you posted above that you stated worked for you and its not working on my end (because no www).

    in reply to: .zip file problems #6880
    samsanto
    Participant

    Hi Jeremy,

    I was having the same problems as above where I was getting the following error: Access to XMLHttpRequest at ‘https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip from origin ‘https://farm.pcibex.net’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

    I changed https://hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip to https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip and that solved the above error, but I still cannot access my zipped resources.

    It seems like preloading my zip file goes fine, however, when I “check preloaded” I do not actually see anything in my debugger log to indicate the filed were loaded. Then, when it reaches the point in my experiment when I actually try to access the resources, I see the “Please wait, resources are loading…” message before the experiment crashes altogether with the following three errors:

    1. PennController.js:65 Uncaught (in promise) DOMException: The element has no supported sources.
    2. PennController.js:65 Uncaught Error: InvalidStateError: Failed to read the ‘responseText’ property from ‘XMLHttpRequest’: The value is only accessible if the object’s ‘responseType’ is ” or ‘text’ (was ‘arraybuffer’).
    at XMLHttpRequest.n.onreadystatechange (PennController.js:65)
    3. PennController.js:65 http://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT

    Below is the section of code where I load my zip:

    
    PennController.PreloadZip("https://www.hjpatt-136.umd.edu/Web_Experiments/Slevc/spr/sprAudio.zip");
    PennController.CheckPreloaded();
    
    

    Let me know if you have any ideas or need more information… Thanks for your help!

    -Sam

    in reply to: Display timer as countdown #6771
    samsanto
    Participant

    Thanks so much Jeremy! This is exactly what I needed.

    in reply to: Priming in reading-aloud experiment #6124
    samsanto
    Participant

    Hi Jeremy,

    Jumping in here… I know this post is relatively recent, but I just want to double check that there is no way for the new MediaRecorder to detect when a participant begins speaking after the recorder begins?

    I need to do something along the lines of calculating a “points” system if the participant responds within 500ms of the recorder beginning or not (+1/-1 if successful or not)… as of now I don’t think this is something feasible without outside analysis tools (like Praat as you suggested above?)

    Let me know if anything has changed!

    Thanks,
    Sam

    in reply to: RegExp Help #6062
    samsanto
    Participant

    perfect! Thanks Jeremy.

    in reply to: Choosing subet of items to present #5864
    samsanto
    Participant

    Oh wow, duh! Forgot I had that… for that exact point.

    Thanks so much!!

    in reply to: Choosing subet of items to present #5862
    samsanto
    Participant

    Hi Jeremy,

    Thanks so much! This works pretty much how I need, I did have to switch around a couple things. Mainly I want all the “Train” to go first in a block then all the “Test” so I took out the rshuffle(…) but that was easy.

    Now I’m having a problem where I want to do slightly different key presses depending on if its a “train” or “test.” For the train words, I just display the word, for the test words, I ask want to get user input. Based on how we set it up, each block is (hopefully) guaranteed to have 12 words in it so I am keeping a global counter variable that just switches off every 12 words the action (see below). However, this isn’t working. The counter is not actually incrementing and it is stuck on the “failure” option, any idea why?

    Also if you have a better way to implement this, let me know (I feel like its too “hardcoded” if you know what I mean…)
    Thank you for the continued help, I really appreciate it!!

    
    PennController.Sequence(
        "Learn-0","Test-0","pause",
        "Learn-1","Test-1","pause",
        "Learn-2","Test-2","pause",
        "Learn-3","Test-3","pause",
        "Learn-4","Test-4","pause",
        "Learn-5","Test-5","pause",
        "Learn-6","Test-6","pause",
        "Learn-7","Test-7","pause",
        "Learn-8","Test-8","pause",
        "Learn-9","Test-9","pause",
        "Learn-10","Test-10","pause",
        "Learn-11","Test-11","pause"
    );
    PennController.ResetPrefix(null);
    
    newVar("count")
        .set(0)
        .global()
    ;
    
    PennController("pause", newButton("Take a break").print().wait() );
    
    PennController.Template( "statTableRandom.csv" , row =>
        newTrial( addItem(row.Type) ,
        
            getVar("count").test.is(12)
                .success(
                    getVar("count").set(0)
                    ,
                    newText(row.Word).print()
                    ,
                    newKey("yn").wait()
                )
                .failure(
                    getVar("count").set(v=>v+1)
                    ,
                    newText(row.Word).print()
                    ,
                    newKey(" ").wait()
                )
        )
    );
    

    -Sam

    in reply to: Choosing subet of items to present #5852
    samsanto
    Participant

    Hi Jeremy,

    Jumping in here because this is pretty similar to something I am trying to accomplish.

    I have an experiment with 12 blocks but the stimuli for each block are randomly generated from a master list (csv) for each participant. Essentially, one block consists of displaying 12 random “train” words and 12 random “test” words from this master list. Right now I have a file with three columns (Item, Type, Word) where item is just an index, type is Train v. Test, and Word is the actual stimulus.

    I need to generate 24 random subsets of my master list- so 12 of the “Train” words, and 12 “Test” words- without replacement (the main issue) so I guarantee that each item is only seen once, and cycle through them to display the words.

    I appreciate your help and any thoughts you have!

    Thanks,
    Sam

    samsanto
    Participant

    Ah! That totally makes sense. Thanks so much Jeremy! This works great.

    samsanto
    Participant

    Hi Jermey,

    I’m jumping in here because I am trying to do something very similar and cannot figure it out. I want add a Qualtrics link in my study, however instead of using “PennController.GetURLParameter(“id”)”, I randomly generate a participant ID as a global variable and want to use that in my link. I’ve tried many, many ways to integrate my variable into the outgoing link and it either does not form a clickable link, or the link is clickable, but instead of the participant ID # actually being integrated, it just says “[object%20Object]” (type cast error??).

    Here is my code with two of the ways I have tried to integrate the PID, if you could help me out, I’d appreciate it!

    
    PennController("genID",
        newVar("subjID")
            .global()
            .set(Math.floor((Math.random() * 10000) + 1))
    )
    .log( "id" , getVar("subjID"));
    
    PennController( "testLink" ,
        
            //I tried just "getVar("subjID") also but thought maybe it needed to be in text ("string") form but neither seem to work for me
            newText("ID", "").text(getVar("subjID"))
            ,
            
            //Attempt #1 (not a clickable link)
            newText('<a href="https://umdsurvey.umd.edu/jfe/form/SV_a9pG7czZy4cfAPP?ID=')
                .after( newText().text(getVar("subjID")))
                .after( newText('">Click here to go the next part of my study</a>'))
                .print()
            ,
            
            //Attempt #2 (link doesn't have the actual PID in the URL, just [object...]
            newText("<p><a href='https://umdsurvey.umd.edu/jfe/form/SV_a9pG7czZy4cfAPP?ID="+getText("ID")+"'>Click here to go the next part of my study</a>.</p>")
            .print()
            ,
            
            newButton("Continue")
                .print()
                .wait()
    
    );
    

    Thanks for any suggestions,
    Sam

    in reply to: Multi Character Key Press #5181
    samsanto
    Participant

    Hi Jeremy,

    This works great! Thank you so much, I really appreciate you taking the time.

    -S

    in reply to: Quit Trial after 3rd Attempt #5169
    samsanto
    Participant

    Jeremy,

    Thank you so much!! This works like a gem.

    -Sam

Viewing 15 posts - 1 through 15 (of 15 total)