I want to call a Python method in my Cordova application. Is there a way to integrate a Python script with a Cordova application as I could not find the equivalent implementation of the same method in other languages like JavaScript except Python that I could integrate with the application?
The methods which I want to implement in JavaScript are scipy.signal.butter and scipy.signal.sosfilt which are the inbuilt methods of SciPy in Python.
Is there a way to implement these methods in JavaScript or is there a way to integrate a Python script in a Cordova application?
Any suggestion over it is greatly appreciated.
Related
I have browser application which uses javascript,node.js,jquery,HTML5(canvas).
Now I want to transplant this application to iOS/Android.
I am familiar with making iOS/Android application by flutter, so I know that it is possible to make iOS/Android/webapp from dart code.
However for vice-versa??? is there any way to make iOS/Android from HTML5??
Flutter is best but ,any other way???
For example on Titanaium, is it possible to make application by Javascript.
But, it means language is javascript but no library like jquery doesn't work.
So my idea is ,,, use webview on flutter and use application via this view,, but is it possible???
Take a look at Apache Cordova. Although I'm not a fan of it and I'd advise you to write the application natively (with Java or Kotlin), Cordova is quite known and some apps on the store use it.
https://cordova.apache.org/
I went through below article
https://medium.freecodecamp.org/get-started-with-webassembly-using-only-14-lines-of-javascript-b37b6aaca1e4
and very impressed that we can use c++ code in javascript using web assembly.
Do we have any option to create such web assembly using c# where we can create web assembly and use in javascript like angular or react.
went through
https://learn.microsoft.com/en-us/aspnet/core/client-side/spa/blazor/get-started?view=aspnetcore-3.0&tabs=visual-studio
But that does not look like creating an assembly that can be used in a separate angular only project with by importing
Thanks
From msdn:
JavaScript interop
For apps that require third-party JavaScript libraries and browser APIs, Blazor interoperates with JavaScript. Components are capable of using any library or API that JavaScript is able to use. C# code can call into JavaScript code, and JavaScript code can call into C# code. For more information, see JavaScript interop.
[https://learn.microsoft.com/en-us/aspnet/core/client-side/spa/blazor/?view=aspnetcore-3.0][1]
Ithink looking to Blazor source code can help you to.
I think what you're looking for isn't Blazor, because it's a complete UI framework for ASP.NET client/server stuff using SignalR, that uses WASM at the client side. Maybe too much for your purposes, even if you're able to use any JavaScript framework together with Blazor, too.
But you're looking for a simple way to create just a WASM that exports methods to JavaScript that you can write using C#, right? Well, then I suggest you to have a look here:
https://itnext.io/run-c-natively-in-the-browser-through-the-web-assembly-via-mono-wasm-60f3d55dd05a
It seems the Mono way is working as you'd expect: You write methods in C#, compile a WASM and then you're ready to load and call them from any JavaScript client app, and you don't have to deal with ASP.NET stuff at all.
Compared to a WASM that has been created using lower level C++, you'll have a big bunch of DLLs for the Mono runtime, that need to be loaded to the client browser (!). That's a huge overhead, if you plan only a small feature set to be exported by the WASM. The best argument for creating WASM using Mono for me is, that I can use my existing codebase with all the algorithms and business logic for a really complex app, so I don't have to write and maintenance the same code twice in different languages.
I made a desktop application by using PDFbox in Netbeans.Now I wish to develop a web application of same.Can PDFbox be used to make web app using html,php and javascript?
I haven't started working on backend yet.
No, unless you use the command line utilities, or develop your own, and then call them from your php / javascript code. See here:
https://pdfbox.apache.org/1.8/commandline.html
and here people who call PDFBox from php:
https://github.com/chelmertz/PDFBox-php
http://www.phpclasses.org/package/9028-PHP-Extract-text-from-PDF-documents-using-PDFBox-tool.html
In our project we are trying to figure out which approach would be better for testing from the below
1. Selenium with C#
2. Selenium with Java Script
I am able to find that C# require Selenium libraries and NUnit framework. However, is it possible to use MS Test instead of NUnit framework? We are using Visual Studio 2013.
Secondly, for JavaScript, I found that we need Standalone server to be run to execute the scripts. Is there any good framework available to implement selenium using Javascript?
If you are comfortable with javascript why not use Java with Eclispe and TestNG. This would not require a standalone server implementation to test.
You can consider the NUnit framework to be just a tool. You have lots of options with regards to C#: Xunit, Nunit, MSTest... Selenium is awesome. The question is more C# vs Javascript and which is better suited to your company. I worked at a place where everyone used C#, so naturally using C# for testing meant a lot of external support. You can also call Javascript code in C# if needed via Selenium. I do this in a few rare instances. For Javascript, you have specflow, protractor, and Jasmine which work well together.
I've made a program in Python 2.7 with a wxWidgets GUI. Now, I want to improve it by making a web GUI, make it multi-platform and port it in Python 3.4. For this purpose, I have to make Javascript and Python communicate (i.e : I want my Python to react on some event on the page and I want my page to react on some Python actions).
I don't really know how to do it, and I don't even know if it's possible.
I've find some libraries, but some are just for Python 2 (pyjamas), and some don't provide what I search, or I don't search enough ^^ (web2py, turbogear, cherrypy).
I would like to find a complete library that ease this communication, and that is rather known and supported, with a compete documentation.
Maybe, there are other ways to do such a web GUI, but I don't find them.
Thanks !
I guess what you want is a single page application.
I would suggest to wrap your python code in a RESTful Api using a python web framework like Flask. This would isolate your python code from the presentation layer.
You could then write the UI in html and javascript and use AJAX to call your python api from javascript.