Search Results

Search found 236 results on 10 pages for 'russ clark'.

Page 5/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Windows Workflow Foundation 4 (WF4) ReHosting

    - by Russ Clark
    I've been looking at the possibility of ReHosting a WF4 Workflow to be used to debug running Workflows. All the posts and samples I've seen regarding WF4 Rehosting are using a WPF application to initially Host the Workflow, and then use the WorkflowDesigner in ReHosting it. Is there any way to Rehost a Workflow that was hosted in a non WPF application, like ASP.Net MVC?

    Read the article

  • Windows Workflow Foundation 4 (WF4) Error Handling

    - by Russ Clark
    What is the best way to get error messages from a WF4 workflow back to a hosting ASP.NET MVC application? I need the workflow to not terminate, but continue to be active, and then pass a message back to the hosting app regarding the error, so the user can take an alternative action, but I'm not sure how to do that.

    Read the article

  • How can I use a custom TabItem control when databinding a TabControl in WPF?

    - by Russ
    I have a custom control that is derived from TabItem, and I want to databind that custom TabItem to a stock TabControl. I would rather avoid creating a new TabControl just for this rare case. This is what I have and I'm not having any luck getting the correct control to be loaded. In this case I want to use my ClosableTabItem control instead of the stock TabItem control. <TabControl x:Name="tabCases" IsSynchronizedWithCurrentItem="True" Controls:ClosableTabItem.TabClose="TabClosed" > <TabControl.ItemTemplate> <DataTemplate DataType="{x:Type Controls:ClosableTabItem}" > <TextBlock Text="{Binding Path=Id}" /> </DataTemplate> </TabControl.ItemTemplate> <TabControl.ContentTemplate> <DataTemplate DataType="{x:Type Entities:Case}"> <CallLog:CaseReadOnlyDisplay DataContext="{Binding}" /> </DataTemplate> </TabControl.ContentTemplate> </TabControl> EDIT: This is what I ended up with, rather than trying to bind a custom control. The "CloseCommand" im getting from a previous question. <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}" > <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabItem}"> <Border Name="Border" Background="LightGray" BorderBrush="Black" BorderThickness="1" CornerRadius="25,0,0,0" SnapsToDevicePixels="True"> <StackPanel Orientation="Horizontal"> <ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" Margin="20,1,5,1"/> <Button Command="{Binding Path=CloseCommand}" Cursor="Hand" DockPanel.Dock="Right" Focusable="False" Margin="1,1,5,1" Background="Transparent" BorderThickness="0"> <Image Source="/Russound.Windows;component/Resources/Delete.png" Height="10" /> </Button> </StackPanel> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="FontWeight" Value="Bold" /> <Setter TargetName="Border" Property="Background" Value="LightBlue" /> <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" /> <Setter TargetName="Border" Property="BorderBrush" Value="DarkBlue" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • Windows Workflow Foundation 4 (WF4) Delay

    - by Russ Clark
    I'm working with the the Release Candidate of Visual Studio 2010 using Wf4 to write a new workflow for approving resource requests. In my workflow, I would like for a request to expire after a few days if no approval has been made for the request. We did this in WF 3.5 (Visual Studio 2008) by adding a Delay timer into an EventDrivenActivity parallel to the EventDrivenActivity that was awaiting an approver to come and approve the request. If the Delay expired before an approval was made, the EventDrivenActivity would terminate the request. Does anyone know if there is a similar mechanism for doing this in WF4?

    Read the article

  • iPhone "slide to unlock" animation

    - by Russ
    Any ideas as to how Apple implemented the "slide to unlock" (also, "slide to power off" is another identical example) animation? I thought about some sort of animating mask - but masking is not available on the iPhone OS for performance reasons. Is there some private API effect (like SuckEffect) that they might have used? A spotlight type of effect? Some Core Animation thing? Edit: It's definitely not a series of stills. I've seen examples of being edit a plist value or something and customize the string on jailbroken iphones.

    Read the article

  • DataContractSerializer and XSLT not Serializing Class Properties

    - by Russ Clark
    I've written a simple Employee class that I'm trying to serialize to an XDocument and then use XSLT to transform the document to a page that displays both the properties (Name and ID) from the Employee class, and an html form with 2 radio buttons (Approve and Reject) and a submit button. Here is the Employee class: [Serializable, DataContract(Namespace="XSLT_MVC.Controllers/")] public class Employee { [DataMember] public string Name { get; set; } [DataMember] public int ID { get; set; } public Employee() { } public Employee(string name, int id) { Name = name; ID = id; } public XDocument GetDoc() { XDocument doc = new XDocument(); var serializer = new DataContractSerializer(typeof(Employee)); using (var writer = doc.CreateWriter()) { serializer.WriteObject(writer, this); writer.Close(); } return doc; } } And here is the XSLT file: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" indent="yes"/> <xsl:template match="/"> <html> <body> <xsl:value-of select="Employee/Name"/> <br /> <xsl:value-of select="Employee/ID"/> <br /> <form method="post" action="/Home/ProcessRequest?id={Employee/ID}"> <input id="Action" name="Action" type="radio" value="Approved"></input> Approved <br /> <input id="Action" name="Action" type="radio" value="Rejected"></input> Rejected <br /> <input type="submit" value="Submit"></input> </form> </body> </html> </xsl:template> </xsl:stylesheet> When I run this, all I get is the html form with the 2 radio buttons and the submit button, but not the properties from the Employee class. I saw a separate StackOverflow post that said I need to change the <xsl:template match="/"> to match on the namespace of my Employee class like this: <xsl:template match="/XSLT_MVC.Controllers"> but when I do that, now all I get are the Employee properties, and not the html form with the 2 radio buttons and the submit button. Does anyone know what needs to be done so that my transform will select and display both the Employee properties and the html form?

    Read the article

  • How do you create a non-Thread-based Guice custom Scope?

    - by Russ
    It seems that all Guice's out-of-the-box Scope implementations are inherently Thread-based (or ignore Threads entirely): Scopes.SINGLETON and Scopes.NO_SCOPE ignore Threads and are the edge cases: global scope and no scope. ServletScopes.REQUEST and ServletScopes.SESSION ultimately depend on retrieving scoped objects from a ThreadLocal<Context>. The retrieved Context holds a reference to the HttpServletRequest that holds a reference to the scoped objects stored as named attributes (where name is derived from com.google.inject.Key). Class SimpleScope from the custom scope Guice wiki also provides a per-Thread implementation using a ThreadLocal<Map<Key<?>, Object>> member variable. With that preamble, my question is this: how does one go about creating a non-Thread-based Scope? It seems that something that I can use to look up a Map<Key<?>, Object> is missing, as the only things passed in to Scope.scope() are a Key<T> and a Provider<T>. Thanks in advance for your time.

    Read the article

  • How Can I Check an Object to See its Type and Return A Casted Object

    - by Russ Bradberry
    I have method to which I pass an object. In this method I check it's type and depending on the type I do something with it and return a Long. I have tried every which way I can think of to do this and I always get several compiler errors telling me it expects a certain object but gets another. Can someone please explain to me what I am doing wrong and guide me in the right direction? What I have tried thus far is below: override def getInteger(obj:Object) = { if (obj.isInstanceOf[Object]) null else if (obj.isInstanceOf[Number]) (obj:Number).longValue() else if (obj.isInstanceOf[Boolean]) if (obj:Boolean) 1 else 0 else if (obj.isInstanceOf[String]) if ((obj:String).length == 0 | (obj:String) == "null") null else try { Long.parse(obj:String) } catch { case e: Exception => throw new ValueConverterException("value \"" + obj.toString() + "\" of type " + obj.getClass().getName() + " is not convertible to Long") } }

    Read the article

  • How Do I Loop Through a Date Range in Reverse?

    - by Russ Bradberry
    I have a date range that I would like to be able to loop through in reverse. Give the following, how would I accomplish this, the standard Range operator doesn't seem t be working properly. >> sd = Date.parse('2010-03-01') => Mon, 01 Mar 2010 >> ed = Date.parse('2010-03-05') => Fri, 05 Mar 2010 >> (sd..ed).to_a => [Mon, 01 Mar 2010, Tue, 02 Mar 2010, Wed, 03 Mar 2010, Thu, 04 Mar 2010, Fri, 05 Mar 2010] >> (ed..sd).to_a => [] as you can see, the range operator works properly form start to end, but not from end to start.

    Read the article

  • JQuery Autocomplete plugin not working with JQuery 1.4.1

    - by Russ Clark
    I've been using the JQuery Autocomplete plugin with JQuery version 1.3.2, and it has been working great. I recently updated JQuery in my project to version 1.4.2, and the Autocomplete plugin is now broken. The JQuery code to add items to a textbox on my web page doesn't seem to be getting called at all. Does anyone know if the JQuery Autocomplete plugin is incompatible with JQuery version 1.4.2, and if there is a fix for this problem? Here is some sample code I've built in an ASP.Net web site (which works fine if I change the JQuery file to jquery-1.3.2.js, but nothing happens using jquery-1.4.2.js): <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script type="text/javascript" src="js/jquery-1.4.2.js" ></script> <script type="text/javascript" src="js/jquery.autocomplete.js" ></script> <script type="text/javascript"> $(document).ready(function() { var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" "); $(':input:text:id$=sapleUser').autocomplete(data); }); </script> </head> <body> <form id="form1" runat="server"> API Reference: <input id="sapleUser" autocomplete="off" type="text" runat="server" /> (try "C" or "E") </form> </body> </html>

    Read the article

  • Can I spead out a long running stored proc accross multiple CPU's?

    - by Russ
    [Also on SuperUser - http://superuser.com/questions/116600/can-i-spead-out-a-long-running-stored-proc-accross-multiple-cpus] I have a stored procedure in SQL server the gets, and decrypts a block of data. ( Credit cards in this case. ) Most of the time, the performance is tolerable, but there are a couple customers where the process is painfully slow, taking literally 1 minute to complete. ( Well, 59377ms to return from SQL Server to be exact, but it can vary by a few hundred ms based on load ) When I watch the process, I see that SQL is only using a single proc to perform the whole process, and typically only proc 0. Is there a way I can change my stored proc so that SQL can multi-thread the process? Is it even feasible to cheat and to break the calls in half, ( top 50%, bottom 50% ), and spread the load, as a gross hack? ( just spit-balling here ) My stored proc: USE [Commerce] GO /****** Object: StoredProcedure [dbo].[GetAllCreditCardsByCustomerId] Script Date: 03/05/2010 11:50:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[GetAllCreditCardsByCustomerId] @companyId UNIQUEIDENTIFIER, @DecryptionKey NVARCHAR (MAX) AS SET NoCount ON DECLARE @cardId uniqueidentifier DECLARE @tmpdecryptedCardData VarChar(MAX); DECLARE @decryptedCardData VarChar(MAX); DECLARE @tmpTable as Table ( CardId uniqueidentifier, DecryptedCard NVarChar(Max) ) DECLARE creditCards CURSOR FAST_FORWARD READ_ONLY FOR Select cardId from CreditCards where companyId = @companyId and Active=1 order by addedBy desc --2 OPEN creditCards --3 FETCH creditCards INTO @cardId -- prime the cursor WHILE @@Fetch_Status = 0 BEGIN --OPEN creditCards DECLARE creditCardData CURSOR FAST_FORWARD READ_ONLY FOR select convert(nvarchar(max), DecryptByCert(Cert_Id('Oh-Nay-Nay'), EncryptedCard, @DecryptionKey)) FROM CreditCardData where cardid = @cardId order by valueOrder OPEN creditCardData FETCH creditCardData INTO @tmpdecryptedCardData -- prime the cursor WHILE @@Fetch_Status = 0 BEGIN print 'CreditCardData' print @tmpdecryptedCardData set @decryptedCardData = ISNULL(@decryptedCardData, '') + @tmpdecryptedCardData print '@decryptedCardData' print @decryptedCardData; FETCH NEXT FROM creditCardData INTO @tmpdecryptedCardData -- fetch next END CLOSE creditCardData DEALLOCATE creditCardData insert into @tmpTable (CardId, DecryptedCard) values ( @cardId, @decryptedCardData ) set @decryptedCardData = '' FETCH NEXT FROM creditCards INTO @cardId -- fetch next END select CardId, DecryptedCard FROM @tmpTable CLOSE creditCards DEALLOCATE creditCards

    Read the article

  • Can I spread out a long running stored proc accross multiple CPU's?

    - by Russ
    [Also on SuperUser - http://superuser.com/questions/116600/can-i-spead-out-a-long-running-stored-proc-accross-multiple-cpus] I have a stored procedure in SQL server the gets, and decrypts a block of data. ( Credit cards in this case. ) Most of the time, the performance is tolerable, but there are a couple customers where the process is painfully slow, taking literally 1 minute to complete. ( Well, 59377ms to return from SQL Server to be exact, but it can vary by a few hundred ms based on load ) When I watch the process, I see that SQL is only using a single proc to perform the whole process, and typically only proc 0. Is there a way I can change my stored proc so that SQL can multi-thread the process? Is it even feasible to cheat and to break the calls in half, ( top 50%, bottom 50% ), and spread the load, as a gross hack? ( just spit-balling here ) My stored proc: USE [Commerce] GO /****** Object: StoredProcedure [dbo].[GetAllCreditCardsByCustomerId] Script Date: 03/05/2010 11:50:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[GetAllCreditCardsByCustomerId] @companyId UNIQUEIDENTIFIER, @DecryptionKey NVARCHAR (MAX) AS SET NoCount ON DECLARE @cardId uniqueidentifier DECLARE @tmpdecryptedCardData VarChar(MAX); DECLARE @decryptedCardData VarChar(MAX); DECLARE @tmpTable as Table ( CardId uniqueidentifier, DecryptedCard NVarChar(Max) ) DECLARE creditCards CURSOR FAST_FORWARD READ_ONLY FOR Select cardId from CreditCards where companyId = @companyId and Active=1 order by addedBy desc --2 OPEN creditCards --3 FETCH creditCards INTO @cardId -- prime the cursor WHILE @@Fetch_Status = 0 BEGIN --OPEN creditCards DECLARE creditCardData CURSOR FAST_FORWARD READ_ONLY FOR select convert(nvarchar(max), DecryptByCert(Cert_Id('Oh-Nay-Nay'), EncryptedCard, @DecryptionKey)) FROM CreditCardData where cardid = @cardId order by valueOrder OPEN creditCardData FETCH creditCardData INTO @tmpdecryptedCardData -- prime the cursor WHILE @@Fetch_Status = 0 BEGIN print 'CreditCardData' print @tmpdecryptedCardData set @decryptedCardData = ISNULL(@decryptedCardData, '') + @tmpdecryptedCardData print '@decryptedCardData' print @decryptedCardData; FETCH NEXT FROM creditCardData INTO @tmpdecryptedCardData -- fetch next END CLOSE creditCardData DEALLOCATE creditCardData insert into @tmpTable (CardId, DecryptedCard) values ( @cardId, @decryptedCardData ) set @decryptedCardData = '' FETCH NEXT FROM creditCards INTO @cardId -- fetch next END select CardId, DecryptedCard FROM @tmpTable CLOSE creditCards DEALLOCATE creditCards

    Read the article

  • Can I spread out a long running stored proc accross multiple CPU's?

    - by Russ
    [Also on SuperUser - http://superuser.com/questions/116600/can-i-spead-out-a-long-running-stored-proc-accross-multiple-cpus] I have a stored procedure in SQL server the gets, and decrypts a block of data. ( Credit cards in this case. ) Most of the time, the performance is tolerable, but there are a couple customers where the process is painfully slow, taking literally 1 minute to complete. ( Well, 59377ms to return from SQL Server to be exact, but it can vary by a few hundred ms based on load ) When I watch the process, I see that SQL is only using a single proc to perform the whole process, and typically only proc 0. Is there a way I can change my stored proc so that SQL can multi-thread the process? Is it even feasible to cheat and to break the calls in half, ( top 50%, bottom 50% ), and spread the load, as a gross hack? ( just spit-balling here ) My stored proc: USE [Commerce] GO /****** Object: StoredProcedure [dbo].[GetAllCreditCardsByCustomerId] Script Date: 03/05/2010 11:50:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[GetAllCreditCardsByCustomerId] @companyId UNIQUEIDENTIFIER, @DecryptionKey NVARCHAR (MAX) AS SET NoCount ON DECLARE @cardId uniqueidentifier DECLARE @tmpdecryptedCardData VarChar(MAX); DECLARE @decryptedCardData VarChar(MAX); DECLARE @tmpTable as Table ( CardId uniqueidentifier, DecryptedCard NVarChar(Max) ) DECLARE creditCards CURSOR FAST_FORWARD READ_ONLY FOR Select cardId from CreditCards where companyId = @companyId and Active=1 order by addedBy desc --2 OPEN creditCards --3 FETCH creditCards INTO @cardId -- prime the cursor WHILE @@Fetch_Status = 0 BEGIN --OPEN creditCards DECLARE creditCardData CURSOR FAST_FORWARD READ_ONLY FOR select convert(nvarchar(max), DecryptByCert(Cert_Id('Oh-Nay-Nay'), EncryptedCard, @DecryptionKey)) FROM CreditCardData where cardid = @cardId order by valueOrder OPEN creditCardData FETCH creditCardData INTO @tmpdecryptedCardData -- prime the cursor WHILE @@Fetch_Status = 0 BEGIN print 'CreditCardData' print @tmpdecryptedCardData set @decryptedCardData = ISNULL(@decryptedCardData, '') + @tmpdecryptedCardData print '@decryptedCardData' print @decryptedCardData; FETCH NEXT FROM creditCardData INTO @tmpdecryptedCardData -- fetch next END CLOSE creditCardData DEALLOCATE creditCardData insert into @tmpTable (CardId, DecryptedCard) values ( @cardId, @decryptedCardData ) set @decryptedCardData = '' FETCH NEXT FROM creditCards INTO @cardId -- fetch next END select CardId, DecryptedCard FROM @tmpTable CLOSE creditCards DEALLOCATE creditCards

    Read the article

  • How to make a mapped field inherited from a superclass transient in JPA?

    - by Russ Hayward
    I have a legacy schema that cannot be changed. I am using a base class for the common features and it contains an embedded object. There is a field that is normally mapped in the embedded object that needs to be in the persistence id for only one (of many) subclasses. I have made a new id class that includes it but then I get the error that the field is mapped twice. Here is some example code that is much simplified to maintain the sanity of the reader: @MappedSuperclass class BaseClass { @Embedded private Data data; } @Entity class SubClass extends BaseClass { @EmbeddedId private SubClassId id; } @Embeddable class Data { private int location; private String name; } @Embeddable class SubClassId { private int thingy; private int location; } I have tried @AttributeOverride but I can only get it to rename the field. I have tried to set it to updatable = false, insertable = false but this did not seem to work when used in the @AttributeOverride annotation. See answer below for the solution to this issue. I realise I could change the base class but I really do not want to split up the embedded object to separate the shared field as it would make the surrounding code more complex and require some ugly wrapping code. I could also redesign the whole system for this corner case but I would really rather not. I am using Hibernate as my JPA provider.

    Read the article

  • How Do I Convert Pipe Delimited to Comma Delimited with Escaping

    - by Russ Bradberry
    Hi, I am fairly new to scala and I have the need to convert a string that is pipe delimited to one that is comma delimited, with the values wrapped in quotes and any quotes escaped by "\" in c# i would probably do this like this string st = "\"" + oldStr.Replace("\"", "\\\\\"").Replace("|", "\",\"") + "\"" I haven't validated that actually works but that is the basic idea behind what I am trying to do. Is there a way to do this easily in scala?

    Read the article

  • How can I find installed programs dependent on any version of the .NET framework?

    - by Russ
    I have an application that uses .NET 3.5SP1, but I have been having a LOT of random crashes with it. I am starting to narrow the fields of possible causes to the framework itself, where I suspect some other app is installing a lower patch version. Is there any apps in the wild, or anything I can slap together that can tell me what apps that are installed that depend on .NET to run? Their minimum required version would be nice to know also, but not necessary.

    Read the article

  • Python - Number of Significant Digits in results of division

    - by russ
    Newbie here. I have the following code: myADC = 128 maxVoltage = 5.0 maxADC = 255.0 VoltsPerADC = maxVoltage/maxADC myVolts = myADC * VoltsPerADC print "myADC = {0: >3}".format(myADC) print "VoltsPerADC = {0: >7}".format(VoltsPerADC) print VoltsPerADC print "myVolts = {0: >7}".format(myVolts) print myVolts This outputs the following: myADC = 128 VoltsPerADC = 0.0196078 0.0196078431373 myVolts = 2.5098 2.50980392157 I have been searching for an explanation of how the number of significant digits is determined by default, but have had trouble locating an explanation that makes sense to me. This link link text suggests that by default the "print" statement prints numbers to 10 significant figures, but that does not seem to be the case in my results. How are the number of significant digits/precision determined? Can someone shed some light on this for me. Thanks in advance for your time and patience.

    Read the article

  • Auto accept outlook VBA

    - by Russ
    Is there a VB macro or some sort of add-on out there that will allow me to auto accept invitations in outlook by sender or by folder? I was thinking about doing a VB script for this but I don't want to re-invent the wheel?

    Read the article

  • WinDev user standpoint

    - by Russ T
    I am not developer but I found this board while researching windev. I am the VP of a start up company that is developing a web-based application for a retail point of sale system. If anyone out there is familiar enough with this product and especially it's limitations, I would appreciate any heads up info on any of the final product(s) that have been developed that I might be able to compare/contrast to our enterprise.

    Read the article

  • Inner join on 2 arrays?

    - by russ
    I'm trying to find a solution to the following (I'm thinking with Linq) to the following: I need to pull down certain files from a larger list of files on an ftp server that have a similar file name. For example, we send an order file to some company for processing then they return a response file that we can download. So, I could send them the files "order_123.txt" and "order_456.txt". After a certain amount of time I need to go look for and download the responses for those files that will be named "order_123.resp" and "order_456.resp". The kicker is that in some cases I can have multiple responses in which case they would create "order_123-1.resp" and "order_123-2.resp" and also the files don't get removed from the server. I know this can be accomplished by looping through the files I know I need responses to then loop through all the files on the server until I find files that match but I'm hoping that I don't have to loop through the files on the server more than once. This example may help clarify: I've sent "order_222.txt" and "order_333.txt" they processed them and the ftp server contains: "order_111-1.resp" "order_001.resp" "order_222-1.resp" "order_222-2.resp" "order_333.resp" I need to download the 3rd, 4th, and 5th file. Thanks.

    Read the article

  • How Do I Pull Info from String

    - by Russ Bradberry
    I am trying to pull dynamics from a load that I run using bash. I have gotten to a point where I get the string I want, now from this I want to pull certain information that can vary. The string that gets returned is as follows: Records: 2910 Deleted: 0 Skipped: 0 Warnings: 0 Each of the number can and will vary in length, but the overall structure will remain the same. What I want to do is be able to get these numbers and load them into some bash variables ie: RECORDS=?? DELETED=?? SKIPPED=?? WARNING=?? In regex I would do it like this: Records: (\d*?) Deleted: (\d*?) Skipped (\d*?) Warnings (\d*?) and use the 4 groups in my variables.

    Read the article

  • DataContractSerializer and XSLT

    - by Russ Clark
    I've got a simple Employee class that I'm trying to serialize to an XDocument and then use XSLT to transform the document to a page that displays both the properties (Name and ID) from the Employee class, and an html form with 2 radio buttons (Approve and Reject) and a submit button. Here is the Employee class: [Serializable, DataContract(Namespace="XSLT_MVC.Controllers/")] public class Employee { [DataMember] public string Name { get; set; } [DataMember] public int ID { get; set; } public Employee() { } public Employee(string name, int id) { Name = name; ID = id; } public XDocument GetDoc() { XDocument doc = new XDocument(); var serializer = new DataContractSerializer(typeof(Employee)); using (var writer = doc.CreateWriter()) { serializer.WriteObject(writer, this); writer.Close(); } return doc; } } And here is the XSLT file: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" indent="yes"/> <xsl:template match="/"> <html> <body> <xsl:value-of select="Employee/Name"/> <br /> <xsl:value-of select="Employee/ID"/> <br /> <form method="post" action="/Home/ProcessRequest?id={Employee/ID}"> <input id="Action" name="Action" type="radio" value="Approved"></input> Approved <br /> <input id="Action" name="Action" type="radio" value="Rejected"></input> Rejected <br /> <input type="submit" value="Submit"></input> </form> </body> </html> </xsl:template> </xsl:stylesheet> When I run this, all I get is the html form with the 2 radio buttons and the submit button, but not the properties from the Employee class. I saw a separate StackOverflow post that said I need to change the <xsl:template match="/"> to match on the namespace of my Employee class like this: <xsl:template match="/XSLT_MVC.Controllers">, but when I do that, now all I get are the Employee properties, and not the html form with the 2 radio buttons and the submit button. Does anyone know what needs to be done so that my transform will select and display both the Employee properties and the html form?

    Read the article

  • How to get visual studio 10 to open .mk files in the same instance?

    - by Russ Schultz
    I've recently been migrated to windows 7, and upon re-installing VS2010, it seems to want to treat .mk files differently than it used to. For whatever reason, it insists on opening a new instance of visual studio to edit these files. It doesn't for .c, .h, etc. I've tried using types, a freeware association manager, to change how it is associated. I've deleted the association, recreated, etc. but it still seems to want to treat these separately. Anybody know how to beat this thing into submission?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >