Tag Archives: Tool use

NC -lk 7777 Error: nc: invalid option –k [How to Solve]

Recently, I am learning Flink to simulate real-time data through NC. However, when you enter NC -lk 7777 under windows, the following error is reported:

C:\Users\7371>nc -lk 7777
nc: invalid option -- k
nc -h for help

After some searching, it was finally solved
windows is different from Linux. You can enter NC - L - P 7777 directly after CMD

Error in installing canal server for windows

    startup error

    solution: edit the startup.bat file, delete @rem, modify, and restart. Whether the startup is successful or not can be checked. An error occurred in/log/example/example.log, and canal cannot connect to the database
    solution: modify the canal user password in MySQL

    update user set password = PASSWORD('Canal_2020') where user = 'canal';
    

Error LNK1169: one or more multiple defined symbols were found

The reason for the problem is that a variable is declared in a header file, but it is defined in two or more. CPP files.

Solution: generally, the compiler will tell you which variable has a problem. You need to locate the variable, and then delete one of the redundant variable definitions

There is also a helpless solution. You can open the project configuration properties connector command line and enter the following string to allow multiple settings:

/ force:multiple   original link: https://blog.csdn.net/qq_ 40222602/article/details/79712192

[Solved] Maven Error: The packaging for this project did not assign a file to the build artifact

Problem Description
	When using the maven function provided by idea to install a project, the console reports an error
	The packaging for this project did not assign a file to the build artifact
Problem Analysis
	This is to say that the package for the plugin could not be found, in fact, it is not that the package for the plugin could not be found, but that the project did not load the package from the maven repository into the project
Problem solving
	The use of their own is the install under plugins caused by
	should use the Lifecycle install normal operation

Error in upload code of tortoisegit error:1407742E

report errors

When I come back from the festival, I type a code to upload it to GitHub and report an error. Whether it’s idea or tortoise, I report the following error:

fatal: unable to access 'https://github.com error:1407742E :ssl routines:ssl23_get_server_hello:tlsv1 alert protocol version

Baidu is also less than Baidu. Just a few days ago, I saw that the software manager suggested that tortoise git should be updated, so I gave it a try and gave it an update (after the update, I prompted that git bash should be updated again), and the result was solved.

solve

My updated software is the following version
tortoise git-preview-2.5.7.0-20180127-b2d00f8-64 bit.msi And git-2.16.2-64- bit.exe .
The link address is:
0 https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-64-bit.exe
https://download.tortoisegit.org/tgit/2.6.0.0/
(tortoise Git is updated from the software manager, with the download address of the official website attached. It should also be feasible in theory.)

If the icon of tortoisegit is not displayed after installation, you can refer to this
section https://jingyan.baidu.com/article/359911f552827957fe0306f8.html

Idea has installed markdown, open it or will not show preview effect

Idea has Markdown installed and will not show the preview effect
why
This is because the.md file at the end of the Markdown plugin was opened using Text, so idea is now opened using Text.
The solution
In the file - & gt; The Settings - & gt; The Editor - & gt; File Types under Recongnized the File Types found under Markdown , then click on the Registered Patterns bar to the right of the plus sign, fill in the * md save. The .mdle has been registered in Text.

How to modify TeamViewer ID

TeamViewer will be deemed commercial and not available if used frequently. The account of this software is bound to the MAC address of the device.
You can start again after you change the TeamViewer ID. The following method can successfully modify the TeamViewer ID.
Close the TeamViewer;
Start & gt; Run, type % AppData %, delete TeamViewer folder;
Start & gt; Run, type regedit;
Remove TeamViewer under HKEY_LOCAL_MACHINE\SOFTWARE\;
Delete TeamViewer under HKEY_CURRENT_USER\SOFTWARE\;
Start & gt; Control Panel> System & gt; Hardware & gt; Device Manager>; Network adapter>; Wired/wireless network card;
Right-click>; Property & gt; Senior & gt; The Network Address.
Optionally enter a 12 digit number in the numeric field. Restart your computer and you will notice that your TeamViewer ID has changed. Success!

Solve the problem of failure in installation of golang plug-in dependency in vscode

Solved the Golang plugin dependency installation failure issue in VS Code
Vscode installed in ms - vscode. Go after plugins can open support for the language, the ms - vscode. Go plugins need to rely on some tools, prompt after the installation is complete


Installing github.com/nsf/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/fatih/gomodifytags SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
Installing github.com/josharian/impl FAILED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing sourcegraph.com/sqs/goreturns FAILED
Installing golang.org/x/lint/golint FAILED
Installing github.com/cweill/gotests/... FAILED
Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED

8 tools failed to install.

Due to network problems, some dependent tools cannot be installed properly, so manual installation is required.
Here are the steps for manually installing the tool:
GOPATH

    in % % \ SRC \ directory and establish a path \ x golang.org into GOPATH%\src\golang.org % \ x , download tools, source code git clone https://github.com/golang/tools.git tools after the completion of the clone, A Tools folder will be generated so that the source code for the tool is ready to execute under % goPath %

        go install github.com/ramya-rao-a/go-outline
    
        go install github.com/acroca/go-symbols
    
        go install golang.org/x/tools/cmd/guru
    
        go install golang.org/x/tools/cmd/gorename
    
        go install github.com/rogpeppe/godef
    
        go install github.com/sqs/goreturns
    
        go install github.com/cweill/gotests/gotests
    
    

    Separate processing golint golint source is located in the https://github.com/golang/lint , enter GOPATH%\src\golang.org % \ x after the execution of git clone https://github.com/golang/lint download golint GOPATH need source code to the % % , the execution of go install github.com/golang/lint/golint
    This completes the installation of the tools on which VS Code's Golang plug-in depends.

Optimization method of vs2017 starting speed

