Wikipedia:Reference desk/Archives/Computing/2015 December 4

Source: Wikipedia, the free encyclopedia.
<
Computing
Computing desk
< December 3 << Nov | December | Jan >> December 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.


December 4

Software tool for a paywall

What software tool can be used for implementing a paywall for online content (articles)? One with membership management, query limits for each member, and so on. I don't want just one of those "soft" paywall that news sites implement since a while ago. Those can easily be circumvented. --3dcaddy (talk) 01:16, 4 December 2015 (UTC)[reply]

You probably want to look at something like a content management system (commonly referred to by its initialism, CMS). --71.119.131.184 (talk) 04:12, 4 December 2015 (UTC)[reply]
3dcaddy I'm not sure you need a full blown content management system. Those tools are more for large sites that are being edited by many different people in parallel. It sounds like what you have is a smaller site with content from yourself and a few others. If that is the case most blog tools have options for putting content behind a paywall. I would look at Blogger which is now owned by Google: https://www.blogger.com or Wordpress: https://wordpress.com/ I've never set up a paywall with either tool but I know they both have widgets for credit card payments and also that you can control who can see what content so I think there is a good chance those could do what you want. Just my 2 cents: setting up a paywall is going to be a tough way to make money in most cases. We Internet users are just too spoiled by free content. I know once I hit a paywall I just try to find the info in another way. But of course it all depends on what the content is and who the audience is. Another option is to provide the content for free but include ads on the blog and make money that way. Of course that can always be short circuited by people like me who use Adblock Plus but surprisingly a lot of people don't know about it and ads still work to generate revenue. I know that Blogger provides ways to allow and get money from ads and I'm pretty sure wordpress does as well. Also, if you want a more general purpose tool you might want to check out Google Sites. They also have a credit card widget and could probably implement a paywall. Oh, one other tool I just found but I like a lot is something called Wix: https://www.wix.com I like this tool a LOT. They have templates that just IMO blow away what Google sites or those blogger tools have. The template I'm using is for a cleaning business so I don't know if they have something for what you want to do but I would definitely check them out. The only annoying thing is that they put a small ad for their site at the bottom of your home page. But its not too intrusive and you can get rid of it for a very small upgrade fee (about $12 a month which also gets you other benefits) and IMO its definitely worth it considering how professional their templates look compared to the competition. Hope that was helpful. Good luck. --MadScientistX11 (talk) 14:42, 4 December 2015 (UTC)[reply]
I'd say look for plug-ins, but do not steer clear from CMSs. Drupal at least is very light-weight and easy to manage. It almost sure has a paywall plug-in. Drupal is also offered by several hosting services, and can be installed easily.--Denidi (talk) 19:09, 4 December 2015 (UTC)[reply]

MATLAB multicore CPU usage

Hi, I'm running some simulations in MATLAB (R2012a, 64 bit) on a 4-core CPU in OSX. Today I noticed that the process sometimes is listed at 101-105% CPU usage. Some quick googling suggests that is relative to cores, and that processes taking over 100% is not uncommon. My question, then is: how can I let Matlab use more CPU resources? If my understanding based on the above is correct, then I should be able to have all processes sum to ~400% CPU usage, yet for some reason, even when seemingly CPU-limited, Matlab never takes more than 105%, and the total for all processes seems to never go over ~110%. I'll also add that the process does not seem to be memory limited (using ~10Gb, >1Gb free), and not disk limited (disk read/writes are very low for most of the runtime) Thanks, SemanticMantis (talk) 16:32, 4 December 2015 (UTC)[reply]

