Jump to content

Wikipedia:Reference desk/Archives/Computing/2016 October 12

From Wikipedia, the free encyclopedia
Computing desk
< October 11 << Sep | October | Nov >> October 13 >
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.


October 12[edit]

CSF-LFD and Modsecurity[edit]

I understand that there's a common combination in the open source community to defend servers which is CSF-LFD + Modsecurity.

My question is actually comprised of these two, 1. Can we say that both are WAFs? 2. is it true that in contrast to Modsecurity that works both in the packet and app layer --- CSF-LFD works only on the app layer? Ben-Yeudith (talk) 00:23, 12 October 2016 (UTC)[reply]

Moronic R question[edit]

Every basic guide to the R programming language says that sum(1:5) is 15. For me, using 3.1.2 from 2014-10-31, sum(1:5) is Error in sum(1:5) : argument "b" is missing, with no default. It will only sum two vectors! I don't see anything about sum() being changed in the [file:///C:/R-3.1.2/doc/manual/R-FAQ.html R FAQ]; in fact, they give an example "1 - Sum(R[i]^2) / Sum((y[i])^2)" that appears to use it this way. What's going on? Wnt (talk) 11:33, 12 October 2016 (UTC)[reply]

I just downloaded version 3.3.1 from June of this year, told it to install with default options, and sum(1:5) still doesn't work, with the same error. Wnt (talk) 12:37, 12 October 2016 (UTC)[reply]

Are you using it on the command line? Or do you have an IDE? I wonder if something weird is going on with your character encoding. Like this ':' is a regular colon but this '¦' is not. And if you're putting in the wrong symbol by accident, R will give confusing errors. Just a guess, you can rule it out if you are able to to other things with that syntax in R. Does '1:5' spit out '1 2 3 4 5' as it should? Also you may like to use R-fiddle [1] online to check the function of your installation. SemanticMantis (talk) 13:45, 12 October 2016 (UTC)[reply]
Yes: [1] 1 2 3 4 5 is the output. I'm using it on the command line by opening RGui(64-bit) or the 32-bit version. I have closed it several times saying not to save workspace image, though each time I open it it says workspace image restored. I tried r-fiddle but it isn't immediately obvious how to use this to test my system. It works there as it should though. Is it possible that installing some package I forgot about some time back when using the other version somehow mangled how sum() is processed?? Wnt (talk) 14:06, 12 October 2016 (UTC)[reply]
Hm. I just meant that r-fiddle works properly, and you can use its output to test whether some specific command is working properly on your system. I'm actually not that familiar with R, but I have seen weird character issues pop up so I thought I'd mention it. Another thing you might do is look at the source code being pulled by sum, as described here [2] [3]. Looks like maybe sum is defined in summary.c [4]. Honestly, that' all I've got, and if your install is fairly fresh anyway, I'd probably give up and do a clean install if I couldn't fix it within the hour :) SemanticMantis (talk) 14:29, 12 October 2016 (UTC)[reply]
Well, I ran uninstall on 3.1.2 and 3.3.1, deleted the folders (the 3.1.2 had a lot of leftover stuff in the library), and re-downloaded and reinstalled 3.3.1, and it has the same problem as ever. Is there any cleaner way to uninstall it? Wnt (talk) 19:19, 12 October 2016 (UTC)[reply]
Yikes, looks like the uninstall is leaving crap behind. It's likely due to their concept of what is the "system" install and what is your "user" install. Try looking for the libpaths and deleting them manually as described here [5]. I'm assuming Windows OS, and that if you do science and R on windows, you have Cygwin already, right? Here's some instructions for where some things are hidden/stored in other OS [6]. SemanticMantis (talk) 19:57, 12 October 2016 (UTC)[reply]
The only .libpaths() result is in the newly installed directory. I never had RStudio installed. I also never set up Cygwin on this computer though I've used it on others. Wnt (talk) 00:52, 13 October 2016 (UTC)[reply]
OMFG, I finally found the problem, and it was indeed really moronic. Above I mentioned it kept finding a workspace even though I didn't save it. Turned out the workspace (which oddly, seemed to have a blank filename), when I checked, was in a "Documents" folder, and it included some hinky user-defined "sum" function! Probably dated back to when I was first screwing around with the program and just typed something in. I'd basically been using R on this machine as a desktop calculator, and didn't notice. I guess that must be the default location for the workspace (I certainly didn't custom set it) so when the new copy was installed it found the same old workspace. Wnt (talk) 01:05, 13 October 2016 (UTC)[reply]
Ha! well I'm glad you figured it out. Maybe chide your past self for being a bit cavalier on overloading :) SemanticMantis (talk) 02:24, 13 October 2016 (UTC)[reply]

Help:Special characters[edit]

Hi,

Despite trying to follow the directions on Help:Special_characters#Viewing, i was unable to make the Chi_(letter)#Latin_chi appear in Firefox 4901 on Vista Home Premium SP2. All i see is a box (with AB above S3 - would be interested to know what that stands for) despite changing the default font to Arial Unicode MS.

I was unable to follow the directions choose one of the Unicode options (for example, "Unicode (UTF-32BE)") or "Arabic (ISO-8859-6)" in the 'Default character encoding' box. because i have nothing like that in the dropdown box. In fact, i don't even have a 'Default character encoding' box, but i guess that's the same as my "Fallback Text Encoding" box. That dropdown box's list starts with Arabic and ends with Vietnamese + Other.

I interpreted An alternative is to switch font to 'Arial Unicode MS'. to mean: An alternative is to switch the default font to 'Arial Unicode MS' in the previous view, before clicking on "Advanced".

I wasn't able to find any directions for Android. On Chrome for Android, the Greek chi on Voiceless_uvular_fricative looks exactly like a normal English x. Thanks for helping. --Espoo (talk) 12:06, 12 October 2016 (UTC)[reply]

