Wikipedia:Reference desk/Archives/Computing/2010 May 20

From Wikipedia, the free encyclopedia
Computing desk
< May 19 << Apr | May | Jun >> May 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.


May 20[edit]

OSC PC Software[edit]

Good morning,

I am looking for a user interface for OSC (open sound control) similar to TouchOSC and Lemur. Both of those programs are programmable and serve as a framework to design custom interfaces. I have been unable to find a high level PC application. Any help would be appreciated. Windows or Linux flavors are fine. Thanks. aszymanik speak! 06:31, 20 May 2010 (UTC)[reply]

There are many software options found at this website: http://archive.cnmat.berkeley.edu/OpenSoundControl/. I should clarify that I am looking for free lightweight software (as opposed to Max/MSP and Supercollider). aszymanik speak! 06:31, 20 May 2010 (UTC)[reply]

Podcast question.[edit]

I am a bit of a technosaurus and have just purchased an iPod nano version 5. I am pretty confident about copying and transferring music and creating playlists etc., but have just discovered Podcasts, hence my query. I discovered a 3 series free language course which I thought would really help my conversation when on the Continent, and after an initial struggle, managed to download the many episodes and transfer them to my iPod. But no matter how hard I try to re-order them on my PC, whether in the Podcast List or in the Playlists after I transfer them, I always end up with the most recent episode playing first and the initial episode playing last, which clearly, in a language course, is daft. What I don't get is how, when I upload a music CD to my iTunes library, it too arrives as last in first out - but when I re-order them in my Playlists, they stay that way. So if I can re-order music lists that stay that way, why can't I do it with Podcast episodes? Like I said, I was born before television! 92.30.74.114 (talk) 22:43, 19 May 2010 (UTC) —Preceding unsigned comment added by 92.30.7.71 (talk)

Hello. If you find that you get no helpful answers, Apple has its own help forums at [[1]]. If you have an iTunes account you can use that to sign in and then you just post your question on the relevant section - maybe iTunes for Windows/Mac....there are plenty of users on there who will be happy to help. Of course you do not have to post there and I appreciate that it is not getting you any closer to an answer, but I personally have had several problems sorted after I posted on the forum. Hope this helps and I hope your question is answered. Chevymontecarlo 18:12, 20 May 2010 (UTC)[reply]
I have a feeling that it is something to do with either Importing options/settings or library organisation settings....although this probably will get you nowhere...I am sorry and I hope someone else will be able to help you :) Chevymontecarlo 18:14, 20 May 2010 (UTC)[reply]
I have the same problem with my cheap (non-Apple) MP3 player. Does anyone know which criterion is normally used to order the files in these devices? I think I once rearranged the files before copying, but I've forgotten how I did it. Dbfirs 07:06, 21 May 2010 (UTC)[reply]
I haven't played around too much with podcasts on iTunes but I think I may have a reason for the ordering that you're seeing. Since podcasts are often intended to be something that you regularly listen to in much the same way that you would watch your favorite television program from week to week, it might have seemed to the programmers that people would want to listen to the last podcast first. There's an assumption that you can go back to old episodes/podcasts to catch up to the most current one and not start from the beginning of the first podcast. Dismas|(talk) 07:24, 21 May 2010 (UTC)[reply]
... but the programmers don't decide the order of play, the MP3 player does. The play order is different in Windows Media Player. Podcasts are named with an abbreviation followed by the date in yyyymmdd format, so alphabetical ordering puts them in chronological order. Dbfirs 16:15, 21 May 2010 (UTC)[reply]

I need the code in Visual Basic with Access database[edit]

CAN YOU HELP ME WITH THIS.. I NEED THE CODE IN VISUAL BASIC WITH ACCESS DATABASE. I DONT HAVE MUCH PROGRAMMING EXPERIENCE.. SO WOULD BE GRATEFUL FOR YOUR TIME

I have a database with the following structure IDNO - Text(7), From Date - Date, To Data - Date, Year - Number, Full_Part - Logical.

what i want the program to give me the result is that i need to take out the missing date ranges for each IDNO for each particular year. ie.. i need to take out the year wise gaps for records. also, if the entire year is missing then the gap will be the entire year with the full_part field in the result showing F. so say.. in this example.. i need the program to return the result for

