|
In other news, Mark Nottingham lives at home with Mom and his friends are like his sense of humour.
Nonexistent.
veni bibi saltavi
|
|
|
|
|
One of the teams where I work are called the 418's and they are named after this response.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
Love it!
I also enjoy how every time you click the teapot, it triggers an analytics callback.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hah! I should return this code to malicious/blacklisted IP's.
|
|
|
|
|
I've been thinking that it would be perfect for malformed user input.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
no I didn't...
..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";
short len = map.GetLength();
short add = decode ? len : 0;
short mul = decode ? -1 : 1;
short off = str.GetLength() % len;
CString out;
for(short i=0; i<str.GetLength(); i++)
{
if(map.Find(str.GetAt(i)) == -1)
out += str.GetAt(i);
else
out += map.GetAt((map.Find(str.GetAt(i)) + add + ((i + off) * mul) % len) % len);
}
return out;
} The only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Sascha Lefèvre wrote: Please absolve me
To be forgiven, you must obtain an abacus from ebay and perform the computations of your algorithm by hand with nothing but the abacus.
|
|
|
|
|
I'll possibly carry this burden forever then
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
I fixed it for you : FTFY - rewrote it in C# so you can run it in LINQPad[^]
I'll put this out on GitHub as soon as possible.
void Main()
{
Console.WriteLine(StrEncode("Here it is", true));
Console.WriteLine(StrEncode("´;µsDUkGäB", false));
}
String StrEncode(String str, bool decode)
{
String map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";
int len = map.Length;
int add = decode ? len : 0;
int mul = decode ? -1 : 1;
int off = str.Length % len;
String outMsg = String.Empty;
for(int i=0; i<str.Length; i++)
{
if(!map.Contains(str[i]))
outMsg += str[i];
else
{
outMsg += map[(map.IndexOf(str[i]) + add + ((i + off) * mul) % len) % len];
}
}
return outMsg;
}
Here's the resulting output:
´;µsDUkGäB
Here it is
|
|
|
|
|
I can see you caught fire - maybe we can achieve great things together
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Yes, this could be bigger than base64 encoding which is far easier to use.
People using base64 are just lazy.
|
|
|
|
|
Pfft... Dictionaries are so much faster than string searches...
|
|
|
|
|
That's one of those things I didn't even want to start counting..
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Sascha Lefèvre wrote: Please absolve me
Et nunc absolvo te ab peccatis tuis. Amen.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
And ten Hail Marys.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
And put a pound in the poor box.
|
|
|
|
|
Thank you
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Sascha Lefèvre wrote: Please absolve me
In order to receive absolution, you must rewrite the entire application in VB6.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
It might actually end up being better than it is..
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
I've actually seen a Caeser Cipher[^] used to encode passwords, so that's not too bad by comparison.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
One can only wonder what was going on here....
Public Enum HierarchycalEquitySeachType As Integer
SEDOL_ISIN_CUSIP___SEDOL_ISIN___SEDOL___ISIN___CUSIP
End Enum
|
|
|
|
|
Don't you just love underscores?
I once saw a sproc written by someone who had never heard of DATETIME as a datatype. There were about 3 million lines of "code" and, needless to say, it made vintage cat puke look pretty. The single most lamentable aspect of it, though, was that he padded his names with underscores to make everything the same length (especially ironic given that he didn't see any reason to format his code in any way whatsoever). It all went something like:
select some bilge from badlynamedappointmenttable where is_monday______morning = 0 and is_monday____afternoon = 0 and is_tuesday_____morning = 0 and is_tuesday___afternoon = 0 and is_wednesday___morning = 0 ...
Reams and reams and reams of it.
How long did it take to type? How many hours did he sit there wondering why no-one had ever bothered to put some kind of date handling mechanism into an otherwise sophisticated RDBMS engine? How many times did he resist the temptation to rename his idiot columns because he couldn't figure out how many underscores to type?
These, and many other questions, will probably remain unanswered for as long as the one of what on earth someone meant by ...
'Generates search string using the hierarchy:
'1. SEDOL and ISIN and CUSIP 2. SEDOL and ISIN 3. SEDOL 4. ISIN 5. CUSIP
Public Enum HierarchycalEquitySeachType As Integer
SEDOL_ISIN_CUSIP___SEDOL_ISIN___SEDOL___ISIN___CUSIP
End Enum
?
98.4% of statistics are made up on the spot.
|
|
|
|
|
I know enumerations, but I don't know why underscores would be special in them.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|