All Questions
Tagged with python javascript
56 questions
43
votes
13
answers
11k
views
How does Python's handling of line-breaks differ from JavaScript's automatic semicolons?
Javascript has a feature called Automatic Semicolon Insertion where basically if the parser encounters an invalid token, and the last token before that was a line break, then the parser will insert a ...
3
votes
4
answers
1k
views
Do all dynamically typed languages not support function overloading?
I have noticed that JavaScript and PHP and Python do not support function overloading.
Do all dynamically typed languages not support function overloading? If the answer is yes, then why is that?
10
votes
4
answers
1k
views
What is the historical basis of using Javascript in web programming?
I come from a scientific biology background where we also use Python a lot.
Now that I've begun to start with Web development, I've consistently found myself wondering just why it is that JavaScript ...
3
votes
2
answers
404
views
What is the rationale for making certain methods for data types static?
In C#, for instance, there are static methods for telling if a string is null or empty, finding an element in an array, clearing an array, etc. However there's an instance method for replacing ...
-2
votes
2
answers
2k
views
Should I use Flask w/ Javascript OR a Javascript UI that calls a Flask / Connexion API?
I recently wrote a data management tool in Python & SQLAlchemy. Now, I need to put a web UI on it. While I want to start small, there is some need for interactivity, like drag and drop in tables, ...
10
votes
11
answers
16k
views
Do I have to learn html and javascript to create web applications? [closed]
I am an experienced Java programmer, and I want to create a complex web application requiring dynamic pages, drawings, etc (take SO as an example). Do I have to learn javascript/html in order to ...
0
votes
1
answer
118
views
How encrypting website data works
If i wanted to encrypt a password on my website before its sent to the server, would i have to encrypt the password in javascript on the frontend for it to be hidden over the interent or could it be ...
18
votes
5
answers
11k
views
Algorithm for flattening overlapping ranges
I am looking for a nice way of flattening (splitting) a list of potentially-overlapping numeric ranges. The problem is very similar to that of this question: Fastest way to split overlapping date ...
17
votes
7
answers
9k
views
Would Python be too slow for client-side use in Browsers?
I've heard the statement that Python would be too slow to be of any use in browsers.
I reckon Javascript is only superior in this aspect because of companies like Google who need it fast (and made it ...
24
votes
3
answers
4k
views
Why do so many languages treat numbers starting with 0 as octal?
I've read Where are octals useful? and it seems like octals are something that were once upon a time useful.
Many languages treat numbers preceding with a 0 as octal, so the literal 010 is actually 8....
-3
votes
2
answers
1k
views
How can I calculate the radius of an arc given by a series of points
Given a series of points, I need to assert that the plotted points form an arc (with a certain level of confidence), and I need to approximate the radius of the arc.
For example, the following points ...
-2
votes
1
answer
988
views
How to make code runnable on open source code editors like Ace Editor?
For my computer science uni project I'm required to build a web application with an integrated code editor. I believe I can just integrate open source editors like Ace Editor.
However, I feel ...
2
votes
1
answer
4k
views
Best practices for calling multiple APIs and manipulating data before showing it to user?
I am building a web application that makes use of multiple API's (Google Maps, Weather APIs, and more). I am using Python + Flask on the backend, and Javascript (probably with React, I have not ...
7
votes
2
answers
4k
views
Every function is a closure?
Wikipedia says, that closure - is a function, which has an access to variables, declared outside of the function. There is even an example:
function startAt(x)
function incrementBy(y)
...
0
votes
2
answers
257
views
Code style to keep track of nested objects and data types?
In untyped languages (Python, Javascript specifically) find myself making a lot of bugs / wasting a lot of time because I forget what's in the objects I'm passing around. For example, I forget things ...