|
well if the column is of type data you can't place time along with it. I suggested backup your db or better first create some test data base create a column with type date, populate some entries and then change column type to date time and see results. I think changing column type form date to date time won't heart your existing changes because date time can accommodate more information so there would be no information loss in this way your change would be backward compatible.
|
|
|
|
|
I Am Using Oracle Database.
|
|
|
|
|
Have a look at this[^] then, it should help you.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
repost[^]
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hi,
I have developed a smart client desktop application using SCSF.
It has an MDI and MDI child forms opens over it(It is similar to windows menu based application using MDI) .
The problem is that the MDI child forms (i.e. the views) take a few seconds to open and load.
Is there any way of minimising the time it takes.
The forms are having simple text boxes and labels and grids(which has two columns and is not populated during load)
I call a webservice at form load and have tried to comment the service call; Even then it takes the same time so I have ruled out the possibility of service delay.
Nothing else is done at the form load except the form is rendered
All MDI child forms(views) are taking the same time.
I dont have knowledge of SCSF internals, and how SCSF does all the handling of smart parts etc.
May be it might be tuned up to load the views faster or there is some way to make the CAB work faster which I am unaware of.
Could not find the forum related to SCSF so posting it here, please suggest in case you have knowledge of SCSF message board in code project.
Thanks in advance.
Sakshi
|
|
|
|
|
First try with marking all your forms double buffered, secondly you may try to put some way to manage cache for example if you have downloaded something and its not changed then it would be better to make use of that instead of downloading same thing again and again. Secondly put some paging type thing in it to download specific parts for example instead of downloading 100 records from webservice on client side and then filtering them upon some criteria it would be better to ask webservice to return you only desired records. Secondly although I am not a fan of show/hide tech in windows forms but it may do the trick in your case and will be much faster then creating new form each time.
|
|
|
|
|
Dear All,
I am trying to create a folder in our remote server which is inside our domain.
i am using very simple code as CreateDirectory("dirPath").
i am getting an exception which says access denied to path "file path".
well i have user name and password which i can access remote server from windows.
how can i access remote server with my user id and Password and then create directory or files based on userid which i am logged in?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Access you domain control panel and assign read/write access to ASP.NET account. Folder creation requires ASP.NET code to run with write permission on desired location.
|
|
|
|
|
It is not ASP.Net application, its just Windows Application!!!
one way to use can be impersonation which i have done.
do we have some other ways?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Then check how to configure the .NET Security and assign permissions. Sorry I was so busy in ASP.NET stuff that I didn't realized that you are asking for something with windows application
|
|
|
|
|
Hello.
I have two Bitmaps. I know that the small one is contained within the big one, and I want to search for it and return its position (a Rectangle):
public Rectangle findBitmap(Bitmap smallBmp, Bitmap bigBmp);
I can do this by making lots of pixel comparations in nested fors, but obviously it's too time-consuming since there can be literally hundreds of thousands of comparations. I need a *very* fast way to do this.
I've been reading for a while about Template Matching and I think it could be the way, but it's a difficult subject and I have not found any example or code that could help me. Could you please give me some advice?
Thanks in advance.
|
|
|
|
|
|
Thank you, I will read them all, specially the Image Processing for Dummies series.
|
|
|
|
|
OK, I've been reading those articles for a while. They are all very interesting and will use them in a future, but they focus on image filtering. There are nothing about finding a Bitmap in another Bitmap, which is what I need. :-/
So I still need help...
|
|
|
|
|
verence333 wrote: for a while
30min = a while?
I guess you skimmed them and saw they where not about what you want/need.
Your best bet would be to wait for CG to pass by or to ask him.
He knows far more about this kind of stuff than I do.
|
|
|
|
|
Yes, a while. There's no need of in-depth reading how to transform an image when what I want is looking for a bitmap inside that image, and the algorithms are very similar in all the examples. Anyway, you're right and I must read them carefully when I have the time: maybe something could be done from the methods used to analyze the surrounding pixels of a given pixel.
I would like to ask CG, but someone already asked him about an algorithm to eliminate red eyes (something that I think would be similar to what I need, since it envolves looking for a pattern through an image) and CG answered that he never did it before.
I'm amazed that so few people has had this problem before. There are lots of possible applications that could be done with such an algorithm, I thought there would be plenty of solutions out there...
|
|
|
|
|
verence333 wrote: I would like to ask CG, but someone already asked him about an algorithm to eliminate red eyes (something that I think would be similar to what I need, since it envolves looking for a pattern through an image) and CG answered that he never did it before.
Don't know how long ago that was but it never hurts to ask. (well as long as you stay professional and polite it doesn't hurt )
verence333 wrote: I'm amazed that so few people has had this problem before. There are lots of possible applications that could be done with such an algorithm, I thought there would be plenty of solutions out there...
Well I guess it's one of those things that not many people have to do. My job currently doesn't allow for stuff like this so...
|
|
|
|
|
You're right, of course; I will ask him.
|
|
|
|
|
Assuming your small bitmap is really *identical* to a section of your big bitmap (and not just something that *looks* the same) then basically you just want to perform a similar search to finding a substring within a string.
As you mentioned, you can brute force it with nested fors, or you can use a bit of smarts - you should be able to adapt an existing String searching algorithm[^] to search your pixel data instead
|
|
|
|
|
Yes, the bitmap is really identical. What you say about adapting a String searching algorithm seems to be a good idea, thanks!
|
|
|
|
|
Hi verence,
I think what you need is a convolution integral.
I´m not sure (some years ago...) but I think it´s done by transforming both pictures to Fourier space and do a multiplication. In the result you search for the maximum and at that point is the center of your best match (you already know the size, should be the same as the small picture).
If you have no idea of higher mathematics this will be a hard job but I´m sorry I also don´t know more (e. g. code or good web sites that might help you). Try Google with the hints I gave you....
Bye
Thomas
|
|
|
|
|
Hi!
I know something about convolutions (I have an university degree in Telecommunications), although I should rescue my notes... Yours seems to be a perfectly suitable idea!, maybe it's the best way to achieve this (if the method to use Fourier transforms is fast; in Matlab there are methods to do FFT that are very fast so I think there should be possible with C#). I will invest some time searching for code...
Thank you!
|
|
|
|
|
If you really decide to use convolutions I would say that would be worth writing an article about it...
Bye and good luck
Thomas
|
|
|
|
|
Yes, I think I would do so (although my English is, you know, horrible). I hope to have some time this week to investigate this...
|
|
|
|
|
Hi,
here are some ideas, trying not to use much extra memory:
1.
I will assume the small bitmap "bmSmall" indeed is an exact subset of the larger one, no rescales, no resampling, no color shifts; I will also assume lots of different colors are present, and there is exactly one match (so no checker board situations, and preferably real pictures, not synthetic ones)
2.
if bmSmall had a single pixel in a very particular color C1, then all it would take is scan the large bitmap bmLarge for C1. If only one is found, that must be it. If multiple, each is a candidate, now check other pixels at some distance (dx,dy) from the matching one.
3.
Q: how to find C1?
A: I don't recommend histogramming 32-bit colors, so I would suggest hashing the colors to a smaller number (I would prefer 12 bits, maybe 8 works well enough, say B bits) and then histogramming those, by counting their occurence in an array of size 2^B). This takes a single scan of the bmSmall.
4.
Q: What hashing function?
A: A fast one; if going for 8-bit result XOR red,green,blue,alpha (or add ignoring overflow); if going for 12-bit, add red,green,blue,alpha (that's 10 bits actually). And not a real method, just one line of inline code!
5.
Now scan the bmLarge, comparing each pixel with C1; on a match perform a full bitmap compare, don't do that in the classic order though, step through rows and columns in a smart way, say x=(x+prime) modulo width , and y=(y+prime) modulo height , so you aren't first checking all adjacent pixels and probability increases you don't get caught by a part of the bitmaps locally being identical.
[EDIT] Make sure the primes don't evenly divide width or height [/EDIT]
6.
Obvious refinements:
6a. a second special color
- while histogramming, build a second array of size 2^B, holding the last Point found with that color.
- choose a second color C2, the next most special color in bmSmall, and calculate the distance DIST from the last C1 pixel to the last C2 pixel
- now when a C1 match is found at pointLarge1, go check for C2 at pointLarge1+DIST
that reduces the probability of an accidental match
6b. ignore part of bmLarge while searching for C1
assuming one of the C1 pixels in bmSmall is at (x1,y1) there are four rectangles in bmLarge that you don't need to scan for C1: the regions where x<x1, or x>bmLargeWidth-(bmSmallWidth-x1), or similar for y.
[EDIT]
instead of using a second color C2, use C1 again, however build two arrays, one for first location, the other for last location (same memory cost, lower probability of a false hit, and bigger effect of 6b!)
[/EDIT]
==========================================================================================
Alternative strategy, using more memory; less dependent on image reality, would work for synthetics too.
However expected to be a lot slower.
1.
perform some transformation, both on bmSmall and bmLarge; the goal is to reduce their memory size so they become a smaller bmSmall2 and bmLarge2.
Example: replace 32-bit pixels by 8-bit pixels, using a hashing like before
with 1 byte/pixel, you can still address pixels easily, and either do a direct compare (nested loops), or apply the former strategy
2.
Extreme case: hash to a single bit per pixel (just store the least significant bit of the earlier hash);
with less than 1 byte/pixel the problem is bmSmall2 and bmLarge2 may have different byte boundaries (say bmSmall is located at bmLarge offset 7, anything but a multiple of 8)
3.
store 8 copies of bmSmall2, each shifted over 1 more pixel; now search for exact matches between those bmSmall2 and the one bmLarge2
minor problem: bmSmall2 and its shifted versions would have wrong boundary pixels (horizontally only), they would never match bmLarge2. Hence reduce width a bit so each bit is real pixel information.
That's it for now. Let us know what you decide and how it works out.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|