Category Archives: How to Fix

Anaconda Matplotlib drawing Chinese garbled solution

I found a lot of methods to solve the Chinese garbled code of Matplotlib in Anaconda on the Internet. I feel it is not concise enough. Now let’s make a summary. Two steps, one is to find the font, the other is to set it.

1. Font

The system font file is usually saved in the   C:\Windows\Fonts

Open copy any font:

Save it in the TTF folder. Lu Jin’s name is e::’anaconda ‘,’lib’,’site-packages’,’matplotlib ‘,’mpl-data’,’fonts’,’ttf ‘

You can change the file name of Anaconda installed on your computer, and the following path is the same.

So the font is chosen.

2. Setting

Go back to MPL data and open the matplotlibrc file: e:// Anaconda/lib/site packages/Matplotlib/MPL data

Notepad shows about 249 lines, the upper middle part of the file:

Remove the comment in front of font. Family, and then change the following name to the newly copied font name: simhei.

Save with Ctrl + s and reopen the compiler.

Solve the problem of Tomcat console and HTML garbled

1. Garbled console

This is because the default encoding of windows’s CMD is GBK, while Tomcat is UTF-8. Of course, there will be garbled codes. But for this garbled code, we just need to make the encoding format printed on the console GBK.

Modify the logging.properties configuration
and add it in the logging.properties configuration file under conf

java.util.logging.ConsoleHandler.encoding = GBK

Restart Tomcat to see that the console output log is normal

2. HTML page garbled

Modifying the web.xml file in Tomcat

<servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
		<init-param>
        	<param-name>fileEncoding</param-name>
        	<param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

I’ve also read many articles about modifying server.xml and catalina.bat, but they didn’t work for me. I tried to restore all Tomcat configurations, only modifying web.xml here, and finally determined that I only need to modify here

If you don’t succeed according to me, try to modify others!

How to display the Chinese name and installation time of installed software in snmp4j walk Windows


import java.io.IOException;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import org.snmp4j.CommunityTarget;
import org.snmp4j.Snmp;
import org.snmp4j.Target;
import org.snmp4j.TransportMapping;
import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.smi.Address;
import org.snmp4j.smi.GenericAddress;
import org.snmp4j.smi.OID;
import org.snmp4j.smi.OctetString;
import org.snmp4j.smi.VariableBinding;
import org.snmp4j.transport.DefaultUdpTransportMapping;
import org.snmp4j.util.DefaultPDUFactory;
import org.snmp4j.util.TreeEvent;
import org.snmp4j.util.TreeUtils;

public class SnmpWalk2 {

	private static int[] octetStringToBytes(String value_ipar) {
		// ---------------------------
		// Split string into its parts
		// ---------------------------
		String[] bytes;
		bytes = value_ipar.split("[^0-9A-Fa-f]");

		// -----------------
		// Initialize result
		// -----------------
		int[] result;
		result = new int[bytes.length];

		// -------------
		// Convert bytes
		// -------------
		int counter;
		for (counter = 0; counter < bytes.length; counter++)
			result[counter] = Integer.parseInt(bytes[counter], 16);

		// ----
		// Done
		// ----
		return (result);

	}
	// octetString 转 Date

	private static Date octetStringToDate(String value_ipar) throws Exception {
		// ---------------------------
		// Convert into array of bytes
		// ---------------------------
		int[] bytes;
		bytes = octetStringToBytes(value_ipar);

		// -----------------------
		// Maybe nothing specified
		// -----------------------
		if (bytes[0] == 0)
			return (null);

		// ------------------
		// Extract parameters
		// ------------------
		int year;
		int month;
		int day;
		int hour;
		int minute;
		int second;
		int deci_sec = 0;
		int offset = 0;
		year = (bytes[0] * 256) + bytes[1];
		month = bytes[2];
		day = bytes[3];
		hour = bytes[4];
		minute = bytes[5];
		second = bytes[6];
		if (bytes.length >= 8)
			deci_sec = bytes[7];
		if (bytes.length >= 10) {
			offset = bytes[9] * 60;
			if (bytes.length >= 11)
				offset += bytes[10];
			if (bytes[8] == '-')
				offset = -offset;
			offset *= 60 * 1000;
		}

		// ------------------------------------
		// Get current DST and time zone offset
		// ------------------------------------
		Calendar calendar;
		int my_dst;
		int my_zone;
		calendar = Calendar.getInstance();
		my_dst = calendar.get(Calendar.DST_OFFSET);
		my_zone = calendar.get(Calendar.ZONE_OFFSET);

		// ----------------------------------
		// Compose result
		// Month to be converted into 0-based
		// ----------------------------------
		calendar.clear();
		calendar.set(Calendar.YEAR, year);
		calendar.set(Calendar.MONTH, month - 1);
		calendar.set(Calendar.DAY_OF_MONTH, day);
		calendar.set(Calendar.HOUR_OF_DAY, hour);
		calendar.set(Calendar.MINUTE, minute);
		calendar.set(Calendar.SECOND, second);
		calendar.set(Calendar.MILLISECOND, deci_sec * 100);

		// ---------
		// Reset DST
		// ---------
		calendar.add(Calendar.MILLISECOND, my_dst);

		// -----------------------------------------------------------------------------------
		// If the offset is set, we have to convert the time using the offset of
		// our time zone
		// -----------------------------------------------------------------------------------
		if (offset != 0) {
			int delta;
			delta = my_zone - offset;
			calendar.add(Calendar.MILLISECOND, delta);
		}

		// -------------
		// Return result
		// -------------
		return (calendar.getTime());

	}

	// octetString 转 中文

	private static String getChinese(String variable) {
		String result = variable;

		if (!variable.contains(":")) {
			return result;
		}

		if (result.equals(variable)) {
			try {

				String[] temps = variable.split(":");
				byte[] bs = new byte[temps.length];
				for (int i = 0; i < temps.length; i++)
					bs[i] = (byte) Integer.parseInt(temps[i], 16);
				result = new String(bs, "gbk");
			} catch (Exception ex) {

			}
		}
		return result;

	}

	public static void main(String[] args) throws Exception {
		CommunityTarget target = new CommunityTarget();
		target.setCommunity(new OctetString("public"));
		target.setAddress(GenericAddress.parse("udp:127.0.0.1/161")); // supply your own IP and port
		target.setRetries(2);
		target.setTimeout(1500);
		target.setVersion(SnmpConstants.version2c);

		Map<String, String> result = doWalk(".1.3.6.1.2.1.25.6.3.1", target); // ifTable, mib-2 interfaces

		for (Map.Entry<String, String> entry : result.entrySet()) {

			if (entry.getKey().startsWith(".1.3.6.1.2.1.25.6.3.1.2")) {
				System.out.println("name" + entry.getKey().replace(".1.3.6.1.2.1.25.6.3.1.2", "") + ": "
						+ getChinese(entry.getValue()));
			}
			if (entry.getKey().startsWith(".1.3.6.1.2.1.25.6.3.1.4")) {
				System.out.println("type" + entry.getKey().replace(".1.3.6.1.2.1.25.6.3.1.4", "") + ": "
						+ getChinese(entry.getValue()));
			}
			if (entry.getKey().startsWith(".1.3.6.1.2.1.25.6.3.1.5")) {
				System.out.println("datetime" + entry.getKey().replace(".1.3.6.1.2.1.25.6.3.1.5", "") + ": "
						+ octetStringToDate(entry.getValue()));
			}
		}
	}

	public static Map<String, String> doWalk(String tableOid, Target target) throws IOException {
		Map<String, String> result = new TreeMap<>();
		TransportMapping<?extends Address> transport = new DefaultUdpTransportMapping();
		Snmp snmp = new Snmp(transport);
		transport.listen();

		TreeUtils treeUtils = new TreeUtils(snmp, new DefaultPDUFactory());
		List<TreeEvent> events = treeUtils.getSubtree(target, new OID(tableOid));
		if (events == null || events.size() == 0) {
			System.out.println("Error: Unable to read table...");
			return result;
		}

		for (TreeEvent event : events) {
			if (event == null) {
				continue;
			}
			if (event.isError()) {
				System.out.println("Error: table OID [" + tableOid + "] " + event.getErrorMessage());
				continue;
			}

			VariableBinding[] varBindings = event.getVariableBindings();
			if (varBindings == null || varBindings.length == 0) {
				continue;
			}
			for (VariableBinding varBinding : varBindings) {
				if (varBinding == null) {
					continue;
				}

				result.put("." + varBinding.getOid().toString(), varBinding.getVariable().toString());
			}

		}
		snmp.close();

		return result;
	}

}

[Solved] com.alibaba.nacos.api.exception.NacosException: failed to req API

Problem statement

When using Nacos as spring’s test center, the following error occurred when enabling the project

Nacos cluster cannot connect to com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/ins

Solution

Due to the inconsistency between the versions of spring cloud – Alibaba and Nacos, you can download the appropriate version according to the version provided on the official website

Two methods of fixing WPF menu bar after scrolling to the top

Recently, there is a requirement in the project:

The menu bar is fixed at the top after scrolling to the top.. This is quite common on the mobile end

Look at the effect:

Let’s take a look at the code. There are not many codes

The first method is as follows:

Write a menu as like as two peas, and hide it on top of the window. When the menu is rolled up to the top, it will be displayed, otherwise hidden. br>

Mainwindow1.xaml is as follows:

<Window x:Class="wpfcore.MainWindow1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:wpfcore"
        mc:Ignorable="d"
        Title="MainWindow1" Height="450" Width="800">
    <Grid>
        <ScrollViewer ScrollChanged="ScrollViewer_ScrollChanged">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="200"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" x:Name="banner">
                    <Image Source="D:\bizhi\123\2-9.jpg" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30" Foreground="White" Text="这是顶部Banner"/>
                </Grid>
                <StackPanel Grid.Row="1" Panel.ZIndex="100" x:Name="menu" Orientation="Horizontal" TextBlock.FontSize="18" Background="LightBlue">
                    <TextBlock Text="Home" Margin="10"></TextBlock>
                    <TextBlock Text="Editor" Margin="10"></TextBlock>
                    <TextBlock Text="Viewer" Margin="10"></TextBlock>
                    <TextBlock Text="Debug" Margin="10"></TextBlock>
                    <TextBlock Text="WPF UI" Margin="10"></TextBlock>
                </StackPanel>
                <Border Height="1000" Grid.Row="22">
                    <Border.Background>
                        <LinearGradientBrush>
                            <GradientStop Color="Red" Offset="0"/>
                            <GradientStop Color="Green" Offset="0.5"/>
                            <GradientStop Color="Blue" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.Background>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30" Foreground="White" Text="这是顶部Banner"/>
                </Border>
            </Grid>
        </ScrollViewer>
        <StackPanel x:Name="topMenu" VerticalAlignment="Top" Visibility="Hidden" Orientation="Horizontal" TextBlock.FontSize="18" Background="LightBlue">
            <TextBlock Text="Home" Margin="10"></TextBlock>
             <TextBlock Text="Editor" Margin="10"></TextBlock>
             <TextBlock Text="Viewer" Margin="10"></TextBlock>
             <TextBlock Text="Debug" Margin="10"></TextBlock>
            <TextBlock Text="WPF UI" Margin="10"></TextBlock>
        </StackPanel>
    </Grid>
</Window>

Mainwindow1.cs Code:

using System.Windows;


namespace wpfcore
{
    public partial class MainWindow1 : Window
    {
        public MainWindow1()
        {
            InitializeComponent();
        }
        private void ScrollViewer_ScrollChanged(object sender, System.Windows.Controls.ScrollChangedEventArgs e)
        {
            if (e.VerticalOffset > banner.ActualHeight)
            {
                 topMenu.Visibility = Visibility.Visible;
            }
            else
            {
                topMenu.Visibility = Visibility.Hidden;
            }
        }
    }
}

—————Dividing line——————

Second method:

Add render transform to the menu bar. When the menu scrolls to the top, set translatetransform. Yproperty   The same effect was achieved

