@The_Assimilator said:
For example, we do the backend while another vendor plugs their frontend code into ours.
So, they plug their front end into your backend? Sounds like you're buggered!
@The_Assimilator said:
For example, we do the backend while another vendor plugs their frontend code into ours.
So, they plug their front end into your backend? Sounds like you're buggered!
@The_Assimilator said:
it might return false if the floating-point values are of sufficiently large precision to not actually be equivalent
The value is so precise, it is not even equal to itself...
@AlexSolonik said:
if you set up your device to use a certain local IP, it will not be given that IP.
of course, it will not be given any IP, since it will not ask for one, it will just use the one you told it to use.
@AlexSolonik said:
Using your logic there, If I tell my laptop to use "192.168.0.101" What happens when I join a network in which that IP already exists? My laptop is either going to re-configure itself, or if I tell it not to do that, it simply won't be allowed to join the network.
I'm not saying it's necessarily a good idea to fix the IP (especially if it is a portable device that will be used on other networks), I agree that router was a pile of shite that I would have gotten replaced too. If you choose an IP that is already in use by another device, of course there will be a conflict, and the way that is handled probably depends on the OS. But there is no reason why you can't do this, the router will not "refuse to let it join the network" if it doesn't use DHCP.
@AlexSolonik said:
Your device can't just say "This is my IP" and be stubborn about it.
Of course it can, as long as it doesn't conflict with another device. DHCP is just a way to automatically assign IP addresses, no device is forced to use it if they don't want to.
@AlexSolonik said:
If another device tries to send that device data, they either use the IP the router assigned to that device, or the data won't be delivered.
If there was no DHCP request, there is no "IP the router assigned to that device", there is just the IP that was fixed, and the device is identified by that IP. The router will find where that IP is connected using ARP whether is was configured with DHCP, or manually.
@AlexSolonik said:
From my post: "It doesn't matter if the device requested a certain IP"
It doesn't matter if I fixed the IP on the device, the modem/router would give a random one.
But that doesn't make sense. If you fix the IP on the device, there is no DHCP request, why would it reconfigure itself with another IP?
@dhromed said:
I feel there is something insinuated by your code... but I can't quite put my finger on it.
I don't think you want to put your finger on it... unless you're into that kind of thing of course.
@Zemm said:
When I got phone banking with one of the biggest banks in Australia the password was 3 digits. I think mine was 791. I'm pretty sure they don't still do that. :)
Are you sure? By the way, what is your account number?
The Australian version also has more ingredients than the English/Irish - hydrolised soya AND protein, as opposed to just hydrolised soya protein.
@PJH said:
Assuming that sizeof(short) is two, which, of course, isn't necessarily a given, making the comment wrong. (It can be larger.)
Or smaller.
@stratos said:
PHP 5.3 even got released recently which added GOTO ( and namespaces.but goto is much more important).
Are you serious? I don't really know any PHP so I can't tell if you're joking. Is PHP so fucked up that adding goto is actually an improvement? Wouldn't it be more sane to add better structured flow control statements so that goto is not necessary?
@Hitsuji said:
I also didn't know http error were versioned now... ok 404 is still at version 404.0, but 403 is now at version 403.14.
I think it means HTTP 40π Pie not found
@AltSysrq said:
@Helix said:
@jimlangrunner said:....... Alex will get to look at it, won't he? Wrong. Gotta go, gotta go, gotta go go go! Put it in right now. ......I work at Burger King making flame broiled whoppers, I wear paper hats. Would you like an apple pie with that? Would you like an apple pie with that? Ding! Fries are done. Ding! Fries are done. Ding! Fries are done. Ding! Fries are done. I gotta run. I gotta run. I gotta run. I gotta run.The end of the excerpt from jimlangrunner is more suggestive of Quizno's than Burger King.
Actually, it's more suggestive of your mom.
@CDarklock said:
Actually, the problem is in which bits you are using. With a % operation, you are always using only the lowest-order bits.
Not always, only if N is a divisor of (RAND_MAX+1). Otherwise you are using all the bits. But then you are biased towards certain numbers (the lower ones).
@CDarklock said:
With (rand()/(RAND_MAX+1) )*N, you're using all of them.
Again, not always. If N is a divisor of (RAND_MAX+1), then you are only using the highest-order bits. And if not, you are still biased towards certain numbers, but they are more evenly spread throughout the range.
@CDarklock said:
So the overall entropy of the PRNG is in your calculation, no matter to which bits that entropy may have been localised. Many PRNGs have localised entropy at certain points in the cycle, and when you're only using the lower order bits, you may get no entropy at all for a while.
No, neither method guarantees you use all of the bits. But many PRNGs have less entropy in the lower-order bits, so restricting yourself the the higher-order bits is better than the lower-order bits.
@CDarklock said:
Imagine a PRNG which textually reorders digits. If it doesn't happen to reorder the final digit in a given call, any N <= 10 will generate the same number as the previous call.
Only if N==10, not for all N<=10. If N=3 it would use all the digits. And if it doesn't happen to reorder the first digit in a given call, then the other method would also generate the same number twice for N==10, but that's not necessarily a problem, a good PRNG should generate the same number twice sometimes, otherwise it's not very random.
@chrismcb said:
@seriousJoker said:
I remember having read that it is better to use
(rand()/(RAND_MAX+1) )*N
than it is to use
rand()%N
in order to get a number in the range [0, N-1].
To answer the original question, you should never use rand()%N, no matter how random the lower bits are, unless RAND_MAX is evenly divisible by N.
Lets assume that RAND_MAX = 8 so rand() generates 0 - 7.
If N is 5 then you get 0,1,2,3,4,0,1,2 as possible values. Yuo should be able to spot the problem.
But if you use (rand()/(RAND_MAX+1) )*N, you get 0,0,1,1,2,3,3,4 as possible values, which, although slightly better, still has problems. If RAND_MAX is not divisible by N, you have to do smething more complex (e.g. throw away some values, and regenerate another number).
@Spectre said:
Nope. I've declared a jihad on JPEG screenshots. I'll try not to chime in too often, though.
By the way, thanks for the sign, gremlin.
Actually, I just saw the image here, and I thought it was funny. But I'll join you in your jihad, I do find it annoying, especially on a forum like this where you would hope people would know better, and when it takes no extra effort to do it properly.
My bank also recently "upgraded" their online banking system. In the process they wiped out all international standing orders. They didn't notify anyone of this however, they preferred to let you find out yourself when your mortgage payment is late.
They also introduced a bug, where if you make a make a new standing order for the current month, it will be accepted, but the month silently changed to next month in the detailed view (but not in the summary it initially shows you). Luckily I noticed this in time, and didn't get my home reposessed...
I discovered the my ISP actually has some competent technical support, if you know how to get to them.
I was having all sorts of connection problems, and had spent hours with their "technical support" rebooting routers, reconnecting cables, moving things to other phone sockets... They even replaced my modem twice. Some things seemed to help for a while, then everything would disconnect for hours at a time.
I eventually called their cancellation line and threatened to cancel my contract, they offered to put me through to a "special" technical support for a final try at resolving the problem. I was a bit reluctant, but I actually got to speak to someone who knew what they were talking about. He told me to open up the telephone socket, there was an old extension line connected, going who-knows-where in the house, I disconnected it, and everything works fine.
So next time something stops working, I know to call their cancellation number, and skip their first level "technical support".
@tomf84 said:
OpenVPN from the laptop back to the proxy box, Debian/Squid installed on that, job done.
If you VPN into the "proxy box", why do you need another proxy running on there? The web server will already see the request as coming from the states. I guess it could help with caching, but if this is mainly for downloading music/videos I don't think it would make much difference.
I still think the simplest solution is SSH, as you probably will want it running anyway for remote admin. Then just set up the necessary apps to use the built-in proxy, and don't have all the other traffic going over the possibly slow connection, as would be the case with a VPN.
@Lingerance said:
@gremlin said:Are you sure? I haven't got a Windows machine here to test it on, but I'm pretty sure you can set it up in the Connection->SSH->Tunnels configuration page, just set a dynamic tunnel on port 8000 (or whatever you like).Yes you can do the tunnel per port number, but the full tunnel won't be implemented
No, there they are talking about some sort of VPN system. You don't have to tunnel per port number, the dynamic tunnel is a SOCKS proxy, the port number you give is the local port number to connect to the proxy.
@Lingerance said:
@gremlin said:You only need ssh, it has a built-in SOCKS proxy. Just "ssh -D 8000 yourserver.tld", then use localhost:8000 as the SOCKS proxy.Presuming the client is using an SSH client that does indeed support openSSH's proxy method. PuTTY doesn't and will not (the feature request is closed "will not fix" for reason: "openssh's proxy system is a WTF and we aren't going to bother implementing it").
Are you sure? I haven't got a Windows machine here to test it on, but I'm pretty sure you can set it up in the Connection->SSH->Tunnels configuration page, just set a dynamic tunnel on port 8000 (or whatever you like).
You only need ssh, it has a built-in SOCKS proxy. Just "ssh -D 8000 yourserver.tld", then use localhost:8000 as the SOCKS proxy.
@seriousJoker said:
I did omit the cast to higher precision on purpose. The purpose is better readability. In practise one would probably use
(int)(((double)rand()/(
(double)
RAND_MAX+1.0) )*
(double)
N
)Better now?
Actually, a simple decimal point after the 1 (and a cast to int at the end) would have been enough:
(int)(rand()/(
RAND_MAX+1.0)*N)
@Wolftaur said:
@TGV said:"You shoot yourself in the foot, and the only reason C# lets you, is because that feature exists in Java."
... half the ways you can shoot yourself in the foot in Java exist only because C++ has the relevant feature. :)
Yes, but half the ways you can shoot yourself in the foot in C++ exist only because C has the relevant feature ;-)
@ahnfelt said:
For the record, I chose the question "I am not Sarah Palin" and the answer "dbQ!!"!"apoewDfd_Fgøæergznvbm++e132123AADGBMNZgb". Try gyessing that, punk!
I guess "dbQ!!"!"apoewDfd_Fgøæergznvbm++e132123AADGBMNZgb", am I close?
@BeenThere said:
@gremlin said:
So why did you post it in the "General Discussion" forum?Because I think it is a WTF, but its a political topic and if everyone posted something they thought was a WTF regarding politics in the side bar it would be a total mess.
In other words, you're saying it shouldn't be in the WTF sidebar ;-)
@BeenThere said:
This should be in the WTF sidebar...
So why did you post it in the "General Discussion" forum?
@rosko said:
no-one throws things like my old boss from my first job; those things left a mark!
You worked for Microsoft?
@morbiuswilters said:
Hmm, it's a 8 digit number so that means there are 100 million possible combinations. That seems pretty secure to me.
I hope that's meant to be a joke...
Oh that was just the image filename with a missing .jpg, I was hoping for a gallery...
(I would have edited the previous post, but as we all know, the forum software is TRWTF)
So, what other pictures have you got in C:\Users\User\Desktop\BT-irish-gallery-1806?
@Kederaji said:
I know somebody whose software broke today. Some variables have not been evaluated to protect the children.
@Kederaji's Email said:
DAYTONA BEACH, Fla. (February 29, 2008) – A precautionary boil water
notice is in effect for all water users in the city of Daytona Beach.
The boil water advisory was issued due to loss of water pressure caused
by an early morning power failure at the LPGA water plant.
Although
the loss of power was of short duration, water pressure dropped below
the 20 psi threshold which triggers the boil water notice. The water
plant has returned to normal operations.
A boil water notice is
a request for residents to bring water to a rolling boil for one to
three minutes before using it for drinking or cooking. The boil request
is a precautionary measure that is expected to be removed after
satisfactory tests, according to Utility Director Mitt Tidwell. First
test results will be available on Saturday by 9 a.m.
The city of Daytona Beach also supplies water to South Daytona and the area north
of $other_street in Daytona Beach Shores. All residents in these areas
are advised to adhere to the boil water advisory.
For more information, please call the city’s utility department at $telephone_number.
Info courtesy of the city of Daytona Beach.
Campus Safety
@medialint said:
Dates? Those dried plums? Oh you mean like courtship ...
Ummm a date is not a dried plum... it's just a date, or if it's dried then it's a dried date...
Ever wondered why so many wtf programs get all sorts of software awards? Some guy did a little test...
@The Real WTF said:
@Spectre said:
I was lucky. An imaginary Japanese hacker wouldn't be able to patch the executable like I did, since その他 is longer than 5 bytes in every encoding I can think of. Although, he might be able to hack the Windows multimedia library instead 8=].Actually, the code to do the string comparison would probably be large enough that you could overwrite it with code to just compare the first byte or word or whatever works best.
Actually, the code to do the conditional jump after the comparison would be large enough that you could overwrite it with a nop or an unconditional jump so that your game will run whether you have the CD in the drive or not.
@erichthewebguy said:
A friend of mine who is very much a n00b at web development was having some CSS issues. Try as he might, he couldn't get that one last error to go away:
Warning: Expected identifier for class selector but found ' '. Ruleset ignored due to bad selector.
Source File: http://www.site_name_removed.com/filename.css
Line: 33So I took a quick look at the CSS file, and found this:
a { color: #FFFFFF; text-decoration: underline; }
a:hover { color: #FFFFCC; text-decoration: underline; }
ill wash your body with my bare hands. :)
h2 { color: #FFFFCC; text-decoration: bold; font-family: serif; size: 28; }When I asked him about it, he (after a long silence) said an IM with a "certain female friend" had intefered with some copy/paste he was doing on his CSS. He thanked me for my help and promptly signed out!
He obviously didn't try very hard to fix it before calling you - the error message gives him the line number to look at...
@tster said:
@aib said:@Siloria said:prev_clut = (Clut*)malloc(sizeof(Clut));
Ow, ow, ow, ow, ow!
Makes me cringe every time I see that (a void* casted to another pointer, or vice versa)
Bad compiler? Bad habits?
How the fuck do you allocate memory on the heap without having to cast the void pointers?
Umm exactly like that, without casting the void pointers...
Unless of course you are using C++, in which case why are you using malloc?
If you have to cast the void pointers in C, then you haven't included the right header file and you should fix that rather than hiding the error with a cast.
@tray said:
I'm sure this was the first image that came up when doing the random image search, and obviously the bad perspective is caused by the camera not being placed properly in front of the monitor.
Yeah, if only SpectateSwamp would have shown them how to "video it in" properly, they would have had a much more professional looking cover page...
@operagost said:
typedef enum{FAUX=0, Faux=0, faux=0, FALSE=0, False=0, false=0,VRAI=1, Vrai=1, vrai=1, TRUE=1, True=1, true=1, dossier_non_trouvé=2, file_not_found=2} Booleen;
Fixed...
Actually that should be fichier_non_trouvé.
@m0ffx said:
Aside: This year I decided to April fool someone by showing them my (PC) laptop running 'OSX' - actually KDE configured to do a quite credible impression. Unfortunately it didn't really work, owing to the prankee being so unfamiliar with OSX that he a) didn't realise how startling OSX on a PC would actually b, and b) didn't notice even blatant giveaways, like the KDE panel unwantedly showing itself. Will have to try it on someone else next year.
Check out osx86
@AbbydonKrafts said:
I don't know if it's been posted before either, but damn, that thing is hard to read.
Options:
- Don't resize the final image.
- Resize the window so that the screenshot would be smaller.
- Just crop out the relevant part.
You forgot:
0: Don't post screen shots as JPEG!
@Helix said:
I was thinking more of internets that hide products becuase they are not availble in the IP owners area...
So how many internets do you use?
@Daniel15 said:
Someone showed me this today:
((pi * (e * pi * e) * (pi * e * pi) * (e * pi * e) * (((((twenty three (stone knots)) plus (two billion (smoot grains))) plus (three thousand eight hundred and seventy nine (slug feet))) * pi) per (carat yards))) per c) * (cubits per week) = 1.00000092
Uh... WTF? How does that work out? :P
Well for a start it's needlessly complicated, it can be simplified to:
pi^6 * e^5 / c * (23 stone knots + 2e9 smoot grains + 3879 slug feet) cubits per (carat yard week)
But I'm having trouble figuring out what the WTF is - where's the link to the mug...
OK, this is not a WTF, but I thought it was funny. If you have Ubuntu installed (or some other Linux that uses apt), try typing:
apt-get help
Notice that the last line says "This APT has Super Cow Powers.", then type
apt-get moo
And you get a nice ascii cow:
(__)@The Vicar said:
but even in Switzerland there will be immigrants
Not if the newly elected president has anything to do with it...
@coplate said:
I just assume that the FPU in our servers work well enough to represent all of our numbers.
Don't.
Google for "What Every Computer Scientist Should Know About Floating-Point" and read it.