About educcess

Posts by educcess:

Ethics in Education : Every Nation must change

Education :

Swami Vivekananda said ” Education is the manifestation of the perfection already in man”, what kind of perfection a man has within him ? Human mind is an incredible thing, which has an incredible power, but the way we use the talent matters a lot. According to Swami Vivekananda what is perfection ? It has an incredible message , learning should be manifested which means it should be obvious to our mind. If something is obvious to our mind, then we will never forget and we will never leave that throughout our life. Perfection means the ability to address various problems human beings encounter in society. An education which doesn’t help to face the problems, which doesn’t build good character, which doesn’t build the social responsibility within us is not an education. Perfection in human means ethics.

Nelson Mandela said “Education is the most powerful weapon which you can use to change the world”, what change it is about ? History always teach us a lesson, a person like Swami Vivekananda,Mandela, Mahatma Gandhi and many more always pointed ethics in education not the science. 

Why Ethics is so important ?

The simplest and best answer for this is to save humanity on planet and which means to save our planet, We humans forgetting that we are spoiling everything. The greedy human losing his control, we destroy everything and every one for the sake of money. 

Education should not be business, the most important objective of education should be to equip the students with ethical values.

“Humans are the only living being who pays to live “, of course we can not say everything is wrong but there is no limit for his act. Ethics in education might bring the change.

What kind of ethics we are talking here ?

According to Rushmore Kidder’s research , we are talking about the following ethics in education

  • Ethics of justice
  • Ethic of Critique
  • Ethic of Care
  • Ethic of profession

Moral Values in Education

The moral values in humans are going away, every generation losing some extent of morality. Rushmore Kidder pointed 5 important moral values

  • Honesty
  • Respect
  • Responsibility
  • Compassion 

The funniest thing is , some has to do research to conclude that ethics is important in education

What I am talking about ? What are all these things ? Really if some one talk all about these, he will become priest, Swami because a normal man can not talk like this in society. The way people look towards you will be totally different when we talk about moral values.Have you ever tried to live your life with all the above ethics ? You will struggle, yes you have to struggle. It is not an easy go. 

Okie how can we change ? 

Let us start first with our profession, if you apply ethics in your profession then slowly you can change yourself and people around you. What is ethics in profession ? If you are a civil engineer, then think before you take the work, think before you start it, because one big project might destroy environmental balance in the future. If you are a government employee then first think about your country, how can you bring change in society? how can you serve your society ? it is not just a government employee but every one must.

But it is very difficult to change ourselves and others after certain age, we should impart ethics in our kids, teach them only about ethics till certain age, teach them how to look after seniors, teach them how to serve the society, teach them how to save our planet, teach them what is good and bad.

John Wesley said  – “Do all the good you can. By all the means you can. In all the ways you can. In all the places you can. At all the times you can. To all the people you can. As long as ever you can.”

There many more things to discuss, students should learn to respect Guru (Teacher), A guru should selflessly teach his Shishya ( Student ) , these days the bounding between Guru-Shishya is going away, there is no respect on guru. Education becoming a business rather than a media to change the society. Many people argue that I am thinking only in one direction, but that is the reality, that is the fact. Dr K. C. Chakrabarty, Deputy Governor, RBI has done enough research on Indian Education System and he pointed the importance of ethics in education.

How can we impart ethics in education?

Keep on educating kids on ethics, talk good , show good and ask them to do good. The best way to induce good qualities in kids is by telling how human destroying the nature, how our freedom fighters struggle for the sake of people, most importantly we should teach kids that we should never give importance to money, we should tell them how money will change human mind and how people do mistakes for the sake of money.

Give less money to your kids, do not give too much comfort life to your kids, teach them to accept difficulties and to overcome from difficulties, because when human face difficulty, he will realise the true meaning of life.

Also Read – http://knowledge-cess.com/a-bird-eye-on-education-system/

http://knowledge-cess.com/guru/

 

 

Algorithm Efficiency : Merge sort vs Insertion sort

Algorithm Efficiency : Merge sort vs Insertion sort

Importance of Algorithm Efficiency :

Let us learn how an algorithm efficiency matters a lot ? We will analyse this by taking some interesting experiment as an example. Before that let us know what are the efficiencies of both the algorithm

Insertion sort :

 The average and worst case efficiency of merge sort is (C1) O(n2)

Merge Sort :

 The average and worst case efficiency of merge sort is (C2) O(nlog(n)) 

But let us analyse the efficiency with an experiment :

Experiment :

Let us take a faster computer , Computer A running insertion sort and a slower computer running merge sort.

They each must sort an array of one million numbers. Considering the following factors

  • Computer A executes one billion instructions per second
  • Computer B executes ten million instructions per second
  • Computer A is 100 times faster than Computer B in raw computing power
  • To make the difference even more dramatic , suppose that the world’s craftiest programmer writes insertion sort in machine level language for Computer A and resulting code requires 2n2 instructions to sort n numbers ( 2 is constant c1)
  • Merge sort  will be developed by an average programmer using high-level language with an efficient compiler with a resulting code 50nlog(n) instructions ( 50 is constant c2)

