How can I parse an MP3 file to get its all attributes? Also how to edit and the attributes of the MP3 file? Is there any class available in .NET v4.0?
Those attributes are called ID3 tags. I do not think it is the scope of the .NET framework to provide reading them.
Here is some code from SourceForge.
http://sourceforge.net/projects/csid3lib/
You might have a look at the taglib library for .NET. It can do both reading and writing of id3 tags among other things.
Related
In vb.net I can write an XML documentation by using some tags, like the following
'''<summary>
''' Hello there!
'''</summary>
In Java, I simply can export my Javadoc documentation in a single click (it generates an Html file).
Is there a way to do something similar in vb.net?
There are several tools that can generate a documentation in HTML or other formats out of the XML comments. Some of them:
VSdocman - the tool for generating API documentation from C# and VB projects. It can generate multiple formats, including HTML, CHM, PDF, Docx and others. It also provides WYSIWYG XML comments editor in Visual Studio. It is a commercial product and I'm the author.
Sandcastle Help File Builder - a set of tools that are used to create help files for managed class libraries containing both conceptual and API reference topics. Free.
DocFX - An extensible and scalable static documentation generator. Free.
I am seeking to read in the DICOM Image tags one tag at a time in Visual Basic 2010. Then I would like to read in the header. Does anyone have any ideas. i will be grateful
Please see this question on .NET DICOM libraries. Using any one of these libraries would allow you to open and parse the file. Each library has their own methods for reading tags which can be accessed from VB.NET.
If you want to use ClearCanvas, you can use this answer to show in C# how to load a file and traverse through the attributes, it would be a starting point to convert into vb.net.
I read Scott Gu's article about built-in support for bundling and minification in ASP .NET 4.5.
However there's no mention of embedded resources, which is a pity.
In the past I've been using a Codeplex project called Client Dependency Framework which supported embedded resources.
Seems like a pretty major omission to me. Is support planned?
I'm pretty sure you could write your own transformer to handle this.
Create a class that implements System.Web.Optimization.IBundleTransform.
Then in the Process method get the contents of the embedded resource. This shouldn't be too difficult. This blog post might be helpful.
Then add the transform to the bundle.
e.g.
var bundle = new Bundle("~/Test").Include("~/Content/Site.css");
bundle.Transforms.Add(new EmbeddedResourceTransformer());
Note that I am using the nuget package from System.Web.Optimization, not Microsoft.Web.Optimization (I have no idea why there are two different namespace implementations, and whether the syntax would be the same in both).
I also can't vouch for the performance of doing it this way as opposed to the file system.
Hope that helps!
Just a few comments on above answers since I don't have enough rep. to comment directly...
The answer from Hainesy suggests using a BundleTransform. I believe this is too late in the process to include an embedded resource. The BundleTransform is helpful for converting things inside the css or javascript after the contents are pulled from the original file and before they are put into the bundled file. For example, if you need to modify image URL's in CSS to point to local relative url for dev and to a CDN url for production.
The link from user960567 explains how to use embedded resources, but there's a catch. That process will only work for something like a common control used from another project.
e.g. If you create a textbox that needs CSS and JS then it allows you to create a HTML helper in the common project that will add the textbox and the script tags that pull in the embedded resource into the page. It does not allow you to pull the embedded resource from the common project into a bundle in another project. This will basically create a separate script or style tag for each embedded resource which may not be what you want (at least it's not what I was looking for.)
I've written a detailed article about how you can use the bundle and minification technology to wrap up your external resources here.
I need to convert all types of audio formats to the mp3.
I think I need to add the refrence of the dll (lame_enc.dll) into my .net application.
When I try to add the DLL reference to my project, I get an error: "A reference to C:\Lame_Enc.dll could not be added. Please make sure this file is accessible and that it is a valid assembly or COM component"
Is there any other solution that I can convert all types of audio formats to the mp3 and also I need to convert all types of video formats to the flv.
Many thanks for your consideration.
Why reinvent the wheel? Here
http://www.codeproject.com/KB/audio-video/MP3Compressor.aspx
you find a .NET wrapper library for lame_enc.dll. It is written in C#, but usage from VB.NET should be no problem.
By the way, if you want to use native DLLs (no COM, no .NET) from a VB.NET program, you don't have to add a reference to that DLL, you just have to copy that DLL into your working directory of your VB.NET program and use PInvoke. Read this tutorial (C# only, sorry)
http://msdn.microsoft.com/en-us/library/aa288468%28v=vs.71%29.aspx
to learn more about it.
I know that MEF currently supports downloading XAP files from a URI (which is awesome!), but does anyone know if it's possible to have MEF load a XAP from a byte array?
Thanks!
Yes, this is in fact what DeploymentCatalog does. And since the source code to MEF is available (mef.codeplex.com), you can just refer to that. The code you are looking for is in src\Composition.Initialization\System\ComponentModel\Composition\Hosting\Package.cs. The LoadPackagedAssemblies takes a stream (of a XAP) and returns the assemblies in it.