Jump to content

gw1500se

Members
  • Posts

    1,033
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. My bad. It is an execute error so it does not show up until it tries to execute. It says 'window' is undefined. Do I need a plugin or something?
  2. Yes but when I try to use it I get an error that confirm is undefined. II just tried it again but this time there was no error. Odd. Thanks.
  3. Not sure what server you are talking about but if you add some error checking to your script you can determine if the update was successful or not. If unsuccessful you can schedule a one time rerun after some specified amount of time or just wait for the next regularly scheduled cron to run again.
  4. Whatever you can do from the command line you can do with a cron job either directly or as a script.
  5. I have a Chrome extension but I occasionally get a result that needs a confirmation from the user. It appears that there is no way to produce a popup confirmation window. Is that true and if not, how do I do it? TIA.
  6. What is not working and what error are you getting? Do you have error reporting turned on? error_reporting(E_ALL);
  7. Got it. Thanks.
  8. I thought a new thread would be better, sorry. In any case I am confused as I thought a regexp needed the '/' delimiters.
  9. Not sure how this became part of the previous topic although it is related in in that it is applying that solution. I thought I started a new topic. What I posted was the string before running it through Javascript RegExp. I assumed that the string was supposed to be a regexp expression string that RegExp would convert. Are you saying that the string should just be: FRENCH
  10. I thought this would be easy but I am really bad at regexps. I want to match the string 'FRENCH' anywhere in a string. /FRENCH/ Does not work. Please help. TIA.
  11. The OP said something about clicking a link which is why I asked to see some code.
  12. It is still not clear what you are trying to do. Do users click on a link and see the time for the next upload? Perhaps you need to show some code of what you tried and what didn't work. Be sure to use the code icon (<>) and specify PHP
  13. Got it. for (var i=0; i<config_data.excludes.length; i++) { regexes.push(new RegExp(config_data.excludes[i])); } I always struggle with data types in Java
  14. I think the problem is here: for (let item in config_data.excludes) { regexes.push(new RegExp(item)); } The result in regexexs is one entry and it is '/0/' because 'item' is '0' rather than '/FRENCH*/'.
  15. You need to be more explicit. If the next task is always 7:30PM each day, why do you need a timer? If you do need a timer are you running on Windows, Mac or Linux?
  16. For testing, config_data.excludes has one entry: Array(1) 0: "/FRENCH*/" length: 1 items.title has many entries but these are typical: skipping Pick a Youtube thumbnail/title (~10 seconds) skipping Survey for $0.25 (~4 Minutes)(~ 4 minutes) skipping 2-minute study for $0.30(~ 2 minutes) skipping 2023 Plans As you can see the code is "skipping" even though 'FRENCH*' does not exist in those strings.
  17. This is not working as expected. Perhaps I am missing something. First I do this: regexes=[] for (let item in config_data.excludes) { regexes.push(new RegExp(item)); } 'config_data.excludes' is an array of strings representing regexps. Then I do this in a loop: if (regexes.some(re=>re.test(item.title))) { console.log("skipping "+item.title) continue; } This block is in a loop (item.title) so the 'continue' will skip to the next item in the loop. Unfortunately, it finds the 'if' is always true although none of the items contain any of the rexexps. I didn't let it run long enough to actually encounter a title that does match but is the return boolean backwards from what I expected?
  18. I don't want to write the loop myself if I don't have to which was what I was trying to say. I don't think I understand what you did. First don't you need to run 'regexes' through the 'RegExp' function? Then is 'test' a function of 'some'? I was not able to follow the link you provided as it relates to this question. I assume from the documentation that 'any' will be either 'true' or 'false', right?
  19. I have an array of regular expressions that I want to check against a string. I need to know if the string matches any of those regexps. Is there a way to do that without using a loop? TIA.
  20. Thanks. That was what I was missing.
  21. To clarify, 'excludes' is not in the object (yes it is a json array/object) at this point but I want it to be an empty array for future use: json_array.excludes.push(<some string>);
  22. I have an object that contains arrays and other elements. I need to add an array to that object but I cannot figure out how to do that. This is what I tried: json_array.push(excludes[]); Can someone give me the correct syntax? TIA.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.