Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Content deleted Content added
Doorknob747 (talk | contribs)
Line 374: Line 374:
see one question i asked before.
see one question i asked before.
please help[[User:Doorknob747|Doorknob747]] ([[User talk:Doorknob747|talk]]) 16:29, 25 March 2015 (UTC)
please help[[User:Doorknob747|Doorknob747]] ([[User talk:Doorknob747|talk]]) 16:29, 25 March 2015 (UTC)

*There is not a single question mark in your post, do you have a question? If you'd like us to look at a previous question, please link to it. [[User:SemanticMantis|SemanticMantis]] ([[User talk:SemanticMantis|talk]]) 18:30, 25 March 2015 (UTC)

Revision as of 18:30, 25 March 2015

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


March 20

C follows B - inspired by music?

The name C# is, by intention, a higher-pitched C. Some C#-textbooks claim that this pattern of "upgrading the note" was started already when C was named after B, but this seems to find little support in sources about the history of C. Was music an inspiration back then or rather not? --KnightMove (talk) 11:22, 20 March 2015 (UTC)[reply]

The # can be geometrically decomposed into 4 small crosses, so possibly it might read here 'plus-plus PLUS PLUS', after C++...? --CiaPan (talk) 11:58, 20 March 2015 (UTC)[reply]
Note the above is a pure OR...
That's indeed another common interpretation of the # - there might have been a merger of the two motivations. However, this is not directly related to my question. --KnightMove (talk) 12:08, 20 March 2015 (UTC)[reply]
You are making a leap of logic to assume that C is named after B. It is not certain that B is named after BCPL. There was no A (and it is silly to assume that BCPL is named after ALGOL). While there are myths that Ritchie named his languages B and then C and would then continue to D if he made another one, Ritchie, himself, has never verified anything. When I saw him speak in the 80's, he was specifically asked where he got the name C from. He said (joking) that he submitted the improvement on B as his PhD thesis and he got a C on it, so he decided to name the language C. That is, of course, completely false - but it demonstrates that Ritchie is not stating where he got the name from. So... You are taking a "best guess" at the name of C and assuming that Microsoft made C# the same way. It is more likely that they just wanted a character that is easy to type and wasn't already reserved. I assume they tried C!, C*, and C^ before settling on C#. It would make more sense if they went with C$. 209.149.113.207 (talk) 13:12, 20 March 2015 (UTC)[reply]
First, as to B, it was invented and named, not by Dennis Ritchie, but by Ken Thompson. Ritchie says here that "Thompson decided that Unix... needed a system programming language. After a rapidly scuttled attempt at Fortran, he created instead a language of his own, which he called B. B can be thought of as C without types; more accurately, it is BCPL squeezed into 8K bytes of memory and filtered through Thompson's brain. Its name most probably represents a contraction of BCPL, though an alternate theory holds that it derives from Bon [Thompson 69], an unrelated language created by Thompson during the Multics days. Bon in turn was named either after his wife Bonnie, or (according to an encyclopedia quotation in its manual), after a religion whose rituals involve the murmuring of magic formulas." Thompson had a strong taste for brevity, as is shown in the design of the language as well as its name (another famous example was the spelling of the UNIX system call creat without a final "e"), and it's just his style to go with a one-letter name, all the more so if there were multiple associations possible; I would have guessed that Bell Labs itself would be another.
As to C, what more explanation is needed than that it was the letter after B? --65.94.50.15 (talk) 14:25, 20 March 2015 (UTC)[reply]
Well, sure, but do you mean the letter after B in the alphabet, or in "BCPL"? As the C FAQ list notes, there was speculation at one time, if only partly seriously, over whether C's successor would be D or P. --Steve Summit (talk) 07:43, 21 March 2015 (UTC)[reply]
Well I think either way, it would seem there's no reason to bring music in to it. Perhaps this came in to play for Microsoft's decision on what to call C#, but I don't see any particular reason to think it could come in to play for C coming after B in general. Nil Einne (talk) 12:42, 25 March 2015 (UTC)[reply]

Internet Interruption

If the Internet were to be temporarily down is there a way to interface to informational files on your server? regards, John Wilson - — Preceding unsigned comment added by 70.162.44.40 (talk) 13:06, 20 March 2015 (UTC)[reply]

I don't think the whole internet has ever been completely down, even temporarily, but I assume that you are asking about the Wikipedia servers, of which there are many, and the answer is that even if all of them were down at the same time, there are other unofficial (and perhaps out-of-date) copies worldwide. If it is your own internet service that is down (in Tucson, Arizona?) then you might be able to access Wikipedia by tethering your mobile phone to your computer, or just travelling to another area. Dbfirs 18:48, 20 March 2015 (UTC)[reply]
A full scale nuclear war could pretty much take the Internet down, between destruction of servers, communication lines, and electricity sources, due to blast damage, electromagnetic pulses, and lack of people to keep them operational or repair them. StuRat (talk) 07:05, 21 March 2015 (UTC) [reply]

