Software Development
...see more

The following script will change the URL in the browser address bar. This includes updating the title and the link.

<script type="text/javascript">
function ChangeUrl(title, url) {
        if (typeof (history.pushState) != "undefined") {
            var obj = { Title: title, Url: url };
        history.pushState(obj, obj.Title, obj.Url);
    } else {
        alert("Browser does not support HTML5.");
    }
}
ChangeUrl("Title", "Link");
</script>


...see more

A good website is always changing. New content is added based on user feedback or fresh articles provided to encourage new conversations. Understand that designing a website isn’t something you do once and forget, it is a successful ongoing process.

...see more

Keep in mind that you will be driving the project in terms of making final decisions, delivering content, and providing overall direction to your website development team. Be fair, be flexible, and be realistic when reporting back to your manager on when you’ll be able to realistically deliver each stage of your new website.

...see more

Don’t be afraid to do something different from your competition. Your website is your face to the world. Why not stand out from the crowd with something totally different than your industry?!

...see more

The number one challenge businesses face in rebuilding a website is not devoting enough time to it to make it successful. Your investment of time should be equal to your monetary investment. It is never too early to have copy and research-ready.

...see more

The best way to get inspired is to pretend you’re a gumshoe. Gather secret intel on the competition’s websites, websites in other industries, or even your favorite brand’s websites. A few minutes of searching can inspire new directions or innovative ways to showcase tired content.

...see more

Mobile devices continue to climb year-over-year indicating that more users are searching while on the go. Plus, with Google’s latest algorithm, your site must be mobile-friendly or it gets punished through lower search results.

...see more

Your design, navigation, and content should be driven by a purpose that aligns with your audience and their goals.

...see more

The internet’s source of freely usable images.

Powered by creators everywhere.

Beautiful Free Images & Pictures | Unsplash

...see more

The Essential Guide to Using Images Legally Online

Image use can be tricky. Learn EXACTLY how to use images online legally, how to interpret licenses, and find copyright-free images.

The Essential Guide to Using Images Legally Online (searchenginejournal.com)

...see more

7 Reasons Why Content Needs Amazing Images, Videos & Visuals

Find out why you should add rich media like images, videos, infographics, and other visuals to your content to improve messaging and user experience.

7 Reasons Why Content Needs Amazing Images, Videos & Visuals (searchenginejournal.com)

...see more

How to Pick Memorable Images for Your Content

Images almost always make your content more engaging for readers. Here are four surefire ways to pick memorable images for your next post.

How to Pick Memorable Images for Your Content (searchenginejournal.com)

...see more

41 Best Stock Photo Sites to Find High-Quality Free Images

Tired of boring stock images? Check out this list of 41 websites that offer beautiful photos you will actually want to use.

41 Best Stock Photo Sites to Find High-Quality Free Images (searchenginejournal.com)

...see more

Why These 5 Unexpected Content Marketing Skills Are a Must to Build in 2021

In today's digital age, self-built skills are becoming more necessary. Here are 5 you need to learn to be market-ready in the content marketing industry.

Why These 5 Unexpected Content Marketing Skills Are Must-Builds in 2021 (searchenginejournal.com)

...see more

7 Things Content Marketers Can Learn From the Entertainment Industry

In the entertainment industry, content is the product — and they know how to market it. Here are 7 things content marketers can learn and apply.

41 Best Stock Photo Sites to Find High-Quality Free Images (searchenginejournal.com)

...see more

Docker is a platform for packaging, distributing, and running applications


  • Simplifies packaging applications and their dependencies
  • Consistent experience
  • Host isolation


Concepts

  • Images: The image contains the filesystem and path to the application executable when you run the image
  • Registries: A Docker Registry is a repository that stores your Docker images and allows easy sharing of those images between different people and computers
  • Containers: A running container is a process running on the host running Docker, but it's completely isolated from both the host and all other processes running on it


The Docker Workflow

  1. The developer first builds an image and pushes it to the Docker Registry
  2. Pull the image from the Docker Registry to any machine of choice
  3. Run the image on a Docker host
...see more

The image contains the filesystem and path to the application executable when you run the image

...see more

A Docker Registry is a repository that stores your Docker images and allows easy sharing of those images between different people and computers.

...see more

A running container is a process running on the host, but it's completely isolated from both the host and all other processes running on it.


  • Containers offer the lightweight design of a process and the isolation of an operating system
  • Containers are becoming the ubiquitous choice for the 'Compute' platform
...see more

Create List

let set1 = toscalar (AzureNetworkAnalytics_CL | take 1 | project FlowCount_d);
print set1


Compare two lists

let history = dynamic (['20.150.9.36','20.50.65.82']);
let current = dynamic (['20.150.9.36','20.50.65.82', '10.0.0.10']);
print set_difference(current, history)
...see more
let startdate = ago(1h);
let current = toscalar(AzureNetworkAnalytics_CL
 | where FlowStartTime_t > startdate
 | where SubType_s == "FlowLog" and FlowDirection_s == "O"
 | extend DestinationIP = extract("(([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.(([0-9]{1,3})))", 1, DestPublicIPs_s)
 | distinct DestinationIP
 | summarize make_list(DestinationIP));
let history = toscalar (AzureNetworkAnalytics_CL
 | where FlowStartTime_t <= startdate and FlowStartTime_t > ago(2d)
 | where SubType_s == "FlowLog" and FlowDirection_s == "O"
 | extend DestinationIP = extract("(([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.(([0-9]{1,3})))", 1, DestPublicIPs_s)
 | distinct DestinationIP
 | summarize  make_list(DestinationIP));
print set_difference(current, history)
...see more
  • Count will return the number of rows in the query
  • Where allows filtering the rows that are returned based on a condition
  • Take will return a specified number of rows, but no guarantee which rows are returned
  • Sort will allow sorting the output into an order
  • Top will return the first N records sorted by the specified column
  • Extend command allows creating new columns from existing columns or other data such as hard-coded values
  • Summarize will return the total values for a specific grouping of rows
...see more
  1. The user navigates to SPA, which redirects the user to IdP to sign in.
  2. User signs in (and authorizes the application, if needed).
  3. IdP returns the user to SPA with Authorization Code.
  4. JavaScript code in SPA sends the Authorization Code to a login endpoint on the REST API Server.
  5. The REST API Server sends a request to the IdP Server containing the Authorization Code (and usually also a Client ID and Client Secret, which identify the REST API Server to the IdP server).
  6. The IdP validates the Authorization Code and sends the Access Token and ID Token to the REST API Server.
  7. The REST API Server stores the Access Token and ID Token in its memory and send its own Session Token back to the SPA.
  8. For every request the SPA makes to the REST API Server, it includes the Session Token which the REST API Server gave it. If the REST API Server needs to request resources from another server, it uses the stored Access Token to make that request.

 

...see more

Steps

  1. The user navigates to SPA, which redirects the user to IdP to sign in.
  2. User signs in (and authorizes the application, if needed).
  3. IdP returns the user to SPA with Access Token and ID Token.
  4. JavaScript code in SPA stores the Access Token and ID Token in the browser's localStorage and sends the Access Token to the REST API server for every request it makes (usually as an Authorization: Bearer <access token> header).
  5. If needed, REST API Server checks the validity of the Access Token by talking to the IdP. (Often, signing the token in the IdP and verifying that signature will be enough, and no communication is actually necessary.)
