Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 August 3

From Wikipedia, the free encyclopedia
Computing desk
< August 2 << Jul | August | Sep >> August 4 >
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.


August 3

[edit]

Excel trendline angle

[edit]

Hey, I was asked an interesting question a couple weeks ago, and since I didn't know the answer, I thought I'd try to see if any of you could answer it. The question is: Is there a way to measure the angle the trendline makes in Excel? 151.198.251.25 (talk) 00:49, 3 August 2010 (UTC)[reply]

Yes and no and depends what you mean. a couple of pointers:
  • the visual angle of the trendline in an excel scatterplot will change if you resize the plot; there is no easy way to measure that directly, since excel doesn't have access to the plot dimensions (short of dropping into vb and retrieving the chart display size).
  • You can get the slope of the regression line of the normalized (un-resized) plot using Excel's SLOPE function, and since the slope is just rise over run, its arctangent should be the angle of the line. so use =ATAN( SLOPE( A:A,B:B ) ), where column A contains the x values and column B contains the y values. --Ludwigs2 03:32, 3 August 2010 (UTC)[reply]
Similarly, you can right-click the trendline, select Format Trendline... Options and then select "Display Equation on chart". That will give you the slope and intercept. --Phil Holmes (talk) 07:47, 3 August 2010 (UTC)[reply]
yes, but that won't be in a machine-accessible format (it will be rendered as part of the graphic). --Ludwigs2 14:17, 3 August 2010 (UTC)[reply]
The OP asked for a measurement. No mention of machine readable. I think I was adding to your information with something simpler. And if you select the "graphic" I think you'll find it can be copied and pasted. --Phil Holmes (talk) 17:17, 3 August 2010 (UTC)[reply]
oh, I see what you mean. ok. --Ludwigs2 20:51, 3 August 2010 (UTC)[reply]

Is there a Wiki anywhere that lets us make biographies & autobiographies of common people and ourselves?

[edit]

What would be considered vanity here would be alright in the Wiki I speak of - Bios of ourselves, friends, teachers, etc. But what is the most popular Wiki of that nature? Thanks. --Let Us Update Wikipedia: Dusty Articles 04:48, 3 August 2010 (UTC)[reply]

I don't think a mainstream wiki exists that allows the creation of biographies of non-public figures except for yourself and your family, because of issues related to privacy of personal information, and the potential for abuse, but I'm happy to be proven wrong. Regards, decltype (talk) 07:42, 3 August 2010 (UTC)[reply]
There are a number of places that let you publish (auto)biographies of individuals that would not be suitable for Wikipedia (sorry, Decltype!) Biographicon and Wikibios are the two listed at Alternative outlets. I haven't used them myself, so can't say anything more than that they seem to follow the Wiki anyone-can-edit philosophy; I don't know how widely used they are. It's not uncommon to refer people who have create bios of themselves, their family or friends on Wikipedia to one of these sites instead. --Kateshortforbob talk 14:57, 3 August 2010 (UTC)[reply]
I foolishly failed to take into account WP:WHAAOE. Biographicon says that the site announced in 2008 that it was shutting down due to insufficient interest, but it certainly appears to still be running at the moment. There is also Biographical Wiki for biographies of dead people which seems to be quite populous. I'm guessing it's pulling most of it's data automatically from genealogical records, though--Kateshortforbob talk 15:05, 3 August 2010 (UTC)[reply]
Thanks, guys. I may write a lot of friendly bios of friendly people, but can I write about bullies and how they picked on classmates and why they should be avoided, etc.? On which of those bio-wikis is that okay? --Let Us Update Wikipedia: Dusty Articles 06:13, 4 August 2010 (UTC)[reply]
Thanks Kate, I foolishly failed to take into account that the internet has a website for everything. However, IIUC, Wikibios requires one to provide the e-mail address of the subject, and they will ultimately have control over their bio. As for writing negative biographies, Wikibios prohibits content "that may be construed as: unlawful; illegal; threatening; harmful; abusive; harassing; stalking; tortuous; defamatory; libelous; vulgar; obscene; offensive; objectionable, (...) giving rise to civil or criminal liability; or in violation of an applicable local, national or international law." I'm fairly sure a "bully biography" would fall into one or more of those categories. decltype (talk) 10:27, 4 August 2010 (UTC)[reply]

