Пікірлер
@EmmanuelNKumeh-gi4pj
@EmmanuelNKumeh-gi4pj 14 күн бұрын
Are console.log() and the getElement methods used interchangeably?
@nextrie
@nextrie 13 күн бұрын
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-gi4pj
@EmmanuelNKumeh-gi4pj 12 күн бұрын
@@nextrie yes, sir. Thanks 🙏
@ApeGamingYT009
@ApeGamingYT009 27 күн бұрын
Thanks for sharing
@nextrie
@nextrie 13 күн бұрын
You're welcome. I'm trying to find the time to publish more videos. I'll do my best to bounce back soon.
@smileyabel
@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
@FernandoGomes-dg1po Ай бұрын
Awesome!
@nextrie
@nextrie Ай бұрын
Glad you like the tutorial. :)
@thanhbinhhoang3974
@thanhbinhhoang3974 2 ай бұрын
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.
@Lufty20
@Lufty20 2 ай бұрын
What is an infinite for loop called?
@nextrie
@nextrie 2 ай бұрын
It's just an infinite loop. 🙂
@luffyluck
@luffyluck 2 ай бұрын
Technically this is the operator+= rather than operator+
@Ransomwer
@Ransomwer 3 ай бұрын
Mangsud
@change_pilot
@change_pilot 3 ай бұрын
I want to know the various techniques (METHODS) to CAPTURE Input Values from a form and use them in a Functions in Java Script.
@DrPotatoX
@DrPotatoX 4 ай бұрын
Does console.log only write the answers in the console on the website or does it have any other functions?
@0verrun292
@0verrun292 4 ай бұрын
shouldnt we use references for function? exmaple: int maxoffour(int &a,int &b, int &c, int &d){}
@RadiusRadiated
@RadiusRadiated 4 ай бұрын
No what is console.log??? Man i will die not knowing this i think
@nextrie
@nextrie 4 ай бұрын
You mean, you didn't understand it through the video? Let me know and I'll explain again.
@jacklion109
@jacklion109 4 ай бұрын
Thank you brother, learned how to make hash maps with this
@nextrie
@nextrie 4 ай бұрын
I'm very glad to hear this!
@SineadAngus
@SineadAngus 4 ай бұрын
Thank you for this video!
@the.casanovaa
@the.casanovaa 4 ай бұрын
Thanks
@AB-ms7my
@AB-ms7my 4 ай бұрын
But why does passing a variable to the constructor doesn't work in JS?
@hannahjones7222
@hannahjones7222 4 ай бұрын
Made me realize I need to learn vectors and arrays!
@RanDumb12
@RanDumb12 5 ай бұрын
Indians : rand 💀
@saltech2024
@saltech2024 5 ай бұрын
Does that mean number as a JavaScript dats type act like an object? 😅
@Ali-e3m5u
@Ali-e3m5u 5 ай бұрын
c++
@Ali-e3m5u
@Ali-e3m5u 5 ай бұрын
brother can you help me solve the problem its a Frequency Sort HackerRank - si-frequency-sort im too long cantsolve the problem please
@AlishbaHaider-z4i
@AlishbaHaider-z4i 5 ай бұрын
ReferenceError: document is not defined why does this error occur? im using vs code and same code as uu have shown. please guide.
@alski259
@alski259 5 ай бұрын
Outstanding! Great way to not only gleaning what someone does by walking through the code line by line but a discussion as well.
@kf1243
@kf1243 6 ай бұрын
I am confused. You can extract ss to n using the condition of if statement? How does that work?
@andyl9920
@andyl9920 6 ай бұрын
Too confusing, and then we add in arrays, strings, if statements, too hard
@Murali-lv3os
@Murali-lv3os 7 ай бұрын
Can we use array.filter() 😅
@Murali-lv3os
@Murali-lv3os 7 ай бұрын
Mm nice example
@RiversPPC
@RiversPPC 8 ай бұрын
I didn’t understand anything!
@nextrie
@nextrie 8 ай бұрын
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?
@jnb3451
@jnb3451 8 ай бұрын
So this is used to adjust html code or text via javascript?
@nextrie
@nextrie 8 ай бұрын
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. :)
@ElectronicMusicEnjoyer
@ElectronicMusicEnjoyer 8 ай бұрын
So did the 4 just straight up dissapear, what am I missing here?
@nextrie
@nextrie 8 ай бұрын
It has to do with how the terms are distributed. Please check again the part where I show the breakdown in Google Search.
@nextrie
@nextrie 8 ай бұрын
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/
@manishpandey8967
@manishpandey8967 8 ай бұрын
What's the difference between for, while loops?
@nextrie
@nextrie 8 ай бұрын
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.
@manishpandey8967
@manishpandey8967 8 ай бұрын
@@nextrie thnx ❤️🙌
@nextrie
@nextrie 8 ай бұрын
You're welcome, hope you subscribe!@@manishpandey8967
@luke78896t
@luke78896t 8 ай бұрын
thankyou
@nextrie
@nextrie 8 ай бұрын
You're welcome, Luke! I've got more tutorials coming up. I hope you subscribe :)
@sreehari4833
@sreehari4833 9 ай бұрын
Thank you for this solution.
@jasminbt21
@jasminbt21 9 ай бұрын
thank youuuuuuuuuuuuuuuu sooo muchhhhh
@nextrie
@nextrie 9 ай бұрын
You're welcome!
@MyKneeHurts
@MyKneeHurts 10 ай бұрын
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-xaviermenage4531
@francois-xaviermenage4531 10 ай бұрын
How do you compute the fair amount of loops required?
@nextrie
@nextrie 10 ай бұрын
You have to iterate through each letter of every word in the list of words. That's why it's a nested loop.
@francois-xaviermenage4531
@francois-xaviermenage4531 10 ай бұрын
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
@nextrie
@nextrie 10 ай бұрын
@@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_Minecraft
@Garfield_Minecraft 11 ай бұрын
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-h2f
@kidlast-h2f 11 ай бұрын
good jop
@abobakrmostafa8723
@abobakrmostafa8723 11 ай бұрын
what is the difference between invalid argument and exception? And why did you use "exception" when it stated the exceptions that might occur?
@yahyaabdulmajeed8223
@yahyaabdulmajeed8223 11 ай бұрын
This is O(n^2) solution, assuming you calculate both numbers together. There is O(n) solution available.
@nextrie
@nextrie 11 ай бұрын
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-lr9po
@AyushKumar-lr9po 5 ай бұрын
this is very bad approach
@sayhii6338
@sayhii6338 11 ай бұрын
If image for add classlist does the opacity become 0?
@IsaacAsante17
@IsaacAsante17 11 ай бұрын
Sorry, are you asking if you can control an image's opacity via the classList method?
@sayhii6338
@sayhii6338 11 ай бұрын
@@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
@sayhii6338
@sayhii6338 11 ай бұрын
@@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"
@sayhii6338
@sayhii6338 11 ай бұрын
@@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
@nextrie
@nextrie 11 ай бұрын
@@sayhii6338 Good to know you found the problem. That looked like a tricky situation, indeed. All the best with your coding.
@nextrie
@nextrie 11 ай бұрын
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
@treslivingston Жыл бұрын
Thank you!! I have learned a lot from these videos
@nextrie
@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ь
@ДаняСкоряк-л6ь Жыл бұрын
How can I get API KEY? And where?
@nextrie
@nextrie Жыл бұрын
I've got a video on how to get a Bard API key here: kzbin.info/www/bejne/qojOZIRvra6mjKc
@mridulasthana8111
@mridulasthana8111 Жыл бұрын
Please explain with 8 bit machine, thanks