NOTE: As of April 2019, the OAuth Working Group no longer recommends the use of Implicit Flow for most cases because there are better, more secure ways to accomplish the same things.
...see more

Install Helm with a package manager or download a binary.


choco install kubernetes-helm


...see more

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backward-compatible manner, and
  • PATCH version when you make backward-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

...see more

Build business-centric APIs for app developers using internal integration APIs

...see more

Enable API search and support for lifecycle API stages from registration through publishing and retirement.

...see more

While writing any RESTful services, we always have to think about the consumers who would like to consume the services in the best way possible. It is supposed to be simple and straightforward to make their job easier.

...see more

Consumers need to understand the services so that they can consume them most suitably. Hence, use standard documentation that is simple and straightforward to understand by your consumers.

...see more

We can experience this as and when we implement the REST services, I have never come across a situation where I have to implement REST services without using HTTP. Hence, the more we use HTTP, the better RESTful services can be provided.

...see more

We must use the proper Request Methods for our services. The consumer will be confused if we use POST for a Delete operation or even a GET mapping to create a new resource.

Note: It is also important to understand the differences between POST and PUT

...see more

Most of the consuming services will be implemented according to the Status codes that we provide, and hence we must always provide the most appropriate HTTP Status codes in our response. It will be meaningless if we send a 200 (Status: OK) for a service where the resource is not found or even 500 (Server error) where there is actually a NullPointerException.

Note: More details on HTTP methods and status codes can be found here.

...see more

We should not request any information which may be secure in the URI. Consider service to create a new user. It would be good to use POST mapping instead of GET and pass the user information in the Request Body instead of using Path parameters.

...see more

It is also important to define a consistent approach to handle any exceptions in the application so it would be easier for the consumer to understand the REST services.

...see more

It is strongly advised not to use Verbs in the URI. Instead, we should be using Nouns to make it simpler for the consumers to consume the services. Consider we have two services to retrieve user details and create a new user, /get/users and /create/user is said to be BAD practice. Instead, we should use GET mapping with the URI as /users and a POST mapping with the URI as /users.

...see more

API Management can act as a front door for applications to access data, business logic, or functionalities.

...see more

Term with description

  • Resource Owner: The actual user who owns data (the profile data)
  • Client: Application like the website
  • Authorization server: System where I can say yes. AAD
  • Resource Server: API that holds data, contact API
  • Authorization grant: Proves that the user has said yes
  • Redirect URI: Redirect back to the client application
  • Access token: A key to getting access to what the user has granted
  • Scope: List of scopes (read email, write an email, read contacts, etc.) this will be requested
  • Consent: Screen to consent to the list of scopes
...see more

Terms

  • Connects message Producers with message Consumers
  • Handler: The logic of the consumer
  • Command; Message that requests a change of state
  • Event: Message that indicates something of interest (no change of state)
  • Topic/Subscription: Special queues that allow inbound messages to be picked up by multiple interested parties
  • Service Bus: An ESB platform
  • Pipeline: A logic stream of messages that are related to each other
  • Idempotent: Operation that, when repeated, will produce the same result
  • Guaranteed delivery: Messages are stored and forwarded to ensure they are delivered
  • At least once delivery: To achieve reliability, there may be occasions that messages are sent more than once
  • Loosely Coupled: All communication is done via messages
  • Platform Agnostic: Producer and Consumer may be on different platforms
  • Asynchronous: Producer can continue work after sending messages to the Broker

Messaging = ICP (Inter-Process Communication) with clear boundaries

...see more
  • Common functionality grouped together in a service
  • Various HTTPS/REST endpoints with appropriate verbs
  • Typically implement CRUD operations
  • Has its own database/storage
  • Uses a service registry to locate services
...see more
  • Each step is typically processed synchronously
  • Complex retry mechanisms
  • Duplicate order handling
  • Overall order is processed synchronously
  • The business logic is implemented in the front-end
  • Not scalable
...see more

Canary was an essential part of British mining history. These humble birds were used to detect carbon monoxide and other toxic gases before the gases could hurt humans (the canary is more sensitive to airborne toxins than humans). The term “canary analysis” in software deployment serves a similar purpose. Just as the canary notified miners about any problems in the air they breathed, DevOps engineers use a canary deployment analysis to gauge if their new release in CI/CD process will cause any trouble to business.

You can consider the following general definition of a canary release deployment: canary deployment is a technique to reduce the risk of introducing a software update in production by slowly rolling out the change to a small subset of users before making it available to everybody. 

Source: What is Canary Deployment Strategy ? Benefits and Constraints (opsmx.com)

...see more

In software engineering, canary deployment is the practice of making staged releases. We roll out a software update to a small part of the users first to test it and provide feedback. Once the change is accepted, the update is rolled out to the rest of the users.

Canary deployments show us how users interact with application changes in the real world. As in blue-green deployments, the canary strategy offers no-downtime upgrades and easy rollbacks. Unlike blue-green, canary deployments are smoother, and failures have limited impact.

A canary release is an early build of an application.

Source: What Is Canary Deployment? - Semaphore (semaphoreci.com)

...see more

Why go to the trouble of implementing a canary strategy? The benefits are many:

  • A/B testing: we can use the canary to do A/B testing. In other words, we present two alternatives to the users and see which gets better reception.
  • Capacity test: it’s impossible to test the capacity of a large production environment. With canary deployments, capacity tests are built-in. Any performance issues we have in our system will crop up as we slowly migrate the users to the canary.
  • Feedback: we get invaluable input from real users.
  • No cold starts: new systems can take a while to start up. Canary deployments slowly build up momentum to prevent cold-start slowness.
  • No downtime: like blue-green deployments, a canary deployment doesn’t generate downtime.
  • Easy rollback: if something goes wrong, we can easily roll back to the previous version.

Source: What Is Canary Deployment? - Semaphore (semaphoreci.com)

...see more
  • Performance of the application can be improved.
  • Scalability of the system by reducing the load on key components of the application
  • Move frequently accessed data closer to the application
  • Faster response time
  • Resilience by having a read-only copy of data make it more stable and responsive
...see more

Caching should be considered for

  • Repeatedly accessed data, especially if that data remains unchanged
  • Data source performance
  • Data contention, like when multiple processes competing for the same data
  • Physical location, to reduce network latency
...see more

Caching Patterns

  • Cache-aside Pattern stores the most frequently accessed data in the cache, so it's quickly available without first having to query the database.
  • Content Cache Pattern will store static content like images, stylesheets, etc., and will reduce the load on the server.
  • User Session Caching Pattern is used to maintain the application state between sessions.

Advanced Caching Patterns

  • Job and Message Queuing to handle long-running tasks or operations that can negatively impact the application's performance. So offload them to queues where they are run in sequence.
  • Distributed Transactions for a group of commands that must be run against a back-end datastore that acts as a single atomic operation.

More details about Caching Patterns - snippset.

...see more

Things to consider to estimate the size of the cache:

  • Number of concurrent cached objects
  • Size of cache objects
  • Number of cache requests
  • Cache expiration policy
...see more

Databases are often too large to load directly into a cache. It is common to use the cache-aside pattern to load data into the cache only as needed. When the system makes changes to the data, the system can also update the cache, which is then distributed to other clients. Additionally, the system can set an expiration on data or use an eviction policy to trigger data updates into the cache.

Further reading at Tutorial: Create a Web App (cache-aside) - Azure Cache for Redis | Microsoft Docs

...see more

