Author Archives: Robins

Transfer: completely solve the problem that the browser home page is tampered by deleting the script file

Transferred from: https://blog.csdn.net/weixin_ 38382105/article/details/79320653

This blog is very detailed, so I want to collect it and organize it in my blog to facilitate future reference. The writing is too detailed. I finally solved this annoying problem (I tried to change the shortcut and delete the registry before, but it can’t be solved. The people who do this thing are really disgusting). The home page of the browser has been tampered with, so that every time I start Google browser, the desktop icon will refresh, and Google will white screen, which is absolutely intolerable for my obsessive-compulsive patients. Finally, I found the above blog, successfully solved my problem, it’s just a comfortable batch of people!!!

This paper summarizes the content of the article

1. Tools needed

https://pan.baidu.com/s/1pYUxQzMyr_ Download and install shwrzubtrcuq

2. Tool usage: enter the installation directory folder and find the file: wbemeventviewer.exe Right click to run in administrator mode

3. Click the pen Icon in the upper left corner to connect to rootcimv2, ignore the account and password, and confirm directly

4. On the left_ You can see below EventFilter_ EventFilter.Name= “VBScriptLKLive_ On the right is the details of the filter.

5. Right click on the right side and select View instance properties to see the specific content of the VBScript.

6. Close the property window, right-click on the right side of the event filter, select unregister, and then right-click on the left side to delete the event filter vbscriptlklive_ Filter”

7. Exit after confirmation.

 

 

 

Windows 10 startup item repair an operating system was’t found solution

Recently, in the dual systems of deepin15 ( Ubuntu ) and windows10 , we encountered a series of problems when uninstalling deepin. The records are as follows:
after windows installs deepin system, the general boot item will change to deepin boot. After uninstalling, the boot item will disappear, and the system will not automatically restore win boot, resulting in failure to enter the system normally. Before deleting the partition of deepin, you can use the official uninstall instruction of deepin to guide me to use it. However, it is invalid, so I have to delete the partition by myself, and then use the USB flash disk to start and repair it.
(step 1-2) it needs to be made on another computer that can be used normally

    Download laomaotao or u start or Chinese cabbage. And install. Insert the U-disk and make it with one click. When finished, unplug the U-disk. Insert the USB flash disk into the computer that can't be started normally, and press F12 to select the option of USB flash disk. Enter (the name is usually the manufacturer of your USB flash disk). Select Windows 8 to start the new computer. Wait for normal entry. Open diskgenius, change the drive letter to the previous good state (generally starting from the U disk will change the initial drive letter), and use the boot repair software to automatically repair. Exit and restart.

If the win system can be started normally after 6, the following can be ignored. Otherwise, if an operating system wasn't found, press Ctrl + Alt + Del to restart. Then restart or repeat the above 3-5 (no 6). And follow the steps below

    after entering the PE system, click the windows logo in the lower left corner and find dism + + in the folder. Open the top column, find the partition where the system is located, and click to find the tool repair guide. Restart, that's it.

Difference between vs code user and system version

Difference between vs code user and system version

Recently, the version of win10 LTSC has been re installed, and the new version of visual studio code has just come out.
However, the official website provides user and system versions. Simple installation is tried.

For installation

The

    user version can’t create the default folder in the system partition (disk) Microsoft vs Code , which shows that the permissions are insufficient. The solution is to name the self created folder in the directory
    in advance, and then click next, For example, vs Code , in order to synchronize the path box, you need to delete the default Microsoft, as shown in figure

    For the system version, there is no such problem, but the next step is the same as other software

    Language problems (win10 LTSC Chinese language)

      I'm not sure whether this is just me or a common problem. For the user version of the installation program and vscode program, the default is English. It seems that the system language environment can't be read. The system version is the Chinese installation program directly, and the Chinese display panel user version uses the Chinese method

        open vs code, enter Ctrl + Shift + P , and enter configure display in the search box Language , click open to change the quotation mark en to 'zh CN', or delete the quotation mark "en" to the colon, and enter Z to complete it as "locale": "zh CN" click the plug-in, click the bottom icon on the left side of the software, and then search Chinese , download the language pack, install and restart

        Concluding remarks

          at present, I don't know the specific difference between the two versions.
          in stakoverflow's Q & A, some people said that there are differences between the two versions. I don't know for the moment. I may need to understand the good intentions of Microsoft. The software is also divided into users and system administrators, for ordinary users, in order to avoid unnecessary trouble, it is recommended to use the system version. For reference only

Solution of insufficient memory space or desktop stack in GX works2

Solution of insufficient memory space or desktop stack in GX works2

Open Mitsubishi PLC programming software GX works2 prompt

