Best option to get html source from a website. [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Iam now making a program where user enters login, pasw and then program sends it to website with post method or somethink like that, and then retrvieves html source and puts it in string.
I cant find a best option to do this. Currently my program's ui is in Qt QML and main is in c++.
I have done this before with libcurl but I dont like, so maybe there is another option.
And another problem is that iam beginner and I know just C++ and Qml. I tried javascript but i cant get it to work.

You have two options. You can either write C++ code to make the call(which will require some sort of library to help you make the call) or you can make the call in JavaScript using an XMLHttpRequest(Which is provided natively by QML).
XMLHttpRequest example:
http://qt-project.org/doc/qt-4.8/declarative-xml-xmlhttprequest-xmlhttprequest-example-qml.html
For C++ I would refer you to How do you make a HTTP request with C++? which discusses libraries that allow you to easily make the http calls in C++.

Related

Checking html5 and Javascript support [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Hello i would like to check if ALL features of HTML5, CSS3 and Javascript are supported in my browser before redirecting the user to the application itself, i have seen some references to Modernizr but even after reading their documentation i can't make heads or tails of how to use it.
I just want a simple function that returns a boolean after the check has been made. Is there any sort of function like that out there somewhere?
Life (and browser compatibility) is more complicated than a single boolean.
Use Modernizr, then make sure all the specific features you actually need are supported and do your redirect, for example:
if(Modernizr.geolocation && Modernizr.boxshadow/* whatever else ...*/) {...}
You tagged your question as 'php' - but reliable feature detection can only run on the client side. If you want this info on the server you can run the tests client side and then pass the interesting results in a cookie or something similar.

Need to understand behind scenes | node.js [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I would like to know, how can I write something(small) like node in native lanuage(c,cpp). I read that c,c++ experts developed node.js and made it available with javascript interface. This interface is much much simpler to start with node.js applications.
This is not about re-inventing the wheel,(only learning) but I want to learn/understand the way where to start if I want to create a server that work like node, it is not performance or scalability or simplicity oriented. nothing like that.
Any book or any c,cpp topic that will help me to start with websockets, broadcasting data and such important features of node. I am new to c,cpp also but need to understand what is making node such a strong technology.
Any other solutions than taking source code of node.js ?
Node.js is powered by libuv - it's an asynchronous crossplatform io library, written in C. Basically, it does everything node does, but exposes only C interfaces.

Persist data on server with JavaScript? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'd like to create a small JS, HTML & CSS-only web application for my personal use with some kind of MVC-framework (like ember.js). My big requirement is that I want to persist the data permanently on the server where I run the web-application.
Is that achievable and what are good frameworks for it?
If something needs to run on the server I want it to be lightweight and easy to setup.
I need to be able to query the data. After a while there will be a few thousand rows in the database. Joins etc. won't be required.
It's highly possible, but you'll need somethign running on the server to swallow the data.
Typically you have serverside code which interacts with your data store to prevent users from manipulating your databases.
You can stick with JSON/Javascript and use CouchDB: http://couchdb.apache.org/.
It allows you to read/write data directly from Javascript, so you don't have to write server side code.
Other ideas to stay in the JSON/Javascript world - you can write from client side to a Node.js machine that writes to Mongo. Pure JSON/Javascript all the way down.

(Node.js) application that lets me edit a local file through a web browser? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I wonder if there is a Node.js application that starts a server on the current folder to let me edit files through the web browser?
Kinda like http://www.cloud9ide.com, but for general editing (scripts, text etc).
You might want to look at Mozilla Skywriter - they are in the process of converting their server code to node.js.
You can now try making your little node.js app online with http://jsapp.us/.
It's a sandbox with Bespin/Skywriter editor and the commands to save and deploy a node.js application.
Its outside the scope of your question but if you have php access you could use http://tinymce.moxiecode.com/ and just set the value of the input field to the file you want to edit.
Then when you submit just have it overwrite the file you opened. I know its not using javascript like you asked but I though I would offer the suggestion its how I do what you where looking for.

How can I compile Ruby to Javascript? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm working on a piece of logic that I would like to express on the server as well as in the browser. Something like validating a form where there must be certain logical relationships between the elements based on what has already been entered.
So... If I can write the logic once and somehow end up with both Ruby and with Javascript, I can write the logic just once and not have to worry about making sure that two pieces of code written in different languages have the same functional behaviour.
I don't need to reproduce everything in Ruby, obviously, and one simplification might be to port a single general-purpose library like Functional Javascript to Ruby.
Does anyone have experience with RubyJS? Can anyone point me to an existing project using RubyJS?
Thanks in advance...
As far as I can tell, Opal is the best Ruby to JS converter/compiler out there right now. Here you can see it in action.
It isn't perfect, but it works most of the time and unlike older projects such as RubyJS, Opal is still being actively developed.
I know about http://hotruby.yukoba.jp/ but have never used it
maybe this helps:
http://opalrb.org/
haven't tried it though
I recently heard about a project named "Johnson" which embeds the Spidermonkey JavaScript interpreter inside Ruby. http://github.com/jbarnette/johnson
You could then eval some javascript inside ruby.

Categories