Tiya Khambadkone

Ranch Hand
+ Follow
since Sep 15, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tiya Khambadkone

Do you know when to use a property files?
What if there are 100 properties in a property file? In this case go for a property file or anything else ?
7 years ago
Thanks. Any other best practices?
7 years ago
Could you help me answer the following question ?

I have a xyz.properties file. This file contains properties like:

where the name of the property is 'abc.errorcode.mkd-003.useraccount' and the same name is mapped to different values, so instead of creating 3 different property files like :

I've merged them into 1 file and separated using pipelines. In my code I use string.split and collect every value in an array.

So, what is the best way to handle this ? What are the pros and cons of 3 different files and pipleines method ?

Also, does a property file name should contain all lower case letters ? Which one of the following is the best practice?


I have posted the question on another website as well. Here is the link : http://stackoverflow.com/questions/43188437/property-files-best-practices

7 years ago
I took a IKM test today for a Full stack developer.
It was 80% front end and 20 % backed.

Also, it is designed for people with strong academics/theoretical knowledge.

If you have more practical than theoretical knowledge then it is hard.

The test claims to automatically show questions based on your level (depends on the previous questions you answered) but it is not true.
Even if you skip an answer on a topic, the test revolves around the same topic again and again.

There are other tests available in the market brainbench, hacker rank which are better than this.
I want to switch a functionality ON/OFF using a webpage.

My application kick starts using quartz listener with the help of following code :


I want to create a webpage that can switch this ON or OFF.

Could you give me some direction ?

8 years ago
\*\*GET should match to **GET
Just found out this answer.
8 years ago
are you saying it is not even a regular expression?
If yes, then that is not correct.
It is a regular expression.
8 years ago

Tiya Khambadkone wrote:My job is to get the regular expression from the database. In this case the value in a database table is \*\*GET which is varchar2.
Then, I will get a 100 MB file and I have to replace this regular expression with another regular expression \*\*POST and this value(varchar2) will again be fetched from the database.

My requirement is
Change "\*\*GET" to "\*\*POST" throughout a file



So, if I want to understand the meaning of \*\*GET then can anyone confirm me if it is nothing but 2 asterisks followed by GET or anything else? If anything else then what is the other possibility.

8 years ago
I get these regEx values from Database. In database table it is varchar2 with value \*\*GET.
Now it is left upto me to decide ,how I need to fetch these values from database and use it in my code.
8 years ago
Should "\*\*GET" match/mean **GET ?
8 years ago
True. I don't need to understand the regularExpression and so I wrote :

where fromRegEx will be "\*\*GET"
and toRegEx will be "\*\*POST".

However I need to test my code and write a unit test class and I don't know what should be the value of fileInputString.
8 years ago

Henry Wong wrote:
You might want to consider using the replace() method, that takes two strings, instead. It looks like you are trying to replace a value with another value, *and* you don't understand regular expressions. So, why use regular expressions, when you don't have to?



Answer :

Tiya Khambadkone wrote:
My job is to get the regular expression from the database. In this case it is \*\*GET Then, I will get a 100 MB file and I have to replace this regular expression with another regular expression \*\*POST
My requirement is
Change "\*\*GET" to "\*\*POST" throughout a file



I can't change my requirement.
8 years ago
Thank you. The online tool tells me that my expression matches with **GET and **POST.
I am not sure if that is what it is.
8 years ago
My job is to get the regular expression from the database. In this case it is \*\*GET Then, I will get a 100 MB file and I have to replace this regular expression with another regular expression \*\*POST

My requirement is
Change "\*\*GET" to "\*\*POST" throughout a file
Sorry, I just saw that there is no caret and no double backslashes.
when I copied the string to my java IDE then automatically another backslash got appended.

I am trying to store the value from database into a string and then I want to use replaceAll(string1, string2). However, i don't understand the meaning of the regular expression.
8 years ago
Ramsin,

I did not get your answer. Could you tell me what do you think is the meaning of the expression?
do you mean, it has nothing to do with the start of the line ?
8 years ago