|
I have some problems to make a network component.
It is a "TIME_WAIT" state on client socket.
When the socket is in "TIME_WAIT" state, it cannot connect into any remote server.
How can I avoid "TIME_WAIT" state?
Or, is there any function that can check a socket in "TIME_WAIT" or not ?
I disconnect all sessions using "DisconnectEx" function for re-using socket.
And, all sockets are pre-binded.
There are no problem when I disconnect client from server.
But, client disconnects itself and then socket falls in "TIME_WAIT" state.
I tryed to remove that state, but I can't. (failed..all)
I applied handshaking routine, LINGER option and changing into blocking mode..
As you know, TIME_WAIT state's duration is so~~~~ long!!
So, I want to know, how to check it or avoid it. ( TIME_WAIT state )
NOVICE FOREVER!!!
|
|
|
|
|
I need information ( mathematical basics ) about JPEG and JPEG2000 file formats . How can I convert BMP file to JPEG one . I have the all information I need about BMP . But I can't find info about JPEG . Could You recommend me some articles in Internet , devoted to JPEG construction .
|
|
|
|
|
A good starting point is http://www.wotsit.org/
"An education isn't how much you have committed to memory, or even how much you know. It's being able to differentiate between what you do know and what you don't." - Anatole France
|
|
|
|
|
|
i m using NetUserAdd()keeping level as 1 ie USER_INFO_1.in this structure i have to keep usri1_priv as USER_PRIV_USER.it has added the user.with the specified user name and password i can log in my comp.but when i m checking its " member of" (in the manage)it is showing me nothing.why
|
|
|
|
|
|
Well how about sharing it with the rest of the community?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
sorry Mr David Crow for not replying u in time.Actually i was trying to include a user in a local group without creating the user account
|
|
|
|
|
FYI
George Shepherd , Windows Forms FAQ
http://www.syncfusion.com/faq/windowsforms/Default.aspx
|
|
|
|
|
spammers are not welcomed here...
you didn't even care to make the url as a link
absolutely stupid !
hey, you know what ? you web site is really horrible
you got my 1... poor guy, anonymous moreover
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Whats About ThatsAlok FAQ
|
|
|
|
|
2 things :
- it is a codeproject one, so, it IS good by the fact,
- it is in construction, which means it's not ended...
better that way ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
better that way
Yeap, You are Right
|
|
|
|
|
I have seen that you are also part of this Series, thats true?
|
|
|
|
|
sunit5 wrote:
I have seen that you are also part of this Series, thats true?
yes it is... btu Alok is the only one who designs the whole job, so i'm co-worker on that article (part 2), but alok keep the choice of changing some stuff in it...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi.. All
I m Working on one of Text-correction module ..
I have some difficulty in conversion of the various form of Date come in to raw-input text to some Standard format(mmmm dd yyyy).
various possibilty of Date text are:
input OutPut
Jan 5th 2005 = January 5, 2005
Jan 2605 = January 26, 2005
Jan of 05 = January 2005
Jan 05 = January 2005
6th of June = June 6, 2005 or June 6
6th of June 05= June 6, 2005
this month 6th = July 6, 2005
On 6th of this month = June 6, 2005
or only number like max-digit(i.e: 06242005) = output Reqired is : mm/dd/yyyy =06/24/2005
to min-digit (i.e : 625) = = output Reqired is : mm/dd/yyyy =06/2/2005
Can any one Guide me ... how I can Do...it..
I m very much confused ?? for the logic....
can any MFC class help here ? CDateTime , CDateTimeFormatInfo ????
pls...Help me ... looking for positive reply form all of u !
thanks in Advance !!
Rajan Kapadia
|
|
|
|
|
CDateTimeCtrl::SetFormat[^] might be able to help you.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Thanks for u r Reply...
But I have clearly mention that ... My problem is Parsing the "ambigous" String not the Formating the Date. If I can find the Proper input the Any Constructer of MFC class (like , COLEDateTime, CDateTime , CDateTimeFormatINfo,,... ) then I can Convert to any format of date!!
But My Problem is how to find parse the input Nummeric??
i.e: only number like max-digit(i.e: 06242005) = output Reqired is : mm/dd/yyyy =06/24/2005 to min-digit (i.e : 625) = = output Reqired is : mm/dd/yyyy =06/2/2005.
Can u help me for this ???
|
|
|
|
|
Have a look at COleDateTime class as well.
Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off."
My Articles
|
|
|
|
|
Break the inputs down into what they are/aren't like:
if (first_3_letters_are_a_month)
{
Jan 5th 2005 = January 5, 2005
Jan 2605 = January 26, 2005
Jan of 05 = January 2005
Jan 05 = January 2005
}
else
{
if (first_word_is_this)
this month 6th = July 6, 2005
else if (first_word_is_on)
On 6th of this month = June 6, 2005
else
{
if (first_word_has_th)
{
6th of June = June 6, 2005 or June 6
6th of June 05= June 6, 2005
}
else
{
06242005 = 06/24/2005
625 = 06/2/2005
}
}
} Now you should have an easier time parsing them.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks for u r Reply sir.
But ..still here my patterns are not static ( u assumed by mistake ) my patterns may vary due to human tendecies to speck every time different patterns for the same thing !! so.....I can't make the code based on pre-assumption like u !!
Currently , I m doing the Ambigious rule making for the Text-correction..
But , I m still confused at parsing the only Numbers string ( how to differnceate with numbers for Day,Month,Year...! Can i make Regular Expression to validate the input numbers in to Day, Month, Year?
Can u assist me ?
Cheers,
Rajan Kapadia
|
|
|
|
|
Anonymous wrote:
But , I m still confused at parsing the only Numbers string ( how to differnceate with numbers for Day,Month,Year...!
How about:
CString strDate;
if (strDate.GetLength() == 8)
{
nMonth = atoi(strDate.Left(2));
nDay = atoi(strDate.Mid(2, 2));
nYear = atoi(strDate.Right(4));
}
else if (strDate.GetLength() == 3)
{
nMonth = atoi(strDate.Left(1));
nDay = atoi(strDate.Mid(1, 1));
nYear = atoi(strDate.Right(1));
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks for u r reply....
I have done same thing ... just 2-day before... I have written various RE for classifying Input String in to DATE Formats based on it length.
one of possible RE u can see : for 8-digit string :
((^(?<month>10|12|0?[13578])(?<day>3[01]|[12][0-9]|0?[1-9])(?<year>(1[8-9]\\d{2})|([2-9]\\d{3}))$)|(^(?<month>11|0?[469])(?<day>30|[12][0-9]|0?[1-9])(?<year>(1[8-9]\\d{2})|([2-9]\\d{3}))$)|(^(?<month>0?2)(?<day>2[0-8]|1[0-9]|0?[1-9])(?<year>(1[8-9]\\d{2})|([2-9]\\d{3}))$)|(^(?<month>0?2)(?<day>29)(?<year>[2468][048]00)$)|(^(?<month>0?2)(?<day>29)(?<year>[3579][26]00)$)|(^(?<month>0?2)(?<day>29)(?<year>[1][89][0][48])$)|(^(?<month>0?2)(?<day>29)(?<year>[2-9][0-9][0][48])$)|(^(?<month>0?2)(?<day>29)(?<year>[1][89][2468][048])$)|(^(?<month>0?2)(?<day>29)(?<year>[2-9][0-9][2468][048])$)|(^(?<month>0?2)(?<day>29)(?<year>[1][89][13579][26])$)|(^(?<month>0?2)(?<day>29)(?<year>[2-9][0-9][13579][26])$))
This way I have solved my proble ......is it write-way to do it ???
and I want to ask? how to parse the Unkown or Ambigous pattern ....like ?
"on 10th of this month" ----> so I want to find the current system date whenever I found word "this" !!!! is It?? Can I do similar for "next", "previous" ...words???? and for Day,Month,Year ??
can u assist in this similar type of problem ???
Cheers,
Rajan Kapadia
|
|
|
|
|
Rajan Kapadia wrote:
...is it write-way to do it ???
My first response would be no. Since there are only six possibilities, using an if /else construct would be much simpler now and in the future if you or someone else needed to modify it.
Rajan Kapadia wrote:
I want to find the current system date...
That is what time() is for.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks for u r reply....
David Crow Wrote::
using an if/else construct would be much simpler now ???
means what is exact ....?? means ?? --> 8-3 Length string ??
for Current SystemDate I want to Know how i can do for "next","this", "previous" , etc words ??
???
Cheers,
Rajan Kapadia
|
|
|
|