|
n.podbielski wrote: Am I allone on that?
Yes/no. With a large framework, there's bound to be some inconsistencies.
Yes, it would help if we could deduce the name of the method we want to call, based on fixed patterns. No, I don't see it happening.
As for the range, I'd expect two ints, as the indexes are a good way to define a range. That's a bit harder to do with an IEnumerable.
RemoveWhere(thisconditionistrue) or RemoveAll(thisconditionistrue); yes, your version sounds better, but it'll be hard to convince MS to change it. Especially after it's being used already in a lot of sourcecode.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
provide the details to get current location through gps in desktop apps
|
|
|
|
|
Well, first of all you'll need hardware capable of receiving GPS data. Then you'll need to write some code to get this data. Finally, you need to learn how to say please; my first temptation was just to write "no". I don't work for you and you aren't a client, so I don't take well to orders from you.
|
|
|
|
|
Hello, when we move the scroll bar of a program we get this exception. I think its some thing to do with Index was out of range? Is this the correct section to post in? I'm using Windows 7 64 bit if that helps. Thank you.
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Network_Design_Tool.Network.GetLineType(Int32 index)
at Network_Design_Tool.MainForm.utilSlackParamBar_Scroll(Object sender, EventArgs e)
at System.Windows.Forms.TrackBar.OnScroll(EventArgs e)
at System.Windows.Forms.TrackBar.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
private void utilSlackParamBar_ValueChanged(object sender, EventArgs e)
{
double num1 = Convert.ToDouble(this.utilSlackParamBar.Value) / 100.0;
double num2 = 1.0 - Convert.ToDouble(this.utilSlackParamBar.Value) / 100.0;
this.utilParam.Text = Convert.ToString(num1);
this.slackParam.Text = Convert.ToString(num2);
}
private void utilSlackParamBar_Scroll(object sender, EventArgs e)
{
if (!this.menuDesignUpdate.Checked)
return;
this.Mentor(this.comboLineType.SelectedIndex, Convert.ToDouble(this.utilSlackParamBar.Value) / 100.0 * this.network.GetLineType(this.comboLineType.SelectedIndex).Linespeed, 1.0, 0.4, 0.2, Convert.ToDouble(this.alphaParamBar.Value) / 100.0, "F", 1.0 - Convert.ToDouble(this.utilSlackParamBar.Value) / 100.0);
this.designDone = true;
this.DrawNetwork();
}
private void utilLabel_Click(object sender, EventArgs e)
{
}
|
|
|
|
|
comboLineType.SelectedIndex : is that -1? And how does GetLineType() look like - is the ArrayList you use there correctly initialized?
|
|
|
|
|
this.Mentor(this.comboLineType.SelectedIndex, Convert.ToDouble(this.utilSlackParamBar.Value) / 100.0 * this.network.GetLineType(this.comboLineType.SelectedIndex).Linespeed, 1.0, 0.4, 0.2, Convert.ToDouble(this.alphaParamBar.Value) / 100.0, "F", 1.0 - Convert.ToDouble(this.utilSlackParamBar.Value) / 100.0);
Writing composite expressions such as this in a single line of code is just asking for trouble. You have no way of checking any of the interim values that are being selected or calculated.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
What extra information is that supposed to convey?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You should have posted that earlier. Why it's obvious now. I can obviously tell what your code looks like from the different shades of grey there (I counted 50 of them).
And, yes, that was sarcasm.
|
|
|
|
|
The program is available on the internet. Just search for 'wlvnet' on Google, please.
|
|
|
|
|
If you expect people to help you then try responding to some of the questions that have been posted. If you think people are going to download some vaguely identified piece of code from the internet, build it and debug it on your behalf, then I'm afraid you are going to be disappointed.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
What is Interface? In Which Scenarios Use It?
Raghu RR
|
|
|
|
|
Both of these questions could be answered by a quick Google search[^], or reading the documentation.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I suggest you look up what it is, and try to formulate an answer to your homework. I can give you the answers without thinking, but that would be just as useful as counting the grains of sand in a desert - it'd be a waste of time.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Abstract Class ? In which Scenarios use it over Interface?
Raghu RR
|
|
|
|
|
An interface defines the signatures for a set of members that implementers must provide. Interfaces cannot provide implementation details for the members. For example, the ICollection interface defines members related to working with collections. Every class that implements the interface must supply the implementation details for these members. Classes can implement multiple interfaces.
Classes define both member signatures and implementation details for each member. Abstract classes can behave like interfaces or regular classes in that they can define members, and they can provide implementation details but are not required to do so. If an abstract class does not provide implementation details, concrete classes that inherit from the abstract class are required to provide the implementation.
So here you can see the difference. Based on the understanding about your requirements in the project. You should implement either Interface of abstract class.
|
|
|
|
|
Hello - My company has a large TFS structure and my team has a requirement to replace references to one site domain with references to another site domain.
I was trying to see if there was a way to do this search through TFS itself. In VS, Edit > Find and Replace > Find in Files only searches the sln open in VS which does not satisfy my requirement. File > Source Control > Find in Source Control > Wildcard opens a Search window with Recursive checked by default. However, this search only appears to search file and folder names but not file contents. For example, a search for "string" at the TFS root level should return hundreds of references but only returns a reference to a folder named "string".
So is there a way to do a full recursive search for text within the files from the root level of TFS? The ways I described above don't seem to accomplish my goal unless I'm missing something. I'm guessing someone here has had a requirement to something similar to this before....
|
|
|
|
|
i m trying to make a local search engine.
i use a master page on which my search bar is located and now i want to show the result on the another page result.aspx........plz help me......and tell me which control is best for showing results on page like local serch engine....here i m using repeater control but it is not so promising ...no paging nd all....... thanks in advance to all
|
|
|
|
|
mahesh s charan wrote: and tell me which control is best for showing results on page like local serch engine....here i m using repeater control but it is not so promising ...no paging nd all.......
.......
Ideally, there'd be a single control that does all, with us only assigning our favorite color to it. That's not how programming works however. Applications are built using multiple controls, and there are quite some examples out there on "adding paging".
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
|
|
I have a Windows forms app which uses WCF services. Our application sends messages using one of our WCF services to specific users running our client, so our callback “http:” string is dynamically constructed each time a message is sent to a user. It includes the server IP address and port (126.221.97.105:701) onto which the current user is logged, the user’s id (56281), and the client GUID (7392d27a-e4a0-42e2-89a3-adc332e28934). So, a typical callback “http:” string looks like this:
http://126.221.97.105:701/CmesCns/CALLBACK/56281/7392d27a-e4a0-42e2-89a3-adc332e28934
We have an http namespace (http://+:701/) on our client and the group “Everyone” is tied to this namespace with all of the access permissions checked (GenericAll, GenericExecute, GenericRead, and GenericWrite). We use “http namespace” to create our namespaces.
Our application has been in production (on Windows Server 2003) for a few years and everything is working fine.
We have recently converted our application to run in the Windows 2008 server environment. The “Target Framework” in each of our projects is set to the “.NET Framework 4.0”. Our application works fine on my Windows 7 developer workstation. That is, I am able to receive messages from our WCF service, but when I place our application onto our Windows 2008 server and I attempt to run the application, I receive the following error message:
“There was no endpoint listening at http:// 126.221.97.105:701/CmesCns/CALLBACK/56281/7392d27a-e4a0-42e2-89a3-adc332e28934 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.”
The http namespace (http://+:701/) exists on my developer workstation and on my Windows 2008 server. The group “Everyone” is tied the namespace on my Windows 7 box and on my Windows 2008 server, and all of the access permissions are checked (GenericAll, GenericExecute, GenericRead, and GenericWrite).
Our team has been trying to resolve this error but we are unable to do so. Would anybody have any ideas on why this would work on our Windows 7 workstations, but not on our Windows 2008 servers?
Any help is greatly appreciated!
Kevin
|
|
|
|
|
hi i am wondering if its possible to include a patch like .net framwork 4 or ms agent hotfix in a application setup wizard.? hence user dont need to install seperately
|
|
|
|
|
neodeaths wrote: if its possible to include a patch like .net framwork 4
That's not a "patch", but a prerequisite; the app will need the framework (which is a new version, not a patch on 3.5) and the wizard can include those. We got an article on the subject[^].
As for MS-agent hotfixes; if they are executable files, you could include them as a "custom action", described here[^].
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Following code snippet may look weird, but it is a very simple method to reproduce the problem of a complicated interaction with a different application.
The example application has two forms, both forms register FormClosing and FormClosed events, just doing a Debug.WriteLine there.
The Main function does:
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form2 form2 = new Form2();
form2.Show();
Application.Run(new Form1());
}
When I close Form2, I receive the events as expected. When I close Form1, the application exits and Form2 gets closed too. But: the events of Form2 do not occur.
I overrode the WndProc of Form2. When I close Form2, I receive
15.10.2012 10:25:04 WndProc - WM_CLOSE
15.10.2012 10:25:04 OnClosing
15.10.2012 10:25:04 Form2_FormClosing
15.10.2012 10:25:04 OnClosed
15.10.2012 10:25:04 Form2_FormClosed
...
15.10.2012 10:25:04 WndProc - WM_DESTROY
...
15.10.2012 10:25:04 WndProc - WM_NCDESTROY
When I close Form1, Form2 does not receive a WM_CLOSE. But WM_DESTROY and WM_NCDESTROY are received.
What is the reason for that strange behavior?
|
|
|
|