Some common linear algebra operations built into MATLAB are already multithreaded. If you are writing your own algorithms, MATLAB provides a threading model called "MATLAB Workers." To get started, read the resources at MATLAB Multicore, from Mathworks.
It has been my experience that most MATLAB programmers write their algorithms as a giant "for loop." This design paradigm lends itself to serial processing - so you won't be able to "magically" use four cores to run an algorithm that you wrote as a loop. (Fundamentally, this paradigm commands one processor to execute and iterate one sequence of operations - the programmer is not explicitly expressing parallelism when writing code in this fashion). However, the fine engineers at Mathworks also noticed this design-trend, so they created "parfor" - the parallelizable for-loop - explained at the Introduction to Parallel Solutions. You'll have to rewrite and/or redesign some code - but it's designed to be less difficult to refactor your existing algorithm in this fashion, rather than switching to a true multi-threaded algorithm. (Note that the example for-loop they provide has no data-dependence and is really a trivial case where substituting the "parfor" keyword caused your loop to run n times faster ... it's not going to be so trivial to get an equivalent speedup if your algorithm actually does real work.)
parfor is designed to be the MATLAB language's keyword that abstracts
SIMD
-style parallelism that efficiently runs on small multicore computers (like your 4-way Intel CPU system). The MATLAB language and host environment also supports other parallel programming paradigms for node-level parallelism, for distributed compute clusters, and so on. As a very high-level language, MATLAB permits you to write and run your parallel algorithm in any of these fashions: you must really expend engineering and design effort to determine whether that parallelism will actually give you a speed-up on your algorithm, running on your target hardware.
Nimur (talk) 17:13, 4 December 2015 (UTC)[reply]
Right, so I guess I don't understand the finer details of multithreading vs. parallel computing. One for loop I'm using is 100% dependent, and I don't think can be parallelized without some serious magic (think N_t+1=F(N_t) in a general sense). On the other hand, I am using another for loop to find a bunch of eigenvalues of matrices that are fairly independent, and I can/should try parfor for that. But with my perhaps simplistic programming, somehow the automatic multithreading is still able to use more than 1 core, even though I don't have explicit parallelism. I guess that extra few percent over 100 can't be altered without specific alteration of the built-in commands I'm using, does that sound right? Good call on parfor though, I got so caught up in the bits that have to be serial that I forgot that one rather intensive bit does not. SemanticMantis (talk) 18:33, 4 December 2015 (UTC)[reply]

Help me parfor please

So I'm having a hard time quickly understanding what syntax parfor allows. Can someone help me get it to work with this example code? I think this must be the type of case where it would help. Thanks, SemanticMantis (talk) 18:51, 4 December 2015 (UTC)[reply]

Sample code - three nested for loops
for step_ind1=1:steps1;
    for step_ind2=1:steps2
        for t_ind=1:sim_time
            dom_eigs(1,step_ind1,step_ind2,t_ind)=max(eig(squeeze(Lambda(1,:,:,step_ind1,step_ind2,t_ind))));
            dom_eigs(2,step_ind1,step_ind2,t_ind)=max(eig(squeeze(Lambda(2,:,:,step_ind1,step_ind2,t_ind))));
        end
    end
end
Resolved

Ok, it was just something simple, matlab doesn't like loop indices to appear in two different lines within a parfor. The code below runs with parfor, perhaps not as well as possible but well enough for me to see performance increases by utilizing multiple cores:

working Sample code - one parfor inside two fors (cannot nest parfors)
for step_ind1=1:steps1;
    for step_ind2=1:steps2
        parfor t_ind=1:sim_time
            dom_eigs(1,step_ind1,step_ind2,t_ind)=max(eig(squeeze(Lambda(1,:,:,step_ind1,step_ind2,t_ind))));
        end    
    end
end 

for step_ind1=1:steps1;
    for step_ind2=1:steps2
        parfor t_ind=1:sim_time
            dom_eigs(2,step_ind1,step_ind2,t_ind)=max(eig(squeeze(Lambda(2,:,:,step_ind1,step_ind2,t_ind))));
        end
    end
end

SemanticMantis (talk) 15:38, 7 December 2015 (UTC)[reply]

A way to use document templates in MS Word?

can we use templates (That will contain some footer-text for example) in MS word? Usage similar to MS Excel templates.