Many web pages are generated from templates that use static content such as headers, footers, banners. These static items shouldn't change often. Using an in-memory cache provides quick access to static content compared to backend datastores. This pattern reduces processing time and server load, allowing web servers to be more responsive. It can allow you to reduce the number of servers needed to handle loads. Azure Cache for Redis provides the Redis Output Cache Provider to support this pattern with ASP.NET.

Further reading at ASP.NET Output Cache Provider for Azure Cache for Redis | Microsoft Docs

...see more

This pattern is commonly used with shopping carts and other user history data that a web application may want to associate with user cookies. Storing too much in a cookie can have a negative impact on performance as the cookie size grows and is passed and validated with every request. A typical solution uses the cookie as a key to query the data in a database. Using an in-memory cache, like Azure Cache for Redis, to associate information with a user is much faster than interacting with a full relational database.

Further reading at Cache ASP.NET Session State Provider | Microsoft Docs

...see more

Applications often add tasks to a queue when the operations associated with the request take time to execute. Longer running operations are queued to be processed in sequence, often by another server. This method of deferring work is called task queuing. Azure Cache for Redis provides a distributed queue to enable this pattern in your application.

...see more

Applications sometimes require a series of commands against a backend data store to execute as a single atomic operation. All commands must succeed, or all must be rolled back to the initial state. Azure Cache for Redis supports executing a batch of commands as a single transaction.

...see more

Caching is a mechanism to store frequently accessed data in a data store temporarily and retrieve this data for subsequent requests instead of extracting it from the original data source. This process improves the performance and availability of an application. Reading data from the database may be slower if it needs to execute complex queries.

...see more

Snippset uses the amsify.suggestags plugin for tagging.

To use the plugin include the CSS and JavaScript files on the page and attach the plugin to the input field.

<link href="~/lib/suggestags/css/amsify.suggestags.css" rel="stylesheet" />
...
<script src="~/lib/suggestags/js/jquery.amsify.suggestags.js"></script>
...
$('input[id="snippTags"]').amsifySuggestags({
    type: 'bootstrap',
    defaultTagClass: ['suggestags-tg']
});

The source code can be found at GitHub - amsify42/jquery.amsify.suggestags: This is a JQuery plugin for input tags with auto complete suggestion.

Additional Resources

...see more

MiniProlifer helps you understand how your application is performing by allowing you to profile any part of code in ASP.NET Core Applications.

What is MiniProfiler?

MiniProfiler is a simple but effective mini-profiler for .NET, Ruby, Go, and Node.js. MiniProfiler is a simple, easy to use & lightweight profiler that can be used in ASP.NET Core applications to analyze where code is spending most of the time.

Click here for more details from the official documentation.

Further description on how to implement profiling at Using MiniProfiler | Talagozis.

...see more

In-Memory Caching in ASP.NET Core is a Service that should be registered in the application's service container by adding the following line to the ConfigureServices method.

services.AddMemoryCache();


public IActionResult CacheAutoExpiringTryGetValueSet()
{
    DateTime cacheEntry;

    if (!_cache.TryGetValue(CacheKeys.Entry, out cacheEntry))
    {
        cacheEntry = DateTime.Now;

        var cts = new CancellationTokenSource(TimeSpan.FromSeconds(10));

        var cacheEntryOptions = new MemoryCacheEntryOptions()
            .AddExpirationToken(new CancellationChangeToken(cts.Token));

        _cache.Set(CacheKeys.Entry, cacheEntry, cacheEntryOptions);
    }

    return View("Cache", cacheEntry);
}
...see more

Add Link Numbers by using the Highlight.js plugin.

Usage

Include file after highlight.js by getting the library from CDN with

<script src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>

Initialize plugin after highlight.js:

$(document).ready(function () {
    $('pre.ql-syntax').each(function (i, block) {
        hljs.highlightElement(block);
        hljs.lineNumbersBlock(block);
    });
});

Styling

For some styles use

/* for block of numbers */
.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    text-align: center;
    color: #ccc;
    border-right: 1px solid #CCC;
    vertical-align: top;
    padding-right: 5px;

    /* your custom style here */
}

/* for block of code */
.hljs-ln-code {
    padding-left: 10px;
}

Further details about this plugin can be found at GitHub - wcoder/highlightjs-line-numbers.js: Line numbering plugin for Highlight.js

...see more

This short Snipp shows you how to remove the last commit from the git repository.

1. Check the logs

First of all, check your local commit with messages before removing the last commit. Run the following command to check the logs in one line.

git log --oneline

2. Remove the last commit from the local branch

Now, Run the following command to remove the last commit and discard the changes from the local branch.

git reset --hard HEAD~1

Checkout the different ways to Undo commit before push in Git.

3. Update remote repository

At last, we will update the files and again need to push with force. It will delete the previous commit and keep a new one on the remote git repository.

git push origin <name_of_branch> -f

Now you can check the logs to verify the commit in the git repository.

...see more

To clear an input field, we need to set the value to an empty string. The following script shows how to clear an input field when clicking on a link.

<a href="#" onclick="clearDropdownSearch(this);">
// ...
function clearDropdownSearch(aTag) {
    const inputTag = aTag.parentElement.getElementsByTagName("INPUT")[0];
    inputTag.value = "";
    // ...
}

Additional resources to clear an input field:

...see more

The standard way of creating a delay in JavaScript is to use its setTimeout method. For example:

console.log("Hello");
setTimeout(() => {  console.log("World!"); }, 2000);

This would log “Hello” to the console, then after two seconds “World!” And in many cases, this is enough: do something, wait, then do something else. Sorted!

...see more

Method Draw is a pretty good SVG file editing app that you can use to make changes to your existing SVG file. From altering the color to adding shapes, you can do anything with the help of the Method Draw web app. This particular app will allow you to import more than one SVG file. However, if you want to export, you will get two options, i.e., PNG and SVG. The drawback of this tool is you won’t get any “Layer” option. That implies that you cannot do any layer-level editing. This tool has a clean and simple UI.

...see more

SVG-edit is a fast, web-based, JavaScript-driven SVG drawing editor that works in any modern browser.

SVG-edit (svgedit.netlify.app)

...see more
private string ReplaceBlankTarget(string text)
{
    string pattern = @"<a href=""https:\/\/(?<link>[^""]+)"" target=""_blank"">";
    string substitution = @"<a href=""https:\/\/${link}"" target=""_self"">";

    RegexOptions options = RegexOptions.Multiline;

    Regex regex = new Regex(pattern, options);
    return regex.Replace(text, substitution);
}

 

...see more

The target attribute is set in the link blot. You can extend the link blot to remove this attribute:

var Link = Quill.import('formats/link');

class MyLink extends Link {
    static create(value) {
        let node = super.create(value);
        value = this.sanitize(value);
        node.setAttribute('href', value);
        if (value.includes(thisDomain)) {
            node.removeAttribute('target');
        }
        return node;
    }
}

Quill.register(MyLink);

Additional Resources:

...see more

Agile architecture refers to architecture practices that embrace agile principles and values, which support the continuous delivery of software services and help to align architects with DevOps teams. It does not imply specific architecture models or reference architectures.

To support the continuous flow of value through the continuous delivery pipeline, agile architecture:

  • Evolves over time while supporting the needs of current users
  • Ensures the ‘system always runs’
  • Balances emergent design and intentionality
  • Takes a systems view across the full value stream
  • Avoids overhead and delays associated with phase-gate and big-design-up-front methods

Source: Scaled Agile, Inc. Agile Architecture in SAFe

The agile architecture supports agile development practices through collaboration, emergent design, intentional architecture, and design simplicity. Like agile development practices, agile architecture also enables designing for testability, deployability, and releasability. It is further supported by rapid prototyping, domain modeling, and decentralized innovation.

...see more

Three primary aspects of building and maintaining architectures that support constant change include:

  • Fitness functions
  • Incremental change
  • Appropriate coupling

An architectural fitness function provides an objective integrity assessment of some architectural characteristic(s).

An evolutionary architecture supports guided, incremental change across multiple dimensions. Incremental change describes two aspects of software architecture: how teams build software incrementally and how they deploy it. Guided change means, once architects have chosen important characteristics, they want to guide changes to the architecture to protect those characteristics.

Evolutionary architecture focuses on appropriate coupling—how to identify which dimensions of the architecture should be coupled to provide maximum benefit with minimal overhead and cost.

Read more about evolutionary architecture in Chapter 1. Software Architecture, from "Building Evolutionary Architectures," by Neal Ford, Rebecca Parsons, and Patrick Kua. Published by O'Reilly Media, Inc. Copyright © 2017 Neal Ford, Rebecca Parsons, and Patrick Kua.

1. Software Architecture - Building Evolutionary Architectures [Book] (oreilly.com)

...see more

The rich text editor behind great content creation experiences.

The Most Advanced WYSIWYG HTML Editor | TinyMCE


...see more

The quill-magic-url extension checks for URLs and mail addresses during typing and pasting and automatically converts them to links and normalizes the links URL.

You can find a demo page here.

<script src="https://cdn.jsdelivr.net/npm/quill-magic-url@4.1.3/dist/index.min.js"></script>

Additional Resources

...see more

While service workers and PWAs are becoming standards of modern web applications, resource caching has become more complex than ever. This article covers the big picture of browser caching, including:

The use cases of and differences between service worker caching and HTTP caching.

The pros and cons of different service worker caching expiry strategies compared to regular HTTP caching strategies.

Service worker caching and HTTP caching (web.dev)

...see more

Based on your use case I would say you can go with "Network first" approach.

self.addEventListener('fetch', function (event) {
  event.respondWith(
    fetch(event.request).catch(function() {
      return caches.match(event.request)
    })
  )
})

In your fetch event handler we are doing following things:-

Use the fetch method to get data from the server.

Add a catch handler in case of network failure and get data from the cache storage.(which will in case of offline state).

Note:- We are assuming you are caching data in your install event of service worker. if you are not then we can do that in fetch event also.

Making Service Worker always load files from server, unless Offline - STACKOOM

...see more

This is the correct approach for things that can't be performed offline, such as analytics pings and non-GET requests. Again, you don't often need to handle this case specifically and the cache falling back to network approach will often be more appropriate.

self.addEventListener('fetch', function(event) {
 event.respondWith(fetch(event.request));
});

Alternatively, simply don't call event.respondWith, which will result in default browser behaviour.

https://developers.google.com/web/ilt/pwa/caching-files-with-service-worker#network_only

...see more

Ionic is an open source UI toolkit for building performant, high-quality mobile and desktop apps using web technologies — HTML, CSS, and JavaScript — with integrations for popular frameworks like Angular, React, and Vue.

Open-Source UI Toolkit to Create Your Own Mobile or Desktop Apps (ionicframework.com)

...see more

Mobilekit is a powerful mobile UI Kit template for any mobile websites and your pwa projects. Easy to use with components. Based on Bootstrap 5.

Mobilekit - PWA HTML Mobile UI Kit Template (bragherstudio.com)

Mobilekit - Bootstrap 5 Based HTML Template by Bragher | ThemeForest

...see more

Bitter is a powerful HTML mobile template for any project, easy to use. Based on Bootstrap 5.

Bitter comes with components and pages you may need.

https://themeforest.net/item/bitter-multipurpose-mobile-application-template/25262018

...see more

Bootstrap template is one of the most valuable design frameworks to build a website or an app. There are many free, excellent website templates available online and all of them are responsive to display on all devices.

Mockplus has introduced 20 Best Bootstrap Website Templates for Free Download before, and we would like to give you more free Bootstrap themes that especially suitable for a mobile-first site.

If you are looking for Bootstrap templates aimed at small screen sizes, try the 30 best Bootstrap mobile templates for free download in 2019.

30 Best Bootstrap Mobile Templates for Free Download in 2019 (mockplus.com)

...see more

This year, big, bold fonts, dark mode, 3D elements, bold color schemes and minimal design have become very popular. Many new web design skills and techniques appear to help designers and creatives create more stunning projects.

But what 2021 trends do you think will remain popular and which trends will spike in popularity in 2022?

In this article, we’ll share 15 design trends that we think are going to shape 2022, including the Metaverse, data visualization, playful user experience, and some online web design and collaboration tools. Examples are also covered to help you better understand our ideas.

15 Best Web Design Trends & Ideas for 2022 (mockplus.com)

...see more

Open source icons. Lovingly hand-crafted.

Premium designed icons for use in web, iOS, Android, and desktop apps. Support for SVG and web font. Completely open source, MIT licensed and built by Ionic.

Ionicons: The premium icon pack for Ionic Framework

...see more

Free, high quality, open source icon library with over 1,500 icons. Include them anyway you like—SVGs, SVG sprite, or web fonts. Use them with or without Bootstrap in any project.

Bootstrap Icons · Official open source SVG icon library for Bootstrap (getbootstrap.com)

...see more
<?xml version="1.0" encoding="utf-8" ?>
<package>
 <metadata>
  <id>Nuget.Package.Name</id>
  <version>1.0.0</version>
  <title>Nuget Package Name</title>
  <authors>Company Ltd.</authors>
  <owners>Joe Smith</owners>
  <license type="expression">MIT</license>
  <projectUrl>https://www.website.com/project</projectUrl>
  <requireLicenseAcceptance>false</requireLicenseAcceptance>
  <description>A description of your package</description>
  <releaseNotes>Initial 1.0.0 release</releaseNotes>
  <copyright>Copyright 2022 CompanyLtd</copyright>
  <tags>sample nuget</tags>
  <dependencies>
   <group targetFramework=".NETStandard2.0">
   </group>
  </dependencies>
  <summary> A summary of your package </summary>
 </metadata>
 <files>
  <file src="README.txt" />
  <file src="lib\**" target="\lib\netstandard2.0" />
 </files>
</package>
...see more

Install the nuget.exe CLI by downloading it from nuget.org and adding the folder to your PATH environment variable.

The latest version is recommended.

NuGet Gallery | Downloads

...see more

To create a package, first we need to create .nuspec file. This is a manifest file that uses XML to describe the package. This manifest file is used to build a package and it's also stored in the package after the package is built. To create this .nuspec file, execute the following command in a command prompt.

nuget.exe spec

The default name for the manifest file is Package.nuspec.

...see more
<?xml version="1.0" encoding="utf-8"?>
<package >
  <metadata>
    <id>Package</id>
    <version>1.0.0</version>
    <authors>username</authors>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <license type="expression">MIT</license>
    <!-- <icon>icon.png</icon> -->
    <projectUrl>http://project_url_here_or_delete_this_line/</projectUrl>
    <description>Package description</description>
    <releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
    <copyright>$copyright$</copyright>
    <tags>Tag1 Tag2</tags>
    <dependencies>
      <group targetFramework=".NETStandard2.1">
        <dependency id="SampleDependency" version="1.0.0" />
      </group>
    </dependencies>
  </metadata>
</package>
...see more
  • id: This is a unique identifier of the package. It's the name of the package that is used when installing the package using the Install-package command in the Package Manager console in Visual Studio. The Package Id follows the same rule as a .Net namespace. For example Mvc.Helper is a valid package id.
  • Version: This is a version of the package like 1.0.0.
  • Authors: This is a comma separated list of the authors of the package.
  • owners: This is a comma separated list of package creators. Most of the time it is same as package authors.
  • licenseUrl: This is a link to the license that the package is under. For example Apache license.
  • projectUrl: This is a link to the project home page. If the project is open-source then it can be the project source code URL like Github project URL.
  • iconUrl: This is the link for the image that is used as an icon for the package. The size of the image should be a 32x32 pixel png image with transparent background.
  • requireLicenseAcceptance: This is a boolean value that indicates whether the Nuget client must ensure that the package license (specified by licenseUrl) is accepted by the user before installation of the package.
  • description: As the name suggests, this is a long description of the package.
  • releaseNotes: This is a description of the changes that are made in each release of the package.
  • copyright: Specify copyright details for the package.
  • tags: This is a space-separated list of keywords that describes the package. These tags are useful when a user tries to search for the package.
  • dependencies: This element specifies the list of other dependent Nuget packages that should be installed in order to use our package.
  • title: This is a user-friendly name of the package. If not specified then the package id is used. (By default this element is not included in the manifest file.)
  • files: This element is used to specify the package content. (By default this element is not included in the manifest file.)

The elements are described in .nuspec file reference.

...see more

The contents of the Nuget package can be defined either by defining a conventional based folder structure relative to the package manifest file or by using a files element in the manifest file. The convention based approach requires the following folder structure:

  • tools: The tools folder of a package is for PowerShell scripts and programs accessible from the Package Manager Console.
  • lib: Assemblies (DLL files) in the lib folder are added as assembly references when the package is installed.
  • content: Files under the content folder are directly copied to the root of the application when the package is installed. For example, if we want to add a script file to the /Scripts folder of the target application, then we need to place that file under Content/Scripts/{jsfilename}.
...see more

To work with NuGet, as a package consumer or creator, you can use command-line interface (CLI) tools as well as NuGet features in Visual Studio.

  • dotnet.exe CLI tool for .NET Core and .NET Standard libraries, and for any SDK-style project such as one that targets .NET Framework. Included with the .NET Core SDK and provides core NuGet features on all platforms. (Starting in Visual Studio 2017, the dotnet CLI is automatically installed with any .NET Core-related workloads.) .NET Core SDK
  • nuget.exe CLI tool for .NET Framework libraries and for any non-SDK-style project such as one that targets .NET Standard libraries. Provides all NuGet capabilities on Windows, provides most features on Mac and Linux when running under Mono. nuget.exe
  • Visual Studio On Windows, the NuGet Package Manager is included with Visual Studio 2012 and later. Visual Studio provides the Package Manager UI and the Package Manager Console, through which you can run most NuGet operations. Visual Studio
  • Visual Studio for Mac On Mac, certain NuGet capabilities are built-in directly. Package Manager Console is not presently available. For other capabilities, use the dotnet.exe or nuget.exe CLI tools. Visual Studio for Mac
  • Visual Studio Code On Windows, Mac, or Linux, NuGet capabilities are available through marketplace extensions or use the dotnet.exe or nuget.exe CLI tools. Visual Studio Code

The MSBuild CLI also provides the ability to restore and create packages, which is primarily useful on build servers. MSBuild is not a general-purpose tool for working with NuGet.

...see more

NuGet produces an error if you try to create a package with default values in your .nuspec file, so you must change the following fields before proceeding.

  • licenseUrl
  • projectUrl
  • iconUrl
  • releaseNotes
  • tags

For packages built for public consumption, you must define Tags property, as tags help others find your package on sources like nuget.org and understand what it does.

You can also add any other elements to the manifest at this time, as described on Manifest Elements from NuGet - snippset.

...see more

A commit is like a snapshot of the Git repository at one point in time. Adding commits keep track of our progress and changes as we work. Git considers each commit change point or "save point". It is a point in the project you can go back.

You should make new commits often, based around logical units of change.

When we commit, we should always include a message.
By adding clear messages to each commit, it is easy for yourself (and others) to see what has changed and when.
...see more

The main workflow for a developer will follow these steps

  1. Create a branch for the changes to be made and give it a name according to the naming convention.
  2. Commit changes to the branch. There are often multiple commits for a bug fix or feature.
  3. Push the branch to the remote repository.
  4. Create a pull request so other team members can review the changes. To incorporate feedback, more commits might be needed and changes to be pushed.
  5. Complete the pull request and resolve any merge conflicts from changes other team members made after creating the branch.
...see more

JWT (JSON Web Token) authentication is a compact, secure method for verifying user identity in web applications. It utilizes digitally signed tokens to grant and validate user access, enhancing security and efficiency.

Resources

...see more

With certain Markdown implementations, you can append =WIDTHxHEIGHT after the URL of the graphic file to resize the image. Do not forget the space before the =.

![](./pic/pic1_50.png =100x20)

You can skip the HEIGHT

![](./pic/pic1s.png =250x)
...see more

Helm is one of the most powerful and community-adopted package managers for Kubernetes, similar to yum for Linux or npm for Node.js. It is used to install and manage all the Kubernetes applications. Helm deploys all the k8s applications in a packaging format called helm charts. Charts deployed by Helm are complete, packaged Kubernetes applications. They include versioned, pre-configured application resources that can be deployed as a single unit. You can deploy different versions of the chart with different sets of configurations.

Helm is an essential part of a well-designed Kubernetes architecture. It can significantly improve the Kubernetes development experience by improving productivity, making Kubernetes applications less complex, and making it easier to manage cloud-native and microservices applications.

...see more

Progress Telerik UI for ASP.NET Core

ASP.NET Core Editor

Use the MS Word-like ASP.NET Core Editor to write and format rich text content in a familiar editor experience. Add predefined CSS classes or create your own custom tools, buttons, dropdowns or dialogs.

This control is part of the Telerik UI for ASP.NET Core suite along with 110+ fully-featured UI components designed to speed up delivery & improve every aspect of your workflow.

Manage each project and plan dev time accordingly using the public product roadmap, regular releases, extensive learning resources and outstanding technical support team.

Source: Editor - ASP.NET Core Components | Telerik UI for ASP.NET Core

...see more

Hemingway App makes your writing bold and clear.

The app highlights lengthy, complex sentences and common errors; if you see a yellow sentence, shorten or split it. If you see a red highlight, your sentence is so dense and complicated that your readers will get lost trying to follow its meandering, splitting logic — try editing this sentence to remove the red.

Source: Hemingway Editor (hemingwayapp.com)

...see more

Rich Text Editor is a full-featured Javascript WYSIWYG HTML editor. It enables content contributors easily create and publish HTML anywhere: on the desktop and on mobile.

Source: WYSIWYG HTML Editor | Javascript Rich Text Editor | RichTextEditor

...see more
string pattern = @"(<a.*?(?<href>href=\x22.*?\x22).*?>)";
string substitution = "<a ${href}>";
RegexOptions options = RegexOptions.Multiline;

