Jump to content

Wikipedia:Reference desk/Archives/Computing/2013 July 16

From Wikipedia, the free encyclopedia
Computing desk
< July 15 << Jun | July | Aug >> July 17 >
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.


July 16[edit]

Recommendation for a fast disk burner?[edit]

My external burner just went kaput. I now want to get a new one, but wanted to know if anyone can recommend one that will be faster. Willing to spend extra for the speed. The one that just died was an LG Portable Super Multi Drive, model GP10NB20 and I bought it randomly off the Internet (not complaining; it was a workhorse, I used it a ton, and it was very cheap). But I want something really fast. Must work with a mac, which is what I have. Any ideas?--108.46.106.40 (talk) 01:29, 16 July 2013 (UTC)[reply]

The GP10NB20 appears to be a DVD writer and DVD writer speed is basically irrelevant nowadays for internal burners. I suspect it's the same for external ones. I would worry more about writing quality and media compatibility (of course if you always use specific media like MCC004 or something, only compatibility with that media matters) than anything else although the relative unpopularity amongst experienced users and extreme commodity nature of burners nowadays means from what I say last time I looked, actual data on these is far harder to come by nowadays. Nil Einne (talk) 02:42, 16 July 2013 (UTC)[reply]

Regular expression to convert C code braces to indentation[edit]

Is is possible to convert C code braces to indentation using regular expressions? Czech is Cyrillized (talk) 03:17, 16 July 2013 (UTC)[reply]

Yes, depending on the nesting, it could be quite simple. If you could define the C code brace standard you're talking about that'd be a start. Most C code has a rough formality to it, but not to the point where you oculd assume there's some universal method. Shadowjams (talk) 06:23, 16 July 2013 (UTC)[reply]
I presume you are looking to pretty up C code by fixing the indentation. Many integrated development environments you might use to develop your code, includes tools to tidy up the code indentation. If this is the purpose, it could be considerably easier then trying to write your own code tidy-er. Astronaut (talk) 11:30, 16 July 2013 (UTC)[reply]
Regular expressions could be the magic wand, but if you don't want a few nasty bugs and don't want to use a Rosetta Stone after a few years to find out what the programmer actually meant, about 5 lines of code in any language would fix that for you. Joepnl (talk) 20:47, 16 July 2013 (UTC)[reply]
indent (Unix) 209.131.76.183 (talk) 11:43, 17 July 2013 (UTC)[reply]
Sorry, I just noticed you specifically asked about regular expressions. For the basic method of { means indent one notch further, } means indent one notch less, you don't even need regular expressions. They will come in handy when you want to ignore brackets in string constants and comments. However, if you want to properly indent code that doesn't have brackets you'll be in trouble. Even a simple parser can be difficult to get right - there is an ambiguity in the grammar about how you should handle nested if/then/else's. If you're asking because you're interested in putting the functionality into a program you're writing, a good search term is "prettyprint." I expect there are libraries out there that will do the hard work for you. 209.131.76.183 (talk) 11:47, 18 July 2013 (UTC)[reply]

How to hide watched YouTube videos from search results?[edit]

Hi, every few days I'm searching for videos on a certain topic (squash games if you're interested...). Most of the times I'd like to watch videos I haven't watched before, however YouTube displays the same videos over and over again for the search.

Is there any browser extension or another method that gives an option to hide the already watched videos (e.g. the ones in my history list)? Gil_mo (talk) 04:10, 16 July 2013 (UTC)[reply]

This Google Chrome extension apparently does this. Good luck! --Yellow1996 (talk) 16:14, 16 July 2013 (UTC)[reply]
Unfortunately this extension only removes watched videos from the home-feed suggestions, not from the search. Nice try though... Gil_mo (talk) 05:25, 17 July 2013 (UTC)[reply]
I found another one called Better Tube, but unfortunately it does the same thing as the other one; not what you want. It looks as though that's the only area that these extensions can remove watched videos from. Hopefully someone else can find a fix... good luck. :) --Yellow1996 (talk) 17:33, 17 July 2013 (UTC)[reply]

Live exchange rates into a spreadsheet[edit]

Is there any way to get the Google exchange rates or other reliable exchange rates into a spreadsheet so that it will update daily online? Without slowing the computer down, encountering malware, or other disadvantages? Thanks. Itsmejudith (talk) 12:01, 16 July 2013 (UTC)[reply]

  • Google Drive spreadsheets have a function "ImportHtml(URL, query, index)" that pulls data from a web page into the spreadsheet. The "Query" field is "table" or "list" and the index is just an integer. Trial and error will find the data you need. "=ImportHtml("http://www.x-rates.com/table/?from=USD&amount=1", "table", 0)" extracts a table of exchange rates from x-rates.com. Google drive spreadsheets seem to be based on OpenOffice.org's spreadsheet "Calc". Richard-of-Earth (talk) 19:10, 16 July 2013 (UTC)[reply]
Thanks. I'm working in Excel at the moment but presumably can open my existing spreadsheet in Google Drive. Will have a go. Itsmejudith (talk) 20:00, 16 July 2013 (UTC)[reply]
Can Excel's scripting pull in a webquery into a cell? CS Miller (talk) 21:35, 17 July 2013 (UTC)[reply]

Need a freeware spreadsheet[edit]

