Jump to content

Wikipedia:Reference desk/Archives/Computing/2014 June 29

From Wikipedia, the free encyclopedia
Computing desk
< June 28 << May | June | Jul >> June 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.


June 29

[edit]

Fun ideas for Minecraft.

[edit]

I'm quite new to Minecraft and so are my two children. We've built a few simple buildings and done some exploring, we've not had much experience with redstone, but we've farmed a bit and met some villagers, we've had a few basic bits of fun, and I wanted to secretly build them some stuff to explore. They love puzzles so I wanted to set them small tasks or quizzes that might lead to rewards. I will make them keep it on 'survival mode' when they play it, so they won't have unlimited resources, but I will hide cool stuff like diamonds, weapons, spawning eggs, etc. in chests for them to discover. I have built a maze with a chest in the middle, and I was going to maybe have hidden underground rooms for them to find. Can you think of other fun and simple puzzles or challenges that I could build for them to explore? They are aged 6 and 10. Thanks.

For the six year old, you can have him/her look for alphapet letters, and arrange them in order after finding them, taking them back to his/her own den first. There will be 26, of course, so it will be slightly time consuming. The ten year old could help if you are paying on LAN. Then get the six year old to write words like 'cat' or 'dog' or 'parrot' and then actually create them in Minecraft. You can make anything in that game. This would be educational for the child's phonics and spelling skills, and creating things in games is fun. KägeTorä - () (Chin Wag) 17:08, 29 June 2014 (UTC)[reply]

Thanks. How would I place letters around, so that he could collect them and take them back somewhere? — Preceding unsigned comment added by 146.90.96.186 (talk) 22:48, 29 June 2014 (UTC)[reply]

Excel help

[edit]
A B C D E F G
1 apple orange banana plum melon strawberry
2 1990 4 2 4 5 1 6
3 1995 6 2 2 2 7 4
4 2000 7 9 6 5 3 2
5 2005 8 8 2 6 9 1
6 2010 2 4 8 3 6 6
7 2015 5 8 9 7 8 6

I'm looking for a formula that calculates the sum of the numbers that correspond to a given value in Row 1 and a given range of values in Column A. If those are "banana" and 2000 ≤ x ≤ 2010, the relevant cells are D4, D5, and D6, and the sum is 16. --Theurgist (talk) 02:19, 29 June 2014 (UTC)[reply]

Take a look at the SUMIFS() function. That allows for conditionally summing data based on multiple criteria. Something like =SUMIFS(D:D, A:A, ">=2000", A:A, "<=2010") might be a start. -- Tom N talk/contrib 05:35, 29 June 2014 (UTC)[reply]
@Tcncv: I've already tried that. I want the formula to refer to the value "banana" specifically, or to refer to another cell that contains it. If I change that value from "banana" to "melon", the relevant column must automatically become Column F. --Theurgist (talk) 13:11, 29 June 2014 (UTC)[reply]
There may be other ways, but you can try something like =SUMIFS( OFFSET(Values,0,MATCH(Fruit,Fruits,0)-1,,1), Years, ">="&FromYear, Years, "<="&ThruYear). To avoid a bunch of messy absolute row, column, and range references, I've assigned names to the referenced cells and ranges.
  • Values is the name assigned to the body of the data - $B$2:$G$7
  • Fruits is the name assigned to the column labels - $B$1:$G$1
  • Years is the name assigned to the row labels - $A$2:$A$7
  • Fruit is the name assigned to a cell containing the selected fruit
  • FromYear is the name assigned to a cell containing the year-range lower limit (inclusive)
  • ThruYear is the name assigned to a cell containing the year-range upper limit (inclusive)
The MATCH() function will look-up the fruit, returning a value between 1 and 6. The OFFSET() function will select a single column from the full Values range. The SUMIFS() will then selectively sum the values based on the year criteria.
-- Tom N talk/contrib 18:58, 29 June 2014 (UTC)[reply]
Thank you, that works. --Theurgist (talk) 14:26, 1 July 2014 (UTC)[reply]
The other way to handle this is to use an array formula... with that you would evaluate the conditionals you want and include it in a sum if it met the conditional. There's a few ways to do this. One way is to evaluate the conditional (if statement, say) and assign a 0 or a 1, then multiply that by the sum value... Shadowjams (talk) 04:04, 2 July 2014 (UTC)[reply]

DLL problem

[edit]

I have two DLLs that I'd like to use in an application - let's call them DllA.dll and DllB.dll. DllA.dll is dependent on CommonDll.dll version 1.8, and DllB.dll is dependend on CommonDll.dll version 2.0 - the two versions of CommonDll aren't binary compatible. Is it possible to get DllA to load the old version of CommonDll and DllB to load the new version? What seems to be happening is that the Dlls both load the first version of CommonDll that they can find in the search path, which is the wrong version for one of them. I can build two separate applications, one which uses DllA and has the old version of CommonDll in the application directory, and one which uses DllB and has the new version of CommonDll in the search path, but I'd like, if it's possible, to use both Dlls in the same application. Can I do something with .manifest files, for example? Any hints would be welcome. Tevildo (talk) 09:27, 29 June 2014 (UTC)[reply]

