|
I agree with a lot of what's been said. I think it's important to learn both Java and C#, but you can do that pretty easily. The APIs are by far the hardest thing to learn. Even those can be learned as you work with projects, though.
My main concern would be: What projects are/will you be working on? If you know of upcoming C++ projects, then stick with that and start learning the .NET Framework. From there, you can slide into C# - and you'll be productive, too, since you already know the Framework. After that, you can take the larger jump to Java. The language will be easy, but the API might take a while.
Personally, I think that the .NET Framework is laid out better and seems to be more thought-out than Java APIs. And, considering Visual Studio is the undisputed champion of development environments, I believe that this would be a good path. But, again, it all depends on marketability. Base your decision on the projects you are working on and those you will be working on in the near future.
Michael Flanakin
Web Log
|
|
|
|
|
Here is my description from getdotnet.com
This will be an eventual os independant grouping of office style applications written in C#. Eventually I also hope to have them web based so you can work with your files from anywhere. As any good programmer should, I will ensure cross compatability with as many other applications related to this application package. Once completed and satisfied with the results portions of the code will be open source and if a proper response is recieved then the whole application package will be open source. As of now only two out of the endless possibilities of applications have been laid out on paper and organized. Those are a web browser and email program. There will be a word processor, spreadsheets, Databases, presentation tools, html/xml/php editors, maybe even a graphics program sub package.
http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=21691a22-ddfe-4fd0-8ce0-88e8b05ed341
I need people asap that would like to help with the project. Im just doing this cause i can. But i do need a bit of help on the coding if i want to finish before im 40.
Email: jd@lucidmind.org
AIM: jdogg172
|
|
|
|
|
You really should post this appropriately and not waste people's time when this is a request for coders, not a request for a specific issue within C#.
You will not receive any help going about it this way.
Yes, I program in VB, but only to feed my addiction to a warm place to sleep and food to eat!
Visit my Code Project blog (Mobile Audio project)[^]
|
|
|
|
|
How is this a waste of time, you saw it, people can learn from this, maybe even solve problems with similar programs they may be writing. All i did was as a question. Instead of whining why dont you just simply state the proper location for this post.
|
|
|
|
|
jroberson10 wrote:
How is this a waste of time
This forum is for people to help other people with a specific issue. Not for recruitment. That's why no one else has responded to you.
jroberson10 wrote:
people can learn from this
I agree, but still wrong forum
jroberson10 wrote:
Instead of whining
There was not any whining. Just post it correctly and you may get responses that don't bruise your delicate ego.
Regards
Eric C. Tomlinson
Yes, I program in VB, but only to feed my addiction to a warm place to sleep and food to eat!
Visit my Code Project blog (Mobile Audio project)[^]
|
|
|
|
|
My ego, i dont think i would be asking for help if i had such a big ego. Why are you so worried about it being in the wrong spot, did i some how offend you, or do you just like to complain
|
|
|
|
|
Did you not notice the at the end of the statement???? Was just kidding.
Now get back on your Prozac [NOTE]
[EDIT]And by the way, loosen up a little! [EDIT]
Yes, I program in VB, but only to feed my addiction to a warm place to sleep and food to eat!
Visit my Code Project blog (Mobile Audio project)[^]
|
|
|
|
|
I created an IExtenderProvider implementation. The extender providers a few string properties that can be modified. I want VS.net to display a dropdown for the user to be able to quickly select a string to use. How can I make it a drop down?
The catch is that I want the items in the drop down to be dynamic. If the items were static it would be easy to just change the string to an enum and VS.net would do the work for me.
|
|
|
|
|
I guess i should have done the research before giving up so quickly.
Well, after researching I found out that you have to do something with UITypeEditor. I'm reverse engineering some of the classes in the System.ComponentModel.Design to find out the best way of doing this.
This was a good resource : http://weblogs.asp.net/okloeten/archive/2003/10/31/35028.aspx
|
|
|
|
|
On your GetPropertyName and SetPropertyName methods, attribute them with the EditorAttribute , which of course references your implementation of the UITypeEditor class. Read more about this attribute and this class in the .NET Framework SDK. Since you've already started playing with the Component Model, you shouldn't have any problems (and this is a much simpler implementation).
Here's a tip, in your override for EditValue , use the IServiceProvider argument to request the IWindowsFormsEditorService in order to display drop downs and modal dialogs instead of doing it yourself. You can read more about this service interface in the .NET Framework SDK as well. This makes sure that the design-time environment of the IDE supports such actions and uses a thread message queue allocated from the IDE, which is far more stable that trying to create one from your component.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
public string getCurrentCpuUsage()
{
PerformanceCounter cpuCounter = new PerformanceCounter("Processor","% Processor Time","_Total");
return cpuCounter.NextValue()+"%";
}
I'm using C# and try to get the total cpu usage....
The above class return 0 or 100 percent(I think this process only return the cpu usage of my application not the total cpu usage of windows and other programs running)...how can I get the Total cpu usage percentage just like the figure in Task Manager of windows?
jim
C#
|
|
|
|
|
thats a method and it should get the total cpu usage as described...
% Processor Time is the percentage of elapsed time that the processor
spends to execute a non-Idle thread. It is calculated by measuring the
duration of the idle thread is active in the sample interval, and
subtracting that time from interval duration. (Each processor has an idle
thread that consumes cycles when no other threads are ready to run). This
counter is the primary indicator of processor activity, and displays the
average percentage of busy time observed during the sample interval. It is
calculated by monitoring the time that the service is inactive, and
subtracting that value from 100%.
If you are comparing this to the task manager, it is pretty close....
I find that using the preformance counters I get close results, but often sporatic ones... probably cause i'm not using them right.
Check this class out, you will like it better...
CpuUsage[^]
/\ |_ E X E GG
|
|
|
|
|
I am a C# beginner. In VB/ASP i had developed an infrastructure that allowed recent trace/debug information to be kept in memory. It would be dumped to an error handler when exceptions were raised. Only the most recent trace entries would be retained. Is it possible to do the same with the .Net Trace class, or will i have to write my own code? From what i have read it seems that a Trace Listener can only be a stream, like writing to a disk file. This is useful, but i have other troubleshooring needs.
Thanks
|
|
|
|
|
Why develop it? It's already developed. If you have tracing enabled (<trace enabled="true"/> in your Web.config file - see the <trace> documentation in the .NET Framework SDK for more attributes), then just point your browser to approot/trace.axd, where approot is the root directory of your web application (not necessarily the root of your web server).
This collects object hierarchies (within the page), exceptions, trace messages (of course), query strings, form variables, HTTP headers, cookies, etc - most likely a lot more than you were tracking before.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
BTW, this is an ASP.NET question and belongs in the ASP.NET forum, regardless of what language you're using. It's important to understand that C# is one of about 30 languages that target the common language runtime, or CLR. I suggest reading through the .NET Framework SDK or picking up a good book (though nothing is as comprehensive as reading the class library documentation in the .NET Framework SDK).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks for your comments but there appears to be a misunderstanding here. Both VB and ASP had no tracing ability built-in to the product. This is why the infrastructure was created. I was singularly developing 100K+ lines of code. I only mentioned this as an example of what was done before and what i would like to do in C# applications. What i am trying to determine is whether the Net trace/debug classes can behave a certain way. I hope i described things clearly enough. In my reading of the Microsoft books and documentation, the behavior i seek is not clarified. I also found nothing in an internet search. So i appeal to the forums for more information before i tackle things by trial-and-error.
Thanks for the help
|
|
|
|
|
How does this apply to anything I said? For one, I answered your question in the first reply which is covered in the .NET Framework and I mentioned what all it outputs. In my second reply I was merely pointing out that you asked in the wrong forum - this belongs in the ASP.NET forum since it has absolutely nothing to do with C# because ASP.NET can be used by any managed language (i.e., you could write an MC++ assembly that the .aspx pages expose).
Asking for help in forums is not what I was saying you did wrong - only that it was posted in the wrong forum. Regardless, I hope my first reply was informative. The ASP.NET tracing does provide a lot of information - about everything you could think of - and is better to use then a home-grown solution since the tracing is built deep into ASP.NET. And yes, I am aware of a lack of tracing and what-not in ASP - I've been doing this long before ASP was even an idea.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I have a problem - i have a bunch of processes reading and writing to the disk. I simply want to know which files / directories this processes are accessing.
I tried using the FileSystemWatcher object - but i can only get which files, have been modified deleted, etc. I can get which process caused that change.
So I'm looking for something that when the file system receives a read request, it must be aware of which process is making the request - or something along these lines.
ideas?
|
|
|
|
|
It's possible to do, but hardly practical. You will need to write a file system driver that attaches filter objects to the O/S device objects. This driver can then expose an interface that your main application can use to get the information it wants.
You'll need to know about writing Windows NT kernel drivers, internal workings of Windows NT kernels, and, of course, the internals of NTFS.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
wowww - and i thought it would be pretty straightforward. thanks for giving me an idea of how complicated it would be.
thanks
|
|
|
|
|
Is there any possibility to save Bitmap as JPG, however
with better quality than allows the following code :
...
encoderParameters.Param[0] = new EncoderParameter(Encoder.Quality,100);
foreach( ImageCodecInfo encoder in encoders ) //PERF OPT
{
if( encoder.MimeType == "image/jpeg" )
{
img.Save(stream,encoder,encoderParameters);
}
}
When saving images with maximum possible quality I get files that
are about 80% of size of image produced by Adobe Phooshop,
even with 10 (scale 1-12 ) quality (!)
It was somewhat about 160 kB, versus 200 kB, and of course,
the difference had been evident. The difference was visible
due to the fact that on the original image some lines and polygons
along with text were drawn. And these require quite a good
compression quality.
Sombody might say that I should save images as GIF or PNG, however
these do not provide as good compression ratio as JPEG does, even
when saving JPEG with the best quality (size increases)
(best JPEG by PhotoShop == 320 KB, best by framework == 160 KB,
PNG = 770 KB)
When saving image as JPEG with photoshop, user is able to choose
compression level (that seems to be "wider" than what framewotk
provides) and is able to choose from "Format options" that are
following: BaseLine, Baseline-Optimized and Progressive.
Is there any way to make the same work in GDI+ ?
But the main question remains : How to save image with quality
better than that from the above code example.
Thanks
Michał Januszczyk
|
|
|
|
|
The problem is the JPEG "compression". You don't get good compression with high quality. The JPEG format is well-known to not handle lines polygons with good quality. JPEG is for photographic type images where the "lossyness" can be hidden in the image. Your just not going to get high quality images without sacrificing compression with JPEG.
For the type of image that your talking about (lines and polygons) .GIF is a much better choice. But, it also has it's limitations, like limited color depth support.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
The problem is the JPEG "compression". You don't get good compression with high quality. The JPEG format is well-known to not handle lines polygons with good quality
Thank You.
Yes, i'm aware that JPEG will not do as good image as GIF would do here , but I would like simply to get as much as Photoshop gives, and this would sattisfy me really.
Let me say that again: I draw lines on background that is a photo. Savig whole image as GIF of PNG would produce enormously big image size, and savig as JPEG does not (currently) give appropriate quality. However Photoshop _is_ able to save as JPEG, with quality even beter than ramework does, and this quality is in my opinion good enough to save lines drawn on photo-background.
Michal
|
|
|
|
|
But as Dave said, so long as you compress a JPEG using most compression algorithms (which are lossy), you will loose quality. My recommendation is - much like you did for the quality encoder parameter - adjust the compression algorithm as well until you find a happy medium. Perhaps find out which compressional algorithm Photoshop is using (LZH, IIRC) and use the same.
Also keep in mind other properties Photoshop may be saving. Just looking at the file sizes may not be enough. By default, Photoshop will save ICC profiles with images and may embed other properties when possible (using EXIF with JPEG, it is possible). Unless the image sizes are large, an 80% margin isn't completely unbelievable (though it sure pushes it).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath Stewart wrote:
My recommendation is - much like you did for the quality encoder parameter - adjust the compression algorithm as well until you find a happy medium. Perhaps find out which compressional algorithm Photoshop is using (LZH, IIRC) and use the same
I've investigated the matter, and it seems that whan saving image as JPEG, the only encoder paarameters that can be used are: Transformation and Quality. (As I noted before Quality when set even to maximum does not suit my needs). Compression encoder parameter is available only whan savig image as TIFF (available options are: none, LZW, Rle, CCIIT3, CCIIT4)
Thanks
Michał
|
|
|
|
|