Chrome issues

Apologies if this is the wrong place. I have Windows Vista and use Google Chrome. A few days ago, I think Chrome updated and now the text on this site seems to have shrunk. The bar at the top (toolbar/taskbar?) where all the tabs are has now turned blue. I don't think this is a Vista problem, as I used Safari to open Wikipedia and the text was as it should be (I use MonoBook btw). I can't seem to find anything about these issues anywhere and wondered if anyone had any insight/advice on how to get things back to 'normal'. Thank you. - JuneGloom07 Talk 19:26, 20 March 2015 (UTC)[reply]

This support page] tells how to adjust the display text size, but does your Chrome not retain this setting? Dbfirs 20:53, 20 March 2015 (UTC)[reply]
I guess not in this case, I'm not sure. That didn't seem to work though, all the other pages changed but Wikipedia. Strange, but I guess I can live with it. Thank you! - JuneGloom07 Talk 02:18, 21 March 2015 (UTC)[reply]
If you adjust the page scaling in Chrome with CTRL + and CTRL -, does that fix the text size issue ? StuRat (talk) 07:08, 21 March 2015 (UTC)[reply]
MS had a Vista update that affected text quality; see 3037639. --  Gadget850 talk 19:06, 21 March 2015 (UTC)[reply]

March 21

Transfer music from iPhone 4 to latest iPod

