|
It is bad manners to post the same question to multiple forums
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Using a forum as your primary learning tool is not a good idea. Read the manual (Book On Line), learn to use Google to do some research[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Ok what I am doing is calling a web service (C#) with javascript. I use the .innerHTML to get all the html within a certain div (this works fine). I then pass that data over to the webservice (which accepts a string array)..
First I make a javascript array (first contains the path to write the file, second position contains the .innherHTML).
When that gets passed for some reason it doesn't like all the HTML coding. It gives an error. If I just use PLAIN text (I.E. no < > / \) it works perfect.
Web service:
[WebMethod(Description = "Creates a file. First string in the array is the path and second string is the data.")]
public string Update(string[] html)
{
if (html.Length > 0)
{
try
{
string path = String.Format(@"{0}", html[0]);
using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write))
{
using (StreamWriter sw = new StreamWriter(fs))
{
sw.WriteLine(html[1], Encoding.ASCII);
sw.Close();
}
fs.Close();
return "Updated situation report.";
}
}
catch (Exception ex)
{
return "Error: " + ex.Message;
}
}
else
return "Incorrect parameter lengths.";
}
I'm guessing the streamwriter cannot write those types of charactesr to tmy file? How would I fix this?
In casey ou are wondering this is what should be in the string:
THIS IS MY DOCUMENT<br>
<span style="color: red"> IT CONTAINS COLORS </span><br>
AND OTHER CRAP
modified on Thursday, March 25, 2010 12:59 PM
|
|
|
|
|
The problem was the < > signs and such. I used a replace function on the javascript side. It seems in the code behind on the web service it went ahead and converted them to the actual symbols itself
|
|
|
|
|
Hi All,
I would like to provide secured licensing mechanism to my windows application setup. I tried with Visual studio and Installsheild. I found the list of installation tools in the below link. I found its hard to conclude which software gives the best way to provide secured licensing mechanism. Please suggest me the software which satisfies the requirement.
http://en.wikipedia.org/wiki/List_of_installation_software[^]
Thanks alot in advance.
|
|
|
|
|
What are you looking for? those are installation software. not licensing software.
|
|
|
|
|
I'm new to provide licensing to the windows application. I think, license will be provided while we are creating setup. Are there any licensing softwares which provide license? If they are, how to integrate secured licensing mechanism to the setup. Please let me know if you require more clarification. Thank you.
|
|
|
|
|
use the search feature in CodeProject to see some articles. Trust me...
the best way to learn is to start learning.
|
|
|
|
|
Hello,
I am searching for BPM (Beat per Minute) Library. I want to use it in my robot, using c# only.
I found "adionsoft.net" but it's not good.
Any Help.
Tx.
|
|
|
|
|
What do you need to do? Get BPM from an audio file, parse a MIDI file for tempo data or MTC, generate beats for a given tempo...
All of these things (maybe with an exception of the first) are reasonably trivial to code from scratch and I don't know of any library for any of these.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Tx for replying,
i need to get the bpm from an audio file (not microphone)
|
|
|
|
|
This is never going to be 100% accurate but should suffice for most purposes.
The first thing you will need to ascertain is the sample rate. Once you have that, scan sections of the file for regularly spaced pulses at lower frequencies. This will typically be a bass / bass drum etc. Depending on the style these may or not indicate the actual beats! I would then check for the highest amplitudes in these - you can almost guarantee that the ones with the greastest amplitutde will be the first beat in each bar - or every other bar. Knowing this isn't critical for calculation of BMP but will enable you to calculate time signature (by counting the beats in between each 'first' beat) and work out whether to ignore certain peaks that may appear to beats but actually aren't.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
tx but i really need already programed (library (.dll), cs....)
i don't have time to prog.
tx
|
|
|
|
|
Then you neet to google some more. Maybe you need to adjust your search terms to include things such as audio frequency analysis etc.
Asking in a programming forum is going to get you a programming response.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Tx i tried but nothing new.
|
|
|
|
|
I do also searched the web for this topic cause I'm going to write my master thesis about estimating bpm. As far as I can say, the accuracy of tempo estimation depends of the kind of music you examine. Music with strong beats (techno, house, dance) is quite nice to estimate for its almost suficcient to autocorrelate over energy derivations. Classical music on the other hand is much harder to estimate, given that the tempo is hardly ever constant in classical or jazz music. And you have also to consider that known methods for tempo estimation don't have good performance on slow music for they tend to double the true tempo.
I'd like to implement some really working BPM detection, but I'm wondering which is the best (free) audio lib for .net to start from. I've tried using NAudio for reading Audio files and then Math.Net to do some processing stuff with it, but I'm interested if there are better libs to start from.
|
|
|
|
|
Hello everyone,
I'm new to the forum and this is only my second post, so I apologize in advance for any mistakes.
This is my situation:
I'm using Microsoft Visual Studio 2008 with .Net Framework 3.5.
I'm developing an extension of the Windows Shell Context menu, and I did it, but I have a problem:
when my menu is invoked on the links (*.lnk), it doesn't work and prevents the upper voices.
This only occurs on Vista and Seven, not on XP.
This is the IContextMenu.QueryContextMenu:
int IContextMenu.QueryContextMenu(uint hmenu,
uint iMenu,
int idCmdFirst,
int idCmdLast,
uint uFlags)
{
StringBuilder sb = new StringBuilder(1024);
DllImports.DragQueryFile(m_hDrop, 0, sb, sb.Capacity + 1);
if (new FileInfo(sb.ToString()).Extension == ".lnk") { return 1; }
for (int i = 0; i < Menus.Length; i++)
{
Menus[i].MenuItemInfo.wID += idCmdFirst;
if (Menus[i].SubMenu != null) { PopolateSubMenu(Menus[i], idCmdFirst); }
DllImports.InsertMenuItem(hmenu, Menus[i].Position - 1, 1, ref Menus[i].MenuItemInfo);
if (Menus[i].Image != null) {
System.Drawing.Bitmap Bmp = Menus[i].Image;
DllImports.SetMenuItemBitmaps((IntPtr)hmenu, (IntPtr)(Menus[i].Position - 1), 0x400, Bmp.GetHbitmap(), Bmp.GetHbitmap());
}
}
return (int)(NumeroMenu + 1);
}
I don't know what to do!
Please help me!
Thank you in advance for your help!
PS: I apologize for my bad English, too: I'm Italian!
|
|
|
|
|
|
Hi All,
I've recently been given the task to create a program in C# that retrieves a given user's email attachments and place them in a local folder. The first step I'm researching is how do I initially connect to the mail server when our mail is hosted by Rackspace? Should I be able to use EWS commands? If not is there some other way I can access a user's mail via c#?
I've tried the following:
http://www.omegacoder.com/?p=454[^]
But get the warning message:
An unhandled exception of type 'Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException' occurred in Microsoft.Exchange.WebServices.dll
Additional information: The Autodiscover service could not be located.
It's possible I set the "AutodiscoverUrl" incorrectly, I just put my email address as it states.
Any help on this would be great.
Thanks in advance,
Mel
|
|
|
|
|
Hi,
I found this step-by-step guide on how to connect to a POP3 server using Telnet. I was able to connect following the steps on the command line and when creating the c# program.
http://www.geekpedia.com/tutorial172_Connecting-to-a-POP3-server-using-Csharp.html[^]
This is great so now at least I know i'm dealing with a POP3 server. The thing is I want to get the attachments from the emails. Does anyone know the Telnet commands I can use to achieve this? If not maybe you know an alternative way to connect to a POP3 server to get email attachments?
Thanks,
Mel
|
|
|
|
|
Will this[^] article help?
/ravi
|
|
|
|
|
Ravi,
Thank you for the reply. Although I didn't get the answer I was looking for the link was very informative.
Thanks
|
|
|
|
|
Hi, did you get this to work? Im trying to do something similar here
|
|
|
|
|
Hi,
In my code I have interactions with a WPF control, so using Invoke I am able to call my functions, the problem I am having is that the code inside the function throws an exception, and I was wondering if it is possible to move the exception across the Invoke call. so that my code in the calling thread can handle it.
here is my code which hopefully shows the problem better:
<br />
public void SetProperty(String Path, String Value)<br />
{<br />
if (!this.Dispatcher.CheckAccess())<br />
{<br />
Exception exception = null;<br />
this.Dispatcher.Invoke((Action<String, String>)((path, val) => { <br />
<br />
try<br />
{<br />
SetProperty(path, val);
}<br />
catch (System.Exception e)<br />
{<br />
exception = e;<br />
}<br />
}), Path, Value, exception);<br />
if(exception != null){<br />
MessageBox.Show(exception.Message);<br />
}<br />
unfortunately this code doesn't work and I was wondering if there was a way around it.
Thank you in advance.
|
|
|
|