Mainwindow.xaml code is as follows:

<Window x:Class="wpfcore.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:wpfcore" 
        xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
        mc:Ignorable="d"
        UseLayoutRounding="True"
        Title="MainWindow" Width="600" Height="340">
    <Grid>
        <ScrollViewer ScrollChanged="ScrollViewer_ScrollChanged">
            <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="200"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0" x:Name="banner">
                <Image Source="D:\bizhi\123\2-9.jpg" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30" Foreground="White" Text="这是顶部Banner"/>
            </Grid>
            <StackPanel Grid.Row="1" Panel.ZIndex="100" x:Name="menu" Orientation="Horizontal" TextBlock.FontSize="18" Background="LightBlue">
                    <StackPanel.RenderTransform>
                        <TranslateTransform x:Name="menuTranslate" Y="0.0"/>
                    </StackPanel.RenderTransform>
                    <TextBlock Text="Home" Margin="10"></TextBlock>
                    <TextBlock Text="Editor" Margin="10"></TextBlock>
                    <TextBlock Text="Viewer" Margin="10"></TextBlock>
                    <TextBlock Text="Debug" Margin="10"></TextBlock>
                    <TextBlock Text="WPF UI" Margin="10"></TextBlock>
                </StackPanel>
            <Border Height="1000" Grid.Row="22">
                <Border.Background>
                    <LinearGradientBrush>
                        <GradientStop Color="Red" Offset="0"/>
                        <GradientStop Color="Green" Offset="0.5"/>
                        <GradientStop Color="Blue" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30" Foreground="White" Text="这是顶部Banner"/>
                </Border>
        </Grid>
    </ScrollViewer>
        <StackPanel x:Name="topMenu" VerticalAlignment="Top" Visibility="Hidden" Orientation="Horizontal" TextBlock.FontSize="18" Background="LightBlue">
            <TextBlock Text="Home" Margin="10"></TextBlock>
            <TextBlock Text="Editor" Margin="10"></TextBlock>
            <TextBlock Text="Viewer" Margin="10"></TextBlock>
            <TextBlock Text="Debug" Margin="10"></TextBlock>
            <TextBlock Text="WPF UI" Margin="10"></TextBlock>
        </StackPanel>
    </Grid>
</Window>


Mainwindow.cs Code:

using System.Windows;
using System.Windows.Media;


namespace wpfcore
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }


        private void ScrollViewer_ScrollChanged(object sender, System.Windows.Controls.ScrollChangedEventArgs e)
        {
            menuTranslate.SetValue(TranslateTransform.YProperty, e.VerticalOffset);
            if (e.VerticalOffset > banner.ActualHeight)
            {
                menuTranslate.SetValue(TranslateTransform.YProperty, e.VerticalOffset-banner.ActualHeight);
            }
            else
            {
                menuTranslate.SetValue(TranslateTransform.YProperty, 0.0);
            }
        }
    }
}


Error starting peacock in manjaro [How to Solve]

Peacock is a GUI interface in moose, which can help judge the input of model. One day, when I opened the software and found peacock, an error occurred and the error content was reported

libGL error: MESA-LOADER: failed to open r600: /home/zhaohaowang/miniconda3/envs/moose/lib/python3.7/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/r600_dri.so) (search paths /usr/lib/dri)
libGL error: failed to load driver: r600
libGL error: MESA-LOADER: failed to open r600: /home/zhaohaowang/miniconda3/envs/moose/lib/python3.7/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/r600_dri.so) (search paths /usr/lib/dri)
libGL error: failed to load driver: r600
libGL error: MESA-LOADER: failed to open swrast: /home/zhaohaowang/miniconda3/envs/moose/lib/python3.7/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri)

According to the statement on the Internet:

Similar problems

And

Matlab encountered this problem
found that the libstdc + + library of peacock did not match the system library

solve the problem

First, find the location of libstdc +

sudo find/-name "libstdc++.so.6*"

obtain

