|
Hi all,
I work as an assistant for a renowned photographer.
My Job is to archive my employer's photos and organize them, which includes creating thumbnails of all the photos (1 DVD a day). It is very time consuming and boring job. Right now I'm automating this job using PhotoShop CS3 but it is still not enough for me. I'm in dire need of a fast and efficient way to generate thumbnails and I don't want to install a whole suite or software just to make thumbnails.
I'm a great fan of CodeProject and regularly check it for latest updates. That's how I stumbled this article "Multithreading Backup Utility" and found it nicely written. It works like a charm for me, especially the diffrential backup and mirror copy options are great ones. I wondered if I can use this handy utility and alter it to make thumbnails for me. In brief my requirments are:
1. Create thumbnails in a thread (I have a routine which does this but without threading)
2. If possible run upto 5 such threads at a time so that thumbnails are created very fast
3. Display the image being proccessed in a picture box (optional)
Thanks, regardes and well-wishes.
|
|
|
|
|
This probably should be asked in the article's discussion board or one of the programming forums, but in general you can adapt any article/code found here to your own specific needs. It's not very clear if you're looking for someone to write an article about how to do something like this or for some help adapting the code on your own.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Scott Dorman wrote: It's not very clear if you're looking for someone to write an article about how to do something like this or for some help adapting the code on your own.
Thanks Scott Dorman for replying on my post.
I have posted this suggestion here because I want someone to write an article on this topic.
I feel the part that should be highlighted is running more then 1 thread that does the same job e.g. making thumbnail.
The work should be divided in equal parts across the threads so that they don't repeat the same work.
I'm currently trying to adapt the code from "Multithreading Backup Utility". If I succeed i'll post the solution here.
Thanks and regards.
Moiz.
|
|
|
|
|
Greetings to all developers!
I am a professional C++/COM developer, and looking for an opinion on a C++/COM project that I’d like to do for the community of software developers. Based on how this gets preliminarily evaluated, I will see if the project is worthwhile doing, and make appropriate commitment toward getting this project on the road.
The idea comes from the reality that even today, with .NET there and many new technologies employed by developers, one particular area is still a hurdle and consumes great deal of everyone’s time on very regular basis: Getting most common information about the Software/Hardware/Security/Process/Networking in the system and current environment. There are 3 techniques that exist out there and allow you to explore this area:
- Windows API (very limited)
- Direct Access to information: Windows Registry, File System (pain to research)
- WMI (Windows Management Instrumentation) - limited support, very heavy and slow, extreme pain, especially for C++ development, requires a long search and often doesn’t work as expected, because it is provider-dependent.
The truth is, every so often we have to utilize all 3 techniques in order to retrieve something that we want, and that can be a daunting task, with lots of time spent. And then consider that using all this from various development environments would also be quite different, just builds up the pain.
What I am offering is a simple COM architecture based on logically ordered namespaces to access all such information in any development system in the exact the same way.
The library would implement one root namespace called System, that would include all the other namespaces and so on in a logical way.
Here’s an example:
System = { Software, Hardware, Security, Process, Networking }
Software = {OS, Drivers, Codecs, DotNet, DirectX, etc }
Hardware = {Processor, Memory, Mainboard, Monitors, Drives, Printers, Ports, etc}
Security = {User, Accounts, Firewall, etc..}
And so on, and so forth. I hope this illustrates the idea clearly.
I really appreciate any opinion on such project and the idea itself.
Thank you!
modified on Friday, July 4, 2008 12:41 PM
|
|
|
|
|
Hi All,
I'm still hoping to hear at least some feedback here. I just started a blog on this subject, in case this gets someone interested, please leave you comments there: http://www.prosyslib.blogspot.com
Thank you!
|
|
|
|
|
Sounds interesting. Good luck to you.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Cool. I'll take a look.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
VitalyTomilov wrote: Any thoughts?
Nope. Have too much on the plate right now.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
The idea looks like a winner article. You can create a class like System.IO.Directory, to have easy access to some branches and leaves, just as collections you can scan with a foreach() statement.
Best regards,
Jaime.
|
|
|
|
|
Hi Jaime,
Thank you for your comments. Despite the fact that this idea came to me just recently, the progress made on it in just one month was astonishing.
First off, see website www.prosyslib.com that I did for the project. Second, see my first article on it http://www.codeproject.com/KB/COM/prosyslib2.aspx. And do not mind lowered rating on it. I suspect that it was hugely because for the first couple days the article was published it relied on source code availability from the website. Apparently, many didn't take this kindly, so they gave a low vote. But as i fixed it, included the source into my SDK installation, i hope to be getting better votes from now on...
Regards,
Vitaly
Professional System Library on www.prosyslib.com, making it simple for software developers.
|
|
|
|
|
Well, 32 votes for your article in the first week is really good.
A screenshot of your sample application at the begining of your article will help you to gain attention from readers.
Best regards,
Jaime.
|
|
|
|
|
thank you for your vote! I really appreciate it. Doesn't look pretty being underdog with a good idea
There's plenty of work in-progress. And i'm preparing a new article now that will be called "ProSysLib: Dissecting the Process". And it will be about extension of namespace PSLSystem->Process that with v0.5 will include a lot of stuff to know about the process:
Powerful collection of threads and windows, version info, process details, etc...too many to list them here.
have a good day!
Cheer'o!
Professional System Library on www.prosyslib.com, making it simple for software developers.
|
|
|
|
|
Also, about the COM stuff I have to say this:
.net programmers don't like COM because .net superseeds that with assemblies, that don't require registration.
C++ programers don't like COM too much, because it will need wrapper classes and code overhead due to type conversion.
I suggest to do this: Start a new project, put all your logic into private and public classes, methods and properties. Publish this library for .net developers.
Wrap this library to expose as a COM object, and publish it too. I guess you will have more .net users than COM.
Best regards,
Jaime.
|
|
|
|
|
Jaime,
One of the hard challenges of this project is to get this idea into the heads of developers, to make them understand that this is not just a COM project, it's a little more than that. For example, both of your notes are not valid:
1. You do not need to register this library in order to use it. I invented and implemented Stealth Deployment technique that i briefly mentioned in the article and described well in ProSysLib SDK.
2. C++ programmers won't need a single wrapper to use this library at full strength, because the namespaces get mapped onto the smart pointers automatically. See one C++ example that i showed there in the messages.
Like i said, the challenge is to convey this idea of simplicity beyond your regular COM stuff.
Professional System Library on www.prosyslib.com, making it simple for software developers.
|
|
|
|
|
Besides the fact that your arguments can be valid, you cannot change this premise: .net developers don't like COM objects, no matters which technologies or tricks you are using, wrapping is necessary for .net project, that's why I initially suggested to expose your library like the System.IO.Directory class or maybe to Registry class (both are tree collections).
Countersense, phrases like "full managed library" are attractive. So, you can wrap your C++ library into a .net assembly alternatively. Still you can use your COM wrapper for other kind of users (c++, vb6, delphi).
From a commercial perspective (no matters if you have profit or not), this reduces your market segment. Consider I am an experienced C++ and C# developers, so you are hearing an opinion from both sides.
Best regards,
Jaime.
|
|
|
|
|
".net developers don't like COM objects" - this is what i am trying to change. And from what i hear, i need to publish another article to explain all .NET developers that using COM from .NET can be just as elegant as .NET assemblies, no unmanaged code, no COM registration.
I will write an article here about it soon.
Professional System Library on www.prosyslib.com, making it simple for software developers.
|
|
|
|
|
Vitaly Tomilov wrote: this is what i am trying to change
Hehe, you won't change it. COM is coming to be a deprecated technology. Trying to stick to it is like trying to keep VB6 alive, or that DCOM is a better choice than .net Remoting. You cannot convince a .net developer to replace the .net assembly architecture with COM architecture.
Vitaly Tomilov wrote: i need to publish another article to explain all .NET developers that using COM from .NET can be just as elegant as .NET assemblies, no unmanaged code, no COM registration
Better you put a new thread in the CP forum to discuss this. I think you will have a low rated article trying to defend your point of view. But, it is our choice.
Best regards,
Jaime.
|
|
|
|
|
sorry, I meant "it is your choice" (I need to clean my laptop keyboard)
Best regards,
Jaime.
|
|
|
|
|
Hi Jaime,
Believe it or not, but I have been hearing convincing speeches about short-coming death of COM since 1998. As of today, Vista is still by 99% sitting on what's built on top of the COM layer
I took my chances with publishing here, and the results you can see for yourself:
First Article: http://www.codeproject.com/KB/COM/prosyslib2.aspx
Second Article: http://www.codeproject.com/KB/COM/prosyslib3.aspx
Second article as of this moment is the Editor's Choice on CodeProject, sitting on the main page, i'm getting some very good feedback on this.
I would say that i will be the first one to dance when COM really dies, but then ops, i might be just too old for dancing when this happens
Regards,
Vitaly
|
|
|
|
|
The .net framework provides a queue(of T) which is fine for single-threaded programs, but is not thread-safe. There's a synchronized version, but since it uses locking it runs the risk of priority inversion and other such problems.
I've implemented a fairly simple queueing implementation in VB.net with the following properties:
-1- There are no locks or waits, except that the calling program may elect to wait for data if the queue is empty.
-2- There are a few spinlock loops, but there is no possibility of livelock since each loop will only spin if another thread successfully performed useful work while the loop was executing.
-3- Conceptually, the base queue object does not hold data, but is a place to attach reader objects. Data which is written to a queue will be queued in all reader objects.
As an example situation where this class could be used, think of a multi-line chat BBS. There's a central message queue for all broadcast messages; when a new user logs in, a queue reader is created for that user, attached to the central queue. Whenever a message needs to be broadcast (either a user typed something, or the system wants to report something) it is placed in the queue, where it can be read by all attached readers. Data can be added and removed by any number of different threads without need for synchronization.
I've never written an article for CP before (and haven't done a whole lot with VB), but I think the class seems like it should be useful; I would appreciate feedback and advice (e.g. should I allow the user to receive a WaitHandle from a queue reader, so as to allow the use of WaitAny? If so, can I prevent the user from doing anything with it other than wait?) Would anyone be interested if I were to write up such a thing?
|
|
|
|
|
If you think the class is useful, chances are someone else will too. If nothing else, writing the article will be good experience.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Any Sharepoint experts out there who can give some examples of using this WebControl? Googling this topic (and SPMenuField) seems to almost exclusively point back to this[^] - which is fine - except that I'd like a deeper understanding of what is happening 'under the hood'. MSDN docs are virtually non-existent...
An article would be lovely!
|
|
|
|
|