|
|
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
|
|
|
|
|
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.
Don't forget to pay attention to whether that short number is signed or unsigned!
short a = 0x7AAA;
short b = 0xAAAA;
ushort c = 0xAAAA;
You can also use the 'unchecked' syntax to force it to be a signed short.
short x = unchecked((short)0xAAAA);
|
|
|
|
|
hello freinds i need guide how can we calculate frequency of audio inn from computer or of mic using c# i need good example code but simple one to learn how i can get or read the frequency of audio in computer n how can i match 2 frequncies thx in advance
its me yami
now cheers
|
|
|
|
|
i have never develop any application using c# which will run on PDA device.
so before developing any apps for PDA please some one help me with few urls from where i can gather the knowledge that how to develop database apps for pda. because i dont know which files need to be installed as .net runtime on pda and how to move and run apps from pda and how to work with database apps in pda and where to copy the database. basically i need many basic knowledge for developing apps which will run on pda. so please give me some urls who provide video based tutorial and step-by-step guidance that how to develop a apps for pda from the scratch. thanks.
tbhattacharjee
|
|
|
|
|
hello i need to know how can i make such kind of varibale which should be available in whole project of c# desktop application like if we make some variable in some from then it just available in that form if you dispose that form then it not goana accessable i need to know how to make some variable global for all the application forms so you just type there name and get there value thx
its me yami
now cheers
|
|
|
|
|
Create a static class within the project's root namespace and create static variables in there.
Dave
|
|
|
|