|
Thanks for your help.
Indeed it works fine.
|
|
|
|
|
You're welcome
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hi,
I am reading data from an xml file.
The xml is set up so that there could be line feeds for some of the lines.
When I get these data back in the immediate window I see \n which I believe indicates the carriage return for each line?
How can I get rid of these?
Thanks
"\n use master\n go\n IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[uspGetDomainName]') AND type in (N'P', N'PC'))\n BEGIN\n EXEC dbo.sp_executesql @statement =
...
...
...
|
|
|
|
|
arkiboys wrote: How can I get rid of these?
String.Replace()
/ravi
|
|
|
|
|
Is it possible to read a specific cell or a range of cells from a spreadsheet document?
Thank you
|
|
|
|
|
|
I am trying to calculate the AVG for fields in a SQL SERVER database for a specified time interval. There may be times when there is no data for this interval. What would be the SELECT statement which will not execute the AVG of data if there is no data. I have tried to use "WHERE field IS NOT NULL", but this still throws an exception and stops execution of the program.
|
|
|
|
|
Instead of where clause use ISNULL(FieldName,'1900-1-1')
Good luck
Kutty
|
|
|
|
|
hi,
i am new to windows services and i have created a windows service which works fine when i manually start and stop it. i have changed the property to start the service automatically. and i need the service to start at the time of machine logging in. but the service is not starting. help me with fixing this issue. and this service is not related to any software. what it does is when the service is started is saves a string to the event viewer. but its not automatically started even if its property is set to start automatically.
|
|
|
|
|
karthi84 wrote: at the time of machine logging in
The Service will start when the Operating System starts, not when a user logs in.
You could use a Scheduled Task to do that. Especially if the "Service" writes and then exits, that's not what services are for.
Services normally start when the system starts, and run continuously until the system shuts down.
|
|
|
|
|
thanks for the reply. my problem is fixed. the problem was it was depending on a service which starts after this service starts. so i have fixed with this issue and once again thanks for your answer.
|
|
|
|
|
Are you running on Vista?
Dave
|
|
|
|
|
thanks for your time for replying me. my problem is fixed. the problem was it was depending on a service which starts after this service starts. so i have fixed with this issue and once again thanks for your answer.
|
|
|
|
|
Im working on an image project which requires a lot of pointers. Ive recently had a smoothing function working where i loop over all the pixels and apply a smoothing function to the pixel. I've now been asked to seperate this function so mutliple functions can be used with the pixel loop.
The smoothing function worked in two parts, the first part set variables for use later in the function and the second part did the pixel loop and applied the smoothing to the image. Now i set the variables in one function, before i enter the loop, and then call a smooth function while in the loop. I tried to have a long* global to the class ,named _norm_buff, which is set in the first function and used in the second but after entering the smooth function the value at the address of the _norm_buff is reset to 0.
The line where the _norm_buff is reset
long* sum_buff = stackalloc long[this._width];
Could the stackalloc be overwriting the value in _norm_buff?
|
|
|
|
|
I'm reading up on encryption in .NET, but I don't fully understand the concept of digital signing. Could somebody help me out here?
- Alice and Bob each have a set of private and public keys. Alice has Bobs public key and Bob has Alices.
- Alice wants to send a message to Bob and sign it
- She hashes the plaintext and encrypts it with her private key, and embeds the sign into the message encrypted with Bobs public key
- Bob receives the message and sign and checks it by decrypting using alices public key and comparing the hash values
Now heres what I don't understand:
Alice encrypts the hash with her private key and Bob decrypts it using Alices public key -- I though you could only encrypt using public and decrypt using private, not the other way around.
Does anybody know? :/
|
|
|
|
|
http://en.wikipedia.org/wiki/Public-key_cryptography[^]
Look at the diagrams down the right hand side.
You send a private message by encrypting with the recipients public key. They decrypt with their own private key. This allows you to be sure only the intended recipient can view it, because only they have the correct private key.
You sign a message by encrypting it with your own private key. The recipient decrypts it with your public key. This verifies that it came from you, otherwise the decryption wouldn't have worked. But importantly the message isn't secret because anyone can decrypt with your public key as everyone has access to it. All you have done is verified the sender though.
Simon
|
|
|
|
|
I have a DataGrid that binds to a DataSet, bu specifying the DataSource and DataMember properties:
this.myGrid.DataMember = "Something";
this.myGrid.DataSource = this.myDataSet;
However, I wish to filter some data that it displays. More precisely, I wish to filter out or even replace (in a column in the DataGrid) some data according to another column value in the DataGrid.
Is there a way to accomplish that ?
Best wishes, D
|
|
|
|
|
Have a look at the DataView class desmond,
with it you are able to query the dataSet...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
hii..frnds,can anyone help me out in getting a c# code for converting a wmv file to mpeg file..i need very urgently..thanking everyone..
santosh
|
|
|
|
|
This is a huge and complex topic. No one here is going to knock up code to do this for you. You have 3 choices:
1) Study and learn the specifications for WMV and MPEG video and actually understand how to do the conversion yourself.
2) Find a project/application online that does this, and is open source, and look at their source code. Note though, that you need to be aware of the license the open source project is released under if you plan on re-using their code.
3) Find a 3rd party .net component that will do the conversion for you. (Probably quite unlikely, but you might find 1)
WMV[^] is a proprietary container format, so to be honest you'll have difficultly finding much information on it, and will probably have to understand and reverse engineer the format yourself.
MPEG[^] refers to several things, and there are several different codecs all named under the same banner.
Simon
|
|
|
|
|
In C++ you can assing a variable a value of for instance 0xAAAA;
I tried this in C# but it didn't work. What is the syntax like in C# when assigning a hexadecimal number?
I couldn't find an example of this in books about C# which I checked, but I am sure people here know the answer to my question.
Thanks!
Ranger.
|
|
|
|
|
|
|
DaveyM69 wrote: int x = 0xAAAA;
Thanks, I wondered...
I think my error message was caused by the fact that I didn't know how many 'A's fit into a short type number.
Ranger
|
|
|
|
|
Ranger49 wrote: I think my error message was caused by the fact that I didn't know how many 'A's fit into a short type number.
Guess you know now
short = 2 bytes
int = 4 bytes
long = 8 bytes
|
|
|
|