Looking at comprehensions in Python and Javascript, so far I can't see some of the main features that I consider most powerful in comprehensions in languages like Haskell.
Do they allow things like multiple generators? Or are they just a basic map-filter form?
If they don't allow multiple generators, I find them quite disappointing ...
For completely non-nefarious purposes - machine learning specifically, I'd like to download a huge dataset of CAPTCHA images. However, CAPTCHA is always implemented using some obfuscated javascript that makes getting at the actual images without a browser a non-trivial task, at least to me, who is a javascript novice.
So, can anyone giv...
Is it possible to capture what button was clicked in javascript? I have validation set up but i only want it to validate when a button is clicked and by no other means.
PLEASE NOTE THAT I HAVE 3 TEXTBOXES JUST LIKE THE BELOW. IT'S FOR A PHONE NUMBER ENTRY BROKEN UP INTO 3 TEXT BOXES.
What i would like to do is put and '&&' condition i...
How do I remove the 'bounds_changed' Event listener in Google Maps API v3?
google.maps.event.removeListener(_???_);
...
I have a table of data which is generated dynamically with Javascript. Every few minutes the page refreshes the data by firing off an Ajax request, getting the data back from the server, and replacing the data in the table. This is pretty standard, and the table ends up looking like this:
This works just fine if I generate the data ...
$(document).ready(function() {
// #login-box password field
$('#password').attr('type', 'text');
$('#password').val('Password');
});
This is supposed to change the #password input field (with id="password") which is of type password to a normal text field and fill in the text "Password".
It doesn't work though. Why?
Here ...
I'm quite fresh on jQuery, and I've just implemented jQuery + jQuery UI, but on the datepicker widget it seems like the classes added on the inputs from before are removed, and datepicker classes are added insteady.
How can I keep my classes as well?
...
Imagine you are going to a web site with an empty cache.
In Google Maps API v3, what's the earliest event that will be triggered to inform me the bounds of the maps on initial load?
In Google Maps v2 it was the 'loaded' event; however, this event is not present in v3 of the API.
Would it be the 'bound_changed' event for v3 of the API?...
On my site, I have two checkboxes created in my ASP.NET MVC view like so:
Html.RadioButton("check", "true", "true" == (string) ViewData["someKey"], new { id = "check1"});
Html.RadioButton("check", "false", "false" == (string) ViewData["someKey"], new { id = "check2"});
I am positive that ViewData["someKey"] has the value "true" in it....
I'm using the new Google Maps API v3.
It works great with Firefox/Chromo/Safari but the map doesn't load in IE6.
My map can be found here: http://tinyurl.com/ykzwb2
Any ideas why the page loads my map in all browsers except IE6?
...
I'm sure there's a simple answer to this, but it's Friday afternoon and I'm tired. :(
Not sure how to explain it, so I'll just go ahead and post example code...
Here is a simple object:
var Bob =
{ Stuff : ''
, init : function()
{
this.Stuff = arguments[0]
}
, doSomething : function()
{
console.log( this.Stuff );
}
}
An...
In Google Maps API v2, if I wanted to remove all the map markers, I could simply do:
map.clearOverlays();
How do I do this in Google Maps API v3?
Looking at the Reference API, it's unclear to me.
...
I've got a user control which lets users provided their own script names that are called by the control on specific events.
I have the following code:
initialize : function()
{
// Call the base initialize method
Point74.WebAutoComplete.callBaseMethod(this, 'initialize');
$(document).ready(
Function.createDelegate(...
I have an iframe that displays a flash banner ad which has clickable links. Is there anyway to force the links to open in parent window, without putting JS on the page that opens or changing the flash file?
For example, is there something i can do to the iFrame to force links to open in its parent?
...
Hello all,
I have several forms on a page with different ids and I want to find out which is submitting and its id. How can I do this?
//stop all forms from submitting and submit the real (hidden) form#order
$('form:not(#order)').submit(function(event) {
event.preventDefault();
The above stops all forms submitting and I would like pu...
See the below Image.
I have added a reset button at the end of form.
When user press "reset" I can clear all inputs.
But I don't know, how to clear this fckeditor values.
Thanks in advance for helping me.
Sagar.
...
http://farmball.com/boston
The line that 'causes' the error:
IEPNGFix.process(element, 0);
Full code: http://pastie.org/648568
Note: I tried searching the phrase and IEPNGFix in Google, no luck. Also tried the MIRC Javascript chatroom before coming here.
What do I need to change?
...
How to parseInt "09" into 9 ?
...
i have ul like this
<ul class="options" id="selt_count">
<li value="1">One</li>
<li value="2">Two</li>
<li value="5">Five</li>
<li value="12">Other</li>
</ul>
what i want is:
get all values of of li into variable in following format (1,2,5,12)
in jquery
Thanks
...
I'm using JavaScript to sort a table on an HTML hyperlink:
This sort from Low-to-High:
<a id="asc" href="#" onclick="javascript:sort('asc');">Low</a>
It works great in Firefox/Chrome/Safari but does not work in IE6.
Live site at: http://tinyurl.com/ykzwb2
Click the Sort "High" or Sort "Low" link.
Any idea why it works in all brow...