|
I tried searching on google, but could not find a satisfactory answer.
|
|
|
|
|
If you need random access operation frequently in your code, use vector.
If you need insert and delete operation frequently, use list.
And map should be use when you want to identify a value by a key(mobbish).
|
|
|
|
|
I have written windows service in C++ using winsvc.h.
Registering the exe to run as service.
Service runs under "SYSTEM" credentials and it starts at system startup.
Using this service I can able to access processes only which are running under "SYSTEM".
Is there any property or method related to service in WinSvc.h while creating or starting service, which is used to set the service to access any process running on the desktop.
I can set this manually in services.msc for particular service under log on tab in properties.
But want to set it programmatically.
I tried checking many blogs and googled but there is no clue.
Please give me clue.
Thanks in advance.
Regards,
Gtag.
|
|
|
|
|
Hi All,
I have used batch file for set username password as environment variable.
@echo off
set /p user_name=Enter Username:
set /p passwd=Enter Password:
set DBUserName=%user_name%
set DBPassword=%passwd%
::@echo on
Now i need to do password as a encryption format(for ex:******) while user entering the password.
Is it possible?if yes plz share ur idea.
Thanks,
Mohan t
|
|
|
|
|
Try this:
@echo off
echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5>in.com
set /p password=Enter password:<nul
for /f "tokens=*" %%i in ('in.com') do set password=%%i
del in.com
echo.
echo The Password is:"%password%"
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Thanks Much sashoalm,
Instead of Nul shall we use * ? is yes means how can we do....
Once again thanks
Mohan.T
|
|
|
|
|
Why don't you see the EditV32[^]program?
EditV32 is similar to the Cmd.exe Set /p command in Windows 2000 and later, but it may be preferable for the following reasons:
It allows you to edit a variable, not just set one.
It can limit the length of the typed variable.
It can mask the typed input for simple password security.
It can limit typed input to numbers only.
It offers a timeout feature (useful when a script needs to run unattended).
It automatically "escapes" reserved shell characters in variables it creates.
It provides useful exit codes: For example, an exit code of 4 means that the user pressed Ctrl-C to abort.
It comes with an MS-DOS version that works in Windows 9x/Me as well as on MS-DOS boot media.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi,all
First,I think learning how to learn is important; Then the knowledge of major;
When I study knowledge, I use the way of learning and I explore the way of learn;
Do you think so?
|
|
|
|
|
|
|
Do you think we don't need method to study C/C++,
If you have a good way to study, you can catch c, c++, java, masm and many things quickly.
|
|
|
|
|
Oh! Of course, I believe that there should be a method to learn/study C/C++, but then this question should have been posted in some other forum.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
I am working on a huge program one of whose part is chi-square test. Actually, I have generated a dataset by implementing some other concepts and I need to implement chi-square test on that data.
Could anyone teach me how to calculate the P-value from a chi-square value ? It would be great if you have some source code or some link.
Thanks.
|
|
|
|
|
It looks interesting: why don't you write the code (you're a developer, right?)? You may also write an article about.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Good Answer .. Although I have almost tried everything I thought using my utmost potential..
I would definitely write an article if I could write the code..
I am really in trouble.. Please help!!
|
|
|
|
|
What is your doubt about? Do you clearly understand the statistics but have troubles performing the C implementation? The opposite? Both? What have you coded so far (i.e. what is you data set? Have you attempted a chi-square computation?)?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes I have already computed the chi-square computation. Now I need to find out the value in C, which can be done in excel as chidist(Chisquare_value, degree_of_freedom).. Actually I have a tree structure which contains the data and I need to find the p-value for each and every node of the tree (as said above, I have already calculated the chi-square value fir each and every node).
Thanks,
|
|
|
|
|
What you probably need is a numerical algorithm for computing the incomplete Gamma function. See section 6.2 of "Numerical Recipes in C" [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
How to change color of menu bar of dialog?
|
|
|
|
|
Get the handle to the menu using GetMenu[^] or GetSubMenu[^].
Call SetMenuInfo[^] to set the brush used to paint the menu.
Set the required brush color in the hbrBack member of the MENUINFO[^] structure.
Finally call DrawMenuBar[^] to redraw the menu.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)
|
|
|
|
|
Hello
Looking at different examples online, it all says the lpBuffer parameter has to be
a LPVOID (LPSTR).
Is it possible to allocate a fixed memory buffer like a,
char pBuffer[512];
In that case do i need to call LocalFree() function?
Can anyone show me how to use that? I wanted to make sure i allocate the memory on compile time rather than on run time.
|
|
|
|
|
If you don't set dwFlags to include FORMAT_MESSAGE_ALLOCATE_BUFFER you can allocate the buffer yourself on the stack and not call LocalFree() to release it.
On another hand, how do you know the message will fit into 512 bytes?
|
|
|
|
|
I agree with Nemanja Trifunovic.In accordance with his idea,you can refer to the following codes:
LPVOID lpMsgBuf; <br />
FormatMessage( <br />
FORMAT_MESSAGE_ALLOCATE_BUFFER | <br />
FORMAT_MESSAGE_FROM_SYSTEM | <br />
FORMAT_MESSAGE_IGNORE_INSERTS, <br />
NULL, <br />
GetLastError(), <br />
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf, <br />
0, <br />
NULL <br />
); <br />
MessageBox(NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION); <br />
<br />
LocalFree(lpMsgBuf);
|
|
|
|
|
Producer-consumer problem on a circular buffer. Multiple producer and multiple consumer threads may be running concurrently using either semaphores or a combination of mutexes and condition variables.
|
|
|
|