[quote user="sinistral"]Well, for now it's an instance of Google Whacking, where you manage to find a term that in fact has 0 return hits.
[/quote]No, Google Whacking is where you try to find a search that has exactly 1 result. Getting zero results is easy, just use a spellliling that no one else has used ( or make up a word, like Alex did ).
Posts made by paranoidgeek
-
RE: Get your {Search} Engines Started ...
-
RE: Not so C++
WRT to the whole indentation thing,
I personally use K&R with 8 space tab stops, with the exception that namespaces, function, classes, etc get their own line for the opening brace.
<rant mode="on">
When the closing brace has comments on it this i find it very annoying ( that is pulled from a slide used in yesterday's computer science lecture. Note the three ways of writing Comparable ), maybe for #defines that cover the whole file it would be justifed, but when the opening brace is *two* lines above i dont really see that reason for it.
</rant> -
RE: Proof Microsoft is truely affraid of Linux
Try pasting it as a link rather than in a img scr=.
http://www.imagestation.com/album/pictures.html?id=2106728522&idx=1
Like many programs, IE cant handle files > 2 GB. -
RE: Happy Easter to all
In NZ the speed limit in residential areas is 50 kph and 100 kph for motorways / rural areas. There are also the 70/80/90 limits in certain places.
You can be ticketed for exceding the speed limit by more than 10 kph.
IIRC, recently they introduced a law such that you can be ticketed for driving above 55 kph in a 50 kph area outside a school. -
RE: Getting X bits from an integer?
PHP does have bitwise opperaters ... language.operators.bitwise.php
-
RE: Inexplicable problem in a very simple piece of code
Try using doubles instead of floats as they have more precision and wont be out by so much.
E.g. :
fmod((float) 122.07, (float) 1) = 0.0699997
fmod((double) 122.07, (double) 1) = 0.07
But as other people have said, knowning how/why floats/doubles have these limitations/effects is a very important thing and you should research it a bit. -
RE: Meeting "customer demand"
@cconroy said:
<font size="2">It just goes to show that the customer is always right.</font>
I personally dont like that quote because sometimes ( like this time ) the customer is very very wrong. The trick is to not to let them catch on that they're an idiot.
Besides, what happens when 2 customers disagree ?
-
RE: Very large numbers
Hmm so roughly the number you quoted is 2^63 or a signed 64-bit int.
What opperrations do you need to perform on the number ?
Also, could you deal with having to call if(BigInt::LessThan(a, 1000000)) { ..... }... err sorry you're using VB that would be if BigInt.LessThan(a, 1000000) Then ...., instead of if a < 1000000 Then ... and so on for most other opperations ?
If so you could try using a libary for this ( I have found them on Google for C, C++, Perl, etc ) or porting one of the librarys to VB.Net.
BTW is this cryptology related ? -
RE: Now, that's how you spell
Even the domain name is mispelled .....
The source is filled with this spelling too :<script language="JavaScript">
Some nice features ( like the all the calculators, print button, the 'klik heer tu send emael tu a freend' button .... )
<!--
//* this puts kerser on first element in the form but onlee on loed
document.forms[0].elements[0].focus();
//*
//-->
</script>
OT a bit here but does anyone find the design of http://nzdra.co.nz/media.html a bit strange ? In that it has a scrolling body and a scrolling iframe ? Not to mention they are offering logos in JPEG format ....
-
RE: The biggest WTF is the WTF software!!!
Slashcode requires MySQL, Perl, Apache, and IIRC a Linux daemon like process running.
If i could decide i would go with phpBB or maybe look into the punBB somebody mentioned -
RE: Blocked Script
It is a side affect of the forums WTF method of stopping poeple from inserting j a v a s c r i p t code into their posts. So if i was to say "some people like using javascript" there is a good change it will change it to "some people like using BLOCKEDSCRIPT"
I'll try to set it off : javascript:alert('test');
test -
RE: HTML -> PHP Converter
It appears to have been written with http://www.dialogscript.com/
The syntax looks like what would happen if VB and COBOL had a baby, and it was born retarded. -
RE: Where do you set your right margin?
I use 120 - 160 if i'm not planning on accessing it on
a terminal so that i can keep SQL queries in a single line ( e.g. "DELETE FROM{$GLOBALS['database_prefix']}pages
WHEREid
= '$id' LIMIT 1" ).
Generally 80 is the most common for historical reasons ( 80*24
terminals ). -
RE: Vbscript ported to vb.net, any chance of better code?
BTW is this a cocktail sort http://en.wikisource.org/wiki/Cocktail_Sort ?
-
RE: Percents can be really tricky ones
@Otac0n said:
He meant:
Yeah i know what will compile ( err parse ), but i thought he was poking fun at PHP's '$' as a varible prefix and '$' as in dollars.
$total = $price * $quantity * 1.175;
-
RE: Percents can be really tricky ones
@dhromed said:
Now that I'm in a PHP syntax bashing mood:
$total = $price*$quantity*$1.175
It's subtle.
Parse error: parse error, unexpected T_DNUMBER, expecting T_VARIABLE or '$' in - on line 1
Pretty easy to spot at run time.
-
RE: Noop
You have to wonder why they wrote this "Hmm i hope the string isnt longer than itself. Lets shorted the string to it's own length to make sure."
BTW i'm from New Zealand, and no i'm not submiting any of my code to this site. -
RE: Vbscript ported to vb.net, any chance of better code?
@paranoidgeek said:
if(!swapsMade) ' no swaps made; we are finished sorting
Ohh and another thing dont ever use 'we' in comments.
-
RE: Vbscript ported to vb.net, any chance of better code?
OK first off, it isnt too bad just needs a bit of a clean up.
DONT use varible names like 'p', 'q', 'x' and so on. The only place where i see it fit to name things like this are a) simple 'for' loops b) simple function paramaters.
Also, try to use the boolean type for varibles that are logic, e.g. 'q'
It makes a lot more sense to see :if(!swapsMade) ' no swaps made; we are finished sortingOther than that the function isnt too bad.
exit function
jadaadada
end if
However it would make a bit more sense to do this ( the entire app ) "some other way"(tm) that would allow you to use a built-in sort function.
-
RE: Very very board
Try http://userfriendly.org/ .
I read a local comp-sci board but that is about it.
-
RE: Javascript calculation
@sao said:
this is due to an inaccuracy in floats, which i first encountered in C++.
eg:
i = 5.0 + 5.0;
i==10.0 ? FALSE
as for a workaround... i always liked multiplying accuracy by 10 and using an integer.
ie: 110*11 = 121
i hate floats.
I think the correct way is to use "abs(a-b) < 0.01" Where a,b are the floats, 0.01 is the ammount they can differ by.
IIRC money should always done by using a integer for the number of /cents/.
-
RE: Linux newbie requesting help!
@HAK said:
...
Opps well my apologies for thinking you didnt but that first post was a tad vague.
And, for the record, I do know WHAT a CD image is, ...
Again, thanks for the help!
-
RE: Linux newbie requesting help!
Hmm did you burn it as a file instead of as an image?
So if you were to open the cd up in Windows explorer do you see one file named 'xxxxxx.iso' or a bunch of files and folders ( well more than one ) ?
If you have burnt the iso as a file you will need to burn it onto a new CD but make sure you use the 'burn image' option ( if you tell us what program you are using that would help ).
You may wish to look into using Ubuntu or Mandriva instead as these two are normally more newbie friendly. -
RE: Login log in?
Login / Username.
Saves typing a space and / or shift ( if using UserName / LogIn ) -
RE: How to crash Windows 98 very, very badly
Yeah i maybe shouldnt have done that .... ohh well all my machines run Linux anyway.
-
RE: New Microsoft Certifications
I would have put this as an edit in my last post but you guys know why i cant .....
Anybody notice there are two items in the menu that have the shortcut key 'D' ? -
RE: New Microsoft Certifications
Look at the URL of the image in question. ROFL.
-
RE: How to crash Windows 98 very, very badly
Apparently a HTML img tag with the src parameter "C:\con\con" will crash 98 machines
If the forum software allows be it should have the image to my right :
-
RE: The most resource intensive program ever
@dhromed said:
Why is PCmag allowing a computer- and
Maybe all the literate people steer away from PCMag ( and similars ) like the plague ?
Windows-illiterate to write mindless columns on computers and Windows?
I still find an article about the advantages of deep cycling Li-ion
batteries in a PCWorld mag amusing. ( Hint: Li-ions HATE being deep
cycled )
-
RE: A Software Engineering Paper WTF
While we are pulling out real world examples i tried two gcc compiled c
programs that rxd's two ints then adds them and outputs the result (
this is done to ensure the the compiler cannot optimise out the code ),
with one adding the recived ints using '+=' and the other '= x + ' .
The both have the same md5.
Hopefully i dont have to explain that executables with the same hash contain the same ASM and thus execute with the same speed.
WRT the coding style of '+=' vs '= x +' :
If if is easier to read when using one operation then use it. If it
makes it harder to read then dont. The compiler doesnt ( shouldnt )
care. -
RE: Who needs input validation anyway
@Joost_ said:
Forgive me for being pedantic but if i can upload stuff cant i just call mysql_list_dbs() with mysql_list_tables() and work our way from there droping the tables ?
That's relatively easy; all you have to do is upload a new file
containing malicious SQL statements to their server which you can then
request with your average garden-variety browser and thereby cause the
web server to execute your 'drop database' statement.
-
RE: Who needs input validation anyway
@UncleMidriff said:
Oh, and I'd like to thank you and your
All i can say is thank goodness for adblock.
avatar for making this site significantly less work safe.
:)
-
RE: Brilliant or brillant, this is the boolean
This is just about as bad as [code]"The number is :" . ($number_in_a_string+0)[/code]
(Converts a string to a number )
While i dont completely disagree with these practices i dont like teaching it as "best practices".
In fact you dont need this ( ugly ) hack so why even use it ? -
RE: A hardware user's WTF
I think i started crying and laughing at the same time.
-
RE: The Brillant Wiki
It was BJAODN'ed :( :( :( :( :(
Cant really say the user who made the decision was unbiased.
-
RE: Security through obscurity
@bullestock said:
...
If
All I can say is that I've been at Initech for several years and in all
the time that we've been selling the Widget I haven't had a single
customer saying they've cracked the encryption.
they think it is secure because their customers cant break it they are
in a big suprise. Wait .. why/how did anybody buy the "Widget" without
finding out what algorithm it used ?
My guess is that the programmer though he was "So smart" and could
write an encryption scheme that was better than a AES ( or if it was a
hash then SHA ). Or maybe it is just [stupid] policy.
-
RE: Key a sex offender database on last name, what a great idea!
An ideal system would check the SSN ( which AKAIK is unique ) or
use the DOB name, etc to check for "similar" entries which a human
could then confirm. -
RE: How is removing dead code NOT a stability enhancement?
The whole things is a bit of a WTF.
This is a better way :private DataRowState ConvertToRowState(BitArray bitStates, int bitIndex)
In fact why do they do it that way ...?
{
bool flag2 = bitStates[bitIndex];
bool flag1 = bitStates[bitIndex + 1];
if (flag2 && flag1)
{
return DataRowState.Deleted;
}
if (flag1)
{
return DataRowState.Added;
}
if (flag2)
{
return DataRowState.Modified;
}
return DataRowState.Unchanged;
} // end of function
I tend to use a defined 1 for the first bit 2 for the next then 4,8,16,32, etc.
Then bit-and or bit-or to get the values in and out.
I guess that whole "throw Exceptio..." thing it a bit helpfull should anybody ever change the code ......
-
RE: Virus - Free Music
@UncleMidriff said:
This type of thing has always comfused me. Why would an
application, upon receiving screwy data from a jpeg, mp3, or whatever,
say, "Gee, this makes no sense...guess I'll go ahead and execute
it." Methinks I need to go read up on buffer overflow exploits,
so it'll be less of a mystery to me.
Wikipedia has a nice page on it http://en.wikipedia.org/wiki/Buffer_overflow .
-
RE: Virus - Free MusicI suspect it may have some thing to do with the number of people who use ( unpatched ) Windows/IE and think they get their viruses throught the mp3s they download.
I'd be instantly suspicious if someone claims to offer a 'virus-free' product. Might just be me though, but why state something that obvious?
Drak
-
Virus - Free Music
On this page it has this :
Click BELOW for LEGITIMATE, HIGH QUALITY,
VIRUS-FREE MUSIC from the WORLD'S TOP ARTISTS!Yah for virus free music !! I once listen to some music i downloaded that had a virus and i got really sick.
Really, since when can music have viruses ?
( Yes, I am aware that there were some vulnerabilities in WMA that allowed this ) -
RE: Teaching IT in a modern world.Well I'm from new zealand, but these quotes came from a 'guest' lecturer from the states. Hence my being irritated that he couldn't be bothered to change his slides. Obviously just reuses them each year no matter where he is.
I from NZ too. Would it be too rude to ask which place this teaching came from ? I am planning on taking some computer courses soon-ish and knowing which ones to avoid would be of help.
-
RE: 590 content-types ain't enough
Hmm it is a bit like
y = x;
y = x; // just in case
Possible it ( the email software responsible ) has some sort of loop
that adds the content-type and it 'forgets' ( read : programmer forgot
) to not display the content-type the second time round ( and the third
, forth ... ). I havent done and programming for email software but a
common is to use "var .= var2" ( or the equivalent in your langage of
choice ) when "var = var2" was intended .. maybe