Regex regex = new Regex(pattern, options);
string result = regex.Replace(input, substitution);

Additional information for Substitutions in Regular Expressions

...see more

Delete the file using `rm` command:

`rm` command can be used with option and without the option for the different types of delete. The syntax of the `rm` command is given below.

Syntax:

$ rm [option] filename

Options

  • -i’ option can be used with `rm` command to provide a prompt before deleting any file to prevent accidental deletion.
  • -f’ option can be used with `rm` command to remove any file forcefully.
...see more

Remove a Single Folder

To remove a folder, which is empty, use the following command:

$ rmdir folder-name

Remove the non-empty folder

Use the 'rm' command with the '-r' option followed by the name of the folder to be deleted:

$ rm –r folder-name

In this command '-r' flag refers to deleting all the contents of a folder first.

...see more

Globalization is a process of identifying all the parts of your application that need to be different for respective languages and separate them from the core application.

...see more

Localization is the process of creating and configuring your application for a specific language.

...see more

Culture is the combination of the language that you speak and the geographical location you belong to. It also includes the way you represent dates, times, and currencies. Culture is represented as shown in the following example:

  • en-US
  • en-GB
  • fr-BE

The first culture represents the English language being spoken in the US, whereas the second culture represents the English culture being spoken in Great Britain.

...see more

Html Agility Pack (HAP) is a common library used in .NET for web scraping. The HAP HTML parser is written in C# to read/write DOM and supports plain XPATH or XSLT. They have recently added the .NET Core version also for web scraping. 

Html Agility Pack website screenshot

...see more

Web scraping basically works like this :

  • Fetch the HTML page
  • Analyze the HTML
  • Get the data that matches class names, divs, or whatever you've specified
...see more

Load Html From Web

HtmlWeb.Load method gets an HTML document from an internet resource.

Example

The following example loads an Html from the web.

var html = @"http://html-agility-pack.net/";
HtmlWeb web = new HtmlWeb();
var htmlDoc = web.Load(html);
var node = htmlDoc.DocumentNode.SelectSingleNode("//head/title");
Console.WriteLine("Node Name: " + node.Name + "\n" + node.OuterHtml);

Source: Load from Web Method in Html Agility Pack

For an end-to-end sample see Easily Do Web Scraping In .NET Core 6.0

...see more

Webhooks allow interaction between web-based applications through the use of custom callbacks. Webhooks enable web applications to communicate with other web apps automatically. Unlike traditional systems where one system (subject) keeps polling another system (observer) for some data, Webhooks allow the observer to push data into the subject’s system automatically whenever some event occurs. 

...see more

To set up a webhook, the client gives a unique URL to the server API and specifies which event it wants to know about. Once the webhook is set up, the client no longer needs to poll the server; the server will automatically send the relevant payload to the client’s webhook URL when the specified event occurs. 

Webhooks are often referred to as reverse APIs or push APIs, because they put the responsibility of communication on the server, rather than the client. Instead of the client sending HTTP requests—asking for data until the server responds—the server sends the client a single HTTP POST request as soon as the data is available. Despite their nicknames, webhooks are not APIs; they work together. An application must have an API to use a webhook. 

...see more

Edtr.io is a WYSIWYG in-line web editor written in React. Content created with edtr.io looks just like the final page – select any editable element on the page, edit it in place or drag ’n’ drop it around. Its plugin architecture makes edtr.io lean AND adaptable to any use case simultaneously. Edtr.io is, of course, Open Source.

Edtr Io editor screenshot

...see more

Quill is a free, open-source WYSIWYG editor built for the modern web.

It is basically a Microsoft word that runs inside of the browser. Quill is a modern rich text editor built for compatibility and extensibility.

Quill editor screenshot

...see more

Slate is a completely customizable framework for building rich text editors.

It lets you build rich, intuitive editors like those in Medium, Dropbox Paper or Google Docs—which are becoming table stakes for applications on the web—without your codebase getting mired in complexity.

Slate editor screenshot

ORY

...see more

The ORY Editor is a smart, extensible, and modern editor for the web written in React. If you are fed up with the limitations of content editable, you are in the right place.

ORY editor screenshot

...see more

It is the simplest and smallest WYSIWYG text editor for the web, with no dependencies.

Pell editor screenshot

...see more

A renderless and extendable rich-text editor for Vue.js The editor should be easy to extend and not based on old dependencies such as jQuery. For React there is already a great editor called Slate.js, which impresses with its modularity.

It’s built on top of ProseMirror but provides a much friendlier API, allowing you to create great editing experiences much faster.

tiptap editor screenshot

...see more

It is a lightweight WYSIWYG editor to make work on your website as straightforward as it gets.

Trumbowyg editor screenshot

...see more

A Wysiwyg editor built using ReactJS and DraftJS libraries.

React Draft Wysiwyg editor screenshot

...see more

A radically powerful Text-Editor/Wysiwyg editor for Angular.js! Create multiple editor instances, two-way-bind HTML content, watch editors for changes, and more.

textAngular editor screenshot

...see more

A set of ready-to-use rich text editors created with a powerful framework. Made with real-time collaborative editing in mind.

WYSIWYG HTML Editor with Collaborative Rich Text Editing (ckeditor.com)

CKEditor

...see more

It is a framework-agnostic library for building WYSIWYG editors supporting rich content via cards.

GitHub - bustle/mobiledoc-kit: A toolkit for building WYSIWYG editors with Mobiledoc

Mobiledoc

...see more

Rich text / WYSIWYG editor focus on modularity and extensibility, build on top of Slate framework with beautiful designs and high-level APIs.

Canner Slate Editor on GitHub

...see more

It is a Rich Text editor built on top of Facebook’s Draft.JS featuring a nice default base of components and extensibility.

Megadraft

...see more

It is a small jQuery plugin that allows you to transform any HTML element into a simple WYSIWYG editor with the ability to use Emojione icons.

EmojiOne Area

EmojioneArea on GitHub

...see more

It is an open-source, multi-purpose Web Builder Framework that combines different tools and features with the goal of helping you (or users of your application) build HTML templates without any coding knowledge. It’s a perfect solution to replace the common WYSIWYG editors, which are suitable for content editing but inappropriate for creating HTML structures.

GrapesJS

...see more

It is rich content editing entirely re-imagined for the web: an intuitive editor for web content that does not presuppose anything about how it will be rendered.

Sir Trevor

Sir Trevor JS | Made by Many

...see more

A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.

SimpleMDE

JavaScript Markdown Editor - SimpleMDE

...see more

It is an HTML5 rich-text editor, which provides powerful cross-browser normalization in a flexible, lightweight package. It was designed to handle email composition for the FastMail web app. The most important consequence of this (and where Squire differs from most modern rich text editors) is that it must handle arbitrary HTML, because it may be used to forward or quote emails from third-parties and must be able to preserve their HTML without breaking the formatting.

Squire

Squire on GitHub

...see more

It is a well-behaved rich semantic content editor based on contentEditable, with support for collaborative editing and custom document schemas.

ProseMirror

...see more

It is an extended and less strict approach on xing/wysihtml5 open source rich text editor. The code is library agnostic and has all dependencies bundled: No jQuery, Prototype or similar is required. The currently bundled dependencies are rangy.js (including textrange and selectionsaverestore modules) and base.js.

wysihtml

...see more

Public API for Public APIs

