|
Just realized that I only had one service installer set up. Added a second installer for the other service and things are running much better now. Thanks!
|
|
|
|
|
Thanks for the update!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have a file whose content like this :
1 2
3 4
I wonder how can I read them to 4 variables a, b, c, d
I tried using Read or ReadLine to read but there was no result
Would you mind helping me ?
|
|
|
|
|
Use a StreamReader[^] to read each line.
Put each line into a String variable.
Call theLine.Split(' '); on the string passing a space as the delimiter. This will give you an array of the values.
Loop through the array and use int.TryParse(...) to convert each string in the array into an integer.
Simon
|
|
|
|
|
I second that.
"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
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Alternatively, you can also use a regular expression on each line, it would look like this:
^(\d+)\s+(\d+)
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi All,
I have an application that needs to send some basic text back to a console on another pc at another site via the internet.
The apps at both ends do just what they need to, but i have no idea how i should be sending the data.
Any ideas would be gratefully received!
Thanks,
Phil
|
|
|
|
|
ph1l2 wrote: but i have no idea how i should be sending the data.
Any ideas would be gratefully received!
check this out[^]
led mike
|
|
|
|
|
I was wondering how to do this too. I know at an abstract level that sockets (IP address + port number) can be used. But I'm missing the details on how get it set up and working.
|
|
|
|
|
Alan Balkany wrote: But I'm missing the details on how get it set up and working.
Try this site[^]. It has been around since the mid 90's.
led mike
|
|
|
|
|
|
Great, thank you for your help led mike
|
|
|
|
|
Hai all,
In my application, I need to Export webpage things into hard drive. I am using gridview, and i export all things(with the help of some sites) into excel except images.
Please, Can any one tell me how to export all contents of(Including Images) gridview into excel.
Thanks in advance..
Sham
|
|
|
|
|
Hello,
there is a webservice method which accept a data object as parameter, defined in the wsdl.
when i create new class and inherit from the webservice object and pass it to the method i get an internal exception:
"there is an error while generating xml"
it is possible, maybe with [attributes] to solve this problem? i would like to encapsulate the data class.
|
|
|
|
|
When you add a web reference, it creates client side classes for it. Check the source of the generated class to see what it needs to be serialisable as xml.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I tryed ssis just because my database is not normalized it does,t work. so I wrote a program. but have problems. The soft where creates an intermediate database to migrate an Access Database to with allow all null values. Then I have to migrate from the intermediate database to my real database because it does not allow null values it crashes. So I wrote so it will ignore null values. So cool that works now I am having problems because my real database have example( contact table) ( 25 column names) intermediate database (contact table) (10 column names) because the table are different in the number columns names I getting errors where the columns don't exist. I would like to have my code do something to the effect of
if objectcolumen exist() update else goto next, or skip, is this possible and if so can you give me example.
Learning to Code
|
|
|
|
|
how to convert WMA,AAC or FLAC to PCM(WAV) in C# compact framework or C# windows appln.
I saw examples given on codeproj. but most r not working with compact framework...(such as dll problems etc).
Can anyone give the direction for this?
|
|
|
|
|
I would assume you need to use an audio library to do things like this.
Find an audio library that supports .net and the conversions you want to do, then use that.
(Perhaps post the link to the article you are following)
Simon
|
|
|
|
|
You don't really need to convert it, you just need a library that can play the audio types and then record the output (which should be PCM). So if you can play the files within your code, its a possibilty you can save them as PCM.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hi,
I busy fixing a Addin for Visual Studio.
Basically generating a source file.
The class with its methods get generated fine, but
when I save the generated source it get additional closing brackets.
This line cause additional bracket to be inserted:
applicationObject.ActiveDocument().Save("");
Can anyone please tell me why?
Regards
Full Code:
<br />
TextSelection testSelection = applicationObject.GetActiveDocument().Selection as TextSelection; if (testSelection != null)<br />
{<br />
testSelection.SelectAll();<br />
<br />
string val = GenerateCode(targetNamespace,targetClass, testClassName);<br />
<br />
testSelection.Text = val; <br />
}<br />
<br />
applicationObject.GetActiveDocument().Save("");<br />
<br />
|
|
|
|
|
Don't worry, fixed it myself.
Was related to TextSelection and Resharper being clever.
When assigning TextSelection.Text, Reshaper try to insert the correct
matching brackets.
The right use for TextSelection is to use the Insert method.
testSelection.Insert(val, (int)vsInsertFlags.vsInsertFlagsInsertAtStart);
|
|
|
|
|
Hi,
.net 2 vs2005
I have a winform app that uses visual inheritance and connects to a web service.
The problem I have is that when I close the app it still runs in task manager.
When it runs through visual studio on clicking close it closes but i still need to select the stop button in visual studio.
Ive tried base.Close() before calling this.close() and setting the web service object to null, there are no threads I am aware of - how can i find out what is still running?
ive also tried Application.Exit(); in program.cs but again this makes no difference.
Thanks,
Chas
|
|
|
|
|
In your application main page write Application.Exit() in the page dispose event...
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
Application.Exit();
}
Thanks
Hem
|
|
|
|
|
I was helping with this question[^] and decided to actually try out my advice.
Basically, the OP wants to add a load of images to a form, but it takes some time and he wants the form to remain responsive. I suggested using User32.PostMessage with a user message to add each image. After an image has been added, post the message again to do the next image.
What I expected to happen was that any windows messages that were posted to the message queue while an image was being added, would be handled before the next user message was pumped. This appears not to be the case. It seems the windows messages don't get through until all the user messages have been pumped. So, the form is still unresponsive during this time.
My question is: can anyone explain this to me?
This is in my Form . I have simulated adding images with setting a label's text lots of times:
const int MSG = 0x0400;
Queue<int> _Queue = new Queue<int>();
protected override void WndProc( ref Message m )
{
if ( m.Msg == MSG ) AddImage();
base.WndProc( ref m );
}
private void button1_Click( object sender, EventArgs e )
{
for ( int i = 0 ; i < 1000 ; i++ ) _Queue.Enqueue( i );
Pulse();
}
private void Pulse()
{
Refresh();
if ( _Queue.Count > 0 ) User32.PostMessage( Handle, MSG, 0, 0 );
}
private void AddImage()
{
if ( _Queue.Count > 0 )
{
int i = _Queue.Dequeue();
for ( int x = 0 ; x < ( int ) 1e4 ; x++ )
label1.Text = "hello " + i;
}
Pulse();
}
The interesting method is Pulse . I understand the need for Refresh ( because WM_PAINT messages are deferred ), but I don't understand why the nasty Application.DoEvents() is required.
Thanks
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Have you tried BeginInvoke?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|