You'd use a reverse proxy like nginx to route requests to the server you want to respond with.
Humans are very good at pattern recognition. Cyclomatic complexity ignores that, so code that is easy for a human to read can get a bad score. E.g. handling Win API messages:
switch (msg)
{
case WM_CREATE: return OnCreate(hwnd, lParam);
case WM_PAINT: return OnPaint(hwnd);
case WM_SIZE: return OnSize(hwnd, wParam, lParam);
case WM_COMMAND: return OnCommand(hwnd, wParam, lParam);
case WM_TIMER: return OnTimer(hwnd, wParam);
case WM_KEYDOWN: return OnKeyDown(hwnd, wParam);
case WM_CHAR: return OnChar(hwnd, wParam);
case WM_MOUSEMOVE: return OnMouseMove(hwnd, lParam);
case WM_LBUTTONDOWN:return OnLeftButtonDown(hwnd, lParam);
case WM_LBUTTONUP: return OnLeftButtonUp(hwnd, lParam);
case WM_RBUTTONDOWN:return OnRightButtonDown(hwnd, lParam);
case WM_RBUTTONUP: return OnRightButtonUp(hwnd, lParam);
case WM_SETFOCUS: return OnFocus(hwnd, TRUE);
case WM_KILLFOCUS: return OnFocus(hwnd, FALSE);
case WM_CLOSE: return OnClose(hwnd);
case WM_DESTROY: return OnDestroy(hwnd);
}
Complexity score: 17. Easy to read and verify? Yes.
LRESULT OnMouseMove(HWND hwnd, LPARAM pos)
{
if (tracking == dragging != selecting &&
(!cancelled == (buttons & MK_LBUTTON)))
return UpdateInteraction(hwnd, pos);
return 0;
}
Complexity score: 3. Easy to read and verify? No.
Thanks for your opinion, Claude.
You don't need to break up the pavement to add chargers. Indoors they usually add chargers to the wall spots, outdoors add them to (solar paneled) shade structures.
If you think I have made an error, feel free to point it out. I prefer being corrected than being wrong.
I've never understood why people are so reluctant to admit mistakes. Insecurity? I have no problem with it.
Cost to give every household rooftop solar: 133m × $22.5k = $3b
Should be "133m × $22.5k = $3000b"... or 3 trillion. You don't think the right side of the equation is part of the math?
Nah, I messed up looking at the answer, not with the math.
You messed up the math, so how is this admitting your mistake?
Having a baby is not necessarily a choice in America in 2026.
Call recording laws in some U.S. states require only one party to be aware of the recording, while other states generally require both parties to be aware. Several states require that all parties consent when one party wants to record a telephone conversation.
Chinese firms are already trying to replicate it. Giving them one to study may just accelerate the process.
they'll probably make sure that RAM only ever leaves China as part of more complex products
Which other components are subject to this limitation in China?
Before trying to learn and use the standard library, I'd advise you to write a few simple functions yourself:
void print_until(const char* str, char c)- print every character in str until you see c or null (Note: Don't print the c or null, which should ensure that a str that only contains a \0 doesn't crash.)const char* print_until_2(const char* str, char c)- as before, but return the pointer to where you found c or nullvoid print_delimited_by(const char* str, char delimiter, char separator)- use print_until_2 in a while-loop, don't print the delimiter, but do print a separator.
For example, print_delimited_by("1;2;3",';',',') should print 1,2,3.
Finally, void num_delimited_by(const char* str, char del) - like print_delimited_by, but add a number before every output, and use newline as the separator.
These fundamental string exercises will give you a solid foundation for understanding oantby's explanations about the standard library. Note that no memory allocation is necessary.
Didn't his net worth increase by something like 2.2 billion dollars as president? (..so_far.gif..)
Must be really good at predicting the markets, somehow. He's perhaps not that irrational when you consider his actual priorities (himself and his family), not whatever he is saying (MAGA).
Is it so much worse to say "shoot" than "throw them out the window"?
I have joked to my wife that our kids are lucky they're so cute so we don't throw them out of the window during a heavy day of misbehavior.
Obviously we wouldn't ever do that (even if they weren't so cute), so the joke is cathartic and can be funny in the right context.
I just learned that people who are allergic to shrimp are also allergic to cockroaches.
I admit I may be wrong so I asked you to show me an example, since you talk with such certainty.
In fact this is an open question so nobody knows, even though most of the researchers believe human computation is equal as far as I know.
Backwards jumps are equally decidable for turing machines as for humans. Compiler and static code linters can trace through very complicated code and know that it will or will not halt, and optimize or warn based on the result.
I believe there's nothing special about human computation abilities. Anything that is decidable by a human will be also decidable by a computer.
Please prove me wrong by showing a counter example.
Most of the "undecidable" are only undecidable for a subset of the problem instances, while a vast number of instances can be even trivially decidable. For example in the undecidable halting problem, both you and a computer can trivially deduce that while(true) will not halt. In the same way a computer can deduce that many instances of two pieces of code are semantically equivalent.
I'd like to see an instance of the problem where a human could decide it and the computer could not.