How can I have a function accept multiple file types?

How can I have a function accept multiple file types such as .jpg, .png, and .gif? Example of the intended file structure: img/slides/ profilePic-0.jpg profilePic-1.png profilePic-2.gif var imageType = “.jpg”; $.each($(“#modal .slide”), function(index, value) { $(this).css({ background: “url(‘img/slides/” + id + “-” + index + imageType + “‘) center center/cover”, backgroundSize: “cover” }); });

Details

Deserialize date from JSON to Date in Typescript

I get from my backend a JSON that looks like this: [{ “schedulingId”: “7d98a02b-e14f-43e4-a8c9-6763ba6a5e76”, “schedulingDateTime”: “2019-12-28T14:00:00”, “registrationDateTime”: “2019-12-24T16:47:34”, “doctorViewModel”: { “doctorId”: “a49d9534-65a6-4730-ac45-4dc2f91165e0”, “doctorName”: “Ana” }, “personViewModel”: { “personId”: “3607c475-e287-4e83-85e6-a46f4a0116d6”, “personName”: “João”, “birthDate”: “1970-09-18T00:00:00” }, “consultaViewModel”: null }] And I need to deserialize that JSON into my Scheduling parsing the date from JSON to ‘dd/MM/yyyy hh:MM:ss’…

Details

Using JQuery “Append” function, how to add same string to all divs with same class? (Only works once)

Using JQuery Append i want to fill a div with HTML, same for all instances of same class on the page. HTML Text <div class=”custom-content”></div> Text <div class=”custom-content”></div> Text <div class=”custom-content”></div> Text JQuery: <script> if ($(window).width() < 500) { $(“.custom-content”).append(“<script>document.write(‘Small’);<\/script>”); } else { $(“.custom-content”).append(“<script>document.write(‘Large’);<\/script>”); } </script> I’m expecting “Large” or “Small” to show up on…

Details

Spark can not recover from checkpoint ProvisionedThroughputExceededException: Rate exceeded for shard shardId

I have a spark application which consume from Kinesis with 6 shards. Data was produced to Kinesis at at most 2000 records/second. At non peak time data only comes in at 200 records/second. Each record is 0.5K Bytes. So 6 shards is enough to handle that. I am using EMR 5.23.0, Spark 2.4.0, spark-streaming-kinesis-asl 2.4.0…

Details