IDNO From Date To Date Year FULL_PART

A247108 01-Apr-02 30-Sep-02 2002 P

A247111 01-Jul-99 30-Sep-99 1999 P

A247111 01-Jan-00 31-Mar-00 1999 P (year is 1999 because it falls in the 1999-2000 financial year)

A sample database is appended below :-

IDNO From Date To Date Year FULL_PART

A247108 01-Apr-99 31-Mar-00 1999 F

A247108 01-Apr-00 31-Mar-01 2000 F

A247108 01-Apr-01 31-Mar-02 2001 F

A247108 01-Oct-02 31-Mar-03 2002 F

A247108 01-Apr-03 31-Mar-04 2003 F

A247111 01-Apr-00 31-Mar-01 2000 F

A247111 01-Apr-01 31-Mar-02 2001 F

A247111 01-Apr-02 31-Mar-03 2002 F

A247111 01-Apr-03 31-Mar-04 2003 F

A247111 01-Apr-99 30-Jun-99 1999 P

A247111 01-Oct-99 31-Dec-99 1999 P

A247124 01-Apr-99 31-Mar-00 1999 F

A247124 01-Apr-00 31-Mar-01 2000 F

A247124 01-Apr-01 31-Mar-02 2001 F

A247124 01-Apr-02 31-Mar-03 2002 F


—Preceding unsigned comment added by Prasanth.moothedath (talk • contribs) 03:26, 16 May 2010 (UTC) —Preceding unsigned comment added by Prasanth.moothedath (talkcontribs) 05:10, 20 May 2010

Question was weirdly buried in the middle of May 17 despite being added today. Moved to correct day. Astronaut (talk) 11:17, 20 May 2010 (UTC)[reply]
The signature is from 16 May. Perhaps it was original left somewhere else? Nil Einne (talk) 11:24, 20 May 2010 (UTC)[reply]
Further research shows the question appears to have been asked and answered here Wikipedia:Reference desk/Archives/Computing/2010 May 16#Help with a Programming Logic in MS-Access-Visual Basic but an anon who I guess is Prasanth.moothedath says "but it is not giving me the required result" and didn't get any response so I guess they decided to ask again. It's better if any future answers are directed at the original question. It'll probably also be useful if Prasanth.moothedath says what the problem is in more detail then simply saying 'not giving me the required result' for example describing what the result it. Nil Einne (talk) 11:29, 20 May 2010 (UTC)[reply]
I think he just cut and pasted his original question in the middle of the following day, even though he did it today. Astronaut (talk) 11:32, 20 May 2010 (UTC)[reply]
You asked the same question a few days ago. Did the answers you got then, not help?
Incidentally, there is no need to repost your entire question. New questions should be started in the current day. If you bury it within an unrelated section some days in the past, it is likely to be ignored. If previous answers were not helpful then just say so. Astronaut (talk) 11:32, 20 May 2010 (UTC)[reply]
If the code isn't working, you'll have to tell me why. Read the comments in the code and it will tell you exactly what it does do. It doesn't do everything—it just is the logical framework for writing more code. --Mr.98 (talk) 14:25, 20 May 2010 (UTC)[reply]

CSS/javascript, text that is invisible by default, but can be made visible through user interaction[edit]

On a mediawiki site that I run, I would like to create a text style that is invisible by default, but can easily be made visible through user interaction (for example hovering the mouse pointer over a certain area of the screen, or over the text itself). I imagine that this might be possible by creative use of monobook.css and/or monobook.js, but it is beyond my capabilities. Intended use: Flashcards, taking advantage of Special:Randomarticle/mynamespace. Any suggestions? Thanks, --NorwegianBlue talk 13:24, 20 May 2010 (UTC)[reply]