I ask this because I've about 10 documents that all must have the same footer text and I have no intention to change it 10 times manually in any case I want to make a small change in their' footer.

talk) 20:15, 4 December 2015 (UTC)[reply
]

The quick answer is "yes", Word supports templates. You would use the "save as" feature to save your blank document with the desired footers and select "Word Template" in the "save as type" field. Depending on the version, this will create a .dot or .dotx file. You can then open that file in Word, and save it as a regular Word file after making the changes to the rest of the document. There may be more specific instructions based on which version of Word you are using. --LarryMac | Talk 22:05, 4 December 2015 (UTC)[reply]
The .dot/.dotx template just makes MS-Word / Winword not to keep the filename / documentname of the template. Users were required to [Save as…] their doucument. It might be an idea, to attribute the template file as read only to prevent accientially overwriting it. --Hans Haase (有问题吗) 00:02, 5 December 2015 (UTC)[reply]
How could I import the .dot/.dotx text-piece into each word document if I use Word 2016? I just desire to know how to interact the "Text template" I maid (It's a decent way of naming it wouldn't you agree?) with the Regular word doucments...
talk) 04:40, 5 December 2015 (UTC)[reply
]

How does a person "own" a web site name (domain name)?

I saw on E-Bay that a guy was selling off a lot of domain names. (For this discussion, let's say that his name saw Bill.) For example, one domain name was something like "delicious pizza.com" (or something like that). So, it appears that Bill "scoops up" some domain names that might be popular and that someone else might want to buy off of him. So, of course, Bill makes a profit from this venture. So, if I buy it from Bill, I now own it. But, my question is, how did Bill own it to begin with? Where do these names originate and who owns them to begin with? Who owns them, originally? And -- a follow up question -- is every single "name" out there already owned by someone? For example, "delicious pizza 1.com" or "delicious pizza 78.com" or "delicaious pizza USA.com", etc., etc., etc. Is every single combination or permutation of characters already owned by someone? If so, who? If not, how do I originate my own so that I now own it? Say, for example, if I want the name "delicious pizza 83764.com" (or some such) and no one else already owns it. How do I become the owner of it? How does this all work? Thanks. 20:56, 4 December 2015 (UTC) — Preceding unsigned comment added by 2602:252:D13:6D70:6CC2:1D1C:D0F0:9193 (talk)

You probably want to read the
domain registrar. --71.119.131.184 (talk) 22:01, 4 December 2015 (UTC)[reply
]
You might also like to read our article on cybersquatting and this blog. (Are you Fred or Travis Sutherland or Mike or Rick Ross? If not, then if you get in quickly, www.deliciousPiza.com ; deliciousPizza1.com and deliciousPizzaUSA.com are still available for you to register.) Dbfirs 01:40, 5 December 2015 (UTC)[reply]
Oh ... so this whole thing is illegal? I had no idea. If that's the case, why would E-Bay allow these sales? 2602:252:D13:6D70:6CC2:1D1C:D0F0:9193 (talk) 04:25, 5 December 2015 (UTC)[reply]
It's not illegal to sell domain names, but if they were registered in "bad faith" then it is possible to take civil legal action in some countries to transfer ownership to a more "deserving" owner. The legalities are not clear-cut. See
Microsoft vs. MikeRoweSoft for a borderline example. A Chinese company has squatted on a domain name that I failed to renew. I don't think there is any way that I could recover it without buying it back from them. Fortunately, it's not one that I am desperate to recover. Dbfirs 08:26, 5 December 2015 (UTC)[reply
]
Note that there's somewhat of a difference between trademark cases (which includes MikeRoweSoft) and non trademark cases (which I think deliciouspizza probably falls under, particularly if registered long before the trademark existed). Trademark cases have the Uniform Domain-Name Dispute-Resolution Policy which many generic TLD and a number of country code ones submit which can be resolved outside of court. (Although either party can still take court action.) Non trademark cases would always have to rely on local law and a civil case. Nil Einne (talk) 10:11, 5 December 2015 (UTC)[reply]
Owning a domain name, You need to host Your site if You wanna use it. Usually, as the owner of a domain, You order a provider to host it and have Your web designer upload the finished web page to have it online. If You order an other provider to host Your domain, the new provider only will offer Webspace on his servers. You need to transfer or create new pages. Usually Your web designer does, when ordered. You might also do all or some of it Yourself, if You are ready to do so. Providers still offer You suggestions of available domains as a service, You wanna order them to host it for You to make You their customer. In the beginning of the WWW domains containing trademakrs where sold, some made money, some where judged to release the domain containing trademark they do not own and paid the attorneys and the court. As the websearch came, domain names were seen less and less by product, but even more on the site owner. --Hans Haase (有问题吗) 10:25, 5 December 2015 (UTC)[reply]
To be clear, there's usually no need to do anything with a domain (although actually doing something may help if a claim of bad-faith registration comes up). But even if you did want to do something with a domain, there's no requirement you actually host a website (even a redirect) on it. With most domain names, it's perfectly acceptable if you have no
DNAME records and simply have an MX record or whatever, so only use it for mail or something else. Whatever your MX record points to will have an A and/or AAAA record but these don't have to belong to the same domain and typical there is no website behind them only a mail server. (Generally speaking, even if you have an A/AAAA record, it doesn't mean there's a website behind it.) Nil Einne (talk) 03:47, 8 December 2015 (UTC)[reply
]
First you go to a domain name registrar. I recently registered AmbushCanyonGames.com - so I went to my favorite domain registrar (I happen to use DreamHost.com - but there are many others). I typed the name into their registration tool - it said that nobody else had registered the name - so I paid my $9.95 - and now it's mine for as long as I maintain the registration (which costs $9.95 per year). Prices vary between registrars - and some top-level-domains are more expensive than others.
So, you could try to make money by finding names that aren't yet registered - paying to register each one - and hoping to find one that someone else will want to pay $100 for. Obviously, you're taking a risk that nobody will want your names - in which case it cost you a bunch of money for nothing...but when you make a sale, you make a killing.
In practice, the people who do this probably have much cheaper domain name registration services - but still, there is a risk here. They can reduce the risk by picking existing web sites and finding very similar names. So quite soon after registering AmbushCanyonGames.com - I got an email from someone in China trying to sell me AmbushCanyonGames.cn ...since the most obvious ".com" address hadn't existed until I created it - these guys saw that I created it - then went out and registered the ".cn" varient in the hope of getting some cash out of me.
If the domain really matters to you, you might want to short-circuit this trick by going out and registering all of the obvious ".net", ".org", ".co.uk" versions - then all of the most likely typos and spelling mistakes that look like your site. The extent that you do this depends on how important the name is to you - and how deep your pockets are...but it's unlikely you'll find them all.
But if the name you want is already taken - either by a 'real' web site owner or by a cyber-squatter - you'd better start looking for another name - or expect to shell out some cash. I've owned "sjbaker.org" since the very early days of the Internet - but someone else had "sjbaker.com". Every once in a while, I'd go and look at the other sjbaker's web site - then one day, I saw that it no longer existed and was able to jump in and snag that one too. I still habitually use the ".org" name for my email - but a lot of people don't notice ".org" and type ".com" by habit - and it's useful that I can redirect the ".com" domain to ".org".
So - pick a domain registrar that you like - there are hundreds of them - and start typing names that you like until you find one that's free. When you DO find one you like - don't hesitate to register it because many semi-unscrupulous registrars will go out and register the name for themselves if you don't grab it within an hour or two. Domain registrars are a mixed bunch - some *just* register the name for you - others offer web hosting, web site design and other services. Prices for the same domain can vary quite widely between registrars - but if you want to shop around, do it BEFORE you choose your name. SteveBaker (talk) 15:27, 5 December 2015 (UTC)[reply]
Thanks. So, is there one central database that indicates if names are available or unavailable? Or do I have to go to each and every domain name registrar, one by one, to find if a name is available or unavailable? Or do I just type the name into my web browser address box and see what happens? Thanks. 2602:252:D13:6D70:BD83:3784:351:F8B4 (talk) 02:21, 6 December 2015 (UTC)[reply]
You can check with WHOIS. —Tamfang (talk) 08:20, 6 December 2015 (UTC)[reply]
In effect, it's one central database - although the mechanism by which it's maintained is distributed and much more complex than that. But you can treat it as if there was one giant list of who owns what name. Hence you only need to check with one domain registration service. Typing the name into your browser isn't enough - that only tells you whether there is a web site connected to that URL - not whether the name is already registered by someone. As Tamfang points out, you can use one of the many WHOIS lookup services out there - but those are generally made available by domain registration service companies - so it boils down to the same thing. But as I said before - pick one place to go to - check for what you want and register it right then and there if it's available. If you dawdle around and especially if you hop from one domain name registrar to another, you'll find that someone will register it and try to sell it to you for ten times what you could have paid for it if you'd jumped right in. SteveBaker (talk) 16:23, 6 December 2015 (UTC)[reply]
The windfall for owning the right name that someone wants can be quite substantial. In that case, the person who owned pizza.com for 14 years, paying just $20 per year, was able to sell it for $2.6m. Dismas|(talk) 18:32, 5 December 2015 (UTC)[reply]
The history of sex.com is even more horrifying - it was also originally purchased for some very small amount and eventually sold for $14,000,000. That's generally believed to be the most ever paid for a domain name...but the mess over who owned it spiralled way out of control. Fortunately, we have better regulations about that kind of mess these days. SteveBaker (talk) 16:23, 6 December 2015 (UTC)[reply]
It's worth mentioning that "all of the good names are gone". Specifically, it's very rare to find a single english language word that isn't already registered - and most two-word pairs that make any sense are taken (at least in ".com"). Three-word names are easier to get - and nonsense words and acronyms are quite easy to find too - but then you have the problem of people remembering them and hating type them if they are too long. You can very often find names in less-often-used domains - so for example, the URL of my business at http://RenaissanceMiniatures.com is a pain to type - but easy for people to find by guessing - so we wanted to register a shorter version of it - and we found http://renm.us was free - which isn't bad for a six-keystroke URL! Short URLs are tough to find - but far fewer people want to use the country-specific domains (like ".us") that you can often still find nice free entries there. SteveBaker (talk) 16:23, 6 December 2015 (UTC)[reply]
There is a believe (which I believe to be unfounded) that extremely long and descriptive domain names will help in search engine rankings. An organization that I work with hired a PR group to help with "branding." The PR group wanted them to use the domain name carecoordinationinstitute.org. Imagine typing emails to that group every day. 209.149.113.52 (talk) 14:33, 7 December 2015 (UTC)[reply]
Google don't disclose their ranking algorithms - and they change them fairly frequently - so it's hard to be definite about this kind of thing. However, I'm doubtful that they really do improve the rankings of sites with long domain names because they generally work hard to prevent people from being able to affect their rankings other than as an indirect consequence of being a useful web site with good content. If it were true that there was an advantage for longer names then you'd see "http://we_here_at_amazon_sell_books_and_music_and_a_bunch_of_other_stuff.com" - and we don't. SteveBaker (talk) 20:30, 7 December 2015 (UTC)[reply]
Sure, typing CareCoordinationInstitute.org the first few times would be annoying. But once you have all the people that you're going to be emailing there in your history, it's fairly easy to type the first few letters of a person's name. I emailed one guy today whose last name I can't remember how to spell. All I did was type "Mik" and Mike's last name and email address were right there in the list of suggested addresses. Dismas|(talk) 03:37, 8 December 2015 (UTC)[reply]
But what about when I work with 8 different people named Ali, all at different universities? I've sent a hell of a lot of emails to Dr. Hurson when I meant to be emailing Dr. Schwartz, Dr. Wardle, Dr. Ever, etc... 209.149.113.52 (talk) 13:28, 8 December 2015 (UTC)[reply]

