Are console.log() and the getElement methods used interchangeably?
@nextrie13 күн бұрын
Not quite. The console.log method is used to log data or information to the console (which can be helpful for debugging purposes). The getElement methods, on the other hands, are used to access HTML elements by the value of their Tag name, ID or Class attributes. The latter useful for DOM manipulation. Is that clearer now?
@EmmanuelNKumeh-gi4pj12 күн бұрын
@@nextrie yes, sir. Thanks 🙏
@ApeGamingYT00927 күн бұрын
Thanks for sharing
@nextrie13 күн бұрын
You're welcome. I'm trying to find the time to publish more videos. I'll do my best to bounce back soon.
@smileyabelАй бұрын
Here is without using the sort function. int max_of_four(int a, int b, int c, int d){ if (a < b) a = b; if (a < c) a = c; if (a < d) a = d; return a; }
@FernandoGomes-dg1poАй бұрын
Awesome!
@nextrieАй бұрын
Glad you like the tutorial. :)
@thanhbinhhoang39742 ай бұрын
Thank you for your tutorial. Your solution works perfectly well on Hacker Rank, but when I pasted your solution on Google Colab or Jupyter, it usually has IndexError: list index out of range. Could you explain me why? I'm new to Python.
@Lufty202 ай бұрын
What is an infinite for loop called?
@nextrie2 ай бұрын
It's just an infinite loop. 🙂
@luffyluck2 ай бұрын
Technically this is the operator+= rather than operator+
@Ransomwer3 ай бұрын
Mangsud
@change_pilot3 ай бұрын
I want to know the various techniques (METHODS) to CAPTURE Input Values from a form and use them in a Functions in Java Script.
@DrPotatoX4 ай бұрын
Does console.log only write the answers in the console on the website or does it have any other functions?
@0verrun2924 ай бұрын
shouldnt we use references for function? exmaple: int maxoffour(int &a,int &b, int &c, int &d){}
@RadiusRadiated4 ай бұрын
No what is console.log??? Man i will die not knowing this i think
@nextrie4 ай бұрын
You mean, you didn't understand it through the video? Let me know and I'll explain again.
@jacklion1094 ай бұрын
Thank you brother, learned how to make hash maps with this
@nextrie4 ай бұрын
I'm very glad to hear this!
@SineadAngus4 ай бұрын
Thank you for this video!
@the.casanovaa4 ай бұрын
Thanks
@AB-ms7my4 ай бұрын
But why does passing a variable to the constructor doesn't work in JS?
@hannahjones72224 ай бұрын
Made me realize I need to learn vectors and arrays!
@RanDumb125 ай бұрын
Indians : rand 💀
@saltech20245 ай бұрын
Does that mean number as a JavaScript dats type act like an object? 😅
@Ali-e3m5u5 ай бұрын
c++
@Ali-e3m5u5 ай бұрын
brother can you help me solve the problem its a Frequency Sort HackerRank - si-frequency-sort im too long cantsolve the problem please
@AlishbaHaider-z4i5 ай бұрын
ReferenceError: document is not defined why does this error occur? im using vs code and same code as uu have shown. please guide.
@alski2595 ай бұрын
Outstanding! Great way to not only gleaning what someone does by walking through the code line by line but a discussion as well.
@kf12436 ай бұрын
I am confused. You can extract ss to n using the condition of if statement? How does that work?
@andyl99206 ай бұрын
Too confusing, and then we add in arrays, strings, if statements, too hard
@Murali-lv3os7 ай бұрын
Can we use array.filter() 😅
@Murali-lv3os7 ай бұрын
Mm nice example
@RiversPPC8 ай бұрын
I didn’t understand anything!
@nextrie8 ай бұрын
Hey, let me explain to you more clearly. The pow() function in Python can take two or three arguments. With two arguments, say A and B, the statement pow(A, B) calculates A raised to the power of B. This is the same as writing A**B in Python. If you want to find A raised to the power of B, then take the result modulo C, you can use the three-argument version of the pow() function. The modulo operator (%) gives the remainder of a division. So, (A**B) % C first calculates A raised to the power of B and then finds the remainder when that result is divided by C. Instead of writing (A**B) % C, which can be slow for large numbers, you can use pow(A, B, C). This does the same calculation but more efficiently. Is it clearer now?
@jnb34518 ай бұрын
So this is used to adjust html code or text via javascript?
@nextrie8 ай бұрын
Hey, actually, this is used to access specific HTML elements in your HTML code, using their ID. From there, you can choose to do anything you want with the referenced element, in your JS script. It doesn't have to be limited to adjusting text. :)
@ElectronicMusicEnjoyer8 ай бұрын
So did the 4 just straight up dissapear, what am I missing here?
@nextrie8 ай бұрын
It has to do with how the terms are distributed. Please check again the part where I show the breakdown in Google Search.
@nextrie8 ай бұрын
This one-line solution can be improved by sorting the list only once, outside of the list comprehension. See this below: Updated code here: isaacasante.com/816/leetcode-1365-how-many-numbers-are-smaller-than-the-current-number-solution-in-python/
@manishpandey89678 ай бұрын
What's the difference between for, while loops?
@nextrie8 ай бұрын
The convention is to use FOR LOOPS when you know how many times you want to run your loop, and you have a fixed increment/decrement. For example, repeat an action one-by-one for an entire list, or an entire range. Conversely, you use WHILE LOOPS when you need to run a loop purely based on a condition. E.g. while I haven't reached the value I'm looking for, keep repeating a certain action. Of course, in many common/simple cases, you can use these loops interchangeably, but there will be times when your increment (or decrement) will vary greatly depending on what happens in the loop. Sometimes, you'll need to increment by one, or by four, etc, depending on many variables. In such instances, using a WHILE loop might help. It's one of those things that becomes more intuitive to you as you gain more coding experience.
@manishpandey89678 ай бұрын
@@nextrie thnx ❤️🙌
@nextrie8 ай бұрын
You're welcome, hope you subscribe!@@manishpandey8967
@luke78896t8 ай бұрын
thankyou
@nextrie8 ай бұрын
You're welcome, Luke! I've got more tutorials coming up. I hope you subscribe :)
@sreehari48339 ай бұрын
Thank you for this solution.
@jasminbt219 ай бұрын
thank youuuuuuuuuuuuuuuu sooo muchhhhh
@nextrie9 ай бұрын
You're welcome!
@MyKneeHurts10 ай бұрын
could you not just print a sorted list. then after its sorted, the highest is automatically at index -1, then u pop index-1, then the next -1 is the runner up. This was the idea I had but struggled to code it
@francois-xaviermenage453110 ай бұрын
How do you compute the fair amount of loops required?
@nextrie10 ай бұрын
You have to iterate through each letter of every word in the list of words. That's why it's a nested loop.
@francois-xaviermenage453110 ай бұрын
Ok but sometimes , we use loops easily and I have already been reproched to use too many loops..I am wondering how measuring better when I am asked to optimize..@@nextrie
@nextrie10 ай бұрын
@@francois-xaviermenage4531 Well, it depends on the nature of the problem. If you can use a data structure like a Trie to process words faster and reduce time complexity, then that's great. But in this debugging problem, the instructions expect you to go through each letter (inner loop) of each word provided (outer loop). So, it's okay to go with a nested loop here. Plus, it's only a small problem, so the input size won't cause any issue.
@Garfield_Minecraft11 ай бұрын
i shifting bit by adding 00001010 111111011+ (fliping all 0 to 1 when found 1 then just copy and paste on top then add 1 the overflow will cancel out) ---------- 00000101 left shift is easier 00000101 00000101+ (add by itself) ----------- 00001010
@kidlast-h2f11 ай бұрын
good jop
@abobakrmostafa872311 ай бұрын
what is the difference between invalid argument and exception? And why did you use "exception" when it stated the exceptions that might occur?
@yahyaabdulmajeed822311 ай бұрын
This is O(n^2) solution, assuming you calculate both numbers together. There is O(n) solution available.
@nextrie11 ай бұрын
Not exactly. I've provided the complexity analysis for this approach here: isaacasante.com/676/add-two-numbers-leetcode-solution-in-python/?amp=1
@AyushKumar-lr9po5 ай бұрын
this is very bad approach
@sayhii633811 ай бұрын
If image for add classlist does the opacity become 0?
@IsaacAsante1711 ай бұрын
Sorry, are you asking if you can control an image's opacity via the classList method?
@sayhii633811 ай бұрын
@@IsaacAsante17 I added a class to the element in the JavaScript section. and I gave the class name = fade. then in the CSS section I gave it an animation. And the animation didn't work
@sayhii633811 ай бұрын
@@IsaacAsante17 but if the class name is replaced with something else... the animation runs. I'm confused. What's wrong with the class name "fade"
@sayhii633811 ай бұрын
@@IsaacAsante17 I just found out the problem. It turns out the class name "fade" is connected to bootstrap. So when it's not connected to it. The animation runs with the class name fade
@nextrie11 ай бұрын
@@sayhii6338 Good to know you found the problem. That looked like a tricky situation, indeed. All the best with your coding.
@nextrie11 ай бұрын
I want to clarify that at 0:31, when I say you get 807, I mean that you'll get this result after summing up both numbers. That's because after processing the first linked list, you get the original input 342. After processing the second linked list, you get 465. Using the normal addition operator, you get 807. You can then process 807 using a combination of modulo and integer division operations to store each digit in a new linked list in reverse order.
@treslivingston Жыл бұрын
Thank you!! I have learned a lot from these videos
@nextrie Жыл бұрын
I'm so glad! I hope you subscribe! I'm going to resume coding challenge videos very soon. I've got some new equipment on the way for this. :)
@ДаняСкоряк-л6ь Жыл бұрын
How can I get API KEY? And where?
@nextrie Жыл бұрын
I've got a video on how to get a Bard API key here: kzbin.info/www/bejne/qojOZIRvra6mjKc