Wikipedia:Reference desk/Archives/Computing/2011 April 4

Computing desk
< April 3 << Mar | April | May >> April 5 >
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.


April 4 edit

can u explain me in detail the pulse width modulation using frequency division multiplexing? — Preceding unsigned comment added by Saiffuddin (talkcontribs) 02:24, 4 April 2011 (UTC)[reply]

Have you read our article Pulse-width modulation? Comet Tuttle (talk) 03:09, 4 April 2011 (UTC)[reply]

jdbc insert query problem edit

I am using JDBC with oracle data base, All the table are well formed normalization . After INSERT THE TABLE I NEER TO GET THE INSERTED PRIMARY KEY VALUE

PLEASE HELP ME

tHANKS IN ADVANCE

—Preceding unsigned comment added by 192.8.211.14 (talk) 08:05, 4 April 2011 (UTC)[reply]

Welcome to the Wikipedia RefDesk! I hope you find the RefDesk to be a useful resource. Please do not write in ALL CAPS, as it is considered the online equivalent of shouting, and is hence bad netiquette. Thank you.Rocketshiporion 01:16, 6 April 2011 (UTC)[reply]

You had to create a sequence before you created the table to get auto-numbering, which I assume is what you are doing or you would know the primary key. Oracle doesn't have a "this was the number" column like most other databases. You have to fetch it beforehand. The sequence will have a field "nextval" that contains the value that will be used next in autonumbering. There is a problem. What if you fetch the next val. Then, I fetch the next val. Then, you insert. Then I insert. We both think we are using the same primary key. Another solution is to set up a trigger that saves the primary key and the username of the person performing the query to a separate table whenever an insert is performed. That is useful as long as you don't repeat the same issue above with two people (or two programs) using the same username. Yet another method is to do an insert and then fetch using all the info you just inserted sorting from most recently changed to most distant and grab the first row returned. Then, you get the ID off that. Finally, there is another rather foolproof way. Set up a server-side script that hands out unique IDs. You select an ID from it and it is guaranteed to be unique and not handed out before. Then, use that when you do your insert. You will know that you are always using a unique ID and you will know what the ID is. -- kainaw 12:41, 4 April 2011 (UTC)[reply]
What about sequence.currval? 98.103.60.35 (talk) 16:50, 4 April 2011 (UTC)[reply]
That has the same race condition as using nextval or any other variant. -- kainaw 17:31, 4 April 2011 (UTC)[reply]
Are you sure? I am under the impression that nextval is session specific, and, as such, is a simple and correct solution. Googling for oracle sequence currval session suggests this is so. 88.112.59.31 (talk) 17:40, 4 April 2011 (UTC)[reply]
My experience is that it failed miserably when I had to mass-import a lot of records. Even with each record within a single transaction to fetch the ID and insert the record, I got multiple records with the same ID - resulting in insert errors and loss of data. -- kainaw 19:49, 4 April 2011 (UTC)[reply]
I am fairly certain you did something else wrong. When used properly, .currval works fine, and is session specific. See Oracle documentation or google as suggested above. 88.112.59.31 (talk) 13:14, 5 April 2011 (UTC)[reply]
I should state that my solution in that instance was to alter the transaction to exclusive-lock the data table (not the sequence table - trying that didn't work). Then, get the next ID from the sequence table. Then, insert the record. Then, ensure it was inserted by fetching it again and comparing the values. Then, if all went well, release the lock. Otherwise, throw a tantrum, permanently locking the table, until a human was available to see what else went wrong and alter the program yet again. -- kainaw 19:52, 4 April 2011 (UTC)[reply]

Thunderbird and Archiving edit

Would anybody happen to know if Thunderbird archives mail, say, when it gets to a certain full level (rather like the message history of WLM)? I have Thunderbird as my default mail client, with four email accounts running on it - three of which are Gmail and one from my ISP. One of my Gmail accounts (the one I have used longest) now has no mail in the inbox prior to 29th March 2011. I know this 'lost mail' can still be accessed by going to the 'Google Mail' folder (which has all the mail in, whether sent, received, or flagged as spam), and I can also access it just by logging in from the browser, so it's not a problem. I am just wondering where all my mail 'disappeared' to. Would it have been archived for some reason? If so, where to? I'm using Thunderbird 3.1.9, if that's any help. TIA! --KägeTorä - (影虎) (TALK) 12:39, 4 April 2011 (UTC)[reply]

Searching Twitter feeds edit

I'm having a little difficulty searching on Twitter. I'd like to find all mentions of the terms "atemporal" and "atemporality" from the feed GreatDismal, but the search query https://search.twitter.com/search?q=atemporality+from:GreatDismal yields no results despite references existing. The feed is not marked private. Is the query malformed? Takk, Skomorokh 15:35, 4 April 2011 (UTC)[reply]

Not all tweets are indexed. Nanonic (talk) 15:50, 4 April 2011 (UTC)[reply]
Ah, that explains it, thanks. Any feasible workarounds? Skomorokh 16:03, 4 April 2011 (UTC)[reply]

Does Verisign have a domain registrar for verisign.com? edit

Whois doesn't say. I was just wondering if the registry operator itself for the .com top level domain got to manage its domain registry information directly or if the rules dictated that even they have to formally have a domain name registrar. 20.137.18.50 (talk) 18:46, 4 April 2011 (UTC)[reply]

They are registered with Network Solutions, which they own once owned (paid something like $20B during the dotcom bubble). At one point they claimed to own the .com TLD itself. I don't remember what happened to disabuse them of the idea, but there must have been something. Oh man (just looking now), the article about NS is interesting. 75.57.242.120 (talk) 04:36, 5 April 2011 (UTC)[reply]