TekOnline

Category: Programming

  • File Audit with Entity Framework: Retrieve and Check Missing Files with Closest Modification Date

    File Audit with Entity Framework: Retrieve and Check Missing Files with Closest Modification Date

    The FileAudit method is a useful way to retrieve file names from a database table and check if these files exist in a specified directory. With supporting methods like GetParent and GetClosestFile, it provides information about the missing files and the closest file based on the modification date. This article delves into the details of…

  • XPath Cheat Sheet ๐ŸŽฎ

    XPath Cheat Sheet ๐ŸŽฎ

    Hopefully you find these handy! Handy XPath operators Putting it all together๐ŸŒผ Sure, here are a few examples of using XPath with Selenium in C#: Once you have found the element, you can interact with it using various methods such as Click(), SendKeys(), Clear(), GetAttribute(), GetCssValue(), GetText(), and more. For example, to click on an…

  • Adding session timeout to ASP.NET MVC 5

    Adding session timeout to ASP.NET MVC 5

    As part of security improvements, we needed to add a session time out in one of our apps. One of the challenges though is that users could be in the middle of submitting their work, go past the timer, then submit, and because their session has expired, they loose their work. Here is how we…

  • MVC 5 Dynamic redirect Uri for external OpenId authentication

    MVC 5 Dynamic redirect Uri for external OpenId authentication

    If you are like me, you dont like having extra configuration in your web transforms. Originally I was setting the redirect uri statically from the web config using However, this means that we need a separate web config when we run locally vs when we run on the server. Also, the redirecturi is static. ๐Ÿ˜ข…

  • Download JSON data dynamically in Angular

    Download JSON data dynamically in Angular

    Here is a quick code snippet that shows how we can download JSON data. This is useful for saving the application ‘state’ kind of like a save feature ๐Ÿ“ผ I hope this helps you create a component that allows you to save JSON data โœ”

  • Star Haulers

    Inspired by the hit game Lovers in a Dangerous Spacetime, our game offers a unique local co-op experience that will test your teamwork and communication skills like never before. With a fun and engaging learning curve, this game is perfect for families who want to bond and have fun together. Rally your family and work…

  • Cant push to git? Maybe you need this…

    If you cant push to GIT, it may be something as simple as configuring your git settings. You can do the following by typing these commands in git bash:

  • How to map from one dynamic object to another in typescript ๐ŸŒ

    I wanted users to be able to select a style from a drop down at GeoJson-Styler (jcianci12.github.io) The user can choose how they want their geoJSON objects styled. at the moment the options are colour, text, and opacity. The classes look as follows: As you can see the text class is different to the other…

  • Fixing MVC 5 Intellisense false errors (erroneous errors) ๐Ÿ˜ข๐Ÿ˜ฃ๐Ÿ˜–

    This one really had me scratching my head. My error was looking similar to this stack overflow post – like this: The type ‘Expression<>’ is defined in an assembly that is not referenced Here is what worked for me… Locate the Web.Config in the root of your project (not the one in the views folder)…

  • Angular CSV to JSON ๐Ÿš—

    Here is a handy little pipe that allows csv to JSON (Usefull for importing CSV files into your angular app)