How can Markov cluster algorithms be used to cluster strings?

Question: I have just start learning about Machine Learning and while surfing on the web, I saw that another CV user in those post has offered Markov cluster algorithms to cluster long strings. As far as I know, MCL is cluster algorithm for graphs, how could it be used to cluster strings? Should it be modified for this purpose, or naturally it can also takes strings as input?
Comment: MCL = Markov Cluster Algorithm, The answer that I've found can be accessed from here : http://stats.stackexchange.com/questions/123060/clustering-a-long-list-of-strings-words-into-similarity-groups

"Use graph clustering algorithms, such as Louvain clustering, Restricted Neighbourhood Search Clustering (RNSC), Affinity Propgation Clustering (APC), or the Markov Cluster algorithm (MCL"
Comment: What is MCL? Which guy?
Comment: I am that guy. MCL is used a lot for clustering proteins based on their amino acid sequence (which is just a string over alphabet of size 20). In that context, the input to mcl consists of triples ID1 ID2 LOG-SCORE, where LOG-SCORE is an application-specific measure of similarity (derived from BLAST). So MCL will not compute similarity (derived from a dissimilarity such as edit-distance) between strings for you. It requires you to feed it a list of string ID pairs together with a similarity for each of those pairs.
Comment: @micans thanks for reply, My problem is that, for a given chunk of genes, I have to cluster them based on their sequence similarities, and I want to do this clustering operation with MCL. Do you think it is possible?
Comment: It depends on what your notion of similarity is. Are these protein coding genes? lncrnas? How do you want to measure similarity? If they are protein coding then the answer is unequivocally yes (and you should derive the similiary from blastp-type E-values or bit scores). If they are not it would be good to know what type of genes they are. To be sure, with 'chunk of genes' you just mean 'a number of genes'? How many? What is the purpose of doing cluster analysis? Your notion of gene similarity and how you will compute it is crucial in this - MCL will not do that for you.
Comment: In case you try to use the code someone posted on July 6 for the Markov Clustering, Python doesn't recognize the function mcl. Also checkout this to understand how to tune max and min df https://stackoverflow.com/questions/27697766/understanding-min-df-and-max-df-in-scikit-countvectorizer
Answer: You might consider the original two approaches for analyzing strings in text mining based on 1) stemming and stopping and 2) n-grams.  I have had a great deal of success using n-grams on peptide strings (of amino acids, AA) and then clustering the results from n-grams for QSAR (quantitative structural activity relationship) between molecules.  (Look at, e.g., SMILES strings for molecular characterization of molecules).
Would not recommend focusing on Markov anything until you understand the basics.
Answer: Using Markov clustering to cluster by words is fairly easy, using this module
Simply run:
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
X = CountVectorizer(max_df=10**-2, min_df=10**-7).fit_transform(docs)
X = TfidfTransformer(use_idf=False).fit_transform(X)
clusters = mcl(X).run().clusters()

Where docs is an array of your strings


How to add a payment option for a specific country?

Question: I am from Nigeria, I would like to know how to add my debit card and billing information on my ewallet in Windows Phone 8.
Answer: Unfortunately in some countries like Nigeria and Brazil you can't add you debit card as a payment option to buy apps on the Store.
Alternatively you can change the country/region in settings and use a prepaid credit card from that region.
I'm currently using my phone in the USA region and use an American Express prepaid credit card to purchase apps.
Another alternative is you buy gift cards from Microsoft but is unlikely it will work in all countries too (Here in Brazil this became an option just in January 2014)
Answer: You can't, not all countries are supported in the Wallet.
I couldn't find a list of the supported countries, but I know for a fact that my home country (Saudi Arabia) is not supported when I tried to add my local credit card. But adding a US credit card worked fine.
Comment: Are you able to expand upon this answer, e.g. provide a source of available countries?
Comment: Is your account set to Arabia or USA? It was a deal breaker in Windows Phone 7.5. Looks like know you just need change the region and you can add payment option for any country.


What does "this" mean in jQuery?

Question: In jquery, what does this means and when it is used?
Comment: the concept of 'this' is JavaScript is, imho, one of the most complicated subjects of the language.  I would highly recommend reading up on it if you intend on doing much JavaScript.  And, when you think you understand, go back and read about it again, because if you're like me you didn't actually understand the first time you thought you understood.
Comment: the current element...
example

this textbox will contain abcde when you click on it...
Comment: Related: http://stackoverflow.com/questions/133973/how-does-this-keyword-work-within-a-javascript-object-literal
Comment: @Matt ya, you are right:) We all are over-confident people.
Comment: concept of this is explained here https://scotch.io/@alZami/understanding-this-in-javascript
Answer: this in JavaScript is very special and powerful. It can mean just about anything. I cover some of it here and here, but it's really worth finding a good tutorial on JavaScript and spending some time with it.
Let's look at jQuery's use of it first, then talk about it more generally in JavaScript (a bit).
In jQuery, specifically
In code written with jQuery, this usually refers to the DOM element that's the subject of the function being called (for instance, in an event callback).
Example jQuery event callback (what this is is covered in the .bind docs):
$("div").click(function() {
    // Here, `this` will be the DOM element for the div that was clicked,
    // so you could (for instance) set its foreground color:
    this.style.color = "red";

    // You'll frequently see $(this) used to wrap a jQuery object around the
    // element, because jQuery makes lots of things a lot simpler. You might
    // hide the element, for example:
    $(this).hide();
});

Similarly, various jQuery functions that act on all of the elements matched by the current jQuery selector can optionally accept a function, and when that function gets called, this is again the DOM element in question — for instance, the html function allows this:
// Find all divs inside the `foo` element, and set
// their content to their CSS class name(s)
// (Okay, so it's a hokey example)
$("#foo div").html(function() {
    return this.className;
});

Another place jQuery uses this is in the callback on jQuery.each:
var a = ["one", "two", "three"];
jQuery.each(a, function() {
    alert(this);
});