Desktop icons on main window unavailable on one of three log-on accounts in windows XP?

[edit]

Some friends of mine told me to look at their windows XP computer. The husband, wife and daughter have multiple log-ons (I have forgot how to to this, can someone remind me?) set up by the person who got the computer for them. All the accounts, except the husbands work fine, but the husbands account has no icons at all on the main window. However, there are normal icons on the startup bar and the tray at the bottom. Dragging and dropping from these to the main window has no effect, and opening folders, copying and pasting to the main window also has no effect, as does using the "send to (desktop) option-the background (a picture of a dog) remains without icons. I changed the picture to the traditional XP rolling hills, this made no difference, and using system restore, which in any case only goes back a few months on his computer, made no difference either. I suppose I could start a new account for him and get rid of the old one (remind me how) but with the hassle of setting up all his old files I would in any case prefer a more sophisticated solution. Something to do with the registry perhaps? —Preceding unsigned comment added by 80.1.88.6 (talk) 05:53, 3 August 2010 (UTC)[reply]

Or something to do with malware? Try cleaning it up with Malwarebytes anti malware first before deciding in making a new account which would be (if it is on normal view, not classic)

Start-->Control Panel-->User Accounts--> Create new user account.

That should give you the option to make a new account.

Sir Stupidity (talk) 08:16, 3 August 2010 (UTC)[reply]

If you haven't done so already, you may want to try this, from Microsoft: Your Desktop Icons are missing in Windows XP. --Kateshortforbob talk 14:51, 3 August 2010 (UTC)[reply]

no visual songs

[edit]

37GB capacity with 11 GB available but no songs appear on playlist plus songs —Preceding unsigned comment added by 124.106.65.211 (talk) 07:00, 3 August 2010 (UTC)[reply]

Hi. You haven't given us enough information. What program or device are you talking about? --Mr.98 (talk) 11:34, 3 August 2010 (UTC)[reply]

errata sqlcmd

[edit]

Hi!

I had wrote that the right snippet should be
DECLARE @myVar varchar(255)
SET @myVariable = '$(myVar)'
SET @myVar = @myVariable + ' ' + suser_sname()
PRINT @myVar

in this example I found :

-- c:\sqlvariable.sql
DECLARE @myVar varchar(255)
SET @myVar = '$(myVar)'
SET @myVar = @myVariable + ' ' + suser_sname()
PRINT @myVar

but I think I was wrong, the right code should be

DECLARE @myVariable varchar(255)
DECLARE @myVar varchar(255)
SET @myVariable = '$(myVar)'
SET @myVar = @myVariable + ' ' + suser_sname()
PRINT @myVar
t.i.a. --217.194.34.103 (talk) 10:14, 3 August 2010 (UTC)[reply]
This question was asked and answered above. Did you have a problem with the answer? Did it not work? Did you just ask a new question without checking to see if the old one was answered? -- kainaw 12:10, 3 August 2010 (UTC)[reply]
I just wanted to correct my code snippets --217.194.34.103 (talk) 12:34, 3 August 2010 (UTC)[reply]
No problem. It would have been better to post this in the section above so everyone knows what it is in reference to. -- kainaw 15:07, 3 August 2010 (UTC)[reply]

In C++/CLI

[edit]

what's the differnce between _nogc normal C++ pointers and __gc pointers that work on .NET reference types? tia --217.194.34.103 (talk) 10:17, 3 August 2010 (UTC)[reply]

__gc objects are managed memory, and responsibility for deleting them lies with the garbage collector; __nogc objects are manually managed, and the programmer must explicitly delete them. -- Finlay McWalterTalk 12:24, 3 August 2010 (UTC)[reply]

there mihgt exist a garbage collected language that is directly compiled in machine language?

