Is it possible to have 2 HTML files on JsFiddle? - jsfiddle

I am studying a book here and there is a exercise that needs 2 HTML files and I want to know if its possible to have to HTML files in my JsFidle

I do not believe it is possible. However, You could use Plunker. It's pretty similar, but allows you to create multiple files with your name extension. Was using it the other week to have a CSV as a data source.
Plunker Site here

This should help.
http://doc.jsfiddle.net/use/gist_response.html
Content of the http://gist.github.com/raw/606699/fiddle.response.html will be returned with text/html MIME type if this url will be loaded http://jsfiddle.net/gh/gist/response.html/606699/ using Ajax request.
.

Related

How to access all text from a website, including the a tag?

I'm trying to extract all the article text from the following site:
https://www.phonearena.com/reviews/Samsung-Galaxy-S9-Plus-Review_id4494
I tried findAll(text=True) but it extracts lot of useless information.
So I did findAll(text=True, recursive=False) but it ignores text data in certain tags like ? What's the most effective way of extracting the text in this case?
The website seems to be javascript protected. It loads the body content when requests already retrieved the http response. You need to simulate a real page request. With the python module Selenium Webdriver it would be possible.

Exporting WebCenter Content to XML

I am attempting to migrate content from an Oracle's WebCenter CMS into our organizations primary CMS. All the different parts of the page templates are separate xml snippets that get pull together and converted into html for production deployments. I am trying to find a way to export the page into xml to just get at the content. I don't need styles or js or images.
There are some built in web services and an ability to create custom ones. Is there any way to get the system to output xml or get the xml to give me a mapping of all the files so I can merge them myself?
Not sure if this will do what you want, but if you add &IsSoap=1 to the end of the URL then the request is returned in XML format. You can view the page data by using the following settings:
• IsJava
• IsSoap
• IsJson
• IsPageDebug
These may help as well. Here and here.
If this is for a Site Studio website, you should be able to turn on sitestudio section tracing, clear the server ouput, view the website page, refresh the output and it should show you details about the content items it retrieved.

Is there a public website that converts swagger json to PDF for HTML?

Has anyone made where, where you just enter your swagger URL .../swagger/docs/v1
and then the website converts it to HTML, pdf, doc or whatever in a nice readable format? I'd think that site would get a lot of traffic (hint)
I know there are some things on github you can download that will convert things, but I'd think someone has made a public site so I can save some time.
You can use this website : Swagger Editor
Copy your swagger file and in the menu, select 'Generate Client' -> 'HTML' (or Dynamic HTML')
You can also use Swagger Code Generator if you want to add this step in an automatic build flow.
Try this one: swagger2html .
The document generated by swagger-codegen is indeed not readable. This project makes a neat appearance(bootstrap css) and shows the fields in the request/response models in a straightforward manner.

Typo3 and own script in FlexForms

Is it possible to use my own PHP in flexform?
I need to read data from a txt file that I upload in the same FlexForm.
I guess I need to reload the flexform after uploading, but how do I read the context of the txt file and list it in the Flexform?
You can use user type of field as described in TCA docs.
Unfortunately I haven't any sample now, but there should be not problem to implement what you need. Tip: good IDE with some debugger will be your friend :)
I made it with itemsProcFunc
<itemsProcFunc>tx_getDataFromXlsxFile->addFields</itemsProcFunc>
And the a claas.getDataFromXlsxFile.php file

Getting file from .ashx with a jQuery Post

This question is a following from another question I asked - Passing client data to server to create Excel or CSV File.
I have a client page which builds a JSON object to send to the server, and I have server code which can parse that JSON object into an SQL command and end up with a dataset of required data.
I had originally been passing the JSON object to an .asmx web service which would return a JSON object containing my data. Now I want to go in a different direction and have the data returned as a .csv file.
I understand I can try to put my JSON object into a query string and call my .ashx page, but the JSON object could get large, so I'm trying to use the Request.Form of a POST.
My question, and lack of understanding, is in how to use jQuery to post to the .ashx page and have it return the .csv file to the client. If I navigate to the .ashx page directly (and modify the page to hard code the passed data), I get the .csv file returned to me no problem (i.e I get the prompt to open/save the file). If I make a POST to the .ashx file from jQuery and send my JSON object through, I get a response which contains the data in a string, rather than getting a .csv.
So, is there something I am missing, or am I just trying to achieve something that I can't or shouldn't be doing?
I'd thought about passing my JSON object to a .asmx web service which would store the JSON object into a database and return an ID, and then use window.location to browse to the .ashx with the ID as a query string parameter to then generate the .csv file, but I thought there might be a way to avoid that middle step and do it with the POST.
Sorry if this is a little rambling and disjointed. I'll be happy to clarify on any parts that may not make sense to anyone.
I am trying to do something similar as we speak.
Take a look at this question. It might help you.
How to: jQuery post to ashx file to force download of result?