You can use runtime dynamic linking to specify exactly where your provider code should be loaded from, disambiguating any functions that are available in both libraries. However, especially if you have aliased function prototypes, you might need to load and unload the provider libraries many times. This can be inefficient: it would be much better for performance if you could just refactor or revise your software to use the most current shared library throughout your entire project. Nimur (talk) 10:12, 30 June 2014 (UTC)[reply]
True, I can do the following:
  • Load DllA (using LoadLibraryEx to specify the path)
  • Do things with DllA
  • Unload DllA
  • Load DllB (using LoadLibrary, so that we get the default path)
  • Do things with DllB
This is a bit messy, but it'll do for the moment. I was just wondering if it was possible to have both Dlls loaded at the same time. I'm afraid I can't (personally) do anything with DllA to make it work with the new CommonDll. Thanks for your help anyway. Tevildo (talk) 11:26, 30 June 2014 (UTC)[reply]
It is absolutely possible to load both DLLs at the same time. At the systems-level, remember this mantra: any computable task can be implemented, but very few computable tasks are good ideas to implement: particularly, in this case, because most programmers don't want to waste time fighting (or re-implementing) the linker. (Those few programmers who successfully fight the linker and win usually get to name brand new system platforms after their favorite letter, or favorite type of hot drink, or both, or whatever).
In this case, the hard part isn't loading two DLLs simultaneously: the hard part is determining which DLL's implementation will be selected when they share identical function-prototypes - because dynamic libraries on Windows depend on function prototypes as unique identifiers. If you wanted to work around that problem, you can actually add a layer on top of the regular resolution mechanism: you can call GetProcAddress and essentially create your own table of function pointers, using function load address as the unique identifier. This is a more inconvenient key, but it's guaranteed to be more unique than the prototype. Then, instead of calling functions by name, you would call them indirectly using function pointers to the specific library (DLL A, or DLL B). Let me emphasize: this is possible, but it's a very "unclean" software style, and it precludes your operating system (Windows, in this case) from using a lot of the system-level optimizations that make dynamic linking more efficient than static linking. You can use side-by-side assemblies - as you've already discovered, that would involve a manifest file. However, that architecture is intended for load-time (not run-time) dynamic disambiguation between different DLL versions.
At the theoretical level, not all language implementations (or operating systems) are equally affected by this type of dynamic linking problem. If you compare, say, the dynamic linker in most implementations of the Java Virtual Machine - or just look at the language and VM specification, function addresses are resolved by fully qualified package, class, and function name. Large-scale, enterprise VMs have machine-level optimizations for that exact type of resolution. This strategy can make Java a better and more efficient choice when you want to eschew namespace conflicts, and it's one of the reasons why Java code is more efficient in large enterprise-scale server environments where lots of different code shares a giant global process space.
Nimur (talk) 17:52, 30 June 2014 (UTC)[reply]
On the practical level, is there a simple guide on how to set up the manifest file? I'd (obviously) prefer to use static linking if that's possible. The various pages on the Microsoft site describe how to set up manifests for the application, but I (apparently) need to create one for the Dlls that are part of the application. Tevildo (talk) 18:01, 30 June 2014 (UTC)[reply]
Side-by-side Assemblies Reference, though if your DLL is directly calling LoadLibrary(Ex) internally - and you can't change its source-code - you might not be able to control this granularity of behavior. Nimur (talk) 19:08, 30 June 2014 (UTC)[reply]
If I were in your situation, I would probably open DllA.dll and DllB.dll in a hex editor and change the CommonDll references in the import tables to something unique like CommonDlA and CommonDlB. -- BenRG (talk) 06:46, 1 July 2014 (UTC)[reply]
It's a good thing you don't write managed code that must self-identify using a code-signature or checksum or a TPM hardware/software integrity check , BenRG! Never try that kind of shenanigan if you want to deploy your software for customers in the defense or government or banking industries - or any operating system that checks and enforces runtime program-binary identity! Nimur (talk) 23:43, 1 July 2014 (UTC)[reply]
Well, if it doesn't work, it doesn't work. If it does work, it has the virtue of being simple.
Any solution to this problem is fundamentally a hack, since the goal is to load two versions of the same library into the same process, and the library was not designed to support that (otherwise it would be a SxS assembly already, or have a versioned file name). If you're lucky it will work, but there's no guarantee that it won't, for example, use the process ID to generate a unique name for a temporary file. -- BenRG (talk) 02:12, 2 July 2014 (UTC)[reply]
This thread is about a nearly identical problem, and one of the answers has a sample manifest file. -- BenRG (talk) 02:12, 2 July 2014 (UTC)[reply]
Thanks for the link. I've tried manually editing the DLL, and it does in fact work, but "You may not amend or alter the Software and shall have no right or licence other than that stipulated herein.", and I think this counts as "amending" it. I'll see if I can put together a manifest file as described. Tevildo (talk) 17:09, 2 July 2014 (UTC)[reply]
Not legal advice for the various obvious reasons, and your talk page vaguely suggests UK jurisdiction, but for the US see Title 17 §117, which authorizes certain copies and adaptations of software as necessary to make it function. --Tardis (talk) 04:03, 4 July 2014 (UTC)[reply]