[edit]

tia --217.194.34.103 (talk) 12:37, 3 August 2010 (UTC)[reply]

Yes, there are garbage-collected languages that are compiled into machine language. "Directly" is an implementation detail and depends on your interpretation of "directly" - nearly all compilers use multiple stages with intermediate representations. There is, for example, a garbage-collected version of C++. Objective Caml supports interpretation, byte code, and direct native code generation for execution. --Stephan Schulz (talk) 12:46, 3 August 2010 (UTC)[reply]
(ec) Sure, there's no relationship between whether a given implementation of a language uses an intermediate language and how memory is managed. Stick to garbage-collected C++ primitives and you're done. gcj compiles java to an executable too. What "directly" means is implementation-specific and mostly quibbling - does GHC compile Haskell "directly"? Does GNU Common Lisp? All compilers have intermediate data structures between phases - does merely documenting the intermediate language (or using a pre-existing one like C) make the process "indirect"? -- Finlay McWalterTalk 12:57, 3 August 2010 (UTC)[reply]
Even an interpreted language like perl can have a particular script hard-coded into its interpreter. You can recompile the interpreter to produce a "perl" executable that only interprets the specific script you wrote. See, for example, Embedding Perl in C/C++ or Linking Perl with C. So, as above, it's not even really sensible to draw a clear distinction between "compiled" and "interpreted." We can say the same about garbage collection. If you manually manage your memory, whether your language is compiled or interpreted, you are writing a simple garbage collector. So, the ultimate way to ask this question is, "how sophisticated is the memory management, and how much is automatically handled for me, in the particular language, implementation, compiler, set of standard libraries, operating system, ... , that I am writing my code in?" Nimur (talk) 17:21, 3 August 2010 (UTC)[reply]

Software transfer

[edit]

I have an old laptop and the HD is on it's last legs and is about to die. Is it possible to transfer the programs/software that I have on it onto a new HD. And before someone asks I don't have the keys for most of the software due to a couple of house moves. Mo ainm~Talk 16:11, 3 August 2010 (UTC)[reply]

See List of disk cloning software. While you're at it, you can clone your hard disk to a bigger hard disk — the new hard disk doesn't have to be the exact same size — and (most of) the software will take care of enlarging the partition for you. Personally I use Norton Ghost. Comet Tuttle (talk) 16:57, 3 August 2010 (UTC)[reply]
It is not hard to clone one HD to another. The problem is, that means copying over the old operating system, drivers, etc. Some of which may not be compatible with the new laptop. It would take a bit of work to update those, probably, and at the end of it, you still have whatever OS you had on it before. (Which may or may not be an issue for you.) You can't just copy the files from one to the other, though — it would take a full clone to copy all of the registry information over so that it would work the same as before. --Mr.98 (talk) 17:00, 3 August 2010 (UTC)[reply]
(Since Mo Ainm didn't mention he is actually going to buy a new laptop, I had assumed he or she was going to buy a new hard disk for the existing laptop. Mr.98 is correct that if you clone the hard disk and put it in a new laptop, various drivers will probably be needed for the laptop to operate properly — hopefully Windows auto-detects the fact that the drivers are missing and offers to grab them for you via Windows Update.) Comet Tuttle (talk) 17:56, 3 August 2010 (UTC)[reply]
You're right — I had misread it as getting a new laptop altogether. --Mr.98 (talk) 15:34, 5 August 2010 (UTC)[reply]
So would my copy of MS Office work on the new HD if I cloned my old HD? Mo ainm~Talk 19:47, 3 August 2010 (UTC)[reply]
It should work, yes. Cloning the disk literally copies everything exactly as it is now onto the new disk and unless Windows sees some sort of major problem, everything should work exactly as it is does now. ZX81 talk 20:19, 3 August 2010 (UTC)[reply]
Brilliant thanks everyone now I need Norton Ghost suppose it is torrent time ;) Mo ainm~Talk 20:36, 3 August 2010 (UTC)[reply]
By the way, messages like that cause me to avoid helping you in the future. Software developers rely on people being honest and purchasing the software they spent a year writing. Comet Tuttle (talk) 17:02, 4 August 2010 (UTC)[reply]
Clonezilla should do just as well, and it's free. -- Finlay McWalterTalk 21:40, 3 August 2010 (UTC)[reply]
Brilliant I will try that one so. Mo ainm~Talk 21:42, 3 August 2010 (UTC)[reply]
Just one more thing — with laptops it can be hard to physically hook two hard drives together using just the standard cables. This is just because laptops usually only have one hard drive bay and space is a premium. So you might have to get a USB enclosure to make this work. --Mr.98 (talk) 15:36, 5 August 2010 (UTC)[reply]
[edit]

