|
Wat - as an exclusive LOB developer who has not dipped into game development since the C64 reading the features of Farseer was ... Odd, I have no idea what most of the terms are referencing to. Interesting and if I had enough time to scratch myself I'd be tempted to have a look around
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Then I suggest you take a look at this web site (or his project page on CodeProject): www.andybeaulieu.com/
Andy has created something called "Physics Helper", giving a GUI for the physics engine. Very, very cool! I was actually going to use Physics Helper, Blend, and Silverlight, but as Silverlight is ot supported anymore I neededto investigate anew - hence this thread.
petter
|
|
|
|
|
Condition checking on like button of face book on page load
|
|
|
|
|
That post made no sense at all. I stopped short of calling it a question because it wasn't one.
|
|
|
|
|
|
|
Hi,
I am new to c#. I am reading the data from log file
And the outpur is as shown in the image.
Now I want to separate the messages of RED,YELLOW and GREEN message ID's into objects of common classes.
I am trying something like this in the following code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
using ConsoleApplication13;
namespace ConsoleApplication13
{
#region Buses
public enum Buses
{
CANBusRed = 1,
CANBusYellow = 2,
CANBusGreen = 3,
CANBusOrange = 4
};
#endregion
#region Member Variables
public static CANBusDetails CANBusRedDetails = null;
public static CANBusDetails CANBusYellowDetails = null;
public static CANBusDetails CANBusGreenDetails = null;
public static CANBusDetails CANBusOrangeDetails = null;
#endregion
public class CANBusDetails
{
public List<string> CANBusMsgIDList { get; set; }
}
public class CANBusMsgIdMap
{
string msgId;
public Buses Bus { get; set; }
public string MsgId
{
get
{
if (!String.IsNullOrEmpty(msgId))
return msgId.ToUpper();
else
return string.Empty;
}
set { msgId = value; }
}
public CANBusMsgIdMap(Buses bus, string msgId)
{
this.Bus = bus;
this.msgId = msgId;
}
public override string ToString()
{
return this.Bus + ", " + this.msgId;
}
}
class Program
{
static void Main(string[] args)
{
string[] fileContents = null;
List<CANBusMsgIdMap> CANMsgIdList = new List<CANBusMsgIdMap>();
String seclogPath1 = @"\\global.scd.scania.com\home\se\121\valhbc\Desktop\log files\1302_P3\logg2.asc";
fileContents = File.ReadAllLines(seclogPath1);
for (int Index = 0; Index < fileContents.Length; Index++)
{
string CANMsgId = string.Empty;
string[] spaceSeperator = new string[] { " " };
string[] lineWords = (fileContents[Index].Trim()).Split(spaceSeperator, StringSplitOptions.RemoveEmptyEntries);
if (lineWords.Length < (2 + 1))
continue;
if (lineWords[2].EndsWith("x"))
CANMsgId = lineWords[2].TrimEnd('x');
else
continue;
if (Regex.IsMatch(CANMsgId, @"^[0-9A-Fa-f]+$"))
{
Buses CANBus = (Buses)Enum.Parse(typeof(Buses), (lineWords[1]));
CANMsgIdList.Add(new CANBusMsgIdMap(CANBus, CANMsgId));
}
}
#region Copy Distinct CAN Message IDs
if(CANBusRedDetails != null)
CANBusRedDetails.CANBusMsgIDList = ReturnDistinctCANMsgIds(Buses.CANBusRed, CANMsgIdList);
if (CANBusYellowDetails != null)
CANBusYellowDetails.CANBusMsgIDList = ReturnDistinctCANMsgIds(Buses.CANBusYellow, CANMsgIdList);
if (CANBusGreenDetails != null)
CANBusGreenDetails.CANBusMsgIDList = ReturnDistinctCANMsgIds(Buses.CANBusGreen, CANMsgIdList);
if (CANBusOrangeDetails != null)
CANBusOrangeDetails.CANBusMsgIDList = ReturnDistinctCANMsgIds(Buses.CANBusOrange, CANMsgIdList);
#endregion
private List<string> ReturnDistinctCANMsgIds(Buses bus, List<CANBusMsgIdMap> CANMsgIdList)
{
return (from CANBusMsgIdMap busIdMap in CANMsgIdList
where busIdMap.Bus == bus
select busIdMap.MsgId).Distinct().ToList();
}
}
}
}
I am using Distinct()method to separate messages and ToList() to list them into list<string>.
I defined List<string> for CANBusMsgIDList and defined objects of comon classes for CANBusRedDetails,CANBusYellowDetails,CANBusGreenDetails.
Now I am getting error at defining objects of common classes.
Can anyone help me in solving this problem
Thanks
John
|
|
|
|
|
public static CANBusDetails CANBusRedDetails = null;
The above line and its companions are outside of either of your classes, so will prevent the compilation from succeeding.
It would be much more helpful if you provided full details of the error that you receive.
Veni, vidi, abiit domum
|
|
|
|
|
Hello. I'm trying to convert HTML to PDF using BioPDF and printhtml.exe in C#.
I set print's settings each time, so I used runonce.ini - settings file, where I set output PDF - file, no preview, no "Show settings" - dialog and other settings. So, each time I saved the settings - file.
But when I tried with multiple convertion (multithreading, when I start multiple requests at the same time) - only the first request using my settings and other settings, BioPDF using global settings (in global.ini). I think that first thread "lock" the file and other can't write in it.
I read in the BioPDF documentation (below the table) that bioPDF allow multiple conversions, when we set file's name after "runonce" in settings - file's name. But which file? Input HTML?
If I tried "runonce_1234-223F344G-3442GGRY-656S.ini" (because names of my files are GUIDS), BioPDF don't use this settings file and read from global.ini.
Can some of you have more information about it, or examples with multithreading?
I can show you my code.
Thanks.
|
|
|
|
|
I think your best source of information for this question, since it's related to very specific functionality of a library, is the maker of that library.
This[^] is the only link that offers any kind of support for it that I could find.
|
|
|
|
|
Hi, Dave.
I wrote them, but they didn't answer me...
|
|
|
|
|
Patience grasshopper, 11 hours only, they may not be on the same part of the planet as you. Or they may be slack but you need to give them at least 24hrs to respond.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I wrote them (to BioPDF) a few days ago, not yesterday... I wait a few days, but without answer, so I wrote you here for help...
|
|
|
|
|
Bulgarin wrote: I wait a few days, but without answer
A serious sign where you might want to consider to change the library you are using.
|
|
|
|
|
You're right, but I use BioPDF and printhtml.exe, because with them I can using my Internet Explorer settings when convert HTML to PDF. I didn't find other libraries with this "option".
|
|
|
|
|
I can understand that you have your reasons for using BioPDF - I was just suggesting that poor customer support is the first indicator of a production becoming bad, at least it will sooner or later.
Veni, vidi, caecus
|
|
|
|
|
|
|
I seriously doubt anyone is going to run and debug your program for you. People normally get paid for stuff like that.
I will not be snarky.
I will not be snarky.
I will not be snarky.
The difficult we do right away...
...the impossible takes slightly longer.
modified 16-Nov-13 17:50pm.
|
|
|
|
|
|
Don't be abusive.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I'm not.. I don't understand your post if you don't try to help. I'm really not interested if someone is paid to run a program or not.. I had a question regarding a problem, you can help or not..
|
|
|
|
|
It's not a smartass answer. What exactly is it you're requesting? That someone debug the program for you?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Someone show me what can I change so my program won't connect more than 2 points, because I'm stuck for 4 days now
|
|
|
|
|
I'm sorry. Let me help you by saying that you need to ask a more specific question than simply, "Why doesn't my program work?"
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|