CodeVault
CodeVault
  • Видео 301
  • Просмотров 6 987 016
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
Просмотров: 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
Local vs global variables in C
Просмотров 16 тыс.3 года назад
Local vs global variables in C
How to use scanf with fgets
Просмотров 32 тыс.3 года назад
How to use scanf with fgets
Progress bars with pure HTML
Просмотров 1,4 тыс.3 года назад
Progress bars with pure HTML
The autocomplete input nobody is using (HTML datalist tag)
Просмотров 2,1 тыс.3 года назад
The autocomplete input nobody is using (HTML datalist tag)
Less Known Input Types in HTML
Просмотров 8133 года назад
Less Known Input Types in HTML
Form Input Validation in HTML
Просмотров 23 тыс.3 года назад
Form Input Validation in HTML
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)
Why are function pointers useful?
Просмотров 28 тыс.3 года назад
Why are function pointers useful?
Intro to recursive functions in C
Просмотров 13 тыс.3 года назад
Intro to recursive functions in C

Комментарии

  • @11nanana58
    @11nanana58 День назад

    Thank you so much !

  • @HieuLe-ri2jh
    @HieuLe-ri2jh День назад

    So easy to understand with the hand language! thank you

  • @tarekhamdoudi3144
    @tarekhamdoudi3144 2 дня назад

    Thank you so much for this explanation.

  • @priyapandey9813
    @priyapandey9813 3 дня назад

    What if we want to execute rest of the program seamlessly?

  • @moizcrafts3893
    @moizcrafts3893 3 дня назад

    this seem to me impossible while studying in uni,but now u have explained it really good

  • @HeatherHolt
    @HeatherHolt 3 дня назад

    your videos are very helpful, thank you!!

  • @enzoys
    @enzoys 4 дня назад

    these are awesome! please comeback to this series!

  • @enzoys
    @enzoys 4 дня назад

    this video is so underrated! thanks!!

  • @nininachkebia501
    @nininachkebia501 4 дня назад

    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!!!

  • @muhammadchaudhry4078
    @muhammadchaudhry4078 4 дня назад

    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

    • @CodeVault
      @CodeVault 2 дня назад

      %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

  • @sty1623
    @sty1623 4 дня назад

    Idk who this guy is, he looks really random but bro is a gigachad

  • @kavalan9588
    @kavalan9588 4 дня назад

    Great

  • @thatianamoreira9636
    @thatianamoreira9636 5 дней назад

    You're an excellent teacher! Thanks so much!!! I'm a brazilian Software Engineering student and your videos are helping me a lot!

  • @tarekhamdoudi3144
    @tarekhamdoudi3144 5 дней назад

    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.

    • @CodeVault
      @CodeVault 2 дня назад

      Yes, this should also work if insert_beginning is implemented properly and sets the root node when *tail is NULL

  • @flames1087
    @flames1087 7 дней назад

    I Love your Teaching 💖

  • @MrSkyydude
    @MrSkyydude 8 дней назад

    Thank you, sir. I needed the explanation, you rock.

  • @bahadryldrm6833
    @bahadryldrm6833 9 дней назад

    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.

  • @alooche_diary
    @alooche_diary 9 дней назад

    thank you <3 u r making my life easier

  • @hereticstanlyhalo6916
    @hereticstanlyhalo6916 10 дней назад

    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.

    • @CodeVault
      @CodeVault 2 дня назад

      It should be possible to show the file name properly. Haven't worked with it enough to know how though

  • @afridshaik-fk2yu
    @afridshaik-fk2yu 10 дней назад

    great

  • @deltaoui
    @deltaoui 11 дней назад

    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 ?

    • @CodeVault
      @CodeVault 2 дня назад

      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)

  • @samaellovecraft
    @samaellovecraft 11 дней назад

    Thanks for the knowledge!

  • @user-sf2lr4vn5z
    @user-sf2lr4vn5z 12 дней назад

    It's just simple and important things that I've learned from this video

  • @Parallaxxx28
    @Parallaxxx28 12 дней назад

    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?

    • @CodeVault
      @CodeVault 2 дня назад

      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

  • @mohsenzare2511
    @mohsenzare2511 12 дней назад

    Thanks for your video, in this case I think endianess of the machine also can create some problem! am I right?

    • @CodeVault
      @CodeVault 2 дня назад

      Yes, that is right. Binary files are incredibly sensitive to any type of memory differences while text files aren't

  • @kostas791
    @kostas791 13 дней назад

    Why did it take so long to end when you tried 8 threads? Felt like sequential calculation

    • @CodeVault
      @CodeVault 2 дня назад

      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

  • @daria7324
    @daria7324 13 дней назад

    The problem can be eliminated by using pthread_mutex_trylock() instead of pthread_mutex_lock(), can't it?

  • @mehdierdem7
    @mehdierdem7 14 дней назад

    Really you explain very good but I dont know english so good

  • @thetruth65756
    @thetruth65756 14 дней назад

    Who else is here from CS 341 at UIUC 😂

  • @emirhandemir3872
    @emirhandemir3872 14 дней назад

    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?

    • @CodeVault
      @CodeVault 14 дней назад

      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);

    • @emirhandemir3872
      @emirhandemir3872 14 дней назад

      @@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.

    • @CodeVault
      @CodeVault 14 дней назад

      @@emirhandemir3872 It should work on Ubuntu properly. Just use the Linux file system for it and don't create fifos inside Windows

  • @sabinpaduraru1066
    @sabinpaduraru1066 14 дней назад

    Mulțumim!

  • @emirhandemir3872
    @emirhandemir3872 14 дней назад

    Things got lot more complicated but I'm still able to keep up with the help of GPT. I love you OpenAI!

    • @CodeVault
      @CodeVault 14 дней назад

      Just be careful, GPT, a lot of the time, provides wrong information

  • @emirhandemir3872
    @emirhandemir3872 14 дней назад

    Perfect explanation and amazing visualization. I wish my prof explained this to me like you!

  • @axmedkayse01
    @axmedkayse01 16 дней назад

    Amazing video for exec and os in general.

  • @TamaraCadorin
    @TamaraCadorin 16 дней назад

    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"?

    • @CodeVault
      @CodeVault 14 дней назад

      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)

  • @caiomazzaferroadami
    @caiomazzaferroadami 16 дней назад

    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?

    • @CodeVault
      @CodeVault 14 дней назад

      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?

  • @axmedkayse01
    @axmedkayse01 17 дней назад

    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.

  • @mouadse
    @mouadse 17 дней назад

    Great vid and excellent explanation. Thank you.

  • @Smile-si8xv
    @Smile-si8xv 17 дней назад

    arrayyy u r great ji😍

  • @harishraghavans3381
    @harishraghavans3381 17 дней назад

    Confused a bit, but now it was clear! Thanks for the video

  • @syedfahmi1436
    @syedfahmi1436 18 дней назад

    You are a life savior :D

  • @vyxgt2862
    @vyxgt2862 18 дней назад

    Would you say some like this is reasonable: printf("%d ", x > y ? x : y);

    • @CodeVault
      @CodeVault 17 дней назад

      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

  • @kitchenchem141
    @kitchenchem141 18 дней назад

    Thank you, I never knew exactly why I would need to use these

  • @beyzaucar4516
    @beyzaucar4516 18 дней назад

    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!

  • @user-ye9vn5sj5j
    @user-ye9vn5sj5j 18 дней назад

    YOU saved my life thank u so mmmmmmmmmmmmmmmmch

  • @HaroldX7677
    @HaroldX7677 18 дней назад

    Maybe i should be set to -1 so that the loop will start again from 0?

    • @CodeVault
      @CodeVault 17 дней назад

      Which of the loops?

  • @caiomazzaferroadami
    @caiomazzaferroadami 20 дней назад

    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.

    • @CodeVault
      @CodeVault 19 дней назад

      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

    • @caiomazzaferroadami
      @caiomazzaferroadami 19 дней назад

      @@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.

  • @krtirtho
    @krtirtho 20 дней назад

    I wish u were my professor

  • @aicoding2010
    @aicoding2010 20 дней назад

    it means that we need to write .h file fot each .c file?

  • @deldia
    @deldia 20 дней назад

    Excellent. And what is the point of this? To take advantage of modern multicore processors that can execute forks at the same time?

    • @CodeVault
      @CodeVault 20 дней назад

      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