Recently, I've been getting a niggly little problem - items in drop-down menus on this Vista machine are remaining on screen after I have clicked on them. Only the item which has been clicked on within the menu remains (e.g. 'Save as...'), and it remains over everything else on the screen. It doesn't matter whether it's a menu brought up in the browser, or brought down from the task bar, or brought up over the desktop. There is no way to get rid of it. Does anyone know why this is happening and how to make it stop? TIA! --KägeTorä - (影虎) (TALK) 16:17, 3 August 2010 (UTC)[reply]

I've seen this problem before on Windows machines, it looks to be some rendering bug with Windows. I've always fixed with a reboot. This forum post suggests right-clicking the desktop and pressing Esc as a fix. --—Mitaphane Contribs | Talk 19:33, 3 August 2010 (UTC)[reply]
Cheers. I rebooted this morning (after an update) and the problem has been happening. It was happening before then, too. I have been looking around the forums and I've found numerous people saying 'right click + esc', but that doesn't work for me. What I did find, that seems to have worked, is a post telling people to switch off fade options and whatnot in the systems settings window - which I have done and it seems to be fixed - but I really would rather find out why this is happening and fix it without having to switch off stuff when it was perfectly alright before with the same stuff switched on. Cheers, though. --KägeTorä - (影虎) (TALK) 19:41, 3 August 2010 (UTC)[reply]
Have you tried updating your graphics card drivers? It sounds like fade in/out animation isn't working with your graphics card (or at least in the manner that Windows expects it to). If you can swap your graphics card, that might be another way to see if the problem is specific to the graphics card. --—Mitaphane Contribs | Talk 20:08, 3 August 2010 (UTC)[reply]
I'm on a HP G60 laptop with integrated chipset. I won't be able to change the graphics card, and I get periodic updates for it. This may, in fact, be the problem, and I may have to wait until the next update comes along fixing what the last update may have broken, as is sometimes the case. Cheers again. --KägeTorä - (影虎) (TALK) 20:40, 3 August 2010 (UTC)[reply]

My printer doesn't work

[edit]

I have a Samsung ML-2510 laser printer. I'm sure that it doesn't have colour--I never attempted to print in colour--just B&W; and while it printed before, it doesn't now. I took the cartridge out and shook it--such worked for the office copier in the past; but this time I only get a partial print. Any help or suggestions would be appreciated. Thanks. —Preceding unsigned comment added by 76.66.10.69 (talk) 16:26, 3 August 2010 (UTC)[reply]

