Daily Archives

Articles indexed Thursday April 29 2010

Page 1/119 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • SubSonic 3.0.0.3 | Data Access Layer - Audit trails

    - by No Body
    Hi guys how do you implementing an Audit Trails on all objects/class on SubSonic under Data Access Layer? If what I want is, all changes on all objects will be recorded on a single table/object. public class AuditTrail { public int Id { get; set; } public string SourceObjectName { get; set; } public int RowPK { get; set; } // Id of the SourceObject public string ChangeType {get; set;} // value such as "Add", "Update", "Delete" public string RowCapture { get; set; } // Id="6" UserId="xxx3" SurName="NoBodyx" FirstName="no3" MiddleName="B." Email="[email protected]" CreatedDate="8/6/2009 1:57:58 PM" CreatedBy="ca3" UpdatedDate="8/7/2009 5:58:37 AM" UpdatedBy="qqq" Name="no3 B. NoBodyx" public CreatedDate {get; set;} }

    Read the article

  • serializing type definitions?

    - by Dave
    I'm not positive I'm going about this the right way. I've got a suite of applications that have varying types of output (custom defined types). For example, I might have a type called Widget: Class Widget Public name as String End Class Throughout the course of operation, when a user experiences a certain condition, the application will take that output instance of widget that user received, serialize it, and log it to the database noting the name of the type. Now, I have other applications that do something similar, but instead of dealing with Widget, it could be some totally random other type with different attributes, but again I serialize the instance, log it to the db, and note the name of the type. I have maybe a half dozen different types and don't anticipate too many additional ones in the future. After all this is said and done, I have an admin interface that looks through these logs, and has the ability for the user to view the contents of this data thats been logged. The Admin app has a reference to all the types involved, and with some basic switch case logic hinged upon the name of the type, will cast it into their original types, and pass it on to some handlers that have basic display logic to spit the data back out in a readable format (one display handler for each type) NOW... all this is well and good... Until one day, my model changed. The Widget class now has deprecated the name attribute and added on a bunch of other attributes. I will of course get type mismatches in the admin side when I try to reconstitute this data. I was wondering if there was some way, at runtime, i could perhaps reflect through my code and get a snapshot of the type definition at that precise moment, serialize it, and store it along with the data so that I could somehow use this to reconstitute it in the future?

    Read the article

  • WCF Windows Service TimeOut

    - by rmdussa
    I have a client application developed in .net seding a request to wcf service and supposed to send reponse .if execution time with in 1 minute,there is no error,if it exceeds 1 minute the error is Inner exception: This request operation sent to net.tcp://localhost:18001/PitToPort/2008/01/30/StockpileService/tcp did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client how to increase the time out and how?What is the best solution.

    Read the article

  • How can you get NVelocity to initialize correctly?

    - by Deane
    I can't get NVelocity to initialize. I'm not trying to do anything complicated, so it's just fine if it initializes at the defaults, but it won't even do that. This: VelocityEngine velocity = new VelocityEngine(); ExtendedProperties props = new ExtendedProperties(); velocity.Init(props); Results in: "It appears that no class was specified as the ResourceManager..." So does this: VelocityEngine velocity = new VelocityEngine(); velocity.Init(); I can find precious little documentation on what the properties should be, nor how to get it to initialize with the simple defaults. Can anyone point to a resource? A lot of pages point back to this page: http://www.castleproject.org/others/nvelocity/usingit.html But this page skips over the (seemingly) most important point -- how to set the properties and what to set them to. I just want to load a simple template from a file.

    Read the article

  • Convert IP address string to binary in Python

    - by pizzim13
    As part of a larger application, I am trying to convert an IP address to binary. Purpose being to later calculate the broadcast address for Wake on LAN traffic. I am assuming that there is a much more efficient way to do this then the way I am thinking. Which is breaking up the IP address by octet, adding 0's to the beginning of each octet where necessary, converting each octet to binary, then combining the results. Should I be looking at netaddr, sockets, or something completely different? Example: From 192.168.1.1 to 11000000.10101000.00000001.00000001

    Read the article

  • How to marshal int* in C#?

    - by MartyIX
    Hi, I would like to call this method in unmanaged library: void __stdcall GetConstraints( unsigned int* puiMaxWidth, unsigned int* puiMaxHeight, unsigned int* puiMaxBoxes ); My solution: Delegate definition: [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void GetConstraintsDel(UIntPtr puiMaxWidth, UIntPtr puiMaxHeight, UIntPtr puiMaxBoxes); The call of the method: // PLUGIN NAME GetConstraintsDel getConstraints = (GetConstraintsDel)Marshal.GetDelegateForFunctionPointer(pAddressOfFunctionToCall, typeof(GetConstraintsDel)); uint maxWidth, maxHeight, maxBoxes; unsafe { UIntPtr a = new UIntPtr(&maxWidth); UIntPtr b = new UIntPtr(&maxHeight); UIntPtr c = new UIntPtr(&maxBoxes); getConstraints(a, b, c); } It works but I have to allow "unsafe" flag. Is there a solution without unsafe code? Or is this solution ok? I don't quite understand the implications of setting the project with unsafe flag. Thanks for help!

    Read the article

  • Domain Trust Issues When Setting Up TFS 2010 on Windows Server 2008 R2

    - by Chris Reynolds
    I am trying to setup Team Foundation Server 2010 on Windows Server 2008 R2 using a single server configuration. During the "Readiness Checks" phase of the configuration wizard, I am facing an issue that i preventing me from communicating with the domain controller (which is Windows Server 2000). [ System Checks ] TF255435: This computer is a member of an Active Directory domain, but the domain controllers are not accessible. Network problems might be preventing access to the domain. Verify that the network is operational, and then retry the readiness checks. Other options include configuring Team Foundation Server specifying a local account in the custom wizard or joining the computer to a workgroup. http://go.microsoft.com/fwlink/?LinkID=164053&clcid=0x409 After reading the log file, the main issue I am encountering appears to be: The trust relationship between this workstation and the primary domain failed. (type SystemException) I have read in several other locations that the solution to this issue is to: Leave the domain Restart Join a workgroup Restart Rejoin the domain Unfortunately, I have tried this several times now and the issue persists. Is there anything I can try on the either the client machine or the domain controller that may help solve my issue?

    Read the article

  • Accessing one process's memory contents from another module

    - by Fangkai Yang
    I am developing a virtual device driver such that the user can write to the driver a process' pid and a virtual address, and the module will use these two values to get the memory contents of the target process. I am wondering if there is any easy functions that can fetch user page's data at this virtual address. I have tried get_user but this is not possible because the modules executing get_user at another process's context. I also tried to use ptrace_readdata, however, it seems that the file at /kernel/ptrace.c leaves a function access_process_vm undefined and also I don't know how to compile the source code of my module with this file (the linker seaches file in /linux/include by default). I am wondering if there are any other solutions...

    Read the article

  • How can I add an item to a SelectList in ASP.net MVC

    - by Barrigon
    Basically I am looking to insert an item at the beginning of a SelectList with the default value of 0 and the Text Value of " -- Select One --" Something like SelectList list = new SelectList(repository.func.ToList()); ListItem li = new ListItem(value, value); list.items.add(li); Can this be done? Cheers

    Read the article

  • Unable to find standard libraries when compiling Objective-C using GNUstep on Windows

    - by Jason Roberts
    I just installed GNUstep on my Windows XP machine and I'm attempting to compile the following Objective-C Hello World program from the command line: #import <Foundation/Foundation.h> int main(int argc, const char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Hello world\n"); [pool drain]; return 0; } When I try to compile the program from the command line like so gcc hello.m -o hello I end up getting the following error hello.m:1:34: Foundation/Foundation.h: No such file or directory Is there something I need to do order to inform the compiler of where the standard Objective-C libraries are located?

    Read the article

  • Algorithm design, "randomising" timetable schedule in Python although open to other languages.

    - by S1syphus
    Before I start I should add I am a musician and not a native programmer, this was undertook to make my life easier. Here is the situation, at work I'm given a new csv file each which contains a list of sound files, their length, and the minimum total amount of time they must be played. I create a playlist of exactly 60 minutes, from this excel file. Each sample played the by the minimum number of instances, but spread out from each other; so there will never be a period where for where one sound is played twice in a row or in close proximity to itself. Secondly, if the minimum instances of each song has been used, and there is still time with in the 60 min, it needs to fill the remaining time using sounds till 60 minutes is reached, while adhering to above. The smallest duration possible is 15 seconds, and then multiples of 15 seconds. Here is what I came up with in python and the problems I'm having with it, and as one user said its buggy due to the random library used in it. So I'm guessing a total rethink is on the table, here is where I need your help. Whats is the best way to solve the issue, I have had a brief look at things like knapsack and bin packing algorithms, while both are relevant neither are appropriate and maybe a bit beyond me.

    Read the article

  • Toggling on/off Markers in Google Maps API v3

    - by Douglas
    I'm having trouble getting the setMap(null); function that everyone seems to be recommending to work. I believe it may be a problem with the way I've implemented the markers. If someone could take a look and let me know if you see something wrong I'd greatly appreciate it. LINK: http://www.dougglover.com/samples/UOITMap/v2/

    Read the article

  • UiSplitViewController doesn't autorotate.

    - by Michael
    Hello, I have recently run into a problem. My iPad app is somehow preventing the iPad from auto-rotating. My app loads a UISplitView with both of the view controllers returning YES for shouldAutorotateToInterfaceOrientation:. I have set up my info.plist to include the "Supported interface orientations" key with all four orientations. When I run the app, however, rotating the device does not rotate the splitView (even though I am receiving UIDeviceOrientationDidChangeNotification). In addition, when I exit my app in a different orientation that it started in the iPad home screen doesn't autorotate to the correct view until I rotate it again without my app running.... Any Ideas would be much appreciated....

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >