Embedding Heroku dataclip within webpage - postgresql

Has anyone had success embedding a Heroku PostgreSQL dataclip within an external webpage?
I've tried embedding via an iframe, but I keep running into cross-domain errors.
I see that a CSV can be imported into Google Sheets, which can then be imported into my site. But ideally I'd like to embed the dataclip page directly, along with all functionality - exporting, versions, query preview, etc.
Thanks for your help!

Related

How to handle dynamic list (JSON) of redirects on NextJS + AWS Amplify?

I have a JSON file with 8k+ redirects that I use for my site. This JSON is hosted on a CDN (AWS Cloudfront). And every time one of our products or pages change their path, that JSON is automatically updated with a new redirect, and this happens pretty often (more than once a day).
I want to be able to use that JSON on my NextJS (12.3) project hosted on AWS Amplify.
Ideally I wanted to use the NextJS middleware.js to fetch that JSON and redirect to the proper path.
But right now Amplify doesn't support that middleware. They still have an open issue on github for that:
https://github.com/aws-amplify/amplify-js/issues/9145
So I tried to run that on getServerSideProps. But I'd have to replicate that for every URL segment on my project, which wouldn't look great.
Right now I use the native redirects solution on the next.config.js file (https://nextjs.org/docs/api-reference/next.config.js/redirects).
But this solution isn't great either for two reasons:
This is not dynamic. The JSON file is only fetched when the project is build up, so many times I have to redeploy my project on Amplify to be able to update those redirects.
The latency to find the correct path is affecting the page load perfomance (it takes around 400 to 500ms to run through the 8k+ redirects).
Can anyone help me to find a fast and dynamic solution to fetch and do those redirects on NextJS? Or maybe any idea to do that in a different way.

How can I "drill down" into a website using Perl's WWW::Mechanize

I have used the WWW::Mechanize Perl module on a number of projects and it's helped me out a lot.
I am trying to use it on a different site and I can't "drill down" into the content of the site.
The site is https://customer.bookingbug.com/?client=hantsrecyclingcentres#/services
I have tried figure out what the URL would be to get content shown in the resulting HTML, such as bb.d570283b87c834518ba9.css, bb.d570283b87c834518ba9.js and version.js
I tried to copy the resulting HTML into this posting, but used all sorts of quote and code sample combinations and it wouldn't display properly.
Does anyone have any idea how I "navigate" this site using this Perl module please?
WWW::Mechanize is a web client with some HTML parsing capabilities. But as you clearly noticed, the information you want is not in the HTML document you requested. Either download the correct document (whatever that might be), or do what the browser does and execute the JavaScript. This would require a JavaScript engine. The simplest way to achieve that is to remote-control a web browser (e.g. using Selenium::Chrome).

Running HTML5 with Database in Android WebView

I am developing an app with html5 pages locally stored in the assets folder. I have included a database with some php scripts, is it still possible to run in WebView?
for using database in webView you have two ways:
1) use localStorage that you should handle it by javaScript
2) use java database,for that you need javaScriptInterFace() that provide you a bridge between javaScript and java class. and create java database then put your data in it or read from it
see this link it will help you-(this link show you how use java database like browser localStorage)
No not at all you can not run a php in a webview it can understand only html ,CSS and JavaScript just like a browser.
Suggestion 1:
If you want to build a HTML page using your local database you could do that using java no need of php.
Just fetch the data from db then build HTML page by concatenating java strings with the data,HTML mark up,CSS and javascript then load the resulting HTML page in webview
If you want to access Java function from JavaScript you could use addjavascriptinterface of java.
The java function can be anything like a function that inserts or updates data into local dB or a function that returns a data from local db
It can also produce dynamic html content locally jus like a dynamic web language like php,classic asp etc..
Suggestion 2:
If you want to do it using php then you have to host it in the internet server along with db and load the page URL in webview

How to migrate a Dreamweaver site into Kentico

I have a site that was originally built with FrontPage and then transferred over into Dreamweaver. There's a lot of old coding in there and a lot of image maps (think PhotoShop image slicing) for navigation etc. I need to move the site over to Kentico (not my choice) and I'm wondering if there is an easier way of doing it.
I was able to rebuild the whole template in Kentico and now I'm left with creating all the pages and importing content. Currently I'm copying and pasting all the content (text) into the pages I've built and I'm uploading all pdfs and images into the new system. That's all fine and dandy, but there are literally HUNDREDS of pages and THOUSANDS of pdfs. Is there any easier way of doing this? I'm going crazy!
Regrettably there is no easy way to achieve your goal as Kentico is ASP.NET application and your website is built with HTML pages at the moment.
You will need to manually transfer all the pages or you can use Kentico API to handle this programatically but you will need to parse the HTML pages on your own, so in this scenario... the best option is really to transfer all the content manually (or you can pay one of Kentico partners to do this for you).

Web CMS That Outputs to Flat Static Pages (.html) via FTP to Remote Server?

I have a web app project that I will be starting to work on shortly. One of the features included is going to be a content management system where users can add content and then that content will be combined with a template and then output as a regular .html file. This .html file would then be FTPed to their own web host.
As I've always believed in not reinventing the wheel I figured I'd see if there are any quality customizable CMSes out there that do this already do this. For instance, Blogger.com allows you to post all of your content to your account there; but offers the option to let you use your own hosting. Any time you publish a new article then a new .html page is generated (as well as an updated index page with links to the new article) and then the updated content is FTPed to your own server.
What I would like is something like this that I can modify to more closely suit my needs.
Required Features:
Able to host on my own server
Written in PHP
Users add content through their account, then when posted it is FTPed as .html to their server
Any appropriate pages are also updated to link to the new content (like the index page or whatnot)
Templateable
Customizable
Optional (but very much desired) features:
Written in CodeIgniter or a similar PHP framework
While CodeIgniter isn't strictly required, I would very much prefer it. It speeds up development time and makes things much easier to implement.
So - any suggestions? I've stumbled across a few CMSes that push to remote servers as static pages, but the ones I've found all are hosted on the developers servers which means that I cannot modify it at all.
Adobe Contribute might work for your situation. A developer/designer creates a set of templates with Dreamweaver and publishes the templates. Authorized users can then create pages based on the templates and only make changes within the editable regions. It includes systems for drafts and reviews prior to publishing (via many options, including ftp) and incorporates automatic version control. It can work with static html pages or dynamic pages like php.
Sounds like you need a separate application that can do this for you.
For example, you should be able to write something that queries Drupal's menu router and saves the output (with curl) to a directory and then run's rsync to push your content where you want it to go.
Otherwise your requirements are likely to be outside the scope of a typical CMS. Separating this functionality will give you better options.
You'd need to write a filter for your URLs too. It's a bit of work...
Hope that helps!