Computing desk | ||
---|---|---|
< December 19 | << Nov | December | Jan >> | December 21 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Basically I have an array of objects, each one owning a DOM element, and I want to register an event handler to each of the DOM elements, but the function that executes when the event fires needs to know some property of the object that the specific DOM element is associated with. That might not be very clear, but here's the code:
for (var i = 0; i < data.length; i++) { var art = new Artifact(data[i], $('template_artifact')); $('shop_unselected').appendChild(art.element); art.element.onclick = function () { selectArtifact(art.getID(), true); }; }
Obviously as written this doesn't work as intended. art.getID() is evaluated when the event fires, which means it ends up taking whatever the last value of art was assigned to. I need some way of locking in the value of art.getID() at the time that the event handler is registered. Usually when I run into this problem I can find some dirty way to get around it, but I was wondering if there's a simple way to make this work that I'm not thinking of or don't know about. Rckrone ( talk) 00:44, 20 December 2009 (UTC)
art.element.onclick = function (id) { return function() { selectArtifact(id, true); } }(art.getID());
This has happened twice in the last couple weeks - previously I've never seen anything like it. My understanding of LVM is that you cannot boot from an LVM drive. So, I install all of my machines with a plain Linux partition for boot and the rest of the drive space as LVM. For ease of discussion, assume there is one drive (sda) with two partitions (sda1 is /boot and sda2 is /). I can boot just fine. The problem is that once I boot, I cannot mount sda1. According to fdisk, it is there and a Linux partition. Looking in /dev/, it is not there. So, I cannot mount it. I do not want to attempt to fdisk sda1 again or reformat it because it contains grub - which will cause the machine to be useless if I mess it up. I'm left wondering two things: How can sda1 vanish from /dev/ when fdisk clearly reports it as being there? What can I do to force the system to recognize that sda1 exists without reformatting it? -- kainaw ™ 03:27, 20 December 2009 (UTC)
To explain further, /etc/fstab has a commented out UUID line for /boot. The UUID listed does not exist anywhere in /dev. So, it cannot be mounted. -- kainaw ™ 04:46, 20 December 2009 (UTC)
Hello! I have i Britannica 2008 DVD,Install on my Dell Inspiron laptop with higher resolution,every thing is working good but i cant open an article.e,g when searched for atom and clicking on atom there is no text in the open tab.So plz tell me how can i solve this problem.(I have tried Windows XP and Windows 7)Thanks —Preceding unsigned comment added by 119.154.42.42 ( talk) 04:04, 20 December 2009 (UTC)
Hi again, its me. Enjoying the fun of learning inkscape. For some reason my text comes out as a black rectangle no matter what I do to it. Convert to Text -> Rectangle; Stroke to Path -> Rectangle; Object to path -> Rectangle. The rest of the svg is a path as well. I don't understand why the text is a rectangle even after I convert it to a path. - ʄɭoʏɗiaɲ τ ¢ 08:15, 20 December 2009 (UTC)
Hi. I have a Sony HCR-HC7 camcorder that I need to back-up some HD video from. I am looking for a PCI card so that I can copy the video to my PC. I am trying to figure out if FireWire supports HD video and, assuming it does, whether there are some FireWire PCI cards that are appropriate for HD video and some that aren't (for example, whether I need to have a 1394b compliant card). Also, I am wondering whether it is possible to use the HDMI output to transfer directly to a PC (I have looked but can't seem to find an HDMI PCI card, so I am guessing that people just use FireWire). I have tried Googling this morning, but I can't seem to find definitive answers on this, so any help would be really appreciated. Thanks MyWireIsOnFire ( talk) 11:37, 20 December 2009 (UTC)
How do I make one? I have only a pc. Kittybrewster ☎ 12:44, 20 December 2009 (UTC)
My 18 month old was playing with my PC the other day and managed to move the taskbar into a vertical position up the side of the screen. I've looked at all sorts of things but I can't find out how to move it back to the bottom. Help? I'm using Windows XP, home edition, version 2002. 91.109.225.220 ( talk) 14:41, 20 December 2009 (UTC)
One thing I find tedious about XP/IE8 is that instead of them remebering where you previously saved a webpage, file, or Favo(u)rite, you have to browse for the same location all over again. Is there any way of modifying them to remember this? If they cannot be modified, then what operating systems or browsers can be modified in this way by the user, or offer this feature already? Thanks 89.242.211.123 ( talk) 16:11, 20 December 2009 (UTC)
I am not sure if that is what I want. What I meant was, if I am saving a series of things, then I would like the computer to remember where I saved the previopus one, and offer me that location again, rather than having to browse for it all over again. 89.242.211.123 ( talk) 21:34, 20 December 2009 (UTC)
It does not do it on my computer. I just get My Documents. 89.242.211.123 ( talk) 23:10, 20 December 2009 (UTC)
I do have cookies turned on. When I save pictures the computer sometimes offers the previously saved location. Update: when I save another picture quickly after the previous one, the location is remembered. If its a minute or too, then I just get offered My Pictures. So seems to be time related. 89.242.211.123 ( talk) 23:34, 20 December 2009 (UTC)
It might be something to do with using Ccleaner a lot, which cleans out a lot of things. If I knew which was the relevant record, I could tell Ccleaner not to erase it. 78.147.27.40 ( talk) 20:34, 21 December 2009 (UTC)
Some experimentation indicates that using Ccleaner does make the computer forget where to save documents. But the computer never under any circumstances remembers where it previously saved a Favo(u)rite, which is tedious. 92.29.68.169 ( talk) 14:58, 23 December 2009 (UTC)
How do you take a screenshot of them? -- Drogonov 16:43, 20 December 2009 (UTC)
I'm using Ubuntu, and no matter how often I set the clock right, the next time I upload the OS, the clock is late again. -- Quest09 ( talk) 17:55, 20 December 2009 (UTC)
/sbin/hwclock --systohc
I have a laptop running Ubuntu 9.10 that I wish to hook up via an unsecured linksys wireless connection to a hardwired Windows network. How should I do this? -- Lucas Brown 17:58, 20 December 2009 (UTC) —Preceding unsigned comment added by Lucas Brown 42 ( talk • contribs)
Perhaps I should rephrase this a little. I can hook up to the internet/etc. from the laptop via that linksys (I am writing this on that laptop), but I cannot access shared documents on the Windows machines. What should I do to be able to access them? -- Lucas Brown 18:00, 20 December 2009 (UTC) —Preceding unsigned comment added by Lucas Brown 42 ( talk • contribs)
In the folder browser, there is an icon labeled "Windows network", but when I try to open it, it says something about not being able to mount the location. -- 72.197.202.36 ( talk) 04:49, 23 December 2009 (UTC)
What are the similarities and differences between the two of them? —Preceding unsigned comment added by Jessicaabruno ( talk • contribs) 18:07, 20 December 2009 (UTC)
comet,
Thanx for answer to my question here. Wasn't really looking in depth answer, but just looking for the basics.
Its alright about the corrections, have seen my fair share of it, did it myself as well.--Jessica A Bruno 19:20, 20 December 2009 (UTC) —Preceding unsigned comment added by Jessicaabruno ( talk • contribs)
I have some blank rewritable DVDs; to be exact they are DVD-RW 4.7GB/120min. My car stereo says that it plays MP3 and WMA files. If I were to burn some MP3 or WMA music files onto the DVDs should my car stereo be able to play them, or would I need to use CDs? (The stereo does not have a USB port, so when the manual says that it plays MP3 and WMA I assumed it meant CDs; my questions is whether DVDs would also work) ~~ Dr Dec ( Talk) ~~ 20:01, 20 December 2009 (UTC)
Computing desk | ||
---|---|---|
< December 19 | << Nov | December | Jan >> | December 21 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Basically I have an array of objects, each one owning a DOM element, and I want to register an event handler to each of the DOM elements, but the function that executes when the event fires needs to know some property of the object that the specific DOM element is associated with. That might not be very clear, but here's the code:
for (var i = 0; i < data.length; i++) { var art = new Artifact(data[i], $('template_artifact')); $('shop_unselected').appendChild(art.element); art.element.onclick = function () { selectArtifact(art.getID(), true); }; }
Obviously as written this doesn't work as intended. art.getID() is evaluated when the event fires, which means it ends up taking whatever the last value of art was assigned to. I need some way of locking in the value of art.getID() at the time that the event handler is registered. Usually when I run into this problem I can find some dirty way to get around it, but I was wondering if there's a simple way to make this work that I'm not thinking of or don't know about. Rckrone ( talk) 00:44, 20 December 2009 (UTC)
art.element.onclick = function (id) { return function() { selectArtifact(id, true); } }(art.getID());
This has happened twice in the last couple weeks - previously I've never seen anything like it. My understanding of LVM is that you cannot boot from an LVM drive. So, I install all of my machines with a plain Linux partition for boot and the rest of the drive space as LVM. For ease of discussion, assume there is one drive (sda) with two partitions (sda1 is /boot and sda2 is /). I can boot just fine. The problem is that once I boot, I cannot mount sda1. According to fdisk, it is there and a Linux partition. Looking in /dev/, it is not there. So, I cannot mount it. I do not want to attempt to fdisk sda1 again or reformat it because it contains grub - which will cause the machine to be useless if I mess it up. I'm left wondering two things: How can sda1 vanish from /dev/ when fdisk clearly reports it as being there? What can I do to force the system to recognize that sda1 exists without reformatting it? -- kainaw ™ 03:27, 20 December 2009 (UTC)
To explain further, /etc/fstab has a commented out UUID line for /boot. The UUID listed does not exist anywhere in /dev. So, it cannot be mounted. -- kainaw ™ 04:46, 20 December 2009 (UTC)
Hello! I have i Britannica 2008 DVD,Install on my Dell Inspiron laptop with higher resolution,every thing is working good but i cant open an article.e,g when searched for atom and clicking on atom there is no text in the open tab.So plz tell me how can i solve this problem.(I have tried Windows XP and Windows 7)Thanks —Preceding unsigned comment added by 119.154.42.42 ( talk) 04:04, 20 December 2009 (UTC)
Hi again, its me. Enjoying the fun of learning inkscape. For some reason my text comes out as a black rectangle no matter what I do to it. Convert to Text -> Rectangle; Stroke to Path -> Rectangle; Object to path -> Rectangle. The rest of the svg is a path as well. I don't understand why the text is a rectangle even after I convert it to a path. - ʄɭoʏɗiaɲ τ ¢ 08:15, 20 December 2009 (UTC)
Hi. I have a Sony HCR-HC7 camcorder that I need to back-up some HD video from. I am looking for a PCI card so that I can copy the video to my PC. I am trying to figure out if FireWire supports HD video and, assuming it does, whether there are some FireWire PCI cards that are appropriate for HD video and some that aren't (for example, whether I need to have a 1394b compliant card). Also, I am wondering whether it is possible to use the HDMI output to transfer directly to a PC (I have looked but can't seem to find an HDMI PCI card, so I am guessing that people just use FireWire). I have tried Googling this morning, but I can't seem to find definitive answers on this, so any help would be really appreciated. Thanks MyWireIsOnFire ( talk) 11:37, 20 December 2009 (UTC)
How do I make one? I have only a pc. Kittybrewster ☎ 12:44, 20 December 2009 (UTC)
My 18 month old was playing with my PC the other day and managed to move the taskbar into a vertical position up the side of the screen. I've looked at all sorts of things but I can't find out how to move it back to the bottom. Help? I'm using Windows XP, home edition, version 2002. 91.109.225.220 ( talk) 14:41, 20 December 2009 (UTC)
One thing I find tedious about XP/IE8 is that instead of them remebering where you previously saved a webpage, file, or Favo(u)rite, you have to browse for the same location all over again. Is there any way of modifying them to remember this? If they cannot be modified, then what operating systems or browsers can be modified in this way by the user, or offer this feature already? Thanks 89.242.211.123 ( talk) 16:11, 20 December 2009 (UTC)
I am not sure if that is what I want. What I meant was, if I am saving a series of things, then I would like the computer to remember where I saved the previopus one, and offer me that location again, rather than having to browse for it all over again. 89.242.211.123 ( talk) 21:34, 20 December 2009 (UTC)
It does not do it on my computer. I just get My Documents. 89.242.211.123 ( talk) 23:10, 20 December 2009 (UTC)
I do have cookies turned on. When I save pictures the computer sometimes offers the previously saved location. Update: when I save another picture quickly after the previous one, the location is remembered. If its a minute or too, then I just get offered My Pictures. So seems to be time related. 89.242.211.123 ( talk) 23:34, 20 December 2009 (UTC)
It might be something to do with using Ccleaner a lot, which cleans out a lot of things. If I knew which was the relevant record, I could tell Ccleaner not to erase it. 78.147.27.40 ( talk) 20:34, 21 December 2009 (UTC)
Some experimentation indicates that using Ccleaner does make the computer forget where to save documents. But the computer never under any circumstances remembers where it previously saved a Favo(u)rite, which is tedious. 92.29.68.169 ( talk) 14:58, 23 December 2009 (UTC)
How do you take a screenshot of them? -- Drogonov 16:43, 20 December 2009 (UTC)
I'm using Ubuntu, and no matter how often I set the clock right, the next time I upload the OS, the clock is late again. -- Quest09 ( talk) 17:55, 20 December 2009 (UTC)
/sbin/hwclock --systohc
I have a laptop running Ubuntu 9.10 that I wish to hook up via an unsecured linksys wireless connection to a hardwired Windows network. How should I do this? -- Lucas Brown 17:58, 20 December 2009 (UTC) —Preceding unsigned comment added by Lucas Brown 42 ( talk • contribs)
Perhaps I should rephrase this a little. I can hook up to the internet/etc. from the laptop via that linksys (I am writing this on that laptop), but I cannot access shared documents on the Windows machines. What should I do to be able to access them? -- Lucas Brown 18:00, 20 December 2009 (UTC) —Preceding unsigned comment added by Lucas Brown 42 ( talk • contribs)
In the folder browser, there is an icon labeled "Windows network", but when I try to open it, it says something about not being able to mount the location. -- 72.197.202.36 ( talk) 04:49, 23 December 2009 (UTC)
What are the similarities and differences between the two of them? —Preceding unsigned comment added by Jessicaabruno ( talk • contribs) 18:07, 20 December 2009 (UTC)
comet,
Thanx for answer to my question here. Wasn't really looking in depth answer, but just looking for the basics.
Its alright about the corrections, have seen my fair share of it, did it myself as well.--Jessica A Bruno 19:20, 20 December 2009 (UTC) —Preceding unsigned comment added by Jessicaabruno ( talk • contribs)
I have some blank rewritable DVDs; to be exact they are DVD-RW 4.7GB/120min. My car stereo says that it plays MP3 and WMA files. If I were to burn some MP3 or WMA music files onto the DVDs should my car stereo be able to play them, or would I need to use CDs? (The stereo does not have a USB port, so when the manual says that it plays MP3 and WMA I assumed it meant CDs; my questions is whether DVDs would also work) ~~ Dr Dec ( Talk) ~~ 20:01, 20 December 2009 (UTC)