The traditional way to do this with pure html is to use transparent text, like this, which can (in most browsers) be made readable by highlighting it. With CSS, you can use the :hover pseudo-class to make text that appears only when moused over, for example:
.hidden {opacity:0;}
.hidden:hover {opacity:1;}
Algebraist 13:46, 20 May 2010 (UTC)[reply]
Note this will work in standards-compliant browsers but not in IE. Google tells me you can use more complex CSS to get something that works in all major browsers. Algebraist 13:51, 20 May 2010 (UTC)[reply]
The easiest way to have something invisible is to set its display to "none":
.hidden { display: none; }
Then you toggle its hiddenness using Javascript:
<script language="javascript" type="text/javascript">
function showhide(id) {
   var ctl = document.getElementById(id);
   if(ctl.style.display=="none") {
      ctl.style.display="block";
   } else {
      ctl.style.display="none";
   }
}
</script>
<body>
<div id="somethingHidden" class="hidden">I am hidden until you click on link below.</div>
<p>
<a href="#" onclick="showhide('somethingHidden'); return false;">Click me to toggle the visibility of the above.</a>
</body>
This is better than using transparency, which can be dodgy in many browsers. It will not take a very extensive knowledge in Javascript to get this working. --Mr.98 (talk) 14:21, 20 May 2010 (UTC)[reply]
Setting the display property to none causes the undisplayed text to not take up any space on the page, which means that when it's unhidden the page rearranges itself to accomodate. If that causes you a problem, you can use the CSS property visibility instead, and toggle it between "hidden" and "visible" using much the same code as Mr.98 presents. Markup that is display=block visibility=hidden does take up the space it would if it were visible, and so toggling it doesn't force the page to reformat. Which you prefer depends on how you want your page to behave. -- Finlay McWalterTalk 14:40, 20 May 2010 (UTC)[reply]
Thanks! It definitelty looks promising, but doesn't work out of the box in my wiki (the <a> tag is not understood by the MediaWiki software). Do I need an extension to get it working, or is there another workaround? (I added the Javascript to my monobook.js, the css to monobook.css and the html between the <body></body> tags to the wiki page itself). --NorwegianBlue talk 16:25, 20 May 2010 (UTC)[reply]
Finally managed to get it working. It turns out there's a variable that one can define in LocalSettings.php, called $wgRawHtml. The documentation describes this method as "ugly", and reccommends writing gadgets (using Extension:Gadgets) instead. But heck, it works, I can hide the ugliness in templates, and the security risk of allowing html-editing for this particular site is small. I ended up with adding this:
.hidden { visibility: hidden; }
to Monobook.css, and to include the javascript in the page itself. Since toggling is not really necessary, I just did this:
<html>
<script language="javascript" type="text/javascript">
function showit(id) {
   var ctl = document.getElementById(id);
   ctl.style.visibility="visible";
}
</script>
</html>

What is the air-speed velocity of an unladen swallow? <html><a href="#" onclick="showit('A1'); return false;">&nbsp;(Show)</a></html>
<div id="A1" class="hidden">
What do you mean? An African or European swallow?<html><a href="#" onclick="showit('A2'); return false;">&nbsp;(Show)</a></html>
</div>
<div id="A2" class="hidden">
Huh? I don't know that. Auuuuuugh.
</div>
which has the added benefit of allowing text to appear sequentially. Thanks again! --NorwegianBlue talk 22:04, 20 May 2010 (UTC)[reply]
Update:Moved the javascript to Monobook.js, worked ok. Tried to replace the remaining html with a template {{Showit|A1}}, but this
<html> <a href="#" onclick="showit('{{{1}}}'); return false;">(Show)</a></html>
does not work (Ends up as quoting {{{1}}} insead of A1). Even worse if I move the quotation marks to {{Showit|'A1'}}, then the javascript function isn't called at all. Hardcoding the div names in the template(s) works, though, so I think I'll just write some templates Show1, Show2, Show3, where the parameter is hardcoded. --NorwegianBlue talk 22:19, 20 May 2010 (UTC)[reply]

Microsoft Word grammar checker[edit]

Microsoft Word has a grammar checker which can be configured to run together with the spell checker. Mostly I'm happy with it, but it quite frequently suggests incorrectly that I am using "form" which I mean "from." If I use jargon and the spell checker complains, I can easily press "Add to dictionary." Is there any way to turn off a single rule in the grammar checker?

I do have one hack that I might use, but I am hoping for a cleaner suggestion. My idea is to autocorrect "form" to "fоrm" (with Cyrillic small letter O, Unicode 043E instead of the Latin small letter O, Unicode 006F) and then add that to the dictionary. Matchups 14:10, 20 May 2010 (UTC)[reply]

