Click here to Skip to main content
15,040,494 members

Comments by Member 10408451 (Top 66 by date)

Member 10408451 4-Apr-14 2:31am View
   
Hi, Thank you for your reply
I need to show 3 of the series in the legend but all 6 in the chart?
Can you please suggest me something about this
Member 10408451 3-Apr-14 7:05am View
   
you can see the image in the following link

http://postimg.org/image/vavb9t6db/

First chart area contains some data
where as seond chart area does not contain anything
Member 10408451 3-Apr-14 6:20am View
   
you can see the image in the following link

http://postimg.org/image/vavb9t6db/

First chart area contains some data
where as seond chart area does not contain anything
Member 10408451 13-Mar-14 9:58am View
   
When I am writing something like below
GatewayMsgIDs(dataLogFile).ResponseTimeofMsgs(numofBuses, select1, select2, select3, select4);
I am getting some error like below
'SCANLA.GatewayMsgIDs' is a 'type' but is used like a 'variable'

when I am using new keyword then there is no error
Member 10408451 13-Mar-14 9:37am View
   
Hi,
Yes, I am using public method in the receiving form
There is no problem in passing the arguments
But the problem is that the arguments are going to null by using new keyword
as it creates new instance of class
Member 10408451 18-Feb-14 11:49am View
   
Hi,

I tried as you said but this is not working and I tried putting a break point and it is actually taking Red color when latency is not equal to zero but it is not displaying the color

I do not understand what is the problem???

Thanks//John
Member 10408451 14-Feb-14 9:11am View
   
Hi,
I updated my question with my code
please check it
If not possible to say with that, I will try to post my whole code
Member 10408451 12-Feb-14 10:49am View
   
Hi,

I tried as you said and updated my original question with a comment
Please check it??
Member 10408451 12-Feb-14 9:48am View
   
Hi,
this helps me a lot
but I need to list the colors of same msgId
not for same color

Thanks
Member 10408451 12-Feb-14 9:31am View
   
I have new to linq

I modified my question with my code
please help me
Member 10408451 12-Feb-14 9:16am View
   
yes, exactly
Member 10408451 12-Feb-14 9:07am View
   
I have log file data with msgIDs and buscolors
I need to find how the message with same msgId is passing to different buses using color
like Red,Yellow,Green , Orange
Now I have list class which holds data of msgIDs and buscolors
How to seperate different colors of same msgIds
Member 10408451 12-Feb-14 8:58am View
   
updated my question
Member 10408451 10-Feb-14 9:18am View
   
Hi,
This code is fine. But I am getting warning saying

Unreachable code detected
Member 10408451 10-Feb-14 9:04am View
   
Hi,
Now I updated my question with class and productComparer
please check it
Member 10408451 10-Feb-14 8:45am View
   
Hi,
It works fine
But when I am trying like below
IEnumerable<PGNsegmentTxMap> noduplicates = products.Distinct(new ProductComparer());
it is not giving distinct values of products into noduplicates
Can you help me in solving this
Member 10408451 10-Feb-14 7:53am View
   
Deleted
Hi,

I created EquityComparer with my class

Again I am not getting any data into noduplicates

You can see my updated question on the top of this page
Member 10408451 10-Feb-14 7:17am View
   
Hi,

I tried like below outside loop

IEnumerable<scanla.common.pgnsegmenttxmap> noduplicates = PGNsegmentMapLists.Distinct();

I am not getting any error but I have no data in noduplicates
Member 10408451 10-Feb-14 6:31am View
   
Hi, I tried like below

for(int i=0;i<database.count;i++)
{
=""
="" pgnsegmentmaplists.add(new="" pgnsegmenttxmap(database1[i],="" database[i]));
="" ienumerable&lt;pgnsegmenttxmap=""> noduplicates = PGNsegmentMapLists.Distinct(new PGNsegmentTxMap(database1[i], database[i]));

}

But this is showing some error
Member 10408451 7-Feb-14 13:14pm View
   
Hi,
I tried like below but the open file dialog box is opening again and again when I press ok

private System.Windows.Forms.OpenFileDialog OpenFiles = new System.Windows.Forms.OpenFileDialog();
Member 10408451 5-Feb-14 3:43am View
   
