Menu

Cannot find module 'aws-sdk'

 

Error: Cannot find module 'aws-sdk'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (E:\assignment\DynamoDBtoCSV\dynamoDBtoCSV.js:2:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

How to fix cannot find module aws-sdk error?

To install the aws-sdk module you need to run the below npm install command.

npm install aws-sdk

OR 

npm install aws-sdk --save


After executing the above command, the Node aws-sdk module will get downloaded and save locally in the machine. Below is the snapshot of successful execution.

E:\assignment\DynamoDBtoCSV>npm install aws-sdk --save
+ aws-sdk@2.771.0
added 14 packages from 66 contributors and audited 15 packages in 62.496s
found 0 vulnerabilities

Can we create an interface without any method?

Yes, we can create an interface without any method. The interface which doesn't have any method or field declaration is called Marker Interface.

Java has few maker interfaces to handling the special scenarios and let the compiler know to treat those classes in a special way. Below are the example of some marker interfaces.


Java Server Pages(JSP) tags

Elements in Java server pages(JSP) are the syntax that is used to write the code in a JSP file. These elements are called tags in JSP and can be used based on requirment. JSP elements have a different component that is allowed by JSP to write or insert the Java code into the JSP file and further call the Java methods and servlets from JSP. Let's understand the purpose of a few JSP tags in this post.

JSP Declaration 

Declaration tag in JSP function as identification containers for the functions, methods and variables in JSP pages. This tag identifies Java declaration rather than generate output.

<%! jsp declaration %>

JSP Expression

Expression tag used for scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. 

 

<%= Java statement %>

JSP Directive

Directives tag also called message tag is instructional tags that are used to provide specific instruction to web containers when the page is loaded and translated. There are three types of directive elements.

<%@ dir-type dir-attr %>

Types of directive elements
1. Page <%@ page %>
2. Include <%@ include %>
3. Taglib <%@ taglib %>

JSP Scriptlet

Scriptlet tag allows you to embed any valid Java source code in JSP server pages.
<% Java code %>

Comment Tag

The comment tag is for information only to write a message for developers and does not appear on JSP pages.
<%/ comments go here />

Flow Control Tag

Flow control tag allows us to control the order in which statements run. The conditional tags if and choose and the iterator tags forEach and forTokens are all examples of JSP flow control tags. The syntax framework for each includes <c:tag_type tag_attribute> Java code . For example, when you use an "if" statement, the correct syntax is <c: if test= "$test parameters"> Java code </c: if > where test= is the type and "$test parameters" identifies tag attributes.
<c:tag_type tag_attribute>


References

1. https://docs.oracle.com/javaee/5/tutorial/doc/bnajq.html#bnajs


Why we should not use the credit card?

Credit cards and loans are a heavy burden on human society. This is modern exploitation where the banking system is openly exploiting their customers. Interest is already an exploration and high interest is highly exploited. Bank and people are taking a high interest and misusing the interest system to put more burden on the person who is already the burden and doesn't have money to do the things. Hence we should avoid using CC and Loans until you need this high priority. Following are some reasons to avoid using interest-based money and banking.
  1. Does Not Teach Self-Control: A person who uses a credit card to fulfill his needs doesn't have self-control on himself/herself. To live a better and peaceful life it is always recommended to spend less. Our expenses should always lower than our income. 
  2. Means You Don't Have a Budget: A person doesn't have the budget to fulfill his/her dream and need. So if you are fulfilling your need with the credit money then your future could be at risk.
  3. Expensive rate of Interest: We have to pay a huge rate of interest on the money which we borrow from the lander, that way we are putting ourselves in more trouble instead of fixing problems. Although it will fix your current issues and makes you happy for a while, but after some time it might start hurting you.
  4. Rates Rise with Unpaid Balances
  5. Bad Habits Risk Relationships
  6. Can Lead to Bankruptcy
  7. Financing Leads to More Spending
  8. Lose of Peace of Mind
  9. You Think You May Overspend
  10. You do not Have Enough Income to Pay the Balance
  11. You are Not Financially Disciplined
  12. Need not to Pay Interest on Your Purchases

Major cities in India was founded by Muslims

Agra 

Agra which is worldwide as the city of Taj Mahal was founded by Sultan Sikandar Lodi in the year 1504.

Ahmedabad 

Ahmedabad was founded by Sultan Ahmed Shah on the bank of river Sabarmati in the year 1411.

Allahabad 

Allahabad was founded my Mughal Emperor Akbar (Jalaluddin Muhammad Akbar) in year 1575.

Amravati


Amritsar


Banaras


Banglore


Bhopal 

Bhopal was founder by Nawab Dost Mohammed Khan in the year 1707. He was the founder of the State of Bhopal a small state after the death of Mughal emperor Aurangzeb.

Bijapur


Calcutta


Chandigarh


Darjeeling


Dehradun


Delhi


Daulatabad


Faizabad


Fatehpur Sikri


Gandhi Nagar


Gaya


Guwahati


Hazaribagh


Hyderabad 

Hyderabad was founded by Sultan Muhammad Quli Qutb Shah of Qutb Sahi dynasty in the year 1591.

Indore


Jaipur


Jaisalmer


Jammu


Jodhpur


Lucknow 

Lucknow was founded by Nawab Asaf ud Daula when he decided to shift his capital from Faizabad to Lucknow in the year 1775.

Madras


Meerut


Moradabad 

Moradabad was founded by Rustam Khan in the year 1600. The name Moradabad was was kept on the name of prince Murad son of Shahjahan.

Mumbai


Murshidabad 

Murshidabad was actually founded by Mughal emperor Akbar as Makhsudabad. But later when Murshid Quli Khan makes this city as capital city at the time he changed the name from Makhsudabad to Murshidabad in the year 1704.

Mysore


Patna


Pune


Raipur


Rajkot


Rampur 

Rampur was founded by Nawab Faizullah Khan in year 1775.

Ranchi


Sasaram


Shahjahanabad


Shimla


Srinagar


Surat


Tiruvendrapuram


Tughlaqabad


What is prototype?

Let's say that you have a great idea for a new product. You can imagine in your mind how it'll work and how cool it'll be when it's done. You can see in your mind how each of the pieces work together and how much easier it makes your life. But putting that into words is a little challenging. You then go to work to make something physical that resembles the picture in your mind and you create a rough mock-up of what the final product will look like.

You've just created a prototype. A prototype is an initial creation of a product that shows the basics of what a product will look like, what the product will do, and how the product operates. A prototype isn't meant to be the final version; it's the rough draft form of the product. It'll often have elements that demonstrate how the product will work, even though the prototype may not have the functionality that the final product will have after it's professionally manufactured. The prototype helps you to get a solid idea of what the product will be and make alterations while the item is still in concept mode.

Advantage of Prototype

A prototype is a valuable tool in the product development process. It gives the inventor or the creator a chance to see their idea come to life. By creating an initial example of your idea, you've got a chance to make changes to the design, work out problems in design, and make alterations to make the product look nice. The prototype is essentially a rough draft of the product. Once the prototype is created, steps can be taken to refine the product, both in design and function.
Prototypes may be used to demonstrate a potential product and can also be used as a tool to gain financing or investments. When a potential investor can see what the item is you want to create, they can get a better vision of what you want to produce and may be more interested in putting their money towards the project.


References

How to find or count all pages in AEM project?

We may find all the AEM pages using the SQL query. Run the below SQL query to get the count and list of all the cq:Page from your project.

SELECT * FROM [cq:Page] AS page WHERE ISDESCENDANTNODE(page ,"/content/project")
Below is the screenshot of the result and query execution steps. You may replace the path with your own project path e.g. /content/project 
Count of pages in AEM project 

.content.xml files are not visible in Eclipse project explorer

While working in Eclipse with Adobe Experience Manager (AEM) code, .content.xml file which is the content file of node structure is not visible in Eclipse project explorer.

This is happening because of the filtration of the file in the project explorer.

To view the .content.xml or any other hidden file which starts with .[dot], remove the following filter from project explorer.


Open Eclipse >> open project explorer >> click on view option >> Filters and Customization

How to open Filters and Customization option in Eclispe.


A new popup window will appear as below. From here, we need to de-filter the .resources option.

Goto tab Pre-set filters >> uncheck the .*resources >> OK

Eclipse filters and customization option