find: ‘/proc/83730/task/83730/net’: Invalid arguments
find: '/proc/83730/net': invalid parameter
find: '/run/user/1000/gvfs': insufficient permissions
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-ng-9.3.0-h6de172a_19/lib/libstdc++.so.6.0.28
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-ng-9.3.0-h6de172a_19/lib/libstdc++.so.6
/home/zhaohaowang/miniconda3/pkgs/gcc_impl_linux-64-9.3.0-h28f5a38_17/x86_64-conda-linux-gnu/sysroot/lib64/libstdc++.so.6.0.28
/home/zhaohaowang/miniconda3/pkgs/gcc_impl_linux-64-9.3.0-h28f5a38_17/x86_64-conda-linux-gnu/sysroot/lib64/libstdc++.so.6
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-ng-9.1.0-hdf63c60_0/lib/libstdc++.so.6.0.26
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-ng-9.1.0-hdf63c60_0/lib/libstdc++.so.6
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-ng-9.1.0-hdf63c60_0/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.26
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-ng-9.1.0-hdf63c60_0/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-devel_linux-64-9.3.0-h4084dd6_17/x86_64-conda-linux-gnu/lib/libstdc++.so.6.0.28
/home/zhaohaowang/miniconda3/pkgs/libstdcxx-devel_linux-64-9.3.0-h4084dd6_17/x86_64-conda-linux-gnu/lib/libstdc++.so.6
/home/zhaohaowang/miniconda3/lib/libstdc++.so.6.0.26
/home/zhaohaowang/miniconda3/lib/libstdc++.so.6.0.29
/home/zhaohaowang/miniconda3/lib/libstdc++.so.6.0.2
/home/zhaohaowang/miniconda3/envs/moose/x86_64-conda-linux-gnu/sysroot/lib64/libstdc++.so.6.0.28
/home/zhaohaowang/miniconda3/envs/moose/x86_64-conda-linux-gnu/sysroot/lib64/libstdc++.so.6
/home/zhaohaowang/miniconda3/envs/moose/x86_64-conda-linux-gnu/lib/libstdc++.so.6.0.28
/home/zhaohaowang/miniconda3/envs/moose/x86_64-conda-linux-gnu/lib/libstdc++.so.6
/home/zhaohaowang/miniconda3/envs/moose/lib/libstdc++.so.6.0.28
/home/zhaohaowang/miniconda3/envs/moose/lib/libstdc++.so.6
/home/zhaohaowang/miniconda3/envs/moose/lib/libstdc++.so.6.0.29
/home/zhaohaowang/miniconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.26
/home/zhaohaowang/miniconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/home/zhaohaowang/.local/share/RecentDocuments/libstdc++.so.6.0.26.desktop
/usr/lib/dri/libstdc++.so.6
/usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6.0.29
/usr/lib32/libstdc++.so.6
/usr/lib32/libstdc++.so.6.0.29
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.29-gdb.py

Link lib/libstdc + +. So. 6 to the libstdc + + of peacock

ln -sf /usr/lib/libstdc++.so.6  /home/zhaohaowang/miniconda3/envs/moose/lib/python3.7/site-packages/PyQt5/../../../libstdc++.so.6

Then it can be spicy!

Unable to access javax.servlet.servletexception [How to Solve]

Using idea, a spring boot project based on Maven is created. In the process of deploying the project with war package and Linux (providing JDK environment, Tomcat), when packaging, you will be prompted that javax. Servlet. ServletException
cannot be accessed

You need to remove tomcat from the web dependency
		<dependency>
		  <groupId>org.springframework.boot</groupId>
		  <artifactId>spring-boot-starter-web</artifactId>
		  <exclusions>
		    <exclusion>
		      <groupId>org.springframework.boot</groupId>
		      <artifactId>spring-boot-starter-tomcat</artifactId>
		    </exclusion>
		  </exclusions>
		</dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
 <plugin>		No web required for packaging
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.4</version>
        <configuration>
            <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
    </plugin>