There is not enough memory space or desktop stack to start GX works2
Please restart GX works2 after finishing other applications


New on December 30, 2018, shared by @ Oops. You can delete the registry and reload it.
The method is as follows

    press win + R , enter regedit , and press enter to find HKEY_ CURRENT_ Right click to delete. Reload the software.

Solutions that cannot be opened


Google and Baidu have found many similar situations, but there is no perfect solution

For example, reloading software still doesn't work. It's also said that the cost of reloading the system is too high. After all, a lot of software has to be installed.


#Solution:

##1. First install GX works3
?2. Then install GX works2. Perfectly solve this problem
?3. Pay attention not to unload GX3, otherwise GX2 still can't work.

I thought the GX3 version was high and good, but later I learned that 2 and 3 only support different PLC. The FX2N and gxworks2 that I wanted to use were available, so I unloaded 3. As a result, 2 is not available. Later in accordance with the previous way to try, and good..

Hope to help you

Vs (Visual Studio) encountered a solution that could not open iostream

Recently, when configuring some projects, I couldn’t even open the iostream header file

Finally, we try to reset vs C + +, and successfully solve the problem.

My version is vs2013 in the following way

Tools -> Import and Export -> Reset all -> ..

Tools → import and export settings → reset all settings → next →

Select “save the current settings (I chose to reset directly)”,

Next → select “development language to reset (for example, Visual C + + development settings)” → finish

My CSDN first blog actually wrote this..

Inheritance relationship causes class loading order

Question: when wechat authentication defines variables in weixinpaycontroller, the assigned value is obtained by reading the configuration file in initcontroller, which may cause that sometimes the data of the configuration file cannot be read?

 

Reason: This is caused by the loading order of the controller. First, the class inheritance relationship of weixinpaycontroller is weixinpaycontroller — & gt; absauthcontroller — & gt; basemcccontroller — & gt; mvccontroller. The inheritance relationship of initcontroller class is initcontroller — & gt; mvccontroller. It can be seen that these two controllers are inherited from mvccontroller, so there will be the problem of loading order first and then

 

Short term solution: when deploying online, test it first, and you can see that there is no problem. If there is no problem, you can. If there is a problem, it will be deployed again, and then detected again

 

Long term solution: weixinpaycontroller is directly inherited from initcontroller, so that the loading order is fixed and consistent

How to prevent duplicate submission

When the user clicks the submit button twice in a row, if no measures are taken, there will be two pieces of data in the data.

Solution: check when inserting database. Insert a distributed lock on the database in the code. Use redis as the object of the lock. After locking, make a judgment. The short rule is to look up a piece of data from the database. If the data does not exist, insert it and generate an ID in the database. If it exists (insert the second data), take out this data and update it. In this way, the problem of repeated insertion can be solved.

Existing problems: it is not clear whether it is a duplicate submission or a user’s update operation

[Solved] volatile was removed and now has no effect. Use `with torch.no_grad():` instead.

Solution: volatile was removed and now has no effect. Use with torch.no_grad():instead.

Source code

self.priors = Variable(self.priorbox.forward(), volatile=True)

 

the reason

It volatilehas been removed in the torch version .
Before pytorch 0.4.0 input = Variable(input, volatile=True) set volatile to True, as long as an input is volatile, the output is also volatile, which can guarantee that there is no intermediate state; but canceled after pytorch 0.4.0 The volatile mechanism is replaced with functions such as torch.no_grad(), torch.set_grad_enable(grad_mode)
torch.no_grad() is a context manager.
When using pytorch , not all operations require the generation of calculation graphs (the construction of the calculation process to facilitate gradient back propagation and other operations). For the calculation operation of tensor, the default is to construct the calculation graph. In this case, you can use with torch.no_grad(): to force the subsequent content not to construct the calculation graph.
The torch.no_grad() will affect pytorch’s backpropagation mechanism. In the test, because it is determined that backpropagation will not be used, this mode can help save memory space. The same is true for torch.set_grad_enable(grad_mode)

change into

with torch.no_grad():
	self.priors = Variable(self.priorbox.forward())

or

self.priors = Variable(self.priorbox.forward())

How to Solve TypeError: type numpy.ndarray doesn‘t define __round__ method

Pycharm Warning TypeError: type numpy.ndarray doesn’t define round method

 

1.the problem
matrix = round(np.array([[1.5,2.3],[1,2],[1,2]]))
The error interface

Insert picture description here
type is wrong: the type numpy.ndarray does not define the __round__ method

2.solve
Change the round method to np.round
code show as below:

matrix = np.round(np.array([[1.5,2.3],[1,2],[1,2]]))