« first day (1006 days earlier)      last day (2621 days later) » 

9:37 AM
-6
Q: Allocate memory between 2 address

GuillaumeHow can I allocate memory between 2 address for example : int a = 5; int b = 10; I want to allocate memory between these 2 address. How?

awful
 
Oh wow
 
9:57 AM
Oh, lol, stackoverflow.com/help/privileges/chat, @Guillaume, sorry :p
 
 
5 hours later…
3:00 PM
Are you sure you need to convert anything? Your code is (apart from the error joop pointed out) trying to convert a binary-number that's inside the buffer, but the buffer (appears to be) plain-text (the number you've got -- 1195725856 -- is 0x47455420 which is 'G' 'E' 'T' and a space -- the first four characters of the buffer). You might need to convert len, depending where it came from, but there's a strong chance you don't. — TripeHound 1 hour ago
wtf is this sh*t with today
 
@AnttiHaapala today?
 
not a single question that would be even close to what I'd expect from a professional or an enthusiast.
 
Maybe because there's hardly anyone new learning C now and professionals don't use SO?
 
Today there has been 2 categories of questions: those that I didn't DV/CV and those that I did.
0
Q: volatile under the hood

MynicksI would like some help please to better understand a part of the following passage: "The volatile keyword qualifier indicates that the variable can be changed outside of the program.For example, an external device may write data to a port. Compilers will sometimes temporarily use a cache, or regi...

ok this is a first sane question today
it completely misunderstands everything naturally. but it is still sane
 
 
2 hours later…
5:03 PM
@AnttiHaapala well...
> C and C++ also appear to be mainly asked by students on a semester schedule
 
arghn
 
 
3 hours later…
8:19 PM
thats scary and cool
 
I am not still sure how this could be used against git...
but the fact that git uses SHA-1 makes me feel uneasy - someone will find a way to do it...
also, if there are binaries that are stored by their hash instead.
 
Sup guys. Does anyone have experience with bitwise finctions?
 
no
but you could ask anyway
 
I was hoping I can get some insight on a small problem I'm having in my code. I was trying to avoid making a post about it, but it looks like I'll just have to make one.
 
9:01 PM
@AnttiHaapala I guess... that's more for faking the repository.
 
well, yeah :D
one thing comes to mind :P
linus said "I just write the SHA1 head on paper"
in case of SSD failure he'd pull that from someone else :D
 
@AnttiHaapala also, as I recall, there was some debates in git mailing list of how to resilve that...
264
Q: How would git handle a SHA-1 collision on a blob?

GnurouThis probably never happened in the real-world yet, and may never happen, but let's consider this: say you have a git repository, make a commit, and get very very unlucky: one of the blobs end up having the same SHA-1 as another that is already in your repository. Question is, how would git handl...

This was... before that debate :D
 
9:29 PM
http://www.w3schools.com/ redirects to https://www.w3schools.com/. — Antti Haapala 15 secs ago
@Stargateur ^
 
lol
well, this is good :p
but need to handle https protocol.
 
so just cv
totally "solved in a manner not going to help anyone with half a brain"
who still thinks writing a http client is a worthwhile exercise?!
that should be crime against humanity.
 
a server with exit() always make me laugh
for exercise, I will code some IRC server.
 
that weather vane guy, gold badge in C
... and today every time I've seen that name he'd been wrong :D
 
9:59 PM
2
A: Weird result when copying integer to char * in c

Weather VaneIf you have a signed char it can typically represent numbers in the range -128 to +127. Most compilers by default use a char that is signed. So even without shifting, numbers above 127 will not be represented correctly. Also right-shifting a negative signed value is implementation defined.

2
A: C-Server - first 3 characters of a string

Weather VaneYou can print just the first 3 characters of the string with printf("%.3s", inn); Provided the string has at least 3 characters it need not be a proper nul terminated string.

this is not wrong
Do you have some example ? :p
 
@Stargateur comments
Variables in C do not update their values reptrospectively: there is no dependency system (unlike a spreadsheet). Also, remove the const if you don't actually want it to be const. And doesn't const contradict volatile? — Weather Vane 3 hours ago
@Olaf oops, previously I meant 0x55555555 for the even numbered bits, which is int. But deleted. — Weather Vane 6 mins ago
:D
 
ah must be just bad day :D
 
to be honest unsigned const volatile short int * is hard to follow.
 
yes :D
long volatile unsigned long const complex extern int simple;
 
10:12 PM
that here where typedef are usefull
 
this is better:
complex long volatile unsigned const extern long simple;
 
10:41 PM
from note patch of a game "Fixed an issue where firing Khita's Warped Arrow at specific angles would not show damage reduction from cover while targeting but deal cover damage during Blast phase – despite the fact we were amused by how much it bugged PepperTitan." :p.
note: PipperTitan is a streamer on twitch
 
10:56 PM
@Stargateur well, yeah. That's... quite common approach in poorly written servers. Like... having a service or bash while true which keeps restarting the server... just because it leaks memory and gets lost in garbage... so, needs to be restarted constantly
 
@Kamiccolo lol
 
I had too much debates about this... "but why? It's microservice architecture! It's okay to restart every hour or something and just leak all kinds of crap out of it..."
 
11:11 PM
the creator of php say long time ago "just restart apache every 10 requests"
 
Have You tried turning it off and on?
 
11:37 PM
Reminds me of my php-mini-webserver project
Yes, fully php-based, async sockets, and it was the primary backbone of a huge open-source project which I've donated resources to
 
11:53 PM
server & php => false
 
Its longest uptime was about ~4-5 months or so
Maximum bandwidth, if I recall correctly, around ~10TB/month
We're talking about almost a decade or so ago, its footprint was very much small
 

« first day (1006 days earlier)      last day (2621 days later) »