ROME : Unable to get full description of post for a feed - java

I am parsing feed from http://feeds.feedburner.com/Commercial_LCD_Monitors. But while getting description of each post I got few lines and then it gets truncated with ending [...] characters.
eg.
Stand out from the crowds with a higher level of professionalism with the L305 mobile data projector. The 3000:1 ANSI lumens and advanced 3-chip LCD technology delivers images that are of the highest quality, realistic and sharp. Colours are not only [...]
Can anyone explain what is the issue and possible resolution if any?
Thanks in advance.
Regards,
Amit

The feed only provides a truncated description. You'll either have to find another feed with a longer description or build something to retrieve the content from each item.

Related

BDD cucumber Web Service

I have read some articles regarding how we can implement BDD with cuuumber but i am not able to understand fully.
Lets say i have a service
/v1/picture?viewer=1&viewed=2&flag=1
For these 3 input i am looking for output as "1.jpg"
I am looking for
How can we implement above ? -- i.e output based on input
How can we build data ? -- mysql data basically stubs
Please help with examples and good links.
Thanks
It's hard to answer your question as there's not a lot of detail about what you're trying to achieve, but I'll give it a go.
You've got 3 different inputs there:
- The viewer
- Whether it's been viewed or not
- A flag.
So those inputs provide different contexts (Givens) for the scenarios.
Given a .jpg viewer
Given I have already viewed the image twice
Given the image has been flagged
How you set up the data for these givens is entirely up to you. You can hard-code it, use mysql data or input real data using an admin console, etc.. It shouldn't matter. The behaviour you're interested in is what happens when you apply the event (When):
When I retrieve the v1 picture
Presumably, the input provided in your contexts is relevant, and will provide different outcomes (Thens) depending on that input.
Then I should see a .jpg file
Then I should see the "Image flagged" banner
Then I should see the message "Viewed 2 times"
So I might have scenarios like:
Given a .jpg viewer
And an image that's been viewed 3 times
When I retrieve the v1 picture
Then the service should give me 1.jpg
And I should see the message "Viewed 3 times"
Given a .png viewer
When I retrieve the v1 picture
Then the service should give me 1.png
etc.
I don't know what your real service is doing, but hopefully this helps you see the pattern. Try to keep different aspects of the behaviour separated in the scenarios (more like the 2nd than the 1st) unless there are combinations you need to exemplify.

cheque printing application in java

I want to develop an application in Java which takes data (ex.name of person, Amount) from excel-sheet and print it on cheque. I can able to access data from excel-sheet but don't know how to print that data on cheque. Data must get print on appropriate location on cheque (ex. name should get print where blank space is given for name). please give me a guideline for this. Thank you in advance. I am not native English speaker so kindly ignore my mistakes.
You can use a reporting tool. You can see examples here: http://www.dynamicreports.org/
I would create a PNG image for each record, with a transparent background and data at the right place. Then I would launch the printing of these images .
That sounds hacky and someone might have a better idea.

Get SPS and PPS from h264 encoded video in JAVA

