This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg_stat_statements is a PostgreSQL extension that provides detailed statistics on the SQL statements executed by a database server. This extension collects information on the amount of time spent executing each query, the number of times each query has been executed, and the amount of data processed by each query. This information can be used by database administrators and developers to identify slow-running queries and to optimize the performance of their applications. The pg_stat_statements extension is a powerful tool for monitoring and improving the performance of PostgreSQL databases. | |
#Enable pg_stat_statements in Postgres | |
Add the below configuration on the postgresql.conf file | |
# Enabling pg_stat_statements | |
`shared_preload_libraries = 'pg_stat_statements' | |
pg_stat_statements.track = all` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. CRUD operation এর মধ্যে default ভাবে যদি শুধু মাত্র searchByID() এটা support করে। কিন্তু যদি এমন হয় যে আমাদের প্রয়োজন হচ্ছে ID | |
বাদে অন্য field দিয়ে সার্চ করা, সে ক্ষেত্রে Dao এর যে interface ta define করে হবে সেটার মধ্যে শুধু findBy.. এর পরে যে | |
field দিয়ে সার্চ করতে চাই সেটা দিলেই হবে। | |
যেমনঃ একটা Table এর ID, Name, Email এই ৩ টা field আছে, আমরা সেখানে same name এর যতগুলা Data আছে সব সার্চ করতে চাই, | |
সেক্ষেত্রে | |
` List<Class Name> findByName(String Name) ` এটা দিয়ে সার্চ করলেই চলে আসবে । | |
N.B: এই এটা Define করতে হবে interface এর মধ্যে । |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Spring Boot web project এর সাথে সাধারনত Thyemleaf ব্যবহার করা হয়। | |
কিন্তু সমস্যা টা বাধে এর সাথে JSP file নিয়ে কাজ করতে গেলে। সেটার জন্য কতগুলা নির্দিষ্ট Step follow করতে এটা কাজ করে। | |
Step 1: Project create করার সময় এর সাথে শুধু Spring Web Dependency করতে হবে। | |
Step 2: JSP এর জন্য ২ টা নতুন করে Dependency add করতে হবে । | |
` | |
<dependency> | |
<groupId>javax.servlet</groupId> | |
<artifactId>jstl</artifactId> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here I will try cover details of all the annotations are used in Spring framework. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. When user send request to the service layer for data, service layer call the database layer and receive all the data and store in cache | |
in the service layer. If another user requests the same data to the service layer, then the service layer provides data that is stored in cache. | |
(it doesn't call the database for data) This is the main benefit of using a cache. | |
2. Hibernate provides two types of cache. | |
i. Level one cache (it is by default in hibernate) | |
ii. Second level cache. -> When another user requests the same data after closing that session. its needs second level cache to store that type | |
data. | |
> Requirements: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is the following steps for connecting hibernate into mysql database. | |
Step-1: After Creating a maven project first we need to add this two dependency into the pom.xml file. | |
`<dependency> | |
<groupId>org.hibernate</groupId> | |
<artifactId>hibernate-core</artifactId> | |
<version>4.1.6.Final</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem: You are in the world of mathematics to solve the great "Monkey Banana Problem". | |
It states that, a monkey enters into a diamond shaped two dimensional array and can jump in any of the adjacent cells down from its current position (see figure). | |
While moving from one cell to another, the monkey eats all the bananas kept in that cell. | |
The monkey enters into the array from the upper part and goes out through the lower part. | |
Find the maximum number of bananas the monkey can eat. | |
Input: Input starts with an integer T (≤ 50), denoting the number of test cases. Every case starts with an integer N (1 ≤ N ≤ 100). It denotes that, | |
there will be 2*N - 1 rows. The ith (1 ≤ i ≤ N) line of next N lines contains exactly i numbers. | |
Then there will be N - 1 lines. The jth (1 ≤ j < N) line contains N - j integers. | |
Each number is greater than zero and less than 215 |