With the above assumptions , to sort one million numbers

Time taken by Insertion Sort in Computer A ( Faster computer ) :
( 2 X (106)2 Instructions ) / 109 instructions/second = 2000 seconds,

Time taken by Merge Sort in Computer B ( Slower Computer ) :
(50 X 106 lg(106) Instructions) / 107 instructions/second = 100 seconds,
This experiment shows even with slower computer (100 times slower) the best algorithm gives best result compared to faster computer running less efficient algorithm.

Computer B runs 20 times faster than Computer A, even though Computer A is 100 times faster than Computer B.

This proves that even though the underlying hardware is low end, an efficient algorithm performs much better, one very good example for this is Android vs iOS 🙂

Even though android smart phones are very high end , very good RAM and processor, they perform less compared to iPhone which has less RAM and less speed processor
Reference : Introduction to algorithms by Thomas H. Cormen 
http://www.flipkart.com/introduction-algorithms-english-3rd/p/itmdwxyrafdburzg

Neurons to Networks…

From Neurons to Networks

I was just trying to understand how can I use a graph theory to understand or analyse human brain and connections within it. I found an interesting video here. It will ignite an interest within you and a new connections will be created in your brain as you start watching 🙂

 

 

Java Jar files; Java Libraries; JSON lib;

Java Jar files and Uses

JAR:  aopalliance-repackaged-2.2.0.jar 

Usage: aop alliance will be internally used by

Note : Google Guice Core is a powerful library released by Google for dependency injection, this works with java 6 and above ( download )

JAR:  apache-mime4j-0.6.jar

Usage: apache mime will be used for mime message parsing. This jar internally used by 

  • commons-io
  • commons-logging
  • junit like testing libraries
  • log4j 

JAR : commons-io

Usage – commons io provides utility classes, stream implementations, file filters,file comparators, endian transformation classes

JAR : asm-3.3.jar

Usage : asm jar will be used to analyse the byte code and analyse the frameworks

Note: asm is used by certain code generation libraries like cglib

JAR : gson-2.3.jar 

Usage : gson used to convert java objects into json object. Can be used in struts and springs to convert java objects. ( Documentation )

 JAR : persistence-api-1.0.jar

 Usage : The Java Persistence API provides Java developers with an object/relational mapping facility for managing relational data in Java applications

Dependencies :

  • Servlet-API
  • Javax.inject 

JAR : hk2-api-2.2.0.jar 

Usage : This is called hundred kilobyte kernal for glassfish server, It forma the core glassfish server architecture

 

Hibernate NoSuchBeanDefinitionException : Java Hibernate Exception

Hibernate NoSuchBeanDefinitionException : Java Hibernate Exception

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.cess.service.Employee.EmployeeService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=EmployeeServiceImpl)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:949) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:818) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:730) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486) … 25 more

Solution – 

This issue is a strange issue in hibernate autowire for bean objects, the solution will be as follows but no technical description why so ? 🙂

@Autowired
@Qualifier("EmployeeServiceImpl")
EmployeeService employeeService;  //EmployeeService is an interface


			




Change the above @Qualifier as below 
@Qualifier("employeeServiceImpl")

Note : the only change is instead of capital E in EmployeeServiceImpl, it should be small 'e' employeeServiceImpl
If it is reverse case then do make it Capital .

Reaching the Red Planet – MOM, ISRO’s successful mission

Journey towards space, Journey towards Mars

We are about to reach Mars, a planet which attracted the mankind from several hundred years, NASA says ‘Humans are driven to explore the unknown, discover new worlds, push the boundaries of our scientific and technical limits, and then push further.’ So far there are 9 robotic probes launched around the orbit of Mars and seven unmanned rovers on the surface of the Mars, the biggest success in exploration of Mars is when NASA launched Curiosity rover in 2012.

ISRO Mars Mission

Now its the time for ISRO , no doubt ISRO is did this in its unique way. Talented scientists of our country achieved this in a very low cost of 450cr which is almost 4 times less than NASA’s mission. ISRO can launch 4 such Mars mission with the budget what NASA spent.

Distance Travelled by MOM

Distance Travelled By MOM

Distance Travelled By MOM

 

Heliocentric Path of Mars Orbiter

Heliocentric Path Of MOM

Heliocentric Path Of MOM

So far MOM completed its 98% journey , on 24th September 2014 exactly at 7.30 ISRO performs Mars Orbit Insertion (MOI). Mars Orbit Insertion is not an easy go, it is challenging task because there many things need to be considered especially the speed control of Mars Orbiter. According to NASA official site the speed must be reduced to 3200mph, every precision matters a lot. The most challenging task for scientists is to handle the unpredicted challenges .