I urgently need to enter some data in a simple spreadsheet, but the Excel spreadsheet on the notebook I have to use in the field is "locked up" because they lost the "product key" so it was never verified as being on the computer when it came out of the box. So basically I need a spreadsheet program on which I can enter several hundred rows of data with perhaps six columns, the data consisting of numbers and text in different columns, and then sort based on some of the data fields. I need to be able to export the data to a thumbdrive in some simple format like comma delimited ASCII and then I would like to be able to import it to legit Excel programs on other computers. I do not need any whistles and bell like formulas, graphs, charts, or fancy fonts and other razzle-dazzle formatting. The first Google Search result for freeware spreadsheet is "Kingsoft Spreadsheets Free 2012 (8.1.0.3030)" Are they a trustworthy software provider, or has someone found a better freeware spreadsheet? (I don't want to download a trojan horse or virus, or glitchy software which loses my input efforts.). Thanks. Edison (talk) 15:15, 16 July 2013 (UTC)[reply]

LibreOffice-Calc or its close relative OpenOffice-Calc are free and open source; they're fairly heavyweight (they're pretty much on par with Excel). Or you can use Google Docs online, assuming the field in question has internet access. -- Finlay McWalterTalk 15:44, 16 July 2013 (UTC)[reply]
Thanks for the recommendation. LibreOffice-Calc was easy to download and more than satisfies my needs. Mark this one "Resolved." Edison (talk) 16:48, 16 July 2013 (UTC)[reply]
Resolved

Allow me! :) --Yellow1996 (talk) 16:58, 16 July 2013 (UTC)[reply]

How can I prevent image links from grabbing my information?[edit]

For example http://www.ipnow.org/ receives much information and generates a picture. If someone post an image of this site somewhere I guess I would sent my IP and all kinds of information there once I see the image.

I just found changing user agent by developer tools in Chrome and IE, but I needed to change the user agent every time I open a new window, is there a way to configure user agent once and for all?

I guess prevent my computer send information to those sites would be a easy way--just change the hosts will do that. Just ask: is the hosts way 100% secure?

In addition, which infomation in http://www.ipnow.org/ must be send to see the website? How can I remove unnecessary information such as "You Came From: "?--128.237.207.243 (talk) 20:45, 16 July 2013 (UTC)[reply]

  • "You came from" is derived from the HTTP referer header; you can disable that (e.g.) in Chrome by doing this.
  • Details about your browser and OS are from the User agent header; you can find plugins for every modern browser - google for "firefox user agent switcher" etc.
  • Other stuff (your IP, isp details) they get from the TCP connection; TCP wouldn't work without that stuff. You can use an HTTP proxy or a virtual private network; but then the proxy or VPN knows about every site you visit.
None of these things are "unnecessary information", and expect to break things when you start to disable browser features like this. -- Finlay McWalterTalk 21:01, 16 July 2013 (UTC)[reply]
Can I prevent the site from getting my plugin information (http://www.ipnow.org/plugins.php)?--128.237.207.243 (talk) 21:14, 16 July 2013 (UTC)[reply]
How about the language info? I don't see that in the user agent header, so where does it come from?--128.237.207.243 (talk) 21:19, 16 July 2013 (UTC)[reply]
Besides User agent header, are there anything different in browsers that help a system identify what the browser is?--128.237.207.243 (talk) 21:25, 16 July 2013 (UTC)[reply]
The browser can be identified client-side by Javascript through various means. There are also various bugs that can be used to hide some stuff from various browsers, and Internet Explorer has conditional comments which could all conceivably be used to identify the browser server side - Javascript fairly easily through direct communication to the server, the others by having some files load only under some circumstances.
You can use Proxomitron to look at your outgoing HTTP request and see what kind of information is sent and received, and to modify any header you'd like in various ways. There may be more recent software that does the same thing. 64.201.173.145 (talk) 23:33, 16 July 2013 (UTC)[reply]

Possible meanings of '**'[edit]

Hello, I've been handed some code snippets in an unknown language. The confusing part looks like this:

HEIGHT=(4+EXP(3+(-1.5)*(DBHI**-0.6)))*0.3;
It seems that ** is either a unary operator, or perhaps the relevant string is '**-'? My first guess was that it represented a unary "squaring" operator, but that must be wrong (Height should be non-decreasing in DBHI). I'm also fairly sure this code is correct, in some language. Any suggestions? Thanks!

SemanticMantis (talk) 21:57, 16 July 2013 (UTC)[reply]

** is the exponentiation operator in Pascal, so DBHI-0.6
But Pascal uses := for "becomes equal", so you'd expect it to be HEIGHT:=(4+EXP(... -- Finlay McWalterTalk 22:06, 16 July 2013 (UTC)[reply]
It's also exponentiation in Python, which uses the C-like = for "becomes equal" -- Finlay McWalterTalk 22:08, 16 July 2013 (UTC)[reply]
You'd also need to know what the EXP function is; presumably EXP(x) means ex . Python's EXP function (math.exp) is almost always spelled lower case. So your code may be old Fortran (e.g. FORTRAN 77) which was back when FORTRAN still used lots of CAPITALS for things and FORTRAN programs read like lists of demands from the bossy computer in The Forbin Project. Again ** is exponentiation in FORTRAN77, and EXP(x) is ex in FORTRAN77 ref. -- Finlay McWalterTalk 22:26, 16 July 2013 (UTC)[reply]
Yes, FORTRAN 77 is a likely candidate, and also seems to explain the odd CAPS as well as **. Thanks! I'll have to wait until tomorrow to see if that interpretation produces the expected/reasonable output. SemanticMantis (talk) 22:43, 16 July 2013 (UTC)[reply]
I had Wolfram Alpha graph it here. -- Finlay McWalterTalk 23:56, 16 July 2013 (UTC)[reply]
That is Fortran and means "to the power of", so it means DBHI-0.6. Bubba73 You talkin' to me? 22:55, 16 July 2013 (UTC)[reply]
Resolved

FORTRAN it is! Now I'm able to translate the code to my system, and things are going well. Thanks again to Finlay for his help! SemanticMantis (talk) 15:08, 17 July 2013 (UTC)[reply]