Get a list of any or all public APIs currently cataloged in the project.

Sample API URL:

https://api.publicapis.org/entries
...see more

Get information about a specified IP address, such as geological info, company, and carrier name.

Sample API URL:

https://ipinfo.io/161.185.160.93/geo

Developers - IPinfo.io

...see more

Get information about a random fake user, including gender, name, email, address, etc.

Sample API URL:

https://randomuser.me/api/

Random User Generator | Home

...see more

Words API lets you retrieve information about English words, including definitions, synonyms, rhymes, pronunciation, syllables, and frequency of usage. It also can tell you about relationships between words, for instance that “math” has categories like “algebra” and “geometry”, or that a “finger” is part of a “hand”.

WordsAPI

...see more

Regular expression to select script tag:

(<script[\s\S]*?>[\s\S]*?<\/script>)
 
...see more

arc42 is simply a template for documenting the architecture of a system. What makes it interesting is that this template was structured in such a way that it guides the architect to:

  1. Focus in what is required
  2. Author the architectural documentation in a way that facilitates communication, to all parties
  3. Cover all aspects that are useful


...see more

Custom initialization can be done using the following code just before closing the body tag.

<script>$(document).ready(function() {
      $('pre').each(function(i, e) {hljs.highlightBlock(e)});
  });</script>

From: How to use highlight.js (highlightjs.org)

...see more

Using GitHub Actions to build a CI/CD pipeline has many advantages - Simple set-up - You can respond to any webhook on GitHub - Community-powered, reusable workflows - Support for any platform, language, and cloud.

Get building today at How to build a CI/CD pipeline with GitHub Actions in four simple steps | The GitHub Blog

...see more

This is a sample address in JSON format.

{
    "firstName": "Dorothy",
    "lastName": "Kemp",
    "gender": "female",
    "age": 28,
    "address": {
        "streetAddress": "591 Wayside Lane",
        "city": "Oakland",
        "state": "CA",
        "postalCode": "94612"
    },
    "phoneNumbers": [
        { "type": "home", "number": "510-251-5933" },
        { "type": "mobile", "number": "510-853-2421" }
    ]
}
...see more

This will capture the URL as well as the text.

string input = @"<a href=""\page1.htm"">Page 1</a><a href=""\page2.htm"">Page 2</a>";
				
var matches = Regex.Matches(input, @"<a\shref=""(?<url>.*?)"">(?<text>.*?)</a>");

foreach (Match m in matches)
{
	Console.WriteLine("URL: " + m.Groups["url"].Value + "; Text: " + m.Groups["text"].Value);
}
...see more

To decode HTML you can use HttpUtility.HtmlDecode

string a = "Here&#x27;s how to";
string b = HttpUtility.HtmlDecode(a);
Response.Write(b);

This will output

Here's how to

If you are using .NET 4.0+ you can also use WebUtility.HtmlDecode which does not require an extra assembly reference as it is available in the System.Net namespace.

...see more

The XPath expression selects nodes or a list of nodes based on attributes like ID, Name, Classname, etc., from an XML document.

//input[@name = 'value']
  • input = tag name
  • name = attribute
  • value = value of attribute
...see more

The Contains() is a method that is used to find the value of those attribute that changes dynamically.

The Contains() method has the following general form, which is given below.

XPath Contains Syntax:

XPath = //tagname[contains(@attribute, 'value')]

The main feature of contains() method is that it can find elements with partial text.

It is a common mistake to use it to test if an element contains a value. What it really does is test if a string contains a substring. 

...see more

starts-with() is a method that checks the starting text of an attribute and finds elements whose attribute changes dynamically.

We can also use this method to find elements whose attribute value is static (not changing).

The syntax for starts-with():

XPath = //tagname[starts-with(@attribute, 'value')]
...see more

The ends-with() method checks the ending text of an attribute and finds elements whose attribute changes dynamically.

Syntax of ends-with():

//tagname[ends-with(@attribute, 'value')]

 

...see more

In an OR expression, two conditions are used, and any one condition, either 1st condition or 2nd condition, should be true to find the elements.

It has the following syntax:

//tagname[XPath statement-1 or XPath statement-2]
...see more

In an AND expression, two conditions are used, and both conditions must be true to find the elements. If any condition is false then XPath will be failed to find the element. It has the following general form.

//tagname[XPath statement-1 and XPath statement-2]
...see more

The text() method is used to find elements with an exact match.

The syntax for the text() method is given below:

//tagname[text() = 'text_value']
...see more

The normalize-space() function returns the argument string with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters with a single space.

//tagname[normalize-space()='value']
...see more

This site is intended as a reference for the UTF8-8 encoding of Unicode characters. You can look up the UTF-8 encoding in various formats.

...see more

Some webpages use Unicode characters to display some text as bold. Copying will keep this format, even if you try to just paste it as plain text.

So the following script will convert from "MATHEMATICAL BOLD CAPITAL" to "LATIN CAPITAL LETTER".

So, for example, the bold letter "A" would be "f0 9d 90 80" as UTF-8. Looking at the Unicode/UTF-8-character table - snippet, we can translate this to Unicode "U+1D400". We then use the ConvertFromUtf32 method to get this as the old value in the Replace method and just the letter "A" as the new value. 

public static string ConvertBold(string input)
{
    var output = input.Replace(char.ConvertFromUtf32(0x1D5D4), "A");
    output = input.Replace(char.ConvertFromUtf32(0x1D5D5), "B");
    // ...

    output = output.Replace(char.ConvertFromUtf32(0x1D5EE), "a");
    output = output.Replace(char.ConvertFromUtf32(0x1D5EF), "b");
    // ...

    return output;
}
...see more

Capabilities of orchestrators are

  • Manage, schedule, and deploy containers
  • Service discovery
  • Load Balancing
  • Scaling
  • Health monitoring
...see more

Linked Data empowers people that publish and use the information on the Web. It is a way to create a network of standards-based, machine-readable data across Web sites. It allows an application to start at one piece of Linked Data and follow embedded links to other pieces of Linked Data that are hosted on different sites across the Web.

...see more

JSON-LD is a lightweight Linked Data format. It is easy for humans to read and write. It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale. JSON-LD is an ideal data format for programming environments, REST Web services, and unstructured databases such as Apache CouchDB and MongoDB.

A Simple Example

{
  "@context": "https://json-ld.org/contexts/person.jsonld",
  "@id": "http://dbpedia.org/resource/John_Lennon",
  "name": "John Lennon",
  "born": "1940-10-09",
  "spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
}
...see more

The JSON-LD Playground is a web-based JSON-LD viewer and debugger. If you are interested in learning JSON-LD, this tool will be of great help to you. Developers may also use the tool to debug, visualize, and share their JSON-LD markup.

JSON-LD Playground

JSON-LD Playground

...see more

C# String.StartsWith() method determines whether this string instance starts with the specified character or string.

String.StartsWith(ch)
String.StartsWith(str)
String.StartsWith(str, ignoreCase, culture)
String.StartsWith(str, comparisonType)
...see more

XPath uses path expressions to select nodes in an XML document. The node is selected by following a path or steps.

Expression Description
nodename Selects all nodes with the name "nodename"
/ Selects from the root node
// Selects nodes in the document from the current node that match the selection no matter where they are
. Selects the current node
.. Selects the parent of the current node
@ Selects attributes
...see more

