Wikipedia:Reference desk/Archives/Computing/2009 May 4

= May 4 =

edit swf
I don't think this is possible, but is there any possible way to download an .swf flash file and view/edit its source? -- penubag  (talk) 00:31, 4 May 2009 (UTC)
 * You can use a flash decompiler (e.g., Flash Decompiler Trillix), which will convert the .swf to one or more .fla files, which can be opened in Adobe Flash Professional. It doesn't work as well as editing the original source files, though.--24.9.71.198 (talk) 01:15, 4 May 2009 (UTC)
 * Thank you! Thanks just what I was looking for! -- penubag  (talk) 01:42, 5 May 2009 (UTC)

div/mod in C?
in Haskell and Standard ML, they have two sets of integer division and remainder functions: Other languages seem divided on this. In C and Java, it seems that signed integer division and remainder are the second kind (i.e. truncating towards 0, and remainder has same sign as first argument). In Python and Ruby however, they seem to use the first kind. What is the easiest way to do the "div" and "mod" operations in C? --206.72.77.76 (talk) 02:21, 4 May 2009 (UTC)
 * 1) div / mod - div is integer division truncated towards negative infinity; and   is , or equivalently,   is the remainder with the same sign as
 * 2) quot / rem - quot is integer division truncated towards 0; and   is , or equivalently,   is the remainder with the same sign as


 * You know that / in C++ will truncate towards zero. You want it to truncate towards negative infinity.  Correct?  It seems to me that it would be very simple to use a ternary operator: quot = a<0 ? (a-1)/b : a/b; -- k a i n a w &trade; 03:02, 4 May 2009 (UTC)


 * Except that the actual sign of the remainder is implementation-defined. I suggest making a simple function that also checks the sign. decltype (talk) 06:55, 4 May 2009 (UTC)


 * It's not implementation-defined though. According to the C99 standard, the division operation is defined to truncate towards 0. And the remainder is defined such that . So it has to have the sign of the first operand. --76.167.241.45 (talk) 08:14, 4 May 2009 (UTC)


 * Correct. I was responding to Kainaw, who gave his example in C++. The OP mentioned C, which in practice often means C89/90. decltype (talk) 07:29, 5 May 2009 (UTC)


 * Here's the best I can come up with:


 * If you know b > 0 then you can shorten things considerably:


 * You have to be careful when writing these things because of integer wraparound. For example,  wouldn't work in place of  . I think this will correctly handle the weird boundary cases like b == INT_MIN. -- BenRG (talk) 21:58, 4 May 2009 (UTC)

XP non-admin account vs. Power control panel
So on my XP machine, the account with administrator rights (let's call it "XAdmin") has the "Power" control panel set up such that the display is never automatically turned off. On the account that lacks administrator rights (let's call this "XUser"), the "Power" control panel shows that the display is automatically turned off after 20 minutes. From the XUser account, clicking the popup menu that changes this 20-minute setting causes an "Access Denied" dialog box to appear.

Is this behavior working as it's supposed to? Does the machine have a single setting for this configuration item, and it applies no matter what users are logged in? Currently the display indeed does not ever turn off - why does XUser show it as turning off after 20 minutes? (I would not care much about this except that I'm trying to diagnose a problem where if the computer is configured to turn off the monitor, sometimes it seems to crash while the monitor is off.) Thanks in advance - Tempshill (talk) 03:53, 4 May 2009 (UTC)


 * I also run non-administrator, and certain things just don't work right, because Microsoft wrote them that way. The "access denied" box is very familiar -- just like when you try to open the system time. - mako 05:21, 7 May 2009 (UTC)

Promote software?
What is the best way I can promote my software (get lots of users)? I've tried submitting it to Softpedia and MajorGeeks but that doesn't increase downloads much (except when there are updates). It's hosted on SourceForge, if that helps. Any ideas? --wj32 t/c 09:36, 4 May 2009 (UTC)
 * Having them on good-name download sites provides the potential user with good comparisons between similar products. BUT you must have your own site as well. A simple blog or free web page is enough. Check the developers' sites for some other programs from Majorgeeks. These sites give a description of the program, often include a change-log of updates and fixes, and form the user manual and FAQ for the program. On some, the developer actually personally provides tech support for individual queries. Such a page increases the search engine hits that mention your product (look into how to tag the page for more hits). You can also ask users to put a mention of your product on their blog or site. And you can mention your product on forums about related topics (but do not spam them).KoolerStill (talk) 13:06, 4 May 2009 (UTC)
 * I use software having websites with nice URLs and easily available license information. Many users prefer to use packages from their own GNU/Linux distribution, adding it to some popular ones should help. MTM (talk) 19:35, 4 May 2009 (UTC)

Restricting access to all but 2 websites
I would like to know if it's possible to set Internet Explorer (I don't know which version, I havent't seen the computer yet. I do now it comes with Windows XP SP3) to prevent access to all but Mozilla Firefox's and Ubuntu Linux's website. I need to access these two websites in order to download a live distro.

