Wikipedia:Reference desk/Archives/Computing/2014 February 17

= February 17 =

Update "Stackable" Data in Access Table
I have a database table of certifications that needs updating. There are 3 levels of certs, and they are stackable: that is, all Level 2s have Level 1, and all Level 3s have Levels 2 and 1. There is one record for each certification, so someone with Level 3 has three records, each associated with their unique StudentID. I need to update each certification separately, so that I only update Level 1 certs for students who just have Level 1, and not Level 2 or 3 students who have Level 1. I'm drawing a blank on how to do this, or even how to frame the question for a Google search. This is an Access 2007 database. Any help is greatly appreciated. OldTimeNESter (talk) 14:20, 17 February 2014 (UTC)


 * So you want to only update cert level 1 records for each student where no cert level 2 or 3 exists, right ? Something like this ?

UPDATE STUDENT_CERTS SC1 ,STUDENT_CERTS SC2 WHERE SC1.CERT_LEVEL = 1 AND SC1.STUDENT_ID = SC2.STUDENT_ID AND (SELECT COUNT(*)           FROM STUDENT_CERTS SC2          GROUP BY SC2.STUDENT_ID) = 1


 * (I haven't actually tried it, so the syntax probably isn't quite right.) StuRat (talk) 15:46, 17 February 2014 (UTC)


 * StuRat's suggestion might work. I think you will need to add the proper "SET" part in the UPDATE clause. Also, I can think of several other ways that your table(s) might look. If StuRat's suggestion does not work, you may need to describe the relevant table(s) to get proper help. DanielDemaret (talk) 22:37, 17 February 2014 (UTC)

Stu, that looks like what I need. I had something similar, but I was missing the subquery to limit the students returned to those only listed once on the second table. Thanks! OldTimeNESter (talk) 13:21, 18 February 2014 (UTC)


 * It took me a bit to get the syntax down; I had to use HAVING in the subquery to get it to run. Here's the query, in case anyone is interested (note that this includes one other table so I only pull Active students):

SELECT Student_Certs.Student_ID, Student_Certs.Cert_Level FROM Student INNER JOIN (Student_Certs INNER JOIN Student_Certs AS PC1 ON Student_Certs.Student_ID = PC1.Student_ID) ON Student.Student_Id = Student_Certs.Student_ID WHERE (((Student_Certs.Cert_Level)="Level 1") AND ((Exists (SELECT Count(PC1.Student_ID) FROM Student_Certs AS PC1 WHERE Student_Certs.Student_ID = PC1.Student_ID GROUP BY PC1.Student_ID HAVING Count(PC1.Student_ID) = 1))<>False) AND ((Student.Person_Status_Flag)="A"));


 * Thanks again! OldTimeNESter (talk) 18:15, 18 February 2014 (UTC)


 * You're quite welcome, and I'm glad you were able to figure out the syntax and get it to work for you. I'll mark this Q resolved. StuRat (talk) 03:20, 20 February 2014 (UTC)

Ubuntu - trouble in Paradise
I am trying to do a few things in Ubuntu Desktop 64 bit which I have installed as an independent (not VM) OS. I have the following question. Does it have anything equivalent to MS cmd prompt? So far I haven't found one. I have Brother MFC-7360N printer attached to the machine and it works on two other OS I have here: Win 7 and Win Ser 2008 but it seems for the Ubuntu the company recommends to run this command: sudo aa-complain cupsd How can I run it?

I am a true novice with the system but already I noticed something I consider a bug. Sometimes some windows get somehow drawn upwards in such a position that the upper rim which would allow it to be moved elsewhere or closed down is inaccessible. Any help will be appreciated.

Thanks, --AboutFace 22 (talk) 17:36, 17 February 2014 (UTC)


 * Yes, what you're looking for is a terminal emulator. The most useful one on Ubuntu is probably gnome-terminal, but in any case, you should be able to find a launcher for one in the list of available programs. Looie496 (talk) 17:46, 17 February 2014 (UTC)

Sure it is a DOS emulator as it is known in Windows, I believe, but how do I get it? Is it a part of Ununtu OS or I have to download and install it. Right now I kind of tied up with another taks but I will check both variants shortly. Thanks, --AboutFace 22 (talk) 19:35, 17 February 2014 (UTC)

Well, Ubuntu does have Terminal built in. Thanks for the pointer. --AboutFace 22 (talk) 20:19, 17 February 2014 (UTC)


 * Is that a DOS terminal or a Linux terminal ? That is, does it recognize DOS commands, like "dir", or only Linux commands, like "ls". StuRat (talk) 23:48, 17 February 2014 (UTC)