I would guess that the toner has simply run out and needs to be replaced. Shaking it can sometimes work to restore print quality when the toner is getting low, but if you're getting only a partial print out, the normal reason for that is just a lack of a toner. It can be something more serious with the printer itself, but that's harder to diagnose and the toner is the more likely problem. When did you last change the toner and how many pages have you printed since then? (some printers will tell you this information if you print out a configuration page). ZX81 talk 16:54, 3 August 2010 (UTC)[reply]
(EC) The cartridge has probably run out of ink. The website for support is here. You can download the user manual to tell you how to check if the ink has run out or not. --KägeTorä - (影虎) (TALK) 16:52, 3 August 2010 (UTC)[reply]
I got it on sale almost 2 years ago, and have likely printed a good number of sheets. Do I have to get a new cartridege, or can I simply refill the existing one? How much would either cost? Thanks.76.66.10.69 (talk) —Preceding undated comment added 17:00, 3 August 2010 (UTC).[reply]
You would normally just get a new cartridge. I really don't think there is an option to fill up an existing cartridge. As for the price, that would depend on your vendor (look for it online, or go to a local supply shop), but it won't be much more than US$10-20. --KägeTorä - (影虎) (TALK) 17:41, 3 August 2010 (UTC)[reply]
Doing a quick Google search for "Samsung ML-2510 Toner" came up with quite a few placing selling compatible toners (getting an original is going to be harder/more expensive but compatible ones should work just as well), one of which being here for $25. I have never used that company and therefore not necessarily recommending them, I'm just trying to give somewhere you could possibly get it from. ZX81 talk 20:17, 3 August 2010 (UTC)[reply]
I successfully refill toner cartridges for an old HP 6L printer. I don't know how successful the refilling of Samsung ML 2510 would be, but I think I refilled a similar cartridge many years ago. Refilling can be very messy, so if you can get compatibles for a price that you consider reasonable, then that option might be preferable. Compatibles and refills tend, on average, to give a slightly lower quality of printing than originals. Dbfirs 07:12, 4 August 2010 (UTC)[reply]
Samsung makes some good low-end printers. I agree— replace the toner. The starter cartridge that comes with the printer has a yield of 1,000 pages, while standard cartridges are 3,000 pages. ---— Gadget850 (Ed) talk 10:43, 4 August 2010 (UTC)[reply]

can a jailbroken and unlocked iPhone sync music with iTunes the same as before?

[edit]

First of all, please note that we are explicitly allowed to jailbreak our phones now!

With that out of the way... after I've done so (with ultrasn0w after jailbreaking with jailbreakme.com, this is an iPhone 3GS modem 05.12.01 version 3.1.3 (modem/"baseband" mc139dn), will I still be able to change the music on it by syncing with iTunes?

Or does iTunes know somehow that the firmware is unauthorized/has a jailbroken version now, or for any other reason will give me shit/difficulties?

Thanks. 92.230.233.168 (talk) 17:24, 3 August 2010 (UTC)[reply]

Note that "allowed" is a nuanced thing here. That ruling means jailbreaking is not a crime; it doesn't mean Apple has to let you, has to permit you to sync with iTunes or use ITMS, or can't still brick your phone. As to syncing to iTunes - it seems to depend on the jailbreak - previous jailbreaks have broken iTunes sync, which I believe were subsequently patched by later fixes. -- Finlay McWalterTalk 17:46, 3 August 2010 (UTC)[reply]

Backup

[edit]

I have a lot of easily replaceable files on various hard drives, so I don't need to actually back them up. But I would like to somehow record the files so that if something happened to the drives I would know what I'd lost. So are there any good programs for scanning drives and recording a list of all the files on them, with things like size and modified date etc? Thanks 82.43.88.151 (talk) 17:34, 3 August 2010 (UTC)[reply]