The problem is not about getting details. How to write it into excel sheet(row)
I debug my code and checked it and the details are already there.
But I need to know how to write string array into excel row
Member 10408451 20-Jan-14 13:09pm View
   
I am trying like below
CANTool frm1 = new CANTool();

string[] fileContents = Run.ReadingLogFile(frm1.txtDataLogFile.Text);
I am getting error like below
A field initializer cannot reference the non-static field, method, or property 'SCANLA.GatewayMessages.frm1'
Member 10408451 20-Jan-14 9:41am View
   
Hi,
I tried as you said.
I am getting error saying
Error 1 'SCANLA.CANTool.txtDataLogFile' is inaccessible due to its protection
level
Error 2 An object reference is required for the non-static field, method, or property 'SCANLA.CANTool.txtDataLogFile'


Can you please tell me what is this error and how can I delete this protection of the form
Member 10408451 16-Jan-14 7:15am View
   
FIRST LOOP SAME MESSAGE ID AND ANY BUS COLOR(RED,YELLOW,GREEN,ORANGE)
IF FIRST LOOP IS RED COLOR
2ND LOOP SAME MSG ID AND ANY COLOR OTHER THAN RED
2ND LOOP IS YELLOW
3RD LOOP SAME MSG ID AND ANY COLOR OTHER THAN RED,YELLOW
3RD LOOP IS GREEN
4TH LOOP SAME MSG ID AND ANY COLOR OTHER THAN RED,YELLOW,GREEN(ORANGE)
SAVE THEM INTO A LIST
Member 10408451 16-Jan-14 3:47am View
   
Yes I posted it

In each for loop I need to leave the color detected in previous loop and check for other colors

How can I do it
Member 10408451 9-Jan-14 5:25am View
   
Hi,

I have 5 classes which are using the same constructor

List<msgidgatewaytimemap> GatewayTimeRYlist = new List<msgidgatewaytimemap>();
List<msgidgatewaytimemap> GatewayTimeYGlist = new List<msgidgatewaytimemap>();
List<msgidgatewaytimemap> GatewayTimeGRlist = new List<msgidgatewaytimemap>();
List<msgidgatewaytimemap> GatewayTimeGOlist = new List<msgidgatewaytimemap>();
List<msgidgatewaytimemap> GatewayTimeORlist = new List<msgidgatewaytimemap>();

How can I add all of them to a single class
List<msgidgatewaytimemap> lsdfinal = new List<msgidgatewaytimemap>();

So, that I can return this lsdfinal list class instead of returning each class
Member 10408451 4-Jan-14 7:11am View
   
Hi,
How can I check this condition is true or false in the interval of f
if (CANMsgIdList[p].MsgId != CANMsgIdList[f].MsgId)
Member 10408451 4-Jan-14 6:17am View
   
yes my iteration should go from(i+1)(i+2) and so on to (k-1)
if any of f(string) in the interval eaual to p(string) then I need to do something
I am trying like this which is not working
if (CANMsgIdList[p].MsgId == CANMsgIdList[f].MsgId.Any())
Member 10408451 4-Jan-14 6:03am View
   
Hi karthik
I updated my question now
please check it
Member 10408451 3-Jan-14 11:59am View
   
Hi,
I am trying something ike this
for (int m = 0; m < CANBusRedDetails.CANBusMsgIDList.Count; m++)
{

for (int n = 0; n < CANBusYellowDetails.CANBusMsgIDList.Count; n++)
{

if(CANBusRedDetails.CANBusMsgIDList[m]=CANBusYellowDetails.CANBusMsgIDList[n])

}
}
I am getting error like below
Cannot convert type 'string' to 'bool'
Member 10408451 3-Jan-14 11:18am View
   
Hi,

I am trying to write a method like below to compare common objects of common classes
My input parameters are both list strings of same name. So,it is showing some error

The parameter name 'CANBusMsgIDList' is a duplicate


private List<string> ReturnCommonCANMsgIds(List<string> CANBusMsgIDList, List<string> CANBusMsgIDList)
{

}
Member 10408451 3-Jan-14 9:38am View
   
ok,thank you for your suggestions
I have arguments in my constructor which I am not passing
Now I solved the problem
Member 10408451 3-Jan-14 8:36am View
   
