python – The view insertemp.views.Insertrecord didn’t return an HttpResponse object. It returned None instead?
from django.shortcuts import render
from insertemp.models import Empinsert
from django.contrib import messages

def  Insertrecord(request):
    if request.method == 'POST':
        if request.POST.get('empname') and request.POST.get('email') and request.POST.get('country'):
            messages.SUCCESS(request,'your detail saved succeccfullt.......!')
            return render(request,"index.html")
            return render(request,"index.html")
from django.contrib import admin
from django.urls import path
from . import views

urlpatterns = (
    path('', views.Insertrecord),

from django.db import models
class Empinsert(models.Model):

    class meta:
Django settings for insertemp project.

Generated by 'django-admin startproject' using Django 3.1.7.

For more information on this file, see

For the full list of settings and their values, see

from pathlib import Path
import os

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

# Quick-start development settings - unsuitable for production
# See

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'n7#@rb50!g7yh9_aw@eud++4zv4ee9zgxvrbf0my34pxu=avmc'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True


# Application definition


    'django.contrib.messages.middleware.MessageMiddleware',`enter code here`
ROOT_URLCONF = 'insertemp.urls'
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS':(os.path.join(BASE_DIR, 'templates')),
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': (

WSGI_APPLICATION = 'insertemp.wsgi.application'

# Database

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'PASSWORD': '',
        'HOST': 'localhost',
        'PORT': '3306',
            'init_command':"SET sql_mode='STRICT_TRANS_TABLES'"

# Password validation

        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',

# Internationalization



USE_I18N = True

USE_L10N = True

USE_TZ = True

STATIC_URL = '/static/'

sql server – sp_Blitz – RegOpenKeyEx() returned error 2

I’m running the latest sp_Blitz script on a SQL 2016 Std server on a Windows Server 2016 physical box. I’m getting the following error. What could be causing this and how do I troubleshoot it?

RegOpenKeyEx() returned error 2, ‘The system cannot find the file
specified.’ Msg 22001, Level 1, State 1 Warning: Null value is
eliminated by an aggregate or other SET operation. Msg 0, Level 11,
State 0, Line 0 A severe error occurred on the current command. The
results, if any, should be discarded.

The Windows Server Failover Clustering (WSFC) resource control API returned error code 19

What is root cause of this error. I couldn’t find any related information.
There are two nodes on Availability Group and if you reboot second node, database wont up.

dart – Error: A non-null value must be returned since the return type ‘int’ doesn’t allow null. int sum() { ^ Error: Compilation failed

estoy ejercitando con dart y resulta que cuando declaro una variable y le almaceno un objeto de tipo array de enteros para luego aplicar al objeto el metodo reduce este me retorna el siguiente error:

Error: A non-null value must be returned since the return type ‘int’ doesn’t allow null.
int sum() {
Error: Compilation failed.

Mi funcion deberia retornar un entero.

int sum() {
List<int> numbers = (1, 5, 8, 10);
numbers.reduce((a, b) => {
  return a + b;

void main() {

mojave – TextEdit can’t save RTF documents on 10.14.6: “The plug-in returned an error”

I wrote an RTF document in TextEdit and I get errors when I try to save.

the error, covering some js code I wrote, formatted via rtf

In fact, I can’t use TextEdit to save in any other format but TXT, all return the same, vague error. I think I pinpointed it to a broken alias in /System/Library/PrivateFrameworks named PDFKit.framework. It doesn’t show the intended path, so I assume it must’ve been corrupted somehow. Am I right to assume this? Is there a way to fix it? Tried googling to no avail.

Why I am getting "undelivered mail returned to sender" for emails that I never sent?

I am getting emails from my postmaster/mailer-deamon saying that the message can not be delivered. When I checked the original message it was sent from some (A) Tanya) to (B) and it looks like dating spam. Can you tell me why I am getting this mail when it was sent from address A to address B?

windows – Unexpected IP address returned by Get-NetIPAddress

Suppose I have network adapter device2 with static IP Get-NetIPAddress shows:

PS C:Windowssystem32> Get-NetIPAddress -InterfaceAlias device2 -AddressFamily IPv4

IPAddress         :
InterfaceIndex    : 19
InterfaceAlias    : device2
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 24
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ((TimeSpan)::MaxValue)
PreferredLifetime : Infinite ((TimeSpan)::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

Now I remove this address:

PS C:Windowssystem32> Remove-NetIPAddress -InterfaceIndex 19 -Confirm:$false
PS C:Windowssystem32> Remove-NetIPAddress -InterfaceIndex 19 -Confirm:$false
Remove-NetIPAddress : No MSFT_NetIPAddress objects found with property 'InterfaceIndex' equal to '19'.  Verify the value of the property and retry.

So, IP address list should be empty, which I can see in the Windows Properties dialog (device2 Properties, TCP/IPv4). Now Get-NetIPAddress shows:

PS C:Windowssystem32> Get-NetIPAddress -InterfaceAlias device2 -AddressFamily IPv4

IPAddress         :
InterfaceIndex    : 19
InterfaceAlias    : device2
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 16
PrefixOrigin      : WellKnown
SuffixOrigin      : Link
AddressState      : Preferred
ValidLifetime     : Infinite ((TimeSpan)::MaxValue)
PreferredLifetime : Infinite ((TimeSpan)::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

Such “fake” IP address sometimes appears in the Get-NetIPAddress output, when NIC is disconnected, in addition to real IP address of the NIC. So, in such case, Get-NetIPAddress may show, for example, two addresses: and This case is not 100% reproduced.

What does this unexpected IP address mean? Running PowerShell query from my program, I want to ignore it, to have the same results, as Windows IPv4 Properties dialog. May I filter it off by PrefixOrigin and SuffixOrigin values? In my tests, they are always equal to Manual for “real” IP address, and WellKnown and Link for “fake” IP address.

typescript – The data returned from a result is repeated several times – ReactJS

The getCourseAndModuleInfo function, returns some data from the database and stores it in states.

For some reason all the information is being repeated several times, as an example I used the course_id.

I realized that it has to do with the queries I make in the API and also with useEffect, however, I did not understand why this is happening.

import React, { useState, useCallback, useEffect } from 'react';
import api from '../../services/api';

interface CourseInfo {
  course_id: string;
  module_id: string;

interface HeaderInfoProps {
  course_info: CourseInfo;

const HeaderInfo: React.FC<HeaderInfoProps> = course_info => {
  const (isLoadingCourseName, setIsLoadingCourseName) = useState(false);
  const (isLoadingModuleName, setIsLoadingModuleName) = useState(false);
  const (courseName, setCourseName) = useState({ name: '' });
  const (moduleName, setModuleName) = useState({ name: '' });

  const { course_id, module_id } = course_info.course_info;

  // This is repeating several times

  const getCourseAndModuleInfo = useCallback(async () => {
    try {
      await api.get(`/course_name/${course_id}`).then(response => {
        const course_name =;

      await api.get(`/module_name/${module_id}`).then(response => {
        const module_name =;
    } catch (err) {
  }, (course_id, module_id));

  useEffect(() => {
  }, (getCourseAndModuleInfo));

  return (

export default HeaderInfo;

development – The remote server returned an error (401) unauthorized

I have install a fresh version of SharePoint 2019 which is on domain A,then i added a second computer to A which will be hosting websites on IIS.

I have created a console application just for testing connection to SharePoint on the second computer using the code below and am getting unauthorized access.Is there anything wrong with the code below?. Note the credentials are correct.

        System.Net.NetworkCredential cred = new System.Net.NetworkCredential(@"DoaminNAmeadministrator","Password");

        using (ClientContext clientContext = new ClientContext(""))
            clientContext.AuthenticationMode = ClientAuthenticationMode.Default;

            clientContext.Credentials = cred;

            Microsoft.SharePoint.Client.ClientResult<System.IO.Stream> stream = null;

            KeywordQuery keywordQuery = new KeywordQuery(clientContext);

            keywordQuery.QueryText = "SharePoint";

            keywordQuery.EnablePhonetic = true;

            keywordQuery.EnableOrderingHitHighlightedProperty = true;
            //keywordQuery.SummaryLength = 500;

            SearchExecutor searchExecutor = new SearchExecutor(clientContext);

            ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);


9 – How can I display the values returned from an external API under a form?

I have created a custom module that pulls in data from an external API. Users select a few values on a form; submitting the form makes a call to the external API. The module then display the data, which has been filtered by the values entered from users.

I have been able to show the returned data with Drupal::messenger()->addMessage(), but this doesn’t seem the right method. I’ve found a few other suggestions, but I can’t get any of them to work. They are for older Drupal versions.

I’d like to be able to display the formatted results under the form, on the same page.

How can I achieve this in Drupal 9?