Posts

How to create subsites in modern SharePoint experience

Image
  By default creating subsites in SharePoint Online is disabled. Seems like Microsoft is going away from using subsites an instead on only using site collections. Subsites are creating another level of complexity with permissions and features. So going away from this seems reasonable. But if you still want to creata a sub site you must be an SharePoint administrator to enable this feature. Go to your SharePoint administration page and replace the url as follows: https://yourtenant-admin.sharepoint.com/_layouts/15/online/TenantSettings.aspx There you'll find the option to enable creating of subsites. Once enabled you can go to your site collection, goto your website settings. In the menu where you normally create a list or an app you'll see a new menu entry subsite.

How to inspect CSS of elements which disappear when focus is lost using Chrome DevTools

Image
You want to inspect the CSS of elements that get removed when they lost focus and you got stuck. I had the same problem and it is annoying. There is a easy solution for this. Open Inspector in Chrome Press "Ctrl + Shift + P" Type: "Show Rendering" Activate "Emulate a focused page option" And there you go..

NPM: Semantic Versioning Characters

Image
  Semantic Versioning Semantic versioning is a solution for the software management term of "Dependency Hell". A software usually depends on other software.  But usually the "other" software also depends also on other products. The illustration above shows a tree of dependencies. Like in the illustration, your software can depend on an other software in different versions. To resolve issues like not to install same dependency multiple times or install the latest version of a software, there is a need of standardized software dependecy management. Semantic versioning standard offers tools like npm or yarn to resolve such dependencies. 📗 BASICS A semantic version consists of three numbers seperated by a dot: 1.1.1 Major Release.Minor Release.Patch Release 🥇Major Release: 2 .1.1 You increase your version to a major release when  your code has breaking changes  the users of your software need to update their code, e.g an API change or sth else which has causes a major...

Debug Azure Function locally with https on a custom domain

Image
Description If you want to deploy an Azure Function normally this endpoint is publicly available. Therefore you need to secure the connection to this endpoint at least with ssl. Before you deploy you also want to test the connection probably locally. The following steps should help you to setup a https connection to a local Azure Function. 1 STEP: Create a Self Signed Certificate via PowerShell Open Windows Terminal or PowerShell as an Administrator The following script will create a self signed certificate in the "Users" own certificate store with the password 12345 The script will also export the certificate as PFX to C:\server.pfx The domain for the certificate will be "debug-local.com" $cert = New-SelfSignedCertificate -DnsName "debug-local.com", "debug-local.com" -CertStoreLocation "cert:\LocalMachine\My" $myPwd = ConvertTo-SecureString -String "12345" -Force -AsPlainText Get-ChildItem -Path "cert:\localMachine\My...

The auditMap operator for RxJS

Image
RxJs has lots of custom operators but there was recently a problem I could not solve with them. The Problem I have a page with a back button. Within the page you can change settings, which e.g. updates something in a database using a REST API. The page has no save button, so every change is saved instantly. The problem is now that I have to ensure that the API calls are finished before I route to another page. So when the user changes a setting and clicks the back button, I have to block the routing until the api calls returned successfully. So imagine the user is changing multiple settings very quickly and the API call is slow: He ticks a checkbox => Call the API He changes an address => Call the API He unticks again => Call the API He clicks on the back button Wait until the settings are saved Route to the back page So I need an operator which does not emit when there are "next" operations in the queue. I don't need all operations to be executed as each operati...

What is the difference between Cold and Hot Observables

🔥vs🥶 🔥 Allegory HOT Image you are watching the news on TV but you've started watching in the middle of the show. You don't know what was reported before and you will not know what happened if you do not watch the show from the beginning. If someone else has started watching the news after you, he will not have all the information you have, only from the point onwards where he started watching. The news broadcast on TV is HOT 🔥.  This means there is one source which emits information and you can subscribe to it. But you will only get the information from the time you've subscribed. 🥶 Allegory COLD Imagine you want to create a bank account. You go to the bank and they will tell you: Bring your ID Fill in the form Sign it Login to you mobile app etc. The next person who wants to create an account will get probably the same information in the same order. Creating a bank account is COLD 🥶 This means that each time you want to get the information from the source, the source...

Basic React Hooks explained - useState

Image
useState - Godfather of the hooks useState is probably the most used and common hook. It is the simplest way to have a state in a functional component. SYNTAX const [value, setValue] = useState(initialValue) useState returns an array first item is the value of the state second item is a method to set the state const [value, setValue] = useState(initialValue) WHAT HAPPENS WHEN YOU SET IT? When you use the "setValue" function to set the value of the state variables, the component gets re-rendered.  You should set values in event handlers or within other hooks like useEffect, because the change triggers a rerendering. Re-rendering should be only done when the rendering of the component is finished. function SomeDumpComponent() { const [text, setText] = useState('') setText('A new text'); // here the rendering of the component is not finished. // The code below for rendering is not executed. // This can cause side-effects. return(<h1>{ t...