I tried to use new keyword but showing some error like
does not contains a constructor that takes 0 arguments
Member 10408451 3-Jan-14 8:35am View
   
I tried it
this does not solve my problem
Member 10408451 2-Jan-14 13:15pm View
   
Hi,
I am reading log file using Readalllines
After that I am using constructor with 3 objects to separate MsgId,timestamps and Buses(Red,Yellow,Green)
The above code gives the common MsgIds of Red and Yellow buses
In the data example I shown you contains same MsgID of green Bus in between. So,I need to avoid those types of MsgIDs.
Member 10408451 29-Dec-13 10:58am View
   
Hi,

The exact problem is, there are lot of MsgIds on YellowBus which matches with same MsgId on RedBus and timeStamp value greater than timeStamp value of RedBus

But I need to choose the message on YellowBus with same MsgId and the nearest one regarding timeStamp value (For example if 2 or 3 MsgIds matches with the MsgIds of RedBus then I need to choose the message with timestamp greater than timestamp value of RedBus and small among other timeStamp values)

I am able to give condition to choose same MsgId on YellowBus and timeStamp value greater than RedBus timeStamp value with the following code


if ((CANMsgIdList[j].Bus).Equals(ConsoleApplication13.Buses.CANBusYellow) && (CANMsgIdList[i].MsgId == CANMsgIdList[j].MsgId) && (CANMsgIdList[i].TimeStamp > CANMsgIdList[j].TimeStamp))

But I am not able to choose nearest one among timeStamps to RedBus timeStamp values


Member 10408451 29-Dec-13 4:46am View
   
Hi,
I need to compare enum values with object of constructor.
if ((i < (index - 1)) && CANMsgIdList[i+1].Bus == "CANBusYellow")

But I am getting error like this
Operator "==" cannot be applied to 'scanla.Buses' and 'string'
Member 10408451 28-Dec-13 10:12am View
   
No, myArr1 is not numerical data. It contains strings
But myArr2 contains numerical data. It contains double values.
ArrayList myArr2= new ArrayList();

I am giving the condition below
if ((i < (index - 1)) && myArr1[i + 1] == "CANBusYellow")

if ((i < (index - 1)) && myArr1[i + 1] == "CANBusYellow")

when it is true I need to subtract the corresponding elements of 2nd array list(myArr2)

I tried without converting 2nd array to string array.
Then I got error like this
Error 1 Operator '-' cannot be applied to operands of type 'object' and 'object'

So, I tried converting to string
Can you suggest something about this???
Member 10408451 25-Dec-13 17:37pm View
   
for (int m = 0; m < CANMsgIdList.Count; m++)
{

if ((CANMsgIdList[m].MsgId) == fieldFromDB)

arrList1.Add(CANMsgIdList[m].TimeStamp);
arrList2.Add(CANMsgIdList[m].Bus);

}
Member 10408451 23-Dec-13 9:29am View
   
Deleted
sorry about that. I modified my question and added my code to my question above
Member 10408451 22-Dec-13 22:55pm View
   
Hi,
fileContents = File.ReadAllLines(seclogPath1);
string[] lineWords = (fileContents[Index].Trim()).Split(spaceSeperator, StringSplitOptions.RemoveEmptyEntries);

I am using the above lines of code to read the data and to split and save my data into string array.

But that data starts with "//" is not present in this

For example:
// PGN=EF00 SA=B DA=FA
How can I read this data???
Member 10408451 22-Dec-13 22:01pm View
   
Hi,
This code is working fine, I can see all the lines of data on Console.
But how can I make use of the information in commented lines
Member 10408451 22-Dec-13 10:53am View
   
Hi,
I tried this. But his code is reading only first line of my log file
I am getting something like this on console
// version 7.6.0
// Trigger number =1
Member 10408451 20-Dec-13 7:15am View
   
Hi thanks for your reply
CANMsgIdList[0],CANMsgIdList[2],CANMsgIdList[3]...etc gives me the data of different lines of log file but not the individual arguments
But how can I access individual argument
Member 10408451 19-Dec-13 4:56am View
   
Hi,
I tried something like this
But still getting null exception

try
{

workTable.Columns.Add(lineWords[2].TrimEnd('x'));
}
catch (System.Data.DuplicateNameException)
{
ColumnName.Append(" ");

}
Member 10408451 19-Dec-13 4:19am View
   