You can change, edit, or disable any specific autocorrect "fixup" - so if this single autocorrect entry is giving you trouble, just disable it. Create or change automatic corrections, from Microsoft's online Office help. As far as the grammar, this help page details how to "ignore" a grammar rule for an entire document. I'm not certain it can be disabled by default for new documents... Nimur (talk) 14:45, 20 May 2010 (UTC)[reply]
Well that is interesting. The help page says you can press the "Ignore Rule" button, but there is no such button when I get a grammar message, though I am running the same version of Word. As you note, it wouldn't help much anyhow, as I would get the same complaint on the next document. Matchups 16:14, 23 May 2010 (UTC)[reply]
See Microsoft Word Spelling and Grammar Check Demonstration. -- Wavelength (talk) 15:00, 20 May 2010 (UTC)[reply]
I'm sorry, I don't see how this relates to my question. Matchups 16:14, 23 May 2010 (UTC)[reply]

Firefox browser settings[edit]

In the article Pythagoras' theorem combinations like c/ show up that look like d in my browser, so I replaced such occurrences with insertion of thinsp; as in c /. Likewise, superscripts like c2 are jammed into the letter unless c2 is used. I am presently using the settings under Firefox menus Tools/Options/Content/Advanced as follows: Proportional = Serif ; Serif = Times New Roman ; Sans Serif = Arial Unicode MS ; Monocode = Courier New ; Default character encoding = Unicode (UTF-32BE). I've been forced into these choices so that I can see serif fonts and still see some mathematics symbols like the wedge (∧). No choice of fonts I have tried alleviate this problem, which does not occur when using Internet Explorer. Any solutions other than resorting to (that is, <math>c/ \, </math>)? Brews ohare (talk) 16:09, 20 May 2010 (UTC)[reply]

I am also using Firefox under Windows, and I am very happy with the DejaVu fonts. Try installing them and then setting Proportional = Sans Serif ; Sans Serif = DejaVu Sans. Hans Adler 17:32, 20 May 2010 (UTC)[reply]
Hans: I found these fonts here, but I am unclear about how to install them in Firefox. Any suggestions? Brews ohare (talk) 14:49, 21 May 2010 (UTC)[reply]

In general though, you should probably avoid doing such "hacks" in Wikipedia articles. I don't know why your browser is displaying it the way it does, but on mine it is clear—the goal should be to have the content be encoded as straightforwardly as possible, and leave it to the browser to try and display is correctly (or wrongly). We can't anticipate what every browser will do and trying to compensate for one browser could make it display incorrectly for others. Just general advice. --Mr.98 (talk) 20:09, 20 May 2010 (UTC)[reply]

Exporting videos - sync problems[edit]

I've created some short videos using Movie Edit Pro (MEP) - just stuff I downloaded from my DV camcorder with a few on-screen text captions and editing of the original footage to cut out some bits. This plays fine within MEP but when I try and export the videos with the intention of putting them on YouTube, I am having problems.

YouTube says it wants MPEG-4 videos with MP3 audio so I go to File > Export as AVI and select one of the various codecs I have. If I use DivX, it generates an AVI file with '0 seconds' of content, so when you press play, nothing happens. When I use the Microsoft MPEG4 codec, it generates OK but the quality is quite poor and there are sync issues. With XVid, I get good quality video and sound but the audio is way out of sync with the video - I'm not talking a few milliseconds but literally 2-3 seconds out.

What is the problem here and can anyone suggest a way of getting these videos from my computer onto YouTube? I am reluctant to go away from MEP as I would have to edit the videos again if I used a different application. In any case, last time I looked there weren't any decent freeware video editors. I'm not sure MEP is the problem anyway, as I have used it fine in the past. Is it something to do with the codecs? I have downloaded the latest versions of both XVid and DivX. Is it a problem with my computer? As I said, I have exported videos fine using this machine, MEP and DivX before. Is there any way I can export the MPEG-4 files despite them being out of sync and then 'fix' them in another application?

My tech spec: Pentium Dual Core @ 2.40 Ghz, 1Gb RAM, Drive C: 75Gb total 6Gb free, Drive D: 158Gb total 4Gb free (both partitions on the same HDD), ATI Radeon X6150 512Mb RAM, Creative Audigy Platinum sound card.

Now I mention it, I've just realised that my HDDs are almost full...would that have an impact on exporting the videos? Thanks in advance for any suggestions. GaryReggae (talk) 17:49, 20 May 2010 (UTC)[reply]

Youtube uses h264 with AAC for the higher quality formats. More importantly Youtube is able to handle many different compression formats internally. If you had just wanted to cut out parts I would recommend you just use a good editor (like VirtualDub) which generally won't require much recompression. But if you want to add fixed captions you're probably going to have to recompress (although it depends, if you just want to add a few parts here and there you may be able to do it with minimal recompression) however I would recommend you use the same compression format which your original video was in (combined with a high bitrate) which will usually minimise quality loss, unless there's really a reason not to (like the file is too big for you to upload). Failing that, I would recommend x264 instead of XViD. BTW, when do you notice this sync issue? You may want to try playing the file with VLC or just uploading it to Youtube if you haven't already to see if the sync issue is not just a problem with whatever player you are using. Of course you could also export to WMV or whatever you're comfortable with if all else fails, there's a good chance it will work. Note that whatever you upload, Youtube will almost definitely recompress it for all the versions they make available. Nil Einne (talk) 21:44, 20 May 2010 (UTC)[reply]

Pop goes the TV[edit]

My TV has external speakers which make a loud pop when I turn it on or off. What causes this, a voltage spike ? Is there any cure other than turning the volume down before I turn the TV off ? StuRat (talk) 23:37, 20 May 2010 (UTC)[reply]

Is it a CRT television? If it is, it might be as simple as giving it a good clean out, years of dust accumulation can cause issues like this. I've personally resolved similar issues just by cleaning out the insides of old televisions. This can also cause strange picture anomalies like when you get just a white line across the screen or when the picture clicks on and off rapidly when you 1st turn on the tv. That's the 1st thing I'd try since it's quite simple and essentially free to do. However DISCLAIMER you must ensure you are familiar with the dangers of CRTs before attempting anything like this, it's very dangerous and potentially lethal if you go touching things inside a CRT television because there are high voltage capacitors involved, even after you unplug the tv from the mains. So if you've never taken apart any appliances and aren't familiar with electronics seek the aid of someone who is. I know I probably didn't have to explain that to you Sturat.. Vespine (talk) 02:18, 21 May 2010 (UTC)[reply]
It is an old CRT TV, so dust accumulation is likely. However, I don't think it's worth the risk from those capacitors to open it up and clean it out. Also, how exactly does dust cause the pop ? Does it accumulate a static charge, which then discharges to the speakers ? StuRat (talk) 12:39, 21 May 2010 (UTC)[reply]
Loudspeaker pop is common in many devices - there's what seems to be an understandable explanation here [2] (need to know about capacitors) - there are circuits that prevent this pop effect - I don't know much about those eg http://www.google.co.uk/search?hl=en&q=anti+pop+circuit&meta= 77.86.115.45 (talk) 03:08, 21 May 2010 (UTC)[reply]
Is there any way an anti-pop circuit can be added between the TV and the external speakers, or would I have to rewire the TV and/or speakers ? StuRat (talk) 12:57, 21 May 2010 (UTC)[reply]
TV ouput would need rewiring (internally) - though I think a (passive) switch between TV and speakers would work - simply switch off the speakers using the passive switch before turning on or off the TV - this is the way it seems that internal anti-pop circuits work in principle.
(I have a popping speaker too - and though its not perfect - I've come to accept that the pop is not actually damaging to the system - even though it sounds like it is..)77.86.115.45 (talk) 13:12, 21 May 2010 (UTC)[reply]
Well then, I guess I'm back to just turning the volume down before I turn the TV off. StuRat (talk) 04:26, 22 May 2010 (UTC)[reply]
Back a long long time a go ... the way we knew my grandmothers valve gramophone was working was that it popped when it was turned on.. When the gramophone stopped popping we knew it needed repairing .. moral It's a feature not a bug :) 77.86.115.45 (talk) 13:16, 21 May 2010 (UTC)[reply]
Thanks for telling me about your gramma-phone and the grand pop it made. :-) StuRat (talk) 04:30, 22 May 2010 (UTC)[reply]