|
Actually it sends them back to the page that referred them to the current page (which isn't a good idea because Norton and McAfee like to change your settings so referrer information is not passed with the request).
Request.UrlReferrer
|
|
|
|
|
Hy one of my groub member in a project showed me this:
public static String startPhred(File directoryToEdit) {
try {
String text = "";
BufferedReader in;
if (directoryToEdit == null) {
directoryToEdit = new File("J:/user/daten/950599/");
}
try {
makeScript(directoryToEdit);
} catch (Exception e) {
e.printStackTrace();
}
Process p = Runtime.getRuntime().exec(pfadScriptFile.getAbsolutePath());
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
StringBuffer out = new StringBuffer();
return out.toString();
} catch (IOException e) {
e.printStackTrace();
}
return "EXCEPTION AUFGETRETEN!!";:confused:
}
This was nice
Or the same guy did this:
TraceData is a class that we need in our project.
So he wrote, because he need a collection of this class:
public class TraceDataList{
public List <TraceData> traceDataList = new ArrayList<TraceData>();
}
public List getAb1Files (){
return traceDataList;
}
public void add(TraceData data){
traceDataList.add(data);
}
...and a method with the parameters for traceData, where he
did make a new Object and added it to his list.!!!
}
end of class!!
And yes he programms for about 1 1/2 years in Java!!
|
|
|
|
|
|
The below code was written by two of my team mates in two different projects. Below code in MFC.
...::OnMouseMove(...)
{
CRect rc; GetClientRect(rc);
ClientToScreen(rc);
POINT pt; GetCursorPos(&pt);
if (rc.PtInRect(pt))
{
}
}
What they are tryin is, checking the mouse pointer is over the window in OnMouseMove Handler... What to say?...I think one should Cut and Copy the above logic!!!..
Do your Duty and Don't expect the Result Rate this Post, if I helped You
|
|
|
|
|
Brilliant piece of being sure!!
|
|
|
|
|
Check whether they've used SetCapture anywhere. If the mouse is captured, you will get mouse event messages outside the window's client rectangle. Also, note that GetCursorPos tells you the current position - a WM_MOUSEMOVE message tells you that the mouse moved when captured or when over the window at some point in the past. Perhaps they were trying to filter out old events? This would only be a problem if the application isn't very responsive to window messages, however.
If you want to know the cursor position when the message was generated, that appears in the WM_MOUSEMOVE message's lParam parameter. This is actually relative to the client rectangle already, so ClientToScreen is not required. MFC's OnMouseMove function extracts the lParam message parameter to the point parameter.
Do note however that Windows limits the rate at which it sends WM_MOUSEMOVE messages so that applications aren't overwhelmed, if the application is busy. You used to be able to see this effect in Windows Paint if you moved the mouse very rapidly while drawing - the line would be in lots of straight segments, rather than being smooth - but modern PCs are well up to the demands of Paint, so you don't see it any more.
(Personally I would use ScreenToClient on the cursor's location and then use client rectangle-relative co-ordinates throughout, rather than converting the other way).
|
|
|
|
|
Yeah, that's exactly what I was thinking as I read the code. I wonder what the truth of the matter is....
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 )
|
|
|
|
|
Christian Graus wrote: I wonder what the truth of the matter is....
Here the truth...[^]
Do your Duty and Don't expect the Result Rate this Post, if I helped You
|
|
|
|
|
Mike Dimmick wrote: Check whether they've used SetCapture anywhere
No they didn't use it.
Actually what the requirement is,
1) for the 1st project to change the dialog apperiance while the mouse hovers in it. That is the dialog will be in small size, but if the mouse hovers then the size will be enlarged.
2) for the 2nd project, it is a custom button class, to give the XP effect they are catching WM_MOUSEMOVE messsage and redraw the button accordingly.
Do your Duty and Don't expect the Result Rate this Post, if I helped You
|
|
|
|
|
Parthi_Appu wrote: ...::OnMouseMove(...){
and just say
return;
That would enhance performance too by not creating objects. Isn't it?
|
|
|
|
|
One ASPX page is not loading !!!!!! Everything looks fine except this function written on page load by my dear colleague.
if(Request.Url.AbsoluteUri.StartsWith("http")
{
Response.Redirect(Request.Url.AbsoluteUri.Replace("http","https");
}
What a shame !!!!!!!!
|
|
|
|
|
ouch!
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|
|
i've made that mistake doing a search and replace before and ended up in a world of hurt
Russell
|
|
|
|
|
Russell Jones wrote: i've made that mistake doing a search and replace before and ended up in a world of hurt
Could you give some details?
|
|
|
|
|
https://www.mysite.com will become httpss ://www.mysite.com
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
dan neely wrote: https://www.mysite.com will become httpss://www.mysite.com
Then you'd just need to change the find string to "http:" - right?
|
|
|
|
|
unless there's more going on than I'm aware of.
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
dan neely wrote: https://www.mysite.com will become httpss://www.mysite.com
Yes exactly, and more over site won't load. Because each time it will redirect to the same page
|
|
|
|
|
OK this may not be what this area is intended for. But allow me to banter. Please. After all there is some programming behind.
I have this stupid Timex alarm clock that I have no idea how to setup. I go to Timex site. And search for "clock" I get the following message
_________________________________
We're sorry, but your search for "clock" returned 0 results.
Want to keep looking? Please enter another product name or keyword in the search box below
_________________________________
The whole site sucks, it will not allow you to search two words, "alarm clock". Then again if it did not find any products that matched "clock", I wonder.....Never mind.
It is possible that I am too tired to figure this out. Cooked all day and have two teenage boys. 'Nough said.
yalcin
|
|
|
|
|
In the red menu bar thingy, there is a "more products" link. Click it and one of the options is clocks. And of course, that link doesn't give any useful info.
But at the bottom of the page, there is a link for manuals: http://assets.timex.com/manuals/?timexBrand=core[^]
Maybe one of those will help.
|
|
|
|
|
LOL! This is a good one!
Those things give me headaches. Whenever I'm visiting at my father's place, I have to unset an alarm on one of those. Otherwise it will wake me up at 6 am.
I never got the hang of it. And my father insists that I leave the alarm on because he sometimes forgets to set it (when I'm not there). So if I do learn how to unset I'll have to set it back when I leave.
Every time I go visiting, I have to ask him to set it and unset it for me and it ends up in all kinds of jokes about me being a programmer and not being able to use a simple alarm clock.
|
|
|
|
|
What are people like this thinking ?
http://www.codeproject.com/cpp/BP.asp?msg=1954841#xx1954841xx[^]
The short version - he says 'This is an easy assignment, but I can't program, so please write it for me.'. He actually says 'I don't need help, I need a fully running program'.
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 )
|
|
|
|
|
Sadly, he's managed to delete his post already. Maybe we should think about just removing the ability to delete posts entirely. These people are taking away our opportunities to "educate" the masses about how to post and, more importantly, how not to post!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: taking away our opportunities to "educate" the masses
I have always maintained this. Whenever I read about a deleted post or article, I want to go an laugh at the tool educate others on how not to post.
|
|
|
|
|
It's not deleted. After the page will not load click the 'Go' button in I.E. and the page loads. I think that's a Hall of Shame one for CodeProject.
Bubba(Freddie L Richard)
|
|
|
|