|
Alan Burkhart wrote: I'm smacking myself on the head
That algorithm seldom leads up to the intended result.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
so you want the very confusing code of...
Process.Start("chrome.exe", """? lizard""");
...oh and get out the damn C# forum
This will do for now
|
|
|
|
|
musefan wrote: Process.Start("chrome.exe", """? lizard""");
YES!!!
Many Thanks.
Everybody SHUT UP until I finish my coffee...
|
|
|
|
|
Am I to understand you first are asking in the wrong forum on purpose, and then have trouble translating a perfectly good one-line answer to your language?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: Am I to understand you first are asking in the wrong forum on purpose, and then have trouble translating a perfectly good one-line asnwer to your language?
I've experimented with so many (wrong) ways to get it done today that the "\" didn't register in my head at first. I was adding the quotes, but not removing the backslash. When I saw musefan's msg I just about beat my head on the wall. But - no one ever accused me of being a genius. I KNOW I'd have thought about the backslash in a minute or two. Or tomorrow.
Everybody SHUT UP until I finish my coffee...
|
|
|
|
|
hello guys...I hae path stored in database which I retrieve successfuly. But before utilising them, I need to modify them. All of them have single backslah but of course, in order to use that path we need double backslash like this "\\". Here is what I have tried so far but it does not work of course. How can I do that?
string path = "d:\songs\audio\asd.mp3";
string modifiedName = name.Replace("\", "\\");
|
|
|
|
|
overloaded Name wrote: of course ... we need double backslash
No you don't. Backslash doubling is meaningful only to the compiler itself, it is how one says the next backslash is to be taken literally; once a string literal is compiled, all escape sequences have been interpreted and no double backslashes remain (unless you had 4 backslashes, which could be useful in a UNC).
FWIW: Your code, corrected so it compiles, but totally useless, would be:
string path = "d:\\songs\\audio\\asd.mp3";
string modifiedName = path.Replace("\\", "\\\\");
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
modified on Thursday, March 3, 2011 8:06 AM
|
|
|
|
|
Hi Luc,
Im sure you know that , but the first line doesnt compile. Its an invalid string literal.
One have to use
strind path = @"d:\songs\audio\asd.mp3";
or
string path = "d:\\songs\\audio\\asd.mp3";
Greets
Matthias
|
|
|
|
|
My mistake, I copied and only fixed the second line. I'll fix it now. Thanks.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hi,
In my application, am exporting the data from Grid to Excel file and save it in My Documents.
If the user dont have Excel installed in his machine, it has to redirect it to google spreadsheet to view the exported file..
Can any one tell me how to do it...
As of now, am displaying a message to the user if he dont have Excel installed in his machine to view the Exported Excel file, i want to replace this by redirecting it to Google spreadsheet to view the exported file, am using a code this code to display message to the user..
if (MessageBox.Show(
"Data Exported to File " + strFileName +
" at location MyDocuments. Do yo want to view the saved file?",
"Work Done",
MessageBoxButton.YesNo,
MessageBoxImage.Information) == MessageBoxResult.Yes)
{
Type officeType = Type.GetTypeFromProgID("Excel.Application");
if (officeType == null)
{
MessageBox.Show("Please Install MS Excel to view this file", "Liquidity Risk Management");
}
else
{
olx.visible=true;
}
}
|
|
|
|
|
First you must think about how to upload files to a Google Docs account and then how to redirect the user.
|
|
|
|
|
I'm trying to create certificates through programatically and created a batch file as below
cd c:\Program Files\Microsoft Visual Studio 9.0\VC
makecert -ss CBBC
Note:CBBC is the certificate name, I'm using Visual studio 2008
When I tried to execute this batch file through programatically, it displayed the below message in command window.
"'makecert' is not recognized as an internal or external command, operable program or batch file."
When I tried manually, its creating certificate successfully. Please let me know the solution.
|
|
|
|
|
Include the path to the MakeCert application. If it can't find the command, you'll get the error that you described. The easiest way is to enhance/copy the batchfile that's used for the "Visual Studio 2005 Command Prompt" - look under the Start menu, under the "Microsoft Visual Studio 2005" folder; it has a Tools-folder, and it should have a link to said batchfile. That should also contain the commands to set the correct search-paths, so that it includes the commands for Visual Studio in your command prompt.
I are Troll
|
|
|
|
|
oh I see, I thought he was using CD to goto the correct directory for makecert
mine is C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\makecert.exe (if that helps anyone)
Don't vote my posts down just because you don't understand them - if you lack the superior intelligence that I possess then simply walk away
|
|
|
|
|
musefan wrote: I thought he was using CD to goto the correct directory for makecert
Remembering to change the directory would be the easiest way to solve it
I are Troll
|
|
|
|
|
do you need to use START (or something like that) before the program name
cd c:\Program Files\Microsoft Visual Studio 9.0\VC
START makecert -ss CBBC
EDIT:
it seems the problem is more likely the location of the makecert file (which is not in the CD directory as I assumed was being done)
correct version may look something like...
cd "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin"
makecert -ss CBBC
OR
cd c:\Program Files\Microsoft Visual Studio 9.0\VC
START /D"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\" makecert.exe -ss CBBC
Don't vote my posts down just because you don't understand them - if you lack the superior intelligence that I possess then simply walk away
modified on Thursday, March 3, 2011 6:42 AM
|
|
|
|
|
cd "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin"
makecert -ss CBBC
it worked. Thank you...
I found there is a default certificate(Joe's-Software-Emporium) in CBBC Folder. How can I delete this default one. Thank you in advance
modified on Thursday, March 3, 2011 7:12 AM
|
|
|
|
|
I am using below code from below link:
using System.Globalization;
using System.Text.RegularExpressions;
string strValue= "0932;093E;0926;0947;0928;";
Regex rgexp = new Regex(@"([0-9A-Fa-f]{4});");
string strResult= rgexp .Replace(strValue, match => ((char)Int32.Parse(match.Groups[1].Value, NumberStyles.HexNumber)).ToString());
Response.Write(strResult);
Source:http://www.dotnetspider.com/resources/39073-How-convert-hindi-using-unicode.aspx
But there is red line with match = "> (Here it is showing red line)"
I am going to convert a Unicode String to Hindi (Indian Language). I am using VS 2005 Prof Edition.
Thanks.
|
|
|
|
|
I think your syntax may be incorrect (looks like LINQ), see here[^] for a sample of the Replace() method.
I must get a clever new signature for 2011.
|
|
|
|
|
and what is the error message that it shows..?
|
|
|
|
|
Thanks for your reply. Here it is the code:
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
string strValue= "0932;093E;0926;0947;0928;";<br />
Regex rgexp = new Regex(@"([0-9A-Fa-f]{4});");<br />
string strResult= rgexp.Replace(strValue, match => ((char)Int32.Parse(match.Groups[1].Value, NumberStyles.HexNumber)).ToString());<br />
textBox1.Text=strResult;<br />
}<br />
And the error :
Invalid expression term '>'
Even i am not able to resolve the issue from link given by first user please.
Thank you.
|
|
|
|
|
If I copy that code, then it works fine for me.
If you are getting an error around the => part (known as lambda expression[^]) then perhaps you are not using the correct version of .Net required to do this which is .Net 3.5 or above (I think)
EDIT
Change target framework[^] (VS 2008 but I am sure you will work it out for 2005)
...if version 3.5 or higher is not available then you will most likely need to install it first
CORRECTION
...actually you will need to get a copy of VS 2008 or VS 2010 if you want to use .Net 3.5 or higher
Don't vote my posts down just because you don't understand them - if you lack the superior intelligence that I possess then simply walk away
modified on Thursday, March 3, 2011 5:53 AM
|
|
|
|
|
VS2005 only supports the 2.0 framework. He'd have to compile by hand if he's going to use 3.0, or download VS2k8 Express
I are Troll
|
|
|
|
|
...you may have your knowledge, but at least I have my youth!
I see[^], exactly for the same reason why the OP is having the problem
Don't vote my posts down just because you don't understand them - if you lack the superior intelligence that I possess then simply walk away
|
|
|
|
|
Girish481 wrote: Unicode String to Hindi
Could you explain that? AFAIK, Unicode supports all characters. You're going to save it as ANSI with a Hindi-codepage?
What are you trying to achieve?
Girish481 wrote: I am using VS 2005 Prof Edition.
Would be .NET 2.0, and that doesn't support Lambda-statements. You'll have to convert it to a real method, or upgrade to a newer version of .NET.
I are Troll
|
|
|
|