|
Thanks, Pete. In terms of adding value I am assuming that an exception raised by a method that you didn't call is harder to trace / debug, whereas if you have the full history then it should start with the method you called and you can then trace back to where that call went and probably have a better idea of where it went wrong - i.e. there's no apparent direct benefit of what I am doing in this (and most) cases other than tracing exceptions.
Pete O'Hanlon wrote: in your sample though, you catch and throw the general purpose exception for no reason That's something I saw in one of the CP articles (I think I interpreted it from this one[^]). I had read into it that what I am doing is saying that if anything I wasn't expecting happens, just re-throw the same thing to ensure you don't lose it, i.e. it's a side effect of a Try block. Maybe I assumed that without it I would in effect be 'swallowing' all other exceptions, but maybe that only happens if I catch the general purpose one and then leave the catch block empty?
Does your comment mean that it is redundant - i.e. is that what would have happended anyway, even without that last catch statement?
Thanks,
Mike
|
|
|
|
|
Mike-MadBadger wrote: I had read into it that what I am doing is saying that if anything I wasn't
expecting happens, just re-throw the same thing to ensure you don't lose it,
i.e. it's a side effect of a Try block. Maybe I assumed that without it I would
in effect be 'swallowing' all other exceptions, but maybe that only happens if I
catch the general purpose one and then leave the catch block empty?
Actually, what I was referring to was don't bother catching it at all. When you catch and throw, without doing anything with the exception, it's a waste of time. So, in your case, all you needed to catch was the IndexOutOfRangeException . Any other exception is still going to show your method in the stack trace, so there is still context there for you to work with.
I hope that explains it better.
|
|
|
|
|
I am thinking of an app (C# windows app ) as it just needs to be started once - it must itself stand and loop - so it detects when there are new images also the to run automatically afterwards. Please enlighten me some ideas I will be ever so grateful.
PS. I am using Visual Studio 2010
Kind Regards
JG
|
|
|
|
|
This makes very little sense as it stands right now. I'm sure that you have a great understanding of what you want your application to do, but sadly, you haven't managed to convey it. For instance, what does it need to run automatically?
As far as monitoring for new images, take a look at the FileSystemWatcher , but be aware that there are some limitations with it that you need to understand based around when it fires events.
|
|
|
|
|
Well I am sorry for not being very clear, the scenario is like this, I get a number of HDR pictures in a folder, I have a program which batches these images and put them out in different folders, This particular program can also be used with command-line, So what I am trying to do is create an windows app, where I want to use this particular command, so all the images go in a single folder. Therefore I want construct this app where once I have started it giving it a source, it should keep running and once new images arrive it just simply updates. I don't know if it's clear enough or its simple not logical.
|
|
|
|
|
Okay, some things to think of - you will want to put your processing on background thread, I would recommend using the Task Parallel Library for this as it's so easy to use. I'm not clear on whether you are moving the original image, or copying them - if you are copying them, then move them into a processed folder as soon as you are finished.
|
|
|
|
|
I make it even simpler in one folder I put an app which on Run command runs and checks its existence. Lets says there are jpg images in it e.g image1 image2 image3 then it loops checking if there is more. If there is nothing it just keeps running and if there are new it just updates.
|
|
|
|
|
I'm not sure what you want from me here. It sounds like you know exactly what you have to do here, so good luck with it. Please feel free to come back with any specific problems you have.
|
|
|
|
|
Hi
I'm hoping someone can point me in the right direction.
I'm trying to use EF within a Data Service, returning data from a SQL stored procedure.
I've successfully followed the quickstart here http://msdn.microsoft.com/en-us/library/dd728275.aspx[^] to get a basic service up & running against my own DB, rather than Northwind.
I've found this article telling me how to expose stored procedures http://msdn.microsoft.com/en-us/data/gg699321.aspx[^], which creates the expected public ObjectResult<t> entry in the model, but when my service tries to do the Quote: config.SetServiceOperationAccessRule("GetContact", ServiceOperationRights.AllRead); I get the error 'The given name 'GetContact' was not found in the service operations', even though I can see it as a public method in the object browser.
I have also found this article http://msdn.microsoft.com/en-us/library/cc668788.aspx[^] saying that to be exposed as a service operation for the service, it must return viod, IQueryable, IEnumerable, priomitive type or an entity type in the model.
How do I reconcile the latter requirement with the former ObjectResult way of doing things. My Google skills have failed me, so pointers to documentation will be welcome.
Regards, Stewart
|
|
|
|
|
How to use FileSystemWatcher Control ? in vb.net 2010.
|
|
|
|
|
I suggest you read the following article and work through it since it gives you a good understanding of how the file system watcher is used:
Watching Folder Activity in VB.NET[^]
|
|
|
|
|
DEEPAK9489@GMAIL.COM wrote: How to use FileSystemWatcher Control
Take your time to formulate a question; as it is now, I'd simply point to the documentation and answer "use it correctly".
What is it, specifically, that you need help with, or want advise on?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi, I recently found that knowing a .NET programming language itself isn't enough to become a pro .NET developer. So my question is where can I find best ebooks about knowing .NET framework structure, deeply and completely?
|
|
|
|
|
atoi_powered wrote: I recently found that knowing a .NET programming language itself isn't enough to become a pro .NET developer
.NET developer is very a broad term; it does not imply that you lack in-depth knowledge of the for loops, but that there are "area's" that you could still explore.
.NET can be used to develop web-apps, cross-platform desktop-apps and mobile apps. Did you try all three of those? Desktop can be divided into various GUI-concepts, like WinForms, WPF and Gtk#. Besides that, .NET offers some various additional technologies that are interesting to learn, like serialization, the MEF-framework, WCF and WF.
atoi_powered wrote: So my question is where can I find best ebooks about knowing .NET framework structure, deeply and completely?
Amazon, Manning, Google. Brownfield development[^] is a good place to start; even for greenfields
If you seriously want to dive deeper in the way .NET works, I suggest you Google for some CodeProject-article's on IL.
If you can specify what area of development you're targetting, you'll get a bit more specific answer.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
i will also add MSDN to the above list ...
Regards,
Senthil Kumar
|
|
|
|
|
Thank you so much. I got what I should look for.
|
|
|
|
|
Warning 1 The referenced assembly "CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. StudentManagementSystem
i am getting this msg when i am compiling plz help
|
|
|
|
|
You have targetted the Client Profile in your project (take a look in the project properties). This doesn't include the web assemblies. You need to change your profile to the full .NET 4 profile to get access to System.Web.
|
|
|
|
|
|
Not a problem. I'm glad I could help.
|
|
|
|
|
how to proceed with android application development.Is there any app which is not existing in android and research is going on.
|
|
|
|
|
See here[^] and here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Member 9405140 wrote: there any app which is not existing in android and research is going on.
Well...this is a .Net forum, so No.
|
|
|
|
|
For love nor money I cannot get the syntax right.
I want to return 3 x 2D arrays from a function but can't wrap my head around it - I suspect I have just failed to grasp some fundamental aspect of jagged arrays!
Public Function SVD() As Double(,)(,)(,)
Dim arS(,) As Double
Dim arU(,) As Double
Dim arV(,) As Double
...Fill the Arrays...
Dim arSVD(,)(,)(,) As Double
arSVD(0) = arS
arSVD(1) = arU
arSVD(2) = arV
Return arSVD
End Function
If I have it that way the error is on arSVD(n) and says 'Number of indices is less than the number of dimensions...'
If I change the return type and arSVD to Double()()() then the error is on the last arS and says 'Value of type 2D array cannot be converted to 1D array...'
If I change it to arSVD(0,0) for example the error is on the last arS and says 'Value of type 2D array cannot be converted to type 2D array of 2D array...'
Bash. Head. Brick. Wall.
Any help very gratefully received.
Mike
|
|
|
|
|
Wow, I'd forgotten just how horrible VB's array syntax[^] is!
Try this:
Public Function SVD() As Double()(,)
Dim arS(,) As Double
Dim arU(,) As Double
Dim arV(,) As Double
Dim arSVD(2)(,) As Double
arSVD(0) = arS
arSVD(1) = arU
arSVD(2) = arV
Return arSVD
End Function
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
modified 5-Oct-12 12:50pm.
|
|
|
|