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 first would like to probably apologize in advance for this question, because this is so low-level it's embarrassing.
Right now, I'm learning Javascript through Codecademy, and while I'm enjoying it, I want to have an environment where I can experiment with what I'm learning in a way where I can see results of what I'm programming, much like what I see when I'm going through the tutorials.
I'm sure I'm missing some incredibly obvious answer, but it looks to me like every system I've seen so far is for either writing the code or running it, not something that will let me quickly try something, hit 'run', and see what the results are. I've looked at Sublime Text, Aptana, and some other things, but they don't really do what I want.
I'd really just like a basic environment that's like Codecademy Labs, but in software form.
Again, I apologize, I feel really dumb asking this question, but I was hoping to get some help.
A modern web browser (e.g. Chrome) is a full-featured Javascript environment with a console, interactive debugging, and all manner of useful tools. Write your code in the editor of your choice (I do like Sublime, myself, but to each one's own) and open the file in your browser with the dev tools. You can even open the file in multiple tabs for multiple independent sessions.
If you want offline solution only, then ya any modern browser like Google Chrome Console is enough.
However you can also try the w3schools try it editor, you can run both html and javascript in it. I use it sometimes, quite simple and handy (although online)
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic
Related
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
This is a super basic question I am just unfamiliar with the definitions to some of the terminology. I am using a mac and i'm looking for a IDE(I assume it is an IDE as that is what I use for python) so I can write in JavaScript for study offline and see my results. I have searched google, downloaded Aptana Studio 3 and a few other suggestions, also I have the latest version of Xcode. Maybe I am just overthinking this or it is my lack of experience but I can not seem to figure out how to write JavaScript or other specific languages inside one IDE. Sorry if this seems like too straight forward to answer but i'd really like to find an IDE for OSX that is free, writes at least html5, css, and JavaScript. Yes, I have googled that and how to begin writing JavaScript on a mac. Thanks a bunch!
an IDE stands for Integrated Development Enviroment so a program that helps you write programs is an IDE
an IDE for javascript could be any text editor, write your code as regular text save it with .js as extension and add a reference to that file from an html page.
I think you can use these free IDE's on mac:
Sublime Text and
Aptana Studio
I'm sure there's alot more, just google it
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 know about the basics of scraping HTML with Python's Beautiful Soup. However, this soccer statistics page makes a AJAX call to get data on minutes played by a player. (I identified the network call using firebug).
My question: is it even possible to use python to "scrape" this information? What tools would I need and what beyond HTML should I know? (I'm currently reading up on JavaScript and AJAX).
I apologize for this non-specific question, but I don't even know how to Google about tools that may or may not exist.
UPDATE: After a few days I came up with a solution using Selenium in Python in conjunction with PhantomJS. I basically used Selenium to go to each link, waited for the page to load, then scraped the information. PhantomJS serves as the headless webdriver in Selenium.
I understand why mods want to close this, but the advice people gave me here was extremely helpful since they launched me into the right direction. My question wasn't too much about what tool is best either, but more about how I can do this in Python.
Using python is unnecessary and will not work in many cases, best way is to run a proper browser and use javascript to do all the scraping, as it will have access to whole DOM, and you can even bind to events.
There are many good headless browsers with scripting support, my favourite is PhantomJS, you can use it to load webpages and scrape them or save them as image e.g.
var page = require('webpage').create();
page.open('http://github.com/', function () {
page.render('github.png');
phantom.exit();
});
But then there are scraping frameworks build over PhantomJS e.g pjscrape
If you have to use Python to crawl the AJAX information, maybe you can try ghost.py project. ghost.py is a webkit web client in Python, using PyQt webkit. You can acquire the AJAX information after execute relevant js code.
Anyway, PhantomJS is a better choice if you are familiar with js.
Hope my answer helps.
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.
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 have found that simply googling this does not return what I am looking for. I am to find something simple and easy. I don't know if this requires javascript or not. I know I can "View Page Source" but I was hoping to find a tutorial. Some examples of what I am talking about can be found here:
-IBM
-Auburn
-About.com
Javascipt code works by running code on the viewer's computer. The pages you're linking are being dynamically generated by code that runs on the webserver itself, not in the browser. More than likely, all of those sites have some sort of database behind them.
I see from your other questions that you know C#. Microsoft provides a framework that uses C# known as ASP.NET. You can write code in C# that will run whenever someone views a page on your site (provided your site is running under IIS).
The ASP.NET Community website is a great resource if you want to find out more about that.
Other such tools that perform server-side operations would be PHP, Ruby on Rails, or Django (to name a popular few).
From viewing the examples you mentioned, it does not seem like there is any javascript used to make these "browse a to z" lists. (There should be a better name for them than that. I'm just going to call it a sitemap.)
I couldn't find any tutorials online that would teach expressly this type of sitemap, but figuring it out should be pretty straight-forward. (At least for implementing sitemaps like the IBM or Auburn examples. The About.com example would be more difficult as it seems that it is backed by a database or lots and lots of individual html pages.)
The trickiest part of making a sitemap page like these is using the tag, and luckily, it is way easy. Just keep checking the source of those pages you can have your own version in no time. The most time consuming part will be putting all of the links down, from A to Z.
http://www.w3schools.com/HTML/html_links.asp
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 currently working on a JavaScript tool that, during the course of its execution, will ultimately traverse each node in the DOM. Because this has potential to be a very expensive task, I'd like to benchmark the performance of this script.
What's the best, free tool for benchmarking a script such as this across the major browsers? Ideally, I'd like the tool (or set of tools, even):
**To generate some form of report based on the results of the test.** It can be as simple as a table showing execution times, or as complex as generating some form of a chart. Either way is fine.
**To be free.** it's not that I don't believe in paying for software, it's just that I don't have a major need for a tool like this in my typical day-to-day tasks.
If possible, I'd also like the tool to generate varying levels of complex pages so that I can stress test a set of DOMs. This isn't a necessity - if I need to do so, I can write one myself; however, I'd figure I'd poll the community first to see if something already exists.
Firebug does include JS profiling, and it is probably the best out there. While I've had problems with Firebug's debugger, its profiler is currently top-of-the-line. Venkman is also an older JS debugger/profiler for Firefox, just in case you run into Firebug issues.
Using these tools should get you just about all the profiling you need across all browsers even though you'll only be monitoring Firefox. If you truly need to get down to dirty details of IE profiling and the like, there are a number of tools online that inject profiling calls into your javascript to help monitor all profiler-lacking browsers....but even to a JS performance nazi like me, this seems unnecessary.
Note: A new, very promising IE8 JS profiler has recently been announced: http://blogs.msdn.com/ie/archive/2008/09/11/introducing-the-ie8-developer-tools-jscript-profiler.aspx.
In FireBug and FireBug Lite you can call the console.time() and console.timeEnd() methods in your code to start and end a timer around a particular piece of code. The Profiler tool in FireBug will measure how long each function takes. I've used it a lot to narrow down which lines of a particularly slow function are causing the slowdown
I believe Firebug includes profiling of JS code. Of course, it's not available in all the major browsers--only Firefox.
Jeff posted The great browser javascript shutdown
SunSpider JavaScript Benchmark
But i wonder where the download link is ;)
For JavaScript, XmlHttpRequest, DOM Access, Rendering Times and Network traffic for IE6, 7 & 8 you can use the free dynaTrace AJAX Edition