Menu

Error: Can't find Python executable "python", you can set the PYTHON env variable.

This error you are getting because npm need Python and your computer doesn't have Python install into it.
So please go ahead and install the Python in your machine, and run the npm install command after installing the Python. 

How to install python?

Go to the Python official website and download the latest release of Python, and simple install it.
Once installation has been successfully completed, then set the python variable in your machine environment variable. To know more, you could see our blog on How to set an environment variable in windows.

Or you could set the variable using this command.
npm config set python C:\Python\Python27\python.exe
If you don't wants to install Python manually and wants all things to be get downloaded by npm itself then you could run npm install -g windows-build-tools, this will download all the required dependencies for you and bring npm in working mode.
To run this command please make sure you have open your node command prompt and cmd with administrative privilege. To do so, go to start and search for node cmd and cmd >> then right click on the application shortcut and use the option run as administrator.
after that just copy and paste the command
npm install -g windows-build-tools

This command will download the Python and install the Python at the below directory in your machine. Go to this path and find the python.exe and set environment variable in CLASSPATH variable.
C:\Users\nodejs\.windows-build-tools\python27\

how to set environment to apply the spring application properties file

By default, application.properties file is picked by system for configurations properties. If you have different properties files available to run the application on the different environments then we need to add spring.profiles.active=<environment name> which is present in the application.property file name.


For example, if our application properties file has profile "dev", and the complete file name is application-dev.properties, then we need to set spring.profiles.active=dev in application.properties file, this way application will pic the right configuration file.

Hope this helps!

Spring Framework

Responsive and rich accordion design

Responsive and rich accordion design using HTML and CSS:

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.accordion {
  background-color: #A678CF;
  color: white;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 15px;
  transition: 0.4s;
  border-top: 1px dotted #0069b9;
  margin: 5px 0 0 5px;
}

.accordion:before {
  content: '>';
  color: white;
  font-weight: bold;
  float: left;
  margin-right:10px;
  margin-left: 0px;
}

.active:before {
  content: "^";
}
.active, .accordion:hover {
  background-color: green; 
}

.panel {
  padding: 0px 18px;
  margin-left: 25px;
  margin-right: -5px;
  display: none;
  background-color: green;
  overflow: hidden;
  color: white;
}
</style>
</head>
<body>

<h2>Accordion</h2>

<button class="accordion">Section 1</button>
<div class="panel">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>

<button class="accordion">Section 2</button>
<div class="panel">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>

<button class="accordion">Section 3</button>
<div class="panel">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>

<script>
var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
  acc[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var panel = this.nextElementSibling;
    if (panel.style.display === "block") {
      panel.style.display = "none";
    } else {
      panel.style.display = "block";
    }
  });
}
</script>

</body>
</html>

Accordion component using HTML and CSS
Accordion component