Tagged Questions
192
votes
7answers
54k views
JSON datetime between Python and JavaScript
I want to send a datetime.datetime object in serialized form from Python using JSON and de-serialize in JavaScript using JSON. What is the best way to do this?
127
votes
18answers
22k views
Why don't they implement Python and Ruby in the web browsers? [closed]
I wonder, why don't they implement other languages like Python and Ruby in the web browsers?
Don't they fit as client programming languages or did it just happen to be that JavaScript was the first ...
56
votes
6answers
10k views
What blocks Ruby, Python to get Javascript V8 speed?
Are there any Ruby / Python features that are blocking implementation of optimizations (e.g. inline caching) V8 engine has?
Python is co-developed by Google guys so it shouldn't be blocked by ...
53
votes
2answers
11k views
Typical Angular.js workflow and project structure (with Python Flask)
I am pretty new to this whole MV* client-side framework frenzy. It doesn't have to be Angular.js, but I picked it because it feels more natural to me than either Knockout, Ember or Backbone. Anyway ...
49
votes
7answers
4k views
What is the difference between semicolons in JavaScript and in Python?
Python and JavaScript both allow developers to use or to omit semicolons. However, I've often seen it suggested (in books and blogs) that I should not use semicolons in Python, while I should always ...
38
votes
4answers
10k views
Django authentication and Ajax - URLs that require login
I want to add some Ajax-niceness to my Django-coded website.
In my Django code, I use the @login_required decorator from django.contrib.auth.decorators to mark which view requires authentication. ...
37
votes
2answers
8k views
What are the use cases of Node.js vs Twisted?
Assuming a team of developers are equally comfortable with writing Javascript on the server side as they are with Python & Twisted, when is Node.js going to be more appropriate than Twisted (and ...
34
votes
1answer
641 views
Minimalistic example of IPython kernel javascript bi-directional communication
My goal is to write an interactive variable viewer for IPython, i.e. which allows one to see, say nested dicts/lists as a tree, and drill down (a bit like the console.log in Javascript).
I spent a ...
30
votes
4answers
7k views
Differences between node.js and Tornado
Besides the fact that node.js is written in JS and Tornado in Python, what are some of the differences between the two? They're both non-blocking asynchronous web servers, right? Why choose one over ...
29
votes
4answers
21k views
Django Template Variables and Javascript
When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}.
Is there a way to access the ...
28
votes
22answers
5k views
Find the longest common starting substring in a set of strings
This is a challenge to come up with the most elegant JavaScript, Ruby or other solution to a relatively trivial problem.
This problem is a more specific case of the Longest common substring problem. ...
27
votes
7answers
4k views
Javascript equivalent of Python's zip function
Is there a javascript equivalent of Python's zip function? That is, given two arrays of equal lengths create an array of pairs.
25
votes
4answers
4k views
How can you make a vote-up-down button like in Stackoverflow?
Problems
how to make an Ajax buttons (upward and downward arrows) such that the number can increase or decrease
how to save the action af an user to an variable NumberOfVotesOfQuestionID
I am not ...
24
votes
8answers
21k views
Best way to integrate Python and JavaScript?
Is it possible to integrate Python and JavaScript? For example, imagine you wanted to be able to define classes in JavaScript and use them from Python (or vice versa). If so, what's the best way? ...
24
votes
6answers
8k views
Headless Browser for Python (Javascript support REQUIRED!)
I need a headless browser which is fairly easy to use (I am still fairly new to Python and programming in general) which will allow me to navigate to a page, log into a form that requires Javascript, ...