Hi,
Yes, you are correct

This is the content of log file I am reading

date Mon Aug 19 05:41:35 pm 2013
base hex timestamps absolute
no internal events logged
// version 7.6.0
// PGN=EF00 SA=B DA=FA
157.692673 1 18EFFA0Bx Rx d 8 01 00 13 DC 00 00 00 00 Length = 282000 BitCount = 145
// PGN=EF00 SA=B DA=FA
157.693679 1 18EFFA0Bx Rx d 8 02 00 00 00 00 00 00 00 Length = 286000 BitCount = 147
// PGN=F004 SA=0 DA=FF EEC1_E
157.693954 1 CF00400x Rx d 8 F4 A8 A9 92 23 FF FF A8 Length = 266000 BitCount = 137
// PGN=EF00 SA=B DA=FA
157.694670 1 18EFFA0Bx Rx d 8 02 00 09 FB 00 00 00 00 Length = 280000 BitCount = 144
// PGN=0 SA=B DA=0 TSC1_100_ABM_REX
157.694968 1 C00000Bx Rx d 8 FC FF FF 7D FF FF FF FF Length = 286000 BitCount = 147
// PGN=FE6C SA=EE DA=FF TCO1_TCO
157.695589 2 CFE6CEEx Rx d 8 4B 02 C0 C5 19 2D 30 59 Length = 262000 BitCount = 135
// PGN=EF00 SA=B DA=FA
157.695670 1 18EFFA0Bx Rx d 8 03 00 09 FB 0D 43 00 29 Length = 272000 BitCount = 140
// PGN=F002 SA=3 DA=FF ETC1_HMS
157.695947 1 CF00203x Rx d 8 CD A4 2C FF FD AE 23 03 Length = 268000 BitCount = 138
// PGN=EF00 SA=B DA=FA
157.696673 1 18EFFA0Bx Rx d 8 03 00 00 53 00 00 00 00 Length = 282000 BitCount = 145
// PGN=F004 SA=0 DA=FF EEC1_E
157.697610 2 CF00400x Rx d 8 F4 A8 A9 92 23 FF FF A8 Length = 266000 BitCount = 137
// PGN=F004 SA=0 DA=FF EEC1_E
157.697611 3 CF00400x Rx d 8 F4 A8 A9 92 23 FF FF A8 Length = 266000 BitCount = 137
// PGN=F004 SA=0 DA=FF EEC1_E
157.697650 4 CF00400x Rx d 8 F4 A8 A9 92 23 FF FF A8 Length = 266000 BitCount = 137
// PGN=F01D SA=27 DA=FF SAS_K
157.697745 1 18F01D27x Rx d 8 FF FE FE FF FF FE FF 71 Length = 274000 BitCount = 141
// PGN=F01D SA=27 DA=FF SAS_K
157.698014 4 18F01D27x Rx d 8 FF FE FE FF FF FE FF 71 Length = 274000 BitCount = 141
// PGN=F01D SA=E4 DA=FF SAS_Prop_SIU
157.698958 5 8F01DE4x Rx d 8 FF FF 3F 00 0D E7 01 F2 Length = 274000 BitCount = 141
// PGN=FFB1 SA=1E DA=FF CUVInformation_V
157.699876 2 18FFB11Ex Rx d 8 00 00 01 30 FD FF D0 00 Length = 278000 BitCount = 143
// PGN=FF80 SA=27 DA=FF DLN1_K
157.700177 1 CFF8027x Rx d 8 0C FA 00 FF F0 FF FF FF Length = 278000 BitCount = 143
// PGN=FE6C SA=EE DA=FF TCO1_TCO
157.700181 3 CFE6CEEx Rx d 8 4B 02 C0 C5 19 2D 67 5A Length = 262000 BitCount = 135
// PGN=FE6C SA=EE DA=FF TCO1_TCO
157.700226 4 CFE6CEEx Rx d 8 4B 02 C0 C5 19 2D 67 5A Length = 262000 BitCount = 135
// PGN=EF00 SA=B DA=FA
157.700719 1 18EFFA0Bx Rx d 8 00 00 74 8B 74 5E 73 0C Length = 268000 BitCount = 138


I need to separate the data and save into data table even though it is duplicate. How can I solve this problem
Member 10408451 16-Dec-13 6:59am View
   
