|
Just remove the attribute, i.e. "/test/yadda"
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
Hi all,
I am writing my own HTTP web server that is suppose to be runnig on a computer in a network that is connected to the internet througth a router.
Now the router has been configed to send any HTTP protocal messages to the
computer with the web server. But when I try to connect to the web server througth the routers internet IP from the same computer running the server it fails to connect. Now I think that you arn't suppose to be able to connect to a local web server througth a internet ip, am I right? But then how can I test that my web server works on the internet and what about FTP servers? Any ideas on how to test if the server works with the same computer running it, without connecting to it througth it's local IP?
Aidman » over and out
|
|
|
|
|
Hi guys, I'm writing a program using database, there are some fields should be currency data type, so I used COleCurrency... but I got some problems/questions(never used COleCurrency before):
1, How do you handle negative currency value?
For example, I have a variable with value COleCurrency(0, 0), now I have to further deduct it, so its negative. And now if I want to divide it by a DWORD, its value messed up.
COleCurrency init(0, 0); // initial value is 0.00
COleCurrency refund = blahblah; // some value determined at runtime
init -= refund; // remaining value, it's negative
DWORD dwQty = 500;
COleCurrency unitPrice = init / dwQty; // now value of init becomes a mess
My observation: we cannot divide a negative COleCurrency value?
2, How do you use "SUM" to get sum of currency format field values from a table in database?
I used the following SQL to access the sum value of "dPrice" column, which is in currency format, and the table name is tblDStorage:
"SELECT SUM (dPrice) AS total_price FROM tblDStorage"
Now, on one of my PC it worked well but on another the result is always 0. Why? Both machines have same softwares installed.
3, Can you use double instead of currency to store currency values in database, if no, what's the downside of doing so, and in what case we may loss precision?
I've actually tried to use double, and all problems are gone and there has been no data loss found, but I was told that currency would be more precise for sure...
Thanks a lot for your time.
|
|
|
|
|
hi.
char buf[100];
I want to save the buffer on the file.
say, first 87 array has a character but left over has NULL.
so when I save it, also save NULL value into the file.
fputs(buf,fp);
How can I save just 87 character into the file??
thanks
|
|
|
|
|
Tomohiro wrote:
How can I save just 87 character into the file??
By using C++ instead of C. If you used an ofstream, even if you use a C style string instead of std::string, it will stream only the 87 characters you are after.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
fprintf
-c
I'm not the droid you're looking for.
|
|
|
|
|
|
Tomohiro wrote:
for(int i=0;i fprintf(fp,"%c",buf[i]);
}
wouldn't it be easier to do: fprintf(fp,"%s",buf) ?
cheers,
-B
|
|
|
|
|
You can also try fwrite, and specify that you want 87 elements each of size 1.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
Hi.
I am working with HTTP 1.1. I would like to know what other characters such as alpha and punctuactions are allowed for a given URL?
For example:
// Valid
http://www.oiahsdifh.com/aoihsdofhad_jalsdif-joihasdf/theFile.file
// Is this valid?
www.oiahsdifh.com/aoihsdofhad!jalsdif{joihasdf/theFile|file
The project deals with HTTP and websites links. Thus, I need to know the standard and pattern to which servers and clients communicate.
Thanks,
Kuphryn
|
|
|
|
|
Check http://www.ietf.org/rfc/rfc2616.txt[^]
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
|
I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions?
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
Are they public ? Why are you exposing your data members ? Does the code compile, even though class wizard is broken ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
|
If you are using VC++ 6, yes, that is the case. For any template classes, only member data and inline methods will show up in class-view or auto-completion menus, and no, there is no solution, a future patch from Microsoft is our only hope.
|
|
|
|
|
Thanks for your reply.
Maybe I'll just make all of hte functions inline so that I can see the auto-complete.
I did have some limited success with two of my methods showing up. Neither of them were inline, but one of htem had default parameters and the other was an overload. As long as I left one of them with a default parameter both would show up in the auto-complete menu.
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
|
Hi all..
I cerate an application that stores some user-specific data in the registry..
So I use a registry path like this:
HKEY_CURRENT_USER\SOFTWARE\MyCompanyName\Myproduct\UserInfo
So every user logs in can have his pesonalized settings..
The Problem:
When a user uninstalles the application I will be able to remove only that user's data only .. but How can I have access to other users data to remove it as well ?
|
|
|
|
|
Being able to change another user's registry would be a securitybreach.
So unless the user uninstalling the software is an administrator, no can do.
Otherwise, iterate through all instances under HKEY_USERS and remove the entries.
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
you could set up all users under the key, like:-
HKEY_LOCAL_MACHINE\SOFTWARE\MyCompanyName\Myproduct\UserInfo\User1
HKEY_LOCAL_MACHINE\SOFTWARE\MyCompanyName\Myproduct\UserInfo\User2
etc.
Then when uninstalling delete the key:-
HKEY_LOCAL_MACHINE\SOFTWARE\MyCompanyName\Myproduct\UserInfo
and all subkeys.
it may mean a bit more work to identify the user settings for the program for each user but its a quick way to clear up when uninstalling
|
|
|
|
|
Hi
I'm learning VC and I'm thinking it seems logical that at
ShowWindow(SW_SHOW)
the OnPaint function should be called.Can someone pls confirm with me if it is true?
a zillion thks
|
|
|
|
|
raner wrote:
ShowWindow(SW_SHOW)
I don't think so.Its only for VISIBILITY of window.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
InvalidateRect() caused that.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
I have an text box in my dialog.I use this line of code to set it its string in OnInitDialog:
m_strNotify = "aaaa";
m_strNotify += "\n";
m_strNotify += "ddddd";
AfxMessageBox(m_strNotify);
m_edit.SetWindowText(m_strNotify);
In messagebox NEW LINE works fine but in text box it shows all the texts in one line.I set multiline property to true but it doesn't work.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|