StuRat hi. I just reviewed the set of commands. It is definitely a Linux terminal with many commands unfamiliar to me. Some of them resemble DOS commands like dirs instead of dir, etc. By next weekend I will be in a better position to answer your question, though, you can see what I did in [//www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/ Ubuntu]. There are other websites as [//community.linuxmint.com/tutorial/view/244 well]. mkdir is the same as you can see. --AboutFace 22 (talk) 01:58, 18 February 2014 (UTC)


 * (faulty indentation) Don't confuse an emulator (which can be of DOS itself, like DOSBox, or of an entire machine (VM) like Bochs) with a simple command line interface. The relationship between DOS and Windows is increasingly complicated, but it's reasonably accurate to say that Windows "really can" run DOS programs, whereas no Linux system will be able to do so except via the deliberate intervention of an emulator (or similar, like Wine).
 * Meanwhile, there is an important distinction between commands provided by the CLI and those merely accessed through it: bash (mentioned below) and tcsh are different shells, with different "housekeeping" commands (e.g., export vs. setenv), but they each access the same set of programs installed on the computer. (And of course there is also also the terminal or (much more likely) terminal emulator you use to interact with these programs; what Ubuntu calls "Terminal" is the gnome-terminal that Looie496 mentioned.  Modern computing environments are complicated!)
 * Because it is possible to add "Linux" programs to a Windows machine (via, e.g., UnxUtils), the distinction between the different CLIs can be a bit fuzzy. That's why it's useful to understand all the different components: aa-complain is a part neither of DOS, gnome-terminal, bash, nor even Linux strictly; it is simply a program that Brother expects to be available in your Ubuntu distribution.
 * A very minor final point: <tt>dirs</tt> is completely unrelated to <tt>dir</tt>, as it prints a list of directories (stored by <tt>pushd</tt>) rather than a list of the contents of one directory. --Tardis (talk) 03:58, 21 February 2014 (UTC)


 * The default for a terminal in Ubuntu is to use the "Bourne Again Shell", better known as bash. Looie496 (talk) 20:56, 18 February 2014 (UTC)

Thank you, Tardis. It is very interesting. --AboutFace 22 (talk) 21:22, 21 February 2014 (UTC)

Open wifi
Why don't all unsecured wifi signals work? Why does this linksys 802.11g connection in particular sometimes work flawlessly (and not even slow) for days, sometimes even with the "there is a problem icon", and other times I can't get a peep of data for days (sometimes even when it tells me it's connected)? With the same laptop, location, position of obstructions (like furniture) and signal strength (1 or 2 wifi arcs (including the center) and signal quality "poor"). Sometimes it's very slow. And when connection starting the reading almost always throttles down to "5 Mbps" whether it works or not. Why is it so finicky? Is there anything I can do? (I don't have access to the router, and don't have a clue where it is) 12.196.0.56 (talk) 19:06, 17 February 2014 (UTC)


 * One possibility is that other people are logging in to it, which is slowing it down. Honestly, though, I have periods of time where I have the same issues with my wireless (secured) router.  So, it could just be that the Internet connection itself is unreliable. OldTimeNESter (talk) 20:55, 17 February 2014 (UTC)


 * It doesn't seem to matter what time of day. This isn't some third world country connection or anything, though. I never experienced one this bad (wired or wireless) but another place I lived had a free router just like this. 12.196.0.56 (talk) 22:42, 17 February 2014 (UTC)


 * I find that my wifi signal can vary depending on whether a certain (solid) door is open or closed. Have you tried reception in different locations?  Sometimes a foot or two can make a big difference. ( You are lucky to get 5Mb! Sometimes I'm reduced to 5Kb! )  Is open wifi common in the US?  I've only ever found one unsecured wifi router here in the (rural northern) UK, and that was inside a private building with no public access.    D b f i r s   08:57, 18 February 2014 (UTC)


 * I tried two other locations but not for long enough to know if it's better or not. Only a few hours. Also, while 5mbps might've been accurate sometimes (Youtube worked about like my 5mbps cable of the late 2000s) it's always "54mbps"(!) the first few seconds. I doubt that means anything more than what 802.11g is rated for. 12.196.0.56 (talk) 15:57, 18 February 2014 (UTC)


 * Many government buildings and university campuses in the United States have open wifi (of varying quality), and there are even some cities with it. My guess, though, is that the OP is piggybacking on someone's private, unsecured connection. OldTimeNESter (talk) 13:25, 18 February 2014 (UTC)


 * Maybe this is a Linksys thing. My (secured) Linksys modem/router displays this exact same behavoir - perfectly ok for days or even weeks at a time, then suddenly no connection to the internet with no explanation, no log, nothing.  Nothing will fix it except cycling the power on the modem/router, then it is ok until some indeterminate time in the future.  Of course, of the OP is piggybacking on someone else's open connection, then I presume he doesn't have access to be able to cycle the power.  The OP will just have to wait until the owner spots this problem and fixes it for themselves.  Astronaut (talk) 16:01, 18 February 2014 (UTC)


 * One common problem is if there are other WiFi users within a hundred yards of you that are using the same channel frequency as yours. The protocol allows them to share the channel - but you get dramatically worse throughput if you do that.  It's a good idea to get a WiFi monitor for your cellphone or tablet (for Android devices, I like "wifi analyzer" by Kevin Yuan) - it'll show the relative signal strengths of your signal and those of your neighbors - and also which channels they are using.  You can usually find a channel that nobody else uses and switch your router over to that.  The analyzer I use also has a signal strength meter - and it's worth wondering around your home or office with that and see where the signal is strong and where it's weak.  That'll generally suggest to you where you might want to relocate your router to.  20 minutes of fritzing around with a tool like that will tell you more than we can ever suggest! (SteveBaker) 99.96.179.150 (talk) 20:25, 19 February 2014 (UTC)