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
N

Nish Nishant

@Nish Nishant
About
Posts
35.7k
Topics
2.2k
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Does the source code syntax highlighter support highlighting a subset of lines?
    N Nish Nishant

    Thanks Sean. Yeah, after a bit of a break, I've resumed posting some content here. I did get it working. The trick is to be minimalistic in using it. Just highlight a few specific lines. If there are line-breaks in between, that seems to mess it up.

    Nish Nishant

    Site Bugs / Suggestions php tutorial question

  • Does the source code syntax highlighter support highlighting a subset of lines?
    N Nish Nishant

    Looks like there's a workaround for this, and it's one I had used 10+ years ago. Also, I did work on the original syntax coloring code 20-ish years ago, not sure if the current version has any remnants from those days though. The workaround is to use <span class='highlight'> inside the <pre> block.

    Example

    class Program
    {
    static void Main()
    {
    Console.WriteLine("Sup?");
    }
    }

    Nish Nishant

    Site Bugs / Suggestions php tutorial question

  • Does the source code syntax highlighter support highlighting a subset of lines?
    N Nish Nishant

    Hey Chris / other CP staff, I was wondering if there was a way to highlight a few lines from a source code block? A few WordPress plugins support it and it's quite handy when you want to call out modifications. The current alternative is to use line-numbers and then call that out (example : see lines 7 to 9).

    Nish Nishant

    Site Bugs / Suggestions php tutorial question

  • C# puzzle....
    N Nish Nishant

    Also one of the more interesting posts here in recent times.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge csharp performance question

  • C# puzzle....
    N Nish Nishant

    Thanks, good way of looking at it I suppose.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge csharp performance question

  • C# puzzle....
    N Nish Nishant

    Yep, I used .NET Core which may explain the difference.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge csharp performance question

  • C# puzzle....
    N Nish Nishant

    This is the code I ran in release mode. (.NET Core)

    class Program
    {
    const string _str = "abcdefghijklmnopqrstuvwxyz";

    static void Main(string\[\] args)
    {
        Foo("A", () => \_str.Contains("~"));
        Foo ("B", () => \_str.Contains('~'));
        Foo("C", () => \_str.IndexOf("~") >= 0);
        Foo("D", () => \_str.IndexOf('~') >= 0);
        Foo("E", () => \_str.IndexOf("~", StringComparison.Ordinal) >= 0);
    }
    
    static void Foo(string s, Func<bool> action)
    {
        var sw = new Stopwatch();
        sw.Start();
        for (int i = 0; i < 1000000; i++)
        {
            action();
        }
        sw.Stop();
        Console.WriteLine($"{s} - {sw.Elapsed.Milliseconds}");
    }
    

    }

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge csharp performance question

  • C# puzzle....
    N Nish Nishant

    I did cheat, and run a quick console app. But D seems fastest, very closely followed by B. Barely really. Then A, and behind A is E. Slowest is C.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge csharp performance question

  • Question for the non-U.S. folks
    N Nish Nishant

    Mileage here refers to the odometer reading. Not fuel efficiency.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge question

  • Question for the non-U.S. folks
    N Nish Nishant

    In India or Indian origin drivers here?

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge question

  • Question for the non-U.S. folks
    N Nish Nishant

    Yeah, but in Commonwealth countries mileage refers to fuel efficiency. In the States it refers to miles on the odometer.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge question

  • iPad problem on cp home page
    N Nish Nishant

    Really? That's as popular as IE 5 on Amazon Linux. Come on, Chris. :rolleyes:

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    Site Bugs / Suggestions csharp ios help

  • Mama Mia, that's a spicy meatball!
    N Nish Nishant

    Yep, that's right.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com

  • Mama Mia, that's a spicy meatball!
    N Nish Nishant

    Looks like you can get other 24 GB GPUs for $500-ish.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com

  • Anyone here got a Gizmo watch for their kids?
    N Nish Nishant

    Good points but we were mostly curious about the GPS tracking as a safety feature when dropping him off for classes. Also an easy way for him to stay in touch with us.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com beta-testing question code-review

  • Anyone here got a Gizmo watch for their kids?
    N Nish Nishant

    Hmmm, that's scary. :eek:

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com beta-testing question code-review

  • Anyone here got a Gizmo watch for their kids?
    N Nish Nishant

    :laugh:

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com beta-testing question code-review

  • Anyone here got a Gizmo watch for their kids?
    N Nish Nishant

    I don't have any Apple products at home - no phone/laptop/tablet/other-device. So I am not sure I want to spend that kinda money when there's no existing ecosystem to fit it into.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com beta-testing question code-review

  • Anyone here got a Gizmo watch for their kids?
    N Nish Nishant

    There are under $100.

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com beta-testing question code-review

  • Anyone here got a Gizmo watch for their kids?
    N Nish Nishant

    It's a basic smart watch for kids. Has GPS tracking, and has a feature where the kid can text or voice call a select list of recipients (usually dad/mom/nanny).

    Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

    The Lounge com beta-testing question code-review
  • Login

  • Don't have an account? Register

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