- Видео 301
- Просмотров 6 987 016
CodeVault
Румыния
Добавлен 14 янв 2018
How to use realloc in C
Source code can be found here:
code-vault.net/lesson/707793f87fa3afa04fc4b0331f001c94
===== Support us through our store =====
code-vault.net/shop
===== Check out our website =====
code-vault.net
===== Check out our Discord server =====
discord.code-vault.net
code-vault.net/lesson/707793f87fa3afa04fc4b0331f001c94
===== Support us through our store =====
code-vault.net/shop
===== Check out our website =====
code-vault.net
===== Check out our Discord server =====
discord.code-vault.net
Просмотров: 8 100
Видео
Convert string to Lowercase in C
Просмотров 2,5 тыс.11 месяцев назад
Source code can be found here: code-vault.net/lesson/f9ab933d7e9911fec72f423481001007 Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
How to vertically align to the middle in CSS
Просмотров 3,8 тыс.Год назад
Documentation: phrogz.net/CSS/vertical-align/index.html howtocenterincss.com/ stackoverflow.com/questions/79461/how-can-i-vertically-align-elements-in-a-div Source code can be found here: code-vault.net/lesson/a26301837825aa4e65e309fec0000bea Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
Don't make the same mistake I did!
Просмотров 913Год назад
Some documentation links: developer.mozilla.org/en-US/docs/Web/CSS/gap developer.mozilla.org/en-US/docs/Glossary/Gutters Source code can be found here: code-vault.net/lesson/ac8f1cdcbd049744d3b710634b000b99 Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
What are variadic functions (va_list) in C?
Просмотров 19 тыс.Год назад
Source code can be found here: code-vault.net/lesson/cc1b9349b69947ffe53059a914001612 Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
Measure execution time in C (for Linux and Windows)
Просмотров 9 тыс.Год назад
Links related to the topic of measuring execution time: stackoverflow.com/a/37920181 learn.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps?redirectedfrom=MSDN Source code can be found here: code-vault.net/lesson/7475a60f972f545c64ae6e5ab80007af Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server disco...
Format and parse datetime in C
Просмотров 3,6 тыс.Год назад
Source code can be found here: code-vault.net/lesson/242e8f1b0b13ccdba2df01e2ef000f77 Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
How to get current time and date in C
Просмотров 12 тыс.Год назад
Source code can be found here: code-vault.net/lesson/931c1634bae351f1ec660773c5001a5b Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
How to get environment variables in C
Просмотров 8 тыс.Год назад
Source code can be found here: code-vault.net/lesson/ Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
How to generate random strings from a set of characters in C
Просмотров 2,9 тыс.Год назад
Source code can be found here: code-vault.net/lesson/ Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
How to generate random strings in C
Просмотров 3,6 тыс.Год назад
Source code can be found here: code-vault.net/lesson/fc94674ac35b48369c08eb6283003b0a Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
What does fork() actually return?
Просмотров 3,7 тыс.Год назад
Source code can be found here: code-vault.net/lesson/c5746b15bc917ba13615a0ec8c0011c1 Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
Post-increment vs pre-increment in C (a++ vs ++a)
Просмотров 14 тыс.2 года назад
Source code can be found here: code-vault.net/lesson/ Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
Global functions in multi-file projects in C
Просмотров 8 тыс.2 года назад
Source code can be found here: code-vault.net/lesson/ys1aqurr3x:1642707892012 Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
Sharing functions between files in C
Просмотров 27 тыс.2 года назад
Source code can be found here: code-vault.net/lesson/il55l1ce8h:1642625255796 Support us through our store code-vault.net/shop Check out our website code-vault.net Check out our Discord server discord.code-vault.net
Global variables in a multi-file project in C
Просмотров 15 тыс.2 года назад
Global variables in a multi-file project in C
Declaration vs. Definition of functions in C
Просмотров 4 тыс.2 года назад
Declaration vs. Definition of functions in C
Declaration vs. Definition of a variable in C
Просмотров 7 тыс.2 года назад
Declaration vs. Definition of a variable in C
How to find a string in an array of strings in C
Просмотров 9 тыс.2 года назад
How to find a string in an array of strings in C
Reading and writing a linked list to a file in C
Просмотров 14 тыс.2 года назад
Reading and writing a linked list to a file in C
The autocomplete input nobody is using (HTML datalist tag)
Просмотров 2,1 тыс.3 года назад
The autocomplete input nobody is using (HTML datalist tag)
The difference between DIV and SPAN
Просмотров 4,5 тыс.3 года назад
The difference between DIV and SPAN
Calling fork multiple times (part 2) (With a practical example)
Просмотров 39 тыс.3 года назад
Calling fork multiple times (part 2) (With a practical example)
Thank you so much !
So easy to understand with the hand language! thank you
Thank you so much for this explanation.
What if we want to execute rest of the program seamlessly?
Already addressed .. Thanks
this seem to me impossible while studying in uni,but now u have explained it really good
your videos are very helpful, thank you!!
these are awesome! please comeback to this series!
this video is so underrated! thanks!!
i'm here after 4 years and i just have to say that you saved me! i was attending every lecture in uni but still couldn't fully grasp the idea of muliprocess creation until i watched these videos!!! now i feel calm that i actually fully understand it and am not only learning it for the midterm!!!
Hey Guys! While getting execution of printf command with%hhd to display the binary characters in Visual Studio Code, it only gives result in decimal like 13 and not in binary. Can someone help to get the result in binary bytes for integers, as shown in the video.. Thanks
%hhd is decimal and I use it to print the 0s and 1s from a char data type (make sure that's what you are passing to printf). Otherwise you can use %x to print in hex for larger data types
Idk who this guy is, he looks really random but bro is a gigachad
Great
You're an excellent teacher! Thanks so much!!! I'm a brazilian Software Engineering student and your videos are helping me a lot!
Hello sir. First I'd like to offer my many thanks to you for laying out the concepts in a simplified approach. I just have one question though. What if we just omit the whole init() function, and write this insted: int main() { struct node* tail = NULL; insert_beginning(&tail, 3); struct node* head = tail; insert_beginning(&tail, 2); insert_beginning(&tail, 1); } This way, head is updated as soon as the first node is inserted, and stays like that for as long as new nodes are being added, right? Have a good day sir.
Yes, this should also work if insert_beginning is implemented properly and sets the root node when *tail is NULL
I Love your Teaching 💖
Thank you, sir. I needed the explanation, you rock.
Bro, this kinds of parallel programming topics was seemed to me as a taboo. But you made it very easy to understand. Thank you for sharing.
thank you <3 u r making my life easier
Do I have to do this to every file (with the macro and include)? Because it doesn't appear to show the file it was leaked at.
It should be possible to show the file name properly. Haven't worked with it enough to know how though
great
Nice tutorial, just one thing : I think you went too quickly on explaining the extra bytes with 00 after the last attribute of the struct. I am not sure I understand why it was added. Is it related to the fact that we always go in (8, 16, 32, 64, 128,..) in memory and you can't have something in between ?
It's to do with memory alignment. Basically each struct member is always going to be allocated to a memory address divisible by its size. This improves the speed at which the CPU caches the memory (amongst other things)
Thanks for the knowledge!
It's just simple and important things that I've learned from this video
Hey, i want to know how open() is implemented in the fcntl.h header file. Is there a way to look at the header files and try to implement the open function from scratch?
Yes. Linux is open source so the source is available online. Here is the source for the open function: github.com/torvalds/linux/blob/master/fs/open.c
Thanks for your video, in this case I think endianess of the machine also can create some problem! am I right?
Yes, that is right. Binary files are incredibly sensitive to any type of memory differences while text files aren't
Why did it take so long to end when you tried 8 threads? Felt like sequential calculation
Since all we're doing is adding to a variable, the mutex lock/unlock operations are very costly thus, the more threads we're creating the slower is. In practice this usually doesn't happen
The problem can be eliminated by using pthread_mutex_trylock() instead of pthread_mutex_lock(), can't it?
Yes, it could be
Really you explain very good but I dont know english so good
Who else is here from CS 341 at UIUC 😂
Hey man, I'm having a small issue. I can't create FIFO with the mkfifo("fifoname", 0777); I wrote an if statement to check if the return value was -1 and it was. I used strerror and it says Operation not supported. I know it's hard to answer without seeing the code or the directory but is there anything you can do?
You must be trying to run under WSL and you're creating a fifo on the Windows' file system. I think you could try creating the fifo directly in the wsl like so: mkfifo("/tmp/fifoname", 0777);
@@CodeVault Thanks. Yes, I was using wsl. Would this cause a problem? I have a homework about FIFO's and I worry it would cause a problem so, I started using Ubuntu but I also wonder If it would work.
@@emirhandemir3872 It should work on Ubuntu properly. Just use the Linux file system for it and don't create fifos inside Windows
Mulțumim!
Things got lot more complicated but I'm still able to keep up with the help of GPT. I love you OpenAI!
Just be careful, GPT, a lot of the time, provides wrong information
Perfect explanation and amazing visualization. I wish my prof explained this to me like you!
Amazing video for exec and os in general.
One of the best videos I have ever seen! Is there any possibility to reduce the numbers after the "." in the outcome. Let´s say instead of getting as the result number "5.649327" to have "5.6"?
You could generate integers instead and then just divide whatever number you get by 10 (or 100, 1000 etc. depending on how many digits you want)
If I don't care what is executed when I don't get the lock or if I don't want anything to execute when I don't get it, would it be okay to just call trylock and not checking for it's value?
I guess you could... but I am not sure about the use-case of that. Usually you try_lock because you want to do something based on if you got the lock or not. If you do the same for both cases... then why even call try_lock?
This is amazing video for fork() explanation, I am watching 4/2024 and it is far best video explaining about fork(). Thank you so much.
Great vid and excellent explanation. Thank you.
arrayyy u r great ji😍
Confused a bit, but now it was clear! Thanks for the video
You are a life savior :D
Would you say some like this is reasonable: printf("%d ", x > y ? x : y);
Yea. Once the condition becomes more complex or you're trying to have more than 2 branches, it's a good idea to simply use if statements
Thank you, I never knew exactly why I would need to use these
I was suffering while I was studying for my Parallel and Distributed Computing course, but then I found your channel and I nearly started to enjoy this subject! You're doing a great job, many thanks from my heart!
YOU saved my life thank u so mmmmmmmmmmmmmmmmch
Maybe i should be set to -1 so that the loop will start again from 0?
Which of the loops?
If both char buffers have the same size, why not writing (in the child) and reading (in the parent) the whole string with the null character instead of writing the lenght first? I mean, even if there is trash value after the null character, printf will not display it. I tested it and it worked.
You're right, that method also works. It just depends on the situation. The size of the string you're passing could be rather large in a few instances and therefore you would have to have a much larger buffer than what you're usually sending. This could waste a lot of processing power for just sending the "trash" bits
@@CodeVault Thanks for replying! It is truly commendable from your part to reply every comment. Also, I love your videos and the way you teach stuff.
I wish u were my professor
it means that we need to write .h file fot each .c file?
Usually, yes
Excellent. And what is the point of this? To take advantage of modern multicore processors that can execute forks at the same time?
Not quite. Threads are more suited for this task but processes are sometimes used too (your browser, for example uses multiple processes to take advantage of your multi-core processor). forks are more useful for running external programs from within your program and manipulating their input/output