Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
F

Furty

@Furty
About
Posts
165
Topics
23
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to convert this from VB.Net to C#? (lambdas)
    F Furty

    Judah Himango wrote:

    An alternative theory is that it should be Func<bool,t>, not Func<t,>. That is, it returns T, which might work for such comparisons at runtime.

    Only some of course, so that still wouldn't explain it :~ Still lost on this one. What I've done for now is ditch the method you see here all togeher and the "Compare" enum associated with it, and have replaced it with code that makes sense (well, to a C# guy) and compiles. I'd still love to find out whether the above example is just me missing the point on the conversion to c#, or whether it's an anomoly that allows really, really shaky VB code to compile.

    LINQ csharp tutorial question

  • Sorting problem with Linq
    F Furty

    Mr programboy wrote:

    I wanted to use "late binding" for the "order by" clause

    If the list is going to be data-bound in a WinForms UI, another option would be a SortableBindingList like the one illustrated here[^] - this has the added benefit of automatically giving the end-user re-sort capabilities at runtime without you touching a further line of code..

    LINQ database csharp sql-server linq sysadmin

  • Sorting problem with Linq
    F Furty

    Group By and Order By[^]

    LINQ database csharp sql-server linq sysadmin

  • linq to sql update
    F Furty

    Member 1416254 wrote:

    This statment works but I want to get the value of whatever the user inputted

    This statement combined with your code sample makes no sense I'm afraid.. In order to perform the update your code would have to know both the old and the new the company name to begin with, thus nothing new to discover. Try re-phrasing your question so we can understand :wtf:

    LINQ database csharp linq announcement

  • How to convert this from VB.Net to C#? (lambdas)
    F Furty

    This compiles in VB.Net:

    Protected Shared Function CombineFunc(Of T)(ByVal d1 As Func(Of T, Boolean), _
    ByVal condType As Compare, _
    ByVal d2 As Func(Of T, Boolean)) As Func(Of T, Boolean)

            'Return a delegate which combines delegates d1 and d2
            Select Case condType
                Case Compare.Or : Return Function(x) d1(x) Or d2(x)
                Case Compare.And : Return Function(x) d1(x) And d2(x)
                Case Compare.Xor : Return Function(x) d1(x) Xor d2(x)
                Case Compare.Equal : Return Function(x) d1(x) = d2(x)
                Case Compare.OrElse : Return Function(x) d1(x) OrElse d2(x)
                Case Compare.AndAlso : Return Function(x) d1(x) AndAlso d2(x)
                Case Compare.NotEqual : Return Function(x) d1(x) <> d2(x)
                Case Compare.LessThan : Return Function(x) d1(x) < d2(x)
                Case Compare.GreaterThan : Return Function(x) d1(x) > d2(x)
                Case Compare.LessThanOrEqual : Return Function(x) d1(x) <= d2(x)
                Case Compare.GreaterThanOrEqual : Return Function(x) d1(x) >= d2(x)
                Case Else
                    Throw New ArgumentException("Not a valid Condition Type", "condType")
            End Select
        End Function
    

    But my conversion to C# does not:

    protected static Func<T, bool> CombineFunc<T>(Func<T, bool> d1, Compare condType, Func<T, bool> d2)
    {
    //Return a delegate which combines delegates d1 and d2
    switch (condType)
    {

                    case Compare.Or:
                        return (x) => d1(x) | d2(x);
                    case Compare.And:
                        return (x) => d1(x) & d2(x);
                    case Compare.Xor:
                        return (x) => d1(x) ^ d2(x);
                    case Compare.Equal:
                        return (x) => d1(x) == d2(x);
                    case Compare.OrElse:
                        return (x) => d1(x) || d2(x);
                    case Compare.AndAlso:
                        return (x) => d1(x) && d2(x);
                    case Compare.NotEqual:
                        return (x) => d1(x) != d2(x);
                    case Compare.LessThan:
                        return (x) => d1(x) < d
    
    LINQ csharp tutorial question

  • PDF - Text Extractor
    F Furty

    Sure. First thing you'll need as PDF Library - a Google search should head you in the direction of the many commercial PDF libraries available for .Net. Second thing you'll need is some kind of parser. What's required there really depends on the PDF library you end up settling on. Some will have richer support for parsing out the data contained, and some won't, so bear this in mind when evaluating your options.

    C# help

  • URGENT : Help with parsing the PDF generated by Crystal reports-V9
    F Furty

    Paul Conrad wrote:

    vinoo80 wrote: I am looking for genuine answers. Good luck to you

    Aye. Especially on the CodeProject forums it seems! What ever happened to this place?

    C# help data-structures regex json announcement

  • accessing the system through public IP online & getting the sql database using c# through web applications
    F Furty

    There, I helped you out.

    C# database csharp help

  • PDF - Text Extractor
    F Furty

    manowj wrote:

    Is it possible to extract the text from pdf files

    Yes.

    C# help

  • Problem is "auto reply emails" [modified]
    F Furty

    It sounds like you need to be looking at the "In-reply-to" header of incoming messages, and comparing that to the "Message-id" of your outgoing mail. By matching the two and defining a time threshold between send and receive you should be able to detect auto-responders with reasonable accuracy. It would fair to assume that anything that arrives back within 10-15 minutes of sending would be an auto-responder - well, either that or someone who's way too stressed out, or hopped up on stims ;) The only real foreseeable problem is going to be receiving mail servers that delay incoming messages for n minutes/hours (an anti-spamming technique) - if delayed enough it's going to be difficult to ascertain if it's an auto-response or a human response in code.. Google around for "email message headers" for a grounding.

    modified on Tuesday, October 28, 2008 9:03 AM

    C# help question

  • Why *does* this work, and when will it *not* work? (Two-way MSMQ messaging using WCF)
    F Furty

    Meer Osman Ali wrote:

    Dude i was showing u the right path for programming

    Right. Gotcha. I had you pegged as a trolling wanker, but thanks for the confirmation!

    C# csharp wcf sysadmin security debugging

  • Why *does* this work, and when will it *not* work? (Two-way MSMQ messaging using WCF)
    F Furty

    The operative word there being try, of course. P.S. Do you always submit message board posts that make you sound like a total moron, or was this just an isolated instance?

    C# csharp wcf sysadmin security debugging

  • How to work with Windows message queue in C#.Net 2005?
    F Furty

    Google MSMQ - there's a ton of resources out there, here's some links to some CP articles: CP MSMQ Search[^]

    C# csharp sysadmin data-structures help tutorial

  • Why *does* this work, and when will it *not* work? (Two-way MSMQ messaging using WCF)
    F Furty

    I've been experimenting with various implementations of two-way communications using WCF over MSMQ, and without ever thinking it would work, tried the following:

    using System;
    using System.ServiceModel;

    namespace MessagingSample
    {
    [ServiceContract]
    public interface ISampleContract
    {
    [OperationContract(IsOneWay = true)]
    void StartDoingSomething(string someText, SampleClient client);
    }

    \[ServiceBehavior\]
    public class SampleClient
    {
        private ISampleContract workerService;
    
        public void StartClient(string server)
        {
            // Init the service instance
            EndpointAddress endpointAddress = new EndpointAddress(
                new Uri(string.Format(@"net.msmq://{0}/private/SampleQueue", server)));
    
            NetMsmqBinding clientBinding = new NetMsmqBinding();
            clientBinding.Security.Transport.MsmqAuthenticationMode = MsmqAuthenticationMode.None;
            clientBinding.Security.Transport.MsmqProtectionLevel = System.Net.Security.ProtectionLevel.None;
    
            ChannelFactory<ISampleContract> channelFactory =
                new ChannelFactory<ISampleContract>(clientBinding, endpointAddress);
            workerService = channelFactory.CreateChannel();
    
        }
    
        public void StopClient()
        {
            if (workerService != null)
            {
                workerService = null;
            }
        }
    
        public void StartDoingSomething(string text)
        {
            if (workerService != null)
            {
                workerService.StartDoingSomething(text, this);
            }
        }
    
        public void DoSomethingElse(string text)
        {
            System.Diagnostics.Debug.WriteLine(text);
        }
    }
    
    
    \[ServiceBehavior\]
    public class SampleServer : ISampleContract
    {
        private ServiceHost serviceHost = null;
    
        public void StartServer(string server)
        {
            Uri serviceUri = new Uri(string.Format(@"net.msmq://{0}/private/SampleQueue", server));
    
            NetMsmqBinding serviceBinding = new NetMsmqBinding();
            serviceBinding.Security.Transport.MsmqAuthenticationMode = MsmqAuthenticationMode.None;
            serviceBinding.Security.Transport.MsmqProtectionLevel = System.Net.Security.ProtectionLevel.None;
            serviceBinding.MaxReceivedMessageSize = 1024 \* 4096;
            serviceBinding.ReaderQuotas.MaxArrayLength = 1024 \* 4096;
    
    C# csharp wcf sysadmin security debugging

  • Moving large files, delayed write error in XP Pro SP2
    F Furty

    I cna't comment on the technicalities of why it might be failing, but I can suggest a workaround: TeraCopy[^] A gem of a utility IMHO

    System Admin help question

  • Anyone else having issues with ASP.Net on Server 2K3 after the latest MS security update?
    F Furty

    Well, it's not just us.. I got a skype call from an old sysad friend of mine who's got the exact same problem happening on 3 different continents since the last Server 2K3R2 update. In his case, installing and re-installing the .net runtimes fixed the issues he had, but this unfortunately doesn't work for us. He is running asp.net code on netfx v1.1, v2.0, v3.0 and v3.5, whereas *all* of our code is compiled against netfx v3.5 (i.e. 2.0 + extensions), so not the same config. However, we are now able to restore working service without rebooting by using NET STOP IISADMIN /Y followed by NET START W3SVC to force IIS to start over. I feel like I've just been time-warped 10 years into the past to the days of classic ASP and COM, *ugh* This still means the every website, web service and the ftp service have to be killed any time we want to make even the most *minor* change to any of our hosted apps (which is crap), but at least we're not going down for 2-3 minutes, and DNS and mail can continue to function throughout it all. Not a resolution, but at least a sloightly better work-around for us.

    System Admin csharp asp-net sysadmin security help

  • Anyone else having issues with ASP.Net on Server 2K3 after the latest MS security update?
    F Furty

    I woke up this morning to a freshly rebooted server thanks to an MS update, and all of the sudden xcopy deploying updates to any asp.net application (website or web service) results in *every* asp.net web application reporting a compile error. I tried editing the web.config (i.e. insert or delete some whitespace) in order to get asp.net to recompile/recache, but that only works 1/10 times. Deleting the entire asp.net cache doesn't even work. The only workaround I've found so far is a complete server reboot, which is, well, crap. Anyone else experiencing this, or is it just our server that's gone all whacky today?

    System Admin csharp asp-net sysadmin security help

  • Vista RTM ?
    F Furty

    Office 2007 is available on MSDN downloads now - anyone know when it went gold?

    The Lounge question

  • Virtual Company
    F Furty

    Well, I googled:

    karthik Tamizhmathi wrote:

    "Employees working from home can be 60% more productive than a regular conventional working culture".

    But couldn't find the article you were reading.. Got a link?

    The Lounge question

  • Free Database for .NET
    F Furty

    tyleray wrote:

    Can I use firebird like access? I mean If I develop a program with firebird database and If I wanna run this program on other computer do have to setup firebird?

    The docs are always a good place to start.. Read this[^]

    C# csharp database sysadmin question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups