[Solved] I need a specific format, from JavaScript Date object [closed]

[ad_1] Try this let d = new Date(); const monthNames = [“Jan”, “Feb”, “Mar”, “Apr”, “May”, “June”, ” July”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec” ]; const d = new Date(); console.log(d.getHours() + “, ” + monthNames[d.getMonth()] + ” ” + d.getDate()); You can change monthNames to suit your needs. [ad_2] solved I need a specific … Read more

[Solved] want to create diamond shape using while in C

[ad_1] It would help to see your code for your implementation of the while loop to see what’s wrong, but the general solution for converting a for loop to a while loop is this: for(i=1;i<=2;i++) { /*your code*/ } becomes i = 1; while(i<=2) { /*your code*/ i++; } Make sure your iterators and decrementors … Read more

[Solved] I have 3 table missing data find in SQL

[ad_1] If you cross join your Week and Student tables to get all combinations, and then use not exists to determine where no TimeSheet record exists. select W.WeekID, S.StudentID from [Week] W cross join Student S where not exists (select 1 from TimeSheet T where T.StudentID = S.StudentID and T.WeekID = W.WeekID); 0 [ad_2] solved … Read more

[Solved] Python convert list to dict with multiple key value [closed]

[ad_1] Several ways to do this, this is one: EDIT: my first solution gave a list for every value, but you only require a list when there is more than one value for a key. my_list = [‘key1=value1’, ‘key2=value2’, ‘key3=value3-1’, ‘value3-2’, ‘value3-3’, ‘key4=value4’, ‘key5=value5’, ‘value5-1’, ‘value5-2’, ‘key6=value6’] my_dict = {} current_key = None for item … Read more

[Solved] SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string ‘xpath’ is not a valid XPath expression [duplicate]

[ad_1] If you look at the XPath in the error message, you will probably see what the issue is. Your text isn’t surrounded by quotes as is required, e.g. td[@area-label=November 2025] should be td[@area-label=”November 2025″] To fix this, you need to adjust your line of code to dp_month = driver.find_element_by_xpath(‘//*/td[@aria-label=”‘+month_label+'”]/div[contains(text(),”‘+ x_month +'”)]’) [ad_2] solved SyntaxError: … Read more

[Solved] using namespace std; in header file

[ad_1] Seeing as this is a course header, I think students are supposed to include it and then use most of the standard library that way. I am surprised Stroustrup teaches it that way (it is, in my opinion, still bad practice), but it does mean that he has one less bit of syntax to … Read more

[Solved] how to @ youself and someone else in a embed on discord

[ad_1] You are getting the result you get because you use the same code at two places. message.author.toString() + ‘called’ + message.author.toString() ^ once here ^ and once here What you need to do is get the member you mentioned and use that instead. message.mentions.members.first().toString() 1 [ad_2] solved how to @ youself and someone else … Read more

[Solved] Python declare multiple lists

[ad_1] You can use a dictionary to store the values: x=[‘aze’,’qsd’,’frz’,…] vars = {} for i in x: vars[“MAX” + i] = [] Or in order for them to become real variables you can add them to globals: x=[‘aze’,’qsd’,’frz’,…] for i in x: globals()[“MAX” + i] = [] You can now use: MAXaze = [1,2,3] … Read more

[Solved] Security of PHP POST Array

[ad_1] An attacker cannot “escape” a PHP array, because the contents of the array are not executed as code. It may contain a string of PHP, but that string is not executed. What may be insecure is how your PHP code handles the user input later on. If you are outputting the data without sanitising … Read more