23 years working in IT and I have been trying to resolve this with the help (?) of Google and Youtube since 5am this morning (it's now nearly 4pm where we live)

Husband has an iPhone 4 (I think) with lots of music on it. Daughter has a new iPod (not sure what model but the latest) bought for her birthday.

I want to get the music from the iPhone onto daughter's iPod (so she can annoy the heck out of us with One Direction songs).

I've somehow managed to sync the applications (although not all have downloaded as the iPod is 16 gig and the phone is 32 gig) - am assuming that's the problem. Unfortunately Candy Crush has downloaded so that's a whole new set of stress!

I have been reading these boards for the past few months (one of the few sites not blocked in work) when work is slow and I am throwing myself at your mercy. Please, please, please can someone give me some simple unambiguous instructions on how to do it?

If anyone can help I promise to help improve the Encyclopedia starting with working on the article about our current location (please don't reveal based on IP) which definitely needs some work. I'll even sign up for a user account if I can think of a snappy name!

217.164.75.123 (talk) 11:31, 21 March 2015 (UTC)[reply]

Apple usually makes things easy, but I've gotten the impression that it's deliberately hard (if not impossible) to get music off of an iPod (and perhaps also an iPhone), because of course they (and more importantly the music companies they're licensing music from) don't want you sharing music that way.
I have successfully gotten music off of an iPod by mounting it as a USB disk and copying the music files to my computer, then reimporting them into iTunes. But this was a somewhat dicey process which I am not necessarily recommending for the faint of heart. Also I'm pretty sure I've noticed that when mounting an iPhone as a USB disk, the music files do not show up, again presumably to discourage this kind of sharing.
(Obligatory disclaimer: even if you can get it to work, copying music files freely in this way may violate the terms of your iTunes, iPhone, or iPod licenses, and the as-yet-unratified 28th Nothing-Is-Unconstitutional-When-It-Comes-To-Protecting-Copyright Amendment to the U.S. Constitution.)
The obvious thing to do would be to mount the iPhone in iTunes, drag the music you want from the iPhone to iTunes, then mount the iPod, and drag the music to the iPod. (Me, I prefer manually dragging just the music i want to transfer, so I try to always uncheck the "automatically sync device" option. Your preferences may vary.)
Anyway, sorry not to have provided any "simple unambiguous instructions" -- although I'm not sure there are any in this case. --Steve Summit (talk) 19:11, 21 March 2015 (UTC)[reply]
Thank you so much for taking the time to answer. It's a similar one to that I got from a contact back in the UK. Unfortunately it's completely immaterial now as my husband decided I was obviously being a stupid female and decided he'd take over and managed to completely wipe all the music from the phone, sigh. 2.50.167.60 (talk) 09:34, 22 March 2015 (UTC)[reply]
This is troubling. You should not allow anybody to promulgate the idea that you are any less qualified to understand or operate your technology on account of your gender. There may be many reasons why the technology fails to serve your needs - Steve Summit has excellently explained some of these reasons - but it is not fair to blame the problems on you. Next time, direct your husband's attention to our Wikipedia article on logical fallacy. Nimur (talk) 15:53, 22 March 2015 (UTC)[reply]

Photo management software

I have a rather large photo collection (~100,000 items), and have been trying to find ways to better manage it. I have previously been using Windows Live Photo Gallery for tagging, and it generally works fairly well, however it's got to the stage where I have so many tags I can't keep track of them, and there are little things which annoy me, for instance heirarchical tagging is only useful for a limited number of characters before it's impossible to tell what tag you're adding because the lowest granularity won't fit in the dropdown.

What I want is a photo management software with the following features:

  • People tagging
  • Heirarchical tagging which automatically adds all parent tags
  • Heirarchical tagging with multiple parents, along the lines of the Wiki category system, where eg "London Underground" might be found within "Railways" and "London".

I don't need image editing capability (I already use Photoshop for that).

Does anyone know any good software I can use? -mattbuck (Talk) 13:30, 21 March 2015 (UTC)[reply]

I use digiKam. In resent years, it has improved to the point that it does everything that you can probably wish for. digikam features--Aspro (talk) 13:47, 21 March 2015 (UTC)[reply]
Hm, I just tried the latest version, using only ~200 photos, and it crashes if you try and resize the left side bar. I think I'll have to give this one a miss. -mattbuck (Talk) 18:03, 21 March 2015 (UTC)[reply]
why is it, that when a widows approved app crashes it OK because its the bestest software in the whole universe but when a non-widows app crashes its something to steer clear of? Just asking.--Aspro (talk) 21:24, 21 March 2015 (UTC)[reply]
This is a nice example of an interesting linguistic phenomenon. Not uncommonly, the words "why is it that" often actually mean "I don't like it that" or "It's unfair that". --Steve Summit (talk) 22:26, 21 March 2015 (UTC)[reply]
OK then, rephrase: For what reason?--Aspro (talk) 02:04, 22 March 2015 (UTC)[reply]
I'll answer on your talk page, because I don't want to distract from this thread further. --Steve Summit (talk) 06:53, 22 March 2015 (UTC)[reply]
[Apologies for the above distraction -- please don't let it deter you from posting other examples of photo-management software. I'm interested, too --Steve Summit (talk) 06:53, 22 March 2015 (UTC)][reply]
Thinks what steve meant was: “please don't let it deter other editors from posting other examples of photo-management software.” The word “You” addresses the original OP. This is a not a nice example of an interesting linguistic phenomenon but a failure of..... – “Oh! I can't be bothered to ague out this silly nitpicking toss that steve is trying to engage me in--Aspro (talk) 21:28, 22 March 2015 (UTC)[reply]
Picasa is one I've seen people use before. It didn't seem to bad but I don't use it myself so I have no idea if it has any of the features you mentioned. Image organiser has a list. BTW, I can't speak for others but if software crashes on the first go, I may give it another go, try an older version, or do a quick search to see if there's anything obviously wrong, but if it happens again very fast when I try the same thing, I'll probably give up on it too, whether it's free or paid, unless it has something I'm desperate for. (If it's paid and I actually paid for it, I'll may ask for support and if they can't help, a refund.) Not sure why people would or should forgive software if it keeps crashing and you can't actually use it except with great care, just because it's free. Ultimately software should be functional, not a political statement. Nil Einne (talk) 17:29, 25 March 2015 (UTC)[reply]

Firefox

Does a fork of Firefox exist whereby the Firefox UI and the Gecko rendering engine are separate processes that work in tandem, rather than rolled into one firefox.exe process? My Little Question Can't be This Interesting (talk) 20:26, 21 March 2015 (UTC)[reply]

Check out the Electrolysis project, which is similar to what you described. Currently, Electrolysis is enabled in Nightly versions of Firefox if you want to experiment with it. Just note that Nightly is the bleeding-edge version of Firefox with the latest features, but it can also be unstable and have bugs in it. On the other hand, by using Nightly you're helping Mozilla to make Firefox better! --107.9.39.168 (talk) 00:26, 22 March 2015 (UTC)[reply]

March 22

Apple TV

When showing my photos on my TV via Apple TV the computer seems to find and show photos that I have deleted/trashed on my computer. How come? and what can I do about it please?85.211.198.22 (talk) 07:23, 22 March 2015 (UTC)[reply]

Is there an option to empty the trash ? If so, that should actually delete them. StuRat (talk) 08:24, 22 March 2015 (UTC)[reply]
In case emptying the "recycle bin" doesn't work as intended, OP should look for the .Trashes folder. By default this is a "hidden file", you can make you finder show these by following any of these directions [1]. SemanticMantis (talk) 15:04, 23 March 2015 (UTC)[reply]
I'm not sure if the Trash/Recycle Bin is really the. I don't know much about Apple TV, but I would be surprised if it was really displaying photos from there. A more likely possibility may be the OP hasn't actually deleted those photos. They may have deleted one copy, but something else stored another copy somewhere. Nil Einne (talk) 17:23, 25 March 2015 (UTC)[reply]

e learning

Where can I download lectures given in university or classroom by professors ?

Learnerktm 11:53, 22 March 2015 (UTC)[reply]

In which subjects? For the Sciences and Engineering, MIT and Khan Academy offer free lectures. You've also asked a similar question, this time for the Performing Arts, over at the Humanities desk. LongHairedFop (talk) 12:55, 22 March 2015 (UTC)[reply]

LongHairedFop ... I wanted to know the site that provides recordings of class lectures of any subjects. That is all.

Learnerktm 14:07, 22 March 2015 (UTC)[reply]

MIT's Open Course Ware is the preeminent example of free-to-view classroom lectures. The website is http://ocw.mit.edu and you can navigate to courses by department, by topic, by professor, or use the search feature to find interesting classes. Nimur (talk) 15:17, 22 March 2015 (UTC)[reply]
edX has some free classes, including lectures. StuRat (talk) 17:42, 23 March 2015 (UTC)[reply]

Securing a MediaWiki server

I have to set up a MediaWiki server as part of a college project. How would I go about securing it? Some information:

  • Must be an Ubuntu server.
  • Uses: apache2, php5, mySqlServer, vsftpd, phpMyAdmin.
  • MediaWiki file uploads are enabled.

I've run the mysql secure install script, disabled vsftpd write_enable=YES after I was finished with it and I've used a htaccess file to block access to phpMyAdmin.

Just looking for some tips and tricks. Especially anything I might have missed. 2A02:8084:9300:2480:2129:BE95:3839:9985 (talk) 18:09, 22 March 2015 (UTC)[reply]

Exactly what are you trying to secure it from?
The MediaWiki itself can be secured by following the instructions documented in the manual: Setting Administrative Rights. You can restrict specific operations to certain user accounts or categories of users.
The Apache httpd server can be secured by following Apache security tips. The PHP interpreter can be secured by following PHP security guidelines.
The Ubuntu machine can be secured by following best practices, as documented at Ubuntu Basic Security.
... and so on, ad infinitum. If your class of security threats is specific to MediaWiki, you can focus on MediaWiki tips... if you must secure the entire system, you should broaden your scope to include overall machine security; if you must protect against physical attack or theft, ... you see that the strategies become quite different for each type of security problem you wish to address. No amount of cybersecurity will protect your server if its security is threatened by airstrike. As the Marine Corps Physical Security Manual reminds you: your computer may need physical security, and your physical security teams may use computers, so there is a bit of a boot-strapping problem to consider.
Nimur (talk) 20:57, 22 March 2015 (UTC)[reply]


March 23

Special magnification software wanted

I am guessing the answer will be "no such software exits", but I'm going to ask anyway.

I often find spreadsheets (actually PDF snapshots of spreadsheets), which are so large that I can't view a cell and both the row and column headings at once on a single screen. For example, this frequently comes up when viewing a nutrition data grid for a restaurant.

So then, what I would like is software that would allow me to click on a spot on the screen, magnify that, but also scroll all the way to the left, take a snapshot of that heading, and display that magnified, and then scroll all the way to the top, take a snapshot of that heading, and magnify it. So, if I had spreadsheet PDF with items A-Z in one direction and 1-99 in the other, then cell Y98 should be magnified like this:

      +-----+
      |  98 |
      +-----+
+---+ +-----+
| Y | | Y98 |
+---+ +-----+

(Of course, "Y" would be something like "Chili-cheese fries", "98" would be something like "Trans fats (g)", and "Y98" would be something like "12".)

Now, once in a PDF, I don't think there's any concept of an actual cell any more, so the software would just have to magnify a certain area around the current selected point and a portion all the way to the left of it and all the way to the top of it. It might be necessary to be able to dynamically adjust the locations and sizes a bit to get it to work. Being able to toggle to view the right and bottom instead of left and top might also be useful, as I can imagine this tool being used to read a graph, too, and see the axis markings while doing so. Also, being able to scroll up and down while in this magnification mode would be useful, so I could scroll from cell Y98 to W93 without having to turn off the magnifier, find the new spot, then turn it back on.

So, does this tool exist, or do I need to write it ? StuRat (talk) 03:31, 23 March 2015 (UTC)[reply]

The tool you're looking for does exist. It's an accessibility feature. In Adobe Reader, it's found under View->Zoom->Loupe Tool. --173.49.16.112 (talk) 03:38, 23 March 2015 (UTC)[reply]
Hmm... I just noticed that you're looking for more than just a magnifier. The loupe tool in Adobe Reader doesn't do everything you wanted it to do, but I hope it's still helpful to you. --173.49.16.112 (talk) 03:47, 23 March 2015 (UTC)[reply]
No, magnification is simple enough without that tool. However, I did find exactly what I want as "Window > Spreadsheet Split" for Adobe Acrobat X Standard, described here:[2]. Unfortunately, that functionality doesn't appear to be included in Acrobat Reader. StuRat (talk) 04:17, 23 March 2015 (UTC)[reply]
The feature you mentioned is available in this freeware PDF viewer. --173.49.16.112 (talk) 04:40, 23 March 2015 (UTC)[reply]
Thanks:
1) What are the commands to do so ?
2) Is that functionality only available during an evaluation period ? StuRat (talk) 18:09, 23 March 2015 (UTC)[reply]
1) To create a split view of a document, the command is Windows->Split. You can choose between Horizontal Split & Vertical Split. Let's say you choose Horizontal Split (which I think is incorrectly named), you now have 2 vertically=stacked panes showing different parts of the document. Adjust the zoom of both panes so that in both of them the width of the document fits the width of the pane. You can make the upper pane show only the header row of a spreadsheet, and use the bottom pane for the actual browsing. You can use the Loupe tool (View->Zoom->Loupe Tool) to magnify the tiny spreadsheet cells. If you want to see the corresponding column heading, move the loupe tool straight up to the upper pane to the upper pane. Unfortunately, you can't use this trick on both the column and row headings at the same time.
2) The basic version of the viewer is free. If you don't buy an upgrade, you just don't get the advanced features, but features in the free version don't expire. IMO, the publisher is really generous with features even with the free version. --173.49.16.112 (talk) 00:57, 24 March 2015 (UTC)[reply]
Thanks. Re: "Unfortunately, you can't use this trick on both the column and row headings at the same time" ... that's rather critical, I'm afraid. StuRat (talk) 03:34, 24 March 2015 (UTC)[reply]

Note that while I mentioned PDF files in the Q, I would like a broader solution that works on any image or web page. I suppose other images can be converted to PDF files, but a web page too large for a screen grab and composed of multiple images might be difficult to convert to a single PDF image. Perhaps a browser add-on would be the best choice ? StuRat (talk) 18:14, 23 March 2015 (UTC)[reply]

For what it's worth, in excel the feature is called freeze panes . Vespine (talk) 22:53, 23 March 2015 (UTC)[reply]

Formatting numbers in Java with Swing

I have a JTextField which has a double in it that I'm trying to format with two places behind the decimal. It's a dollar figure, so two places would be best. I was able to use NumberFormat when I was running the program in the console but now that I'm trying to display it in a GUI I can't seem to get the code figured out. Right now, I have this:

totalField.setText(Double.toString(total));

When I was using the console, I had this:

System.out.println("Your sales were " + nf.format(sales));

Can anyone help me out? Thanks, Dismas|(talk) 05:37, 23 March 2015 (UTC)[reply]

As far as I'm concerned, you can use NumberFormat for this too. Or you can use String.format with "%.02f". But it may be best to use a JFormattedTextField with a genuine currency format (and not just the assumption that all currencies have the same format). This example uses all three (one per column) for some random values:
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*;
import java.text.*;
import java.util.*;

public class Num extends JFrame{
    public static final void main (String [] args){
        new Num();
    }
    
    public Num() {
        setLocation(100,100);
        setLayout(new GridLayout(0,3));
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        Container content = getContentPane();
        DecimalFormat df = new DecimalFormat("#.00");
        Random rnd = new Random();

        NumberFormat currency_format = NumberFormat.getCurrencyInstance(Locale.UK);
        currency_format.setMaximumFractionDigits(2);
        NumberFormatter currency_formatter = new NumberFormatter(currency_format);
        currency_formatter.setAllowsInvalid(false);

        content.add(new JLabel("String.format"));
        content.add(new JLabel("DecimalFormat"));
        content.add(new JLabel("FormattedField"));

        for(int i=0; i < 20; i++){
            float randval = rnd.nextFloat() * 1000f;

            content.add(new JTextField(String.format("%.02f", randval)));
            content.add(new JTextField(df.format(randval)));

            JFormattedTextField ffield = new JFormattedTextField(currency_formatter);
            ffield.setValue(randval);
            content.add(ffield);
        }

        setVisible(true);
        pack();
    }
}
But considerable caution should be used when storing and doing calculations with currencies using floats or doubles - cf Effective Java (§31 in first ed., §48 in second ed.). -- Finlay McWalterTalk 14:47, 23 March 2015 (UTC)[reply]
Yes, storing currency (or any integer) as a real numbers (floats, doubles, etc.) introduces potential problems with rounding in different ways. For example, the TGI Friday's Give Me More Stripes loyalty club uses floats for their loyalty points, and rounds differently depending on whether you look your points up at home (rounds up) or at the restaurant (rounds down). To avoid this, always store as integers. (To include cents, store the currency as cents and divide by 100 when displaying.) Also, using reals, your calc for 1.01 + .37 likely ends up with something like 1.37999999999999999873, so rounding is needed even in places you wouldn't expect, as truncating would produce the wrong answer half the time.
One place you might want to use reals with money is in compound interest calculations, to preserve accuracy (just remember to round the final result consistently). StuRat (talk) 17:49, 23 March 2015 (UTC)[reply]

