|
I do not know about Brady, but I have two hands.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
LOL - was each filed to hol the chapter of a book! LOL - oh the horror!
|
|
|
|
|
Congrats on quitting!
My father did that too, when he decided that he did not like what he saw when looking in the mirror at his local bar. He put down his drink, threw away is cigarettes, and walked home.
The last time I tried to seriously quit smoking I discovered exactly how much of a stimulant it was. I was driving to work, 45 minutes at the time, and drove off the side of the road. It turns out my coffee was not the only thing waking me up.
As for drinking, my grandfather drank until his death at 92 and I expect to be doing the same; the drinking part, not the reaching 92 part.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Thanks, but I haven't quit yet, I've only started quitting. The drinking is only for a break, to give my poor body some rest. I was getting into a risky situation of drinking every night, to soften the ravages felt from the previous night. Then on weekends, Friday night made having more than a few beers on Saturday inevitable, and so on, and Monday mornings were just not good.
The cigarettes I hope to see the end of permanently. I have stopped smoking before, for up to two years, and then the demon weed insidiously crept back into my life. I casual smoke here or there over a beer etc. but then I was much younger, and now that I'm 37 I feel it's time to really get rid of that poison.
|
|
|
|
|
Smart, very smart, sounds similar to my story. Quit smoking for 2 years and then started back up to piss someone off, my Ex. At 37 I was still playing pool and drinking every night for hours, but I was no longer enjoying that. I still like my glass of bourbon or some beer in the evenings, but rarely go out any more because I fall back into the old pattern and tend to stay tell closing.
Suggestion: Take up running or long vigorous walks, during either and afterwards you normally do not want a smoke. It also gives you time to think without any distractions or you can just observe the world around, very relaxing if you ignore the garbage people leave along the roads and paths.
Good Luck!
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hi
i want to change the header on sort
for example
when i click the header of grid pax_name it schould change to pax_name(ASC)
and so on Descending pax_name(Desc)
i write code int he sortcommand event of the datagrid by using viewstate.
Bind();
if(ViewState["SortOrder"].ToString() == "" || ViewState["SortOrder"].ToString() == "DESC")
{
dv.Sort = e.SortExpression;
ViewState["SortExpression"]= e.SortExpression + "ASC";
ViewState["SortOrder"] = "ASC";
}
else
{
dv.Sort = e.SortExpression + " DESC";
ViewState["SortExpression"]= e.SortExpression + " DESC";
ViewState["SortOrder"] = "DESC";
}
dgHistory.DataBind();
-- modified at 3:20 Tuesday 24th April, 2007
|
|
|
|
|
This is Code Horros Forum, hence
you (perhaps us?) missed something...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
SQL2 = "SELECT Firstname,Surname FROM tblMembers where ID='"&rg
<b>i have change this code to the following one</b>SQL2 = "SELECT Firstname,Surname FROM tblMembers where ID='"&rg&"'"
<b>but am still an error message for this line</b>:<b>Data type mismatch in criteria expression.</b>set RS = objConn.Execute (SQL2)
please help
|
|
|
|
|
So, what forum did you think this was again?
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
Where i work, we have an aspx page with a single 750 line function for page load.
It works by posting querystring data back to itself, and It's order of execution is backwards, i.e. the first bit of executed logic is at the end of the function, and in some cases it goes 12 branch statements deep.
Fun :S
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
So, wait, 12 postbacks before the user gets a usable web page?
|
|
|
|
|
no, it posts back to the user each time, and then doing stuff posts BACK to the page again with whatever QS arguments were attatched to the link.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Oh, so basically the whole page is implemented in Page_Load? Hey, Ajax is overrated any way, and so is OO for that matter. Even structured programming pales before the Monolith.
|
|
|
|
|
Wow - that sounds like two problems in one. 750 lines ? Apart from the fact that no function should come within cooee of that size, how do you get 750 lines in the code behind, unless there's no business logic layer ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Layers? Now that's a funny idea
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Sounds like some sort of automated test cases being run one after the other.
-Prakash
|
|
|
|
|
Oh wow. Who needs method calls anyway? Goto and Gosub should be more than enough for real programmers.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O'Hanlon wrote: Goto and Gosub should be more than enough for real programmers
|
|
|
|
|
Wow, maybe you should submit that to Guinness, it may be a new world record for a page_load!
|
|
|
|
|
Sounds like a software version of a Rube Goldberg machine...
|
|
|
|
|
I disagree with what everyone said. I can think of a lot of things that would justify a long Page_Load function like that. There is nothing inherently wrong with a really long function. It usually indicates that something needs to be re-factored, but that is not always the case. If everything in the function is atomic, unique, and well-formed... then there's no reason to make it even longer by breaking it up into multiple parts, which would only serve to decrease performance by the amount of the function-calling overhead.
I would rather read an if..else structure that had 50 branches, than dive into 50 separate functions which are only called one time.
|
|
|
|
|
I hope you are kidding!
It usually indicates that it is way too complicated and needs to be broken down in to smaller chunks. Of course there are acceptations, but they are far and few between.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
No I wasn't joking. It's rare, but a long a function isn't always wrong. If everything is only done once, why push the stack and everything else you have to do? You're right though, it usually indicates something that hasn't been thought out properly.
|
|
|
|
|
void CArchiveEnc::EncryptData(DWORD dwOffset, DWORD dwLength)
{
DWORD dwDataLen = m_lpBufCur - m_lpBufStart;
if(dwDataLen == 0 || dwDataLen < dwOffset) return;
if(dwLength ==(DWORD)-1)
dwLength = dwDataLen - dwOffset;
if(dwDataLen < dwOffset + dwLength) return;
BYTE byFoo = 0x00;
BYTE* pData = m_lpBufStart + dwOffset;
while(pData < m_lpBufCur) byFoo = *pData++ ^= byFoo;
}
The last line is the killer. Why write it readable if one can put it on a single line
codito ergo sum
|
|
|
|
|
Ask Kernighan and Ritchie or even Stroustrup why they allowed it ! Don't complain if the compiler don't...
Kochise
In Code we trust !
|
|
|
|