The box in Firefox actually says "AB" above "53". AB53 is the hexadecimal value of the character in Unicode. This is the number your browser receives. If Firefox doesn't know how to display the character with that number then it just displays the number itself in a box. Other browsers may do other things like displaying an empty square or other fixed symbol without the number. I also see AB53 in Firefox and haven't looked for a font able to display the character. http://r12a.github.io/apps/conversion/ (unrelated to Wikipedia or MediaWiki) can display characters as images if you copy-paste them to the "Characters" field and click "View in Uniview". PrimeHunter (talk) 14:31, 12 October 2016 (UTC)[reply]
Thanks for the workaround and the explanation of the box's cryptic content. Are the directions for Firefox, especially the part about choose one of the Unicode options (for example, "Unicode (UTF-32BE)") or "Arabic (ISO-8859-6)" for an older version or just plain wrong? --Espoo (talk) 23:26, 12 October 2016 (UTC)[reply]

Migrating a plugin and its licence between Wordpress sites[edit]

A while back, I had a Wordpress site built for a business I was running at the time, which is now defunct. The site included use of a paid-for plugin, which the dev set up with his multiple-user licence key. I've since lost touch with him (and yes I spent quite a while Googling and browsing Linkedin, he really seems to have vanished) but he told me at the time I'd permanently bought one use of the plugin. I reactivated the old site just now and confirmed it still works there.

Is there a way I can move the plugin, in its current licenced state, to a new Wordpress site I'm building myself on a different domain? There's no obvious way of exporting the licence key from within my old site. I plan to take the old site permanently offline once I've made the switch, btw. 192.76.8.23 (talk) 13:41, 12 October 2016 (UTC)[reply]

Volunteer programmers?[edit]

I work for an academic non-profit focused on climate change and related issues. Over the years, we've occasionally recruited students and volunteers to work on simple tasks. However, we've nearly always gotten people involved by knowing them in person or having someone approach us after hearing one of us talk in person. Recently we've been talking about creating some additional web-based tools to help better communicate with the public. In the future, we may apply for some grant funding to support this work, but at the moment we have a negligible budget for this. I'm wondering if there are any forums for recruiting web developers who might be willing to volunteer their time to an environmentally conscious effort? Obviously, there is always a risk of getting what one pays for, but we've had decent luck with students in the past, and some people do enjoy just having the chance to work on interesting projects (e.g. many open source projects). Realizing of course that most programmers prefer to be paid, are there good ways to reach out to people who might be willing to volunteer some of their time? Dragons flight (talk) 13:53, 12 October 2016 (UTC)[reply]

Colour me interested Dragons flight - what's this for? As for forums, I'm not so sure - I normally only volunteer time to projects I'm interested in already, or come across on GitHub..if anything the company does is up there services such as https://www.codetriage.com/ may be an option -- samtar talk or stalk 13:59, 12 October 2016 (UTC)[reply]
We generate a lot of data. The two most important datasets are a global temperature dataset, updated monthly [7] (last month was the warmest September ever), and an real-time air quality data set updated hourly [8]. We have provided data on climate change by location, e.g. [9][10], but those regional pages are not presently maintained and were never very modern to begin with. One project would be working to update the way the temperature data is presented. For air quality, the only highly visible air data product is the map I linked above, but we would also like to develop tools for presenting that data at fixed locations over time (e.g. cities and monitoring stations). Given the utility of real-time air quality data, we've also talked about making a mobile-friendly presentation at some point. So, basically, we have a lot of data which exists on the backend and is used internally for various purposes, but we'd like find ways to communicate it to a larger audience. I could imagine a couple different independent projects, but our greatest interest right now is on creating new tools to deal with the air quality data. Dragons flight (talk) 18:35, 12 October 2016 (UTC)[reply]
Yes, there are growing number. Social Coder springs to mind. What would help (or rather necessary) is if you can define a real-world experience which they can go on to add to their CV . Thus, creating an attractive and mutual win-win contract, which also keeps it professional. Then the is also Ncvo, etc. --Aspro (talk) 14:22, 12 October 2016 (UTC)[reply]
Have you thought about offering unpaid academic internships? This is actually one of the few cases where that is probably entirely legitimate. Could be as easy as tacking up some fliers at the computer science building. 20:00, 12 October 2016 (UTC)

Help opening files[edit]

I'm attempting to download survey data from the ANES website, specifically their "ANES Time Series Cumulative Data File (1948-2012)"[11]. I have been simply unable to find any meaningful data shifting through any of the files. Is there anything I need to download, or something I can do to actually access the data? Spirit of Eagle (talk) 20:10, 12 October 2016 (UTC)[reply]

This is some heavy-grade research data. It will *not* be terribly easy to skim. The "raw data" download has an ASCII text file, and there are also files for Stata (.dta) or SPSS(.sav).
Here [12] are some instructions for taking the .dta file type and converting it to .csv using R_(programming language), which is at least free. Here [13] are instructions on how to convert the .sav filetype to .csv. Excel can open .csv. If you read the code book, it is conceivably possible that a simple search and replace might turn the "raw data" into a csv, as it appears to be using pipes ('|') characters instead of commas to separate values.
R can read .dta directly, sometimes [14], as well as .sav, sometimes [15].
So it looks like R is maybe the best option, but it will be a long road if you don't already know a bit about data wrangling in general and some other programming language. Good luck! SemanticMantis (talk) 21:43, 12 October 2016 (UTC)[reply]
Thank you for the help. I'm familiar enough with data to make use of what is available, but less so with programing. I'll try to get this figured out so can get into it. Spirit of Eagle (talk) 22:08, 13 October 2016 (UTC)[reply]