Search Results

Search found 489 results on 20 pages for 'stefan kendall'.

Page 13/20 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Screenshot from WPF application as SVG / vector graphic?

    - by stefan.at.wpf
    Hello, is it possible to create a screenshot of a WPF application as SVG / is there some WPF built-in function to get the XAML code for the current drawn window that then can be converted to SVG? I need some screenshots for documenting a WPF application and I'd like them to be zoomable like a WPF program is using e.g. Snoop or Vista Magnifyer. Thanks for any hint!

    Read the article

  • C# UTF8 output keep encoded characters intact

    - by Stefan Pohl
    Hello, i have a very simple question I can't seem to get my head around. I have a properly encoded UTF8-String I parse into a JObject with Json.NET, fiddle around with some values and write it to the commandline, keeping the encoded characters intact. Everything works great except for the keeping the encoded characters intact part. Code: var json = "{roster: [[\"Tulg\u00f4r\", 990, 1055]]}"; var j = JObject.Parse(json); for (int i = 0; i < j["roster"].Count(); i++) { j["roster"][i][1] = ((int)j["roster"][i][1]) * 3; j["roster"][i][2] = ((int)j["roster"][i][2]) * 3; } Console.WriteLine(JsonConvert.SerializeObject(j, Formatting.None)); Actual Output: {"roster":[["Tulgôr",2970,3165]]} Desired Output: {"roster":[["Tulg\u00f4r",2970,3165]]} It seems like my phrasing in Google is inappropriate since nothing useful came up. I'm sure it's something uber-easy and i will feel pretty stupid afterwards. :)

    Read the article

  • Databinding between 2 Dependency Properties

    - by stefan.at.wpf
    Hello, I'm trying to do databinding between 2 Dependency Properties. I guess this should be quite easy, anyways I just don't get it. I already googled but I couldn't really find out what I'm doing wrong. I'm trying to bind the ControlPointProperty to the QuadraticBezierSegment.Point1Property, however it doesn't work. Thanks for any hint! class DataBindingTest : DependencyObject { // Dependency Property public static readonly DependencyProperty ControlPointProperty; // .NET wrapper public Point ControlPoint { get { return (Point)GetValue(DataBindingTest.ControlPointProperty); } set { SetValue(DataBindingTest.ControlPointProperty, value); } } // Register Dependency Property static DataBindingTest() { DataBindingTest.ControlPointProperty = DependencyProperty.Register("ControlPoint", typeof(Point), typeof(DataBindingTest)); } public DataBindingTest() { QuadraticBezierSegment bezier = new QuadraticBezierSegment(); // Binding Binding myBinding = new Binding(); myBinding.Source = ControlPointProperty; BindingOperations.SetBinding(bezier, QuadraticBezierSegment.Point1Property, myBinding); // Test Binding: Change the binding source ControlPoint = new Point(1, 1); MessageBox.Show(bezier.Point1.ToString()); // gives (0,0), should be (1,1) } }

    Read the article

  • DoDragDrop disables MouseMove Events

    - by stefan.at.wpf
    After having started a Drag & Drop operation by DragDrop.DoDragDrop(...) no more MouseMove Events are fired. I even tried AddHandler(Window.MouseMoveEvent, new MouseEventHandler(myControl_MouseMove), true); where the last parameter means I even opt in for handled events. No chance, seems like the MouseMove Event is never fired at all! Any way to still get MouseMove Events while using Drag & Drop? I'd like to Drag & Drop a control, while dragging this control it shall follow the mouse pointer. Any idea how to do this in this case?

    Read the article

  • Why can't I install MVC (1 or 2) with Visual Web Developer Express 2008 RC1?

    - by Stefan
    Hi all, I have installed VWD 2010 Express and love MVC2. I have an existing ASP.NET 3.5 website that I'd like to redevelop with ASP.NET MVC2 under VWD 2008 with the 3.5 framework (the host only supports .Net 3.5, and Express 2010 doesn't support targeting of .Net framework versions) I am however unable to install MVC2 with VWD 2008. The installer (for 2008 SP1) says it has installed, but the MVC project templates don't show up when I create a new project. I also had this problem originally with MVC1 which is why I gave up at some point and just created it as a normal ASP.NET website. I tried uninstalling and installing VWD 2008, and then installing MVC2, but this didn't solve the problem. Does anyone know why this problem occurs, or how to solve it? Or is there a way to add these templates and the tooling manually?

    Read the article

  • What parser generator do you recommend

    - by stefan.ciobaca
    I'm currently shopping for a FOSS parser generator for a project of mine. It has to support either C or C++. I've looked at bison/flex and at boost::spirit. I went from writing my own to spirit to bison to spirit to bison to spirit, each time hit by some feature I found unpleasant. The thing I hate most about bison/flex is that they actually generate C/C++ source for you. There are a number of disadvantages to this, e.g. debugging. I like spirit from this point of view, but I find it very very heavy on syntax. I am curious about what you are using, what you would recommend, and general thoughts about the state of the art in parser generators. I am also curious to hear about approaches being used in other languages for parsing problems.

    Read the article

  • Correct XML serialization and deserialization of "mixed" types in .NET

    - by Stefan
    My current task involves writing a class library for processing HL7 CDA files. These HL7 CDA files are XML files with a defined XML schema, so I used xsd.exe to generate .NET classes for XML serialization and deserialization. The XML Schema contains various types which contain the mixed="true" attribute, specifying that an XML node of this type may contain normal text mixed with other XML nodes. The relevant part of the XML schema for one of these types looks like this: <xs:complexType name="StrucDoc.Paragraph" mixed="true"> <xs:sequence> <xs:element name="caption" type="StrucDoc.Caption" minOccurs="0"/> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="br" type="StrucDoc.Br"/> <xs:element name="sub" type="StrucDoc.Sub"/> <xs:element name="sup" type="StrucDoc.Sup"/> <!-- ...other possible nodes... --> </xs:choice> </xs:sequence> <xs:attribute name="ID" type="xs:ID"/> <!-- ...other attributes... --> </xs:complexType> The generated code for this type looks like this: /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(TypeName="StrucDoc.Paragraph", Namespace="urn:hl7-org:v3")] public partial class StrucDocParagraph { private StrucDocCaption captionField; private object[] itemsField; private string[] textField; private string idField; // ...fields for other attributes... /// <remarks/> public StrucDocCaption caption { get { return this.captionField; } set { this.captionField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute("br", typeof(StrucDocBr))] [System.Xml.Serialization.XmlElementAttribute("sub", typeof(StrucDocSub))] [System.Xml.Serialization.XmlElementAttribute("sup", typeof(StrucDocSup))] // ...other possible nodes... public object[] Items { get { return this.itemsField; } set { this.itemsField = value; } } /// <remarks/> [System.Xml.Serialization.XmlTextAttribute()] public string[] Text { get { return this.textField; } set { this.textField = value; } } /// <remarks/> [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")] public string ID { get { return this.idField; } set { this.idField = value; } } // ...properties for other attributes... } If I deserialize an XML element where the paragraph node looks like this: <paragraph>first line<br /><br />third line</paragraph> The result is that the item and text arrays are read like this: itemsField = new object[] { new StrucDocBr(), new StrucDocBr(), }; textField = new string[] { "first line", "third line", }; From this there is no possible way to determine the exact order of the text and the other nodes. If I serialize this again, the result looks exactly like this: <paragraph> <br /> <br />first linethird line </paragraph> The default serializer just serializes the items first and then the text. I tried implementing IXmlSerializable on the StrucDocParagraph class so that I could control the deserialization and serialization of the content, but it's rather complex since there are so many classes involved and I didn't come to a solution yet because I don't know if the effort pays off. Is there some kind of easy workaround to this problem, or is it even possible by doing custom serialization via IXmlSerializable? Or should I just use XmlDocument or XmlReader/XmlWriter to process these documents?

    Read the article

  • Using Kate with Simple Build Tool (SBT)

    - by Stefan
    Hello I am working with the Kate editor based on the lack of other good tools for Scala development, I am also using IntelliJ however it still has some bugs, and are slow enough to make me impatient. I have just startet using both Kate and SBT, and in that regard I have a little challenge I hope there is an answer for out there on "The Internet". I am using the standard "Build plugin" in Kate and has changed the commands from make to sbt. This works fine, and I am also getting a error report when the sbt fails during compile time. However I really wish to know if it is possible to integrate the compile errors into Kate such that it would be shown under "Errors and Warnings" instead of just in the output tab, where I have to do a manual search for the compile errors. Im guessing that it has something to do with the format of the output, if that is the case maybe it is "just" a smaller adjustment I need to make to the parsing language.

    Read the article

  • jQuery :contains selector to search for multiple strings

    - by Stefan
    Assuming i have: <li id="1">Mary</li> <li id="2">John, Mary, Dave</li> <li id="3">John, Dave, Mary</li> <li id="4">John</li> If i need to find all <li> Elements which contain "John" and "Mary", how would i construct the jQuery? A search for a single string seems easy: $('li:contains("John")').text() I am looking for something like the following pseudo code: $('li:contains("John")' && 'li:contains("Mary")').text() Thanks!

    Read the article

  • C++ project type: unicode vs multi-byte; pros and cons

    - by Stefan Valianu
    I'm wondering what the Stack Overflow community thinks when it comes to creating a project (thinking primarily c++ here) with a unicode or a multi-byte character set. Are there pros to going Unicode straight from the start, implying all your strings will be in wide format? Are there performance issues / larger memory requirements because of a standard use of a larger character? Is there an advantage to this method? Do some processor architectures handle wide characters better? Are there any reasons to make your project Unicode if you don't plan on supporting additional languages? What reasons would one have for creating a project with a multi-byte character set? How do all of the factors above collide in a high performance environment (such as a modern video game) ?

    Read the article

  • iPhone: [subview release] removes my subview from the display

    - by Stefan Klumpp
    I have these two pieces of code. The first one works perfectly: UIView *tmp = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 60.0f, 296.0f, 44.0f)]; [self.dynamicView addSubview:tmp]; [tmp release]; The second one is pretty much the same, but the view doesn't show up. CommentBox *commentBox = [[CommentBox alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 296.0f, 44.0f)]; [self.dynamicView addSubview:commentBox]; [commentBox release]; // Why does this remove the view? If I remove the [commentBox release] the view surprisingly appears. But I don't see a different between these two code snippets. The init for the CommentBox looks like this: - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { // Load the nib: NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"CommentBox" owner:self options:nil]; self = [nibObjects objectAtIndex:0]; } return self; }

    Read the article

  • 32 bit depth jpg images problem in IE when referenced locally

    - by Stefan
    We have an webbapplication that takes an image that will be uploaded and resized. The resize-library we used saved all pictures with 32-bit depth whatever the depth was before. We have an online client that can view the pictures via an html-file and all is fine there. All pictures are shown correctly. The problem: We also have an vb-winform application that download the pictures and show them in an html-file locally in an webbrowser control. But here all pictures are rejected (not rendered), just the red cross. If we create an static html-file with img-tags in them locally, its the same. All pictures that has 32-bits depth are shown as red crosses. If we resave the pictures with 24-bits depth it magically works again. So ofcourse that was our "workaround", let the resize-library save all pictures with 24-bits depth instead. Summary: 32-bits jpg files shows correct in IE when online but not when referenced locally in a local html-file. (This is true for IE8 on both winxp and windows7). The same local html-file opened in mozilla showed OK. Question: I have googled this a lot but has not found anything about this "problem". Is this a bug in IE8?

    Read the article

  • WPF: Same line drawn different?

    - by stefan.at.wpf
    Hello, I have a canvas and in it I'm drawing some lines: for (int i = 1; i >= 100; i++) { // Line LineGeometry line = new LineGeometry(); line.StartPoint = new Point(i * 100, 0); line.EndPoint = new Point(i * 100, 100 * 100); // Path Path myPath = new Path(); myPath.Stroke = Brushes.Black; myPath.StrokeThickness = 1; // Add to canvas myPath.Data = line; canvas1.Children.Add(myPath); } Well, nothing special, but it makes problems - the lines are drawn different! The canvas is inside a scrollviewer, the following image shows different positions of the canvas, however the lines should look the same? Hell, how is this possible? The code above is the only code I've written by hand and it's the only content in the canvas. Anyone knows why this happens and how to prevent this? Thank you very much! Screenshot: http://www.imagebanana.com/view/c01nrd6i/lines.png

    Read the article

  • Quadratic Bezier Curve: Calculate Tangent

    - by stefan.at.wpf
    I have a quadratic bezier curve and I want to calculate the slope of the tangent in a given point. For example, let it be the middlepoint of the quadratic bezier curve, therefore t=0.5 (please see the link below for a picture of this). I've calculated the first derivative of the formula for the quadratic bezier curve; however I get 400 as value for the slope, though it should be 0. Maybe I'm using the first derivative in a wrong way? I know I could also calculate the tangents using trigonometric functions; however I'd like to do it using the first derivative, shouldn't this be possible? Thanks for any hint! For clarification / please note: I'm interested in a general way to get the slope in a arbitrary given point on a quadratic bezier curve, not only to get the tangent in the start- and end point. A picture of my problem including the text above: http://cid-0432ee4cfe9c26a0.skydrive.live.com/self.aspx/%c3%96ffentlich/Quadratic%20Bezier%20Curve.pdf Thank you very much for any hint!

    Read the article

  • Quadratic bezier curve: Y coordinate for a given X ?

    - by stefan.at.wpf
    Hello, I have a quadratic bezier curve and I need the Y coordinate of a point on the bezier curve for a given X coordinate. I know that in pure maths this can be easily done, but I'm wondering is there's a simple / another way for this in C# / WPF? Is it possible to get the single points used by C# / WPF for drawing the bezier curve and then maybe just loop them and compare the X coordinate of each point with the given X coordinate? BTW for the mathematical way it would be good to know which step for the parameter t of the bezier curve has been choosen by C# / WPF? Any chance to find this out? Probably t is just scaled by / steps for t are 1/(distance of P0 and P2) ? Thank you very much for any hint!

    Read the article

  • Regex For Finding Ctypes with Int32

    - by Stefan H
    (Hey all, I am looking for a little regex help... I am trying to find all CType(expression,Int32) s and replace them with CInt(expression) This, however, is proving quite difficult, considering there could be a nested Ctype(expression, Int32) within the regex match. Does anyone have any ideas for how to best go about doing this? Here is what I have now: Dim str As String = "CType((original.Width * CType((targetSize / CType(original.Height, Single)), Single)), Int32)" Dim exp As New Regex("CType\((.+), Int32\)") str = exp.Replace(str, "CInt($1)") But this will match the entire string and replace it. I was thinking of doing a recursive function to find the outer most match, and then work inwards, but that still presents a problem with things like CType(replaceChars(I), Int32)), Chr(CType(replacementChars(I), Int32) Any tips would be appreciated. Input returnString.Replace(Chr(CType(replaceChars(I), Int32)), Chr(CType(replacementChars(I), Int32))) Output: returnString.Replace(Chr(CInt(replaceChars(I))),Chr(CInt(replacementChars(I)))) Edit: Been working on it a little more and have a recursive function that I'm still working out the kinks in. Recursion + regex. it kinda hurts. Private Function FindReplaceCInts(ByVal strAs As String) As String System.Console.WriteLine(String.Format("Testing : {0}", strAs)) Dim exp As New Regex("CType\((.+), Int32\)") If exp.Match(strAs).Success Then For Each match As Match In exp.Matches(strAs) If exp.Match(match.Value.Substring(2)).Success Then Dim replaceT As String = match.Value.Substring(2) Dim Witht As String = FindReplaceCInts(match.Value.Substring(2)) System.Console.WriteLine(strAs.IndexOf(replaceT)) strAs.Replace(replaceT, Witht) End If Next strAs = exp.Replace(strAs, "CInt($1)") End If Return strAs End Function Cheers,

    Read the article

  • .NET PostSubmitter sends backslashes

    - by Stefan N.
    Hi, I'm using C# to send JSON to a PHP-Script, like this: string json = "{"; json += "\"prop\":\"some text\""; json += "}"; PostSubmitter post = new PostSubmitter(); post.Url = "http://localhost/synch/notein.php"; post.Type = PostSubmitter.PostTypeEnum.Post; post.PostItems.Add("note", json); post.Post(); Of course I'll have to escape the inner quotes, but they get sended to the script! To make things worse: There is text, which already has quotation marks, so those must be escaped to be valid JSON. In this case I want the backslashes to be transmitted. Any idea to accomplish this?

    Read the article

  • Nonstandard SSIS lookup

    - by Stefan
    I have a situation where I am trying to lookup a value in one table based on values in another table, using a BETWEEN operator and not an = operator. In one table, I have a value "EffectiveDate". I want to get a Weight number from another table, but the other table has two fields: "Inception" and "Termination". What I want to do is extract the Weight from that table for use where the EffectiveDate is between Inception and Termination. SSIS doesn't seem to provide a way to do this. It's good at matching one column to another column, but doesn't seem to allow one to many-column comparison/operations. Am I missing anything? Is this possible to do somehow?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >