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

= June 2 =

Wikipedia article file names
Let's take https://en.wikipedia.org/wiki/Uniform_resource_locator as an example. In my rudimentary knowledge of the URL, there would be a  directory and in that would be another directory named. Would there then be an index.html file or index.php file in that directory? If so, which one, html or php? I realize that the actual content of the article is pulled from a database. I'm just interested in the hierarchy and the file name though. Thanks, Dismas |(talk) 05:50, 2 June 2014 (UTC)
 * Note that the part in the URL after the first slash (in this case, " ") can be interpreted in any way the web server chooses, it doesn't have to be a physical file path. I am not a WikiMedia developer, but I would guess there's simply a PHP script that receives the name of the article and fetches it from the database. There probably aren't separate directories and files for every single article. J I P  &#124; Talk 06:11, 2 June 2014 (UTC)
 * JIP is correct. In fact, most installations of MediaWiki do not map each page to a unique file or directory.  Instead, individual wiki pages map to database entries in a relational database (like MySQL or PostgreSQL).  That relational database may commit data to the filesystem by any method, but it is uncommon for each data entry to have a one-to-one mapping with the filesystem.  Super-large installations - like Wikia or Wikipedia - have a little extra complexity, because there are multiple layers of cache services, proxy services, load balancers, database federation, and so on.  (Just to be very clear about terminology: Wikipedia is the world's largest and probably the most heavily customized running instance of MediaWiki, which is software you can run on your own server.  Wikipedia has a team of engineers who customize the MediaWiki server software, and they keep it hooked up to the world's largest MediaWiki content database, and it's been running for years as a scaled service across many machine-instances and through many versions of software-updates... so it has a few "quirks" that are not as well-documented as a clean, fresh installation).
 * Commonly, MediaWiki servers use Apache httpd's mod_rewrite feature to map URLs to unique queries - and to hide the ".php" extension. This is documented as Short URLs in the MediaWiki manual.  The result is that a query is sent to the webserver, with the page title as an argument, requesting the main MediaWiki PHP index script.  (For recent versions of MediaWiki, that index is a real file in your web server directory at location w/index.php but if you're picky about your webserver folder structure, it can be moved to other sub-directories, or reconfigured: even Wikipedia moves that directory to wiki/index.php).  The PHP script then dynamically generates hypertext content based on a database query.  Nimur (talk) 06:47, 2 June 2014 (UTC)
 * Specifically, it is mapped to https://en.wikipedia.org/w/index.php?title=Uniform_resource_locator, which is a PHP script, and it is given one parameter "title", with the value "Uniform_resource_locator", it does accept other parameter/value pairs. CS Miller (talk) 08:56, 2 June 2014 (UTC)

Microsoft
When Microsoft was still small but growing big, how did Bill Gates manage to buy out all the other shareholders? Surely they could see like he could that the company was rocketing to success. Did he employ underhand tactics to make them sell? — Preceding unsigned comment added by Modeltrainsets (talk • contribs) 10:59, 2 June 2014 (UTC)
 * There were no shareholders when Microsoft was still small. It didn't go public until 1986. See History of Microsoft. Mitch Ames (talk) 11:50, 2 June 2014 (UTC)
 * A recurring theme in technology entrepreneurship is the difficult choice an inventor must make between raising money to run the business and keeping creative and financial control. If you can not afford to pay your employees, they may leave, and you might not be able to stay in business.  If you let a super-billionaire "donate" to your creative enterprise, he might send the goons after you as soon as he thinks it's more profitable.  One of Silicon Valley's smartest and most vindictive solutions - according to the 2011 documentary Something Ventured - was to pay the employee salaries using cash advances on your girlfriend's credit card and then fire her.  Despite their canonization by the mass media, technology entrepreneurs are pretty horrible people.  Arguably, Bill Gates is a lot more ethical than the executive team at Cisco; (and Bill Gates is also still happily married).
 * In the case of Microsoft, Bill Gates retained financial control from a very early stage by becoming profitable before leveraging his company assets to raise more capital. Nimur (talk) 15:41, 2 June 2014 (UTC)


 * Think the OP may be best answered by reading The Microsoft File : The Secret Case Against Bill Gates. The author outlines (often times in detail) all the dirty dealing MS did in order to become a monopoly.--Aspro (talk) 17:09, 2 June 2014 (UTC)

Simulink
Hellow! I need a box in Simulink, that at first accepts a constant as input, and later accepts the output of a computation of another box. Something like this: a = 1; b = a*2; a = b+1; b = a*2; How can I do this in Simulink? 77.125.164.49 (talk) 15:03, 2 June 2014 (UTC)


 * This tutorial might be helpful. SemanticMantis (talk) 15:21, 2 June 2014 (UTC)


 * There are switching blocks that can be used to select between two signals if you need to switch from a constant to another source. They will be in the signal routing category. A manual switch is the simplest if you don't mind clicking to switch. Otherwise you'll need something to trigger it, such as a step source configured to rise at the right time. K ati e R  (talk) 18:02, 2 June 2014 (UTC)


 * I also suggest contacting their support or having your account rep put you in touch with someone there - in my experience the staff is very knowledgeable and can help explain things and point you towards free tutorials and webinars that they think will help you out. K ati e R  (talk) 13:50, 6 June 2014 (UTC)

JPEG metadata in MS Visual Studio with 'System.Windows.Media.Imaging'
I'm using VS express 2013, and want to access\edit jpeg metadata. From what I can find, it looks like the best way is by using the classes 'JpegBitmapDecoder', 'BitmapImage', etc from the 'System.Windows.Media.Imaging' namespace.

If this is right, what 'reference' do I need to include to access the 'System.Windows.Media.Imaging' namespace?

MSDN says this is in the PresentationCore (in PresentationCore.dll) assembly, but I cant find this!

Any idea what namespace or assembly I should reference, or dll to use?

Apologies if this is the wrong place to ask this, I've tried searching Wikipedia, msdn, google etc. with no luck. Any advice would be really appreciated - this is driving me crazy!

Many Thanks, Andy — Preceding unsigned comment added by 31.122.115.65 (talk) 18:30, 2 June 2014 (UTC)


 * You may want the "metadata" property of Imaging's BitmapSource class. 87.115.60.38 (talk) 18:42, 2 June 2014 (UTC)

Thanks! I think you're right - but when I try 'BitmapSource' or 'System.Windows.Media.Imaging.BitmapSource' in my code I get a not defined error! Any idea how to get past this? Andy — Preceding unsigned comment added by 31.122.115.65 (talk) 19:02, 2 June 2014 (UTC)


 * You may simply not have the requisite assemblies loaded into your project (in addition to PresentationCore you need WindowsBase and System.Xaml). I wrote this simple app that prints some properties:


 * -- Finlay McWalterᚠTalk 21:37, 2 June 2014 (UTC)


 * As to how to add the necessary assemblies to your project: in VS2013:  PROJECT->ADD_REFERENCE, and in the assemblies/framework section check the three assemblies I list above. -- Finlay McWalterᚠTalk 21:54, 2 June 2014 (UTC)

Finlay, this works great! Huge thx for ur help - much appreciated! Andy — Preceding unsigned comment added by 213.205.240.249 (talk) 11:33, 4 June 2014 (UTC)

Computer mice
Are computer mice in other languages still named after rodents or is being named after cheese-eaters an English thing only? 88.167.253.167 (talk) 22:08, 2 June 2014 (UTC)
 * It's definitely souris in French and raton in Spanish. It's Maus in German, too, complete with an expression 'kaufen per Mausclick' to mean online shopping. AlexTiefling (talk) 22:12, 2 June 2014 (UTC)


 * See wikidata:Q7987 for our articles in different languages. There are clearly a lot of mouse spellings in languages using Latin script. Probably also in other scripts but I cannot tell. PrimeHunter (talk) 22:42, 2 June 2014 (UTC)
 * I tried to infer, for each language of that list, whether it uses a calque or a direct borrowing. I count 49 calques, 16 borrowings (including Arabic, Hindi, Japanese, Urdu, Italian(!)), two that use a more literal expression like 'computer pointer', and 22 that I cannot assign – because I can't transliterate and didn't find a path from the term to the rodent. —Tamfang (talk) 09:50, 3 June 2014 (UTC)


 * Compare to our mouse (animal) articles at wikidata:Q39275 to see that many languages use the same word, including scripts I cannot read. PrimeHunter (talk) 22:51, 2 June 2014 (UTC)


 * Tangent: When the pointing devices first came out, people called them mouses.  I still like that better; makes a clean separation from the small mammal, and it's a normal linguistic process for words to regularize when they take on a completely new meaning like that.  But unfortunately mice seems to have caught on. --Trovatore (talk) 23:02, 2 June 2014 (UTC)