Customers can now deterministically restrict their workflows to run on a specific set of runners using the names of their runner groups in the runs-on key of their workflow YAML. This prevents the unintended case where your job runs on a runner outside your intended group because the unintended runner shared the same labels as the runners in your intended runner group.
Example of the new syntax to ensure a runner is targeted from your intended runner group:

runs-on:
  group: my-group
  labels: [ self-hosted, label-1 ]

In addition to the workflow file syntax changes, there are also new validation checks for runner groups at the organization level. Organizations will no longer be able to create runner groups using a name that already exists at the enterprise level. A warning banner will display for any existing duplicate runner groups at the organization level. There's no restriction on the creation of runner groups at the enterprise level.
This feature change applies to enterprise plan customers as only enterprise plan customers are able to create runner groups.

Source: GitHub Actions: Restrict workflows to specific runners using runner group names

...see more
{
    "glossary": {
        "title": "example glossary",
		"GlossDiv": {
            "title": "S",
			"GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
					"SortAs": "SGML",
					"GlossTerm": "Standard Generalized Markup Language",
					"Acronym": "SGML",
					"Abbrev": "ISO 8879:1986",
					"GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
						"GlossSeeAlso": ["GML", "XML"]
                    },
					"GlossSee": "markup"
                }
            }
        }
    }
}
...see more

JWT (or JSON Web Token) is an encoding standard specified in RFC 7519 - JSON Web Token (JWT) (ietf.org) for tokens that contain a JSON payload.

JWT is a compact, self-contained means of securely transmitting information between parties. It consists of three parts: a header, a payload, and a signature. JWTs are commonly used in web authentication and authorization processes, as they can verify the integrity and authenticity of data, making them a fundamental tool in modern web applications and services.

...see more

The authorization server will issue:

  • an id_token used by the application to authenticate the user and
  • an access_token which is used by the application to call the API on the users' behalf.

Specification: OAuth 2.0 Authorization Code Grant

...see more

How does an API validate the JWT Bearer token without configuring a secret or a public key?

The authentication service will use the OIDC metadata endpoints to get the necessary information.

Steps:

  1. The OpenID Configuration is read first: https://{issuer}/.well-known/openid-configuration
  2. From there it will find the URL to the jwks_uri and then load that one: like https://{issuer}/.well-known/jwks.json
  3. The public key(s) are loaded from that document and used to verify the incoming JWT Bearer tokens
...see more

This code removes HTML text nodes that have no non-whitespace content.

foreach (var node in document.DocumentNode
    .DescendantsAndSelf()
    .Where(n => n.NodeType == HtmlNodeType.Text && 
        string.IsNullOrWhiteSpace(n.InnerText)).ToList())
{
    node.Remove();
}

DescendantsAndSelf() will include the root node in the search, which may be necessary depending on the requirements.
ToList() to create a separate list for removal, avoiding issues with modifying the collection while iterating

...see more

HTTP (Hypertext Transfer Protocol) is a protocol used for communication between web servers and clients. It facilitates the transfer of text, images, videos, and other multimedia content over the internet. HTTP operates on a request-response model, where clients send requests for resources and servers respond with the requested data. It's the foundation of data communication for the World Wide Web.

Reference: HTTP | MDN (mozilla.org)

...see more

HTTP response status codes indicate the outcome of an HTTP request. They range from informational 1xx, success 2xx, redirection 3xx, client error 4xx, to server error 5xx. For example, 200 signifies success, 404 indicates not found, and 500 suggests a server error. Understanding these codes aids in troubleshooting and debugging web applications.

Reference: HTTP response status codes - HTTP | MDN (mozilla.org)

...see more

1xx Informational status codes indicate provisional responses prior to final ones. For instance, 100 Continue signals the server is ready for a client to send the request body.

...see more

To add a clear button (little X) you can set the input type to Search.

...see more

To detect if the text in an input field has changed we can compare the actual value with the default value.

The following script will execute the change function whenever the user presses a key. It will then compare the value with the defaultValue.

<input id="elementTitle" placeholder="Title" onkeyup="change();" />

function change() {
    var title = document.getElementById('title');

    if (title.value === title.defaultValue) {
        alert('same');
    } else {
        alert('different');
    }
}

A simplified approach if only one input needs to be checked could be:

<input value='myDefault' onchange='if (this.value!=this.defaultValue) alert("Changed")'>

Further resources

...see more

Data is messy and disconnected. JSON-LD organizes and connects it, creating a better Web.

...see more

XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It can be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document. Support for XPath exists in applications that support XML, such as web browsers and many programming languages.

...see more

arc42 answers the following two questions in a pragmatic way and can be tailored to your specific needs:

  • What should you document/communicate about your architecture?
  • How should you document/communicate?

The documentation can be found at arc42 - arc42

...see more

Most APIs require access via API keys (similar to passwords) or other authentication and authorization methods. Keys are a way to protect the provider from malicious users and help them manage their API better.

But for beginners still exploring APIs, keys tend to complicate things. Luckily, there are APIs with zero authentication requirements.

Here are a few of the best, unrestricted, free APIs with no key that you can use for testing. Because they don’t require any keys, you can test the sample URLs out on the address bar of your browser.

...see more

Web scraping is a technique used in any language to extract data from a website.

...see more

A rich text editor (RTE) is an essential component of any web application. It allows users to format their text content, adding images, tables, and other multimedia elements. Without an RTE, users would have to enter all the text markup themselves, which can be time-consuming and difficult.

...see more

This set describes some of the most common caching patterns.

...see more

Quill is a free, open-source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need.

Quill - Your powerful rich text editor - quilljs.com

...see more

Microsoft Dev Box gives you self-service access to high-performance, preconfigured, and ready-to-code cloud-based workstations.

...see more

A regular expression (shortened as regex or regexp;[1] also referred to as rational expression[2][3]) is a sequence of characters that specifies a search pattern. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation. It is a technique developed in theoretical computer science and formal language theory.

...see more

SVG is an open, industry-standard XML-based format for vector graphics developed by the W3C. Its acceptance is growing fast. These days, most vector editors can import and export SVG, and modern browsers (such as Firefox and Opera) can display it directly without requiring any plugins.

...see more

The Kusto Query Language (KQL) is a plain-text, read-only language used to query big datasets. Some products which use KQL are Azure Data Explorer, Microsoft Defender ATP, Log Analytics, and Azure Sentinel.

...see more

Once we are introduced to the REST world, we will be given various options in implementing our web services. At this stage, developers like me usually get confused as to what is the better way. So, here are some of the best practices that need to be remembered when writing RESTful web services.

...see more

Helm is a package manager for Kubernetes.

Helm helps you manage Kubernetes applications — Helm Charts helps you define, install, and upgrade even the most complex Kubernetes application.

Source: Helm

...see more

API Lifecycle Management streamlines the management of APIs for greater efficiency, business visibility, and agility.

This platform can publish, secure, discover, maintain, and monitor APIs at any scale.


...see more
Things to Consider When Designing A Website

Redesigning your website? Here are the top 7 things to keep in mind.

Add to Set
  • .NET
  • Agile
  • AI
  • ASP.NET Core
  • Azure
  • C#
  • Cloud Computing
  • CSS
  • EF Core
  • HTML
  • JavaScript
  • Microsoft Entra
  • PowerShell
  • Quotes
  • React
  • Security
  • Software Development
  • SQL References
  • Technologies
  • Testing
  • Visual Studio
  • Windows
 
Sets