Mistake

[edit]

I don't know what I have done, but my antivirus program said you have some bad files on your computer, we want to remove them, do you allow it, and I said yes and now suddenly have MSN as a search engine coming up everywhere, where it was Google before, such crap. What have I done wrong? How do I get rid of this MSN search engine? I want Google back.Hafspajen (talk) 12:58, 29 June 2014 (UTC)[reply]

When you ask for help with a computer problem, you should try to give information as precisely as possible. In this case everything you have told us is vague: you haven't told us what antivirus program you use, you haven't given us the actual message about bad files that you saw, and you haven't specified the way that MSN actually shows up as a search engine. You also haven't told us what browser you use. With such vague information, all we can do is guess at the nature of the problem. My guess is that your default search engine has somehow been changed. You can probably change it back by changing a setting in your browser, but the exact way to do it depends on which browser you use. Try going to google.com and search for "change default search engine in XXX" where XXX is the name of your browser, and you will probably be able to find instructions. Looie496 (talk) 13:58, 29 June 2014 (UTC)[reply]

OK, fixed, thanks. Hafspajen (talk) 14:26, 29 June 2014 (UTC)[reply]

I wonder what antivirus program you use. I wouldn't trust one that came up with such a vague message, then made unrequested changes. Are you sure that the message was from your antivirus program and not from some malware or advertising popup? Dbfirs 13:54, 1 July 2014 (UTC)[reply]

Youtube

[edit]

Is there a way on my Youtube account that I can get a channel to display all of its videos without having to click load more videos all the time? --Andrew 15:54, 29 June 2014 (UTC)[reply]

iTunes is broken so can't play m4a files

[edit]

I have an account with iTunes, but since the start of this year every time iTunes upgrades it fails to install (I'm on Windows Vista) and I have to uninstall then reinstall. It's got to the point now where it even fails to uninstall, so I'm left with a valid account with iTunes, a load of songs I've legally purchased from iTunes, but no software to play them on. The .m4a files will play on VLC, but the .m4p ones won't play on anything but iTunes. I can't even burn them to CD because I need iTunes to do that. Any suggestions? --Nicknack009 (talk) 16:38, 29 June 2014 (UTC)[reply]

The advice here might help. Thincat (talk) 10:46, 30 June 2014 (UTC)[reply]
That was the wrong problem. However, that page links to this page, the second item of which is the right problem. After uninstalling seven separate programs, rebooting and deleting a load of folders, I was able to successfully reinstall iTunes. I will now burn all my .m4p files to disk before the next upgrade buggers everything up again.

Uploading OGV but it's blocking it, saying that it is an OGX extension

[edit]

I'm attempting to upload an OGV, I've checked the extension and it is OGV, but when I try it says it is an OGX which isn't an accepted file type. Any advice? Darkwarriorblake / SEXY ACTION TALK PAGE! 21:32, 29 June 2014 (UTC)[reply]

The file extension tells very little about the file format or content. The server is probably correct: your file uses some unsupported extension that the server doesn't recognize. What does a video tool, like ffmpeg, say is in the file?
You might also find the help page on Converting Video useful. Finally, if you get frustrated by Ogg Video, chime in on the appropriate talk pages - or file a bug report - so that Wikimedia Foundation gets the message: they insist on using a video format and server-side software that is unnecessarily obtuse because of the Wikimedia Foundation's particular interpretation of the phrase "royalty-free" free software. Ironically, their interpretation of the word "free" places additional restrictions on the types of video technology Wikipedia users may use to view and create multimedia content, instead of liberating users to use video software in any way they want. This policy choice circuitously defeats the point of choosing an "open standards" video format, and it definitely makes video on Wikipedia unnecessarily complicated for normal users - you are not the only one who suffers! Nimur (talk) 10:04, 30 June 2014 (UTC)[reply]
OTOH, imposing restrictions on the uploader might be a wiser choice than on the downloader, mainly because there's a chance that the uploader has a deeper understanding of the video formats than the downloader (end user). Youtube keeps giving me tardfaces, and they're usually for crazy reasons, including "Your browser is too old (>6 weeks)"; with tighter format control, most of these issues wouldn't come up.
OTOH^2, I'm an end user when it comes to video, so I'm quite COIed on the topic...
Unfortunately, Wikipedia itself doesn't have much info on the .ogx extension, besides "multiplexed Ogg". - ¡Ouch! (hurt me / more pain) 07:27, 1 July 2014 (UTC)[reply]