Active Directory

How replication happens in AD? — Preceding unsigned comment added by Sanjaytak7 (talkcontribs) 23:20, 4 December 2015 (UTC)[reply]

I assume that you've read Active Directory#Replication and that there is insufficient information there, but it does contain a couple of links that might further your research. Dbfirs 17:59, 5 December 2015 (UTC)[reply]

The latest Firefox version changes attachment download functions

As of the latest Firefox update, email attachments no longer appear or function the same way, and it's not the email program because its tied to when I updated Firefox, and the change is the same when I look at yahoo mail attachments or gmail attachments.

They now appear as much larger icons than previously, and if you click them, they preview rather than downloading. When you put your cursor over them, s small download bar appears as part of the image, so they are giving you the option, but I can no longer just click and download. Anyone know a fix?--108.21.87.129 (talk) 23:36, 4 December 2015 (UTC)[reply]

Do you mean in various webmail clients? I don't think many people use Firefox to access email programs, that's the whole point of them, they're standalone. Nil Einne (talk) 10:53, 5 December 2015 (UTC)[reply]
BTW, if you do mean on webmail clients, I'm pretty sure you're mistaken. This is to do with the webmail client and not your browser. You can sort of tell this by the fact the way this is handled in different webmail clients is different. For example at least for me, Gmail will open a preview in the whole page with the email blacked out in the background. Yahoo will open a preview to the right of the email with the email still visible (you can see the preview in the whole page by clicking on the expand arrows).

