Author Archives: Robins

Phpstrom reported an error when using SVN: CreateProcess error = 2, the system could not find a solution for the specified file

After phpstrom is installed, the following error will appear during SVN checkout:

Cannot load supported formats: Cannot run program “svn”: CreateProcess error=2

The reason is that SVN uses command-line tools. If there is no SVN command-line tool locally, it will lead to an error.

Solution

Re install SVN, select the installation command line and complete the installation

Change to:

Then all the way to next, the installation is successful.

Restart phpstrom, SVN can be used normally.

PHP in Windows combined with bat batch processing to achieve multi process verification proxy server function

PHP in Windows combined with bat batch processing to achieve verification proxy IP server function

1、 Capture and verify proxy through curl of PHP

Second, multi process processing through bat

Third, merge the results of multi process processing

PHP in Windows combined with bat batch processing to achieve verification proxy IP server function

   due to business, proxy server is needed. There are many sites providing proxy server information on the Internet, so you can get information from these sites. However, due to the network or other reasons, some of the obtained IP is inaccessible, so we need to do verification filtering to get the proxy server that can be used.

1、 Capture and verify proxy through curl of PHP

   grab with curl

thinking

   1. Curl grabs website content;
   2. Simple_ html_ DOM (click to download) parses the captured content, parses the key information, and saves the file (or cache);
  3. Perform curl verification on the key information (IP and port of proxy server);
  4. Verification is divided into HTTPS and HTTP methods, which should be distinguished.

2、 Multi process processing by bat

thinking

   1. A single CMD window can run a php.exe Process, multiple processes can run multiple processes;
   2. Modify the PHP program, support the parameter transfer of CLI mode, different website links can be captured through different parameters;
   3. Run multiple CMDS through the start command (view the description), and use & amp; Connect, make main.bat File;
   4 main.bat The running status of other CMD windows can be monitored in the file, which can be obtained in the tasklist by setting the title of the CMD;
   5. After the running of other CMD windows (PHP tasks) is completed, the result set is merged.

3、 Merging the results of multiprocessing

   take out the file saved in the first step, and then merge the result with PHP code, and output it to result_ xxx.json It can be done in the middle;

The code will not be posted for the time being. It will be updated later.


On the use of cnzz statistics advertising research note

   when I was working on a website, the first thing I thought of was cnzz data statistics service, which is now merged by the alliance.
   I often find that advertisements appear in the website for no reason, but I have not joined any advertising alliance myself. I felt very strange. I searched the Internet and found that what I said on the Internet was basically abuse of cnzz

Abuse of cnzz

I also feel very depressed. I feel that they are killing themselves. Then I encountered this problem again today. I changed Baidu’s statistics and found that there is still this problem. Then I looked at the problems and the reasons carefully

Found something in the red wire.

http://w.c-cnzz.com/cl.php #This web address, the following parameters are not written

After several times of cleaning up, this thing and advertisement appeared all the time. I was depressed for a long time. Looking back one time, I suddenly found the problem:

http://w.c-cnzz.com # There are advertisements

https://s13.cnzz.com/ #JS link of cnzz, no advertisement

It turns out that the problem lies here. The two domains are different, but they seem to be related to each other. They all have cnzz characters, which makes people easily associate with each other.
Later, after testing, I found that because my own website is HTTP protocol, I didn’t open HTTPS, so when I took the link of Baidu JS in the figure above, it was wrong http://push.zhanzhang.baidu.com/push.js For this unsafe address, others have a good chance to get a W.C- cnzz.com We’re going to see the ads coming out. Really bad!!!

I checked the IP addresses of the two domains again:

w.c- cnzz.com The IP address of Alibaba cloud is 47.91.169.239

s13. cnzz.com The IP is 116.253.191.237

Then the correct solution is to use all the external resource files in the way of HTTPS, so there will be no problem.

In summary, we should be more careful when we encounter problems in the future. It’s better to use HTTPS to protect resources outside the station!

The solution of a Java exception has occurred. And error exception in thread when eclipse runs

This problem is caused by a Java class file compiled by a higher version of JDK trying to run on a lower version of JVM.

1. The solution is to ensure that the versions of JVM (Java command) and JDK (javac command) are consistent. If it is the Linux version, enter the Java – version and javac – version commands in the command line to see if the versions are consistent. I use 1.7.0_ 80。

 

2. The same version still can’t solve the problem. I don’t compile with javac directly from the command line, but with eclipse compiler. Because many compilers come with javac, rather than using the compiler in the operating system. If your compiler is eclipse, you need to set the JDK version in the properties of the project. The method is to right-click the project — & gt; properties — & gt; Java compiler — & gt; enable project specific settings — & gt; and set the compiler compliance level to 1.7, which is the version consistent with the JVM (the version shown by Java – version in the command line). Because of the need to be compatible with other software before, I reduced the Java version from 1.8 to 1.7, but eclipse did not move, so after opening it, I found that the default was 1.8, so I manually reduced it to 1.7, recompiled it, and finally passed!

 

