|
you asked for an integer value, see the subject line.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Here is the point: Getting a number from the slider control and make it integer (a.k.a. removing fractional part) so that I can send it through the serial port
When speaking about integers, it doesn't mean to be a 'int' variable, but in other words, a natural number
|
|
|
|
|
Hi all,
I have a problem in getting the one below to work. I think i have used the right syntax. But keeps coming with error on EXEC Lline...
CREATE FUNCTION Summary (@Month varchar(30),@Year varchar(30),@ShowType varchar(30))
RETURNS TABLE
AS
RETURN
With
EXECUTE C_WEB_sp_RevenueSummaryByShow 'April', '2010', '3'
Go
Thansk for your time
|
|
|
|
|
This belongs to General Database forum.
modified on Thursday, June 3, 2010 10:28 AM
|
|
|
|
|
It is bad enough we have to endure LINQ, but these codez are not acceptable here at all.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
You see, you can pour the scorn when you want to (in a very polite way of course).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I am aware I still need to learn a lot, that is why I pay attention to my Masters at every occasion.
"His Master's Voice", one of my very first replies to you, you remember?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
That was a while back.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
yep. LINQ did not even exist back then.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Please remove this message from here.
If you want an answer to your question, please post this in the General Database forum.
My signature "sucks" today
|
|
|
|
|
No, do not remove the message!
6. Do not remove or empty a message if others have replied...
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: Do not remove or empty a message if others have replied..
Oh sorry. Will make sure about that before posting 'remove the message' next time.
My signature "sucks" today
|
|
|
|
|
hiii friends..
We are developing one application which capture image connected USB camera.we also want to view continueous frame from camera in some control or anything.
we have serched google and found using WIA.But the problem is that it does not support continueous frame from camera.
Now we are searching any control(.Net control or may be third party control. whatever) which provides such facility.
Thanks in advance.
|
|
|
|
|
|
In my expert gallery? All I see are:
Standard
Cross-Tab
Mail Label
How come I can't see
Standard
Form Letter
Form
Cross-Tab
Subreport
Mail Label
Drill Down
Do I need add any references?
I want to use the Form or Form Letter, but don't see it in my selection. What am I missing?
|
|
|
|
|
To me it looks like one of your toolbars is missing (or hidden).
My signature "sucks" today
|
|
|
|
|
so how do i enable it ?
Thanks
|
|
|
|
|
hi...........
I have a gridview and button.When click on button then all gridview rows inserted into database.how to do this?
please help me.....
thank u.
|
|
|
|
|
DO NOT cross post!
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I'm looking for a reversed insertion sort. I would like to, as usual, take a number (the first) in the right part of the array and then, as opposed to the standard, start looking at the last item in the left array and then work my way to the beginning of the left part of the array.
My current solution for this is the below I wonder if someone has a better (cleaner version). I doubt mine is as good as i gets...
(Why? - school assigment...)
/Rgds
public int[] InsertReversed(int[] arr)
{
for (int h = 1; h < arr.Length; h++)
{
int curr = arr[h];
int v = h - 1;
for (; v >= 0; v--)
{
if (curr > arr[v])
break;
}
for (int i = h; i > v+1; i--)
{
arr[i] = arr[i - 1];
}
arr[v+1] = curr;
}
return arr;
}
|
|
|
|
|
Well huh?
You have to write an Insertion Sort that starts searching for the insertion location from the back of the sorted part, and you want to optimize it? (not much to do then, I only see 1 thing right now)
Or do you want to optimize insertion sort? (that would be easier)
|
|
|
|
|
Hi, thanks.
Yes, only looking for optimizing this one for now. We are looking at merge, heap and quick as well. I figured it wasn't much to do about what I've got but if you found one thing it would be greatly appreciated.
Rgds
|
|
|
|
|
The thing I found is ..
edit: wait a minute I'll figure this out..
There is something else though, which is the algorithm. And I don't mean that you should use a different kind of sort, but I mean the "search backwards" part. This backwards searching only helps for certain inputs, as you probably know. Since the first part is sorted, you could do a binary search. It doesn't affect the "big O" of course but for random inputs it would work better on average since less time would be spent searching for the correct place, assuming the array is big enough to hide the Nasty Constant hidden by the big O.
On the other hand, insertion sort would be the wrong choice for random inputs.
It could be worth investigating, though.
edit2: ok back to this "1 thing".
The original "copy loop" is
for (int i = h; i > v + 1; i--)
{
arr[i] = arr[i - 1];
}
The new loop would be:
for (int i = h - 1; i > v; i--)
{
arr[i + 1] = arr[i];
}
And I'll have to conclude that it could be faster, but the CLR is a bit of an idiot, especially in debug mode which is the only think I can quickly test (it does things like storing the result of the loop condition on the stack - presumably for the debugger to know the result of the comparison). In C++ or C this kind of trick would work (if the compiler didn't think of it first) and it might work for C# in release mode.
I'll run some tests.
Edit: yes, it is approximately 4% faster, with array length 1k. 5.5% with array length 10k.
Edit2: this result may be insignificant.
There may also be a way to avoid array-bounds checks (well, 1 per iteration max anyway), I'll look into it.
Edit: no, there isn't.
modified on Thursday, June 3, 2010 8:16 AM
|
|
|
|
|
I also tried unsafe code, it got 13% faster (array size 10k).
The code was:
unsafe
{
fixed (int* ptr = &arr[0])
{
for (int i = h - 1; i > v; i--)
{
ptr[i + 1] = ptr[i];
}
}
}
note: all tests were done without a debugger attached, with a release build, on a 64bit platform.
edit: unsafe code would also help for the other parts of the function, of course.
|
|
|
|
|