PHP function question

If I have 2 php files and in one php file:

function getMoneyRate($location){here is my if statement}

Okay so what would I need to write in the 2nd file to get the information from the function in the first php file into a variable in the 2nd file? — Preceding unsigned comment added by 204.42.31.250 (talk) 11:15, 23 March 2015 (UTC)[reply]

Your question is very vague. This answer must, therefore, be very vague. Assume I have a PHP file with a function called getMoneyRate in it. I have another PHP file. In the second one, I want to use the function getMoneyRate. To do so, I just add this line in the second file: include("WhateverTheNameOfTheFirstPhpFileIs.php"); 209.149.113.207 (talk) 12:12, 23 March 2015 (UTC)[reply]

Sorry for the vague question. I am looking for more of a example i think? I am struggling to understand this. If I have $MoneyRate in the file without the fuction how do I assign the if then statement to the variable? — Preceding unsigned comment added by 204.42.31.250 (talk) 00:04, 24 March 2015 (UTC)[reply]

Your questions indicate structural misunderstanding rather than that of detail. Examples (unless they happen to be exactly your program — i.e., unless someone writes it for you) will be of limited use, because you will have to infer the structure from them, rather than deduce the correct program (for your purpose) from general rules. I'll try to dispel a couple of misunderstandings:
  1. Your function getMoneyRate should return a value (or, in rare cases, set or modify an output parameter). Then calling it from any file will return the information "to that file". In particular, it should not assign to a global variable, which would then have to live in exactly one file. This is a principle of modular programming.
  2. You don't assign statements to variables, but rather values; if statements have no value (in PHP). (There is the conditional operator, which may or may not be useful to you here.)
Hope that helps; do check your favorite PHP book for (generic) examples of functions and calls to them. --Tardis (talk) 02:11, 24 March 2015 (UTC)[reply]

All I want to know is if I have this code in one file: function getMoneyRate($location){10 + 5} How do I get the information of 10 + 5 to the other file based solely on what is seen in the code I just wrote. — Preceding unsigned comment added by 204.42.31.250 (talk) 02:33, 24 March 2015 (UTC)[reply]

With a return statement? I said to return a value… --Tardis (talk) 13:38, 24 March 2015 (UTC)[reply]
This has nothing at all to do with "in one file" and "in another file". You apparently do not understand how to return a value from a function - even if the function and the rest of the code is in one file. You need to use the "return" statement to return the value from the function. Then, you can set a variable to the return value from the function. 209.149.113.207 (talk) 13:52, 24 March 2015 (UTC)[reply]

March 24

Quest about jkflip flops and transition state diagramsg

_____So there are four inputs QdQcQbQa. I did the Karnaugh maps. But now how do I find the controls required by flip flops Jd Kd Jc Kc Jb Kb Ja Ka so that it goes to the next state. Lets say for example if Qa is the ones and Qd is the eights and we need to make a state transition table that also shows the controls required for the flip flops. and the counter is to the Fibonacci sequence from1 to 13 such that QdQcQbQa= 0001(one) to 2 (0010) , to 3 (0011), to 5 (0101) to 8 (1000) to 13 (1101), then repeat to 0001. how would one then create a state transition diagram then.

Note I do not understand what the teacher teaches in class because he teaches us things in backwards, unlike how it is suppose to be abcd he tells us that a is not the 8s but the ones a d is not the ones but the 8s.

The counter only uses a JK flip flop and no other type of flip flop.

Help? Please?Doorknob747 (talk) 00:15, 24 March 2015 (UTC)[reply]

