JS if statement only looking at original number and not looking at new updated number. Ask Programming |
- JS if statement only looking at original number and not looking at new updated number.
- Time Complexity of the This Code?
- Why is the .innertext not working?
- How to take my brain to next level to be able to learn computer science concepts?
- Help recursively adding layers to ReactMapGL map
- What units do you prefer using for clamp() for responsive design?
- open dialog in vue its not work why ?
- Is it possible to use a method from a Class that contains another Class?
- I don't know name of something like this app and if the app exist . do u know this?
- What is the best way to find a reliable programmer?
- Getting a junior - any pointers?
- Question regarding a recent job.
- What are some alternate New Year's Eves I can plan a party on? For example New [ISO Week Calendar] Year is on Jan 2nd this year.
- Unit testing a function that simply calls another function
- How can I effectively mute a user or app in a Slack channel?
- Best way to consolidate ticket sales across DesignMyNight and a word press? Can't think of other options
- Can you program a virus into a QR code so that whenever someone scans they download the virus?
JS if statement only looking at original number and not looking at new updated number. Posted: 20 Dec 2021 11:12 PM PST The title may be a little confusing but I am currently creating a game and it has a button that makes a number go up. In my html code the number is set to 0 and when I click the button it obviously goes up to 1. Now here comes the problem. I made an if statement that looks to see whether the number is 0 . If the number is 0 then keep all the buttons as visibility: none; but if the number is anything else other than 0 then keep all the buttons as visibility: visible; Simple enough right? Well apparently not. Doing some troubleshooting I realise that the 'if' statement is only looking at the original code which still says 0. However after clicking on the button inside the browser and going into inspect element shows that the number is now 1. However, it still doesn't work which leads me to believe that the 'if' statement is only looking at the numbers inside the original code and not the changed, new code. This is a pastebin to my code: [link] [comments] |
Time Complexity of the This Code? Posted: 20 Dec 2021 03:45 PM PST I've been stunlocked by this question. I'm trying to get the time complexity of this algorithm I wrote (programming competition practice) and I'm not sure if I'm correct. So would my time complexity be: On + O(n^2) + O(n^2) + On + On O(n + n^2 + n^2 + n + n) O(n^2) Thank you in advance!! [link] [comments] |
Why is the .innertext not working? Posted: 21 Dec 2021 03:52 AM PST in my js code I have a function (line 176 of pastebin) that has a line of code with .innertext (line 178 of pastebin) However when I do the alert("playerHealth) it gives me undefined. Any ideas as to why? also, on line 20 and 21, i would like the thing to display 100% instead of 100. But putting the '%' causes the parseInt() thing to break cuz it has a '%' so how do i resolve that too? thanks in advance [link] [comments] |
How to take my brain to next level to be able to learn computer science concepts? Posted: 21 Dec 2021 03:47 AM PST My brain seems like it is unable to learn new concepts. Like concepts of programming, artificial intelligence, machine learning, neural network etc etc. How do I make my brain capable of learning any of these things? How do I train my brain to be specific? My brain seems not working properly to learn these big concepts. I learnt basics of python and I am solving codewars problems currently. But I feel I am not reaching next level of learning.. PS I want to learn machine learning, neural network etc for college exam and I find myself stuck as I am not learning a lot. Also reading text seems like brainfuk thing to me...Any way to make this reading text process easier? If every text articles could be converted to slides man, it would help me a lot man... [link] [comments] |
Help recursively adding layers to ReactMapGL map Posted: 20 Dec 2021 10:18 PM PST I am currently trying to build a map with a list of POIs; however, I need the different POIs to be on different layers so I can filter them accordingly. Below is my current code where all POIs are on the same layer. I have tried mapping the list of geoJSON elements to a layer individually like below, but the layers seem not to be drawing when done this way (the single layer above does get drawn). I am not sure if this is the "proper" way to do this, and wondering if anybody here had any advice/tips/resources they could share. [link] [comments] |
What units do you prefer using for clamp() for responsive design? Posted: 20 Dec 2021 09:56 PM PST For fonts, I'm assuming most people would use clamp(#rem, #vw, #rem) , but what about using clamp() for containers? For containers, I have been using clamp(#rem, #vw, #rem) as well since pixels are often not recommended in responsive design. What units do you think are preferable in most situations for containers? [link] [comments] |
open dialog in vue its not work why ? Posted: 21 Dec 2021 01:27 AM PST talent.vue <template> </div> list.vue <template> formcard.vue <template> [link] [comments] |
Is it possible to use a method from a Class that contains another Class? Posted: 20 Dec 2021 09:24 PM PST The title is wonky because I don't know how to word this, which is probably why I can't find much help on google. I've taken my code and made it generic. JS Code: [link] [comments] |
I don't know name of something like this app and if the app exist . do u know this? Posted: 20 Dec 2021 09:17 PM PST Do you know like this app? also what is the name of something like this app? pls dont ask why The app contains that delete Space , search text , make indent , delete specific word , etc... function Input (Option : search text) Output abaisffjaicaabasbabc Input (Option : delete Space) Output [link] [comments] |
What is the best way to find a reliable programmer? Posted: 20 Dec 2021 07:46 PM PST Hey everyone, I need a programmer to build a website (with some backend logic, not very complicated). But nowadays there are so many programming languages, benchmarks, technologies to build it. So how to be sure the hired specialist has appropriate skills/experience? Thanks [link] [comments] |
Getting a junior - any pointers? Posted: 20 Dec 2021 03:37 PM PST So I'm getting a junior in a couple of weeks. It is not my first one but due to the pandemic it's been a couple of years and I've asked my former juniors as well what I did well and what I could improve etc. I have some ideas of my own of course but I thought I'd pick your brains for any do's and don't's, general tips, things to think about etc. Anything else would assume I'm flawless. Oh and since this isn't programming specific I understand if the mods hammer down on this but I kinda looked at other subreddits and wanted a larger pool to draw inspiration from. [link] [comments] |
Question regarding a recent job. Posted: 20 Dec 2021 12:05 PM PST Hello everyone, I wanted to ask because this is the first time I have been in this scenario. So I originally applied for the role of Programmer Analyst I. I did pretty well, but unfortunately, I did not get the job. The department head said it was between one other person and me, and they chose the other guy. The department head also encouraged me to apply for the level II role, which became available more recently. She said there's a strong chance that I will be considered for that role since I was the second pick for the Level I position. So my question is, if there was a level I and II role that became available for the same department around the same time, why didn't they pick their first choice to be in the level II position, and me for the level I since I was the second pick? It just doesn't make sense. I hope they're not wasting my time by going through this process all over again. Any feedback as to what could be going on would be much appreciated. Thanks! [link] [comments] |
Posted: 20 Dec 2021 02:01 PM PST |
Unit testing a function that simply calls another function Posted: 20 Dec 2021 01:51 PM PST This question has probably been asked a million times on the internet but I haven't been able to find an answer that is applicable to my case. I have a class with two public functions in it. Using a simplified C# example, it's like this: As you can see, ConvertToDateTime simply calls into ConvertToDateTimeOffset and returns a property/field that is inside its result. That is all. The problem, however, is that ConvertToDateTimeOffset is designed to throw a number of different exceptions if its Int64 parameter meets certain criteria, and unit tests need to be written to ensure these exceptions are thrown. What is considered good practice here? Do I simply just write the unit tests for ConvertToDateTimeOffset? Do they need to be written for both methods and if so, how can this be done in a clean and centralized way? Despite its extreme simplicity I don't want to just remove the ConvertToDateTime method, as a similar problem could come up in the future for a method that isn't as simple (one that calls into two methods, for example, or three) and I want to learn how to deal with it. Thanks in advance! P.S. for fellow C# guys out there - I know DateTimeOffset already has functionality for converting from timestamps. My class here adds some additional configurability around it. [link] [comments] |
How can I effectively mute a user or app in a Slack channel? Posted: 20 Dec 2021 01:37 PM PST My end goal is to mute an app inside a channel. The app creates notifications in a critical channel without adding any value [to me]. Slack devs refuse to provide this oft-requested feature, so I'm hoping to achieve it in a non-native way. The first question I would have is whether there already exists some program/plugin/app which can do this. I haven't been able to find one, but that doesn't mean that there isn't one. If there isn't already something that can achieve this, what would be the recommended way of implementing that functionality myself?
Any thoughts or advice? Thanks! [link] [comments] |
Posted: 20 Dec 2021 12:14 PM PST I am trying to help a family member with their small business. They sell tickets on both their own word press site and DesignMyNight but they are finding it quite laborious to check both websites to see which tickets have sold. I have checked DMN for an API but it doesn't seem to return the ticket sales. I don't think their word press site has similar either. My current options seem like: 1) Scrape both sites and try to grab the ticket sales. Would need to run this periodically to make sure it's up to date. 2) Somehow scrape the emails coming in (I think you run can a script via outlook). Can anyone think of anything else? [link] [comments] |
Can you program a virus into a QR code so that whenever someone scans they download the virus? Posted: 20 Dec 2021 02:48 PM PST |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment