Wikipedia:Reference desk/Archives/Computing/2011 September 29

From Wikipedia, the free encyclopedia
Computing desk
< September 28 << Aug | September | Oct >> September 30 >
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.


September 29[edit]

clip pages from a PDF[edit]

Is there a free or low-cost program (for Windows) to copy a page or range of pages from a PDF to another (PDF) file? Bubba73 You talkin' to me? 00:27, 29 September 2011 (UTC)[reply]

If you're not afraid of the command prompt, you can do this with pdftk. An example from the web site:
pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
copies pages 1–7 of one.pdf, pages 1–5 of two.pdf, and page 8 of one.pdf, in that order, to combined.pdf. There are GUI frontends for pdftk as well. -- BenRG (talk) 01:53, 29 September 2011 (UTC)[reply]
This will probably be used a limited number of times, so command line is probably OK. Thanks. Bubba73 You talkin' to me? 02:04, 29 September 2011 (UTC)[reply]
If the command prompt gets you down, google "pdftk GUI" and you'll find graphical versions of the same program. --Mr.98 (talk) 11:28, 29 September 2011 (UTC)[reply]
Another good tool is PDFfill Tools.You can use it to split, reorder, merge, etc PDF documents. - Akamad (talk) 02:12, 29 September 2011 (UTC)[reply]
Thank you, PFDFill Tools works very nicely.
Resolved
Bubba73 You talkin' to me? 15:36, 29 September 2011 (UTC)[reply]

.com domain names of countries[edit]

Hi, I m wondering if any country can demand to appropriate a .com name with its name ? For my case, tunisie.com where owned by the Tunsian government and used for ben Ali propaganda [1]. But after the Tunsian Revolution, I don't know why, the domain became free and a French company has reserved the domain [2] and created a tourist website (www.tunisie.com). Can the Tunisian government take back the domain name ? How ? --Helmoony (talk) 02:40, 29 September 2011 (UTC)[reply]

Unlikely. This is discussed at Trademark#Domain names, Uniform Domain-Name Dispute-Resolution Policy, Cybersquatting and Anticybersquatting Consumer Protection Act. The legal issues (not policy issues) in France like those involved in AFNIC cases are also relevant since a dispute could be brought under French law if the company currently in control of the domain name is French and the registrar Gandi is also French [3], and we don't really cover that part. Generally, there is some protection for trademarks & service marks and in some places for personal names but no protection for geographical indicators/identifiers. It seems there have been proposal to extend protection to geographical indicators/identifiers but they've been rejected [4] [5]. This seems to be affirmed by recent cases e.g. [6]. From [7] it seems there have been some successful cases with geographical identifiers/indicators but only when trademarks were also involved.
The onlymost likely chance of success I can imagine is if there was something dodgy involving the French company gaining the domain name. For example, if it was transferred by rogue Tunisian government agents to the French company (probably for a payment/bribe) then the Tunisian government may be able to argue the original transfer was illegal and should be reversed but I don't really know how likely that is to succeed. If it was simply a case of the domain name expiring because the government didn't renew it then the only option is likely to be for a negotiated transfer which will depend entirely on the current owner of the domain name.
Edit: Thinking further perhaps I was too quick to dismiss one possible avenue. Since the French do tend to care about geographical identifiers/indicators, it's possible a dispute in a French court will succeed. I can't find much info in English on French law surrounding domain names, in particular whether there's any protection of all geographical identifiers/indicators (as opposed to those like Champagne, Wiener etc that may be specifically protected).I found [8] which suggests there is some protection although it's a bit unclear whether it applies to country names from the summary there and it seems to largely concern .fr domain names. And it's a new law as a result of the old law being overturned in court so hasn't been tested yet. I haven't yet found any recent info on how disputes like those involving .com domain names have been handled in French courts. Note that since the owner appear to be running a legitimate related business from the domain name, this will make a case more difficult.
Nil Einne (talk) 03:51, 29 September 2011 (UTC)[reply]
P.S. I just remembered [9] (admitedly old now) and while looking in to that I also found [10] which reaffirms what I was saying about the unlikelyhood of success for anything other then the possibility under French law or if there was a dodgy transfer.
Nil Einne (talk) 05:13, 29 September 2011 (UTC)[reply]
Thank you a lot. I m gonna make what is necessary to persuade Tunisian authorities to try something legal in France. Thank you a lot for the references. --Helmoony (talk) 22:07, 29 September 2011 (UTC)[reply]

Iteration over an infinite grid[edit]

I have a problem where I need to find a configuration of points on a grid. Instead of trying them manually, I'm trying to test cases with Python until I find a working one. Say I have 4 points. I can't simply nest for-loops, because there is an infinite number of lattice points that the 4th point could go on, and I would never change the other 3 points. How could I properly iterate through these cases? I thought of restricting it to a grid, and if no match is found, increasing the grid by one in each dimension, but that would cause a lot of redundancy, because there are many cases in an n x n grid that would fit in an n-1 x n-1 grid. It'd be possible to exclude those cases, but it'd be great if there were a more elegant solution. Does anyone know of a good method? KyuubiSeal (talk) 04:59, 29 September 2011 (UTC) for j=1 to i;[reply]

Make the limit of each iteration be the current setting of the previous iteration variable:
for i=1 to n;for j=1 to i; for k=1 to j; for l=1 to k do test (i,j,k,l)
or whatever you language syntax is. n can be infinity if it does not matter if you never terminate. Graeme Bartlett (talk) 09:40, 29 September 2011 (UTC)[reply]
That assumes the problem is symmetric in i,j,k,l. You will never test (1,1,1,2), for example, but you don't need to if testing (2,1,1,1) gives you the same answer. For a non-symmetric problem, iterate across points with a constant sum s=i+j+k+l:
for s=0 to n; for i=0 to s;for j=0 to s-i; for k=0 to s-i-j do test (i,j,k,s-i-j-k). Gandalf61 (talk) 10:17, 29 September 2011 (UTC)[reply]
That's really concise. :D Also, it'd work well with recursion, so I don't need to have 8 nested for-loops (2 for each axis). Thanks! KyuubiSeal (talk) 12:47, 29 September 2011 (UTC)[reply]
Can you tell us something about the points and the test performed ? If you know the distance of the points from one another, for example, then a different method might be more efficient. And can the test only be performed with all 4 points, or is there a subtest that could be used to establish that 3 of the points are correct, before adding the 4th ? If so, we could greatly improve the efficiency again. StuRat (talk) 17:04, 29 September 2011 (UTC)[reply]
It's one of the "place n dots to get a rows of b" problems. KyuubiSeal (talk) 17:26, 30 September 2011 (UTC)[reply]

are computer font formats vectors?[edit]

Do opentype and other formats use vectorized system?Exx8 (talk) —Preceding undated comment added 15:07, 29 September 2011 (UTC).[reply]

Yes. Anything based on TrueType is going to be vector based (aka scalable). -- kainaw 15:28, 29 September 2011 (UTC)[reply]
A great majority of TrueType fonts are spline (vector) only, but the TTF and OpenType formats accommodate sbit data, which means multiple scalable data bitmaps can be embedded into the TrueType file, and it's possible to have a TTF that has only bitmap data. This is especially useful for small-size screen fonts where the hand-wrought work of a human designer gives a better result than would the rasterised output generated by evaluating only a spline representation. Being TrueType even bitmap support is rather complicated - bitmap data itself is stored in bdat (or something else with MS stuff), and there's a bunch of other sections in the TTF file format to define mapping etc. of sbit data. This discussion suggests that enabling ClearType (which is the default, I think, for most recent Windows systems with suitable displays) disabled effective rendering of bitmaps embedded in TTFs. I can't find a useful .ttf file dissector, and my cursory attempt to write one myself using FreeType2 foundered on the relevant section of the tutorial not being written yet. If I figure it out tomorrow I'll post something here. It'd be interesting to run it on a recent Windows install and see what fonts, if any, retain sbit data. In particular, is Terminal still bundled with Vista/7 and if so is it still one of the old bitmap-only font formats that shipped with Win98 or is it an sbit TTF. (I don't have windows to hand to look right now). -- 2.122.75.122 (talk) 23:56, 29 September 2011 (UTC) (Finlay McWalter, still logged out)[reply]

Photo sharing website[edit]

I'm looking for a website or service to help me with the following situation: I went on holiday with a group of friends, and we each took a bunch of photographs. I'd like to have everyone share their photos with everyone else, but privately (ie I wouldn't like them to be uploaded to e.g. Facebook). MobileMe used to have a service whereby someone could create a photo album, protected by a password, which anyone who knew the password could access (to see the photos, or download them in one go as a ZIP file) and upload to. Unfortunately, MobileMe is no longer open to new registrations. Do you know of any alternatives? I'm fairly computer literate, but my friends are... less so..., so simplicity would be a plus! :)

Thanks a lot in advance! — QuantumEleven 15:53, 29 September 2011 (UTC)[reply]

I think Flickr should meet your requirements. Any/all pictures uploaded can be marked a private, but available to friends and/or family. You can also create a group which would require a moderator's approval to join. This might be problematic if any of your group already use Flickr, however. --LarryMac | Talk 20:10, 29 September 2011 (UTC)[reply]

Dynamic online polling system?[edit]

My research institute has a student-run seminar series and we want other students to be able to put forward a) topics b) questions to be answered by people presenting the topics and c) votes for topics. Does anyone know of an online polling system that would let us query students in that way? --129.215.47.59 (talk) 16:04, 29 September 2011 (UTC)[reply]