Media is too big
VIEW IN TELEGRAM
To make the first year anniversary(lmfao) of this channel I official announce that I am Arch user BTW. been ricing this shit for a minute now
Days away from mock exam, and 2 weeks away from exit exam.
Me: literally reading webnovels and manhwa.
Some peak life situation.
Me: literally reading webnovels and manhwa.
Some peak life situation.
π3π1
To much shit posting this days. Lets talk about Endianness.(not to be confused with pajeets)
Endianness is the order in which bytes are stored in memory.
Their are 2 common formats which are Big Endian and Little Endian.
Big Endian system: Stores the most significant byte first (at the lowest memory address.)
example: If we had a hexadecimal
where the left is the lowest address and the right is the highest address.
Little Endian system: Strores the least significant byte first. it is used in most modern computers like x86 uses it.
Lets ake the earlier example:
for
welp its just flipping the order.
It kinda doesn't matter for the most part when ur build Ur next AI MEGACORP but its nice to know if ur doing networks programming (which most protocols use big endians btw) and binary files (which will depend on ur system.
#programming
Endianness is the order in which bytes are stored in memory.
Their are 2 common formats which are Big Endian and Little Endian.
Big Endian system: Stores the most significant byte first (at the lowest memory address.)
example: If we had a hexadecimal
0x12345678, it would be stored as this:0x12 | 0x34 | 0x56 | 0x78
where the left is the lowest address and the right is the highest address.
Little Endian system: Strores the least significant byte first. it is used in most modern computers like x86 uses it.
Lets ake the earlier example:
for
0x123456780x78 | 0x56 | 0x34 | 0x12
welp its just flipping the order.
It kinda doesn't matter for the most part when ur build Ur next AI MEGACORP but its nice to know if ur doing networks programming (which most protocols use big endians btw) and binary files (which will depend on ur system.
#programming
π3
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.