How to obtain POJO out of a URL - retrofit

I am trying to convert the following link
this
into POJO, so I tried this website
but it tells me the following:
Your input was larger than 51200 characters, try making this a bit
smaller
is there any way to obtain the POJO out of the aforementioned link?

Have you tried installing the CLI and using that instead of the webservice?
https://github.com/joelittlejohn/jsonschema2pojo/wiki/Getting-Started#the-command-line-interface

Related

What is "dlta" and "ridlist" parameters used in Requests library (Python)

Guys I am working on getting data as tables from QuickBase using Requests library (Python). I found somebody doing it using the URL of the report, but he added two parameters to the URL like that:
&dlta=xs%xx&ridlist=xxxx.
Can anybody please tell me what are those two parameters, I searched for them in the internet but found nothing related to them.
I've been using Quickbase for over ten years and haven't seen documentation for either of these parameters. I have noticed that ridList seems to be used by Quickbase's grid edit view of reports (I suspect it's an ID for a server-side cached list of record IDs to display especially when using the type-ahead search of a report before choosing to grid edit) and dlta is used in the "Download report as CSV" button.
That example you're following may have simply copy and pasted a link generated by Quickbase as a hack to get a CSV instead of XML response. I recommend following the Quickbase HTTP API Reference instead. If you don't want an XML response, Quickbase also has a JSON RESTful API which may be easier to work with.

Convert InputStream to Mediaplayer

I use android platform . I have file in InputStream Datatybe , I want to convert it to MediaPlayer and play it
I have two suggestions for you:
Get the entire input into a properly formatted file, and pass that file to MediaPlayer. You're going to have to figure out if your data is formatted properly and how to format it.
Instead of using MediaPlayer, use MediaCodec (http://developer.android.com/reference/android/media/MediaCodec.html) where instead of passing a file or a link you're passing the data itself. With this solution, you're going to have to figure out if you're passing the data properly to Media Codec, but I suspect this is the solution you're looking for. The google documentation does have an example to get you started a bit.
Good luck to you!
What is the format of the data? MP4?
If it is a standard container like MP4 and is a file accessible as a URI in local filesystem (file://) or network (http://) then you should use Google's ExoPlayer library, with demo code here.
I would only resort to using MediaCodec if you have a custom container or transport mechanism.

how can we customize graphite to support xml format?

graphite support json and csv, but how we customize it to support other formats,
this works example:
10.1.2.15:8080/render?target=testing1.counters.hello.rate&format=json&from=-5min
10.1.2.15:8080/render?target=testing1.counters.hello.rate&format=csv&from=-5min
i want to get a xml report by passing the format like below, is it possible?
example:
10.1.2.15:8080/render?target=testing1.counters.hello.rate&format=xml&from=-5min
Maybe you should ask the project themselves and file an issue or better Pull Request providing the required functionality if it's currently missing from this open source project.
Write a wrapper. Here is the discussion on adding a custom API end to Graphite.
https://answers.launchpad.net/graphite/+question/147349

Web API Help Samples - C#

ASP.NET Web API has an easy install Nuget help page with sample generator. It's easy to get it to generate and display sample requests, but not so easy it seems to get it to display sample responses (httpsampleresponses) so that when developers look at the help page they'd see examples of generated responses / not static/typed in responses, but actually generated. I've seen it done before on another project, but still having trouble figuring out how to do it. MSDN's YAO has a good blog but it's just not getting me all the way to success for some reason.
From what I've seen work live and based on what there is to read about it online, it's definitely in getting the HelpPageConfig file right in terms of the config.SetSampleResponses() set up. I've discovered the configuration file that sets the parameters for the SetSampleResponses() method, but still, nothing I try is working. It was suggested to me that I should create a custom type and use extension methods, but getting that to correspond and display what I need hasn't happened yet. I can get it to compile without errors, but it still doesn't show the generated response sample on the page. It was easy with the SetSampleForType piece to get a section to show up in the requests section, but it's the response part that has given me trouble.
Has anyone out there done this with the SetSampleResponses() successfully and is there any kind of trick you can clearly define for getting it to work? Do you have any tips on setting up a specific generic type and making that work?
I'm thinking this must be something really simple and I'm just not clicking to make it happen....
Thanks for any potential info...
SetSampleResponse extension on HelpPageConfig is for statically defining samples for you action.
config.SetSampleResponse("\"Hello World!\"", new MediaTypeHeaderValue("application/json"), "Values", "Get", "id");
if you are looking for generated sample for a particular type, have you tried using SetSampleObjects extension which allows you to set sample objects for different types and this same object is used in all cases where that particular type is returned from an action.
config.SetSampleObjects(new Dictionary<Type, object>
{
{typeof(string), "Hello World!"}
});
Could you share more specific(code) details as to how you are using SetSampleResponse extension?

How to create a graph in order to parse an mp4 file to get the duration?

I am trying to find duration of an mp4 file using direct show component of windows using the Dotnet wrapper(directShow-lib 2005). But the method i used was GetDuration of IMediaSeeking interface. But this returns zero as duration.
After searching i found the following statement:
"It doesn't matter whether it's in a container or not, it
only matters whether you have a parser/reader for it. There
is no stock DirectShow parser to read raw H.264 files and no
third-party one I can think of. Also, whether IMediaSeeking
would work with such a raw file is implementation-dependent.
Last, most H.264-related filters use MPEG2Video or
VideoInfo2 and neither works with MediaDet, so you would
have to build the graph yourself."
Any body please help me to do this in c#.net?
You'll need to either find or make an MP4 file source filter to make this work. You can build one with mp4v2 or follow the instructions here.

Resources