Why search one online Encyclopedia when you can search them all? EncycloReader is a Wikipedia Alternative

A quick way to search multiple online encyclopedias is to setup a browser shortcut. For example, assigning :e as the shortcut for EncycloReader in Brave makes it much easier to search from the browser address bar.

Go to Brave -> Settings -> Search Engine


Click Manage search engines


Specify "https://encycloreader.org/" as the search engine, ":e" as the shortcut and "https://encycloreader.org/find.php?query=%s" as the URL.

Note: By default :e is assigned to Ecosia. I changed that definition to :ec before assigning :e to EncycloReader.

Once this has been saved and the settings window closed the search shortcut can be used from the browser's address bar. Begin by typing ":e" in the address bar:


Press the Tab key or Space bar:


Then enter the search terms. These will appear where the | bar is. Press Enter and the search results appear in the main browser window.

Building FFmpeg on Windows 10 with Visual Studio 2019 with support for NVidia hardware acceleration for encoding and decoding

NVidia publishes instructions for building FFmpeg here. Yes, you will need to create an account to get the instructions (and the CUDA SDK).

Open visual studio x64 native tools command prompt.

Instead of running export PATH=... in the msys2 terminal I had to update the INCLUDE and LIB environment variables before starting the msys2 terminal.

set INCLUDE=E:\SrcCode\Repos\nv_sdk;%INCLUDE%

set LIB=E:\SrcCode\Repos\nv_sdk;%LIB%

I then used the following command to start the msys2 terminal:

msys2_shell.cmd -msys2 -full-path -where e:\SrcCode\Repos

You should replace e:\SrcCode\Repos with the directory from which you cloned  FFmpeg (see NVidia's building FFmpeg instructions here).

NOTE: The instructions say to install pkg-config with pacman. If you have already installed pkgconf then you can't install pkg-conf (it is not needed).

This will open an msys2 terminal in which you can build ffmpeg. I used the following command:

./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --toolchain=msvc

If there are errors, check the log file. The log file will be stored, from the directory into which you cloned FFmpeg, in ffbuild/configure.log (e.g., /e/SrcCode/Repos/FFmpeg/ffbuild/configure.log).

Addendum

To list installed packages from an msys2 terminal:

pacman -S -l

To install yasm.exe from an msys2 terminal:

pacman -S yasm

The video editor I use can't use hardware acceleration with the latest NVidia drivers. So I installed older ones (version 375_63WHQL)


Resolving the dreaded "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance"

So you're a developer using Visual Studio 2019 Community Edition and want to demonstrate a a basic n-tier website that round trips to a database.

To keep things simple you decide on an ASP.NET MVC web app with small variations from the defaults:

  1. Individual User Account authentication instead of None.
  2. IIS instead instead of IIS Express
  3. SQL Server Express instead of localdb.

Things get much more complicated from this scenario but in production it'll be IIS not IIS Express. The database layer will be SQL Server but SQL Server Express is a closer match to running SQL Server in production than the user-mode localdb.

Visual Studio project wizard for an ASP.NET MVC  web app with Individual User Accounts
SQL Server Management Studio provides a GUI for administering SQL Server - just remember to turn on named pipes and TCP (illustrated below) and enable remote access.

SQL Server Management Studio
So the database is installed, a named instance (SQLExpress) is running and clients can connect remotely. Next problem:

SqlException! "failed to generate a user instance of sql server due to a failure in starting the process for the user instance..."

This can be fixed by updating the connection string (either set User Instance=True to False or remove it) in web.config.

Next problem

IIS' default web site uses the default application pool (a pool of processes to answer requests). For security reasons DefaultAppPool is a low privileged identity. Formally it's identity is "IIS APPPOOL\DefaultAppPool" (without the quotes). This post covers how to add IIS APPPOOL\DefaultAppPool to SQL Server.

Creating a SQL Server login for DefaultAppPool (I simplified the user name in the database)

Next problem

The login couldn't create database.
CREATE DATABASE permission den X + 
rcuter @ b/ 
Line 
Line 
Line 
Line 
Line 
153: 
154: 
155: 
156 : 
157: 
Q O localhostN/ebAppliration?/Amaunt/Regi5ter 
links + 
'D rush 
var user net*' ApplicationUser { Username model. Email, Email model. Email l; 
var result = Usermanager.CreateAsync(user, model.password); 
if (result. Succeeded) 
Line: 155 
Source File: 
Stack Trace; 
[Sq1Exception (øx8ø131904): CREATE mTABASE permission denied in database 'master' . ] 
System.Data.Sq1C1ient.Sq1Connection.OnError(Sq1Exception exception, Boolean breakCmnectim, Actim•l wrapC10seInAction) +3318640 
sq1c1ient.Tdsparser.Thr0QExceptionAndwarning(Tdsparserstateobject stateobj, Boolean Boolean asyncclose) +334 
system. Data. 
Sq1C1ient.Tdsparser.TryRun( RunBehavior runBehavior, Sqlcommand cmdHand1er, Sq1DataReader datastream, BulkCcvySimp1eResu1tSet bulkCopyHand1e 
System 
. Data. 
Sq1C1ient.Sq1Command. RunExecutenonQueryTds(String methodname, Boolean async, Int32 time(hlt, Boolean asyncwrite) +1339 
System. Data. 
Sq1C1ient.Sq1Conmand.Interna1ExecuteNonQuery(TaskConp1etionSource'1 completion, String methodName, Boolean sendTcPipe, Int32 timeout, Boole. 
System. Data. 
System.Data. Sq1C1ient.Sq1Command. ExecuteNonQuery() +391 
system. Data. 
System. Data. 
System. Data. 
System. Data. 
Entity. Sq1Server. 
Entity. Sqlserver. < 
System. Data. Entity. Sq1Server. < 
target, Func•3 (Verati(Ni, 
command, [hcæmandlnterceptimcmtext interceptimcontext) +d99 
Di splayC1ass1a. <CreateDatabaseF romsc ript>b 
C(N1n) +135 
DisplayC1ass33. (Usingconnection)b 32() +587 
DisplayC1ass1. +18
Error - we were unable to create a database on this instance of SQL Server
This is fixed by giving it permission to create a database

use [master]
GO
GRANT CREATE ANY DATABASE TO [IIS APPPOOL\DefaultAppPool]

GO

In production this will typically be a windows identity that's tied to an application or a user, not the default app pool because it's a powerful grant that can take down an entire SQL Server (not just a single database).

The login we created gets mapped to a user in each database. So it needs to be able to create tables, read data and write data. These can be added from SQL Server Management Studio:

Once our application pool identity has been granted these privileges it can create the ASP.NET database and tables used to support Individual Accounts.