Menu

Plato | A Greek Philosopher

Plato is the well-known Greek Philosopher and student of Socrates. Socrates considered that unexamined life is not worth living and argues that virtue is knowledge. Plato has influenced by Socrates in pursuit of knowledge against sophists. He influenced the western philosophy than any philosopher. Plato’s interests were broad, including the study of knowledge, mathematics, ultimate reality, ethics, and politics. He thought that ultimate reality of things was given by their ‘forms.’ For Plato, the real world is unchanging, eternal, and beyond our senses. We can understand reality though intellectual study. The aim of philosophy is to get away from the world of sense and desire to the higher realm of existence of the Forms. The form of an object is its essence, and is what makes it what it is. Examples of forms include beauty, justice, numbers, and shapes. We can know about ultimate reality (the world of forms) through the use of our intellect.

Our senses do not tell us much about ultimate reality. For Plato, mathematics is the paradigm of knowledge, since it is done through intellectual reasoning independent of the apparent world around us, and tells us eternal unchanging truths. In The Republic Plato says that the soul has three parts, corresponding to reason, emotion, and desire. He also thinks that the soul (or at least part of it) is immortal, and can be reincarnated. Plato thinks that only those who understand the nature of goodness are fit to rule in society. Most people do not understand goodness. The rulers should try to maximize the happiness of society, by imposing strict censorship of ideas and of artistic expression. He saw no connection between happiness and individual liberty. He wants to show that there is absolute truth, and absolute right and wrong, and that human beings are not the measure of all things.

Check and replace the attribute value using JS

 We can use JQuery to find the element and then we can replace the attribute value of an HTML element. Below is a JS code snippet to find and replace an attribute value.


$this.next().attr('aria-expanded', function(index, attr){

    return attr == 'false' ? 'true' : 'false';

});

Login into WinSCP using ssh key

Please follow the below steps to configure your WinSCP session using ssh(Secure Shell) key.

Create a new session in WinSCP. Select File Protocol and put Host name(IP address) and your ssh User name. Don't put anything in the Password field. Below is a screenshot for reference.


Click on Advanced, then go to SSH >> Authentication



In the Private key file area, click on the browse option and select your .ppk (private key) file. WinSCP accepts only ssh keys generated via Putty but if you generated your key using OpenSSH don't worry WinScp will automatically convert your file in the required format after showing you a warning message. 


For more, you could refer following documents

1. https://winscp.net/eng/docs/guide_public_key#winscp

2. https://docs.oracle.com/cd/E19509-01/820-3503/ggbgc/index.html

Bundle is NOT whitelisted in AEM

While using the loginAdministrative() method of SlingRepository class you might see an error "Bundle is not whitelisted". To get this method work we have to whitelist the bundle in OSGi configuration "Apache Sling Login Admin Whitelist" this helps us to defines which bundles can use SlingRepository.loginAdministrative().

Below is the code snippet of creating session using loginAdministartive method.

@Reference
private SlingRepository repository

Session session = repository.loginAdministrative(null);