|
Ahhh, I hate univoters. 5ed
|
|
|
|
|
Agweet wrote: can any1 tell me wat im doing wrong
Yes, some keys on your keyboard appear to be stuck, and others seem to be in the wrong place altogether.
|
|
|
|
|
ROTFL !!!
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi All,
Iam using WMI to get the required printer job information.Here Iam using "Select * from win32_Printjob" from ManagementObjectQuery. In this Iam using thread.sleep for 10 seconds to get the pages,size.
Without thread.sleep Iam getting pages, size as 0.
But this sleep for 10 sec mechanism works only for small documents.
When I get large document It is unable to get the no.of pages,size(just showing them as 0).
1.Is there any way to get the correct pages,size of print document?
2.Is there any way to know that a document came for printing is totally read by spooler?
3.I think after reading all the data only it will go for printing.,am I right or wrong?If right,then how to know that status ready for printing?
Kindly help me
Thanks
|
|
|
|
|
For 1. you could try this event query:
Select * From __InstanceDeletionEvent Within 2 Where TargetInstance Isa "Win32_PrintJob"
TargetInstance.PagesPrinted should give you the number of pages printed.
|
|
|
|
|
I see arrays being used pretty often, even when you might think that the amount of elements isn't always fixed.
How come?
Is the performance so low or the overhead of a typed list/dictionary so big that an array is usually better?
I mean, even arrays come with a large amount of members, so is that a matter of preference/habit or do arrays really provide better performance?
Thanks.
|
|
|
|
|
Megidolaon wrote: Is the performance so low or the overhead of a typed list/dictionary so big that an array is usually better?
List uses arrays internally to keep it's items. So I think comparing arrays and list doesn't make any sense.
If the number of items to be stored are known, there is no extra tasks included in the List. You can initialize list by specifying the required space count. It just initializes an array with the same size specified.
There are some extra steps involved when the size is unknown. List creates an array with some size upon initialization. When there is no space to keep new items, it just copies the existing array to a larger one.
Anyway, typed lists are easy to use than using arrays manually.
|
|
|
|
|
Hi,
I have a task of understanding a particular vendor software product and re-engineer it for some custom purpose. Right now I am not able to find where the stored procedures are getting invoked, in the sense which method is calling it. Even I don’t know is there any referenced dll is invoking the stored procedure. I have an utility which can generate code from assembly. So I can debug it. Now my question is, Is there any way I can trace the method call path from the UI button click till the stored procedure is getting invoked.
If my question is not clear, please let me know. I will elaborate it more.
Thanks in advance.
Krishnaraj Barvathaya B
|
|
|
|
|
You might want to take a look at CLR Profiler. It traces paths of running code - it won't tell you exactly where something is called, but it will give you a fair starting point.
|
|
|
|
|
hello
what is server farm and what is the role of web service in it?
i want link(s) about it for research.
thanks
|
|
|
|
|
|
Hello
i thank you about your help.
i saw these links , but they are not my statement.
when we are talking about problems of load distribution on
web servers,there are some solutions for solving load distribution
such as:
1-DNS
2-hardware ways
3-software ways
4-hard and software ways
and the newest and the best solution is a complete software way.
in this architecture there are 4 modules:
1-directing to load
2-distributor load servers
3-web services
4-....
now, i want an article or site(s) about this.
with thanks
|
|
|
|
|
aref87 wrote: i saw these links , but they are not my statement.
Then you need to be more specific when asking questions.
aref87 wrote: now, i want an article or site(s) about this.
Have you tried putting those items into Google?
|
|
|
|
|
Hello
Ok.
i tried,but i coulde not find what i want.
what i want is:
a web service that it is a module in a server farm.
this solution is complete software and the best solution for load balancing on servers.
but i can not find this subject exacthy.
|
|
|
|
|
Hello
Sorry because of my terrible english!
I need to listen to a running program (.exe file) to check if it's calling a certain function, so that I can replace my function instead.
Can enyone help?
Thanks
|
|
|
|
|
If it's your application, then you may want to take a look at the LinFU articles here on CP. They are the mutts nuts.
|
|
|
|
|
No!
Unfortunately that program isn't mine. It started before my program and mine should wait until that program calls a function and then replace my own function instead. Does LinFU still help?
|
|
|
|
|
Well, it could do - have a read of the articles.
|
|
|
|
|
not certain hw it works in c# but c++ you can inject your code in the application and then use SetWindowLong() to change the address of exe function you wish to monitor , say name it New_function . Now call the
original exe function from you New_fucntion if you want or just use this new fuction to do your work.
you will find lots of article on how to inject code
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
Hello ,
I am writting an application in which I need to find details about excel files. One of the properties I am after is the owner property of the excel file, this should be the one that you can see when you right click the excel file and choose proerties, then go to Details Tab, under File's section, there will be owner name.
How can I get handle on this name at run time using Microsoft.Office.Interop.Excel, i think it should be as simple as finding a creator of the file by using Microsoft.Office.Interop.Excel.Application.Creator but there is not such property like owner.
Can somebody help me with this.
Thanks in advance.
happy coding!
|
|
|
|
|
Hi,
I have values in my database that have quotes e.g Spanner 2",Tyre 12"
I am working on escaping them so that the output to a CSV file is legible.
Currently I have
data = data.Replace("\"","\\\"");
Which is not working because the \" is not there. Instead I have " without the slash. How can I escape them ?
Let's do this !
|
|
|
|
|
Hello,
You may replace the " char to any other char, like this
data = data.Replace('"','\');
if you want to replace "(quote) to a string then you have to replace with a special character as above then u can replece that special char (as String) to any string.
data = data.Replace('"','`'); // replacing old char to new char
data = data.Replace("`","\\\"); // replaceing old String to new String
It think u can solve your problem..
Best of Luck.
Dipak
|
|
|
|
|
That should work. I just tried:
string s = "12\" tire" ;
System.Console.WriteLine ( s ) ;
s = "\"" + s.Replace ( "\"" , "\\\"" ) + "\"" ;
System.Console.WriteLine ( s ) ;
And got
12" tire
"12\" tire"
as expected.
It's possible that the " character is not actually a " character, it could be some other Unicode character.
(It could be Double Prime ″ Unicode 2033 for example.)
|
|
|
|
|
Say I have a class like,
class Sample
{
public decimal first = 10;
public decimal second = 20;
} I have initialized it
Sample sample = new Sample(); Now how do I calculate the space required for this instance ? I have calculated in the following way,
decimal takes 12 bytes. Here we have two decimals, hence 24 bytes. And the variable sample , I believe it takes 4bytes. So total it is 28bytes. Is this the right way to calculate size utilized ?
|
|
|
|
|
Its a bit more complex. The variable sample is taking up stack space (and I believe theres more than just a 32bit pointer - I'm too lazy to read the docs atm).
The instance is stored on the heap, but again theres probably overhead on top of those 24 bytes.
If memory usage is an issue in your app I suggest you run a profiler over it. I think Redgate advertises here, otherwise the one from Jetbrains is an acceptable alternative.
|
|
|
|