How to Use qdbusinterface to call DBUS interface

        // Create QDBusInterface
        QDBusInterface iface("org.onboard.Onboard",
                             "/org/onboard/Onboard/Keyboard",
                             "org.onboard.Onboard.Keyboard");
        if (!iface.isValid()) {
            qInfo() << qPrintable(QDBusConnection::sessionBus().lastError().message());
        }
        QDBusReply<void> reply = iface.call("Show");
        if (reply.isValid()) {
            qInfo() << "call org.onboard.Onboard.Keyboard success";
            return;
        }
        qInfo() << "call corg.onboard.Onboard.Keyboard failed" << reply.error();
    });

[Solved] Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Problem Description:

I used node sass before, and later changed it to dart sass. This product started to be stupid. Fortunately, some big guy has solved it. Let’s record it

40% building 1/4 modules 3 active ...-app-class-teaching-activity-history-records-list\src\components\headerSelectExercise\headerSelectExercise.vue?vue&type=style&index=0&id=04fdc1ef&scoped=true&lang=scss&D
EPRECATION WARNING: Using/for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($px, $html-font-size)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
18 │   @return $px/$html-font-size * 1rem;
   │           ^^^^^^^^^^^^^^^^^^^^^
   ╵
    src\assets\scss\variable.scss 18:11  computer()
    src\assets\scss\coverAntd.scss 4:16  @import
    src\assets\scss\index.scss 8:9       @import
    stdin 477:9                          root stylesheet


Solution:

"sass": "^1.26.5",    replace to   "sass": "~1.26.5",

[How to Solve] ashx Http Delete method not allowed

Reference answer 1 (invalid)

<system.webServer>
	<security>
		<requestFiltering>
			<verbs allowUnlisted="false">
				<add verb="GET" allowed="true" />
				<add verb="POST" allowed="true" />
				<add verb="DELETE" allowed="true" />
				<add verb="PUT" allowed="true" />
				<add verb="OPTIONS" allowed="true" />
				<add verb="TRACE" allowed="true" />
			</verbs>
		</requestFiltering>
	</security>
</system.webServer>

Reference answer 2 (invalid)

<system.webServer>
	<handlers>
		<remove name="WebDAV" />
		<remove name="OPTIONSVerbHandler" />
		<remove name="TRACEVerbHandler" />
        <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
	</handlers>
	<modules>
		<remove name="WebDAVModule" />
	</modules>
</system.webServer>

Using. Net 4.0 asp.net technology, no “webdavmodule” module was found

Correct answer

It is obvious that the error of ashx message is called to modify the handler of mapping “. Ashx” file, so the following items are found

Each of them should be revised

Or modify the web.config system.webserver configuration section:

<system.webServer>
    <handlers>
		<remove name="SimpleHandlerFactory-ISAPI-2.0-64" />
		<remove name="SimpleHandlerFactory-ISAPI-2.0" />
		<remove name="SimpleHandlerFactory-Integrated" />
		<remove name="SimpleHandlerFactory-ISAPI-4.0_32bit" />
		<remove name="SimpleHandlerFactory-Integrated-4.0" />
		<remove name="SimpleHandlerFactory-ISAPI-4.0_64bit" />
		<add name="SimpleHandlerFactory-ISAPI-4.0_64bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG,DELETE" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
		<add name="SimpleHandlerFactory-Integrated-4.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG,DELETE" type="System.Web.UI.SimpleHandlerFactory" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />
		<add name="SimpleHandlerFactory-ISAPI-4.0_32bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG,DELETE" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
		<add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,HEAD,POST,DEBUG,DELETE" type="System.Web.UI.SimpleHandlerFactory" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv2.0" />
		<add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG,DELETE" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
		<add name="SimpleHandlerFactory-ISAPI-2.0-64" path="*.ashx" verb="GET,HEAD,POST,DEBUG,DELETE" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
	</handlers>
</system.webServer>

Solution (- V -)

[Solved] Golang Error: The system cannot find the path specified. [mkdir C:/xx/yy/]:

The system cannot find the path specified

If you report an error when creating a directory, it is recommended that you check the following:

err := os.Mkdir(path, perm)

If you use the above method, you can only create a single level directory
if you want to create a directory such as XX/YY, XX/YY/ZZ,…
please enter the following method

err := os.MkdirAll(path, perm)

OK! Problem solved!