...which will alert "one", then "two", then "three". As you can see, this is a totally different usage of this.
(Confusingly, jQuery has two functions called each, the one above which is on the jQuery/$ function itself and always called that way [jQuery.each(...) or $.each(...)], and a different one on jQuery instances [objects] rather than the jQuery/$ function iself. Here are the docs for the other one, I don't discuss the other one in this answer because it uses this the same way html and event callback do, and I wanted to show a different use of this by jQuery.)
Generically in JavaScript
this refers to an object. Update: As of ES5's strict mode, that's no longer true, this can have any value. The value of this within any given function call is determined by how the function is called (not where the function is defined, as in languages like C# or Java). The most common way to set up this when calling a function is by calling the function via a property on the object:
var obj = {};
obj.foo = function() {
    alert(this.firstName);
};
obj.firstName = "Fred";
obj.foo(); // alerts "Fred"

There, because we called foo via a property on obj, this was set to obj for the duration of the call. But don't get the impression that foo is in any way married to obj, this works just fine:
var obj = {};
obj.foo = function() {
    alert(this.firstName);
};
obj.firstName = "Fred";
obj.foo(); // alerts "Fred"

var differentObj = {};
differentObj.firstName = "Barney";
differentObj.bar = obj.foo; // Not *calling* it, just getting a reference to it
differentObj.bar(); // alerts "Barney"

In fact, foo isn't intrinsically tied to any object at all:
var f = obj.foo; // Not *calling* it, just getting a reference to it
f(); // Probably alerts "undefined"

There, since we didn't call f via an object property, this wasn't explicitly set. When this isn't explicitly set, it defaults to the global object (which is window in browsers). window probably doesn't have a property firstName, and so we got "undefined" in our alert.
There are other ways to call functions and set what this is: By using the function's .call and .apply functions:
function foo(arg1, arg2) {
    alert(this.firstName);
    alert(arg1);
    alert(arg2);
}

var obj = {firstName: "Wilma"};
foo.call(obj, 42, 27); // alerts "Wilma", "42", and "27"

call sets this to the first argument you give it, and then passes along any other arguments you give it to the function it's calling.
apply does exactly the same thing, but you give it the arguments for the function as an array instead of individually:
var obj = {firstName: "Wilma"};
var a   = [42, 27];
foo.apply(obj, a); // alerts "Wilma", "42", and "27"
//             ^-- Note this is one argument, an array of arguments for `foo`

Again, though, there's a lot more to explore about this in JavaScript. The concept is powerful, a bit deceptive if you're used to how some other languages do it (and not if you're used to some others), and worth knowing.
Here are some examples of this not referring to an object in ES5's strict mode:
(function() {
    "use strict";   // Strict mode

    test("direct");
    test.call(5, "with 5");
    test.call(true, "with true");
    test.call("hi", "with 'hi'");

    function test(msg) {
        console.log("[Strict] " + msg + "; typeof this = " + typeof this);
    }
})();

Output:
[Strict] direct; typeof this = undefined
[Strict] with 5; typeof this = number
[Strict] with true; typeof this = boolean
[Strict] with 'hi'; typeof this = string
Whereas in loose mode, all of those would have said typeof this = object; live copy.
Comment: @ryanwaite28: *"this refers to the object that called the function"* No, it doesn't. Objects don't call methods, code does; in JavaScript, code is only loosely linked to objects. When code calls methods, it sets the value of `this`, explicitly or implicitly, to whatever it likes -- in strict mode, it may not even be an object reference, it could be a primitive value.
Comment: 0
down vote
Here is how i would explain it, simply:

this refers to the object that called the function. Since differentObj called foo(), this will point to differentObj. Since f was defined in the global scope, its a method of the window object, so this points to window. Since the window object does not have a property firstName, this.firstName returns undefined

Fun fact: anything defined in the global scope, which is the top layer/level, becomes a property of the window object (global scope = window object).
Comment: Crowder technically yes. But for the sake of explaining it in a way people can understand, i said objects. But thanks for add the abstract details. "this" can literally refer to anything.
Comment: @T.J.Crowder can i add edit the snippet and put them in stack snippet ?
Comment: @brk: Do you mean you want to edit the answer to turn the code blocks into runnable snippets? If so: Go for it, and thank you!
Comment: @T.J.Crowder yes i mean that
Answer: The this Keyword

In JavaScript, the thing called this, is the object that "owns" the JavaScript code.

The value of this, when used in a function, is the object that "owns" the function.The value of this, when used in an object, is the object itself.
The this keyword in an object constructor does not have a value. It is only a substitute for the new object.The value of this will become the new object when the constructor is used to create an object.
Note that this is not a variable. It is a keyword. You cannot change the value of this.
Answer: Here is how i would explain it, simply:
this refers to the object that called the function.
so looking at this:
var foo = {
  name: "foo",
  log: function(){
    console.log(this.name);
  }
}

var bar = {
  name: "bar"
}
bar.log = foo.log;
bar.log();

the bar object stores a reference of foo's log method into it's own log property for itself. now when bar calls its log method, this will point to bar because the method was called upon by the bar object.
this works for any other object, even the window object. if you call a function via the global scope, this will point to the window object.
by using the bind or call methods of a function, you can explicitly define what the object this will refer to during execution.
Fun fact: anything defined in the global scope, which is the top layer/level, becomes a property of the window object (global scope = window object).
Answer: Top Google result for "javascript this": http://www.quirksmode.org/js/this.html
Edit: I think the key sentence is:
"In JavaScript "this" always refers to the "owner" of the function we're executing, or rather, to the object that the function is a method of."
Quirksmode is (generally*) excellent, worth reading the whole article in detail.
*Apparently this statement is not necessarily correct, see T.J. Crowder's comment below.
Comment: jQuery *is* written in Javascript. Any jQuery code is also Javascript
Comment: not in javascript.. this in jquery.. thanks anyway! :D
Comment: *"'In JavaScript "this" always refers to the "owner" of the function we're executing, or rather, to the object that the function is a method of.'"* Wow, I hope the rest of the article is better than that. That quote perpetuates a distructive myth, not up to quirksmode's usual standards.
Comment: @T.J.Crowder can you explain the myth or link to more info about you what you mean?
Comment: @DanielSokolowski: Two posts on my blog: [*Mythical methods*](http://blog.niftysnippets.org/2008/03/mythical-methods.html) and [*You must remember `this`*](http://blog.niftysnippets.org/2008/04/you-must-remember-this.html). :-)
Answer: The keyword this acts as a placeholder, and will refer to whichever object called that method when the method is actually used in Java Script

What does "this" mean in jQuery?


What happens to preprints after the information contained in them gets published in a peer-reviewed journal?

Question: My question is whether preprints continue to exist after the information contained in them gets published in a journal. It would be confusing to have two sources for the same information (the preprint and the official publication), so I am assuming that preprints are taken down by the authors after their work gets published in a Journal. My question also is concerned with their citations. If preprints and peer-reviewed articles exist,  I don't know if tools such as Google Scholar are adding the total number of the citations received by both papers (I believe they should, as they are practically the same publication, only with different levels of revisions).
Comment: @Snijderfrey I'd expect the online preprint (e.g. on arXiv) to be updated in order to include that major revision - it's not guaranteed, but it's generally done.
Comment: A minor revision might result in a preprint being practically the same as the corresponding peer-reviewed paper. A major revision might result in two quite different publications if e.g. central conclusions are revised.
Comment: Also, note that preprint versions are a great source for quickly getting to a result when on a phone or non-university internet (where access might be restricted to journals). Also, arxiv is invaluable for developing countries where subscriptions to journals is very expensive.
Answer: In general, preprints continue to remain available even after publication. In fact, on most preprint servers, such as arXiv, it is impossible to completely remove a preprint once submitted, and any updates are stored as new versions. The preprint itself is a form of publication, where you can disseminate results, get feedback, and get a time stamp for your work without waiting for a lengthy peer review process.
Preprints may be cited and used to derive other works before they are published, so it is important to preserve past versions for the references to be coherent, particularly since a paper may be updated several times before publication in a peer-reviewed venue. The preprint version may be more likely to receive corrections and updates after publication, since that is easier than updating the journal version. It may also contain extra supplementary material missing from the published version due to length constraints, and so it is not necessary that the two versions are identical.
Regarding citations, services such as Google Scholar are usually able to interpret several versions of the same paper as a single entry. However, issues with this do exist, and have so far not been satisfactorily resolved.
Comment: Note that you usually still should cite the published version, because this tells the reader that there was peer review.
Comment: One particularly important update IMHO is that e.g. a preprint in arXiv can be tagged with a reference to the ("official") journal publication. A similar, very useful update of the preprint itself is to give that reference there as well and also to state whether/how the preprint differs from the journal publication
Answer: This is a genuine problem with the old-times notion of "publication", that is, in static (peer-reviewed or not) forms.
The so-called "preprint" forms on peoples' home pages or arXiv and such can be updated, corrected, and so on.
The traditional form of citations has the analogous problem, of having been developed gradually in a time when there was no internet, so people couldn't communicate easily themselves, ... couldn't even typeset things themselves. In those times, a "reference" was an utterly fixed, static thing, which would never change... and its deficits were fixed in stone forever, etc.
So it's not a surprise that the old citation concept cannot cope with more dynamic references, locations, and so on. Don't over-think how to cope with such a failure... nor believe that there should be a real "solution" in the old context.
Comment: Also, if you don't have rights of free access to journals through an institutional library, you may be happy to get a free preprint from arXive or the author's home page. For practical purposes, the preprint may be as useful as the 'official' publication, often hiding behind a 'pay wall'. // In the dark ages (before the Internet--or even photocopy machines) journals often gave a dozen or so 'preprints' or  'reprints' to authors, who could put them in the mail on request to non-subscribers.
Answer: Preprints, in the form of pre-drafts ("preliminary and incomplete"), working papers, under submission versions etc, remain in most cases available online. This is, in my opinion, a good thing, for many reasons.
Influential working papers may remain as such for many years, while gathering hundreds, if not thousands, of citations. My favourite example is a very extensive, heavily methodological piece that was put online in 2002 and got an official reference in 2009, as a book chapter. If the old version was removed, the old citations might not be tractable.
It can be both useful and interesting to track the evolution of a draft. Sometimes, interesting footnotes, quotes or even sub-sections are not in the published paper (e.g. after following reviewer recommendations) but can still be useful to someone else. The same holds for changes, mistakes etc.
EDIT - I forgot the most important point, mentioned by @BruceET : a publicly available copy, almost identical to the published work, that is not behind a paywall. This is by far the best reason.
I am not aware of a working paper being updated after the work is published, but it might contain more detailed tables, appendices etc.
Comment: Indeed, the continued existence of a publicly available copy with essentially the same content is often required by funding agencies.


Can you propagate custom data in New Activity?

Question: Is there a way to propagate the "With Contacts" address and phone number into the activities assignee's copy email?
Answer: If I'm reading the code correctly, it sends the slightly misnamed "Cases - Send Copy of an Activity" template, found under Mailings menu > Message Templates, "System Workflow Messages" tab.
If you add a Smarty debug tab, like this: {debug} to the top of the template, you should be able to send yourself a message and see a list of all available variables, which you can add as Smarty tags.  If what you're looking for isn't there (I suspect it's not), you can add it.  The core code is here: CRM/Activity/Form/Activity.php.  You'd be better off using an extension that adds them as part of hook_buildForm though.
Comment: Perfect, thanks Jon. Exactly what I was looking for.
Comment: Jon, I'm still learning here and will build an extension later. When adding a field to Activity.php. How do you propagate the entity's address;

),
      'assignee_contact_address' => array(
        'type' => 'entityRef', <-------Something here?
        'label' => ts('Contacts Address'),
        'attributes' => array(
          'multiple' => TRUE,
          'create' => TRUE,
          'api' => array('params' => array('is_deceased' => 0)),
        ),
Comment: When selecting 'entityRef', instead the name being filled In, it should fill in the address.
Comment: Sean - that seems like it belongs in its own question, both because the formatting is unreadable and because it will never get found by others here.
Comment: ok, I will re-post it


How can I low-level format flash memory in Linux?

Question: My friend was having problems with a USB flash drive, and I suggested he do a low-level format.  Then it occurred to me that I don't even know how to do that in Linux.  So... how can I low-level format flash memory in Linux? My friend tried a "full format" on the drive in Windows and it failed.
Answer: "Low level formatting" was done on floppies, where you could write at different densities by choosing to organize the tracks and sectors differently.  But this makes no sense for most modern media.  Its notion of how to organize the data on the device is fixed and unchangeable.  It doesn't make any sense at all for flash, which has discrete bits, rather than magnetic domains.  Higher level formatting is possible, which is mkfs in unix-land.
Comment: @wnoise if `mkfs` fails, `fsck` isn't going to help.
Comment: I test tons of flash USB memory at work and the quality of that is all over the map, so I wouldn't be surprised if your friend's drive is just broken and can't work anymore. These  things can break in many different ways and there's not much you can do about it, other than buying memory from reputable sources and then maybe testing it with `f3` to make sure it's not broken.
Comment: So if the filesystem on my friend's flash drive is messed up, `mkfs` is his only option?  What if that doesn't work?  There's nothing else he can try?
Comment: @Bryan: well, he could also try `fsck`, the equivalent of dos's `chkdsk`.
Answer: There is no way to do a low-level format on most flash devices, since they have an additional translation layer from USB/ATA/SD/etc. to MTD which obscures the low-level MTD devices (which can be low-level formatted if gotten to directly [which you can't]).
Answer: Low-level formatting means many different things to different people and on different contexts.
The original meaning was a step needed in the formatting of disks - disk drives need header, sync and other patterns written on the media before it can store data to it. In this way the head can detect when it is A) on a track and B) where it is on the track. Low-level formatting a floppy prepares the disk to be able to read and write blocks. Early MFM and RLL PC hard drives could be low-level formatted, often using a utility built into the hard drive controller's (an ISA card) ROM. Modern IDE and SATA hard drives are low-level formatted too, but only at the factory.
Various other meanings include writing zeros to all blocks, configuring the drive to disable "hidden" areas such as HPA and DCO and then zeroing all blocks, or other things more related to partitioning than formatting.
Raw flash needs a different initial preparatory step at the factory - each flash "eraseblock" (analogus to a "block" on disks) needs to be tested and marked as bad if it is indeed bad. Each "eraseblock" has an additional small "OOB" block that holds error correcting information - and this is where it is marked as bad.  You do NOT want to repeat this step as the act of writing to a bad block could prevent you from setting that particular bit again that identifies it as bad.
But you are not dealing with raw flash. You are dealing with a USB flash drive. There is a controller chip in all flash drives that accepts USB commands from the host and talks to the raw flash inside on the host's behalf. Some of these controller chips can be configured to report part of the flash as a separate CD-ROM partition, or act like two separate USB storage devices. Depending on the make and model of the controller chip, you may be able to find a recovery or configuration utility (likely Windows only) that could reset this controller chip. You would begin by opening the flash drive, looking for the smaller of (likely) two chips that are on the small PCB, and doing some Googling. The make and model printed on the outside of the case is not likely to help you find who made the controller inside of it.
Answer: mkfs.vfat /dev/hda1
will do the equivalent of the MSDOS "format" command.
Answer: I've come across devices in the past (although not for a while) which implement the SCSI FORMAT UNIT command - from Linux you can use:
sg_format --format /dev/sdX
to reset these devices to a factory state (USB storage spec is derived from the older SCSI standards).
I believe some newer USB 3 devices also implement ATA security commands, so you could use https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase which is likely to have the effect of resetting the flash translation layer to its factory state (as it typically does with SSDs).
Answer: There is such a thing as a low-level format for Flash memory, but it's done in factories with vendor-specific software.
To do that - you need to talk directly to the memory controller chip. Unfrotunately I couldn't find any programs that can do that on Linux.
There are manufacturer tools that perform low-level formatting and can write some settings (like LED behaviour, making the drive read-only) and data (like manufacturer name, model name, serial number) to the memory controller chipset, but these tools usually are made only for Windows, and are often in Chinese.
One such tool is called "FC MP Tools". As far as I can tell, these are designed by Alcor Micro, and manufactured by FirstChip (FC).
Apparently "MP" stands for "Mass Production".
I'm using the version I have found here:
http://down.upantool.com/file/software/mass/FristChip/2018/iTe_MpTools_20171130.zip
Other links you can follow:
https://repusb.cubava.cu/?page_id=2052
https://www.rmprepusb.com/tutorials/repair-your-usb-flash-drive
http://reboot.pro/topic/20865-alcor-micro-usb-pen-drive-repair/
http://reboot.pro/topic/19901-no-alcor-mptool-is-recognizing-my-usb/
https://www.elektroda.pl/rtvforum/topic3145335.html
http://flashboot.ru/files/file/30/
http://www.flashdrive-repair.com/2014/05/download-fc-mptool-v402-for-fixing.html
https://www.cdrinfo.pl/download/356133849
It runs in Wine, but will not detect the drive chipsets (it probably needs direct access to the USB controller to do it's thing).
Also - for this to work you need to have a flash drive with a specific Alcor chipset that is supported. Again - each vendor has his own software that talk to the controller chips via USB.
I have this:

Note the chipset part number on the microcontroller: FC1178 BC1
The FC MP Tools program will identify this as a 1178BC chipset:

And the software I linked works with it under Windows XP and 10.
However - it will crash if you switch the program to English language!
Set your preferences in English, then restart the program and don't change the language - it should work. Maybe it'll be fixed in a newer version.
Anyway - different vendors have different tools, it's a rabbit hole, there's no standard here AFAIK, and (at least this tool) will only work on Windows unfortunately.
From what I can tell, this will test the memory chip and write a bad sector map to the controller chip so it can present only good memory to the OS. This way even partially damaged chips can be used and sold. These are probably sorted in the factory by quality and low-level formatted to different capacities. This is called binning.
Maybe if someone can gather a lot of these tools, reverse engineer them and make a universal open-source tool for Linux we can do it - othwerwise I don't see that coming.
Answer: Although low level formatting the way it was done on hard disk drives and floppy drives do not make sense for a flash drive, there does exist manufacturer specific utilities to "low level format" flash drives:
This is an example: Alcor low level format utility
I fell on this question while looking for such utility that would work on Linux. However, it seems that flash drive manufacturers do not care about making us happy.


How to add a Facebook Event with new Graph API

Question: I am trying to create an event using Facebooks api. (From a django app) Has anyone created an event with the new graph api?
Answer: Check here:
http://developers.facebook.com/docs/api#publishing
Make a POST call to /PROFILE_ID/events with the required informations. Unfortunately they don't have all the possible arguments listed, but they can be found in the REST API docs under Events.create.
Comment: Ok, let me try this out. Looks like exactly what I wanted too see!

Thanks so much!

Any chance you know the encoding details on the image upload?
Answer: To Create Event you can use below code: (Which require create_event permission to achieve your requirement)
<code>update_url = "https://graph.facebook.com/<Your_FacebookProfile_ID>/events"
form_fields = {
   "access_token": "Your Access Token",
   "start_time" : "1272718027",
   "location" : "someplace",
   "name" : "New Test Event Using Graph API"
}
temp = {}
for k, v in form_fields.iteritems():
  temp[k] = unicode(v).encode('utf-8')

form_data = urllib.urlencode(temp)
res = urlfetch.fetch(url=update_url,
                     payload=form_data,
                     method=urlfetch.POST,
                     headers={'Content-Type': 'application/x-www-form-urlencoded'})
result = json.loads(res.content)
if result.get('id', False):
   "Successfully Created Event"
else:
   "Failure"
</code>
Comment: Great answer! Very much what I have ended up doing. I've had a lot of problems getting the location set correctly, as well as uploading images. But I'm making progress!
Answer: If you require access to user data while the user is not online, there is the offline_access extended privilege which gives you a longer lived session key. This can be used to perform updates while the user is offline.
While I can't help you with Django, most of the Graph API does seem to work for me (not tried events unfortunately) but just seems badly documented.
Comment: I'm aware of the offline_access permission session solution. The big problem is knowing if I can create an event. It appears that the api will not allow it. It appears the only write access to the Graph API is really rsvp/comments/like and not much else.
Answer: There appears to be no documented method for creating an API in the new docs, but you can use the REST interface methods as described here: http://developers.facebook.com/docs/reference/rest/ .
The big show stopper for me at the moment is the requirement of a user session to run any of the REST interfaces. A lot of my requests to Facebook (Event creations, invites) do not run during an active Facebook user logged in. They need to be created from the Application.
I'm not sure as of yet if this is a limitation in the new API or just not implemented in the SDKs.


Need to retrieved all related object of Opportunity object

Question: I am able to get all objects which are related in opportunity object by looking into opp-->Fields.I can see related object lookup(Object name).but how can i know other objects which are using opportunity lookup/master-details relationship.
Please suggest
Answer: For this you have to understand the SFDC Object Relationship structure.
When you create a master-detail or a lookup relationship, you create it on the child object and relate it to the master object. So the details of the relation is listed under the child object's field list.
So any relation in which Opportunity is the child, you will find that in the opportunity's field list (eg. Opportunity to Account). So if you want to see the relations in which Opportunity is the parent, you should look into the child object's field list.
EDIT: In case you are not sure which all child object opportunity have, you can go to Setup->Schema Builder and Add opportunity and then add all other custom objects you want to check with, if there is a relationship, it will show it using a connection.
Mohit's answer on this question is also a very good way using workbench.
Comment: but I have many objects .and if i want to look into child object then I have to go to each object field set.Is there any way like query from which i will get all the object list where opp is parent?
Comment: I have updated my answer about Schema Builder which might help you.


Difference between Cramer Rao bound and mean absolute error MAE

Question: Difference between Cramer Rao bound and mean absolute error MAE?
I cannot see the difference, or where to use one and not the other. I know that Cramer and MAE are used to measure the quality of an estimator, but in what are they different?
Answer: The Cramer-Rao bound is not a metric for the quality of a certain estimator, but rather can be calculated for a certain estimation problem and gives you a theoretical lower bound for the variance of any unbiased estimator for that problem (under some assumptions). For an unbiased estimator, the variance is equal to the expectation of the magnitude squared error, which is of course not the same as the absolute error.
If you have some estimator that you implemented, one thing that you can do is to compute a mean squared error and compare it to the CRB.


What can we infer about the connectivity and edge connectivity of a graph given the number of edge disjoint paths?

Question: So the number of edge disjoint u,v paths in a graph is x. Doing this problem, I thoguht back to Menger's theorem, and thought that the graph is x-edge-connceted and so the number of cut sets between any two vertices is also x.
However I'm not sure how to find find out anything about the vertex connectivity since all I was given was the number of edge disjoint paths.
Answer: I think this is because there is nothing you can find out in general i.e. you can have many edge disjoint paths for every pair of vertices but it is still possible for the graph to have vertex connectivity $1$.
For example suppose you have two complete graphs $G, G'$ on $n$ vertices each. Now let's merge these two graphs in the following way: Construct a new vertex $v$ and connect $v$ with every vertex in $G$. Also connect $v$ with every vertex in $G'$. Call this new graph $G''$. If you choose any two vertices $u, w$ from $G''$ you will find that there are always at least $n - 1$ (actually it is even more, $n$ would work too for example) edge disjoint paths between $u$ and $w$. But obviously the graph $G''$ has vertex-connectivity $1$.


How to unblock account?

Question: I have been blocked from asking questions. I've gone back and answered my own questions. My goal for joining this community was to develop relationships with other members, ask questions, and learn. I would like to be able to pursue my goal to acquire knowledge and experience. Is there something wrong with this?
Answer: The best available information I could find on this is here.  Basically the ban is automatic, and outside of moderator control.
I just took a look at some of your questions, and it appears they are largely about Math and or Statistics, not really Data Science per se.  Some others were quite broad, and were closed as such.

How to unblock account?


Why is Robinson arithmetic "Q"?

Question: I see Peano arithmetic so often abbreviated as "P" or "PA". Why is Robinson Arithmetic "Q"? Following the obvious pattern, I would have expected R" or "RA".
Answer: I think that there is no special reason here.
See Alfred Tarski & Andrzej Mostowski & Raphael Robinson, Undecidable Theories (North Holland, 1971); Ch.2 : Undecidability in Arithmetic (page 51) deals with the :

formalized arithmetic of natural numbers [...] referred to as Theory $\mathsf N$.
We shall be interested in some axiomatic subtheories of $\mathsf N$ referred to as Theories $\mathsf P, \mathsf Q, \mathsf R$.

And see also the footnote on page 39:

A finitely axiomatizable and essentially undecidable subtheory $\overline {\mathsf Q}$ of the arithmetic of natural numbers was first constructed by Mostowski and Tarski in 1939. [...] R.M.Robinson has shown that Theory $\overline {\mathsf Q}$ can be replaced by a weaker theory based upon a simpler axiom system, in fact, by Theory $\mathsf Q$.
Comment: @JasonHemann - what about the "sequence" P,Q,R ?
Comment: Can you talk more about how that passage from Tarski et al. 71 leads to you the conclusion that there's no real reasoning behind the name?
Comment: That's a thought. I'd sure feel more comfortable with something stronger to confirm it, though. I don't have access to that book/page. I haven't traced back the reference to Mostowski & Traski '39, to see what they called their axiom system, if any, or Robinson's original paper on the subject. If Tarski et al. is the origin of that nomenclature, then I'd be sold. But for some reason I'm doubting that it is, so to me, the question still seems open.
Answer: So far as I know, there are two interpretations why Raphael Robinson uses $\mathsf{Q}$ represents Robinson Arithmetic.

By John Baez, $\mathsf{Q}$ is the name of a character in Star Trek who could instantly judge whether any statement was provable in this system, or not. While Star Trek came out in 1966, and Robinson Arithmetic was first considered by Raphael Robinson in his 1950's paper:

Robinson, R., (1950) 1952. An Essentially Undecidable Axiom System. In: Graves, L. M., Smith, P. A., Hille, E. and Zariski, O. ed. Proceedings of the International Congress of Mathematicians, Cambridge, Massachusetts, U. S. A. August 30-September 6, 1950, Volume I. Rhode Island: American Mathematical Society, 729-730.

and the symbol $\mathsf{Q}$ already appeared on page 51 of his 1953's book:

Tarski, A., Mostowski, A. and Robinson, R., 1953. Undecidable Theories. Amsterdam: North-Holland Publishing Company. Reprinted by Dover Publishing Company, Inc. in 2010.

So the interpretation is not suitable.

In my opinion, the suitable interpretation for Robinson's using $\mathsf{Q}$ to represent Robinson Arithmetic is that $\mathsf{Q}$ is after $\mathsf{P}$ in order since in his 1953's book Robinson uses $\mathsf{P}$ to represent Peano Arithmetic, and Robinson Arithmetic is the subsequent theory they consider.

Why is Robinson arithmetic "Q"?


Xbee Explorer Regulated (WRL-11373) - Current draw

Question: Can anyone tell me roughly how much current the WRL-11373 draws?  I've googled and looked on Sparkfun but can't find any info on it. It says here that the max supply current is 500 mA.
Answer:
Figure 1. The module 5 V to 3.3 V regulator. Source: XBee Regulated - V14.
The 500 mA specification is the maximum the board can supply at 3.3 V, not what the board itself consumes. This is determined by the MIC5219 voltage regulator.
Actual consumption of the board will be the tiny current required by the level shifters (if I understand its function correctly) and whatever the board is feeding at 3.3 V.
Comment: I'll be using the XBee Explorer Regulated to power/control an [XBee Pro S1](https://www.sparkfun.com/products/8742) which consumes 55 mA.  So I would add this to the level shifter current draw nA or μA?
Comment: So your board will need a 55 mA supply then.


How to set up APT preferences in the presence of apt-cacher-ng?

Question: The problem is the following: there are a number of nodes that use apt-cacher-ng. The all apt URLs are in the form:
deb http://192.168.1.2:3142/archive.ubuntu.com/ubuntu/ jammy-updates main restricted
deb [arch=amd64] http://192.168.1.2:3142/HTTPS///packages.microsoft.com/ubuntu/22.04/prod jammy main
deb http://192.168.1.2:3142/HTTPS///developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /

Now setting up APT preferences in the following form has no effect whatsoever. E.g. the following content in files in directory /etc/apt/preferences.d
Package: dotnet* aspnet* netstandard*
Pin: origin *microsoft.com
Pin-Priority: 500

Package: dotnet* aspnet* netstandard*
Pin: origin *ubuntu.com
Pin-Priority: 1

How should one configure APT preferences when using apt-cacher-ng? Pin: origin does not seem to work, so there must be some other trick how to achieve that. I could not find it with reasonable search.
It is necessary to use preferences, because e.g. dotnet packages from Ubuntu and Microsoft and nvidia CUDA packages from NVidia and Ubuntu have similar names on top level, but dependency names vary and cause the SDKs to be unusable when mixed. Cacher is used for obvious reason, just xN less network traffic to pull updates.
Answer: Instead of pinning by server address, you can pin using information contained in each repository. In particular, you can use the "Origin" field in each repository's Release file:
Pin: release o=Ubuntu

for Ubuntu repositories,
Pin: release o=microsoft-ubuntu-jammy-prod

for the Microsoft repository,
Pin: release o=NVIDIA

for the NVIDIA repository.
To determine which value to use, retrieve the relevant Release file (e.g. https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/Release) and look for the "Origin" entry at the top of the file.


If $(X,\tau)$ has no open connected set, must $(X,\tau)$ be totally disconnected?

Question: Let $(X,\tau)$ a topological space and suppose that for all open sets $U \in \tau$ we have that $U$ is disconnected. Can we conclude that $(X,\tau)$ is totally disconnected, i.e. its connected components are singletons? I'm mostly interested in the case where $X$ is second countable completely metrizable.
Answer: Not in general. Consider $A=\{w\in\Bbb{C} : |w| \in \Bbb{Q}\}\subset \Bbb{C}$. Any open subset of $A$ is disconnected, but the connected components are circles with rational radius.
Alternatively for a complete space, require $|w|$ is in the cantor set. Since the cantor set is closed, then this will be a complete metric space with the property you are interested in.
Answer: Let $$X=\big(\{0\}\times \mathbb R\big) \cup \bigcup _{n\in\mathbb N} \big(\{1/n\}\times \mathbb P\big) ,$$
where $\mathbb P$ is the set of irrationals.  Then $X$ is separable completely metrizable, has no connected open subset, but is not totally disconnected.
Answer: The components of $[0, 1] × 2^ω$ are the copies of interval and they are nowhere dense. The space is even compact metrizable.


I own 35% of a family business. Should I be receiving 35% of the profits of the company?

Question: I own 35% of a family business. I resigned from the company but still own 35%, should I be receiving 35% of the profits of the company? It is a small business and they are refusing to buy out my shares at this time. It is an incorporated company but I don't know if it is C or S corp and I reside in the US
Comment: Did you ever receive a form K-1 to file with your tax return in any given year? What do you mean when you say you "resigned" from the company?
Comment: I have never received a K-1 from the company. I no longer work for the company but I still have my ownership in the company.
Answer: Shareholders of corporations receive dividends when the corporation elects to pay out profits in that form.  So if they pay dividends to shareholders of your class (it is possible to establish multiple classes of shareholders) then you will receive 35% of the dividends paid.  But if it's a C-Corp (which it almost certainly is because you claim to have never received a K-1), then the company is generally not obligated to make distributions to owners.
Answer: Though you are entitled to 35% of the profits of the company, a lot depends on what the directors (no longer including you) decide to do with the profit.

They may decide to pay it out as dividends, in which case you are unarguably entitled to a 35% share, Since you've received nothing, this is probably not the case.
They may be retaining the money in the company (either in a bank account or something like new equipment), in which case the company, including your 35% share, becomes more valuable for when it is sold. (You say the others will not buy you out; can you sell your shares elsewhere?)
Most probably, as other answers say, they are managing the business so that it does not show any measurable profit. This may or may not be legal in your State. In favour of it is that the directors are entitled to run the company: against it is that they run it on behalf of the shareholders, not just on behalf of 65 % of them; if they have really decided to give Uncle Fester a 100% pay rise in order to keep profits down, that is probably abuse of their position, and you should consult a lawyer.

Regardless, your first action should be to write to the company (probably the company secretary; definitely not to one of your relatives personally) and ask for accounts of the company, to which you are entitled as a shareholder. Presumably, since you used to work there, you know roughly what the accounts should look like; if not, an accountant can help, and probably tell you whether it is worth engaging a lawyer
Answer: In addition to Feetwet's answer (that you should get a share of dividends), it is quite likely that there will be no profits, because the 65% owners will likely pay themselves just enough salaries and bonuses to take the profits down to zero.
The majority owners of a company is in a strong position to determine the amount of taxable income they get vs. the amount of profit that the company makes, and will arrange that to their maximum profit. For example, a UK one person LLC will usually pay the company director the minimum wage, and everything else is profit, which then is paid out as dividend, because that optimises total tax payments. In your situation obviously it would be different; they would minimise profits because 35% of the profits are yours, and instead pay high salaries even if that means a total higher tax payment.
Even if there are profits, then it is likely that the company has no obligation to pay dividends to the shareholders. If I owned the majority, I'd be tempted to keep all the profits in the company, and when I want to retire, I just stop working but pay myself a salary until all the money is gone. And it may be possible, depending on how the company was set up, that some shareholders would get different dividends than others.
Comment: The board (or in this case the owners) have a fiduciary duty to all stockholders. Yes, if they are also the managers they can (and they must) pay themselves a salary as managers, but that salary must be in line with the salaries paid to managers in other business. Reducing the profits in this or other way (for example passing personal expenses to the company) would be fraud (although it may be difficult to prove)


python - Converting entry() values to upper case

Question: I want to make the values I type on Entry field to be automatically converted to uppercase. I have code in here that only accepts uppercase letters to be typed in the entry using validatecommand.
from tkinter import *

root = Tk()
def text(a,b,c):
    ind=int(b)
    if c == '1': #insert
        if not a[ind].isupper():
            return False
    return True

 entry = Entry(root, validate="key")
 entry['validatecommand'] = (entry.register(text),'%P','%i','%d')
 entry.pack()

root.mainloop()

Comment: If the user can't enter anything other than uppercase, why do you need to convert it?
Answer: If you want to convert the entry content to uppercase instead of preventing the user to insert non uppercase letters, you can associate a StringVar to your entry and use its trace (trace_add since python 3.6) method to convert the entry content to uppercase each time the user modifies the entry.
trace takes two arguments: the mode and the callback. The mode determines when the callback is called.  The modes are:

'w' ('write' for python 3.6): the callback is called when the variable is written (it's the mode I use in the code below),
'r' ('read'): the callback is called when the variable is read,
'u' ('unset'): the callback is called when the variable is deleted

For more details about the arguments of the callback, see What are the arguments to Tkinter variable trace method callbacks?
import tkinter as tk

def to_uppercase(*args):
    var.set(var.get().upper())

root = tk.Tk()

var = tk.StringVar(root)
e = tk.Entry(root, textvariable=var)
e.pack()
try:
    # python 3.6
    var.trace_add('write', to_uppercase)
except AttributeError:
    # python < 3.6
var.trace('w', to_uppercase)

root.mainloop()

Answer: You can bind to an event instead of using .trace (in python 3.x, not tested in 2.x).
The following is copied verbatum from the accepted answer (by "bevdet") to
https://bytes.com/topic/python/answers/897918-how-do-i-make-tkinter-text-entry-all-uppercase.

You can bind an event to your widget that calls a function to convert the text to upper case.
You will need to initialize a textvariable for the Entry widget. In your case, there is nothing else to take the focus, otherwise you could bind < FocusOut > to the widget. < KeyRelease > works nicely however.
from Tkinter import *
win = Tk()

def caps(event):
    v.set(v.get().upper())

Label(win, text='Enter user nick:').pack(side=LEFT)
v = StringVar()
w = Entry(win, width=20, textvariable=v)
w.pack(side=LEFT)
w.bind("<KeyRelease>", caps)

mainloop()

I was able to use this method in combination with custom validation (See B. Oakley answer to
Interactively validating Entry widget content in tkinter) by placing the binding OUTSIDE the validation function, immediately after creating the Entry widget. Important: Do not put the binding inside the validation function, doing so will break the validation function (see accepted answer to Python tkInter Entry fun for explanation and a possible workaround).


The use of me and I do?

Question: When responding to "Who sees the hammer?" When the person who sees the hammer answers the questions. Should they use "me" or "I do"?
Answer: "I do" is correct in terms of proper formal grammar, but "me" would be commonly used and not generally thought incorrect. For some audiences, you may find you are expected to use "I do".
Comment: Both *I do!* and *Me!* are grammatically (and idiomatically) correct. Personal pronouns are by default accusative when they stand alone. The difference is in formality: the first reply would be considered neutral, while the second is markedly informal (in my opinion as a non-native speaker of English).
Comment: @SamBC Yes, many English-speaking people, both native and non-native, have been taught antiquated grammar rules which no longer obtain in present-day English (or that have never really applied). Language isn't defined by textbooks, but by people who speak it. Textbooks (or grammars) may only attempt to describe it, and prescriptivism may only reasonably follow afterwards. There's no need to teach, or insist on a version of English that isn't used. Such prescriptivism is potentially harmful in the short term (resulting in stiltedness), and a pipe dream teaching "zombie rules" in the long term.
Comment: I think you're probably right that ***I*** is "correct", but I can't help thinking that it's simply not "idiomatically acceptable" as a *single-word response*, in any context at all (except maybe poetic / theatrical). But whereas affirmative ***I do*** doesn't sound particularly formal to me (even though it's effectively competing against definitely informal ***Me***), the two-word negative response ***Not I*** seems very dated / poetic / formal to me.
Comment: ...anyway, ***I*** could certainly give scope for confusion in response to [***Who will bell the cat?***](https://grammarist.com/idiom/bell-the-cat/) Where I imagine all the other mice at the meeting would be shouting ***Aye!*** with the meaning ***Yes, I absolutely agree! That's a very good question to ask!***
Comment: @userr2684291: You must recognise that there are many native speakers who do insist on the unique correctness of the grammar as defined by Victorian grammarians. Hence answers distinguishing between what's fine in actual use, and what's actually right according to textbooks. A lot of non-native speakers who teach English as a foreign language stick to the "official" version (not that there is an official version, but you know what I mean)
Comment: @userr2684291 When answering questions here, I bear in mind that some people will either be learning English as a foreign language and have to cope with what their teacher expects, or will be working with native speakers who are hidebound about grammar. Hence giving people answers that cover both that and general usage.
Answer: They should say "I do." Think about replacing "who" in the question with a pronoun to turn it into a statement. The correct sentence is "I see the hammer," not "Me see the hammer."
EDIT: see comments below. I realize now that this answer is in fact specious, as another commenter pointed out. "Me" is very informal but not incorrect when it stands on its own as an answer to the question. I am leaving my original answer above so it might be used as a learning opportunity for future users of this StackExchange community.
Comment: Alright... you got me. Is "me" an acceptable informal response that is used and understood by most people? Of course it is. Fair point that "me" being ok does not mean that "me" being used as a subject pronoun would also be ok. I also agree with @FumbleFingers that "I" by itself does not work as an answer to the question.
Comment: The fact that this specious argument has been advanced many times over the years does not make it one whit less specious. We do not always communicate in sentences. The fact that "me do" would not be grammatical says zero about whether or not "me" is grammatical.
Comment: @ColinFine: But per my [comment below](https://ell.stackexchange.com/questions/196162/the-use-of-me-and-i-do#comment383106_196164), although it's not *grammatically / syntactically* necessary to explicitly include some kind of verb, I think it's *idiomatically* expected in almost all contexts. At least where the "verbless subject" is ***I*** (my qualms on that front don't seem to extend to ***John, Him,*** or ***You*** as possible one-word responses).
Comment: @FumbleFingers: I'm not sure what you're saying. "I do", "You do", He does", "John does", "Me", "Him", and "John" are all idiomatic answers, and "I" and "He" are unidiomatic (literary) answers. What has that to do with Mixolydian's argument?
Comment: @ColinFine: I'm assuming that M's answer here is based on the assumption that a single-word answer (just subject, no verb clause) is somehow "ungrammatical", and I'm agreeing with you that this isn't a valid position (*and* agreeing that ***Me*** isn't "invalidated" by the fact that expansion to ***Me see it*** doesn't work). The only issue I see is that single-word ***I*** isn't idiomatic - and one *possible* way to get around that is to make it a two-word response by drafting in ***do*** as an auxiliary helper substituting for ***see***.

The use of me and I do?


Ubuntu remembers every drive ever connected and every dvd ever inserted and PCmanFM shows it in folder panel

Question: I am using PCManFM 1.2.5 as file manager on Ubuntu 18.04.2. When I go to my media folder, there I find listed the names of every external drive I ever connected and every disk I ever inserted in my dvd drive and even for my WLAN stick a separate entry for every time I connected it to the computer. How can I get Ubuntu to empty this list daily or forget about the devices as soon as they get disconnected?
Comment: How do you `mount` your partitions/devices? Are you using Lubuntu (LXDE) or Ubuntu (GNOME) or another desktop on your 18.04.2 as I haven't seen that behavior before, and cannot re-create it on my Lubuntu 18.04.2 system. Do you correctly `umount` or `eject` the devices before unplugging?  (as I always do that, and possibly missing this step that causes the `mount` directory to never be wiped)
Answer: You probably didn't unmount the drives appropriately; this is a common misconception when people are switching from Windows. This usually results in the mountpoints still being available, and shown in file managers.
Just make sure, before you remove an external drive, to hit the unmount or eject button next to the drive name in PCManFM, or in the drive list in the system tray.
To remove the remaining mountpoint directories,

make sure no external drives are currently plugged in/mounted,
perform this command:
sudo rmdir /media/*

Comment: Maybe put that in your boot up?
Comment: @WinEunuuchs2Unix I wouldn't recommend that; this workaround is just for cleaning up, but the default action should always be proper unmounting.


Why did my neural network performance change when I re-arranged the input variables?

Question: I have a data-set of 4184x20 and 4184x1, 20 are input parameters while 1 is my target variable. When I first trained my network, it gave a specific value of m.s.e, but a strange thing happened. When I re-arranged the variables or simply swapped the position of some variables, my NN performance has changed. Why is that so? Can someone guide me, I am new to this method. Thank you
Comment: Please clarify whether you a) trained a set of network weights on the original data and then found test mse by feeding it re-ordered data or b) trained one set of weights with the original data, recorded its training/test mse and then trained another set of weights with the re-ordered data and then recorded its training/test mse. Please update your question so everyone is clear about what problem we are discussing.
Comment: Did you retrain it after the swapping?
Comment: Basically I made the initial weight of the neural network to be constant i.e. '1'. So every time I train my NN, it gives same mse. However, mse changed by reordering the variables. Also giving the same result whenever retrained since weight was constant
Comment: Reordering the input variables and getting wildly different results definitely should not happen, since MLP are considered "permutation invariant wrt the inputs". I suggest you put more detail in your question: what exactly are you doing, what software and what kind of MLP are you using?
Comment: I have a set of 20 inputs and applied variable reduction techniques on them. Created 2 reduced models say 'a' and 'b' and want to test their accuracy against the model which had all inputs present i.e. 20,for this I used matlab gui, I added this line of code to make initial conditions same every time I train, otherwise I can't compare my models efficiently based on different initial conditions. 'RandStream.setDefaultStream(RandStream('mt19937ar','seed',1));' But when I reordered my inputs, I came up with the question posted. Even with the same initial conditions, getting different performance.
Answer:
When I re-arranged the variables or simply swapped the position of some variables, my NN performance has changed. Why is that so?

Most neural networks are sensitive to the ordering of the input variables. For example, if you consider this neural network:

You'll see that the output when $(x,y)= (1,2)$ isn't equal to the the output when $(x,y)= (2,1)$.
Note that some neural networks aren't sensitive to the ordering of the input variables, for example:

Related: Why is the cost function of a neural network non-convex?:

(written by Abhinav, user contributions licensed under cc by-sa 3.0) If you permute the neurons in the hidden layer and do the same permutation on the weights of the adjacent layers then the loss doesn't change. Hence if there is a non-zero global minima as a function of weights, then it can't be unique since the permutation of weights gives another minima. Hence the function is not convex.
Comment: Here's one possibility.   Back propagation is  gradient descent and will find a local minima of the mse function.   The local minima  one finds depends on the initial conditions.  If one keeps all the data constant, one will always get the same local minima using gradient descent. Changing variable order will not effect gradient descent.  However, if the guts of the algo is using stochastic gradient descent or some other shortcut, then the local minima is no longer permuation invariant and changing variable order could create different initial conditions.


Einstein's train experiment-Do waves from lightning flashes meet after the same number of cycles for all observers?

Question: In Einstein's thought experiment about moving and stationary observers and two lightning flashes, let's say that we replace the lightning flashes with a pulses of mono-chromatic light, with both sources being the same wavelength in the frame of the sources.  For a stationary observer exactly half-way between the light pulses, the pulses will complete the same number of cycles by the time they reach the observer.  Is that also true for any observer who is half way between the pulses when they flash, but moving relative to them?
Comment: Are the flashes simultaneous in the lamp frame or in the observer frame?  Currently it's unclear what you're asking.
Comment: Wait, if the pulses are not simultaneous wrt the moving observer, what is meant by saying that he is halfway between the pulses when they flash? Are you assuming that they are simultaneous wrt the moving observer? I am asking to confirm because this thought experiment is usually done in a set-up where the flashes are simultaneous for the stationary observer (and thus, not so for the moving observer).
Comment: What I was thinking was that the observer in the moving train would be facing the observer (the same x) in the relative non-moving frame at the moment that the lights flash simultaneously for the observer in the relative non-moving frame.  @DvijMankad
Answer:
For a stationary observer exactly half-way between the light pulses, the pulses will complete the same number of cycles by the time they reach the observer. Is that also true for any observer who is half way between the pulses when they flash, but moving relative to them?

The number of pulses is directly proportional to the phase of the wave, $\phi$, specifically it is $\phi/2\pi$. Fortunately, the phase is a relativistic invariant which is rather easy to calculate in terms of four-vectors. I will use units where c=1 for convenience and $\cdot$ indicates the Minkowski product between two four vectors, not the usual dot product. Then for the phase of a wave emitted at position $x_i$ with a wave k-vector of $k$ we have:
$$\phi_i = R\cdot K = (t,x-x_i)\cdot (|k|,k)$$
So if we have two coherent sources at different locations emitting their waves towards each other then the phases will be equal at
$$\phi_1=\phi_2$$
$$(t,x-x_1)\cdot(k,k)=(t,x-x_2)\cdot(k,-k)$$
$$k t - k(x-x_1)=k t + k(x-x_2)$$
Which you can solve for $x$ to obtain
$$x=\frac{1}{2}(x_1+x_2)$$
So this shows that only the observer who remains at the mid point between the sources in the frame where they are coherent will see equal phases from each.
Alternatively we can find $\Delta\phi=\phi_2-\phi_1$. After simplification that gives us
$$\Delta \phi=k(2x-x_1-x_2)$$
This quantity is positive for $x>(x_1+x_2)/2$ meaning that the phase from the source on the right is greater if you are to the right of the midpoint.
Comment: Oh I see that now.
Comment: Does the moving observer see more phases from light that that they are moving towards or away from?  Obviously the one they are moving toward has a higher frequency, but will arrive at the observer first, while the other will have its frequency reduced but will arrive later.  I thought at first that the two effects would cancel out.
Comment: More phase from the one that they are moving towards. I have updated the answer to explain that. The reason you have more phase from the one you are moving towards is that at any moment the light you are receiving from the closest was emitted later than the light you are receiving from the furthest.
Comment: how can the light you are receiving from the closer source have been emitted later that the light you are receiving from the farther source?  Don't you see the light from the closer source first?  Also, I know it's off the topic, but since more cycles are passing you in the direction you are moving than in the direction you are coming from, doesn't that slow you down?  (It should vary by your mass but it seems like more energy is hitting your front than back.)  Are there any implications of that?
Comment: "how can the light you are receiving from the closer source have been emitted later that the light you are receiving from the farther source?" Just work out the numbers. The speed of light is about 1 ft/ns. Suppose that the sources are 6 ft apart and at t = 10 ns you are 2 ft to the right of the center. Then you are at that moment receiving the right light from t = 9 ns and the left light from t = 5 ns. So the light from the right was emitted later.
Answer:
Is that also true for any observer who is half way between the pulses when they flash, but moving relative to them?

Well there's a lot to consider. One thing is that the flashes can't be simultaneous in the moving observer's frame, if these flashes are the same flashes that the non-moving observer observes to be simultaneous.
Let's call the moving observer Joe. Let's say there are "buoys" lined up on the path of the light pulses. The buoys bounce up and down when an EM-wave passes them. Let's say Joe is far from the line of buoys like this:
Beacon......buoy1......buoy2.....byoy3......buoy4......Beacon
.
.
.
.
.
<code>                     Joe
</code>
Joe sees the beacons moving to the right,the buoys co-move with Joe. First Joe sees buoy1 bounce 10 times rapidly (the pulse consists of 10 wave-crests). Later Joe sees buoy4 bounce 10 times slowly (Doppler-shift is the cause of the slowness). If Joe sees buoy3 and buoy4 to bounce very slowly then Joe would see those buoys bouncing in sync, which would cause Joe to say that the buoys are on the same wave-crest.
Now Joe might say: "I saw 20 waves on the left side and 10 waves on the right side".
What Joe really saw at the left side was:
first he saw EM-field waving 10 times at the position of buoy1
then he saw EM-field waving 10 times at the position of buoy2
Joe did not see any buoy waving 20 times, so he did not see any EM-field waving 20 times either. The "number of waves" was 10, the same number as the "number of waves" at the right side.


How does the EBQ formular come out?

Question: I figured out how the economic order quantity (EOQ) formula comes out. I know it is quite similar with economic batch quantity (EBQ), sometimes termed economic production quantity (EPQ). I just don't understand why they are different. What makes the difference in holding cost part?
Answer: In a way EBQ (also known as EPQ) EPQ is an extension of the EOQ model, the difference being

In EPQ the company will produce its own parts
In EOQ parts are produced by another company

Note that if you produce stuff you need to store it somewhere, which comes at a cost. This is explicitly included in the EPQ model via the holding cost variable
Answer: The models underlying the economic order quantity (EOQ) and economic production quantity (EPQ) formulae assume (realistically in many circumstances) that an order for $Q$ units of a good is delivered all at the same time, whereas production of a batch of $Q$ units occurs over a period.
In the case of ordering, immediately after an order has been delivered the stock is $Q$, and the stock then falls gradually to zero when (assuming timely ordering) the next order is delivered. The average stock is therefore simply $Q/2$.
In the case of production, however, the stock rises during production of a batch, and falls once production of the batch has been completed.  Suppose annual demand for use of the good is $D$ and annual production (if it were continuous) is $P$, with $P>D$.  Immediately after completion of a batch the stock will be $Q(1-D/P)$.  It won't just be $Q$ because (assuming uniform demand), units of stock will be withdrawn for use not only after the batch is completed but also while it is being produced.
Therefore, writing $K$ for the fixed order cost and $h$ for the unit holding cost per year, to find the EOQ we find $Q$ that minimises total annual cost $C$ where:
$$C = \frac{DK}{Q} + \frac{hQ}{2}$$
The first term on the right is the total of the fixed costs of placing orders, $D/Q$ being the number of orders in a year, and the second term is the total holding cost over a year.
To find the EPQ, however, we need to minimise (interpreting $K$ now as the fixed production setup cost):
$$C = \frac{DK}{Q} + \frac{hQ}{2}\Bigg(1-\frac{D}{P}\Bigg)$$
The respective economic quantities may then be found by differential calculus.

How does the EBQ formular come out?


Does Magento have an image gallery like wordpress?

Question: I want to bulk upload images to be used later.  Is that default in Magento?
Answer: Yes there is, but it is for CMS content and not available to use for products and categories.
For products, you can certainly upload in bulk to the media/import directory, and then use these images at a later date by running an import, referencing those files in the import file.
Answer: There are lots of extensions for galleries on Magento stores (for example this)


Microwave Ignorance

Question: I have two identical ceramic coffee cups, but when I put them into the microwave (oven) with the same amount of water, for the same amount of time, the handle of one cup is discerningly hotter than the other. Why is this? I speculate that it has something to do with density because when I tapped each handle with a spoon the tones were very different, but again that is total speculation.
Comment: Usually when the handle gets really warm it means that there is a piece of wire in the handle.
Comment: They're ceramic coffee cups? Perhaps one of the ceramics has a higher thermal conductivity than the other. Or perhaps one of the ceramics absorbs a bit more microwave energy than the other. Re-doing the microwave test with both coffee cups empty might provide a clue. If you do that, it's probably best to also put third cup which is filled with water into the microwave along with the two empty cups so that the microwave isn't operating under a "no-load" condition.
Answer: Ceramic objects are porous, and always have unglazed areas to allow internal gases to escape during firing. Look at the bottom of your cups; their bottom surfaces are almost certainly raw ceramic.
But, just as gases can escape through these areas, liquids can be absorbed into them. Run your cups through a dishwasher, and they may start to accumulate water inside the ceramic's pores. And bingo: water absorbs microwaves and heats up.
My guess is that the cup that heats up has absorbed more water, perhaps by cooling down in a saucer of water (sucking in water), or being washed bottom-up in a dishwasher more often. Although I've never tried it, putting the cups in a warm oven for a while might drive out the absorbed water, reducing the unwanted heating.

Microwave Ignorance


Adding chinese input to Gboard keyboard

Question: How do I enable chinese input to Gboard keyboard? I already have Google Pinyin Input enabled, but when I try to add a keyboard to Gboard, Chinese doesn't show up. When I long click on the keyboard to switch languages, nothing else shows up either.
Answer: 3/16/18 update -
Chinese has been added to the supported languages in the latest version.
Original answer -
Chinese is not supported in GBoard yet (as of 2/20). Neither are other East Asian languages such as Japanese and Korean. There's rumor that it'll be added in the upcoming versions.
For a full up-to-date list of languages supported, refer to this link -
https://support.google.com/websearch/answer/6380730#languages

Adding chinese input to Gboard keyboard


To Bake, or not to Bake

Question: Is Baking necessary every time? Or are the times when you just don't really need to? For instance, animation render vs video game engine style export. If so, or not, would it be the same for all 14 baking options in bake mode?  Can you bake only from the Properties panel?
Answer:
Is Baking necessary every time?

No.
To explain, there are some times, when it is just more of a hassle then it is worth.  For instance, when using the Blender Internal engine, which can be pretty fast, you can be using basic enough materials that by the time you finished baking, you could have finished rendering.
Regarding animation rendering and video games, that depends as well.  Non-moving lights and objects will benefit from baking, as they do not move, but the camera moves.  In videos games, the player is typically moving around the scene, which prevents lighting from being baked onto the model, as it needs to be dynamic.
About the 14 different baking modes, each one will obviously do something different, otherwise it would be one big button that says "Bake".  The other modes are important for each specific task.  For instance, baking colors, or textures, while they seem similar, using them incorrectly will most likely take a lot of time, and not produce the result you are looking for.
I am pretty sure that there are other locations you can bake from, I think at one point (stretching back here) I had a scene where I just wanted to bake a shadow for one object, so I did.  I believe you select the image you are baking, and select the object, and then you click bake, and it will bake for that one object.  I think I followed Blender Guru's tutorial here.

To Bake, or not to Bake


Building a pergola on a new patio slab - wood quality

Question: I'd like a pergola with natural wood color and grain appearance.  I live near the west side of the Sierra Nevada, where drought and beetles have decimated the Ponderosa pines.  An acquaintance has access to logs that were cut and given away by the Forest Service; he has a small mill and will sell me lumber cut to my specs for half what the lumber yard charges. This wood has not been treated in any way.  So, is this a good route to go?  What would I need to do to keep this wood from warping?
Comment: What kind of service life do you want? Or to put it another way, how long would you like it to last and in what condition? Untreated wood (of species not naturally resistant) is acceptable outdoors in the right context, you can of course treat the wood yourself to extend the service life but with nothing done to it you can still expect years without much issue although of course the wood will weather (go grey and expect at least some cracking)..
Comment: Well if you lock it into a structure that will help prevent warping to some degree.  A pergola is usually a lot of interlocking "lincoln log" type pieces that form a grid.  The quicker you put it together the less it will be **able** to warp due to the grid structure locking it in place
Answer: It seems like you have 3 questions:

Is Ponderosa Pine a good choice?

It's not a great choice as the heartwood is rated as moderate to low in decay resistance. It depends on your local climate and how long you reasonably expect it to last without refinishing/coating.
However, economics might make it into a better choice for you. It is certainly going to be among your cheapest wood options (even without your friend's deal) and depending on your experience and expertise, it is going to be a pretty easy wood to work with.
Before you choose too quickly, consider Choosing Wood for Outdoor Projects that are also fairly economical (which one depends on what's locally sourced & available).

Does it need to be treated?

Wood, when left outside, will begin to decay -- especially porous softwoods like (most) pines. Generally speaking though, you only "need" treated wood for ground contact -- which is something you can avoid by using a hardware standoff or a spacer of treated wood. The rest can be finished using an outdoor coating to reduce UV and moisture.
This is a project for your own enjoyment. It's not structural and can be made with and how you like.

How do I keep it from warping?

Warping can happen, but as long as things are fastened (by hardware or joinery) on both ends, it's unlikely to do much. Also, you tend to work with larger dimensions (ie. 4x4 or 6x6 posts) that are less prone to excessive warping.
If you're in a rainy climate, limit the amount of truly flat surfaces. Usually you can put a slight pitch on horizontal surfaces that doesn't change the appearance and will last significantly longer.
Good luck with your project.


Is there a way to make a ball roll using rigid body physics?

Question: I know you can do this in Blender Game, but is there anyway to have a ball rotate as if it were rolling in Blender Cycles?
Comment: Is there a bit of a misunderstanding here? This problem is not related to the Cycles renderer?
Comment: I agree with Robin Betts on his comment
Comment: It was more to clarify that I didn't mean blender game because in the game engine, you would change dynamic to rigid body physics, but cycles and internal don't have dynamic physics.
Answer: I show how to do this with Blender V2.79b and also with V2.80 Beta just to complete the exercise.
In Blender V2.79b do the following:

As a test create a plank from a cube and place a sphere above the plank as in the image.
Select the Sphere
In the Tools click the Physics tab and click Add Active button while the sphere is selected, see below

Select the plank.
In the Physics tab click Add Passive button, while the plank is selected, see below

Switch to Cycles Render and add any material you wish to the plank and the ball to see the ball rolling. This step is not necessary but it was part of the question, hence the inclusion.
Click the play button and you will see the ball dropping on the plank and start rolling down.

Make sure the plank is steep enough, otherwise it may not roll.
See result below.

In Blender 2.80 you can create the same. In this example for the plank and the ball I just assigned a random colour material with some noise node.
For the sphere set Physics, see below.

For the plank you set Physics as below

The result is below
Comment: The question was related to Blenders Cycles, hence I included that step but could have done the switch to it any time in this process.
Comment: I think the problem I had is that the friction was too low so it would just slide around instead of rolling. After turning up friction, it rolled fine.
Comment: UV, perfectly good answer.. but why step 6? The renderer doesn't matter to this stage of the process...
Comment: Glad to hear it is working now :-)


Directories not writable

Question: After installing civicrm in wordpress i have this error, see screen cap,
All my directories ../plugins/civicrm and ../uploads/civicrm have all permissions.
And when i click on details, i have no response.

I have forgotten a directory ?
Thank you
Answer: Ok, I found the problem, disk space exceeded on server. That is the reason it could not write.

Directories not writable


How do I train a CNN on multiple images that have the same shape?

Question: I want to train a convolutional neural network on multiple input images. My image is 240x360 and is in RGB. Therefore my input image has a shape of 3x240x360. Now I want to use multiple images of the same size. Do I stack the images and increase the input channel size of my CNN or do I have to create another CNN and then concatenate the tensors later on? I assume both could work but would there be a difference between the two implementations? You can imagine that my problem is like with a self driving Tesla. A Tesla has 8 video streams that all have the same dimensions. The images will probably share the same features e.g. a car or a pedestrian, but in which image it occurs in will make a difference in meaning. What would be the best architecture for this?
Comment: What is your input layer size? If your input layer is 360 x 240 and if you give larger than that, you object in the image would be too small to learn for neural network. Have you consider utilizing GPU more to speed up training?
Answer: You can:

Just concatenate the channels of each input image, and then have the usual CNN , or
Define one feature extractor network (aka backbone), and apply each backbone on each input image such that to share weights among the inputs, then you have the "head" part of the network with the various layers (e.g., classification head, detection head, etc.)
Alternatively, if the content of each image is quite different you can train $N$ backbones (so no more weight sharing, and so saving parameters, as in approach 2), followed by the head part.

Also, in both approach 2 and 3 you need a way to combine the last feature maps of the backbone(s). To do so you can just: sum, multiply, or concatenate them.
To recap, the architecture in approach 2 or 3 would be: images -> [backbone(img) for img in images] -> combine (e.g., concat) -> output-head.
Indeed, approach 1 is the simplest but also likely to be less performant, whereas the approach 3 is expected to have best accuracy at the cost of increased training cost and slower inference speed. Therefore, approach 2 is the compromise between the two.
Comment: So solution 2 is like creating an auto encoder trained on all images and then concatenating the latent vectors as input to the head?
Comment: @ErikStorm Well, kind of. I prefer to call it a "feature extractor" which yields a feature vector (similar to a large latent space) or low-dimensional feature maps. Yes, then you can concatenate the vectors for the head part of the network.


How to list out disk-info?

Question: Edited after some development.
I'm trying to make a script that finds all computers in an Organizational Unit (in Active Directory), and lists out size of the drive and amount of free space available.
This is what I got now:
$ou = Get-ADOrganizationalUnit -Properties * -Identity 'ou=Brukere,DC=GGR11,DC=local'

$RemServer = "xxx.xxx.xxx.xxx" #AD IP
$s = new-pssession -computer $RemServer -Credential GGR11.local\administrator #Credential = navn på domenet\domene administrator

$computers = Invoke-Command -Session $s -ScriptBlock {Get-ADComputer -Filter * -Properties name } -ArgumentList $ou

foreach ($i in $computers){
    #Finner diskbruk for en maskinen
    $disk = Get-WmiObject Win32_LogicalDisk -ComputerName $i -Filter "DeviceID='C:'" |Select-Object Size,FreeSpace

    $disk.Size / 1GB
    $disk.FreeSpace / 1GB
}

This gives me an error:

Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

The firewall on both the server and client is down, and i can share files between the two.
DCOM is enabled on both server and target PC.
Default Authntication level: Connect
Default Impersonation level: Identify
The questions:

Can anyone please look over the script? Is there something I have done wrong?
What can I do to get rid of the error?
Comment: Nice. What is the question/problem here?
Comment: I've edited the post. Please have a look now.
Answer: Quoting from the WMI Troubleshooting Guide:
Error                     Possible Issues              Solution

0x800706BA - RPC Server   The computer really doesn't  Connecting to Vista: netsh
Unavailable               exist                        advfirewall firewall set
                          The Windows Firewall is      rule group="windows
Firewall issue or server  blocking the connection      management instrumentation
not available.                                         (wmi)" new enable=yes
                                                       Connecting to downlevel:
                                                       Allow the "Remote
                                                       Administration" rule in
                                                       Windows Firewall.

So, check which host $i is causing the error and double-check that the host is actually running and that the Windows Firewall is either disabled or has the abovementioned exceptions configured. Check if you can connect to Port 135/tcp on the remote host, for instance with telnet
telnet a.b.c.d 135

How to list out disk-info?


Accidentally deleted disk partition and cannot fix it

Question: I really don't know anything about programming language or so. I was trying to edit a usb pen drive partition but accidentally cleared ubuntu system disk partition. I later tried to boot the system and it kept failing to boot. I have a dvd which I used to install ubuntu 18.04 in the first place but it doesn't seem to work now. I tried many ways and found out two errors, swap/swapfile error and dependancy error. I don't have any idea how to fix it. Please help me. I have an important exam in about a month. I cannot afford a pc now.
Answer: Use GParteD, but, you may first want to enable recovery function on this application, also you can try to install gparted if not is installed using software
"sudo apt update"  && "sudo apt install gparted -y"


Cutting door w/ chipboard center

Question: Okay I bought a door from Habitat Restore. The men there told me what I was buying was a solid oak wood door. I wanted solid wood door because house has odd sized door (31 & a quarters inch wide by 72). Figured w/ solid wood door would be no problem cutting it down to size needed. After husband went to cut door to width it was found to have chipboard core. Not sure if door is usable now...it seems it would have been better to get hollow core door from YouTube videos watched as all you have to do is replace wood piece inside. Cant hardly find anything on cutting chipboard core door. Is it salvageable w/ it no longer having solid wood piece on side? Can only return for in store credit & doubt they will take after being cut.
Comment: This is a shopping question rather than a DIY question. But it sounds like you bought something based upon a misrepresentation, and you may want to ask them to refund your money.
Comment: No I was wanting to know if there is anything I could do w/ it...can it still be hung some how? Store has a return policy that only gives in store credit.
Comment: You can make a solid chipboard door that is usable. The Solid wood on the edge is largely decorative. Is a chipboard edged door what you want? They lied to you and you got less than promised. Who cares what they say their policy is?
Comment: A solid wood door would be a lot nicer! I can try to see what they would do to make up for them misrepresenting themselves. Just in case I get nowhere with them how would I go about making it usable...putting on door hinges & all?
Answer: I'd suggest you chuck the door. Chipboard won't hold hinge screws well, nor will it make an attractive surface for the strike side.
If you were desperate to use this door, you could cut a channel in the chipboard edge and insert/glue a 2" piece of solid wood. Getting a really clean surface inside the channel would be hard.
At 31-1/4, you're pretty close to a 32" door, so you shouldn't have a hard time finding something appropriate.
For what it's worth, many in the door industry call this kind of door "solid core". I'd give volunteers at the Restore a little leeway for getting the description wrong.
Comment: It is hard to tell if a solid core door is real wood or chip board with veneer unless looking at the holes for the knobs then you can usually see the chip board. + for a suggestion on repairing as the OP requested.
Answer: Your question is how to make the door you bought work, but it really should be how to install a new door. Might I suggest that you abandon the plan to fit a door into the existing door opening (jamb)? Since the existing door opening is not a standard size, you would need to either have a door custom made, or cut one down, and hope you can make it work.
It is likely that the existing opening is no longer square. Fitting a door into that opening will present a challenge. Even if you could cut it to fit the opening, chances are that the door couldn't be closed properly. There would probably be ugly gaps on the top or bottom as well.
The best solution would probably be to get a brand new pre-hung door. There are 2 standard widths available which are very close to the existing opening. You could go with either a 30", or a 32" door. Big box home stores typically carry solid wood doors in those standard sizes. If they don't have one in stock, they can usually order one in any size, or design that you would like. As long as they don't consider it a custom made door, you can get them for a reasonable price.
If you are trying to make the new door match another door in the house, you could have one custom made. Just be sure to give detailed measurements, and pictures of the original one. You would want to measure the height, width, thickness, as well as the size of all of the panels, and stiles and rails. Stiles are the vertical members of the door, and the rails are the horizontal ones.
You may be able to reuse the existing trim with the new door. You will just need to be very careful when removing it. If the existing trim will not work, you may need to have it custom made to match the original woodwork.

Cutting door w/ chipboard center


Can I play multiplayer on minecraft with one PlayStation?

Question: If you're playing minecraft on a PlayStation, and you want to play two different accounts on the same PlayStation during multiplayer, how would you do that? So same PlayStation, two different accounts, at the same time, during multiplayer. Does that make sense?
Answer: If you mean playing split screen I have the answer.
First you will need to make sure you are using a HDMI cable to connect your PS3 to your monitor (not sure why this was required). Once you have done this, load up Minecraft with your main account. Once Minecraft has loaded, turn on the second controller and log in as a different account (you may be able to do this with the same account). As your main account start the world you want to play on, once everything has loaded, a pop up will show in the middle of the screen saying something like 'Press start to play splitscreen' or 'Press the pause button to add account'. Once you do what the pop up says the game should hopefully change to split screen.
PS. I am telling you this from memory back when I did this on xbox 360. If this didn't work, search 'how to play split screen on Minecraft PS3 edition' on YouTube. Doing this worked for me back when I did this.


Find a basis for the subspace

Question: How can I find a basis for the subspace $V:=\{v = (v_1, v_2, \cdots , v_n) \in R^n: v_1+v_2+ \cdots +v_n=0\}$ of $R^n$ for any $n$?
I know that I must show that the basis is linearly independent and spans $V.$
Answer: It is the nullspace of the $1\times n$ matrix
$$\left[ 1\ \ 1 \ \ 1 \ \ \cdots \ \ 1\right]$$
Which has $n-1$ free variables. Can you finish?
Answer: First, notice that your defining equation actually describes a hyperplane i $\mathbb{R}^n$ of dimension $n-1$ - in fact, you will prove this when proving that the space has a basis of dimension $n-1$.
An example of such a basis of this space is the following:
$(1,-1,0,\ldots,0), (0,1,-1,0,\ldots,0), (0,0,1,-1,0,\ldots,0), (0,0,\ldots,0,1,-1)$.
The remaining job is then to show that this set of vectors is actually linearly independent and spans $V$.
Comment: Would I use Gaussian elimination to prove linear independence and spans V? How can I show this for all n?
Comment: I'd say, take an arbitrary vector $v=(v_1,\ldots,v_n)$ in your space $V$. To show that the basis I gave above spans $V$, you should be able to write $v$ as a linear combination of the basis vectors. Can you see how to do this? Also, to show that my given set of vectors is linearly independent, try taking a linear combination of them, and equate this linear combination to 0. Can you infer that all coefficients must be 0?
Comment: Thanks for all of your help- I have managed it now!

Find a basis for the subspace