You don't say what operating system you're using. If it's Windows, open a command prompt, cd to the root of where all these files are kept, and say dir /s /v > log.txt, and log.txt becomes that list. On Unix, Mac, and Linux it's much the same, except you say ls -lR > log.txt instead. -- Finlay McWalterTalk 17:41, 3 August 2010 (UTC)[reply]
dir /s on Windows 7, /v isn't a valid parameter anymore.
If you use Mac OS X, the command given by Finlay will work too: open a terminal, write cd /, then ls -lR. --Dereckson (talk) 21:10, 3 August 2010 (UTC)[reply]
On Windows 7 (also Vista and XP if you've installed it) you can use Powershell instead. Once you're at the right directory try get-childitem -recurse > log.txt. get-childitem can also be replaced by gci, dir, ls or some other alias. Nil Einne (talk) 07:27, 4 August 2010 (UTC)[reply]
I tried the cmd method but "log.txt" doesn't appear in any directory after it's finished. 82.43.88.151 (talk) 10:54, 4 August 2010 (UTC)[reply]
The obvious question are you sure the directory you're trying to write to is writable from the user you're running the cmd in? If you're using Vista or Windows 7, be aware unless you've opened the cmd as administrator, it's going to be a restricted user. For example, if you're trying this from the root of the system drive, it won't work in a normal Windows 7 or Vista config because you can't write to the root from a normal user. Ditto for program files. You could always specify where you want the file to be written and make sure it's something you can write to (if in doubt perhaps try copying a file there from the cmd). Try for example dir > %userprofile%\log.log and then look in your user directory for it, e.g. cd $userprofile% (you may also have to change drive if it's on a different drive) then dir log.log.
Also remember you will need to include quotes if the file or directory name you are specifying has white spaces. E.g. dir > "Z:\This is where I store my logs\Latest log.txt". And remember the directory won't be created so if you want to store it it in "Z:\This is where I store my logs" you need to create that directory first (and make sure it is writable). Oh and finally remember if the file exists and is in use, it's possible it can't be written to/overwritten. BTW on a related note do note > will overwrite/replace any existing file, whatever it is. Use >> if you want to append to an existing file. If the file shouldn't exist I often use >> as a form of simple security against mistyping or accidentally specifying a name of a file that already exists, that way if it does happen I should be able to recover the other file (there may be some way avoid overwriting at all I've never bothered to look). Of course you could also do a dir and look for the file yourself first.
Nil Einne (talk) 13:46, 4 August 2010 (UTC)[reply]
I run everything from administrator. It's still not working. 82.43.88.151 (talk) 14:23, 4 August 2010 (UTC)[reply]
1. What about when you try "c:\log.txt" instead of just "log.txt"? 2. Does it take a long time, hitting the hard disk, before it gives you another command prompt? Or do you just immediately get another command prompt? Comet Tuttle (talk) 16:58, 4 August 2010 (UTC)[reply]
Running everything from administrator is somewhat irrelevant if the directory isn't writable by whatever administrator account you are using although actually I believe if the directory isn't writable you should get an access denied message in the command prompt. (I'm presuming here some sort of Windows XP or later, for anything older it should be the same but particularly for the 9x kernel line I don't know.)
I suggest you try something like CT or I mentioned above. Specify the directory and make sure it is writable one. If you are running from an administrator the C root (if you have one) would usually be writable by the administrator or alternatively the userprofile directory should always be.
You may want to try a dir /s first, if you haven't already, so that you get to see the output (although the file should still be created if you properly piped the output even if the command you specify doesn't exist or isn't working). If you don't get any output with that it sounds like there's something strange going on.
BTW you are sure you're looking in the right place for the file right? If for example you're in C:\Users\82.43.88.151 (as shown in the command prompt) and you do a dir > test.log the file should end up in C:\Users\82.43.88.151. If you cd "P:\All My Junk" I hope you recognise as the command prompt shows and I alluded to above this won't change drive so you will still be in C:\Users\82.43.88.151 until you do a P:.
If in doubt you could search for it, if you're using Vista or Windows 7 I presume you aware how the search differs from Windows XP and how to make sure it's searching everywhere you want it to.
Nil Einne (talk) 11:12, 5 August 2010 (UTC)[reply]

Is there a name for this type of data

[edit]

I frequently use two dimensional databases (usually in a spreadsheet format or SPSS) and occasionally relational databases (in Access). Most of the data I work with is fairly simple, but occasionally there is a type of field where there are many possible values. I don't know the best way to deal with this, and I have been unable to successfully search for this as I don't know the correct terminology.

I will give the simple example of a contacts database. For most fields there is a single value, for example if the field is "Name", the value might be "Dave". But a complicated field may be something like "Group" for which there are several answers, "Home", "Work", "Hockey club" etc. One way of dealing with this is to have a field for each group and a true/false for each record, but that results in a huge number of fields. My question is: is there a name for a type of field where there are many possible values and combinations of values?

Thanks for your help. —Preceding unsigned comment added by CyrilPenaCastillo (talkcontribs) 19:13, 3 August 2010 (UTC)[reply]

This is commonly referred to as an "enumerated" field. Most relational databases have an "enum" data type. You can fake it with a lookup table and foreign key. -- kainaw 19:18, 3 August 2010 (UTC)[reply]
I just noticed you specified "combinations". An enum field doesn't do combinations well - most databases don't do enum combinations at all. Neither does a lookup table. What you have is a "many-to-many" relationship. A common example is the student-to-teacher relationship. Students have one or more teachers. Teachers have one or more students. So, you cannot have a simple "teacher" field in a student table or a simple "student" field in a teacher table. Instead, you have a mapping table which contains a record for each student-to-teacher relationship. If possible, you want to avoid many-to-many relationships. So, you might break Group into LocationGroup containing {Work, Home, School} and ClubGroup containing {Hockey, Football, Soccer} - which assumes you can't be in more than one ClubGroup. If you simply cannot get the group fields down to a set that you only have one value set, you can hard-code combinations like: {Hockey, Football, Soccer, Hockey/Football, Hockey/Soccer, ...}
There is another way to tackle combinations, but it is not for the non-programmer. A number, like 285, is a collection of binary values, like 01101100101. Each digit can be a 1 or 0. You can arbitrarily assign each digit to be a column value and, if it is selected, make that digit a 1. Then, you can set or unset each digit as needed. The problem is that when you are done you have to write the user interface to encode and decode all those 1's and 0's properly. -- kainaw 19:27, 3 August 2010 (UTC)[reply]


Thanks! —Preceding unsigned comment added by CyrilPenaCastillo (talkcontribs) 20:16, 3 August 2010 (UTC)[reply]

Some databases, like MySQL, distinguishes the SET and ENUM types, the first allowing combinations of values, the second to pick only one.
Here two MySQL fields from two MySQL tables:
`place_status` set('start','hidden') DEFAULT NULL
`perso_sex` enum('M','F','N','2') NOT NULL DEFAULT 'M',
place_status could have 0 (null), 1 (start or hidden) or 2 (start and hidden) values. perso_sex could only have one value. --Dereckson (talk) 21:06, 3 August 2010 (UTC)[reply]
Please don't try to do what Kainaw suggests—it's a hacky solution and will cause you more grief than help. What you want to do is create a junction table, a very standard thing in relational databases. Basically you have one table of your main entries (tblAddressBook), and then a table of the possible values for your multiple-valued field (tblPlaces), and then a table that sits in between and just contains keys that are "associated" with one another (tblJunctionAddressbookPlaces). In Access these relationships are very easy to indicate with the "relationship view."
I elaborated about this in a previous post, here. Please feel free to ask more questions if it is not clear. This is a nice illustration of what it will look like in Access. Junction tables are easy, flexible, and do not bind you to figuring out your entire data structure from day 1, unlike the ENUM or wacky binary options above. (You can also easily still use it with regular SQL Join Queries; see the example in the link above.) I think in formal theory this may be called an Associative Entity, but I've always just heard it called a "junction table" or "join table" by Access programmers. --Mr.98 (talk) 21:25, 3 August 2010 (UTC)[reply]
Exactly how is that different than the many-to-many relationship table that I suggested? It looks the same to me. Perhaps you got hung up on my suggestion to NOT use binary mapping if you are not a programmer and assumed that telling a person to NOT do something is a suggestion that they do it. -- kainaw 22:09, 3 August 2010 (UTC)[reply]
Sorry, I didn't see your one useful suggestion buried within all of your bad ones on my first pass. --Mr.98 (talk) 22:23, 3 August 2010 (UTC)[reply]
Guys, don't fight. There's a lot of ways to design database systems. "Good" and "bad" are meaningless subjective opinions without context. Every implementation has different needs. Nimur (talk) 22:37, 3 August 2010 (UTC)[reply]
"Good" is subjective without context; "bad" can often be universal. --Mr.98 (talk) 22:40, 3 August 2010 (UTC)[reply]
I have no idea why you guys have complicated things. This is simply a lookup table. In your source table, create 2 fields called name and group. Group is a numeric field. Your lookup table, called group, will have 2 fields, the type (numeric) and group (character) for "home", "work", etc. Then your join would be on the source table (field group) and lookup table (field type). You can set it up as a foreign key relationship if you decide to use indexes (recommended). Many development components make use of these relationships automatically and your form will pick up the data in the lookup table and it should be selectable. Queries on the data will involve joins, typically outer joins. Sandman30s (talk) 11:12, 4 August 2010 (UTC)[reply]
A lookup table will not handle the many-to-many relationship that the questioner described. -- kainaw 12:07, 4 August 2010 (UTC)[reply]
Why do you say that? Consider this (syntax might be wrong, haven't done databases for a long time)
CREATE TABLE Students
{
   id             INT NOT NULL UNIQUE PRIMARY KEY,
   personal_name  STRING NOT NULL,
   family_name    STRING NOT NULL,
.....
}


CREATE TABLE Teachers
{
   id             INT NOT NULL UNIQUE PRIMARY KEY,
   personal_name  STRING NOT NULL,
   family_name    STRING NOT NULL,
.....
}


CREATE TABLE Classses
{
      id             INT UNIQUE PRIMARY KEY,
      teacher_id     INT   REFERENCES Teachers (id)
      name           STRING NOT NULL
...
}


CREATE TABLE StudentClasses
{
      student  INT REFERENCES Students (id),
      class    INT REFERENCES Classes (id),
}
As the StudentClasses table doesn't have a unique designation on any of its fields, there can be multiple entries in it, for each student, and for each class. I would however, add a constraint to ensure that {student, class} is unique.
You could populate the database like this (doesn't directly aline with the above schema)
Database tables
Students
id name
1 Alice
2 Bob
3 Charlie
4 Dave
classes
id name
1 Biology
2 Chemistry
3 Physics
4 Geography
5 History
6 Modern Studies
StudentClasses
student class
1 2
1 4
2 1
2 6
3 2
3 6
4 3
4 5
which gives the result
StudentClasses
student class
Alice Chemistry
Alice Geography
Bob Biology
Bob Modern Studies
Charlie Chemistry
Charlie Modern Studies
Dave Physics
Dave History

CS Miller (talk) 20:56, 4 August 2010 (UTC)[reply]

That table indented the rest of the page, presumably due to a missing tag, so I removed it. Please feel free to re-add it and remove this comment after fixing. --Sean 21:04, 4 August 2010 (UTC)[reply]
I thought I'd fixed it after commiting; it didn't show in a section edit. Mediawiki doesn't seem to like indented tables. Here goes again... CS Miller (talk) 21:39, 4 August 2010 (UTC)[reply]
You just gave a very good example of a mapping table or junction table. It is not an example of a lookup table. -- kainaw 12:03, 5 August 2010 (UTC)[reply]

Cisco Valet M10

[edit]

I see some reviews refer to it as a router, others as an access point. Which is it? And what are the benefits of a router vs. an access point? 24.189.87.160 (talk) 23:56, 3 August 2010 (UTC)[reply]

Technically speaking, it is both a router and an access point in the same box (and in this case, on the same circuit-board and probably on the same network controller chip). For the home user, this is great - the "box" is an all in one device that requires minimal configuration. But there are some unusual networking situations (not very applicable to a "home user") where you would want separate devices for routing and providing wireless link. For example, if you were building a campus-wide network with many distant locations that people can walk between, you want to make sure your access points can perform wireless hand-off. To coordinate this, the router should be located at a position in the network so it can communicate with different Access Points and perform that handoff. You can read about routers and wireless access point for technical details about what "routing" means in the sense of computer networking. Nimur (talk) 00:25, 4 August 2010 (UTC)[reply]
Thanks for the explanation, it helped a whole lot. 24.189.87.160 (talk) 00:38, 4 August 2010 (UTC)[reply]