Anand Damodaran

Greenhorn
+ Follow
since Oct 04, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anand Damodaran

Dear All,
I need to get the orientation from the position sensor while capturing the picture i.e, get orientation before tick is pressed.

Thanks kindly,
Anand Damodaran
5 years ago

Ulf Dittmer wrote:There seems to be a disconnect between the question I asked, and the answer you gave, so I'm still not sure why you are allowing the user to overwrite the file. If you store it in Internal Storage, then no other app can get at it.



Dear Ulf,

I tried to store the image in the internal memory. But,

This doesn't allows me to store the image in the internal memory.

please give any suggestions to store the image in internal memory or sqlite.

Also my camera activity crashes after clicking OK, why is it so?



Thanks kindly,
Anand


5 years ago
Thanks Ulf,

Ulf Dittmer wrote:If you don't want to overwrite an existing file, why are you allowing the user to do so?



Yes, i should not keep the image in the sd card.

Just asking for my curiosity, is it possible to make the image write protected by using any classes in android api?

5 years ago
Dear All,
In my project i want to capture an image.(i done this)
That captured image should be uploaded to the server(i will do it)
But the problem is- the image which has taken only uploaded to the server.

Now, how can i check this condition?

If the user replaced the original captured image with the same name then i cannot accomplish what i need to.

Please correct me, if i'm wrong.
1) storing the image in the internal memory
2) storing the image in the sqlite using blob
(in both cases after uploading ,the images should be deleted)

If i store the image in the sd card, is it possible to write protected the image ?

Thanks kindly,
Anand

5 years ago
Dear All,

I want to develop a web app for an educational institution. I've experience in Servlet,JSP, JDBC,Ajax etc.
But I am afraid of CSS - cascading style sheet since i couldn't manage the layout to run on different browsers.

Kindly give me some idea to develop the app in any CMS that support Java.

With respect,
Anand
6 years ago

Devika Panchasara wrote:hi,

i am planning to give this OCA 7 exam next month...... but very confused because no proper material. can anyone help me please?
i had worked in java in my college, tht was before one year.. ...rit now all seems blank and m feeling like "OMG WHR IS THE WAY?"

please help.





Hi Devika,

Please follow the link,
Java Resources

Hope you get some good materials.

Post your comments , so that we can improve the blog.

With respect,
Anand
Hi,

I found that characters '\u000D' - int value 13 and '\U000A'- int value 10(for '\n') were appended to the array of characters.

i.e., JavaRanch\u000D\U000A ,

so that i get 11.

What is the character value for \u000D? i get NewLine. is that True?


With respect,
Anand
6 years ago
Hi,



Input: JavaRanch // 9 + 1(for '\n')
But Output: 11


1> What is the 11th character? or is there any '\0' character?
2> Whether the read() used here, read characters from the keyboard BUFFER until NewLine Character is given ?


With respect,
Anand Damodaran

6 years ago

Campbell Ritchie wrote:What instruction are you using to execute Test? You need to give its fully‑qualified name.



Thanks Ritchie,

Now, i gave fully‑qualified name and run the program successfully..


Once again thank you very much..


Regards,
Anand
6 years ago

Henry Wong wrote:

simon fletcher wrote:The textbook I am using says that with Java 7 the CLASSPATH doesn't have to be defined. Is this true? I haven't had much luck importing any packages I have created myself. This makes me think I should have CLASSPATH defined, and that I am misinterpretting what the textbook is saying.



Well, yeah, you don't have to define a CLASSPATH variable, but that is not specific to Java 7. Even older versions of Java allowed usage without the CLASSPATH environment variable assigned. If you don't have the environment variable assigned, you can set its value as parameters to the java and javac commands. And if you don't want to do that, you can always locate your files so that it will work -- since the default is to have the current directory as the classpath.

Henry





Hi Henry,



Compiled: project/src/$ javac -d ../build Sum.java //successfully compiled

project/src/$ export CLASSPATH=/home/project/build;

project/src/$ javac -d ../build Test.java //successfully compiled

But, I cant run the Test class. why it so?

I have got the error: java.lang.NoClassDefFoundError. Test


please help me how to run this program...

-With respect,
Anand
6 years ago
Hi Friends,

I'm preparing for OCAJP 7(1Z0-853).

Does the exam have questions on assertions?

Kindly help me.


Thanks and Regards,
Anand
Hi Friends,
I can't able to declare typedef in the union,say,

union xyz{
typedef struct bio{
char name[100];
int age;
float salary;
}b;
char a[sizeof(struct bio)];

};

it works well if i remove typedef keyword.

why is it so?


with respect
Anand
6 years ago
Hi Friends,

Is it possible to launch my own application automatically after the OS booted?

If it so, then how?


Regards,
Anand
6 years ago

Jelle Klap wrote:The way you invoke readObject() is guaranteed to throw an EOFException:

ObjectInputStream Javadoc wrote:
Any attempt to read object data which exceeds the boundaries of the custom data written by the corresponding writeObject method will cause an OptionalDataException to be thrown with an eof field value of true. Non-object reads which exceed the end of the allotted data will reflect the end of data in the same way that they would indicate the end of the stream: bytewise reads will return -1 as the byte read or number of bytes read, and primitive reads will throw EOFExceptions.


My bet is that the the getMessage() call in your catch block returns null. Try adding ex.printStackTrace(); to the catch block to find out.




Hi,

Can you alter the code to read the exact two object without any exception?


Kindly help me..


Regards,
Anand
6 years ago
Hi,

why do i get null message in the following code?

Output:
Student{name=anand, age=25}
Student{name=damodaran, age=20}
null



Kindly help me...

with respect,
Anand
6 years ago