Tag Archives: solution

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

The tree component in easyUI does not display data or displays undefined solutions

In recent days, I have learned easyUI and used the tree component. After n days of pain, I finally came out. Now I will summarize some problems.

1. In the official demo, all the data is taken from the. JSON file. In practical application, it is obviously impossible to do so. If you want to take it from the database, then the problem is, how to get it?There’s no explanation in the official demo, and I haven’t found any results after searching online for a long time

Methods 1:Ajax is fetched, after the web interface is loaded, the Ajax is called, and the value is spliced from the background in the database, and spliced into JSON. There are many methods of splicing. Here is not enumerated. After the completion of the mosaic, JSON is written back by response writer. In JS, the data parameter of tree is the returned JSON (time reason, this method is not tested, and the theory is feasible).

Method 2: root method 1 is similar: the following is the code

HTML code of tree:

<ul id="department_tree" class="easyui-tree"></ul>

JS code of tree:

/**
 * @argument Fetching data from a tree by URL
 * @author ZHENGWEI
 * @date 2015-5-8
 * @version 1.0
 */
$(document).ready(function(){
	/* Called when loading is complete*/
	$("#department_tree").tree({
		/*JSON spliced address*/
		url:'CompanyStaffAction!listCompanyDepartment.action',
		/*Linked lines*/
		lines:true,
		/*animation effect*/
		animate:true
	});
})

The URL is the action returned to JSON in the background, and the code is as follows

/**
	 * Search company's department information
	 * @author ZHENGWEI
	 * @throws JSONException 
	 * @throws IOException 
	 * @date 2015-5-7
	 */
	public String listCompanyDepartment() throws JSONException, IOException{
		//Set the encoding format to prevent Chinese characters from being garbled
		response.setCharacterEncoding("UTF-8");
		//return company department information
		List<CompanyDepartmentInfo> companyDepartmentInfoList = this.companyStaffService.listCompanyDepartment();
		// Declare the JSONArray object and build the tree
		JSONArray jsonChildTreeArray = new JSONArray();
		//condemn empty
		if(companyDepartmentInfoList.size() != 0){
			for(CompanyDepartmentInfo companyDepartmentInfo:companyDepartmentInfoList){
				JSONObject jsonChildInfoObject = new JSONObject();
				jsonChildInfoObject.put("id", '"'+companyDepartmentInfo.getDepartmentId()+'"');
				jsonChildInfoObject.put("text", companyDepartmentInfo.getDepartmentName());
				jsonChildTreeArray.put(jsonChildInfoObject);
			}
		}
		JSONObject jsonDepartmentTree = new JSONObject();
		jsonDepartmentTree.put("id", "0");
		jsonDepartmentTree.put("text", "CompanyDepartmentTree");
		jsonDepartmentTree.put("state", "open");
		// turn the jsonChildTreeArray into a child node
		jsonDepartmentTree.put("children", jsonChildTreeArray);
		//string type, add '[]' to JSON
		String treeData = jsonDepartmentTree.toString();
		treeData = "["+treeData+"]";
		// Declare PrintWriter variable to pass back JSON
		PrintWriter out = response.getWriter();
		out.write(treeData);
		return null;
	}

It must be noted that,

After the encapsulation of JSON, make sure to print it to see if there is a [] symbol package outside of JSON, otherwise tree can’t read the data!!!!

The final results are as follows:

 

 

It’s a very hard process… It’s tears when I talk too much, and many problems on the Internet can’t reach the point. I’ve thought about it for many days, and I hope that students who study in the future will avoid detours

The solution of calling$. Ajax successfully but the success method does not respond

Today, when I was working, I encountered a problem. I used $. Ajax to transfer data to the background, which can operate correctly in the background, but success did not respond, and error responded. After checking the document, I realized that after jQuery version 1.4, all the returned JSON formats must meet the requirements json.org Success can only be called back correctly in the format of, otherwise jQuery will think that it returns an error Here is an example:

JSONObject j = new JSONObject();
j.put("msg","SUCCESS");
PrintWriter out = response.getWriter();
out.write(j.toString());

This is correct. JQuery calls back success

String j = "123";
PrintWriter out = response.getWriter();
out.write(j);

This is wrong, jQuery will think it is wrong

 

Solution of Hibernate paging report only entering result set and not supporting requested operation

I checked the information on the Internet. The reason is that when pagination is used, the query result is empty, but pagination is also set, so an error will be reported.

There are two solutions:

Scheme 1, add conditions under paging code

public static List<?> getList(Session session , String HQL , int currentPage, int pageSize){
		Query q = session.createQuery(HQL);
		if(currentPage != 0 && pageSize != 0 && q.list().size()!= 0)
		{
		    int startRow = (currentPage-1)*pageSize;
		    q.setFirstResult(startRow);
		    q.setMaxResults(pageSize);
		}
	    List<?> list = q.list();
	    //Return search results
	    return list;
	 } 

The if condition is that when the query result is empty, there will be no pagination, so no error will be reported.

Scheme 2: add this sentence to the hibernate configuration file

<property name="jdbc.use_scrollable_resultset">false</property>