Search Results

Search found 9 results on 1 pages for 'runrunraygun'.

Page 1/1 | 1 

  • Show EPS file in IE8 with standards modes set to IE8

    - by runrunraygun
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"> With this set my EPS files are not rendered in ABCpdf, but set to EmulateIE7 and they work fine. I know EPS aren't a standard web format but they are embedded into a PDF using a bit of ABCpdf magic. Because IE8 isn't even trying to show them they are not appearing on the PDF as they previously were. <embed style="abcpdf-tag-visible: true;width:40px;height:40px;" id="C:\myfile.eps" src="myfile.eps">

    Read the article

  • int, short, byte performance in back-to-back for-loops

    - by runrunraygun
    (background: http://stackoverflow.com/questions/1097467/why-should-i-use-int-instead-of-a-byte-or-short-in-c) To satisfy my own curiosity about the pros and cons of using the "appropriate size" integer vs the "optimized" integer i wrote the following code which reinforced what I previously held true about int performance in .Net (and which is explained in the link above) which is that it is optimized for int performance rather than short or byte. DateTime t; long a, b, c; t = DateTime.Now; for (int index = 0; index < 127; index++) { Console.WriteLine(index.ToString()); } a = DateTime.Now.Ticks - t.Ticks; t = DateTime.Now; for (short index = 0; index < 127; index++) { Console.WriteLine(index.ToString()); } b=DateTime.Now.Ticks - t.Ticks; t = DateTime.Now; for (byte index = 0; index < 127; index++) { Console.WriteLine(index.ToString()); } c=DateTime.Now.Ticks - t.Ticks; Console.WriteLine(a.ToString()); Console.WriteLine(b.ToString()); Console.WriteLine(c.ToString()); This gives roughly consistent results in the area of... ~950000 ~2000000 ~1700000 which is in line with what i would expect to see. However when I try repeating the loops for each data type like this... t = DateTime.Now; for (int index = 0; index < 127; index++) { Console.WriteLine(index.ToString()); } for (int index = 0; index < 127; index++) { Console.WriteLine(index.ToString()); } for (int index = 0; index < 127; index++) { Console.WriteLine(index.ToString()); } a = DateTime.Now.Ticks - t.Ticks; the numbers are more like... ~4500000 ~3100000 ~300000 Which I find puzzling. Can anyone offer an explanation? NOTE: In the interest of compairing like for like i've limited the loops to 127 because of the range of the byte value type. Also this is an act of curiosity not production code micro-optimization.

    Read the article

  • IDE underlining custom attributes

    - by runrunraygun
    I have a custom attribute... [System.AttributeUsage(System.AttributeTargets.All)] public class Refactor : System.Attribute { private string _message; public Refactor() { _message = string.Empty; } public Refactor(string message) { _message = message; } } Applied to [Refactor("this should be less rubbish")] public virtual void RubbishMethod() { … } Now when someone makes a call to RubbishMethod I'd like the IDE (vs2008) to underline that call in a deep brown colour, similar to if I mark as Obsolete you get a green wave line. Is this possible? I've been racking my brain and hitting the google but I can't find how and where to do this.

    Read the article

  • Show EPS file in ABCpdf with standards modes set to IE8

    - by runrunraygun
    <meta http-equiv="X-UA-Compatible" content="IE=8"> or <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"> With this set my EPS files are not rendered in ABCpdf, but set to EmulateIE7 and they work fine. I know EPS aren't a standard web format but they are embedded into a PDF using a bit of ABCpdf magic. Because IE8 isn't even trying to show them they are not appearing on the PDF as they previously were. <embed style="abcpdf-tag-visible: true;width:40px;height:40px;" id="C:\myfile.eps" src="myfile.eps">

    Read the article

  • moving SDL video surface

    - by runrunraygun
    Does anyone know how to move my SDL.net video surface around the screen programtically? Surface videoContext = Video.SetVideoMode(1024, 768, 32, false, false, false, true, true); var a = System.Windows.Forms.Control.FromHandle(Video.WindowHandle); var b = System.Windows.Forms.NativeWindow.FromHandle(Video.WindowHandle); I can't find any properties in Surface or Video which do the job, and FromHandle is returning Null. The window is initializing falling off the bottom of the screen. Any ideas?

    Read the article

  • In xpath why can I use greater-than symbol > but not less-than <

    - by runrunraygun
    Using c#3 compiled transforms the following seems to work just fine... <xsl:choose> <xsl:when test="$valA > $valB"> <xsl:value-of select="$maxUnder" /> </xsl:when> <xsl:when test="$valA &lt; $valC"> <xsl:value-of select="$maxOver" /> </xsl:when> </xsl:choose> However if i dare use a < in place of &lt; it gives an error... <xsl:choose> <xsl:when test="$valA > $valB"> <xsl:value-of select="$maxUnder" /> </xsl:when> <xsl:when test="$valA < $valC"> <xsl:value-of select="$maxOver" /> </xsl:when> </xsl:choose> System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character. So why is > ok and not < ?

    Read the article

  • Why is one Func valid and the other (almost identical) not.

    - by runrunraygun
    private static Dictionary<Type, Func<string, object>> _parseActions = new Dictionary<Type, Func<string, object>> { { typeof(bool), value => {Convert.ToBoolean(value) ;}} }; The above gives an error Error 14 Not all code paths return a value in lambda expression of type 'System.Func<string,object>' However this below is ok. private static Dictionary<Type, Func<string, object>> _parseActions = new Dictionary<Type, Func<string, object>> { { typeof(bool), value => Convert.ToBoolean(value) } }; I don't understand the difference between the two. I thought the extra braces in example1 are to allow us to use multiple lines in the anon function so why have they affected the meaning of the code?

    Read the article

1