On a sidenote, as a user without administrator priviledges in Microsoft Windows XP SP3, am I allowed to download files? I know I won't be allowed to execute them, but what about downloading? -- 219.101.253.98 (talk) 09:50, 4 May 2009 (UTC)


 * I can't specifically help with XP, but this is what I did using vista. it might work in XP.


 * I set up my kids Firefox running on vista so it only goes to a few sites. Go to windows user accounts, click on manage another account, choose the account you want to set the restrictions on(in this case my kids account), then click on 'set up parental controls'. Then click on 'Windows web filter', then click 'edit the allow and block' list. Now you can put in only the sites that you want, remembering to put /* at the end of the address, for example 'www.bbc.co.uk/*' will allow access to all of the bbc, but nothing else. It doesn't matter if my kids use firefox, or explorer, or somehow get hold of another browser, they can not get to any other sites other than those on the list. Well, they've not figured out a way so far.121.220.220.12 (talk) 11:50, 4 May 2009 (UTC)


 * Why would you want to block all but two websites?--Xp54321 (Hello! • Contribs ) 01:09, 5 May 2009 (UTC)


 * It's what people call a "practical joke". -- Hoary (talk) 01:15, 5 May 2009 (UTC)


 * Thanks for the info! I thing this feature can only be found on Windows Vista, but I'll give it a shot anyway.
 * And no, it's not a practical joke, I just don't want to run the risk of running into malware and such things. Call it paranoia, if you will, but never a practical joke. I am, after all, the only person who uses this computer anyway... -- 219.101.253.98 (talk) 02:17, 5 May 2009 (UTC)

problem in c++ program
Hey! can someone please sort out the problem with this program?? Thanks in advance.--59.103.12.232 (talk) 10:52, 4 May 2009 (UTC)


 * You could start by initializing the variable c to something before using it. Bendono (talk) 11:02, 4 May 2009 (UTC)


 * (Formatted the code). --wj32 t/c 11:19, 4 May 2009 (UTC)


 * Also in the second for loop... You are checking for n to be less than another value. Then, you decrement n.  For the loop to start, n must be smaller than c.  Then, you make n even smaller.  It will be difficult for this loop to ever run to completion.  It is more likely that n will get smaller and smaller and smaller until the int wraps. -- k a i n a <font color='#0000ff'>w &trade; 11:36, 4 May 2009 (UTC)


 * The program is ill-formed because  does not return  . What was the program supposed to do? <span style="font-family:monospace, monospace;">decltype (talk) 07:35, 5 May 2009 (UTC)

My website
This is my website. I would like to know how to add meta tags to it so that i can optimize it for search. [Link to website] Thanks! —Preceding unsigned comment added by Duality32 (talk • contribs) 14:16, 4 May 2009 (UTC)


 * Well, for one thing, editing the RefDesk talk header is not the answer. -- Coneslayer (talk) 14:27, 4 May 2009 (UTC)
 * Nor is using your talk page for spam--<font color="Blue">Jac <font color="Green">16888 Talk 14:29, 4 May 2009 (UTC)
 * Have a look at our article about meta tags. See if that helps at all. – Elliott (Talk|Cont)   18:13, 4 May 2009 (UTC)


 * Most crawlers do little with meta tags as far as I can see, mainly because user-reported data about what your website contains is not usually accurate. --98.217.14.211 (talk) 12:55, 5 May 2009 (UTC)


 * Yea, Meta tags are sort of an obsolete technology. Great in 1998. But now search engines pretty much ignore them and try to base their listings on the pages' content. APL (talk) 19:48, 5 May 2009 (UTC)

Downloading embedded videos
Is there any way to download this? I don't want to download this specific video but I was wondering if it is possible to download this type of media? Thanks! --217.227.68.197 (talk) 15:43, 4 May 2009 (UTC)
 * Using Real Player you can download videos from websites easily. But be sure to check the copyrights of the website you are downloading from. – Elliott (Talk|Cont)   16:04, 4 May 2009 (UTC)
 * For some reason that doesn't seem to be working...--217.227.68.197 (talk) 17:05, 4 May 2009 (UTC)
 * After installing it you have to restart your internet broser. Once that has been completed load the video, move your mouse over it and near the top (top right corner) of the video you will see a real player toolbar popup. clicking that will allow you to download that video. You can also just right-click on that video and choose 'Download this video to RealPlayer" at the bottom of the list. Now if it matters i am using winXP w/ Firefox. If you are using something different please let us know.– Elliott (Talk|Cont)   17:09, 4 May 2009 (UTC)
 * I'm using Vista and I have now tried with Google Chrome, IE 7 and Firefox but to no avail. I get the realplayer toolbar and I can click it and it loads and then says that it's not possible! Thanks for your help, though! --217.227.68.197 (talk) 18:11, 4 May 2009 (UTC)
 * Try it on YouTube(or another website that shows videos), If it works then we know that the website you are trying must have protections on it. If it does not work maybe you downloaded the one for windows XP.– Elliott (Talk|Cont)   18:15, 4 May 2009 (UTC)
 * It has worked! Thanks! Is the quality always quite bad? --217.227.68.197 (talk) 18:58, 4 May 2009 (UTC)
 * I dont know about the quality but i think there might be an option in Realplayer to change that... – Elliott (Talk|Cont)   19:01, 4 May 2009 (UTC)

Flash Videos in Ubuntu 9.04
I just upgraded to Ubuntu 9.04 and i am having a problem watching flash videos full screen. They just seem really jumpy and laggy. This was not happening in 8.10. Initially i just thought it was a problem with the upgrade so i wiped my hard drive and did a fresh install of 9.04. I am still having that problem. This is on a Dell latitude D610. I have noticed this problem on Hulu, YouTube, And Adult Swim, I have not tried anywhere else. Any help would be greatly appreciated. – Elliott (Talk|Cont)   17:24, 4 May 2009 (UTC)
 * Does this ubuntu bug posting help at all? There are several solutions tried in it. -- JSBillings  21:43, 4 May 2009 (UTC)
 * Yes, thank you – Elliott (Talk|Cont)   04:17, 5 May 2009 (UTC)

TI 89 Titanium list sorting
Are there any list-sorting routines built into the TI 89 Titanium that can be used in functions, not just in programs? --Lucas Brown 42 (talk) 17:38, 4 May 2009 (UTC)