1
vote
1answer
33 views

Jquery Geocoding Script

The rules for this script are simple: If geocode is hit, then just geocode If geocode and submit is hit, then geocode and then submit If an autosuggest link is hit, then geocode instantly In this ...
0
votes
1answer
41 views

JavaScript - Does this bookmarklet need some optimization?

I'm working on JavaScript bookmarklet that lets users send a text and link to a site. This is the bookmarklet: ...
0
votes
1answer
72 views

I've finally found a satisfactory way to create classes on JavaScript. Are there any cons to it?

Depending on external OO libraries is really bad, using prototypes/new has some limitations, using only hashes has others. Dealing with classes was always a pain in JavaScript and it didn't help that ...
3
votes
1answer
284 views

Which is better: the short, clever way, or the long, ctrl+c way?

The code below is equivalent. I can see pros and cons for both versions. Which one is better? Short version: character.on("key",function(key){ var action = ({ ...
1
vote
1answer
95 views

Add checkbox with label to a form

For a WordPress login form I have written a small plugin. It adds a checkbox with a unique name to the form and if that name is not present in the login POST request it just dies. The idea is ...
0
votes
0answers
48 views

Optimizing Jquery Twitch TV Application

I'm trying to get in the habit of writing better looking code and more efficient code blocks. I wrote this Twitch TV Application which allows you to add and edit channels and it lets you know when a ...
1
vote
1answer
108 views

Optimizing my jQuery form popup plugin

Im trying to get better at writing jQuery plugins. Was hoping to get some feedback on my notes, but also just about the general architechture and implenmentation of this pattern (dont even know this ...
1
vote
3answers
94 views

Improving Javascript code of a failed test

I just failed in a JavaScript test and I would really appreciate some comments of how I can improve so I can keep learning. The test was about making a form interactive, where the code should do ...
1
vote
1answer
49 views

Hello, can someone help me optimize my code for this memory game?

can anyone help me optimize my code? I really don't know what to do about all the var rectangles and var colors. If someone can help it would be so nice :) package PO; import javafx.stage.Stage; ...
1
vote
0answers
103 views

How to optimize this algorithm? (solving systems of linear equations)

I am working on a programming challenge described here: http://www.enigmagroup.org/missions/programming/9/ Basically, you have a 6x6 table where the first 5 columns and rows are comprised of ...
2
votes
1answer
84 views

Game runs very slowly - optimization

I've made my first simple game in HTML5. Unfortunately, it runs so slowly. But there are only few rectangles! On my PC, frame rate is between 20 and 25. I expected something like 60-70 but no 20! You ...
3
votes
1answer
88 views

Challenge: solution for this deep-iteration JavaScript function dilemma?

Trying to implement a deep-iteration function with some constraints, I've noticed the faster solution is iterating it twice! Any attempt to avoid this resulted in slower code. So, the challenge: can ...
3
votes
1answer
69 views

Optimize jQuery Iteration

I have a list of elements (well, nested lists of elements, really) that the user can reorder (using jQuery sortable()). A simplified view of the structure is something like: <div ...
0
votes
2answers
76 views

How to optimize this?

This is a user Javascript for youtube, the point is to make the thumbnail bigger on mouseover, I just want some help making it better because I don't want it to waste resources with all the extensions ...
3
votes
4answers
305 views

Using Javascript FileWriter with minimal use of closures

I'm currently writing a WebGL HTML5 game, and large part of the game initialization involved loading assets streamed over a websocket, and saving them to disk using the FileSystem API. As part of ...

1 2 3 4 5
15 30 50 per page