Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mark Hurd

@Mark Hurd
About
Posts
18
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Layout messed up in Mobile device
    M Mark Hurd

    Yes, much better! There are some issues I'll report when I'm at my computer -- yes, I've entered this reply using my Windows Phone. Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Site Bugs / Suggestions

  • Layout messed up in Mobile device
    M Mark Hurd

    I did, but I've tried again for you: Viewport 320 x 486 px Resolution 136.4901098901099dpi Pixel ratio 1.421771978021978 Orientation portrait (which I believe is the same as I said above).

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Site Bugs / Suggestions

  • Layout messed up in Mobile device
    M Mark Hurd

    On my Nokia Lumia 520 with Windows Phone 8.1 Update (IE11) I just looked at a CodeProject link from a CodeProject email and wanted to report it is almost unusable (though not as bad as [StackExchange](http://meta.stackexchange.com/q/254267/147650) :-) ). When I searched for Windows Phone to see if there was an existing thread to report on, I saw a worse situation: [screen grab showing single word column](https://onedrive.live.com/redir?resid=bed13f936eb1464c!49573&authkey=!ACl8kOTSjO3mybk&v=3&ithint=photo%2Cpng) It meant I didn't even attempt to begin a post on my phone. Anyway, the original screenshots I intended to add: [screen grab showing text scrolled right](https://onedrive.live.com/redir?resid=bed13f936eb1464c!49571&authkey=!AIa1gV47uq223cg&v=3&ithint=photo%2Cpng) [screen grab showing text scrolled left](https://onedrive.live.com/redir?resid=bed13f936eb1464c!49572&authkey=!ANRy4CPOilDnLbU&v=3&ithint=photo%2Cpng) Note here the amount of whitespace on either side is rather excessive. Like I said, it is better that the SE case where the RHS cannot be seen without going to landscape, but the need to horizontally scroll is pretty bad. Seeing the other responses I see you want the information from displayinfo.aspx: Viewport 320 x 486 px Resolution 136.4901098901099dpi Pixel ratio 1.421771978021978 Orientation portrait

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Site Bugs / Suggestions

  • Programming Question
    M Mark Hurd

    In-line comments are debatable: it depends upon how "self-documenting" your names and language are. Pre-ambles are a must, especially when your IDE will give you intellisense when they're present.

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Lounge wpf csharp com business architecture

  • Val Grind (the wrong kind)
    M Mark Hurd

    Slightly in defence of the VB.NET Option Strict Off equivalent, I did see it provides a more user friendly error message. (Programmatically it loses information, because the exception type is always the same, but the error message actually displays the invalid "value".) This is NOT a defence of the current Long->String->Long scenario though.

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Weird and The Wonderful

  • Val Grind (the wrong kind)
    M Mark Hurd

    You can see from most of the replies, cargo cult programming is common in VB6. I had to deal with this sort of thing in code written for VB.NET but with Option Strict Off :-(

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Weird and The Wonderful

  • Using Google Chrome - Page scrolls when opening a message [modified]
    M Mark Hurd

    Sometime in the past two years this does seem to have been fixed :-)

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Site Bugs / Suggestions com tools tutorial question discussion

  • c# Casting v As operator
    M Mark Hurd

    For VB.NET users, the equivalent is: A.

    Dim obj As SomeObject = CType(e, SomeObject)

    or more accurately

    Dim obj As SomeObject = DirectCast(e, SomeObject)

    or B.

    Dim obj As SomeObject = TryCast(e, SomeObject)

    although VB.NET does not support SomeObject being a nullable value type. And FYI my answer is the same as most of the others, you use what is necessary depending upon the task at hand :-)

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Lounge csharp question

  • Forceful use of My.Computer.Keyboard.CtrlKeyDown set to true from Edit Menu
    M Mark Hurd

    I believe you're saying My.Computer.Keyboard.CtrlKeyDown is not reflecting the Control key state during a Click event. I was not able to confirm this behaviour: that is the CtrlKeyDown reflected the state of the Control key for me using both MenuItem and ToolStripMenuItem. Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Visual Basic question

  • High-level optimizations
    M Mark Hurd

    I don't see a program doing this for a long time (probably never*), but one way this can be performed by a human is to re-solve the problem in a different programming language. (*)Most existing "low-level" (and higher-level) optimisations can already solve many problems better than can be written in the source programming language. Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Lounge css question

  • append extra fields to existing objects
    M Mark Hurd

    You could simplify the usage of this with some Extension methods. Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Clever Code

  • \r\n
    M Mark Hurd

    David Skelly wrote:

    reverse engineering it could be a breach of the licence terms

    But not in Australia: http://www.austlii.org/au/legis/cth/consol_act/ca1968133/s47d.html[^] and it refers to "adaptation" which is defined here: http://www.austlii.org/au/legis/cth/consol_act/ca1968133/s10.html#adaptation[^] at (ba), and that is a definition of decompilation, let alone reverse engineering in general. Of course the OP is in Germany, so that is irrelevant :-)

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Weird and The Wonderful ruby

  • .NET Process does not get along with .NET console
    M Mark Hurd

    That makes sense because you're piping its IO (.RedirectStandardXxx = true), so it is not connected to the console, just your starting program. I have confirmed this by replicating your exception (in VB.NET) and then only changing to

    .RedirectStandardOutput = False

    and there is then no error, but it may of course not be the functionality you need.

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Weird and The Wonderful csharp testing beta-testing

  • Using Google Chrome - Page scrolls when opening a message [modified]
    M Mark Hurd

    I thought this was the Chrome-specific issue where it has trouble with anchors when it displays pages that were not visible when originally rendered, but your link to an example of this problem (I used the "new window" alternative, which displays as a new current tab) shows that this is not the issue. I think I've had pages where the problem goes away after a refresh or a move to subsequent comment pages. BTW It is NOT happening for me on this "very" message, and Clearly there are other comments that work fine -- I'd say this problem occurs about 10% of the time. After submitting this comment I found it is happening for this message, just not as bad: only about half a page out -- not enough to stop reading the comment exposed.

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Site Bugs / Suggestions com tools tutorial question discussion

  • Censorship and the expectations of society
    M Mark Hurd

    Seeing as no one has yet answered your specific question IANAL but, in Australia we do not have a Bill of Rights or any other explicit Freedom of Speech provision, and our defamation laws & common law precedents have preferred harm (for want of a better word) over truth as a defence, although according to Wikipedia http://en.wikipedia.org/wiki/Defamation#Australia[^] that is no longer meant to be the case. Note that Wikipedia link shows the state of defamation laws in other countries too, and http://en.wikipedia.org/wiki/Freedom_of_speech_by_country[^] shows similar details more directly answering the question.

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Lounge com json tutorial question career

  • How to get today's date
    M Mark Hurd

    And I should add the simplest version is: DateTime.Today

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Weird and The Wonderful csharp ruby tutorial

  • VB Select Case statement incarnation of C# if (true = [condition])
    M Mark Hurd

    Think of it as If ElseIf statements with uniform indentation of the conditionals. Of course in this case it could be reduced to:

    If [failure condition 1] Then _
    Throw New Exception("Condition 1 failed.")

    If [failure condition 2] Then _
    Throw New Exception("Condition 2 failed.")

    'etc...

    'Success!

    But in defence of Select Case True, it used to be the easiest way to get short-circuiting in VB6. Could this code have been around long enough to have been converted?

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    The Weird and The Wonderful csharp help

  • Regular Expression trouble
    M Mark Hurd

    Or [-+/] or [+/-]. - at the start or end of the group is documented to just match '-'.

    Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

    Clever Code regex learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups