|
I'm new for networking programing and i wanna know that how to write a java program for mesure to ping delay for particular site
Ex-: If we ping in command promt www.googe.com how to write a program for mesure ping delay??
CheeN
|
|
|
|
|
sacr83 wrote: how to write a java program
And you thought posting the question on a forum for .NET development was the best way to get that answered?
|
|
|
|
|
when we use the abstract class nad when we use the interface int applictions
raja
|
|
|
|
|
Google not working for you? There are many many results available: Google[^]
|
|
|
|
|
I'm assuming your question is more of a design question (where Google might not help much), as opposed to a simple question of what each is...
Personally, I tend to favor interfaces over abstract classes. I tend to use an abstract class only when I want to implement something like the template design pattern. I've been steadily moving towards keeping my objects more loosely-coupled, which interfaces help to do quite nicely. With an abstract class, however, that's not really true.
Hope that helps a bit.
BW
|
|
|
|
|
An interface is more of a service contract, whereas an abstract class is a base set of functionality which is useless by itself.
|
|
|
|
|
Yep, exactly. It took me a year to really get that.
|
|
|
|
|
how to handle the error handle in sqlserver 2000?
raja
|
|
|
|
|
Check the value of the global @@ERROR variable.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I'm trying to move from programmatic configuration of remoting to using a config file, but I can't seem to get the config file to work.
Here's the relevant programmatic code (server side)...
<br />
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();<br />
serverProv.TypeFilterLevel =System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;<br />
BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();<br />
IDictionary props = new Hashtable();<br />
props["port"] = 8000;<br />
TcpChannel serviceChannel = new TcpChannel(props, clientProv, serverProv);<br />
ChannelServices.RegisterChannel(serviceChannel, true);<br />
AccountConnectionService service = new AccountConnectionService();<br />
RemotingServices.Marshal(service, "myService", typeof(IAccountConnectionService));<br />
This works just fine.
Here's my .config file...
<br />
configuration<br />
system.runtime.remoting<br />
application<br />
service<br />
wellknown type="Common.AccountConnectionService,Common"<br />
mode="Singleton" objectUri="myService"<br />
wellknown<br />
service<br />
channels<br />
channel ref="tcp" port="8000"<br />
channels<br />
serverproviders<br />
formatter ref="binary" typefilterlevel="Full" <br />
serverproviders<br />
clientprovider<br />
formatter ref="binary" typefilterlevel="Full"<br />
clientprovider<br />
application<br />
system.runtime.remoting<br />
configuration<br />
This doesn't work. It throws an "Authentication Exception" because the transport connection was closed. I'm not sure what the difference is or what I'm missing. I checked out the MSDN documentation, but tbh I couldn't make heads or tails of it. (I've cobbled this config together from various tutorials.) I don't think this should matter, but I'm still using programmatic configuration on the client side, I can post that code also if it helps. Any help is much appreciated.
BW
p.s. I apologize for the config looking ugly. The xml was getting messed up in the post, and I couldn't figure out how to make it look right.
|
|
|
|
|
Well, no replies so far...maybe a different question...
Does anyone know where to find a *thorough* tutorial/article on using a .config file for remoting?
And please don't say "just do a search, there are plenty out there," because every one I've seen so far is most certainly NOT thorough. Even the articles I've found on MSDN generally only touch on a few of the possible configuration features. The doc on the schema of configuring for remoting is also noticeably out of date. If someone could point me to one they already know of, though, that would be very much appreciated.
That said, if I don't get an answer here or elsewhere...I've got Rammer's book on the way, so hopefully I'll find what I need in there (but an earlier answer would be nice ).
Thanks for any help.
BW
|
|
|
|
|
Hey
Just wondering if there is a built in control that offers functionality similar to the slide out panels in Visual Studio? I have considered either creating my own or modifying the split panel control. But if there is built in functionality I would much rather use that.
Thanks
Dan
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
There are lots of commercial packages: here[^], here[^], here[^], here[^], here[^], etc.
There are a couple open source ones also: here[^], here[^], here[^], etc.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Cheers - that's helped me out loads
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
Sir/Madam,
Our departmenatal packages have been written in vb.net 1.1 version and runs on Windows operating system.Is it possible to run this package in SUSE Linus Operating System (version 10) by converting vb.net code to Java enabled.
J R D Solomon
|
|
|
|
|
Take a look at Mono[^] and see if you can use it, then you don't need to convert the code at all.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I've used a number of Microsoft IDE's over the years, and (in general) I've managed to get used to the changes that they make, for better or worse.
I do not, however, understand why the property grid in the WPF designer is so featureless compared to what it was like in Visual Studio 2005.
Let's see here:
1. No events
2. No alphabetizing (yes, it has the search instead of the sort, so I guess it's just -1/2 point on that one)
3. No color chooser or font chooser or any other convenient pop-up.
4. No combo-box for choosing components out of the diagram by name.
5. No direct support for data binding of control properties.
I fail to see what Microsoft is trying to accomplish with this gimpy property grid. Does anyone else have any idea?
|
|
|
|
|
Keep in my that WPF has alot more features than Windows Forms (and the like).
1. Routed Events make this a little more difficult because now a given event is not fired on a single object.
2. I also use the "sort alphabetical" option when working in WinForms, so I also miss this one.
3. Again, things are complicated by how WPF works. In WinForms, it would/could serialize out C# code to generate the new Font or Color object. In WPF, it would need to add/modify resources (at many levels) which could be used by many different objects.
4. Another good point. I typically use the XAML view to "select" the object I want, but it takes some getting used to.
5. Data Binding is extremely complex, especially when using Relative Sources, Value Converters, etc.
I was equally disappointed when I started using it. But I'm sure they will come up with something better in the future
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks for the response.
For number 1, I noticed that I can always type the event into the XAML, so it didn't look like much of a stretch to go one step further and put it in the property grid. Maybe in some cases (that I haven't run across yet) the event can't be manually typed into the XAML. In any case, it requires scrolling through loads of text to see which events are being used now.
And for number 4, it would seem like a good idea to give the XAML viewer a combobox to help deal with cases when there are many controls to deal with. I'm sure I can get used to scrolling through the XAML text, too, but it still strikes me as a step backwards in terms of usability.
And for number 5, although there may be technical reasons why Microsoft dropped the property grid databinding support, it's a real drawback to moving to WPF, as some tools that my project team has implemented use that feature a lot.
|
|
|
|
|
I agree on all points
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi,
I've got a few classes that implement IDisposable to clean up their resources. In a windows forms app, I would create the objects in the forms constructor and dispose of the objects in the overridden dispose method.
In WPF, the Window class doesn't implement IDisposeable. Where should I dispose of these objects?
I'm quite new to WPF, so maybe I'm just missing something obvious.
Can anyone help.
Simon
|
|
|
|
|
The WPF Window class doesn't implement IDisposable, because it doesn't have anything to dispose.
You can create your own Window class (say MyWindow) that derives from Window and implements IDisposable. Then either you can explicitly call Dispose when you are done with your Window, or you can simply let the finalizer call it for you.
Check this[^] and this[^] out, for more info on how to implement IDisposable properly.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
The problem won't be solved by implementing the dispose pattern on the window, I will still be left with a window class that doesn't get disposed as there is nowwhere to call dispose on the Window from.
In WPF the entry point is auto generated and looks like this:
[System.STAThreadAttribute()]<br />
[System.Diagnostics.DebuggerNonUserCodeAttribute()]<br />
public static void Main() {<br />
WpfApplication1.App app = new WpfApplication1.App();<br />
app.InitializeComponent();<br />
app.Run();<br />
}
(No window class anywhere), and the app.xml file looks like this
<Application x:Class="WpfApplication1.App"<br />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />
StartupUri="Window1.xaml"><br />
<Application.Resources><br />
<br />
</Application.Resources><br />
</Application>
I don't have control over the creation of the window class, and it won't get disposed of. I tried it, and all that happens is the finaliser gets triggered when the app is closed.
What I've done for now is to manually implement the app entry point so I have control over the window creation:
public static void Main()<br />
{<br />
WpfApplication1.App app = new WpfApplication1.App();<br />
using (Window1 mainWindow = new Window1())<br />
{<br />
app.Run(mainWindow );<br />
}<br />
}
But this doesn't quite feel like the 'WPF way'. I have no app.xaml file.
Is there a way of doing this without manually implementing the the app entry point, or is this how it should be done?
It's a minor point really, It works fine the way I've done it, just I wondered if there's a proper way of doing it.
Simon
|
|
|
|
|
Following the proper implementation of IDisposable, the finalizer should call the Dispose method for you. So if your application is shutting down, and the finalizer is called on the Window, then Dispose should be called. Are you saying that Dispose is not being called in this scenario?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Sorry, thats not what I meant, I'm not very good at explaining.
Yes the finalizer is getting called, and yes that triggers the dispose method, but following the pattern, it calls the dispose method and passes false, which means it doesn't clean up managed resources, instead they are left for their own finalizers to be triggered to clean them up, and so on, which means my whole stack of objects are all left waiting for their finalisers to clean them up which is a bit messy, which is what I meant when I said "it won't get disposed of...all that happens is the finaliser gets triggered."
Also, finalizers aren't guranteed to be called.
I think the way I've done it is the best solution, I get deterministic clean up, and no worries about relying on the finaliser.
Thanks for helping.
Simon
|
|
|
|