|
A drop down list populated from an enumeration you think? None (from FaceBook)
modified 1-Nov-13 18:25pm.
|
|
|
|
|
Nothing to see here move along.
-- The FaceBook Team
Hello World!
|
|
|
|
|
Nice... Should have "under construction"...
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
|
|
|
|
|
|
They might have done something better well anything but would have look better rather than keep it as nothing.
I <3 my Job
|
|
|
|
|
Are you talking to yourself?
|
|
|
|
|
He fortunately missed the recent storm that's the reason.
"When you don't know what you're doing it's best to do it quickly"- SoMad
|
|
|
|
|
There is a certain whiff of the echo chamber here.
|
|
|
|
|
If m_bHistImportRunning Then
m_lHistCounter = m_lHistCounter + 79
Me.lblHistCounter.Text = m_lHistCounter.ToString
End If
oh wait...
|
|
|
|
|
I have an expression evaluator and, amongst other things, I'm extending it with function definition goodness.
Each expression takes a data set as input - name value pair type thing - and uses it to return a value:
Egg:
data {
a % 1
b % 2
}
expression - a + b
This would take the two values and return their sum [3 for the hard of thinking]
Now I started to get clever in defining the function to allow variable arguments and it seemed to be working well until I tried to some clever re-cursiveness:
function {
# ~ allows the function to take unlimited arguments as it just represents the data:
arguments - ~
function "
# if item 1 is null return item 0
[isNull ~1] ?
~0 :
(
# clone the input [~ is everything]
data = [data.clone ~];
# remove item 0
[data.remove data "~0"];
# and call back... with ... a ... single ... argument
max = [max data];
~0 > max ?
~0 :
max
)
"
}
So it compares a number with a data set and goes boom. Who'd have thunk it!
Stupid Vilmos, very stupid Vilmos!
I am now in the process or rewriting so that I must pass a fixed number of arguments, but by using a data set the arguments are variable.
[edit]
After fixing it, I then found that running the full test lots of previously fine tests now fail, total WTE ensues. I check the code, I check the functions in the test script, I even extend the logging to try and find what I've changed. What I did was change the block name for common functions so they wouldn't be loaded...
speramus in juniperus
modified 24-Oct-13 6:26am.
|
|
|
|
|
|
public static bool checkPolTime(string SFDCStartTime)
{
string configSFDCStartTime = string.Empty;
string configSFDCAMPM = string.Empty;
int len = 0;
len = SFDCStartTime.Length;
if (len > 7)
{
configSFDCStartTime = SFDCStartTime.Substring(0, 5);
configSFDCAMPM = SFDCStartTime.Substring(6, 2);
}
else
{
configSFDCStartTime = SFDCStartTime.Substring(0, 4);
configSFDCAMPM = SFDCStartTime.Substring(5, 2);
}
string systemSFDCStartMin = string.Empty;
string systemSFDCStartSec = string.Empty;
string systemSFDCAMPM = string.Empty;
string time = DateTime.Now.ToString();
string[] splitchr = { " " };
string[] strarr = time.Split(splitchr, StringSplitOptions.None);
string s = strarr[0];
len = s.Length;
if (len == 9)
{
splitchr[0] = ":";
strarr = time.Split(splitchr, StringSplitOptions.None);
s = strarr[0];
len = s.Length;
if (len == 11)
{
systemSFDCStartMin = time.Substring(10, 4);
systemSFDCStartSec = time.Substring(15, 2);
systemSFDCAMPM = time.Substring(18, 2);
}
else if (len == 12)
{
systemSFDCStartMin = time.Substring(10, 5);
systemSFDCStartSec = time.Substring(16, 2);
systemSFDCAMPM = time.Substring(19, 2);
}
}
else if (len == 10)
{
splitchr[0] = ":";
strarr = time.Split(splitchr, StringSplitOptions.None);
s = strarr[0];
len = s.Length;
if (len == 12)
{
systemSFDCStartMin = time.Substring(11, 4);
systemSFDCStartSec = time.Substring(16, 2);
systemSFDCAMPM = time.Substring(19, 2);
}
else if (len == 13)
{
systemSFDCStartMin = time.Substring(11, 5);
systemSFDCStartSec = time.Substring(17, 2);
systemSFDCAMPM = time.Substring(20, 2);
}
}
return true;
}
Zen and the art of software maintenance : rm -rf *
Math is like love : a simple idea but it can get complicated.
|
|
|
|
|
Your code snippet is not complete. You forgot e.g. systemSFDCStartHour and systemSFDCStartMilliSecond . Also code for non-American locales is missing. You can add several hundred lines more of useless code before that return true statement, there is a lot of space for future optimizations!
|
|
|
|
|
The original plan was to finish the method while poll isn't active. It just never happened since...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Nope, no redundant code in there, nope, none. Nothing to see here, move along...:TunelessWhistleSmiley:
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
I can't for the life of me figure out why someone would do this. It's not awful or subtly wrong, just kind of deranged.
DocumentInformation ldocInfo = new DocumentInformation();
ldocInfo.DocumentID = Convert.ToInt32(agmTemplateId);
if (ldocInfo.DocumentID != 0)
{
section.Items.Add(PageHelpers.CreateSidebarItem("AGM plan", "/GetFile.aspx?DocumentId=" + ldocInfo.DocumentID, true, "cmdAGMTemplate", false));
}
ldocInfo.DocumentID = Convert.ToInt32(proposalTemplateId);
if (ldocInfo.DocumentID != 0)
{
section.Items.Add(PageHelpers.CreateSidebarItem("Proposal", "/GetFile.aspx?DocumentId=" + ldocInfo.DocumentID, true, "cmdProposal", false));
}
|
|
|
|
|
What does the DocumentInformation class/struct look like?
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
It's just a data object with about 10 other properties. None of the getters or setters have any hidden side effects. My guess is that they thought they were going to have to use the object to do some kind of data lookup, but didn't switch it to an integer when they didn't have to.
|
|
|
|
|
I guess the author thought, that for some reason the variable name (DocumentID) must be the same as in the command string he assigns it to. Why someone would think that is beyond me.
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
I am using this message in one of my applications for things that should never happen (but you never know what may happen with Windows), but I guard against anyways.
I also include a 'Guru Meditation GUID' so I can find where the issue happened and try and debug it.
An example issue: I put a service in a service manager (that uses Unity IoC Container) and get it out a few lines later. If the service is, for some strange reason, not there, I show a message and terminate the application, as something major went haywire.
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
|
...haven't done it since college but I prefer:
Program faw down go "Boom!"
|
|
|
|
|
Certainly if it's going to "faw down", it should "go Boom!"; so many kids nowadays don't think it should "go Boom!".
|
|
|
|
|
I saw that in a Metro App on a friend's computer. I guess the developer agreed with the Fischer Price comparison.
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
I got "Catastrophic Failure" right from MS: a VB6 app I made years (if not decades) ago, which tries to access a MS Access DB. There was a field with junck in it, making that message..
The same message occured in Access itself, so I believe it's an Access error message.
The signature is in building process.. Please wait...
|
|
|
|