User Profile

Collapse

Profile Sidebar

Collapse
Murdz
Murdz
Last Activity: Nov 22 '09, 10:42 PM
Joined: Aug 14 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Murdz
    replied to Binary Number Generation
    Yes I actually found that BigInteger datatype an hour or two after posting this and it does seem to solve the problem but thank you for your comment.
    See more | Go to post

    Leave a comment:


  • Murdz
    started a topic Binary Number Generation

    Binary Number Generation

    Hello.

    I want to be able to generate large binary numbers in C#, based on an integer, and later perform a bitwise operation on them - I'm talking being able to support numbers up to (and hopefully even beyond, just in case, 2^100)

    The basis is that I have a database table with roughly 70 rows, each row has a unique identity value (1, 2, 3, 4, etc) and from that ID I want to generate a matching binary number, something...
    See more | Go to post

  • Murdz
    started a topic Computed Binary Field

    Computed Binary Field

    Hello.

    I have a table with a primary key, identity value. In addition to some other fields I also have a computed field to generate a binary identifier for the row based on the identity value (eg. PK ID of 1 would generate a binary ID of 1 (Power(2, [1] -1) = 1), PK ID of 4 would generate a binary ID of 8 (Power(2, [4] - 1) = 8). The problem is that there are +70 rows in this table so the binary ID gets quite large - out of the scope...
    See more | Go to post

  • Murdz
    replied to IHttpHandler and Web Caching
    in .NET
    I think that's done it, forgot all about HttpRuntime.

    Thanks PRR.
    See more | Go to post

    Leave a comment:


  • Murdz
    started a topic IHttpHandler and Web Caching
    in .NET

    IHttpHandler and Web Caching

    Hello.

    I have a class implementing the IHttpHanlder interface within a Website project. Through this class I am able to access variables in the Session object and Application object that have been set through the website. I don't seem to be able, however, to access variables stored within the Cache object. I can't think of any reason for this. I know in order to access the Session variables I need to implement the System.Web.Sess ionState.IRequi resSessionState...
    See more | Go to post

  • Murdz
    started a topic (C#) Pass multiple enum values to function
    in .NET

    (C#) Pass multiple enum values to function

    Hi all,

    A constructor for System.Text.Reg ularExpressions .Regex includes a 2nd parameter for the RegexOptions enum. With this you can pass multiple RegexOptions as below:

    Code:
    System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex("PATTERN", System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace)
    My enum...
    See more | Go to post

  • Murdz
    started a topic Change Recovery Mode from Full to Simple

    Change Recovery Mode from Full to Simple

    Hello all,

    The HDD that holds the logs for one of our DB servers has run out of space (More has been ordered). Part of the reason for this is the log files have gotten rather large, as such the decision to drop the recovery mode of a few of the DB's to simple was reached. Daily differential backups are taken and this is enough for us at the moment. Now, what is the best practice way to change the recovery mode from Full to Simple?...
    See more | Go to post

  • A textarea should always be inside a <form> tag.
    See more | Go to post

    Leave a comment:


  • Murdz
    replied to .NET Caching and App Pools
    in IIS
    Interesting.

    Cheers kenobewan.
    See more | Go to post

    Leave a comment:


  • Murdz
    replied to .NET Caching and App Pools
    in IIS
    Cheers.

    The only other option that I can really think about, aside from reading some DB value (as the whole point of caching is to avoid DB calls) is to have a CacheDependency on a file and simply update that file through the admin system; thus the cache for the website will expire.
    See more | Go to post

    Leave a comment:


  • Murdz
    replied to .NET Caching and App Pools
    in IIS
    Double post, see below.
    See more | Go to post
    Last edited by Murdz; Mar 24 '08, 04:31 AM. Reason: Double post

    Leave a comment:


  • Murdz
    replied to .NET Caching and App Pools
    in IIS
    Thanks, I did read that but it didn't fully delve into what I was after. I have learnt, though, that this is not possible.

    Is there a way, then, of two different projects being able to manipulate the Cache items of one another? For example, say there is a .NET website and a .NET admin section for that website. The dream is to have the 2 as seperate projects so that a deploy of the website doesn't mean a deploy of the admin, and vice...
    See more | Go to post

    Leave a comment:


  • Murdz
    started a topic .NET Caching and App Pools
    in IIS

    .NET Caching and App Pools

    Hi,

    As far as .NET caching goes on IIS, if 2 .NET websites are in the same app pool can they access the same cache items (Using HttpContext.Cur rent.Cache) ? Or is this cache collection always seperate for each .NET application?

    Cheers
    See more | Go to post

  • Murdz
    replied to Multiple Queries vs Dataset
    Correct, but my question centred more around that one method only required one connection to the db to perform multiple queries; but it also meant that it was bringing back a bigger result set.

    So the question, really, is the time it takes to transform those multiple result sets into a datatable faster than using the mutiple db connections needed if they were returned as single result sets?
    See more | Go to post

    Leave a comment:


  • Murdz
    started a topic Multiple Queries vs Dataset

    Multiple Queries vs Dataset

    Hello all.

    I was wondering if there is much of a performance difference between multiple DB queries, which return a single datatable, vs a single query that returns multiple datatables.

    eg:

    Code:
    DataTable dt1 = "SELECT * FROM tbl"
    DataTable dt2 = "SELECT * FROM tbl2"
    DataTable dt3 = "SELECT * FROM tbl3"
    vs

    Code:
    DataSet
    ...
    See more | Go to post

  • Murdz
    started a topic Table Data from Name

    Table Data from Name

    Hi.

    Pulling back table information is easy enough;

    Code:
    SELECT * FROM information_schema.tables WHERE TABLE_NAME = 'pubs'
    However, I want a stored proc to be able to pull back all data from any table simply by passing the name of the table in. Aside from dynamically generating TSQL within the stored proc, is this possible?

    Cheers
    See more | Go to post

  • Murdz
    started a topic Reflection
    in .NET

    Reflection

    Aside from looking at a types namespace / assembly name; is there any way to distinguish if a class is .NET inbuilt or a custom one?

    Basically, I want a function that accepts an object as a parameter. Using reflection the properties of that object are iterated through and the resulting property names / values are added as SQL Stored Proc params. This is easy enough for the parameters in the original object... but if, say, one of those...
    See more | Go to post

  • Murdz
    replied to Conditional Return Type
    in .NET
    There are options using reflection, and even options to dynamically generate functions/classes.. but for my purposes I found using generics worked.

    It works the same as a list or dictionary, in which you specify the return type in the method call; for an example in a datalayer:

    Code:
            private List<T> SetReturnTypeObjects<T>(DataTable source)
            {
                List<T> returnList
    ...
    See more | Go to post

    Leave a comment:


  • Murdz
    replied to Conditional Return Type
    in .NET
    Yes but I didn't want to have to cast it everytime I call the function:

    Code:
    CustomClassA obj = DoStuff(typeof(CustomClassA));
    CustomClassB obj2 = DoStuff(typeof(CustomClassB));
    As opposed to:

    Code:
    CustomClassA obj = (CustomClassA)DoStuff(typeof(CustomClassA));
    I've seen it done with nhibernate. Basically it decides the return type at runtime.
    See more | Go to post

    Leave a comment:


  • Murdz
    started a topic Conditional Return Type
    in .NET

    Conditional Return Type

    Hello all.

    How is it possible for a function to have a conditional return type, based on the type of an argument passed into it?

    While this is invalid, something like:
    Code:
    public List<source.GetType()> PerformAction(object source)
    {
    // do stuff...
    }
    See more | Go to post
No activity results to display
Show More
Working...