http://www.jpl.nasa.gov/video/index.php?id=28

Challenges in Mars Orbit Insertion –

1) The communication round trip time is 22 minutes, the signals sent from earth to orbiter will take 22 minutes to reach orbiter and return back to base station. Due to this time delay , every command should be preloaded with time tags

2) An amount of 290Kg of fuel is available on board and this maneuver is estimated to consume 241Kg of fuel leaving 50Kg for later mission life. The precision at which the firing should perform is really important

3) The key motor “Liquid Apogee Motor (LAM)” which gives 440N thrust was shutdown some 300 days back after the trans-mars-injection. Even to test this motor for 5 seconds means the mission will be out of path for over 100Km. We are expecting this engine to perform within 2% deviation of performance to achieve the desired result.

4) Most of the operation is carried out when the mission is not visible to the Earth

5) All the operations now onwards will be carried in the shadow of Mars itself. So, the whole operation should be based on battery power and not on solar power as well.

Source – https://www.linkedin.com/pulse/article/20140915100738-15133503-challenges-in-mars-orbit-injection

Planned Events by ISRO

Planned Events for MOM

Planned Events for MOM

 

 Soruce – http://www.isro.org/mars/pdf/press%20briefing%20on%20MOI.pdf

Journey towards Space – http://knowledge-cess.com/journey-towards-space-isro/ 

Dr K Radhakrishnan Chairman of ISRO  Interviewed – http://www.youtube.com/watch?v=ALPKTEitvrg&list=PLVOgwA_DiGzqMeD9X9LnC9SINtosOgE5W

Guru –

The disciple must worship the Guru as God Himself – Swami Vivekananda                    


Today you are YOU because you met a Guru, He taught you what are ethics, he taught you what are values, he taught you what is justice, science and everything. A Value based education is a gift by a guru, Acquisition of knowledge and skills without acceptable moral values and discipline is meaningless. You know how to lead your life , you know how to face problems in your life, you know what is within you, you are made by your Guru, without a guru you are not you, you are just a body with no moral values. 

Respect your guru, a devine power acting upon you by your guru which will put a light on your life. 

Our Ancient Indian education system was a meaningful education system, Guru-Shishya were having strong bounding, but when English education system introduced by british our education system lost its originality. Today we never see that wonderful relationship between Guru and Shishya. Think for a while what you are today and why you reached this state of your life. 

Guru will show you the right path, according to Swami Vivekananda , The first lamp is the Guru, and the lamp that is lighted from it is the disciple. The Guru must teach me and lead me into light, make me a link in that chain of which he himself is a link. The man in the street cannot claim to be a Guru. The Guru must be a man who has known, has actually realised the Divine truth, has perceived himself as the spirit. A mere talker cannot be the Guru. A talkative fool like me can talk much, but cannot be the Guru. A true Guru will tell the disciple, “Go and sin no more”; and no more can he sin, no more has the person the power to sin.

Swami Vivekananda is the man who realised what a guru is for a disciple, we learn the true meaning of guru if we go by his life , only a guru can transform your life. 

Happy Teachers Day –

 

Hibernate QueryException : could not resolve property:

Hibernate QueryException :  could not resolve property:

org.hibernate.QueryException: could not resolve property: DP of: com.cess.pojo.Customer
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:67)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:61)
at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassPropertyTableNumber(AbstractEntityPersister.java:1402)
at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:54)
at org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.java:1377)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:457)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection(CriteriaQueryTranslator.java:417)
at org.hibernate.criterion.SimpleExpression.toSqlString(SimpleExpression.java:68)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:357)
at org.hibernate.loader.criteria.CriteriaJoinWalker.(CriteriaJoinWalker.java:113)
at org.hibernate.loader.criteria.CriteriaJoinWalker.(CriteriaJoinWalker.java:82)
at org.hibernate.loader.criteria.CriteriaLoader.(CriteriaLoader.java:91)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1577)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at com.cess.dao.impl.CusomerDaoImpl$1.execute(CustomerDaoImpl.java:77)
at com.cess.framework.TransactionWrapper.run(TransactionWrapper.java:41)
at com.cess.dao.impl.CustomerDaoImpl.getCustomers(CustomerDaoImpl.java:43)
at com.cess.service.impl.CustomerServiceImpl.getCustomers(customerServiceImpl.java:39)
at com.cess.controller.CustomerController.Customers(CustomerController.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:746)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:687)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

			




Solution –
Instead of using nested paths directly in Criteria API (unlike HQL), create nested criteria instances and use aliases on each “entity.property”
Example –







Criteria criteria = sessionObject
.createCriteria(Customer.class, "C")
.createAlias("C.department", "D")
.createAlias("D.Section", "S")
.createAlias("S.SubSection", "SB")