I'm a bit stuck on a question actually and i reaaly hope that someone can help me with this issue.
My problem is as follows :
I have a live usb camera with which i'm encoding only the video in h264 in order to send it with RTP over the network to a receiver (my receiver here for test purposes is Ekiga).
After having encoded only the video in h264, i have a byte array.
Now with this byte array, i want to extract the SPS and PPS. I want to get these information for me to be able to send the following sequence when sending frames to the receiver :
SPS => PPS => FRAME 1 (coded slice of an IDR picture) => FRAME 2 (non coded slice of an IDR picture) => FRAME 3 (non coded slice of an IDR picture) => and so on ...
How can i extract those information and i want a JAVA library which can help me? (JCODEC nop docs??!!)
Thanks for your help.
Ronnie
It depends on your encoder. If it is producing annex b stream the sps/pps are most likely the first and second Nalus. Unless it is also producing access unit delimiters in which case it will be second and third. If it is not producing annex b then this data will need to be obtained from the encoders API another way. Either way you will need to parse the stream. You can see more details here.
Possible Locations for Sequence/Picture Parameter Set(s) for H.264 Stream
One more thing a NALU is NOT the same thing as a frame. A frame can be made up of Many NALs.
Thanks for your help and answer. Well, my researches and works continue (i'm a newbie in this domain) and i have been able to transmit my video to the receiver. The receiver here is Jitsi which i'm using for test purposes.
I've seen too the link which you provided me and from it, i did understand many things which weren't totally clear.
Now, my actual problem is with the quality of the video i am receiving in Jitsi. In fact, i'm using Xuggler for encoding my orginal video (streaming from my webcam) to H264 format. When Xuggler encode my video, i can now see the correct SPS, PPS and SEI headers and you are right i can notice too many NALs which make up my frame to be transmitted over the network.
I think that it would be better to use another library than Xuggler but there comes my real problem. JCodec, there's no documentations and from what i have read, it's a bit slow in processing H264 videos.
Can you please guide me in the choice of a good library which can help me in encoding and decoding H264 video streams?
Does anyone know a library in Java which can do that for me and some documentations associated with this library?
Thanks for your help.
Ronnie

How to parse the Multiple OBR Segment in HL7 using HAPI

The following text is the hl7 message , i could able to parse many segments except NTE segment .'m using HAPI to parse the hl7 messages.'m newvbie to HL7 so please can any one suggest relevant classes in HAPI how to parse NTE segments ? it would be better if explanation is with few examples,
MSH|^~\&|LCS|LCA|LIS|TEST9999|199807311532||ORU^R01|3629|P|2.2
PID|2|2161348462|20809880170|1614614|20809880170^TESTPAT||19760924|M|||^^^^
00000-0000|||||||86427531^^^03|SSN# HERE
ORC|NW|8642753100012^LIS|20809880170^LCS||||||19980727000000|||HAVILAND
OBR|1|8642753100012^LIS|20809880170^LCS|008342^UPPER RESPIRATORY
CULTURE^L|||19980727175800||||||SS#634748641 CH14885 SRC:THROA
SRC:PENI|19980727000000||||||20809880170||19980730041800||BN|F
OBX|1|ST|008342^UPPER RESPIRATORY CULTURE^L||FINALREPORT|||||N|F||| 19980729160500|BN
ORC|NW|8642753100012^LIS|20809880170^LCS||||||19980727000000|||HAVILAND
OBR|2|8642753100012^LIS|20809880170^LCS|997602^.^L|||19980727175800||||G|||
19980727000000||||||20809880170||19980730041800|||F|997602|||008342
OBX|2|CE|997231^RESULT 1^L||M415|||||N|F|||19980729160500|BN
NTE|1|L|MORAXELLA (BRANHAMELLA) CATARRHALIS
NTE|2|L| HEAVY GROWTH
NTE|3|L| BETA LACTAMASE POSITIVE
OBX|3|CE|997232^RESULT 2^L||MR105|||||N|F|||19980729160500|BN
NTE|1|L|ROUTINE RESPIRATORY FLORA
EDITED
Here I am supposed to parse multiple OBR segments, can anybody please guide me?
It looks like the message you have is valid, but the issue that you may be having is with the formatting of the sample. It looks like a couple of the lines were wrapped. If you properly format them, then the message can be parsed properly.
In HL7 2.x, all new lines must start with a segment identifier (e.g. MSH, PID, OBX, ...). If the line does not start with one of these identifiers, then the parser will not know how to interpret that line or the remainder of the message.
If you are using HAPI and looking to test message, I would recommend using their HAPI test panel. It is an extremely easy to use tool that can help you verify a message and test message transmission.
Below is a screenshot of what the message looked like in the test panel, once the formatting was cleaned up.
I have solved the issue by creating looping for every other segments with NTE segments loop , every segments has the optional NTE segments so iterated with every segment . Now its working fine ...

Solr query results - need searched text and a few lines around it

I am completely lost.
I think I am definitely missing something fundamental here. Everybody has such awesome stuff to say about Solr but I fail to see it.
I indexed a structured pdf document in Solr.
The problem is when I search for a simple string - I get the entire content field as the response!
I don't know how to change that.
My requirement is that, lets say I search for "metadata"
it should give me
"MetadataDiscussion . . . 4 matches
... make sure that Tika users have a chance to get to all of the metadata created and/or extracted by Tika. == Original Problem == The original inspiration for this page was a Tika ...
10.7k - rev: 2 (current)
last modified: 2010-08-02 18:09:45
"
But it gives me the whole document!- the entire string that was indexed.
It seems like Lucene can only tell me in which field it occurred, not where in the field it occurred
Any help will be greatly appreciated!!
Lucene/Solr is primarily a retrieval engine - it retrieves documents that match a query. So this behavior is desirable and expected. Now as for your requirement, you can use the highlighting feature of Solr to give you exactly that. Suppose your document text is stored in a field named text - then you would pass the following parameters to Solr:
&hl=true&hl.fl=text&hl.snippets=5&hl.fragsize=200
Look through the other parameters to customize it even further.
Solr is amazing :)

Categories