- 2
- 47 020
Thuggonaut
Приєднався 19 лют 2015
Learning code things
NetPractice: An Intro to IP Addresses and Subnets
A guide and walk through for 42's NetPractice:
00:00 - Intro
02:05 - What is TCP/IP?
03:20 - What is a LAN?
03:38 - What is an IP?
06:45 - What is a Subnet?
09:28 - What is a Subnet Mask?
13:12 - What is a Subnetting?
16:02 - Switches, Routers, Gateways
18:17 - NetPractice Tips
19:43 - Subnet Chart
21:10 - NetPractice Walkthrough
Networking basics:
ua-cam.com/video/_IOZ8_cPgu8/v-deo.html
You Suck at Subnetting, Playlist by Network Chuck:
ua-cam.com/play/PLIhvC56v63IKrRHh3gvZZBAGvsvOhwrRF.html
IP Subnet Calculator:
www.calculator.net/ip-subnet-calculator.html
Github: github.com/Thuggonaut
00:00 - Intro
02:05 - What is TCP/IP?
03:20 - What is a LAN?
03:38 - What is an IP?
06:45 - What is a Subnet?
09:28 - What is a Subnet Mask?
13:12 - What is a Subnetting?
16:02 - Switches, Routers, Gateways
18:17 - NetPractice Tips
19:43 - Subnet Chart
21:10 - NetPractice Walkthrough
Networking basics:
ua-cam.com/video/_IOZ8_cPgu8/v-deo.html
You Suck at Subnetting, Playlist by Network Chuck:
ua-cam.com/play/PLIhvC56v63IKrRHh3gvZZBAGvsvOhwrRF.html
IP Subnet Calculator:
www.calculator.net/ip-subnet-calculator.html
Github: github.com/Thuggonaut
Переглядів: 3 457
Відео
push_swap TUTORIAL!
Переглядів 44 тис.Рік тому
A walk through of my push_swap project for 42: ⚠️ Watch at x 1.25 speed to avoid falling asleeps 😅 00:00 - Intro 02:16 - Evaluation guide 03:06 - Project outline 03:29 - What is a stack/linked list? 06:14 - What is a node? 06:52 - Operations 08:32 - Chosen algorithm 20:19 - Summary of algorithm 21:09 - Pseudo code 23:55 - Coding push_swap 45:21 - Testing push_swap 48:11 - Outro Oceano's video r...
FInally another video from u u should be making more
@@othmaneer-refaly9216 thank you for your kindness ♥️
42k views
@@AyoubCluster haha love this
@@thuggonaut The algo have some worst cases that can go up to 6700 moves for 500 numbers, i'm trying to make optimizations
i'm not sure if i'm missing something really obvious. But i think at the point where you're explaining the actual coding you say you covered already what 'a ''target node" is. But earlier in the video when talking about nodes you say you will explain it later....i cannot find where in the video it is actually explained.
Hey friend! I explain target_nodes in the animation @10:20 Hope it helps 😊
I have a favor to ask! UA-cam have put adds in this video (even though I'm not monetizing it). I liked my video being ads free, which was why I don't ask for likes or subscribes in my videos. But ads happened beyond my control. If you found this video helpful, please click subscribe to support, that would be so wholesome! I put a lot of time and effort in my videos (a week for push_swap) to help people and would love a little kindness in return. Thank you for you! ♥️
thanks for the help ! great video
Hey, if you wouldn't mind explaining, for your subnet chart, I'm still a little uncertain about what the two CIDR rows represent, host bits in 3rd and 4th and then 4th octets? What's that mean? 😅
Hello! I hope this reply isn't too late! You know how the host bits are the contiguous 1s, right, so the top row CIDRs will have those 1s in both 3rd and 4th (9 bits min). Whereas the second row CIDRS will only have those 1s in the 4th (8 bits max). I hope that helps? Good luck friend! You got this!
thank you for the video now i understand it better😁
@@fabocas you're welcome friend, and good luck! 😊
@@thuggonaut trying.. to not be blackholed😭😂
where is minishell in your intra profile
@@eray3147 hello, I havnt completed minishell yet but it's in the works 😊
Soo well done! U should make more vids! 🔥
I appreciate you! I hope you've been well 😊
this video was so helpful !! thank you for making it :) may i know what application you used to create this video? what did you use to screen record, and to create the explanation slides in the beginning ? and to compile the clips together? x0
I'm glad, and you're welcome 😊😊 Of course! I used Microsoft Powerpoint for the slides, and then windows capture to record the screen. I didn't need to compile things together because I just screen recorded the whole thing. If you have windows though, microsoft clipchamp is good for video editing, hope that helps!
@26:06 I'm laying in bed at 4am and I just figured out why it's /16, and I'm so silly 😂😂 It's /16 because 16 bits are used for the host, leaving 16 for the network in the '123.254.0.0' subnet. A huge derp moment hahahha
I am not sure, but I think that if you used something bigger than 192 instead of 66 I think you could have used the /18 mask
And I just noticed that what I said wouldn't work because the gluon network is set to use the 192+ range
first
u a legend, W
Thanks so much bro!
this video carried most of the push_swap projects at 42 X) SOOO well explained thank you !
Thank you so much for the kind words 💛💛
Amazing work on this tutorial. It was very well structured and the visual aid was really well thought. Thanks for your work!
@@arturcarvalho7484 you are so welcome and thank you for the kind words! Good luck with your project! 😊
Hi there! Awesome video, thanks!! I just have one question: at the 14:00min you say that the cost of putting the number 25 from STACK A to STACK B is 0, which seems inaccurate to me, because the cost is 1. One operation is needed to push the number 25 to STACK B. Is it not?
It technically cost one more but because it is the case of every numbers it is voluntary ignored
@@corentinlt7859 Ok, thank you!
hey. Does this implementation fall below the limit for 100 and 500 numbers? Your explanation is very educational and helped me a lot.
Hello friend, thank you for passing by, and your kindness. I believe it does. There may be the occasional case where it returns higher instructions, but I suggest running the case a few times (also recommended in the evals), and it should give you the desired average.
I have another question. Why is mutable string important in split? When I try to do it with my ft_split in the input "./push_swap -" i encounter leak as still reachable but your split doesn't have any leaks. I couldn't figure out why is it different.
Did you have any luck? I'll try to get back to you as soon as I can! The black hole is creepin on me 😅
❤ from 1337 students
Right back at you 🥰
@@thuggonaut which campus you're studying on it
@@adamekhobba2156 I'm at 42 Adelaide. What about you?
@@thuggonaut 1337 if you know it. it's 42 school in Morocco
Thanks so much for the video! It's really helpful, I am in the beginning stages of my project and it has helped me to have a clearer vision of how I should approach it. And for what it is worth, I really appreciate the calmness of your voice, there are already enough high speed and over stimulating videos all around 😄
Thank you for your kindness! I'm so glad it can be helpful for you. All the best with aceing it😊
@@thuggonaut thanks!! 🥰
I have a question, your push commands like pa pb takes boolean as parameters but they are always false. Is there a specific reason why dont they just print when they are called?
Such a fair question! The bools were added as an option to print the commands, or not, which can be useful for debugging purposes. In hindsight though, going back to the scattered bools to change its value is tedious, and I wasn't experienced with global variables or custom macros. I'd use custom macros instead, something like '#define ENABLE_PRINT 1' in the .h file
I am currently working on this project and this is tremendously helpful. Thank you!❤
Thank you for your kind words 😊
Thank u so much for the explanation I'm from 42 RIO, you helped me a lot!!!! 💖 I loved you're videos they're really well ilustrated pleeeese keep doin' it💕
Thank you so much friend, I appreciate you 😊
I tested your code and it has a memory leak when you do a test that you expect the output to be "Error", example: "./push_swap "2 5 1 4 3 32 -42 ab"", I'm trying to solve it but I wasn't able to do so, if someone knows how to, please help me
have you solved it?
@@Myxoceph Yes, I was able to solve it
@@yasuofedeer9851 how? Can you help me too?
Hello! Thank you for visiting, and for this feedback, my program is definitely flawed! I'm glad you solved the issue, please share how so if you've the time 😊
@@Myxoceph you should free argv if it was dynamically allocated (what's returned from split)
min 19:18 median is 7. so to bring 7 to top we will need to ra() twice or rra() three times so better use ra() if (target node >= median).
yes, but since index starts in 0 you get ra twice ;)
min 34:26 line 40 - 42. why to we need the "if check" twice ?
Hello, thanks for visiting! We need to do it twice because the algorithm requires us to push the first two nodes to stack [b] (if [a] has >4 nodes), but only push the first node if [a] has 4 nodes.
Hello again, i have a question do we need to calculate the cheapest when we have to push from stack_b to stack_a ?
Hi, sorry for the late reply! No, we only need to make sure [b] node is pushed on to the correct [a] node, so we move it (the [a] node) to the top before doing so @16:42
Hello, thank you for the tutorial very useful, although i have a question. Why in minute 15:45 you say that the pushcost of 7 is 3 when we can make rr and ra so 2 operations to put both in the top. Thank you in advance.
Hello, thank you for dropping by! At that state of configuration, the push cost for 7 is 3 because we need to rr twice in stack a: 1st rr to bring 42 to top, 2nd rr to bring 7 to top. Let me know if I've missed something or if I've understood your question incorrectly and we'll try again, good luck friend! 😊
@@thuggonaut ok now i understand but why we do not use only rotate in this case, so we make two moves till with 1 move we rotate both and with the other only a and we have 7 and 0 at the top. I make this think because i tried to fallow a logic on my code (not tested yet) where i add 1 to the median. Anyway thank you for your help and sorry for my english.
perfect tutorial keep it up
Thank you! Cheers!
hai whos from 1337 lol
Feen cv kh or bg or med hhhh
hey its me again, after 2 days of coding i have found and solved every error finally, here is a list of the errors in your code: 1- memory leaks when you pass one argument only due to non freeing the result of split. 2- ex: ==1871== ERROR SUMMARY: 387 errors from 1 contexts (suppressed: 0 from 0). while trying to pass 100+ arguments due to non initializing the node->cheapest. 3- your program will return an error when passing args like this for example: ./push_swap "4 5 3" "9 -50 11" "7 50" however, it should work fine and sort them as per the checker. i mentioned the errors cause i spent a lot of time finding them and fixing them so i wrote them here to be a reference for anyone who didn't do the project yet. update: i got some people contacting me regarding this project so if anyone interested you can check my code from the below link: github.com/amarzouk140/Push_swap-42 thank you for your effort and time. i really enjoyed lessening and learned a lot. best of luck.
I passed this project by watching this video, thank you so much.
Amazing work, yay!
Your code has a memory leak if you put all your arguments into one argument (due to the result of ft_split not being freed)
Hello, thanks for your feedback 🙏 I didn't test for memory leaks but knew that could be the case, what you've written. I chose the easiest route possible to get the project done and didn't want to worry about it too much as long as it worked, and so I created a different split() to ft_split(). split() is only responsible for splitting a string, and returns NULL at any point where malloc is unsuccessful. init_stack_a() is responsible for appending nodes if there are no errors. If there are errors the stack is freed. Thanks again and good luck!
was you able to solve that matter? cause i have been spending hours working on that part to prevent the leak but i solved half of it only! if you did please share it and thanks in advance
@@Ay_140 you have to free the result of ft_split if used (it should be used only if you have one argument) if your variable is **splited_str, then you free(splited_str[0]) and then free(splited_str[1]) until splited_str[i] is NULL, and then you free(splited_str)
@@RiDOU-p2g i have done this but im still getting one block of memory not freed, searched everywhere but couldn’t fix it 😓 When i fix it it affects the behavior of the full function. If you did it right share your git hub solution if you don’t mind 🙏🏻
@@Ay_140 I'm sorry you had to do this as my code has flaws! Someone else opened an issue in my GitHub regarding this, I'm wondering if that will shed any helpful light as well. Please do let me know how you go to solve it 🙏🏼 Also thanks @user-vh6rl1se8e for highlighting the leak and solution 😊
Hello, im still at b2br, i dont really like that project so during my free time i was wondering if i should start learning how to do the next project, push swap. I didnt watch the vid yet, do you recommand me to try push swap alone and then look at ur vid, or watching it first is a good way to start it well?
Hi! Thanks for visiting :) B2BR is tedious, but I liked that I didn't have to "think" much with it haha. Always great to have a go at it first, for sure. You could even watch the first half which explains visually how the swap/push operations and linked lists work, then have a go at coding it. Even if your chosen sort algorithm is different to mine, it can be transferrable. Good luck with 42!
I didn't know it was you!!! When I figured it out, I was like: "Let's go, 42 Adelaide". Caring is sharing. Thanks so much for your effort.
Haha 😊 I hope it was helpful. See you around!
This is great. Being someone at 42 and had taught before it would make way more sense why you want to do something and then how you do. Great work.
Thank you for the kindness 😊
Can you create video for projet minishell
Hello! I'm not up to minishell yet, but will definitely consider it once I am.
can you explain get next line pls?
Hello 😊 I won't be able to anytime soon, but I found this video super helpful m.ua-cam.com/video/-Mt2FdJjVno/v-deo.html or check out my guide on the GitHub link that scored me 125%
@@thuggonautthanks!
nice
Awesome video, thank you!
Thank you friend!
Amazing explanation!!! Helped me a lot
Thank you friend! That makes me happy 😊
I am now 3 months in 42....and this is the best Tutorial i have ever seen until today....for a 42 project to understand whats going on. You do it perfect in a slow and smooth mode to help us to understand. Thank you for that and please do more of that. So good. 😀👍🙏
Thank you for your kind words and feedback. It makes my heart so glad you found it helpful 😊
Great video!
Thank you! 😊
Yay, more 42 tutorials ! 🎉 And this one must have been a lot of work. I really like how you structured the video and visuals, it’s great 👏🏻
Thanks so much friend! You helped me massively with get_next_line (despite it not being English) and I linked your video in my github for it. I didn't know how to reach out to you, but I am so grateful for you!
@@thuggonautThank you so much for the kind words, I’m really happy the GNL video helped !
I like it a lot! 👍
Amazing explanation 🔥 congrats, keep it up your channel will explode ! 👊🏻
Thank you forever!
It's a great video that was much needed for the community. Thank you for stepping forward and taking action. I appreciate the shoutout, and you pronounced my name 100% correctly. Thank you Thuy! 😃🙏
I so appreciate you!