Search Results

Search found 171 results on 7 pages for 'jl'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • How to create a login with struts2 and ldap?

    - by jl
    Hi, I need to create a login and account validation using struts 2 and ldap, so the flow would be: Display login page User inputs his username and password Validates user's existence in ldap Redirect to welcome page with message and user's name How should I get it done in Struts 2 and Ldap? Thank you.

    Read the article

  • C# DateTime, is this method regional setting safe?

    - by JL
    I am using the following method to serialize a date as a string private const string DateFormatString = "dd.MM.yyyy HH:mm:ss"; string LastsuccessfuldownloadDateTime = DateTime.Now.AddDays(-91).ToString(DateFormatString); Is this the safest way to ensure that the string always gets serialized in this format?

    Read the article

  • Most reliable split character

    - by JL
    Update If you were forced to use a single char on a split method, which char would be the most reliable? Definition of reliable: a split character that is not part of the individual sub strings being split.

    Read the article

  • C# Linq - Cannot implicitly convert IEnumerable<string> to List<string>

    - by JL
    I have a List defined like this : public List<string> AttachmentURLS; I am adding items to the list like this: instruction.AttachmentURLS = curItem.Attributes["ows_Attachments"].Value.Split(';').ToList().Where(Attachment => !String.IsNullOrEmpty(Attachment)); But I am getting this error: Cannot implicitly convert IEnumerable to List What am I doing wrong?

    Read the article

  • Is there a way to set a DLL to always follow CultureInfo.InvariantCulture by default, if not specifi

    - by JL
    I have a lot of code in a class library that does not specify CultureInfo.InvariantCulture. For example in toString operations, toBool, toInt, etc. Is there a way I can get set a property for the class library to always execute using CultureInfo.InvariantCulture, even if it is not explicitly specified everywhere in the code? Sort of like a global switch? It is not only messy to have to explicitly type it everytime, it makes my code less readable, and is a royal pain for example: if (Convert.ToInt16(task.RetryCount, CultureInfo.InvariantCulture) < Convert.ToInt16(ConfigurationManager.AppSettings["TasksMaxRetry"], CultureInfo.InvariantCulture))

    Read the article

  • How to check duplicates for 5 textfields with PHP?

    - by jl
    Hi, I have 5 textfields for user input in a form namely: username1, username2, username3, username4 and username5 I would like to know how should I write my php code such that I will be able to check if there is any duplicates between the 5 textfields during POST? I can only think of comparing (username1 !== username2) and so on, but I think there should be simpler way to do it right? How should I be able to do it? Thank you very much.

    Read the article

  • C#, how to halve a byte array?

    - by JL
    I have a byte array defined like this byte[] fileContents = File.ReadAllBytes(zfoFileName); How can I get the first 1/2 of the fileContents byte array? In other words if the upper bound of the array is 10, I would like a new byte array to have the first 5 values of fileContents. Thanks in advance

    Read the article

  • How exactly can Python compliment your C# skills for windows based development?

    - by JL
    I'm looking for a fun challenge, and am thinking about learning Python. I've heard really good things about the language. My question is, how (if at all) can Python compliment the skills of a typical C# developer working mainly with MS technologies on a Windows Platform. Some examples of typical C# dev on windows would be (SOA applications, web applications, windows services, automation, xml handling) Surely there must be some scenarios where knowing Python would help you get certain tasks done quicker or more efficiently than using traditional C# / MS technologies. If you know of any specific scenarios, then please share. And lastly should this question be a community wiki?

    Read the article

  • C#, why does Convert.ToBoolean("0") fail?

    - by JL
    I know that trying to convert string "0" to boolean will fail, I also know how to fix this, thanks to Jon Skeets answers on other questions. What I would like to know is WHY does C# not recognise "0" as a valid input for a boolean conversion, surely you could look at it like 0 = false, 1 = true, or even -1 = false and 0 = true, anyways, my logic tells me that it could be a valid input, so is there a very good reason why its not? My bet is old vb6 would be able to recognize the string input "0" as valid.

    Read the article

  • Outlook 2007 plugin

    - by JL
    I am about to embark on my first outlook 2007 plugin. I would like to create a new tool bar that will have a button that will initially be disabled. When the user selects a message the button should be enabled... but only if the email is of a certain type of email... This is where I need your expert advice, is there a way to quickly flag an email in outlook, so that in the email select event you can look for a property of that email... for example... on_select if mail.type = "FromISP" then I would prefer not to use the from field.... the other thing is during the send process I need to set the flag, I am doing this again using .net so I have full control over how the mail is created. Any ideas would help... Thanks

    Read the article

  • Full automatic application trace for .net v4

    - by JL
    I would like to implement a way to trace every line of code in an application that is written for .net v4.0. An example would be. If I had the following function. private bool hasValue(string value) { if(string.isnullorempty(value) { return false; } else { return true; }} Then when the function is called I want detailed trace logs to contain something like this: Function called |Line 10 |Signature private bool hasValue(string value)|ValuesPassed hasValue("") Line Evaluated | Line 11 | if(string.isnullorempty(value) |ValuesPassed if(string.isnullorempty("") - evaluation returned true entered line 13 |signature return false|return action taken. This tracing can be done manually, but its a lot of work, and would dirty the code. Isn't there a way to get this level of tracing automatically with .net or 3rd party plugin? Thank you

    Read the article

  • C# Possible to have a generic return type?

    - by JL
    Here is a typical function that returns either true/false; private static bool hasValue() { return true; } Now on an error, I would like to return my own custom error object with definition: public class Failure { public string failureDateTime { get; set; } public string failureReason { get; set; } } I would have expected to be able to throw this custom object for example... private static bool hasValue() { throw new Failure(); } This is not possible, and I don't want to derive Failure from System.IO.Exception because of the inability to serialize an exception in C#. What is the best practice / or ideal solution to this problem. Should I just work with private static object? Or is there a cleaner way to return a custom object or bypass the typical return type on an error (not using System.IO.Exception)? Not entirely wild about object either, because then I need to cast the result and validate it by more boolean logic.

    Read the article

  • C# how to sort a list without implementing IComparable manually?

    - by JL
    I have a fairly complex scenario and I need to ensure items I have in a list are sorted. Firstly the items in the list are based on a struct that contains a sub struct. For example: public struct topLevelItem { public custStruct subLevelItem; } public struct custStruct { public string DeliveryTime; } Now I have a list comprised of topLevelItems for example: var items = new List<topLevelItem>(); I need a way to sort on the DeliveryTime ASC. What also adds to the complexity is that the DeliveryTime field is a string. Since these structs are part of a reusable API, I can't modify that field to a DateTime, neither can I implement IComparable in the topLevelItem class. Any ideas how this can be done? Thank you

    Read the article

  • Is it possible to remove folders from a web application build process in vs 2010?

    - by JL
    I had previously asked this question. At the time I was working with VS 2008. To restate the question. I have a web application that generates 1000's of small xml files in a certain directory. I would like to exclude this directory from the build process in visual studio 2010. With vs 2008 it was not possible. Has anything changed? Besides the general wait for VS to iterate through this directory with each build, it also strains my system resources, so I would like to exclude it from the project, but the dir and files need to physically exist on disk, because they are part of the application. Any OOB VS 2010 solutions, or any good workarounds? Thanks

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >