Difference between and

<context:annotation-config> is used to activate annotations in beans already registered in the application context (no matter if they were defined with XML or by package scanning). <context:component-scan> can also do what <context:annotation-config> does but <context:component-scan> also scans packages to find and register beans within the application context. I’ll use some examples to show the differences/similarities. … Read more

How do I hide certain files from the sidebar in Visual Studio Code?

You can configure patterns to hide files and folders from the explorer and searches. Open VS User Settings (Main menu: File > Preferences > Settings). This will open the setting screen. Search for files:exclude in the search at the top. Configure the User Setting with new glob patterns as needed. In this case add this … Read more

Reading settings from app.config or web.config in .NET

For a sample app.config file like below: <?xml version=”1.0″ encoding=”utf-8″ ?> <configuration> <appSettings> <add key=”countoffiles” value=”7″ /> <add key=”logfilelocation” value=”abc.txt” /> </appSettings> </configuration> You read the above application settings using the code shown below: using System.Configuration; You may also need to also add a reference to System.Configuration in your project if there isn’t one already. … Read more

Turning off auto indent when pasting text into vim

Update: Better answer here: https://stackoverflow.com/a/38258720/62202 To turn off autoindent when you paste code, there’s a special “paste” mode. Type :set paste Then paste your code. Note that the text in the tooltip now says — INSERT (paste) –. After you pasted your code, turn off the paste-mode, so that auto-indenting when you type works correctly … Read more

tech