I'm not sure I understand your statement of the problem, so I'll paraphrase. You have four flipflops, whose values at a given moment are the four Q bits. I assume the flipflops are "clocked" (if that's the word I want – it's been a long time since I thought about flipflops) by the counter input, so their JK inputs have no effect except when the counter triggers.
Each J and each K then depends only on the four Q bits, but 10 of the 16 values never happen, so there are many don't-cares in the Karnaugh map, which makes your logic simpler! The state transition graph is simply a cycle of the six Fibonacci values.
Before we go any further, please confirm that my paraphrase is accurate, and tell us what you've done so far. —Tamfang (talk) 07:41, 24 March 2015 (UTC)[reply]
Yes it is correct the paraphrasing that you just said. Doorknob747 (talk) 17:43, 24 March 2015 (UTC)[reply]
I will just comment here that there is no "right" association between the various flip-flops and bit values. Back in the day where we used flip-flops that came two to a 14- or 16-pin DIP, which flip-flop in which package was used for which bit was dictated more by what would make for a convenient printed circuit layout than any "obviously correct" relationship. The electrons don't care. Don't know where you learned that Qa is "supposed" to be the 1-valued bit, but there is no such association. You may be generalizing too much from an example you saw somewhere. I agree with you that Qa being the least significant bit makes more sense (if only because if in the future you add more bits, you don't have to re-assign all the others), but it's really just arbitrary. Jeh (talk) 10:03, 24 March 2015 (UTC)[reply]
Taking the first transition as an example, to make state 0001 change to 0010, the four JK inputs must make the four Q outputs do this: 0→0, 0→0, 0→1, 1→0 (that's Qd, Qc, Qb, Qa, respectively). Therefore the JK inputs have to be: 0x, 0x, 1x, x1 (again, d to a, where x = don't care), and those values are the result of the current state (0001). Repeating this approach for each of the defined states produces a table of JK values, and the control circuit consists of logic found from eight separate Karnaugh maps. As has been said, it does not make any difference whether the Q values are labeled ABCD or DCBA. Johnuniq (talk) 22:53, 24 March 2015 (UTC)[reply]
Do you care what happens if Q is not a Fibonacci number, e.g. if it's randomly initialized? —Tamfang (talk) 05:37, 25 March 2015 (UTC)[reply]
Now it is asking if one were to do it via a multipxer for Jd and Kd thru Ja and Ka and each gerated by using a multiplexer that is a 8 to 1 line multiplexer for each J and K controll. it says to write down the 8 input lines of each multiplxer, including alternatives. It says the least significant address lines is the ones and is connected to Qa and the most significant the fours, adress line is for each multiplexer is Qc. It states that Qb is connected to the twos adress lines in each case.

please helpDoorknob747 (talk) 16:29, 25 March 2015 (UTC)[reply]

GPL

Doesn't including a copy of the GNU General Public License (whose text cannot be modified) in a program make the program non-free? --Ricordisamoa 11:22, 24 March 2015 (UTC)[reply]

How do you define "free"? If you follow the definition provided by the Free Software Foundation (the same people who wrote the GNU General Public License), then releasing software using the GPL license is free. Other people may choose to use different definitions. Many people find that it is difficult to comply with license requirements of the GPL: they may choose to describe the requirements as "restrictive" of their freedoms, but that is in opposition to the way that the license uses the term.
Also, simply including the license text with the distribution may be legally distinct from actually licensing the software using this license. You may wish to consult an attorney on that point.
Nimur (talk) 15:20, 24 March 2015 (UTC)[reply]

All OSS software is free?

Is all open-source software freeware? I have seen some people sell OSS, but is this illegal? RocketMaster (talk) 13:38, 24 March 2015 (UTC)[reply]

Most common open source licences require that there are no restrictions on commercial usage of the source code, some would even suggest it's essential to be truly open source. So anyone is free to sell the software. However if it's a copyleft licence, then they would need to make their source code available, so anyone else is free to give it away for free, or sell it themselves. If it's not a copyleft licence, or if they otherwise include some proprietary code which is allowed by the licence, then it isn't completely open source any more. The more effective way to make money off truly open source software tends to be via offering support, which may include fixing bugs etc. Of course, since anyone is free to compete with you in doing so, you may need to make sure you offer value for money. (In practice, reputational inertia and luck, and other factors will likely still come in to play.) Nil Einne (talk) 13:45, 24 March 2015 (UTC)[reply]
Richard Stallman's essay, Why Open Source misses the point of Free Software, explains the distinction from the perspective of the Free Software Foundation.
It is usually legal to sell free software and it is sometimes legal to sell open-source software. Among all the liabilities you must consider, you should carefully review the license terms for each piece of software. If you need more certainty about specific instances, you should consult an attorney. Nimur (talk) 15:25, 24 March 2015 (UTC)[reply]
See also Permissive_free_software_licence, MIT license, and BSD license. Have you heard people discuss "free as in freedom, not free as in beer?" If not, you could also read Gratis versus libre. Short answer: it is perfectly legal to sell many types of open source software. Each license works differently. Sometimes people sell support along with the software, other times they just charge a minimal fee for copying/distribution services. SemanticMantis (talk) 17:11, 24 March 2015 (UTC)[reply]
Almost all OSS licenses would allow someone to sell the software. However, many of those licenses generally require (or at least allow) that the source code for the software be available for use without restrictions - so the question is: Why anyone would buy software that they can get for free? Generally, they do that because they want convenience of packaging on DVD's or some simplified installation mechanism - or perhaps because after-sales service of some kind is offered.
The ikky grey area is when someone takes a piece of free software and modifies it in some manner before selling it.
With software licenses such as the GNU GPL, there is a requirement that someone who does this ALSO offers the source code with the modifications made to it to everyone who buys (or is given) that modified version. Clearly, the purchaser could then (perfectly legally) give the code away for free - so the guy who did the modifications might well only sell one or a few of that version before it would be 'out there' for people to get for free.
With other licenses, there is no such restriction - leaving open the possibility that an OSS package might be modified and slightly improved - and then sold commercially WITHOUT the source code and WITHOUT rights to redistribute. While the original version would still be available - a spiralling popularity of the modified version could become (in effect) "closed source". This has happened numerous times.
A good example of a company selling OSS code is with the Flightgear flight simulator package. It's free, you can just download it for Windows, Mac and Linux - it works great! Yet ProFlight is selling it for $49. There may be a few small changes made by the ProFlight people - but for sure, at least 99% of the code is OSS. They aren't breaking the law - but (IMHO), they are not playing nice with their customers.
SteveBaker (talk) 19:49, 24 March 2015 (UTC)[reply]

Simple GPS module

Is there a minimalistic GPS that's reliable and sensitive? I am trying to find something with just a button that outputs two coordinates. No maps, no routes no extras. If it is something that can be plugged to an electronic device (preferably through USB), than even better. Fend 83 (talk) 18:50, 24 March 2015 (UTC)[reply]

Maybe a GPS watch? This one from Garmin has no maps, but it does allow for wireless data transfer to a computer [3]. SemanticMantis (talk) 19:03, 24 March 2015 (UTC)[reply]
(REVISED!) THIS is a GPS module (costs $40) and THIS is an interface (costs $15) that plugs into an Arduino board (costs $5 to $30 depending on what you need and where you buy it from)...there is doubtless some kind of example code for it that would allow you to output the coordinates to USB. You'll need some minimal software skills to hook that up to a push-button - but it's not rocket science. The whole thing could run on batteries or get power from the USB. SteveBaker (talk) 19:33, 24 March 2015 (UTC)[reply]
Yes that's what I wanted exactly. The watch recommendation above might be a fine product, but kind of pricey and let's you little flexibility to adapt it to your needs. Fend 83 (talk) 21:24, 24 March 2015 (UTC)[reply]

March 25

Software Sought

When it comes to creating, editing/modifying, amending/updating a photo/image, graphics, animation, web design, what is the only one serious industry standard option(s) that most professionals use. -- (SuperGirlsVibrator (talk) 06:30, 25 March 2015 (UTC))[reply]

What makes you think there's only one ? StuRat (talk) 06:37, 25 March 2015 (UTC)[reply]
I recently found out that you can use a software to create little video clips for web pages... I'm wondering and hoping to be honest, one that/each would have all the facilities, so that I never change the software and only use its updated versions... If not, whatever the industrial people use in order to create what's aforementioned. I can get the CDs here where I am. I wanna buy everything i.e required and keep'em for future use... -- (SuperGirlsVibrator (talk) 09:02, 25 March 2015 (UTC))[reply]
In computer software, there is no such thing as an "industry standard." Every company claims that what they do is the standard, but that is just business people blowing rainbows out their ass to make everyone feel warm and fuzzy. Take videos - what kind? Animated GIFs? I can make animated GIFs in a plethora of programs. None of them are standard. You want a MP4 video? I can make an MP4 video with anything from my phone to pasting a series of stills together with a command-line program. There is no standard. It comes down to what is supported. Pick a program that people who can talk to also use. They can support you. If you pick the most expensive program on the market, but nobody you know uses it, you won't be able to figure it out. 209.149.113.207 (talk) 14:36, 25 March 2015 (UTC)[reply]

Video downloader

The Youtube downloader seems to restrict me from downloading video clips from certain webpages. Is there a video downloader which will not restrict me from downloading from any websites and possibly possess such facilites as youtube's (coverter and so on), even more...? -- (SuperGirlsVibrator (talk) 09:07, 25 March 2015 (UTC))[reply]

There are a lot of programs called "Youtube downloader", so I'm not sure which one you're using. In any case, I don't think it's blocking any web sites; it probably just doesn't support them. Every video streaming site is different, and someone has to figure out how to make the downloader work with each one, and fix it whenever the site changes in a way that breaks the old method. -- BenRG (talk) 09:17, 25 March 2015 (UTC)[reply]

iTunes

Can I arrange for iTunes to open automatically when I switch on my Mac desk-top please? If so, how?85.211.198.22 (talk) 17:33, 25 March 2015 (UTC)[reply]

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Now it is asking if one were to do it via a multipxer for Jd and Kd thru Ja and Ka and each gerated by using a multiplexer that is a 8 to 1 line multiplexer for each J and K controll. it says to write down the 8 input lines of each multiplxer, including alternatives. It says the least significant address lines is the ones and is connected to Qa and the most significant the fours, adress line is for each multiplexer is Qc. It states that Qb is connected to the twos adress lines in each case.

see one question i asked before. please helpDoorknob747 (talk) 16:29, 25 March 2015 (UTC)[reply]