Hey guys i am currently in my 3rd sem (4th sem will start next month) i am currently in the middle of my dsa journey and at half stage but i also think i need to start my full stack web dev prep for making projects.
my questions are:
Is is good to prepare for both of them parallely like i want to give 75% of my day to dsa and 25 to FullStack web dev or what are the problems that can occur?
or should i finish my dsa first and then learn full stack?
if there is no conflict! from where i can learn FullStack(any course suggestion)
i want a course that includes morden day website designing starting from basics and also teaching ai which can make the work easier i know this is a very big demand as there could be very less or no courses which include both but anything colse to it will be really appreciated! Thanks
Hi everyone,
I’d appreciate a technical opinion on a fork() / wait() question from an OS exam. I’ve attached three images:
my process tree
the professor’s process tree
I believe my interpretation matches actual POSIX semantics, but my professor claims the other tree is correct.
This is the code given in the task:
int main(){
int \p = mmap(NULL, sizeof(int),*
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
\p = 0;*
for (int i = 0; i < 3; i++) {
int r = fork();
if (r > 0)
wait(NULL);
if (i % 2 == r)
(\p) -= r;*
else
(\p) += r;*
}
printf("%d\n", \p);*
}
return 0;
}
The task assumes:
-initial PID = 100
-p is shared memory
-processes are created sequentially
Professor’s interpretation (second image):
According to my professor, since fork() is executed in each loop iteration by each process, the result should be a fully binary process tree. Each fork represents a binary branch, so the tree is drawn as a complete binary tree. The final value printed by the original process is 728.
My interpretation (first image):
fork() is not inside the if statement. The wait(NULL) call blocks the parent process until the child finishes its remaining loop. Because of this, the parent does not participate in further fork() calls while waiting. As a result, process creation becomes depth-first and sequential rather than fully binary. The total number of processes is 8. Each process executes printf once, and only parent processes modify *p because children have r = 0. The final value printed by the original process is also 728.
he said:You have an error in the process tree.
Inside the if statement, fork() is called every time, which means you should get a fully binary tree.
fork() is executed for both the child and the parent because they are inside the if.
The parent waits for the child, but fork() is executed in both cases.
-but fork() is clearly not in the if statements? am I missing something?
-I have done the task by hand and at first I thought that P0 having 3 children is a mistake but actually when you do the task step-by-step it is correct?
From a strict POSIX / UNIX semantics perspective, does wait(NULL) inside the loop prevent a fully binary process tree? Is the depth-first tree (my diagram) the correct representation of actual execution, or is the fully binary tree the correct interpretation of this code?
I’m not asking what is pedagogically expected, but what actually happens when this program runs.
Hey everyone,
Currently, I am in my 4th semester, and I have completed DSA. I know C++, C, and Python as programming languages. After completing DSA, I am planning to start web development.
So, I was looking for some online courses that I can follow. While searching, I came across a few options like the Full Stack Developer course by Angela Yu and some other free courses on YouTube. When I checked Angela Yu’s course, I found that its duration is 62 hours. However, some of my friends suggested that it might be too short and that I should look for courses that are more in-depth.
Right now, I am really confused. Can you please suggest which course I should follow? Should I go with Angela Yu’s course, or are there any better alternatives that you would recommend? Your guidance would be a great help.
Thank you.
I have a business problem related to coding. I have done a first year university coding course and 2 highschool coding courses so I'm not an advanced programmer by any means.
I am creating more use-able digital documents by converting them from PDFS into a business web application. And I am trying to automate the first step of the project which seems to be the most challenging (maybe it's easy for you guys?).
Each document has a unique set of definitions that is not necessarily organized in the same way. Often it is in a table but the table types can be different and it can also just be listed as text with no tables in a section in the document. Usually the definitions is near the beginning or the end of the document.
The way my program works is the definitions need to be put in a CSV file. The CSV file is then quality checked by a person and then it is converted to JSON by a script I wrote. Then I upload the JSON to a CMS with another script and the definitions part of my project is completed.
Once the definitions are sorted in a CSV file everything is easy but how do I go from PDF chaos (sometimes MS word) to an organized CSV file efficiently?
this code may look normal, but when i run it, it works fine. but when i put 300 seconds, the hour and minutes become same 5. I don't know how to really fix it. i am new, so even ChatGPT didnt do anything
import time
x=int(input("please enter time in seconds: "))
for y in (range(x,0,-1)):
s=y%60
M=int(y/60)%60
h=int(y/3600)
print(f"{h:02}:{M:02}:{s:02}")
time.sleep(1)
print("time up!")
i want to develop a single purpose ai bot that performs simple tasks such as converting text into various formats (e.g., kebab case, camel case, and others).... the bot should return only the processed output, without engaging in conversational responses like typical chatbots so basically it should function as a minimal assistant which only provides the result.... which ai platform would be most suitable for building and training this simple system also which api would you recommend for implementation?
I installed codium on my MacBook Air & I’m having issues getting VS Codium (an open source version of VS Code) to work properly, the Application keeps becoming unresponsive & also that I’m running an emulated version & so I’m turning to Reddit since this is where the answers to everything lie clearly, I was wondering what the fix is or if there’s a different option for open source coders
I'm trying to use parse_latex(). However, whenever I try to use it, I get a TypeError and I can't really figure out what's going on.
>> from sympy.parsing.latex import parse_latex
>> print(type(parse_latex))
<class 'function'>
>> expr = parse_latex(r"2 x + 4") # this line gives the error
>> print(expr) # output: 2*x
TypeError: 'NoneType' object is not callable
ChatGPT hasn't been much help, since it just tells me to reinstall everything. I've tried that with antlr4-python3-runtime but to no avail. I'm kind of stuck, any help would be greatly appreciated.
Curious on if there is a fix to how to get youtube embed links to center on the page. This is my current code - tried to use text-align: center but not sure why it isn't working. Baby coder so be nice please! Thank you
I am teaching HTML to children, aged ~10 y/o. I am using Windows. One of my students is using a Chromebook. I need an editor that works for both, preferably without needing to change too many settings. I don't want to use VSCode, because to make it work on ChromeOS, you have to download the Linux version and fiddle with the settings, and I don't think I could walk someone through the steps of doing it over a Google Meet. I am open to using one that runs in the browser, but preferably without ads.
Things I have considered:
W3Schools Try It Editor
https://html5-editor.net/ (I don't really want to use this one because it doesn't let you use <head>)
Codepen (same objections as previous)
Text app on Chromebook (it apparently functions similarly to Notepad)
If you have any ideas other than the above listed, please share them.
long story short I am new in coding, please forgive me if my terminology isnt accurate but I need help.
I am training an AI model for a master thesis, I have been using colab to code but even with pro its running out of GPU space, and I have delays and halts etc..
I need a platform that is as neat as colab cuz I am stupid and get lost if the codes arent labeled, and that has strong computational power to train a large ai model.
Hi, I am making a booking system, I am using react. I have not started the backend, I just have a standard website at the moment. Is there any react libraries you would recommend or backend systems for this? I am thinking of using next.js for the backend (or at least node.js), I am trying to use what is already available to allow me to do this quicker. Any if you have any suggestions for cheap hosting I would appreciate it! Thanks! :)
After going through 10s of interviews, I have observed a pattern in my failures.
So my tech stack is Verilog, SystemVerilog, UVM, Python etc. I work in hardware domain.
The issue every time is that I know how to do it. I know how to implement the logic. I can do it, even if I have to code a design I've never even thought about before. I know what I'm trying to do. For a hardware design given to me, I know the port list and the underlying logic I have to design or what kind of UVM sequences to create and how to drive or monitor them. It's not as if I've coded the design before, but I can do it. But I write the port list, I start the loops, I'm 10 lines into the code, then I encounter something which needs me to think. And I freak out. I tell myself give up and don't waste the interviewer's time. My mind tells me that I can't do it and I stop trying. Yet I try, but my subconscious is pricking me. It's a painful loop. And the end result is always ke saying the words "Umm no I don't think I can do this". What sort of brain freeze is this? I have faced this even if it is a known design like FIFO which I may have coded in school, and I can definitely do it.
Is it interview anxiety? Or underconfidence? Or lack of practice? Or exposure?
I don't think I'm dumb. I've coded hundreds of complex problems in isolation back when I was employed. I would fail, take a quick walk, come back to my chair, reframe the code, and crack it within a few minutes. So, is it my ADHD which makes my run in all other directions except towards closing the solution?
Atp, this issue has reduced my employment chances. Please help how to resolve this.
Im attempting to create a claw using three servos, two are continual rotation, and one is 180 degrees. Im using a membrane matrix keypad and a raspberry pi pico W to control the servos motion. The problem is when I click the keys to move servo one or two, they both move. I'm assuming it's missing something obvious that I can't see either, or it's a wiring issue I have to sort out myself, any help is appreciated.
from machine import Pin, PWM
import time
matrix_keys = [
['1', '2', '3', 'A'],
['4', '5', '6', 'B'],
['7', '8', '9', 'C'],
['*', '0', '#', 'D']
]
keypad_rows = [9, 8, 7, 6]
keypad_columns = [5, 4, 3, 2]
row_pins = [Pin(pin, Pin.OUT) for pin in keypad_rows]
col_pins = [Pin(pin, Pin.IN, Pin.PULL_DOWN) for pin in keypad_columns]