I have been using Bing as my primary search engine for almost 2 years now.
Have I sold my soul to Microsoft?
Have I sold my soul to Microsoft?
🤯1🕊1
Cross Code
🔄 Swap Variables without a temp variable Here’s a quick and cool trick to swap two variables without a temp variable using XOR. a = 5 b = 9 a = a ^ b b = a ^ b a = a ^ b print(f"a = {a}, b = {b}") # a = 9, b = 5 Magic! ✨ Now a is 9 and b is 5.
btw this trick might not work with pointers:
Works fine for things like this:
Won't work if both pointers are pointing to the some memory location cause any nuumber XORed with it self is
Trade carefully kids
void swap_ints(int *a, int *b) {
*a = *a ^ *b;
*b = *a ^ *b;
*a = *a ^ *b;
}Works fine for things like this:
int a = 5;
int b = 6;
swap_ints(&a, &b);
//a =6, b = 5
Won't work if both pointers are pointing to the some memory location cause any nuumber XORed with it self is
0:int a = 5
swap_ints(&a, &a)
// a = 0
Trade carefully kids
🤔1
Forwarded from Mohammed Khalid
"Today we'll vibe code a dashboard, now if I tell the AI to make me a dashboard and wait"
"We'll cut ahead to when the AI is done"
"Now that it's made us a dashboard, we need to tweak it to get it just right."
"We'll use AI for the tweaks"
"Now we'll just wait for it to finish, we'll cut the video here and continue when it's done"
"I really don't like how it did the button here, so we'll ask it to change that."
"Now we wait"
"it crashed."
"Now we ask itwhy it crashed to fix the code"
"Now we tell it to make a backend"
"The backend crashed"
"Now we wait for the AI to fix everything"
"We'll cut the video here and come back after debugging"
"We're back again, but this time I asked Gemini because it's a little smarter"
"We'll cut ahead to when the AI is done"
"Now that it's made us a dashboard, we need to tweak it to get it just right."
"We'll use AI for the tweaks"
"Now we'll just wait for it to finish, we'll cut the video here and continue when it's done"
"I really don't like how it did the button here, so we'll ask it to change that."
"Now we wait"
"it crashed."
"Now we ask it
"Now we tell it to make a backend"
"The backend crashed"
"Now we wait for the AI to fix everything"
"We'll cut the video here and come back after debugging"
"We're back again, but this time I asked Gemini because it's a little smarter"
🤣1
Spent the night teaching little sis about flowcharts and how to write pseudocode. Am such a W brother.
Cross Code
https://youtu.be/cNywlNWan9o?si=pGAejJjZrHowDdfP
this video is enough for u all to understand what memory management is
me: *allocates space in heap*
also me: *assign another address to the pointer that was pointing to the heap*
🤡🤡🤡
also me: *assign another address to the pointer that was pointing to the heap*
🤡🤡🤡