|
code looks great, it is obviously a temp data pool from SETI signal recievers ready to be split up and sent out to all those who have the SETI screen saver, processed then sent back, injected into the real tables that have a naming convention, it is only obfuscated here to protect sensitive national security secrets. ![Poke tongue | ;-P](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_tongue.gif)
|
|
|
|
|
Generics comes to SQL.
|
|
|
|
|
SELECT NULL FROM Brain Where Engaged = 0
|
|
|
|
|
LOL! I think he omitted that table
GSoC 2009 student for SMW!
---
My little forums: http://code.bn2vs.com
---
70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
|
|
|
|
|
What's not to love... ![Big Grin | :-D](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_biggrin.gif)
|
|
|
|
|
Which Normal Form is that?
|
|
|
|
|
First Imaginary Form ![Laugh | :laugh:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_laugh.gif)
|
|
|
|
|
Must be government work!
Sam
|
|
|
|
|
That looks a lot like the Oracle tables at the company that I used to work at. I really hated having to query that database. You didn't have any clue as to what each field was being used for.
Kelly Herald
Software Developer
|
|
|
|
|
This table design could be used to reduce the size of a database and improve manageability that contains unknown/highly dynamic structures
I will make an assumption (the only one in this post) and say this project deals with loading structures that change frequently. Could be wrong and be looking at a noob's 'work of art'
There are three approaches for highly dynamic structural data:
1. Dynamically create the schema's based on external blue-prints, giving real names to columns. This might not be the best solution for a few subtle reasons which have to do with the degree of knowledge by the end-user's of the database and any planned api's or DAL's. Generating the dynamic schema prior to loading data can be done in two modes: 1. immediately, where new un-generated schemas are encountered and have to be generated on the spot. This presents an obvious problem if you have multiple clients performing the imports for a single database (similar to SETI). Such as, what if two clients encounter the same type of schema that isn't in the database yet, only one schema should be generated. 2. Delayed, where after loading many imports and discovering that some new files failed to match any current dynamic schema, the database user can manually kick off schema generation and then attempt a reload of those files that failed earlier.
2. Contain the all the data into a single table (or a table for each datatype) with four columns (ImportFileId, RowId[original structure's], ParameterName, ParameterValue). This solution gobbles up WAY MORE disk space (more than doubles the space requirement of the solution given above as well as in #1 (In oracle, at least, the remaining columns that are null take up no space.) This is considered serializing the data, also could be called demuxing.
3. Then there is the solution above. The only requirement is that any API must map the ImportFileId to some blue-print of the columns involved. This solution saves much more space than #2 AND has the added benefit of simplicity on the database up-keep side (ie. no schema generation prior to import)
I've been down this road dealing with a database with over 400,000 actual unique fields of data. We actually used option #1 for good reason. So, I wouldn't knock it just because it's different.
|
|
|
|
|
|
"Raise your hands above your head, and step away from the keyboard, Sir."
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Thats really a nice example for not thinking while coding.
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
We should request the thread to be clipped from there and pasted over here.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Might I suggest using a permalink[^] to the horror instead? Otherwise it'll soon be necessary to click the next page button 20x before getting to the post in question.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
modified on Wednesday, June 17, 2009 3:27 PM
|
|
|
|
|
Yeah, that got me there, the other didn't.
|
|
|
|
|
|
Wow...Just wow !!! I live for piece of crap like that...
And after the laughter eventually one thing crosses my mind.
"Is that man paid for his programming services ?".
|
|
|
|
|
I have fallen in love in this part:
int num = 0x20;
int num2 = num / 4;
int num3 = num / 2;
int num4 = 13;
int num5 = 0x37;
int num6 = 10;
int num7 = 10;
double num8 = double.Parse(this.lblZoomFactor.Text) / 100.0;
int num9 = (int)(num * num8);
int num10 = (int)(num2 * num8);
int num11 = (int)(num3 * num8);
int width = (int)(num5 * num8);
int num13 = (int)(num6 * num8);
int height = ((num4 + num9) + num10) + num11;
int num15 = ((bitmapWidth - 0x10) - (2 * num13)) / width;
int num16 = (bitmapWidth - (2 * num6)) - (width * num15);
...
int num18 = (num17 / num15) + 4;
int num19 = num18 * (height + num13);
int y = num13;
int num21 = 0;
num21++;
int num23 = num21 % num15;
...
int num25 = (y + num4) + num10; (not so funny, though)
Greetings - Jacek Gajek
|
|
|
|
|
Parts of it look like some autogenerated VS code ![Big Grin | :-D](https://www.codeproject.com/script/Forums/Images/smiley_biggrin.gif)
modified 19-Nov-18 21:01pm.
|
|
|
|
|
I think, this code is a result of Reflector disassembling ![Big Grin | :-D](https://www.codeproject.com/script/Forums/Images/smiley_biggrin.gif)
|
|
|
|
|
Saw this one yesterday via DotNetKicks[^]:
public static class NumberHelpers
{
public static ApplicationException EvenOrOdd(int integer)
{
if (integer % 2 == 0)
{
return new ApplicationException("The integer is even.");
}
else
{
return new ApplicationException("The integer is odd.");
}
}
}
Usage:
protected void btnTest_Click(object sender, EventArgs e)
{
try
{
throw NumberHelpers.EvenOrOdd(Convert.ToInt32(txtIntToTest.Text));
}
catch (ApplicationException ex)
{
litResult.Text = ex.Message;
}
}
Brilliant! I'm going to utilize this beautiful exception-based development pattern into our code base immediately!
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah Himango
|
|
|
|
|
I can bet that this gem is created from a former Java programmer.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word.
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
Why would you assume that?
"God doesn't play dice" - Albert Einstein
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
|
|
|
|
|
Can't you see the really GOOD think this solution is?
If the string is not a number you will also get the right message. It can't be simple, can it?
Hahahahaha
|
|
|
|