I have a huge list of property like file. Now I need to convert this property like file to a HashMap in Java. Let's say my HashMap variable name is myHashMap. Recently I was playing with RegEx and Python. So I thought why not try to combine RegEx with Python to do this job! So, here's my solution.
NB: I've trimmed the property key and value.
To get the detail of the pattern go to RegEx101 and paste the below expression inside regular expression section.
AUTHOR:OBSCURE
Friday, September 19, 2014
Pagination With Oracle In JPA Native Query
Pagination in MySQL or PostgreSQL with limit is very easy. But Oracle doesn't support limit. So, in oracle generating paging query is a real trick.
Finally found a nice solution. With this piece of code generation pagination query is like charm. So have fun with this.
AUTHOR:OBSCURE
Finally found a nice solution. With this piece of code generation pagination query is like charm. So have fun with this.
AUTHOR:OBSCURE
Labels:
dbms,
DEVELOPMENT,
EclipseLink,
hibernate,
JDBC,
JPA,
Oracle,
Pagination,
Paging,
query,
sql
Thursday, October 31, 2013
Online avro phonetic typing - বাংলা
Press Ctrl+m to switch between English and avro-phonetic bangla typing. Hit Space, Enter or Tab to transliterate.
AUTHOR: OBSCURE
Tuesday, October 22, 2013
Transfer big file with scp without blocking console and see progress
Problem statement:
- I must move a large file from one host to another, I used scp for it.
- But I need to use it without blocking console so that I can exit the terminal, so I should use nohup with scp and &.
- But I wanna see progress after some time.
- Step 1:
execute this line to transfer file to remote host
- This command will prompt for a password, give remoteHost's password.
- Step 2:
Monday, October 7, 2013
Export and Import MySQL database from terminal
Below code will export MySQL database to a file and import it to another MySQL database from the file.
AUTHOR: OBSCURE
AUTHOR: OBSCURE
Install and configure MySQL database for Cent-OS
Following are the command to install and configure MySQL in Cent-OS.
If the log-in and all other privileges is needed from ip-address other than the localhost following command needed to execute depending on what is needed:
AUTHOR: OBSCURE
If the log-in and all other privileges is needed from ip-address other than the localhost following command needed to execute depending on what is needed:
AUTHOR: OBSCURE
Wednesday, July 10, 2013
How to get the last N number lines in terminal?
The following command will give the last N(int) number lines in terminal, which is scroll-able:
AUTHOR: OBSCURE
AUTHOR: OBSCURE
Thursday, July 4, 2013
How to find duplicate values, and occurrences count in Oracle Database?
the easiest SQL query which will return the duplicate value and count for a given column is as follows:
AUTHOR: OBSCURE
AUTHOR: OBSCURE
Thursday, June 27, 2013
Subscribe to:
Posts (Atom)