If I had only "StatusType" I would agree with you, however I have 4, I want all 4 of them to be placed in the single array...
You can only be young once. But you can always be immature. - Dave Barry
If I had only "StatusType" I would agree with you, however I have 4, I want all 4 of them to be placed in the single array...
You can only be young once. But you can always be immature. - Dave Barry
Agreed, the example given will run in N^2 time, and your solution will run in N time.
You can only be young once. But you can always be immature. - Dave Barry
While this is true, "Utility" class tend to morph into blob antipattern very quickly. Which is the problem he is now facing with the main form.
You can only be young once. But you can always be immature. - Dave Barry
I have an interface with a client that is been in production for many years, and I would like to alter the xml parsing system that handles this message. Since I may have 4 different StatusTypes
I desire to have an array of the these items, however, they are not in a nice collection element that will make deserlization simple, like all of the examples on the internet that I could find. In the code below, I was hoping to get all of these items in MysticalList. Obviously, my example does not work ... How can I get my entity to work with a simple list?
<xsd:complexType name="requestRailStatus">
<xsd:sequence>
<xsd:element name="TrainID" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="BeginTimePeriod" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
<xsd:element name="EndTimePeriod" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
<xsd:element name="StatusType" type="railStatusOptions" minOccurs="0" maxOccurs="4" />
</xsd:sequence>
<xsd:attribute name="timestamp" type="xsd:dateTime" use="required" />
<xsd:attribute name="messageId" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:simpleType name="railStatusOptions">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ActualTimeOfArrival" />
<xsd:enumeration value="ActualTimeOfWorking" />
<xsd:enumeration value="ActualTimeOfCompletion" />
<xsd:enumeration value="ActualTimeOfDeparture" />
</xsd:restriction>
</xsd:simpleType>
public partial class requestRailStatus : EntityBase
{
public string TrainID { get; set; }
public System.DateTime BeginTimePeriod { get; set; }
public System.DateTime EndTimePeriod { get; set; }
\[XmlElement("timestamp")\]
public System.DateTime TimeStamp { get; set; }
\[XmlElement("messageId")\]
public uint MessageId { get; set; }
\[XmlArray\]
public List<railStatusOpti
Wow Thanks... I will try this and see if it is my issue.
You can only be young once. But you can always be immature. - Dave Barry
That would be a pretty cool form generating tool. Have fun with that :)
You can only be young once. But you can always be immature. - Dave Barry
Does your company have an official Coding standard document or a Coding Conventions document or development best practices? if so, I would be interested in reading it. I am collecting as many of these documents as possible for a research project. Do you like the code conventions that you company uses?
You can only be young once. But you can always be immature. - Dave Barry
When I Print from my computer life is good. when I print from the SQA computer life - not so good. My box Windows XP sp 2 SQA Windows 2003 SE SP 2 Using the local system account results in the following error:
[2009/08/31 17:19:49.392] System.ComponentModel.Win32Exception Access is denied
File Name : Method : StandardPrintController.OnStartPrint Line Number : 0
File Name : Method : PrintControllerWithStatusDialog.OnStartPrint Line Number : 0
File Name : Method : PrintController.Print Line Number : 0
File Name : Method : PrintDocument.Print Line Number : 0
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrinterStrategy\LocalPrinter.cs Method : LocalPrinter.OutputContext Line Number : 71
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.printHelper Line Number : 94
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.Print Line Number : 44
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrintManager.cs Method : PrintManager.ProcessPrintRequest Line Number : 160
If I enter a specific user account, and validate Both RPC services are running, the error changes to:
[2009/09/03 10:10:06.595] System.ComponentModel.Win32Exception The RPC server is unavailable
File Name : Method : StandardPrintController.OnStartPrint Line Number : 0
File Name : Method : PrintControllerWithStatusDialog.OnStartPrint Line Number : 0
File Name : Method : PrintController.Print Line Number : 0
File Name : Method : PrintDocument.Print Line Number : 0
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrinterStrategy\LocalPrinter.cs Method : LocalPrinter.OutputContext Line Number : 71
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.printHelper Line Number : 94
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.Print Line Number : 44
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrintManager.cs Method : PrintManager.ProcessPrintRequest Line Number : 160
I am out of ideas, Any thoughts are welcome The Framework code, StandardPrintController, causing me grief:
public virtual void OnStartPrint(PrintDocument document, PrintEventArgs e)
{
IntSecurity.AllPrintingAndUnmanagedCode.Assert();
this.modeHandle = document.PrinterSettings.GetHdevmode(document.DefaultPageSettings);
}
I am porting a VB6 winsock.ocx based library to a .Net Sockets implementation, and I am not the most savvy sockets programmer. The architecture of the communication system was designed long before I got here; so changing the overall design is not an option. Moreover, this system has a low frequency of tcp traffic, so the Socket.Connected will almost always be out-of-date. The fundamental issue is the connected property of the socket. It does not seem to be funcitonal; however, I have found others that have had similar issues http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.connected.aspx[^] When I stepping-through the code in the debugger, unplug the network at the right moment, and view the sock object with the quick watcher, it shows me the value of sock.Connected has changed to false as expected. However, while running the code below, in debug mode but not stepping-through, the behavior of sock.Connected is different (when I unplug the wire, it does not update to false). Thoughts?
private bool isConnected(){
bool rVal = false;
//an alternate way to refresh the connected status of the sock.
try
{
bool blcking = sock.Blocking;
try
{
byte[] junk = new byte[2];
sock.Blocking = false;
sock.Send(junk, 1, 0, SocketFlags.None);
rVal = sock.Connected;
}
finally
{
sock.Blocking = blcking;
}
}
catch (SocketException e)
{
rVal = e.SocketErrorCode == SocketError.WouldBlock;
}
return rVal;
}
You can only be young once. But you can always be immature. - Dave Barry
Well - Thanks for your input anyways
You can only be young once. But you can always be immature. - Dave Barry
Don't your post move now, with new ones being added at the top of the forum?
You can only be young once. But you can always be immature. - Dave Barry
Then we should vote them away... no?
You can only be young once. But you can always be immature. - Dave Barry
Totally agree, however, isn't that why we vote on messages. An additional bussinss logic rule could be that messages with a 3 or less, are downgraded in priority.
You can only be young once. But you can always be immature. - Dave Barry
While I agree with all of you comments, they all have a simliarity of assuming unasnswerd questions are bad. Is that true? What about good questions that just don't get attention?
You can only be young once. But you can always be immature. - Dave Barry
in the messages Boards, not including the conversation forms, as people answer the questsions, the original message should lower itself in priority and sort onto the other pages. for example Q1 Q2 Q3 Q4 A1 A2 Then an answer for Q2 comes in... and the form would look like the following: Q1 Q3 Q2 A3 Q4 A1 A2 This way the unanswered Items would remain on the first pages, so they would recive more attention. ~Jason
You can only be young once. But you can always be immature. - Dave Barry
I am porting a VB6 winsock.ocx based library to a .Net Sockets implementation, and I am not the most savvy sockets programmer. The architecture of the communication system was designed long before I got here; so changing the overall design is not an option. Moreover, this system has a low frequency of tcp traffic, so the Socket.Connected
will almost always be out-of-date. The fundamental issue is the connected property of the socket. It does not seem to be funcitonal; however, I have found others that have had similar issues http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.connected.aspx[^] When I stepping-through the code in the debugger, unplug the network at the right moment, and view the sock object with the quick watcher, it shows me the value of sock.Connected
has changed to false as expected. However, while running the code below, in debug mode but not stepping-through, the behavior of sock.Connected
is different (when I unplug the wire, it does not update to false). Thoughts?
private bool isConnected(){
bool rVal = false;
//an alternate way to refresh the connected status of the sock.
try
{
bool blcking = sock.Blocking;
try
{
byte[] junk = new byte[2];
sock.Blocking = false;
sock.Send(junk, 1, 0, SocketFlags.None);
rVal = sock.Connected;
}
finally
{
sock.Blocking = blcking;
}
}
catch (SocketException e)
{
rVal = e.SocketErrorCode == SocketError.WouldBlock;
}
return rVal;
}
You can only be young once. But you can always be immature. - Dave Barry
Alright, here is the solution. There is a licenes registry key missing. The most likely violates some eula somewhere. so use with caution. but adding this key will reactiviate the winsock.ocx [HKEY_CLASSES_ROOT\Licenses\2c49f800-c2dd-11cf-9ad6-0080c7e7b78d] @ = "mlrljgrlhltlngjlthrligklpkrhllglqlrk"
You can only be young once. But you can always be immature. - Dave Barry
VB6 Tools? I am not familar with that product, Could you include a link. Googling it gives me ... lots of similar stuff.
You can only be young once. But you can always be immature. - Dave Barry
What makes you think this will not work?
You can only be young once. But you can always be immature. - Dave Barry
experance really helps in this, and mark clifton a fellow cp'er has written some good articles on this.
You can only be young once. But you can always be immature. - Dave Barry