Wikipedia:Reference desk/Archives/Computing/2013 January 17

Computing desk
< January 16 << Dec | January | Feb >> January 18 >
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.


January 17 edit

Copying an integer to someplace in an array in vb.net edit

It's pretty specific, but I can't find how to to it as fast as I could in Delphi. So this is what I want:

Dim Value As Integer = 238929
Dim Data(218488568) As Byte
Buffer.BlockCopy(Value, 0, Data, 23, 4) 'copy the 4 bytes that represent 238929 to byte 23 in my array

I can't do this because "Value of type 'Integer' cannot be converted to 'System.Array'". What I want is a BlockCopy that doesn't think about what type Value is and I wouldn't want to convert the integer to an array first. Is that possible? Thanks! Joepnl (talk) 00:06, 17 January 2013 (UTC)[reply]

I apologize if I'm missing something obvious (I don't do this sort of byte-level array adjustment), but if you're just setting a value in an array, rather than copying values from an existing array, isn't Buffer.SetByte what you want, rather than BlockCopy? --Mr.98 (talk) 02:27, 17 January 2013 (UTC)[reply]
I'm afraid not, OP does not want to put the value 238929 into a specific byte of the Data array (it couldn't succeed, anyway...) but copy a four-byte block over the array, starting from a given position. And the documentation of BlockCopy says the source area must be an Array, not an Integer. --CiaPan (talk) 09:33, 17 January 2013 (UTC)[reply]
That what I meant, indeed. This works:
Buffer.BlockCopy(BitConverter.GetBytes(Value), 0, Data, 23, 4) 'copy the 4 bytes that represent 238929 to byte 23 in my array
but unless the compiler is very smart and optimizes this, it would first create a useless array. Joepnl (talk) 12:22, 17 January 2013 (UTC)[reply]

Microsoft Office 2010 with Wine on Ubuntu edit

I have Ubuntu 12.04.1 LTS and I wanted to have some version of office (long story). So first I got PlayOnLinux 4.1.9 (the Precise version) and then I selected to install Microsoft Office 2010 Pro and PlayOnLinux downloaded Wine 1.5.21 and whatever else it needed and installed office. Now office is working fine but there are three issues and they aren't major but are kind of annoying. First, when I do start PlayOnLinux 4.1.9, I get the error message "PlayOnLinux is unable to find 32bits OpenGL libraries. You might encounter problems with your games." then click ok and I get the second error message about 64bits OpenGL libraries. What does this mean and how can I fix it? I googled it the answers are just confusing and cryptic. I am guessing it has something to do with my graphics. When I look at the system details of my machine I get the following

Device name whatever
Memory 3.7 GiB
Processor Intel Core i7-2760QM CPU@2.40GHz x 8
Graphics
OS type 64-bit
Disk 488.2 GB

so the graphics field is empty. There is nothing in front of it. In addition, when I look at Graphics tab I see

Driver
Experience Standard

and no other info anywhere that I can find. So what to do? This isn't too big of a problem because I'll be only using it for office, no games or anything. So now office is installed and I have icons on my desktop. When I click them, Word for example starts up, no pop ups, no error messages. It works fine, I can read write documents. Then after creating and saving a .docx document, I tried to right click the .docx document and open it with Microsoft Word, I get an error saying "IOPL not enabled" and the document never opens. I googled it and everyone said to open up wine configuration, go to libraries, add gdiplus and edit it to "Native (Windows)" but this still hasn't fixed the problem. I have no idea what this is or how it is supposed to work but can someone who does, please help. I want to associate .docx (and .pptx and .xlsx) with office so that I just double-click a word document and Microsoft Word opens up with it. Currently I have to start Word and then use it to open up the document. I am not very familiar with linux so hope this isn't too complicated and can be broken down into easy comprehensible steps. Thanks! - Looking for Wisdom and Insight! (talk) 05:32, 17 January 2013 (UTC)[reply]

Does the “long story” consist of nothing at all? It’s hard to imagine a good reason to not just use LibreOffice. ¦ Reisio (talk) 19:18, 17 January 2013 (UTC)[reply]

No reason to be so disdainful. Just because you can't imagine a reason doesn't imply that there isn't one. LibreOffice just doesn't do what I need it to do. It is constantly messing up documents, margins/spaces/formatting/figure placement. Even the size changes considerably if I open up a Word document and just save it without changing anything. I communicate a lot with other people who use Windows and MS Office and I need to open up their documents and they need to open up mine and we would like the documents to be comprehensible when we open them. Hope this "short story" satisfied you. If you want I can post a longer one here too. Your query about my doubtful "long story" is completely irrelevant here. The point is I have no choice but to use linux and MS Office. My question was simply, is there anyway to make file associations work with wine. If you have nothing helpful to say then please refrain from doing so. Trust me, I have tried LibreOffice for more than a year and I (nor others) can deal with it anymore. Let's face it, MS has a monopoly and Office isn't going away. In addition, LibreOffice is not nearly as good as Office. It isn't compatible except for the simplest documents and it isn't going to catch up to office anytime soon. But before this turns into an argument of how good LibreOffice is, does anyone have any ideas what could be going wrong with the file associations here? Any helpful advice would be appreciated. Thanks! - Looking for Wisdom and Insight! (talk) 23:08, 17 January 2013 (UTC)[reply]

All I got from that was that the margins and alignments aren’t 100% the same across interpreters, which seems like not much of a great reason, but as you please. You can make a simple shell script to associate from your DE (frequently by right-clicking on a file type from the file manager), for example:
#!/bin/bash  
Filename="z:"${1//\//\\}  
App='eval WINEPREFIX=/home/kaiser/whereOfficeIsInstalled WINEARCH=win32 wine "C:\Program Files\What\Ever.exe" "'$Filename'"'

$App
For additional Wine tips for Office 2010, consult http://appdb.winehq.org/objectManager.php?sClass=version&iId=17336 ¦ Reisio (talk) 00:52, 18 January 2013 (UTC)[reply]

Pointing domain name edit

Beginner question: I have a dedicated server with a hostname "myserver.myhoster.net". I bought a domain "mydomain.com" at a registrar (not from my hoster). I added myserver.myhoster.net and the DNS server of my hoster as first and second DNS for my domain (that is in the web interface of the registrar). Do I need to do anything else besides waiting until I can do something like "ssh mydomain.com"? For instance do I need to change the hostname of my server? If I "dig mydomain.com" it does not show any ip address. bamse (talk) 08:35, 17 January 2013 (UTC)[reply]

If you set the DNS just now, wait a few hours or overnight for it to propagate. There will also likely be a brief period between now and then where it works only part of the time when you try it, so try multiple times. 67.117.146.66 (talk) 09:00, 17 January 2013 (UTC)[reply]
I set it 12 hours ago, perhaps need to be a bit more patient. bamse (talk) 09:02, 17 January 2013 (UTC)[reply]
I've just moved my hosting and domain registration (separately), and I got a few errors and strange behaviour during the 24 hours following the changes as they propagated. If your website is still not working by now (36 hours later?), you need to check the DNS settings. Your hoster will tell you the exact settings required. Dbfirs 08:35, 18 January 2013 (UTC)[reply]

Hfr blu ray edit

Can blu ray players and tv support 1080p playback at 48fps? — Preceding unsigned comment added by 176.250.205.226 (talk) 19:21, 17 January 2013 (UTC)[reply]

Blu-ray Disc#Video ¦ Reisio (talk) 19:40, 17 January 2013 (UTC)[reply]
Also bear in mind 1080p48 is AFAIK not a standard frame rate supported by HDMI are the current time. 1080P60 is although only starting to be implemented on the output side and not much on the input side [1]. Nil Einne (talk) 17:14, 18 January 2013 (UTC)[reply]