This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!

Sid Singh

Greenhorn
+ Follow
since Jun 14, 2010
Sid likes ...
Eclipse IDE Java Oracle
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
8
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sid Singh

Hi,

I have a question regarding the scope of Python when compared to a full fledged language like Java.
As per what i have know scripting languages are a bit restricted in their scope and so their usage is somewhat constrained.

Can Python be used for pretty much everything or there are things where Python should really be avoided.
Since i am a newbie in Python so please spare me if i am trying to snatch thin air .

Thanks
6 years ago

Jesper de Jong wrote:

Ultimately it comes down to personal preference, there's no operating system that is clearly superior to the others.



Well after reading about the experiences it seems the bottom line.

Though it seems Ubuntu is quite good so would definitely like to try that out someday

Thanks all for your replies

Regards
6 years ago
Hi All,

I have always wondered why are Macbook's rated so highly.
Never used one or did know anybody who probably used a mac. Is it just the visual appeal or something else.

So what people have to say who have used Mac and swear not to used a Windows again !!!

I have used Windows OS like XP, Vista and Windows Seven and was more than happy with Windows Seven.

Regards
7 years ago
Hi Alexander,

Thanks for your valuable suggestions.

Does that mean i need to have a ServletContextListner in which i would be initializing a thread pool for use by each requester thread at the start of application.
Each thread would then be using an executor provided by the ServletContextListner.
My application is having a user base of around 5000 users so i feel the number of users at peak load would be a contributing factor for the number of threads in cache pool.

Regards
Siddharth
Hi,

I am having a web application in which in which through a Servlet i run some business logic and then return the acknowledment back.

Now i plan to do this asynchronously so that i would return response as soon as i recieve a request and would run the business logic in a new thread using
SingleThreadExecutor.

So in my servlet i would be doing something like



So there would be a SingleThreadExecutor created per request which i receive. Are there any downside of using this approach and is there any resource cleaning
with respect to SingleThreadExecutor that i need to do explicitely in MyRunnable's run() method.

Any help would be really appreciated.

Regards
Siddharth

Hi,

I am currently in an application which is based on XML sent from a client machine.
The data sent in the XML is persisted in the Database and success or failure response is sent and till the response the client keeps waiting.

I need to make this architecture as Asynchronous(For Scalability Reasons) so that as soon as client will send the XML i will keep it in some queue and will send
a success response to client so that the waiting time is removed.

For implementation of the same i am thinking of either using JMS or directly persisting
XML in database and carrying it forward through a stored Procedure.

I have read that use of JMS with XML is highly discouraged and my XML can be of 8-9 MB maximum size.

Thanks for your inputs.
Siddharth
7 years ago
Hi James,

Congrats to you for writing such a wonderful book as whatever i could read from the preview available i found it quite interesting.

I have a question from you that how you got motivated to write such a book as it is quite a bit off league from the rest available out there.

Thanks
Siddharth
7 years ago

Narsing Rao Dyavani wrote:I dont think that output will ever be produced. Since you are geeting two different Properties Objects (If Properties itself is not singleton by some logic).

And why are you calling init method when your wrote singleton flavour of it as getProp. on it



Hi Narsing,

That output can be produced.
It appeared when i ran the code for 10000 iterations. According to my understanding it was possible but since i could not get the required output on first run i posted it here. Thankfully my doubts clarified once i saw the output and hence found evidence.


Regards
Siddharth
7 years ago

joy b chakravarty wrote:I hope you are aware that you ain't using multi-threading. Try starting the threads ... thread.start() instead of thread.run().



Oops...

Please ignore that.. That really was a typing error while writing this post.
Thanks for pointing out though.

Regards
7 years ago
Howdy Ranchers,

My question is can in any scenario the following code give the output mentioned right after the code.



Value Of isValidUser Property after set Thread1 True
Value Of isValidUser Property after set Thread2 False
Value Of isValidUser Property after Thread is awake Thread1 False
Value Of isValidUser Property after Thread is awake Thread2 False


According to me the following output can definitely come in some scenario's.

Tried to execute it in various combinations like with or without sleep for as many as 2000 iterations but not able to get the desired output mentioned above.
The output i am getting with all combinations is

Value Of isValidUser Property after set Thread1 True
Value Of isValidUser Property after Thread is awake Thread1 True
Value Of isValidUser Property after set Thread2 False
Value Of isValidUser Property after Thread is awake Thread2 False

Thanks in Advance
7 years ago

Fatih Keles wrote:Executing a query from dual to fetch a value from a sequence is almost costless for Oracle database, but for the senario you have execute 2 queries consequently and total time is effected from many things like network, AS utilization etc. I would prefer to execute one query where possible.



Thanks Fatih,
That was really helpful.

It would have been great if some other people could give their comments on it.
Thanks in Advance

Fatih Keles wrote:If you need to use the generated key from sequence then you should either select seq.nextval before executing insert or use insert into returning clause.

Regards,
Fatih.



Hi Fatih,

No i dont need to use that key. Since it is a Primary Key for the table therefore i need to fetch the sequence while inserting the record.

One more point i would like to add in my above mentioned question.
I work in a tightly integrated system where several applications fire queries on a common database,
so what effect would each of the methods have on performance and execution time of the query.

Regards
Hi,

My question is related to usage of sequences in insert queries.
Following are the two methods that i have used for sequences

1. To get the sequence in a seperate query and then pass it to the insert query using PreparedStatement
2. Directly pass the SequenceName.NEXTVAL in the insert query.

I have seen in the projects that i have worked, Method 1 is used mostly. As far as i visualize getting sequence in a seperate query will increase
a round of I/O which would be 1 in second method.

Please help in identifying the pro's and cons of both the methods.

Awaiting your reply.

William Brogden wrote:The OpenNLP project at Apache describes itself as:

The OpenNLP is a machine learning based toolkit for the processing of natural language text. It supports the most common NLP tasks, such as tokenization, sentence segmentation, part-of-speech tagging, named entity extraction, chunking, parsing, and coreference resolution. These tasks are usually required to build more advanced text processing services. The goal of the OpenNLP project will be to create a mature toolkit for the above mentioned tasks. An additional goal is to provide a large number of pre-built models for a variety of languages, as well as the annotated text resources that those models are derived from.



Which sounds like it would be a big help. Kindly report back whatever you find useful!

Bill



Hi Bill,

The open NLP seems a bright prospect..
It seems like what i need

Thanks
7 years ago
Hi,

I need to implement a sentence marking algorithm for which the primary task is to identify nouns, adjectives , verbs from the sentence.
Can you please suggest me some good libraries which can do just that.
Also what other solutions can i go ahead with.

Thanks
7 years ago