- Видео 817
- Просмотров 8 786 177
Portfolio Courses
Добавлен 9 июл 2019
At Portfolio Courses our goal is to help you build a portfolio of work that you can use to showcase your skills to potential employers, colleagues and clients! Nothing says you can do the job like real projects completed for your own fun and learning.
We'll be offering a suite of courses at PortfolioCourses.com to allow you to grow your technical and soft skills while building an awesome portfolio of work. On this RUclips channel we'll be offering free tutorials covering various technologies and programming languages.
You can help to support the channel by subscribing and helping to spread the word to your friends!
We also accept PayPal Donations using the link below... even small donations make a big difference and really help make Portfolio Courses possible!
We'll be offering a suite of courses at PortfolioCourses.com to allow you to grow your technical and soft skills while building an awesome portfolio of work. On this RUclips channel we'll be offering free tutorials covering various technologies and programming languages.
You can help to support the channel by subscribing and helping to spread the word to your friends!
We also accept PayPal Donations using the link below... even small donations make a big difference and really help make Portfolio Courses possible!
Resize A String Stored In Dynamically Allocated Memory | C Programming Example
How to resize a string stored in dynamically allocated memory using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/resize_string_dynamically_allocated.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Просмотров: 575
Видео
Remove The Last Character In A String | C Programming Example
Просмотров 53521 час назад
How to remove the last character in a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_last_string_char.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Reverse The Words In A String | Python Example
Просмотров 294День назад
How to reverse the words in a string using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/reverse_string_words.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Print A String In Reverse | C Programming Example
Просмотров 547День назад
How to print a string in reverse using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/print_string_reverse.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Count The Words In A File | Python Example
Просмотров 455День назад
How to count all the words in a file using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/count_words_in_file.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Convert Seconds To Days, Hours, Minutes and Seconds | C Programming Example
Просмотров 680День назад
How to convert a total number of seconds into the equivalent number of days, hours, minutes and seconds using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/convert_secs_to_days_hours_mins_secs.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Count The Words In A String | Python Example
Просмотров 32914 дней назад
How to count all the words in a string using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/count_words_in_string.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Remove All Punctuation Marks From A String | C Programming Example
Просмотров 80814 дней назад
How to remove all the punctuation marks from a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_punctuation_marks.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers! Introduction To Pointers: ruclips.net/video/oe2bZKjiWrg/видео.html Passing An Array To A Function: ruclips.net/video/oe2bZKjiWrg/видео.html
Remove All Punctuation Marks From A String | Python Example
Просмотров 36914 дней назад
How to remove all punctuation marks from a string in Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/remove_punctuation_marks.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Remove Last Occurrence Of A Character From A String | C Programming Example
Просмотров 93221 день назад
How to remove the last occurrence of a character from a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_last_char_occurrence.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers! Introduction To Pointers: ruclips.net/video/oe2bZKjiWrg/видео.html Passing An Array To A Function: ruclips.net/video/oe2bZKjiWrg/видео.html
Append Text To A File | Python Example
Просмотров 621Месяц назад
How to append text to the end of a file using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/append_text.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Remove First Occurrence Of A Character From A String | C Programming Example
Просмотров 988Месяц назад
How to remove the first occurrence of a character from a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_first_char_occurrence.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Count The Occurrences Of A String In A File | Python Example
Просмотров 490Месяц назад
How to count the occurrences of a string in a file using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/count_string_in_file.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Check If A Character Is In A String Algorithm | C Programming Example
Просмотров 1,1 тыс.Месяц назад
How to check if a character is in a string with an algorithm in C, i.e. without using the built-in strchr() function but instead implementing a solution ourselves. Source code: github.com/portfoliocourses/c-example-code/blob/main/check_char_in_string.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Convert Seconds To Days, Hours, Minutes & Seconds | Python Example
Просмотров 460Месяц назад
How to convert a total amount of seconds to the equivalent number of days, hours, minutes and seconds using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/convert_secs_to_days_hours_mins_secs.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Check If Strings Are Equal Using Recursion | C Programming Example
Просмотров 1,3 тыс.Месяц назад
Check If Strings Are Equal Using Recursion | C Programming Example
Print A String Using Recursion | C Programming Example
Просмотров 1,4 тыс.Месяц назад
Print A String Using Recursion | C Programming Example
Monty Hall Problem Simulation | Python Example
Просмотров 8472 месяца назад
Monty Hall Problem Simulation | Python Example
Convert Inches To Feet And Inches | Python Example
Просмотров 3462 месяца назад
Convert Inches To Feet And Inches | Python Example
Shuffle A String | C Programming Example
Просмотров 1,4 тыс.2 месяца назад
Shuffle A String | C Programming Example
Shuffle The Lines Of A File | Python Example
Просмотров 3562 месяца назад
Shuffle The Lines Of A File | Python Example
Convert Feet To Inches And Feet | C Programming Example
Просмотров 6872 месяца назад
Convert Feet To Inches And Feet | C Programming Example
Sum The Digits In A String | Python Example
Просмотров 9243 месяца назад
Sum The Digits In A String | Python Example
Sum The Digits In A String | C Programming Example
Просмотров 2,5 тыс.3 месяца назад
Sum The Digits In A String | C Programming Example
Count The Occurrences Of A Value In A List Using Recursion | Python Example
Просмотров 6703 месяца назад
Count The Occurrences Of A Value In A List Using Recursion | Python Example
Sum Numbers In List Using Recursion | Python Example
Просмотров 4833 месяца назад
Sum Numbers In List Using Recursion | Python Example
Reverse A String Using Pointers | C Programming Example
Просмотров 4,3 тыс.3 месяца назад
Reverse A String Using Pointers | C Programming Example
time(NULL) Explained | C Programming Tutorial
Просмотров 4,1 тыс.3 месяца назад
time(NULL) Explained | C Programming Tutorial
Count The Occurrences Of Each Item In A List | Python Example
Просмотров 4933 месяца назад
Count The Occurrences Of Each Item In A List | Python Example
In my case the password was not there anymore. Is it possible that my system or compiler is re-writing this memory space?
Recursion: the most overrated wet dream of computer science academics. In practice, it's almost always better in terms of performance, resources, readability and maintainability to use iterative methods.
Hahaha 'wet dream of computer science academics'. :-P I hear you, but recursion actually does have *some* practical use cases with certain data structures, it's a best tool for the job situation where it's rarely the best tool for the job. We teach recursion in 'academia' mostly as a way of teaching how to think computationally and solve problems. To me the real 'wet dreams of computer science academics' are things like Agda: en.wikipedia.org/wiki/Agda_(programming_language).
Note: realloc() could fail, this video explains how to handle it: ruclips.net/video/skqCnhhA0ZY/видео.html. 🙂
I also noticed that if you malloc space into pointer a and realloc it into pointer b you cannot free(a). You still have access to the address in a but it seems that realloc frees the variable. Then looking into that value in a it might be the original one or not. On the safety concerns calloc does not seem to solve the issue, we would need a "crealloc" or something that when copies the data from one place to another zeros the original memory value too if I got it right.
End program. End program. End program. End program. End program. End program. End program. End program.End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program.End program. End program. End program. End program. End program. End program. End program.
sure, but if it returns NULL would it not be better to store the return address to a different pointer and then determine if string will point to it? this happens more often than one would think in small embedded chips.
in that case you don't want to use realloc? just manually malloc new space and free old space?
@@bugurme1 realloc with a NULL argument amounts to the same thing. i am saying that checking for NULL is important. you can not avoid fragmentation as long as you deal with heap instead of stack.
Yeah this video is intended for beginners, if anyone wants to learn more about handling realloc failures check out this video covering the topic: ruclips.net/video/skqCnhhA0ZY/видео.html
first thank for the videos I am learning a lot through them! I did tried the clock part for this example and not sure why but I am getting in many runs a faster time for the calloc allocation. Any idea what might be going on? I am using gcc in an ubuntu os.
If I have old laptop which support win 8.1 or can say ideal windows environment on that laptop. My Q's is Vscode not supported any more now on win 8.1 can we use pycharm for chatbot etc kind of programming in win 8.1
love from Bangladesh!
46 years as a software developer (over half doing C/C++) and this is the most succinct and complete example of the UNIX/LINUX time code without the pages and pages of boilerplate. You are a true craftsman!
In the second method (iterating through characters until we reach the null terminator), you may have forgotten to remove the #include for the string.h since we no longer are using strlen function.
We don’t need it in that case yes, I’m just demonstrating a different way to do it. :-)
Dude, You have helped me a ton more than possible, you explain things so much better than most tutorials out there, Thank you so much!
That’s so great to hear, thanks for sharing this, and you’re very welcome! :-)
for some reason i really do not like and having a hard time comprehending the for loop that contains i j k as indices at the same time. So instead I prefer while loop.
It’s definitely a subjective thing, beautiful code is sometimes in the eye of the beholder! :-)
@@PortfolioCourses Thank you so much programming sensei
Do you have any videos on unit testing in c?
Unfortunately no, but I do want to cover that topic one day. :-)
Sir non overlapping in substring example
I have watched many videos teaching what pointer is and how to use, but only this one can make me truly understand how to use pointer in a few minutes. This must be a good day for me, as I have learnt thing from a genius.
That’s awesome this video was helpful for you and thank you so much for the kind words! :-)
Is is good to use delete operator inside the destructor?
Sometimes we really should in order to “clean up” things that the object is responsible for cleaning up. Like if you delete a Person object and a Hand object is created and “owned” by that Person object from initialization until deletion then the Person object should delete it, for example.
@@PortfolioCoursesOkay, Got it! Btw Your content is just mind blowing!🔥Keep sharing knowledge with begginers like us!
❤nice😊
I’m glad you liked it! :-)
you can even remove all the elses because you are returning from all the ifs
Yep, that’ll work too!
// While practicing functions, I encountered an error. Can you explain why? // I tried using `void` as an argument in the function call. // Why can't `void` be used this way, and what is the proper way to call a function that takes no arguments? void myFunction(void) { // Function body } int main() { myFunction(void); // Why is this incorrect? return 0; }
For a function that takes no arguments you can just call it like this: myFunction()
Nice explanation
I’m glad you enjoyed it! :-)
Nice videos mate! Appreciate it❤
You’re welcome, I’m glad you like them! :-)
wouldnt the break case have to be if (n == 0) return 1 Because 0! = 1
If we want to support the convention that the factorial of 0 is 1 then yes, this function was made as a simple example of recursion assuming we’re finding the factorial of positive integers. :-)
you are the besttttt!!!!!!!!!! thank youu
You’re welcome and thank you for the kind words! :-)
Thank youuu
You’re welcome! :-)
This IDE software so beautiful, Can I know this software which you use to program
Xcode on MacOS :-)
Back on the day when I worked on Big Blue Heavy Iron (IBM mainframes), we called it "hat racking" because we'd drag the coat and hat rack into our office and explain our code to it. Prefer some entity a little more grown up than using something I would have bathed with when I was six years old. But you do produce impressive and helpful videos! Very grateful as they have helped me unwind some exceedingly bad habits from my career days.
Thanks so much for sharing this, I had never heard of the term "hat racking before", that's super interesting how the concept was always there before it was given a new name. :-)
simple and useful, thank you guys for the help
what if user input numbers?Is it same?
Hi there..We can use strrev() right
It’s not a standard C function and so may not work with all compilers, but yes you can use it to reverse a string. :-)
Great course. But, also include how to setup the code environment like code editor and compiler for C because there's still some beginners don't know how do it like me.
There are links in the description that show how to do this that are mentioned at the start of the video. They are not included in the video themselves because environments are different from one operating system to next and change over the years. :-)
Great!!!
Glad you liked it! :-)
C is fun! And useful. Thank you!
You're welcome! :-)
I really appreciate what you doing. I'm learning c now and all of those video, even short one like these when you explain these thing clear are very useful! Thank you. I would also like if you would do videos when you build some big projects in c and show the process, and maybe some networking in c, socket extra... Thanks again❤🎉
You're welcome! :-) One day I'd like to cover some more advanced topics in C.
@@PortfolioCourses great! Thanks again😊
I have to say that I am eternally grateful for all the work you do. This is one of the best coding tutorials I've watched. And I believe that like many here I've watched A LOT!!! So that is really saying something. Your voice is excellent for narration and the way you set up your windows and explain everything so concisely and in more than one way is just so damn good. I am sorry I cannot pay you monetarily but sir I truly appreciate your work. I hope you realize just how much of a contribution you have done for the coding community. Also it's very surprising that for such an important and ubiquitous language like C, there is so much lacking in terms of good videos like for other languages. Once again, thank you very much and the best of luck in everything you do!
Thank you so much for this very kind feedback, it's great to hear that you enjoy the style of the videos, and I really appreciate you taking the time to write this nice message. :-)
@@PortfolioCourses you're very welcome! I just finished this video but I already have so many of the videos in your channel bookmarked. I will do a textbook on C now by Stephen Prata called "C Primer Plus" but I'm much more confident now that I'll be able to follow along.
Today, I secured an internship in the imaging and video field, where I'll primarily be coding in C! Your videos have sparked my interest in learning C and have paved the way for opportunities such as teaching assistant in a procedural programming course and now this internship. Thank you!
Congratulations on securing the internship, that's excellent!!! :-) And thank you so much for sharing this story with me, these are my absolute favourite stories to hear, it means a lot to me that these videos have helped you on your journey. You're very welcome! :-D
GnirtS A
Hahaha
Portfolio Courses, wanna collab it was really good
I'm a middle-aged dude that is a bit out of touch with video games now, I'm not sure what I could do that is related to Fornite? :-)
Please, is there a way of doing it with Smart Pointers?
I did some modification to your program. I even tried using Smart Pointers but it didn't work. #include <iostream> #include <vector> #include <string> #include <math.h> class Shape { public: virtual double area() = 0; virtual const std::string name() const = 0; }; class Square : public Shape { public: Square(double side) : m_side(side) {} virtual double area() final { return pow(m_side, 2); } virtual const std::string name() const { return "square"; } ~Square() {} private: double m_side; }; class Triangle : public Shape { public: Triangle(double base, double height) : m_base(base), m_height(height) {} virtual double area() final { return 0.5 * m_base * m_height; } virtual const std::string name() const { return "triangle"; } ~Triangle() {} private: double m_base; double m_height; }; class Parallelogram : public Shape { public: Parallelogram(double side1, double side2) : m_side1(side1), m_side2(side2) {} virtual double area() final { return m_side1 * m_side2; } virtual const std::string name() const { return "parallelogram"; } ~Parallelogram() {} private: double m_side1; double m_side2; }; class Circle : public Shape { public: static double pi; Circle(double radius) : m_radius(radius) {} virtual double area() final { return pi * pow(m_radius, 2); } virtual const std::string name() const { return "circle"; } ~Circle() {} private: double m_radius; }; double Circle::pi = 3.1452; int main() { Shape* shapes[4] = { new Square(4), new Triangle(6, 9), new Parallelogram(11, 6), new Circle(7) }; for (int i{ 0 }; i < 4; ++i) { std::cout << "Area of " << shapes[i]->name() << ": " << shapes[i]->area() << " sq units "; } for (int i{ 0 }; i < 4; ++i) { delete[] shapes[i]; } return 0; }
i love this informative video. pls make more. Thank u love you so much!! This have me new ideas. Please remember my name as i might come to see you soon. ttyl!!! xoxo
This was very helpful, thank you so much! Also I know it's 2 year's old but this video is rock solid and the instruction's and explaination's are great!
bro thx so much love how it turned out :)
Sir, i start programming in C as hobby. But now i am enjoying. It will more enjoyable if you teach about Graphics in c. Thanks for your amazing teaching.
can you show plz
in which compiler are you execute
Great explanation! In the embedded world I would argue that the "int * p3" decelerationis the most common. Although, in function declerations it would typically be "int const * p3"
matur nuwun
Can you make a video on the Dijkstra's algorithm in Python or C?
I do want to cover that topic one day, yes. :-)
I didn't understand how you calculated mid, wouldn't you have to sum the two extremes and divided them by 2 to find the mid point?