-
All responses Most smiled responses
-
My article ( http://dougv.us/5s ) is self-explanatory. You can use my demo ( http://dougv.us/oj ) to obtain a list of the ZIP Codes you want. If you need help with a specific application, I'd be happy to assist you in exchange for a wish list purchase ( http://dougv.us/ow ). Good luck on your project!
-
You can do that fairly easily. Just recursively add points.
Assuming your JavaScript is on the PHP page, you would simply call addPoint by iterating through a MySQL results set, right within the pageLoad() function.
Assuming your table has columns named id, title, latitude and longitude:
function pageLoad() {
map = new GMap2(document.getElementById('map'));
map.setMapType(G_HYBRID_MAP);
details = document.getElementById('details');
map.setCenter(dcenter);
map.setZoom(dzoom);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.disableDragging();
map.disableScrollWheelZoom();
map.disableDoubleClickZoom();
<?php
$link = mysql_connect('host', 'user', 'password') or die('Cannot connect to mysql server');
$rs = mysql_query('SELECT * FROM table') or die('Cannot execute db query');
while($row = mysql_fetch_array($rs)) {
echo "addpoint($row[id], '" . addslashes($row['title'] . "', $row[latitude], $row[longitude]);\n";
}
?>
} -
A pixel is a point is a dot. When it comes to rendering on screen, what matters is scale: As long as everything is in scale, elements can be whatever "resolution" you want. Full discussion: http://dougv.us/6m
-
Um ... just use my demo to find out. http://dougv.us/oj
-
Sure. The methodology works for any number of languages; just make the right number of keys and keep the translations in order.
-
I'll answer this in detail in a blog post soon, but the short answer is, if you have a KML file that contains several points you want to manipulate with JavaScript, you iterate the points in a KML file as you would any XML document, adding them individually.
-
That shouldn't be happening in the follow-up article code. But thanks for the feedback.
-
You can use CSS and the hover pseudoclass:
#sortedtable thead th:hover {
cursor: pointer;
} -
Read the follow-up article.
-
Seems that's the case. Good catch! An easy fix is to simply run the input string through a regular expression that strips out the punctuation before exploding it into an array.
-
I think you're asking if you can dynamically create a server control in ASP.NET with JavaScript. The short answer is no.
You can create DOM elements via JavaScript, but you can't create server controls, such as LinkButtons, since they "run at" the server, not the client.
That said, ASP.NET versions 2+ come with AJAX-enhanced controls that probably will meet your needs (http://dougv.us/o1) maybe the AlwaysVisible control is what you're after. Versions 3.5+ natively support jQuery (http://dougv.us/o2), which you could use to remove / show / hide server controls after they are output. -
Could you clarify what you mean by sorting concept, and what language you're using? Short of a clarification, I think the most common example -- in C++ classes, anyway -- of sorting is what's called a "bubble sort." Basically, you use an array of unsorted values. You then iterate that array, checking the values and swapping positions in the array if one value is "greater" than the next. By repeating this process several times, you can effectively, if inefficiently, sort your data. Wikipedia article on bubble sorting: http://dougv.us/nz A tl;dr version with C++ code: http://dougv.us/ny
-
I'm not sure which picture you mean. If you mean the one of the horse that I used as an avatar, it's on Flickr http://dougv.us/np If that's not it, post a follow-up question with a description and I'll see what I can do.
-
I'm probably an asshole for being this blunt, but if you can't manage this assignment on your own, you shouldn't be studying computer science.
-
asked by alankayman
Sorry, I don't recall this. I did have a client a while back who was interested in SAP but I don't believe I ever followed through.
If you could provide a link to the question, it might help refresh my memory.
I don't believe I've ever said I use pirated software, and I'd be surprised to see anything in which I offered to share pirated software. It's possible I noted that stealing software was an option, but I have to believe that if I said that, I also said that doing so was legally and morally wrong. Again, a link to the question you're referencing would clear things up for me.
For the record, I have often said -- and stand by the statement -- that it's everyone's right to make personal copies of software he has legally purchased, even if a EULA forbids personal copies; but I don't believe it's OK to distribute copy-restricted software in violation of license terms. -
I blogged about doing this with PHP / MySQL / jQuery at http://dougv.us/64 , http://dougv.us/4s and http://dougv.us/4r . If you're looking for an ASP.NET Web Forms version, I'll add this to my "to blog" list. Can't say as to when I'll get around to it, but probably not immediately, sorry.
-
Um ... I think you just answered your own question. Or maybe I just don't understand your question. Because you're right; if N = 5, then its factorial is expressed as 5! = 5 * 4 * 3 * 2 * 1 = 120.
-
In George Washington's beer recipe (http://dougv.us/n0), I believe "bran hops" is supposed to be "bran [i.e., wheat] AND hops," or more like "large sifter full of wheat, plus hops to your taste." The words appear on different lines in the original manuscript (http://dougv.us/n1). Admittedly, I'm guessing; I copied and pasted the transcript I had verbatim, and my experience with brewing is very home-kit.
-
Doug Vanderweide’s Bio
A one-time newspaper hack and current freelance Web programmer / business consultant in Augusta, ME.


Loading...