|
AFAIK, a byte is always 8-bits.
[edit]
I just saw the reference to the article that said there used to be 6-bit bytes, but today's byte is 8-bits in length.
[/edit]
I believe UTF-16 uses a 16-bit (i.e. 2 byte) "word". Hence, MBCS, DBCS, etc. refer to multi-byte, double-byte..., etc.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Fair enough. I rarely deal with such things, so I was just mainly throwing it out on the table for further discussion.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
the word byte comes from By Eight. Meaning they took eight bits together
No hurries, no worries.
|
|
|
|
|
|
ok I stand corrected.
No hurries, no worries.
|
|
|
|
|
you almost had me convinced
Blogless
|
|
|
|
|
And here I thought is was a contraction from the Old English - 'Byte Me!'
|
|
|
|
|
Hi, could somebody help me?
In my C application, I try to communicate with CISCO's devices, such as router, swith. then once the connection is established, I can issue some commands to grab some data from the CISCO's device.
could somebody tell me how can I do this, and if CISCO has the related "API" that I can use ?
thanks a lot
dadsadasd
|
|
|
|
|
asv wrote:
could somebody tell me how can I do this, and if CISCO has the related "API" that I can use ?
Sounds interesting. Never thought of doing this but in order to communicate with a Cisco device you will need to visit Cisco’s web site. As memory serves they use their own variation of SNMP (simple network management protocol) although some of the more general commands should work.
Not much help I know but it (SNMP) gives you a starting point.
-------------------------------
|
|
|
|
|
You could do this with the Telnet protocol.
Blogless
|
|
|
|
|
Okay, didn’t even think of just opening a socket connection to the device to see what it would allow you to do.
Then again do you really want it set up so insecure? I mean telnet is after all clear text over the wire.
Interesting...
-------------------------------
|
|
|
|
|
sfdougl wrote:
Then again do you really want it set up so insecure? I mean telnet is after all clear text over the wire.
Could use SSH or secure telnet, but either way you can use 'show run' and parse the return string to hold all the cisco configuration, then issue "config t" and the parameter is question to set it's appriopiate value. There are web base solutions but all are very crude.
Blogless
|
|
|
|
|
|
hi folks,
here is my problem.
i have a member function of my dialog box called OnEditDateDay() that maps an EditBox Control EN_CHANGE (ON_EN_CHANGE(IDC_DATEDAY_EDIT, OnEditDateDay) ).
when i code the folowing function, it works well under Visual Studio 6, but not perfecty on VS2003.
it returns the cursor (current position where to write in the edit control) at the begining of the edit, each time i reach the 2 characters string length...
here is the code.
void CFactEditorDlg::OnEditDateDay() {
m_peDateDay->GetWindowText(m_strDateDay);
if ((m_strDateDay.GetLength() >= 2) && (m_peDateDay == GetFocus())) {
m_strDateDay = m_strDateDay.Left(2);
m_peDateDay->SetWindowText(m_strDateDay);
m_peDateMonth->SetSel(0, -1);
m_peDateMonth->SetFocus();
}
m_strDateText.Format("%s/%s/%s", m_strDateDay, m_strDateMonth, m_strDateYear);
m_ptDate->SetWindowText(m_strDateText);
}
i really cannot understand why this...
i give up.
any idea or questions ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I am going to guess that is because when when you reach 2 charcters in length you then call SetWindowText on the edit control, which causes OnEditDateDay to be called again.
|
|
|
|
|
so why doesn't it do this under visual C++ 6 ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Blind luck! You are just ASKING for recursion to occur using SetWindowText on an EN_CHANGE message. A different user recently had a post here with a similar problem, and he DID suffer the recursion.
|
|
|
|
|
i'm not sure i understand you.
you mean SetWindowPos() "re-raises" the EN_CHANGE event ?
I thought to something like that already, but as it didn't do it under VC++6...
is it a new feature of MFC 7 ?
is there a way to work around this ?
thanks,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I said the SetWindowText() causes a regeneration of the EN_CHANGE message.
After all, you did CHANGE the text when you made the call to the SetWindowText(), which results in EN_CHANGE, which within you call SetWindowText() which results in EN_CHANGE, within which you call SetWindowText()... and so on and so on and so on....
It was not written to detect if it is the SAME text or not.
|
|
|
|
|
... BUT it worked great on VC++ 6 !!!!!! did you notice that point ???????
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Yes, I did. I am just implying that INHERENTLY your deisng is flawed. You could put in a blocker variable so you don't reenter your own function and that might help. Then you won't be dependent upon the whims of the development platform
|
|
|
|
|
ok blake,
here is the new code :
void CFactEditorDlg::OnEditDateDay() {
static bAlreadyIn = false;
if (!bAlreadyIn) {
bAlreadyIn = true;
m_peDateDay->GetWindowText(m_strDateDay);
if ((m_strDateDay.GetLength() >= 2) && (m_peDateDay == GetFocus())) {
m_strDateDay = m_strDateDay.Left(2);
m_peDateDay->SetWindowText(m_strDateDay);
m_peDateMonth->SetSel(0, -1);
m_peDateMonth->SetFocus();
}
m_strDateText.Format("%s/%s/%s", m_strDateDay, m_strDateMonth, m_strDateYear);
m_ptDate->SetWindowText(m_strDateText);
bAlreadyIn = false;
}
}
it seems to work quite fine now...
but it still don't understand why it behaves like this only under VC++7...
thanks anyway
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi, does anyone know how to use RLC? Can xplain how it is use? Can it be use to compress a DICOM image into a smaller file size? The purpose of reducing the size is to save space. Can it be done? Please help. Thank you.
|
|
|
|
|
|
In VC++ 6.0 in "ResourceView tab->Version" we find four places where version number has to be changed.
1. FILEVERSION
2. PRODUCTVERSION
and
3. FileVersion
4. ProductVersion
Initially the version number in all these four places will be
1,0,0,1. Now our client requirement is to add intermediate version number i.e. fifth digit (e.g. 1,0,0,1, I2).
I am able to add at "FileVersion" and "ProductVersion" but "FILEVERSON" and "PRODUCTVERSION" are not accepting the fifth digit.
Any solution in this regards will be highly appreciated.
Thanks & Regards,
Neeraj
|
|
|
|