Skip to main content

Posts

How to set the "System unattended sleep timeout" in Windows 10 so that your computer won't go to sleep & lock your screen after a few minutes

If your computer goes to sleep and locks your screen after a few minutes and this is not what you have set in your power settings, then this could be due to your "System unattended sleep timeout" settings. In order to see your "System unattended sleep timeout" setting, below is what you can do; Go to advanced power settings Find Sleep>"System unattended sleep timeout" and set the "On battery" and "Plugged in" timeout settings. If you can't see this setting; Open up your "Registry Editor" by running it as an administrator In the file, go to the following location, double click on the Attributes and set the value to 2 and save. This will make the "System unattended sleep timeout" section visible in your Power options window. HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Power\ PowerSettings\ 238C9FA8-0AAD41ED-83F4-97BE242C8F20\ 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0
Recent posts

Fix for Umbraco GetCurrentMember System.InvalidOperationException: No member object found

It is possible that you don't store your member data in Umbraco database any longer and you have got an external service that provides your member data, so that your web users can login to your website using this external service. If this is the case then you might see the following error happening in the background which is also causing some performance issues. An error occurred in GetCurrentMember. System.InvalidOperationException: No member object found with username buzz.test@bobmail.info at umbraco.cms.businesslogic.member.Member.GetCurrentMember() This exception is most likely happening due to your project references to built in Umbraco membership provider, hence first step should be checking your Umbraco project's Web.config for  UmbracoMembershipProvider.  If the setting is similar to the following, then this is the reason that you see these exceptions. In that case, follow the 3 steps below to fix this problem. <add name="UmbracoMembershipProvider" type=&q

Everyday Git Commands

Git is a free and open source distributed version control system and a great one as well! Easy branch creation and jump between branches are some of its greatest features and here are some common commands that I use most of the time, hope this helps. Set global settings for user information $ git config --global user.name "[name]" $ git config --global user.email "[email address]" Check status git status Clone a project and working with branches $ git clone [https://repository-link] $ git checkout [branch-name] Creating a new branch $ git checkout -b feature/[branch-name] $ git checkout -b bugfix/[branch-name] $ git checkout -b release/[branch-name] Renaming an existing branch git branch -m bugfix/[branch-name] feature/[branch-name]  --> Long version of renaming a branch (from bugfix to feature in this example) git branch -m {bugfix,feature}/[branch-name] --> Short version of renaming a branch (from bugfix to feature in this example) Adding changes for commit

How to delete duplicate records from a table by using a CTA in SQL Server

You can use a CTA (Common Table Expression)  to delete duplicate records from a SQL Server table by writing a statement like this; WITH Location_CTE AS ( SELECT [Id]       , [LocationQuery]       , [DetailsResponseJson]       , [DateCreated]       , [DateUpdated] ,          ROW_NUMBER () OVER (               PARTITION BY                      [LocationQuery]               ORDER BY                      [LocationQuery]          ) Row_Num   FROM [dbo] . [Location] ) DELETE FROM Location_CTE WHERE Row_Num > 1 (34902 rows affected) Completion time: 2020-08-05T11:43:14.4827453+01:00 This will return the number of rows affected and then you can check whether you still have duplicate records with a group by statement.     SELECT     [LocationQuery] ,               COUNT ( LocationQuery )      FROM      [dbo] . [Location]   GROUP BY      [LocationQuery]   ORDER BY      COUNT ( LocationQuery ) desc

Umbraco V8 Upgrade from V7 - Developer Notes

Recently I have started working on upgrading my client's Umbraco v7.15.4 website to Umbraco v8.6.3 (current latest version) and decided to write this blog as it can be very tricky and you might end up spending hours if not days to fix your problems. I'd be very happy if I can help you to save some time and do better planning before doing your upgrade. Before you start doing anything, you should know that; Umbraco 8 is a major release. There will be a lot of breaking changes, for my case 435 new features, 95 breaking changes and 1254 issues & tasks.   Please check the local development and hosting requirements , otherwise the upgrade will fail and you have to rollback your changes to try again. One important thing, please make sure you have done all your Visual Studio 2017 or 2019 upgrades first. Ensure that you have got .NET Framework 4.7.2 installed. Upgrade your v7 Umbraco project to 7.14+, latest v7 version would be your best option. Umbraco codebase has been fundamental

Postman - Useful Queries for Azure Search Service

Search by text https://YOUR-AZURE-SEARCH-SERVICE-NAME.search.windows.net/indexes/YOUR-AZURE-SEARCH-INDEX-NAME/docs?search=cbt&api-version=2016-09-01&$count=true https://YOUR-AZURE-SEARCH-SERVICE-NAME.search.windows.net/indexes/YOUR-AZURE-SEARCH-INDEX-NAME/docs?search=kerr&api-version=2016-09-01&$count=true Top&skip https://YOUR-AZURE-SEARCH-SERVICE-NAME.search.windows.net/indexes/YOUR-AZURE-SEARCH-INDEX-NAME/docs?api-version=2016-09-01&$top=3&$skip=0&$count=true Facets - postman https://YOUR-AZURE-SEARCH-SERVICE-NAME.search.windows.net/indexes/YOUR-AZURE-SEARCH-INDEX-NAME/docs?api-version=2016-09-01&$count=true&facet=specialisms Facets - return all facets https://YOUR-AZURE-SEARCH-SERVICE-NAME.search.windows.net/indexes/YOUR-AZURE-SEARCH-INDEX-NAME/docs?api-version=2016-09-01&$count=true&facet=specialisms, count:9999&facet=clientele, count:9999&$filter=listingType eq 'Therapist' Return everything