VS as the first editor of the universe, especially after the release of 2017 should attract countless programmers to use, but the VS2017 start speed is slow, so specially studied the VS2017 to accelerate the start of the method. The following methods are Microsoft official advice, you can try.
Uninstall program
You can uninstall little-used individual projects from Solution Explorer by using the right-click context menu.
Refactoring the solution
You can split the solution into smaller solution files and include common projects in these files. This refactoring can significantly reduce the memory usage of the workflow. In addition, the smaller the solution, the faster it loads.
Configure debug options
If you often run out of memory during a debugging session, you can optimize performance by changing one or more configurations.
Enable “Only My Code”
The simplest optimization is to enable the “Only My Code” feature, which only loads your project’s symbols. With this feature enabled, you can save a lot of memory when debugging managed applications (.NET). This option is enabled by default for some project types.
To enable “Only My Code”, select “Tools”>; “Options” & gt; “Debugging” & gt; “General”, then select “Enable My Code Only”.
Specifies the symbol to load
For native debugging, loading the symbol file (.pdb) takes up a lot of memory resources. You can save memory by configuring the debugger symbol Settings. Typically, configure the solution to load only modules in your project.
To specify symbol loading, select Tools>; “Options” & gt; “Debugging” & gt; “Symbol.”
sets the option to “Specify modules only” instead of “All modules” and then specifies the payload to load. When debugging, you can also right-click on a particular module in the Modules window to include its display in the system load. (To open the window while debugging, select Debug>; “Window” & gt; “Modules.”)
Disable diagnostic tools
It is recommended to disable it after using CPU profiling. This feature can be resource-intensive. After CPU analysis is enabled, it remains enabled for subsequent debugging sessions, so it can be displayed off when it is complete. If you do not need the functionality provided, you can save some resources by disabling the diagnostic tool during debugging.
To disable Diagnostics Tools, start a debug session and select Tools>; “Options” & gt; Enable Diagnostic Tools, then deselect the option.
Disable full solution analysis
Visual Studio performs analysis on the entire solution to provide a rich experience of the errors before the call is generated. This feature can be used to identify errors as quickly as possible. However, for very large solutions, this feature can be a significant memory resource hog. If you run out of memory or similar problems, you can disable this experience and release these resources. By default, Visual Basic enables this option, while C# disables it.
To disable Complete Solution Analysis, select Tools>; “Options” & gt;> “Text Editor” ”
Disable CodeLens
Visual Studio performs the Find All References task for each method displayed. Codelens provides functions such as inline display of reference numbers. Working in a separate process (for example, ServiceHub. RoslynCodeAnalysisService32). In very large solutions or resource-constrained systems, this feature can have a significant impact on performance, even if it is run at a lower priority. If you encounter high CPU or memory problems during this process (for example, when loading a large solution on a 4 GB machine), try disabling this feature to free up resources.
To disable CodeLens, select Tools>; “Options” & gt;> “Text Editor” ‘All Languages’> “Codelens”, then deselect the feature.
This feature is available in Visual Studio Professional and Visual Studio Enterprise.
Other tools and extensions
disable
Extensions are additional software components that are added to Visual Studio to provide new functionality or extend existing functionality. Expansion can often cause memory resource problems. If you encounter memory resource issues, try disabling the extension one at a time and see how this affects the schema or workflow.
to disable extension, please go to “tools” | “extension and update”, and then disable specific extensions.
Disable the XAML designer
By default, the XAML designer is enabled, but it only consumes resources when the.xaml file is opened. If you are using XAML files but do not want to use the designer feature, disable this feature to free up memory.
To disable the XAML designer, go to Tools>; “Options” & gt; “XAML Designer”> “Enable XAML Designer,” then deselect the option.
Delete the workload
You can use the Visual Studio installer to remove workloads that are no longer used. This action can skip packages and assemblies that are no longer used, thus optimizing startup and run time resource utilization.
Forced Garbage Collection
CLR uses a garbage collection memory management system. On this system, memory is sometimes consumed by objects that are no longer needed. This state is temporary and the garbage collector frees the memory based on its performance and resource usage heuristics. You can force the CLR to reclaim any unused memory by using hotkeys in Visual Studio. If there is a large amount of garbage waiting to be collected and garbage collection has been forced, you can see the memory utilization decrease for the devenv.exe process in the task manager. You rarely need to use this method. However, after a high-resource operation has been completed, such as a full build, debug session, or solution open event, this approach can help determine how much memory the process is actually using. Because Visual Studio is a hybrid (managed and native), native allocators and garbage collectors may sometimes compete for limited memory resources. This may help to force the garbage collector to run when memory usage is high.
To force garbage collection, use the hotkeys: Ctrl+Alt+Shift+F12, Ctrl+Alt+Shift+F12 (press twice).

Solution of idea using @ Autowired annotation to report errors

1. If the compiler does not report an error, but the idea generates an error, it can be solved as follows:
file-> Settings – & gt; Editor-> Inspections click on the search bar to enter Spring Core
Spring Core -> Code -> The Autowring for Bean Class changes the Severity level from the previous error to warning, so that the idea will not report an error

2. If you can’t compile it, check to see if the package is not imported, or if it is injected as static type
In the Spring Framework, we cannot @Autowired static variable, create Spring beans, for example, without that:

@Autowired
private static YourClass yourClass;

Can have a try, yourClass in such a state can not be dependency injection, throws an exception during execution. Java lang. NullPointerException, why?Static variables/class variables are not properties of an object, but properties of a class. Spring is based on dependency injection at the object level.
The use of static variables/class variables extends the use of static methods. Static methods are not recommended in Spring. The main purpose of Dependency Injection is to allow the container to generate instances of an object and then use them throughout the life cycle, while also making testing easier.
Once you use static methods, you no longer need to generate instances of the class, which makes testing more difficult, and you can’t generate multiple instances with different dependencies for a given class using injection methods. This static field is an implicit shared static field. It is a global state. Spring also does not recommend this.