Another sign this is coming from the email client is that Google will probably show a save to Google Drive icon, whereas Yahoo obviously doesn't. The third sign is that in Google, your URL will change to something with projector in it.

The fact you're seeing this on multiple webmail clients isn't exactly surprising, this popup/theater/projector style view is all the rage, used by Facebook and other social media and a number of news sites. Even the Wikimedia Foundation controversial introduced it to most of the wikis they manage.

As to why you're only seeing this after a browser upgrade this is more surprising. It could be that the feature requires a browser feature which your old browser didn't have but I'm pretty sure Gmail at least has had this popup preview on Firefox for at least a few versions and you didn't mention you were using a very old version like LTS or whatever, so I presume this isn't the case. Perhaps the more likely alternative is you have a plugin which used to disable this projector view which isn't working anymore.

As to how to change this, I couldn't find mention of a simple setting for Gmail. I'm sure you could find a ScriptMonkey script to disable it, or perhaps a specialised plugin. Note there's no need to click the attachment to get the download link. When you however over the attachment before clicking, in both Gmail and Yahoo, there should be a download button. If you're using a touch screen device I think there's some way too, but I can't remember offhand.(Just noticed you already know that.)

Nil Einne (talk) 13:48, 5 December 2015 (UTC)[reply]

Actually, I guess what you're really complaining about is not so much the popup preview per se, but rather the way you have to hover over to get the download button. At least in Gmail, in the past, the preview was supported but you had to click on on the view button to get it [1] whereas nowadays you get [2] (click on desktop)[3] the larger thumbnails which require you to hover over to downloads instead.

However most of what I said above still applies albeit the specifics are a bit different. You can tell this is function of the webmail client because it's different between clients. On Gmail when you hover over you will generally get the save to Google Drive icon as well as the download one. Yahoo has the download and a somewhat hidden option to save to Dropbox. The thumbnails are also different. Google thumbnails are rectangular and larger than Yahoo ones which are square.

In addition, in Gmail at least the larger thumbnails which require you to hover over to download has I'm pretty sure been supported in a few versions of Firefox.

BTW, one alternative besides scripting to change this behaviour is to actually use a email program like Thunderbird, rather than rely on what the providers webmail client which you have limited control over.

Nil Einne (talk) 14:26, 5 December 2015 (UTC)[reply]