Hi,thank you for your reply.
Now I need to check that fieldFromDB2 is in liststring or not??
How can I do this??
if(fieldFromDB2=liststring)
//do something
Member 10408451 15-Dec-13 14:42pm View
   
Deleted
what type of tags I need to use for syntax highlighting
strucking means I have done until some part of what I need to do
Yup after that I am struggling
I tried to assign all the common msgIds of 3 excel sheet columns into list string
But I am getting error like
Cannot implicitly convert type 'string' to 'System.Collections.Generic.List<string>'
Member 10408451 15-Dec-13 13:21pm View
   
Hi,

Yes I use tags round my code
Member 10408451 10-Dec-13 9:11am View
   
Hi,
I tried like this by using casting

xlWorkSheet1.Cells[i, 5] = Convert.ToInt32(row[13]) + Convert.ToInt32(row1[13]);
It is working fine, but giving integer values. But I have floating point values
I am trying like this
xlWorkSheet1.Cells[i, 5] = (float)(row[13]) + (float)(row1[13]);
which is not working
Member 10408451 29-Nov-13 10:42am View
   
Hi,

Thank you for your reply. This is working fine.

I need to extract the column of the data table if the string of the row matches with GW

How this can be done???
Member 10408451 29-Nov-13 8:18am View
   
Hi,

Thanks for your reply.This is for filling the datasets.
But how does a method returns the datasets???

return dataSet1;
return dataSet2;
return dataSet3;

No it wont works

It will show unreachable code???


Thanks
John
Member 10408451 29-Nov-13 7:07am View
   
Hi,
there are so many types of select commands in c# like

OleDbDataAdapter command = new OleDbDataAdapter("Select * From [" + listSheetNames[0] + "]", connection);

command = new OleDbCommand("SELECT * FROM Customers " +"WHERE Country = ? AND City = ?", connection);

But where they are defined???

where is customer???

How it is retrieving data from customer
Member 10408451 29-Nov-13 3:05am View
   
Hi,
I am still getting a exception error at this line adapter1.Fill(t); like below
Fill:SelectComand.Connection property has to be initialized
Member 10408451 28-Nov-13 10:04am View
   
No matter. I want to learn something that helps me.
Member 10408451 28-Nov-13 10:02am View
   
And I have one more doubt. Is there any capacity for dataset to store values. Because I am thinking that my excel file is having large data and so it is not saving every thing to data table. Can you comment on this?. My code is working for small data excel files.
Member 10408451 28-Nov-13 9:59am View
   
I am new to c#. I do not know how to debug code and I tried to debug it. But I do not understand what is going on there
Member 10408451 28-Nov-13 5:20am View
   
Yes, you are correct. But I am trying to use debugging to understand the code at the line
connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);

It is showing different parameters in OleDbSchemaGuid.Tables

what does these represents???


Thanks
John
Member 10408451 27-Nov-13 6:50am View
   
Hi,

You can see the below link for the input data of excel file

I need to separate the common IDs in all 3 rows
http://www.dreamincode.net/forums/topic/334987-how-to-convert-dataset-to-list/page__p__1938240__fromsearch__1&#entry1938240
Member 10408451 27-Nov-13 5:04am View
   
I have a method to which I am pasing the values(strings).

I need to pass different values to the same method.

When I am trying to do the same, it is showing some error of overloading.

How can I solve this problem??
Member 10408451 26-Nov-13 7:48am View
   
This is the code to read a excel file and save the data of one excel file into data table.
I need to read multiple excel files and compare particular data in the excel files.
How can I do that?
Member 10408451 21-Nov-13 10:18am View
   
These are the 3 errors it is showing to me
Member 10408451 21-Nov-13 10:17am View
   
The type or namespace name 'Worksheet' could not be found (are you missing a using directive or an assembly reference?)
Member 10408451 21-Nov-13 10:17am View
   
The type or namespace name 'Spreadsheet' could not be found (are you missing a using directive or an assembly reference?)
Member 10408451 21-Nov-13 10:16am View
   
The type or namespace name 'Bytescout' could not be found (are you missing a using directive or an assembly reference?)
Member 10408451 18-Nov-13 9:27am View
   
Error is at 71,74,77,80 and all are same errors