Help coderanch get a
new server
by contributing to the fundraiser

andrew ronchi

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

Recent posts by andrew ronchi

Thank you Tim and Winston. It was just some part of my actual code. For better understanding, I modified it to create number between 0 and 1. I just wanted to know how this code flows and now I clearly understood with explanation and suggestion given by both of you. Thank you so much again.
I have added some statements to get it cleared,


Output:

before if:0
before recursive:
before if:1
in if block:1
after recursive:1
Value:1
8 years ago
I get different output every time I execute below piece of code. Can somebody please explain how this code flows?


Output 1--

in if block:1
Value:1

Output2--

in if block:1
after recursive:
Value:1

Output2--

in if block:1
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
after recursive:
Value:1


I was under impression that once flow enters if block, number will be returned to caller. But this is not the case. Method is getting recursively called after that. Can somebody tell me which return statement is actually getting called? Thank you.
8 years ago
Actually I was getting null value for the password whenever it has some special characters. SO I was confused why it is happening as my regular expression should allow all special characters. But the problem is with the ESAPI apis. It was validating request value far before and making null if it fails.
9 years ago
Hi,
I have to write regular expression which should have special characters. I have this regular expression: "(?=.*\\d)(?=.*[\\W|_])(?=.*[A-Z])(?=.*[a-z])(?![.\\n]).*".
but it does not accept these special characters "!#$%^&*" . what it accepts are "@_=+-/ ".
Please tell me how to modify it so that it can accepts above special characters too.
9 years ago
I solved it. First I created project connecting to mysql. Then I manually added url for ms access.
I am creating sample desktop application using netbeans and I am using Ms Access as database. I have created datasource as accessdb and with database name as info.accdb. But while creating connection netbeans is able to connect to db but not able to fetch schema. Database url I am giving is "jdbc:odbc:accessdb". It is giving error as "Unable to fetch schema. Insufficient Information to establish a connection to obtain list of schema. Check url, username and password ". I have not mentioned any username and password there. Because I dont have any. It is showing connection established but not showing any schema there. How to connect to ms access db?? I am using Netbeans 6.0
thank you Paul. But execuatable jar solves my problem.
9 years ago
I want to create simple java application which has 3 text fields and the application will have database connection. Once done, I want to run this application on other systems without using any IDE. So how do I do this? How can I make an application installable on other system so that on clicking on it, it will start executing?
9 years ago
I have resolved this using dynamic nested queries.
Thank you Maneesh for pointing me out. I have posted same question on stackoverflow.com to get answers quickly.
10 years ago
Then could you please help in finding license for this rpm-"redhat-rpm-config-9. .0.3-42.el6.centos.noarch.rpm"? what I got from the following link is GPL+.

http://rpmfind.net/linux/RPM/centos/6.5/x86_64/Packages/redhat-rpm-config-9.0.3-42.el6.centos.noarch.html
10 years ago
I have to prepare 3rd party licensing doc. We are using one rpm which comes under GPL+ license. But I am not getting any information for this license. One reference is found which says GPL+ means any version GPL if version not mentioned. But I did not understand.
10 years ago
yeah You are right. But in this case can we have any solution?
Actually we are creating dynamic queries so I can have multiple criteria on go and these can be REGEX sometimes. So in first criteria, it can ask me for all records with name starting from A but in second criteria it can ask me to exclude name Andy from first query result.

Below is my generated query for criteria : get count for firstname starting with "A" and firstname is "John" excluding one whose name starts with 'A' and lastname is Ronchi.

SELECT count(*) COUNT FROM table1 WHERE ( ( ( firstname REGEXP :param0 ) OR ( firstname = :prama1 ) ) AND ( ( firstname NOT REGEXP :param2 ) AND ( lastname <> :param3 ) ) )
Hi,
I am using mysql as database and I am stuck at one point. I am not able to create proper sql query. Scenario is,
Suppose I have a table having firstname ,lastname and salary. I want to select all rows whose firstname starts from 'A' but not the record with lastname 'Ronchi'.
I have tried this query: SELECT * from tablename WHERE firstname REGEXP '^A' AND (firstname <> 'A' AND lastname <> "ronchi');
But it is giving unexpected result as it is negating the the '^A' result and giving me zero rows.