To sum up, if you are compiling with a compiler, make sure that the JDK version of the compiler is consistent with the Java version of the operating system.

The screenshot is as follows:

Solution of error reporting in PIP installation of iPhone

Today, I encountered a problem when configuring pycaffe environment. I need to execute it when installing the library

for req in $(cat requirements.txt); do pip install $req; done
sudo pip install -r requirements.txt

Command, always report red error. Finally, sort it out.

First, there are various kinds of permission denied, which are finally solved by the root account operation.
Next, after all the others are installed, it’s hard to install IPython. You can install it with PIP install IPython
alone, and the error is:
command "Python" setup.py egg_ Info "failed with error code 1 in/TMP/pip-build-a63c8f/IPython/
after searching, we find the reason: the default version of IPython is too high, so we can only reduce the version manually.

pip install ipython==8888

The above command entered a non-existent version, so that all existing versions will be listed in the prompt.

After trying, the 6 and above versions all report errors, and finally use the highest version of 5.

sudo pip install ipython==5.5.0

Execute sudo PIP install - R again requirements.txt , there is a piece of requirement already satisfied . It's done!

ps:

    for reference only: my PIP version is manually upgraded to 9.0.2, and the python version comes with 2.7; warm tips: try to use root user to operate the whole process, not sudo, which can save a lot of trouble.

JQuery is a solution to the disappearance of listening events after adding elements with append

Suppose you want to append an element in the div with ID target
the original listening event format is:

$(".textBox").mouseover(function() {});

To be amended as follows:

$("#target").on("mouseover", ".textBox", function() {});

Add a dynamic box for target ID all the time, not a dynamic box!!! If you really can’t, just let the body go

Solution for successful but invalid atom minimap installation

To be honest, atom and its plug-ins are very powerful, but the installation process is very painful. I installed the minimap mini map plug-in, but it didn’t work in any way. There was no response in toogle in the menu, and there was almost no information.

Cause of error: I interpret it as a conflict between minimap and other plug-ins. The most controversial plug-in is activate power mode. The combo effect on the right side just occupies the position of the small map. Even if it is disabled, it is not easy to use. It must be uninstalled. At that time, he installed it just for fun. It’s easy to be blind after a long time, so he decisively unloaded it.

Solution: uninstall activate power mode, restart atom and get it done.

Hadoop datanode using JPS to view the solution that can’t be started

Problem Description: after the Hadoop environment is deployed, the process of datanode cannot be seen when running JPS on the slave machine.

Solution: delete all HDFS on slave- site.xml All contents in the datanode folder configured in( dfs.data.dir Parameter), and then initialize the namenode to run

hadoop namenode -format

Reinitialize.

Reason: the namenode has been initialized many times, but the master has not cleared all the initialization data in the datanode folder, which makes the ID generated in the two folders inconsistent. After deleting the initialization data in the datanode folder, the namenode initialization will take effect. Start Hadoop again and use JPS to see the datanode process.

Ubuntu “a user name is not in the sudoer folder. It will be reported. ” Solutions for

If the user name was not created when the system was installed, this problem occurs when using the sudo command.

Solution: input

su

Enter the root password. If you have not set the root password before, please visit the URL settings.
http://blog.csdn.net/baidu_ 27280587/article/details/53285620

After entering the successful root environment, enter

gedit /etc/sudoer

After opening the file, find the

root	ALL=(ALL:ALL) ALL

In this line, add the same line below it, and change root to your user name. Save and close the file, and then use the sudo command, no more errors will be reported.

“XXXXXX is a” namespace “, but here it is used as a” type “

Recently, I encountered this problem several times when learning C #. When writing ArrayList and StringBuilder, the main function will report the error that “XXXXXX is a” namespace “, but it is used as a” type “here. After several times of searching for information, we finally know where the mistake is.

For the convenience of the diagram, you can name the project name directly as the class name. That’s the mistake. The priority of the namespace is higher than the class name. Just change the project name when you create a new project.

In short, avoid duplicate class and project names.

Solution to the error $’\ R’: command not found when executing shell script under Linux

This error is caused by the different coding of windows system and Linux system. The carriage return in windows is , while that in Linux is , so carriage return in scripts written remotely with shell is not recognized by Linux system, but it can not be seen when editing with vim.
Solution: add - B , that is, VIM - B file name , when editing the script file with VIM, so that the open file is "binary mode", you can see the extra things, and the display is ^ m , delete it, save it and run it.

QQ browser open automatically appear two web page solution

The problem is shown in the figure:

solution:
steps

    open the QQ browser, click the “three” icon in the upper right corner, select settings
    , select “custom web page or a group of web pages”, do not select the options recommended by it, you can select the two recommended by it
    , you can also choose to set the web page, set your own common website ~