Search Results

Search found 9 results on 1 pages for 'crimsonx'.

Page 1/1 | 1 

  • CruiseControl.Net Publisher email failing to send e-mail

    - by CrimsonX
    So here's my problem: I cannot seem to be able to configure CruiseControl.NET to send out an e-mail to me when a build occurs. I copied the example from the documentation and filled it in with my own values. http://confluence.public.thoughtworks.org/display/CCNET/Email+Publisher Here's the relevant section of ccnet.config below <publishers> <merge> <files> <file>C:\Build\Temp\*.xml</file> </files> </merge> <xmllogger logDir="buildlogs" /> <statistics> <statisticList> <statistic /> </statisticList> </statistics> <email includeDetails="TRUE" mailhostUsername="user" mailhostPassword="password" useSSL="TRUE"> <from>[email protected]</from> <mailhost>mail.mycompanysmtpserver.com</mailhost> <users> <user name="MyName Lastname" group="buildmaster" address="[email protected]" /> </users> <groups> <group name="buildmaster"> <notifications> <notificationType>Always</notificationType> </notifications> </group> </groups> <modifierNotificationTypes> <NotificationType>Failed</NotificationType> <NotificationType>Fixed</NotificationType> </modifierNotificationTypes> <subjectSettings> <subject buildResult="StillBroken" value="Build is still broken for {CCNetProject}" /> </subjectSettings> </email> </publishers> I have had a successful CruiseControl.NET server configured for some time, and it successfully updates people through CCTray, but I need to add e-mail support as well. I've already looked at the relevant StackOverflow articles like this one and many more and tried my hand at googling the solution but I dont know what I could be doing wrong. The only other thing that I'd like to validate is that I can send/receive e-mails using my username/password with the SMTP server I received from IT (my mail works properly) but I just followed the steps on testing an SMTP server here and everything looks fine http://support.microsoft.com/kb/153119 Anyone have any ideas as to why I'm getting this problem, or how to troubleshoot it further?

    Read the article

  • LINQ: How to Use RemoveAll without using For loop with Array

    - by CrimsonX
    I currently have a log object I'd like to remove objects from, based on a LINQ query. I would like to remove all records in the log if the sum of the versions within a program are greater than 60. Currently I'm pretty confident that this'll work, but it seems kludgy: for (int index = 0; index < 4; index++) { Log.RemoveAll(log => (log.Program[index].Version[0].Value + log.Program[index].Version[1].Value + log.Program[index].Version[2].Value ) > 60); } The Program is an array of 4 values and version has an array of 3 values. Is there a more simple way to do this RemoveAll in LINQ without using the for loop? Thanks for any help in advance!

    Read the article

  • Floating Point Arithmetic - Modulo Operator on Double Type

    - by CrimsonX
    So I'm trying to figure out why the modulo operator is returning such a large unusual value. If I have the code: double result = 1.0d % 0.1d; it will give a result of 0.09999999999999995. I would expect a value of 0 Note this problem doesn't exist using the dividing operator - double result = 1.0d / 0.1d; will give a result of 10.0, meaning that the remainder should be 0. Let me be clear: I'm not surprised that an error exists, I'm surprised that the error is so darn large compared to the numbers at play. 0.0999 ~= 0.1 and 0.1 is on the same order of magnitude as 0.1d and only one order of magnitude away from 1.0d. Its not like you can compare it to a double.epsilon, or say "its equal if its < 0.00001 difference". I've read up on this topic on StackOverflow, in the following posts one two three, amongst others. Can anyone suggest explain why this error is so large? Any any suggestions to avoid running into the problems in the future (I know I could use decimal instead but I'm concerned about the performance of that).

    Read the article

  • DataType for storing a long serial number (10 bytes)

    - by CrimsonX
    We have a device which has a 10 byte serial number which must be read into our application and stored into a .net datatype. In the device it is stored as an unsigned 10-byte (80-bit) number. I don't expect we will be performing any mathematical operations on this number, but only displaying it to the user. The .NET framework doesn't have a built in UNIT128 to store this datatype. My suggestion for storing this datatype is to create a 10 element byte array and read in the data into this array. Are there any better solutions to this problem? Note: I have seen in this question that a GUID is a 128 byte signed integer, but it seems like a bad idea to use a GUID in this fashion. Any other suggestions?

    Read the article

  • How to properly translate the "var" result of a lambda expression to a concrete type?

    - by CrimsonX
    So I'm trying to learn more about lambda expressions. I read this question on stackoverflow, concurred with the chosen answer, and have attempted to implement the algorithm using a console app in C# using a simple LINQ expression. My question is: how do I translate the "var result" of the lambda expression into a usable object that I can then print the result? I would also appreciate an in-depth explanation of what is happening when I declare the outer => outer.Value.Frequency (I've read numerous explanations of lambda expressions but additional clarification would help) C# //Input : {5, 13, 6, 5, 13, 7, 8, 6, 5} //Output : {5, 5, 5, 13, 13, 6, 6, 7, 8} //The question is to arrange the numbers in the array in decreasing order of their frequency, preserving the order of their occurrence. //If there is a tie, like in this example between 13 and 6, then the number occurring first in the input array would come first in the output array. List<int> input = new List<int>(); input.Add(5); input.Add(13); input.Add(6); input.Add(5); input.Add(13); input.Add(7); input.Add(8); input.Add(6); input.Add(5); Dictionary<int, FrequencyAndValue> dictionary = new Dictionary<int, FrequencyAndValue>(); foreach (int number in input) { if (!dictionary.ContainsKey(number)) { dictionary.Add(number, new FrequencyAndValue(1, number) ); } else { dictionary[number].Frequency++; } } var result = dictionary.OrderByDescending(outer => outer.Value.Frequency); // How to translate the result into something I can print??

    Read the article

  • Object Design: How to Organize/Structure a "Collection Class"

    - by CrimsonX
    I'm currently struggling to understand how I should organize/structure a class which I have already created. The class does the following: As its input in the constructor, it takes a collection of logs In the constructor it validates and filters the logs through a series of algorithms implementing my business logic After all filtering and validation is complete, it returns a collection (a List) of the valid and filtered logs which can be presented to the user graphically in a UI. Here is some simplified code describing what I'm doing: class FilteredCollection { public FilteredCollection( SpecialArray<MyLog> myLog) { // validate inputs // filter and validate logs in collection // in end, FilteredLogs is ready for access } Public List<MyLog> FilteredLogs{ get; private set;} } However, in order to access this collection, I have to do the following: var filteredCollection = new FilteredCollection( secialArrayInput ); //Example of accessing data filteredCollection.FilteredLogs[5].MyLogData; Other key pieces of input: I foresee only one of these filtered collections existing in the application (therefore should I make it a static class? Or perhaps a singleton?) Testability and flexibility in creation of the object is important (Perhaps therefore I should keep this an instanced class for testability?) I'd prefer to simplify the dereferencing of the logs if at all possible, as the actual variable names are quite long and it takes some 60-80 characters to just get to the actual data. My attempt in keeping this class simple is that the only purpose of the class is to create this collection of validated data. I know that there may be no "perfect" solution here, but I'm really trying to improve my skills with this design and I would greatly appreciate advice to do that. Thanks in advance.

    Read the article

  • How can I access and change elements in this private readonly property?

    - by CrimsonX
    I'm trying to figure out how I am able to successfully change a "readonly" array. I have this: namespace ConsoleApplication1 { class Program { static void Main(string[] args) { MyClass myClass = new MyClass(); myClass.Time[5] = 5; // How is this legal? } } public class MyClass { private readonly uint[] time; public IList<uint> Time { get { return time; } } public MyClass() { time = new uint[7]; } } } As I Note above, I would expect that Time[5] would be illegal due to the fact that public IList Time does not have a setter. Additionally, how can I create an array in the constructor which is read-only and unchangeable outside of this class?

    Read the article

  • How to Embed/Link binary data into a C++ DLL

    - by CrimsonX
    So I have a Visual Studio 2008 project which has a large amount of binary data that it is currently referencing. I would like to package the binary data much like you can do with C# by adding it as a "resource" and compiling it as a DLL. Lets say all my data has an extension of ".data" and is currently being read from the visual studio project. Is there a way that you can compile or link the data into the .dll which it is calling? I've looked at some of the google link for this and so far I haven't come up with anything - the only possible solution I've come up with is to use something like ResGen to create a .resources file and then link it using AssemblyLinker with /Embed or /Link flags. I dont think it'd work properly though because I dont have text files to create the .resources files, but rather binary files themselves. Any advice?

    Read the article

  • How to create a generic C# method that can return either double or decimal?

    - by CrimsonX
    I have a method like this: private static double ComputePercentage(ushort level, ushort capacity) { double percentage; if(capacity == 1) percentage = 1; // do calculations... return percentage; } Is it possible to make it of a generic type like "type T" where it can return either decimal or double, depending on the type of method expected (or the type put into the function?) I tried something like this and I couldn't get it to work, because I cannot assign a number like "1" to a generic type. I also tried using the "where T :" after ushort capacity) but I still couldn't figure it out. private static T ComputePercentage<T>(ushort level, ushort capacity) { T percentage; if(capacity == 1) percentage = 1; // error here // do calculations... return percentage; } Is this even possible? I wasn't sure, but I thought this post might suggest that what I'm trying to do is just plain impossible.

    Read the article

1