C# method failing to function for no known reason

Question: I'm currently taking a programming class and learning C#. One of my assignments was to have a program run with a graphical user interface that has a text box for input, a text box for output, and a button that copies whatever number was in the "input" text box and pastes it into the output text box. For some reason the method computeBtn_Click, which was the method to read the number in the input and put that in the output, was doing absolutely nothing for me, but by using the method name computeBtn_Click_1 it worked great. Any idea why?
Here is my code(without all the using.System stuff):

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        //exitToolStripMenuItem1 method
        //Purpose: To close the window and terminate the application.
        //Parameters: The object generating the event and the event arguments.
        //Returns: None
        void exitToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        //aboutToolStripMenu method
        //Purpose: To give information about the application.
        //Parameters: The object generating the event and the event arguments.
        //Returns: None
        void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Name\nCS1400\nLab #4");
        }

        private void inTxtBox_TextChanged(object sender, EventArgs e)
        {

        }

        private void outTxtBox_TextChanged(object sender, EventArgs e)
        {

        }

        // For some reason this method wasn't working.
        // computeBtn_Click Method
        // Purpose: Get a value from the user and display it back again
        // Parameters: The sending object, and the event arguments
        // Returns: none
        /*private void computeBtn_Click(object sender, EventArgs e)
        {
            int num = int.Parse(inTxtBox.Text);
            string outStr = string.Format("{0:D}", num);
            outTxtBox.Text = outStr;
        }*/

        // computeBtn_Click_1 Method
        // Purpose: Get a value from the user and display it back again
        // Parameters: The sending object, and the event arguments
        // Returns: none
        private void computeBtn_Click_1(object sender, EventArgs e)
        {
            int num = int.Parse(inTxtBox.Text);
            string outStr = string.Format("{0:D}", num);
            outTxtBox.Text = outStr;
        }
    }
}
Comment: You are randomly adding event handlers.  Be careful with that double-click.  Learn how to use the Properties window, click on the lightning-bolt icon to see the event handlers.
Comment: I bet you used to have a button of the same name that was, at one time, deleted. When you added another button of the same name it created a new name with the index/subscript. Thank you auto-generated code.
Comment: Is the computeBtn Click event hooked up to that control (look at the Events tab of the properties window of the control)
Comment: Got it. After checking the Click property in Events it was set to computeBtn_Click_1. Also, this is an assignment that I did a while back and have since stopped adding events handlers for everything in the form. At the time I thought that I had to do it for the text boxes too because I got an error that I thought was related somehow. Thanks.
Answer: When you create event handlers Visual Studio assigns names automatically. So in your case you have a button named computeBtn. Then in the graphical designer you create an event handler for the Click event. VS automatically creates name for it: computeBtn_Click.
Now if in the graphical designer you decide to remove the event handler (e.g. in Properties tab for the button) nothing is hooked to the Click event but the method named computeBtn_Click remained in the class. So what will happen if you decide to create an event handler for the Click event? IDE will create a new method and since there is already something with the name computeBtn_Click it will modify name of the new method so it is still unique. Which in this case results in computeBtn_Click_1.
To confirm that, you can check references of the method that does not work. It will show that there are no references in the code to the method. To check the references click the method's name and hit Ctrl+K, R or use context menu.
Comment: After checking the Click property in Events it was set to computeBtn_Click_1. Thanks
Answer: The other two answers are great, but I thought I might add another easy way to avoid this. When you select your button in the designer, go to the properties window, there you'll find a tab called "Events". Under "Click", you can select the method you wish to use for the button's click event.
Answer: your EventHandler  delegate  is  not set in  your partial class to call computeBtn_Click
by partial class I  mean the Form1.Designer.cs  which may look like  this
 private void InitializeComponent()
        {
            this.button1 = new System.Windows.Forms.Button();
            this.SuspendLayout();
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(105, 30);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(170, 74);
            this.button1.TabIndex = 0;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.computeBtn_Click);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 261);
            this.Controls.Add(this.button1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);

        }

try this  and your method will  be called when you  click the  button
  public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
 this.button1.Click += new System.EventHandler(computeBtn_Click);
        }


Motifs in undirected networks

Question: I have an undirected network and I am currently analyzing both three and 4 node motifs in the network. However, I can't find any articles which describe the biological significance of 3 of 4 node motifs in my network. Comparing with randomly generated networks, I am able to deduce that the number of three node motifs and 4 node motifs are significantly higher. However, I am unable to infer any biological significance for this finding.
Comment: Can you clarify what is your network? Is it a network of genes, protein-protein interactions or something else?
Also do I understand right that you randomly generate networks without considering the fact that most biological networks are actually scale-free networks?
Comment: @MaximKuleshov Its a transcriptional regulatory network https://price.systemsbiology.org/research/honeybee-transcriptional-regulatory-network/
Comment: @MaximKuleshov  I understand that TRNs are directed and bipartite comprising of transcription factors and the genes they regulate. I was just curious about motifs in co-expression networks.
Comment: @MaximKuleshov Also, I understand that Biological networks are scale free networks, I actually split my network into 8 clusters and the whole comparison to random networks is to prove that the clusters in themselves are real.
Comment: What is the structure of the 3 of 4 node motifs of your network for which there is no description of biological significance? - Which type of random network did you compare to?
Answer: I am not 100% sure that I understand the question, but I am going to try to answer, based on the following assumptions:

The "number of 3 and 4 node motifs" is not very clear. If I understand correctly, it should be a quantity determined in large part by the degree distribution. You could rewire your network to lose all information about the TRN other than degree distribution and this number is probably very similar (or it is a quite weird network, which would make me suspicious of the data).
Therefore, the number of such motifs of size $k$ is not particularly interesting biologically, specifically due to technical issues such as incomplete ascertainment of edges, etc. The true network may have many more edges, and this will change this number, so the degree distribution is not itself interesting- it is in fact the thing you want to control for.
Therefore, when you compare with randomly generated networks and find different numbers of motifs of $k$ nodes, I suspect the random networks were generated with a different degree distribution. (It is pretty easy to generate networks of the same degree distribution, using e.g. the rewire() function in igraph)
Therefore, I interpret the question to be more specifically: "Among all 3 and 4 node motifs, a subset are overrepresented in my TRN compared to randomized graphs of the same degree distribution. What are some ways to interpret these motifs?" This is the kind of question that is traditionally asked with TRNs in my experience.

As an example of how other groups have analyzed TRN motifs, I suggest looking at Figures 5 and 6 of this paper. For instance, the "feed-forward" motif is overrepresented for links involving some TFs. I believe that it is standard to compare motif distributions to other biological networks, such as the C. elegans neural network. There are references in the Cell paper that could probably help you out further. The wikipedia article on network motifs also looks to have some information, and there are other resources on the internet if you google.
While there is not necessarily a strict biological interpretation of such motifs, they nonetheless can be informative in identifying specific patterns peculiar to different TFs or master regulators.
Caveat
It is possible that I have misunderstood the question or made bad assumptions- my graph theory is superficial. But if I am wrong and you are actually interested in the simple number of motifs of size $k$, that observation is of interest as a "I have a weird graph" theoretical problem, not as a "this is biologically interesting" problem. As a biologist I would care much more about which specific motifs of size $k$ you have, rather than the summed count of all motifs of size $k$.
On the other hand, forgetting about motifs for a moment, a "weird" network could be quite topologically interesting biologically. For instance, do your different clustered components associate with different pieces of biology, like sugar metabolism vs. morphogenesis? That would be expected, but it has very little to do with motifs- they may just be a side effect of that functional topology. In that case, it would be not only degree distribution but also that topology that you would have to control for to make interesting statements about motifs.
good luck!

Motifs in undirected networks


How to close application completely when clicking red button on any app?

Question: I'm a long time windows/Ubutnu user who have recently migrated to Mac OS X and running 10.7.4. One thing which i'm unable to get used to is that  while the red button closes a window, the program will remain open until you quit the application using the Menu Bar. One option to bypass it is use the key combination Command+Q but by doing that all the instances of that program opens up the next time I open that application. Is there a way out?
Comment: Strange enough what all of you have suggested has worked. I HAD that option unchecked(which i think happened automatically when the 10.7.3 was auto-upgraded to 10.7.4 few weeks back. But still for some reason, it was not working. I went to General, clicked the "Restore windows when quitting and re-opening apps", reboot MBP, went into general and unselect it again. And now it is working what all of you've mentioned..Life is all well again...Thanks everyone!
Comment: Welcome to the site.  If everything is well, please accept someone's answer.  Also, better to make this a comment on your original question than as another answer.
Answer: You can't close the application by clicking on the red button, as you said it is meant to close the window...
Using cmd-q is not a bypass but the shortcut to close the application. And the windows are not instances of the application, they are in the same instance...
What bothers you is the "resume" functionality that restores the state of an application -- e.g. all open windows -- when you restart it.
Look here or here to see how you can tune or disable this "resume" feature.
Answer: What you need is RedQuits. It allows to do exactly what you explained in your post.
I just arrived on Mac OS world two days ago, and I have been pretty confused about this functionality of Mac OS. Fortunately, there is a software to get around of this "issue".
It works nicely on 10.10.4.
Answer: It's worth mentioning that the Macintosh Human Interface Guidelines have for a long time defined the behaviour that document-based apps should stay open when the last or only document window is closed; but that apps that aren't document-based (and which are therefore likely to have only one main window) should quit when that window is closed.
MacOS isn't like Windows, where each document window is a separate instance of the application.
MacOS will also manage the memory of background apps with no windows very efficiently, so there's usually no need to 'police' this yourself.
Answer: Indeed, there are some applications which will close completly when hitting the red button, while others will just close a window. I'm afraid you can't do nothing about it, as it's a developers choice.
What you can do is disable the Auto-Open, so the Command+Q shortcut will do exactly what you want.
To do so, just go to System Preferences > General and uncheck "Restore windows when quitting and re-opening apps".
Comment: It seems that you are having some sort of issue with the Preferences, as unchecking that should do exactly what you want.
Answer: To do so, just go to System Preferences > General and uncheck "Restore windows when quitting and re-opening apps".
This solved my problem!
Answer: Do u want to say 'cmd+Q'instead of ctrl-q.
& are u sure about your stmt "When I press all the instances of that program opens up the next time I open that application".
As far as i know, if you quit application it will not open your last opened docs. It will just remain in "Open recent" option from File menu


Low wither skeleton spawn rates

Question: I found a fortress and when I found it, I first built a blaze farm, however, when I started needing Wither Skeleton Skulls, I went into the fortress looking for Wither Skeletons but only found 2 while there were so many blazes spawning. I had a few torches and other than in the safe space the whole fortress was under light level 7.
Answer: Mob spawning is random—it is entirely possible that you just got unlucky, and more blazes spawned instead of wither skeletons.
Another explanation could be that the mob cap is being taken up elsewhere. This would lower rates overall inside the fortress. The excessive amount of blazes could be from the spawners, which spawn mobs independently of the mob cap.

Low wither skeleton spawn rates


More efficient way to pan and mark locations viewed in ArcMap10

Question: I'm reviewing a large dataset and I would like to be able to pan through it with the keyboard arrows, and somehow mark the areas that I've viewed. Is there a way do this more efficiently than dragging the mouse across the screen for every pan?
Answer: You could try creating a Fishnet and then pan/zoom to each square/rectangle in the fishnet by right-clicking on its table and selecting 'zoom to' or 'pan to'
http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000002q000000
The Fishnet will help you keep track of which areas you've been to and which areas you still need to check.
To use the keyboard to automatically zoom or pan to the next feature in the fishnet, use a python script similar to the one here:
Zoom to Shapefile attribute table row feature
Answer: To zoom to a feature, you can open up the layer's attribute table and double click on the box at the start of its row:

This unfortunately selects the feature, so it's not the most robust method. For more specialized methods you'll have to start making use of python and custom buttons.
To mark areas you've visited, I'd suggest a 'visited' feature class. Work in editing mode and drop points each time you're done in an area.
Answer: I just tried the arrow keys In ArcMap and they appear to be panning without incident; but to clarify/confirm I am in Data View, with the Select Elements tool active, with the screen focus on the map. Most of the time, I hold the 'c' keyboard shortcut for mouse panning. Also, you can't go wrong with an honest bookmark when you need to mark and return to areas of interest.
Comment: Thanks for the advice, but I think I need to be more specific.

I would like to be able to create a tool that I can assign to the keyboard arrows, similar to the 3D Analyst Pan tool, where each key pans 90%(to allow for some overlap) or so in corresponding direction and marks that location with an element box. I know it's possible because I used it in my last internship but didn't have the wherewithal to find out how it works.
Answer: Or you can go to the ArcMap Customize menu and then hit the Customize mode which brings you a Customize dialog box and then go to the Commands tab. When you go there, Scroll down to the Pan/Zoom on the Categories and then to the right there is a list of Zoom... Highlight the Continuous Zoom and Pan and drag and drop of any one of the tool box above the Data/layout View....
Answer: You could set up a data driven pages project and then just click the arrows on the data driven pages toolbar to go from one extent to another to review the data.  If you also want to edit the data you could switch to data view and still click through the extents or you could double click the layout frame to edit in the view.
As for marking your work some workarounds include: 1) open bookmarks manager and hit create at each "page" and get a unique if arcane default, 2) put your index layer in edit mode and at each "page" click in it to select it and put an x in a field in the attributes window, 3) use the create polygon from current extent add-in (unfortunately it has a popup box each time you create one) or 4) run through a series of extents and then update an attribute table in one calculation for all of them.
Answer: For constant panning and zooming on only slightly overlapping successive windows, go to customize  > customize mode > commands > pan/zoom and drop the page down-left-right-up tools. You can then drag and drop these tools to your pan/zoom toolbar. . Inside each zone, you can then use c, z and x keyboard shortcuts and use the go back to previous extent before continuing to the next zone.
In my opininion, this is the best way to do systemic review of a dataset. Just start at the top left corner of your study area and then move step by step. When I stop I create a bookmark so that I can track what I did from day to day.
If you have a topology, a good way to track where you've been is to display the dirty area (wait until the end before you validate), but this only work if you modify something, not if you just look and there is nothing to change. Alternatively, drawing a rectangular graphic where you've been is very quick.


How to change visualforce UI without redirecting the page or using flow:interview

Question: I have a visualforce page (importContacts) which will take users through two flows of screen. The first is to give an option of which type of contact i.e. temporary/permanent. Upon selecting from the selectRadio and clicking next button, I want to be able to display a table of contact based on the selection option without redirecting to a new page and without using flow:interview.
Answer: The way I like to this is by using the rendered and reRender attributes.
<code><apex:form id='theForm>
    <apex:commandButton id='button' action="{!myAction}" reRender="theForm"/>
     // rendered if boolean variable in controller is true
     <apex:pageBlock rendered="{!displayQuestions}">

           //Your questions section goes here

     </apex:pageBlock>
     // rendered if boolean variable in controller is true
     <apex:pageBlock rendered={!displayContactList}>

            //your contact list goes here

     </apex:pageBlockSection>
</apex:form>
</code>


Is there an 'Endless mode' in Plants vs Zombies 2?

Question: I am unable to find the endless mode in PVZ 2. Did they remove it in favor of the turn based challenge mode, or can it be unlocked somehow?
Comment: You probably have to spend endless amounts of money if you want it ;)
Answer: There is no endless mode per se, just the challenge mode. See this thread for example.
Answer: the Pyramid of doom, dead man's booty and Big bad butte are this games endless... They do in theory go on forever, but the plants get wiped and the map resets(and sun) every round!


Rabbinic Responses to Landline Telephones

Question: Recently the use of cellphones and smartphones has met with a lot of criticism in some communities. I'd be interested to see if landline telephones encountered any similar opposition when they were first introduced. Can anyone point me to rabbinic responses to landlines?
Comment: SarahBrodsky, welcome to Judaism.SE, and thanks very much for the fascinating question! I look forward to seeing you around.
Comment: My siddur is on my cellphone, so don't tell me it interrupts davening :)
Comment: I wonder if there's anything that discusses telephones and *lashon hara* or *rechilut* from back then. Could maybe also ask this question about telegraphs.
Comment: You should ask what the problem with cell phones are.
Comment: Sara I doubt it. The problem with the cell is in the  Public forum you can not daven go to a shiur or have a conversation with people because of cell phones the land line did not have that effect
Comment: What criticism do you refer to?  Surely that would define if the same problems apply to landlines.  If phones are criticised bec it allows people to speak at distances then it would be the same problem for landlines.  If the issues are being able to see the person you are talking to, then this would not apply when the landline was introduced.   rabbinic responses to landlines?  To what exactly?
Answer: To my knowledge there was no opposition to utilizing telephones when they were initially introduced, the difficulty is that this in itself does not mean that there was no opposition. Furthermore, if there was no opposition, it could be difficult to demonstrate this fact since it is unlikely anyone would write teshuvos on why they do not object to an item that no one considered objectionable. Nevertheless, it seems that most of the discussion about [land-line] telephones seem to focus on their status on Shabbos/Yom Tov or their the propriety of using them to fulfill halachic obligations regarding hearing or speaking, which may support the notion that their use wasn't considered problematic in itself. This is also further supported by the fact the functions preserved by the "Kosher" cell phones you mention are those of the land line.
Answer: In Israel you can own a kosher cell phone. This means that you have a constant monthly payment with a bank of minutes you can use to call other kosher phones and landline phones. Taking pictures, surfing, sending SMSs and so on are disabled on the phone. The calls to non-kosher cellphones are much more costly. Kosher cell phones are backed by Rabinical authorities.
(There are some more details about this (that could be found here); I'm just presenting the main idea.)
From the above I conclude that common practice in Israel is that any landline phone is equivalent to a kosher cellular phone. From this I cannot derive what happened when landlines were first introduced, but anyway I suppose they were not criticized.


RGB values driver is working but doesn't update automatically, Blender 3.4.1

Question: This has probably been answered multiple times, but I can't find a solution. I'm building a scene to model stage lighting. I have a bunch of lights and I want an easy way to control their colors and powers. To do this, I created a cube and assigned a material to it which has a bunch of RGB inputs and values like this:

I then used "Copy as new driver" on each of Red, Green and Blue, then pasted these drivers onto the Red, Green and Blue of the spotlight object in my scene. I did the same for the Power value. This works... once. And it works when I go into the driver editor and click "Update Dependencies". However, when I interact with the RGB picker or the Power value in the cube's material, the light's color doesn't update dynamically, and I would really like it to!
And yes, I have "Auto run Python scripts" enabled:

Does this need Python code? Or am I missing something?
By the way, the RGB and (power/10.0) values of the spotlight are used for the emissive material of some filled circles to show what the lights look like. This is also done through the same type of drivers, and it updates dynamically with no problems. is it possible that it's not dynamically updating because the lights' RGB properties are themselves data sources for drivers?

Thanks!
Comment: i would recommend providing a blend file so we don't have to rebuild your problem to prove/find a solution
Answer: "Auto run python scripts" shouldn't be required based on your description.
I tested it (also in B.3.4.1) and indeed I could reproduce the problem:

The workaround I found is to also have a driver in the RGB node, for example use <code>#1</code> driver as Alpha:

Comment: Thanks, Markus - that worked! All I did was "add driver" on the colored bar on the RGB node in the material. I didn't even edit anything in the driver, and I didn't assign it to control anything. And now it works! One of the mysterious behaviours of Blender...
Comment: Wow. Thanks! I'll try it tonight when I get home.


Should I change the outlet or cord for my new clothes dryer?

Question: I bought a new dryer that has 4 prong L cord but outlet we have is 4 prong and straight. Should I change outlet or the cord? How easy is to swap out outlets?
Comment: Can you post photos of the plug and receptacle in question please?
Comment: Usually just undoing a few screws with the breaker off.  Hardest part is the wires are stiff when putting them on the new outlet.  Should have instructions with new outlet, but take pictures before removing wires from old outlet.
Comment: They sell replacement dryer cords (4 prong and 3 prong) at big box stores or online (e.g. Amazon) for a few bucks. Typically much easier than replacing an outlet (which might require running new wiring inside walls)>
Comment: What is the size of the breaker to this outlet?
Answer: Sounds to me like you have a NEMA 14-50R receptacle, which is intended to be supported by a 50 amp two pole 240v breaker. If not could you read the tiny numbers on yours and post them.

If it is fed by a 50A breaker then you need to change the breaker to a 30A breaker and then change the receptacle also to a 14-30R.
If it is fed by a 30A breaker leave the breaker and change the receptacle.
I think there is an odd NEC provision (210.21(B)(1)) that allows a single 50A receptacle on a 30A breaker, so someone might recommend changing the cord, but that would likely conflict with the Installation Instructions which likely say to use a 14-30 or 10-30 cord. The Instructions are part of the UL (or CSA/ETL/TUV) Listing and the NEC requires complying with them. And the 50A cord will be bulky and hard to work with.
Answer: I assume we are dealing with a consumer-tier dryer in the sub-$1500 range, not a commercial laundromat unit.
The correct receptacle for a dryer is NEMA 14-30, which requires a 4-wire connection.  Also acceptable is:

14-30 hot-hot-neutral, mounted on a metal junction box which is grounded via a wire or the use of metal conduit back to the panel.  The socket picks up ground via the metal box.
14-30 hot-hot-neutral, which is ungrounded, protected by a GFCI back at the panel, and marked "No Equipment Ground".
You cannot use a 3-prong NEMA 10. You can continue in service one which was installed prior to 1996, but it's not a great idea.

If the dryer cord is not NEMA 14-30, or has an inconvenient bend, the correct answer is to change the dryer cord.  Note that if you are changing from the terrible NEMA 10, there is a procedure you must follow to separate chassis ground so it is no longer bootlegged off neutral.  (yes, that's as scary as it sounds).
Every once in a blue moon we see people use 50A receptacles on dryers (NEMA 14-50 or 10-50). That is wrong and a Code violation. Change it at once.


Heating effect of electric current: Will this really happen?

Question: I've read that the electrical resistance of a metal increases with its temperature. So if i pass current through a iron rod then it would heat up a little with time and that should increase the resistance, making it hotter as the current flows which should further increase the resistance and the iron rod would become even hotter. It seems the rod would keep on heating limitlessly at a faster rate than before. Would it really happen ? If not, why? If yes, can you provide an explanation as to why we don't observe this phenomenon in our everyday life?
Comment: It's not really surprising that positive feedback loops exist. Do you think this is some kind of perpetual motion machine? All that's going on is that the rod will absorb energy faster from whatever power source you're using. Energy isn't produced out of nowhere.
Comment: If the resistance increases, the current could decrease and the power consumption would decrease if the supply voltage is constant. Then the feedback would be negative.
Answer: In everyday life power supplies produce a constant voltage, not a constant current. The power delivered to heat up the rod is $V^2 \over R$ and as temperature and resistance increase, the current drops and the power falls. Negative feedback.
Comment: @probably_someone, You can observe the phenomenon for yourself if you hook up an ordinary incandescent light bulb to power.  The filament of the light bulb is metal, and it is "shorted" across the power supply, and it does indeed get very hot.
Comment: @jameslarge I have seen this used to protect delicate components. An incandescent bulb is connected between the component and the power supply. If there is a power surge then more current flows and the bulb's resistance rises, protecting the component. Like a fuse or circuit breaker but doesn't need repairing or resetting afterwards.
Comment: Very good point! I had implicitly assumed constant current in my answer, when in reality this is probably the most realistic reason. That said, this negative feedback loop probably still has an equilibrium point at a very high temperature, so a short-circuited piece of metal will still, of course, get very hot.
Comment: @rogerjbarlow the feedback effect (resistivity rise with temperature) was the basis for one of Hewlett and Packard's first patents for an amplitude-stabilizing circuit in a variable frequency generator. it used a little incandescent light bulb in the feedback control circuit; the bulb temperature and hence the resistance depended on the average power flowing through it in a way that was independent of the frequency range across which the device operated.
Comment: @rogerjbarlow bulbs are occasionally used for this purpose in various musical devices.  Some of the characteristics of loudspeakers in musical instrument amplifiers depend on the changes in resistance of the voice coils as they get hot, and you can simulate some of this with incandescent bulbs. if you want to drive the speaker at less domestically-hostile power levels.
Answer: It definitely happens, up to a point. There are several limiting factors here. The first is the fact that as the metal gets hotter, it radiates more and more heat away. According to the Stefan-Boltzmann law, a perfect absorber with temperature $T$ and surface area $A$ will radiate with a luminosity $L$ determined by
$$L=\sigma A T^4$$
As you can see, the radiated energy grows very quickly with temperature, so it stands to reason that there should be an equilibrium point where the energy per unit time deposited in the metal via resistive heating should be equal to the energy radiated away, at which point the metal will not heat up any further.
Another limiting factor is the fact that the resistivity-temperature relationship does not necessarily hold for extremely high temperatures. This paper goes into the details: http://ns.ihed.ras.ru/ltlp/Literature/LASER_SOLID_INTERACT/KINETIC_COEFFICIENTS/Resistivity/MilchbergPRL2364-1998.pdf
The resistivity of a metal flattens out at extremely high temperatures, as the lattice spacing imposes a limit on the mean free path of an electron.
Also, it should probably be noted that before the metal is likely to hit either of these limits, it will probably hit its melting point, turn to liquid, and cut off the current. This is the operating principle of fuses; too much drawn current will cause a tiny wire to disintegrate, shutting off the power before the wires in the house heat up enough to cause a fire.
That said, all of these limits exist at very high temperatures. There isn't much preventing a piece of metal from getting very hot under too much current. We do see this in everyday life; it's one of the more common causes of house fires.
Answer: There are, of course, practical applications where we have to use constant current.
For instance, constant current is needed to maintain a constant torque in a motor. When windings get hot, their resistance increases, which leads to the increase of the IR voltage drop. If we used a constant voltage source, the current would decrease and so would the torque. So we need to increase the  voltage to keep the current and the torque unchanged.
I think the reason we don't normally observe thermal runaways in metals is because temperature coefficients of resistance are too low and, as a result, the positive feedback is not strong enough to cause thermal runaway.
Let's consider a simple setup with a constant current flowing through an iron rod.
Ambient temperature, $T_a: 20C$
Iron rod temperature due to the resistive losses $I^2R$, $T_0: 100C$
Say, we increase the resistance of the rod by 1% by stretching it a bit.
The power dissipation, P=$I^2R$, will increase by 1% as well. The temperature rise, $\Delta$T=P$\Theta$, where $\Theta$ is a thermal resistance, would increase by 1% as well. So $T_1-T_a=1.01(T_0-T_a)$ = $1.01\times80$ = 80.8C or $T_1=20+80.8=100.8$C, i.e., the temperature of the rod has changed by $0.8C$.
The corresponding change of the resistance could be calculated from this formula:
$\frac {\Delta R}{R_0}$ = $\alpha \Delta T$ = $0.005\times 0.8$=$0.004$ or $0.4$%. Here $R_0$ is the initial resistance of the rod, used as a reference point, and 0.005 is the temperature coefficient for iron.
So, the initial change of the resistance of $1$% led, through the positive feedback mechanism, to the additional change of $0.4$%. Since the gain here is less than 1, we won't have thermal runaway, i.e., the temperature of the rod will quickly converge.
Answer: Yes it can happen but you'd require very high current and for long time.
Heat = I×I×R
R = R(1 + c∆T) now c is generally very small so the change in resistance due to change in temperature is very small. So to make a considerable change in resistance you'll need to give very large currents.
Answer: I hadn't seen V.F.'s answer when I wrote mine. His answer is the best so far. Below is my formulation.
Short answer: a monotonous increasing function needs not diverge.
Long answer: In the lab, if you take a conducting wire and send a constant current, it is very easy to just heat a little bit the wire above room temperature. Of course, this steady-state temperature depends on how strong the current is and on the resistance of the wire, which conductor it is and so on. So you certainly can melt the wire with a high current, or bring the wire at very high temperatures above room temperature like we used to do in common house lightning with tungsten based light bulbs, but you can also easily manage to keep the wire's temperature near room temperature. But the point is that while it is true that passing a constant current (or an AC with constant amplitude) increases the temperature and therefore the resistivity of the wire, which in turns intensifies again the Joule heat which increases the temperature and thus the resistivity, and so on, these effects are each time less pronounced. Mathematically what you get is a monotonous increasing function for the temperature. And such functions can, but need not, diverge. Another famous monotonous increasing function that never cross a threshold in Physics is the voltage of a charging capacitor. Its voltage always increases in time, yet it will never cross a threshold and it will remain finite.
Still not convinced? Here's a slightly more rigorous treatment. Let the room temperature be $T$ and the resistance be $R$.
At first, you turn the constant current source on. Joule heat is proportional to $R I_0^2=(R_0+R_1T)I_0^2$. This causes a rise in the temperature of the wire (which may or may not be uniform depending on the boundary conditions of the wire, but it doesn't matter.). So its temperature is now $T+\Delta T_1$ and so its resistance is now $R_0+R_1(T+\Delta T_1)$.
So now the Joule heat is $[R_0+R_1(T+\Delta T_1)]I_0^2$. This rises the temperature to $T+\Delta T_1 + \Delta T_2$. Which means the resistance has increased, etc.
Overall you get that the temperature can be written as $T'=T+\Delta T_1+\Delta T_2+ ... =T + \sum_{i=1}^{\infty}\Delta T_i$. And your question boils down to "can such a series converge?". From calculus, it can. For instance it converges if $\Delta T_{i+1}/\Delta T_i<1$. In reality, it depends on the current, $\rho_1$ and possibly $\rho_2$ (indeed, because if you get to temperature much higher than room temperature, the resistance will stop to be linear and then you might want to take into consideration the nonlinear dependence of the resistance with temperature). Thus, it depends on the material and on the current. Therefore, for a given material, there could be a critical current from which the temperature should diverge (i.e. the wire will melt).


Is it possible to fit a 5000 litre tank on a normal rooftop?

Question: I currently have a 750 litre overhead water tank installed. Is it possible to install a 5000 litre water tank in the same place? Would the weight be a concern? The house is a two storied buliding bulit on a 1200 square feet site. The total height of building is about 23 feet. Thanks beforehand.
Comment: So you want to replace a tank that weighs about 1000kg with one that is 5 times heavier? Get it checked by an architect or engineer.
Comment: Closer to 7 times heavier (the contents 6.667 and then the empty tank will weigh more too.) You could very easily go from 23 feet / 7 meters high to a pile of rubble a few feet/meters high, with loss of life. Definite need for a structural/civil engineer assessment. A safer alternative might be a ground level tank for more storage and a pump to the existing tank.
Answer: You need a structural engineer. There is no way for us to judge the stability of your roof
Answer: 750 litres weighs -- well I'll spare you the gory math as it would make the answer too long, but it comes out to 750 kilograms or 1650 pounds.   Or the weight of a small car.
Now I wouldn't put that on my roof without architectural review.
Now, you propose to put a 5000 litre tank there, which is 5000 kilograms (11,000 lbs).  Or the weight of a semi tractor.

So no... even the 750l tank is a risk.  You need an engineer to certify and/or reinforce the building.
Comment: @vidyarthi Just have a competent engineer either certify the building or reinforce it.  Alternately you can make the tank smaller or use several small tanks.  A 100l tank weighs about the same as a human, you can have several spread out and connect the bottoms; they'll act like one big tank.  A smaller tank just means needing to refill more often.  If on-site storage is an issue, the big tank could be downstairs.  Flush toilets and wash water are a huge boon to survival and quality of life esp. children, *but it defeats the purpose if the building falls on your head*.
Comment: but, without an overhead tank, can we get running water for daily use? I think every office or residential building should have an overhead tank


Is it worth hiding an AES encrypted text string in a PNG image for better security?

Question: I need advice as to whether it is worth the extra "security" and processing of an AES encrypted text string to be hidden in a PNG image as opposed to an AES encrypted text string to be saved in a read-only text file. Both the PNG image and Text file would serve as publicly available AES placeholders that would be decoded via password in a web application. I gather that any hex editor or similar software could access the AES string anyhow, so, would there be any practical benefit security-wise in hiding the AES string in a PNG?
Comment: No, you do not increase security level hiding your ciphertext. It is proven to stand the state of the art attack that usually model quite stronger attackers.
Comment: What aspect of security are you talking about?  Are you concerned about someone decrypting the encrypted string?  Or, are you concerned that someone would detect that there was an encrypted string there?
Comment: Thx for input. I am only concerned about someone decrypting the encrypted string.
Answer: "Hiding" content in an image (or other medium, it's a general technique called steganography) can be done either in a very obvious way (a dedicated data block, called ancillary chunk, which does not form part of the image), or it can be more effectively hidden in the low order bits of the image, thus very subtly degrading the picture.
Both methods can be discovered by a dedicated analyst, there are even automated tools which can flag images if some telltale statistical anomalies are detected.
This method doesn't add any extra security for the secret message - which is already encrypted anyway. The only thing it provides is a very weak protection of the fact that a secret message existed at all.
Comment: I've tried steganography.js which deals with png alpha channel and works great, but because I had a lot of dynamic data to hide this made my png image size grow too big to handle, even after some lzw compression, so I had to ditch that idea because I will deal with very long strings.
Answer: This is called steganography and while the example you give is not significantly better than just having the AES in a "text file" (because it would not look like an actual PNG file), there are algorithms for hiding information in a "cover" file.
However, if you do not mean to hide the fact that you have encrypted something, using AES alone is normally sufficient. There are no known practical attacks on properly implemented AES encryption, so as far as we know your message will remain as secure as your key.
A potential issue is the password. Human chosen passwords are not usually very secure and even if you use proper password hashing, very weak passwords remain weak. If you had good steganography in addition, it might resist cryptanalysis better, but secure steganography is also dependent on strong keys.
Comment: You're right about password/key protection, that's the weakest link. I am currently seeking some pure javascript solution for encoding and decoding PNG chunks of the type zTXt.  I haven't found anything on the web so far as a pure javascript solution, bummer. I've also tried to Blob my way with fileReader, but that appears to destroy the AES encryption algo I am currently using. My kingdom for a zTXt !


Programatically adding additional edit texts on clicking the last edit text on screen

Question: I have a fragment with a scrollview. Initially there are 3 edit texts which I add programatically not through the xml. The desired functionlty is when the user clicks the last edit text i.e number 3 it will automatically add a 4th edit text directly below it. When the user clicks on the 4th edit text it will add a 5th and so on. My code which is shown below is almost working. When the user clicks on edit text 3 it will add a 4th and when they click on the 4th it will add a 5th, however after that it will not add anynore edit texts.
I have an onFocusChange listener and I also notice this listener only activates on the 3rd and 4th edittexts. For some odd reason the listener doesnt activate when clicking on any other edit texts.
<code> // Adds 3 edit texts to the view which are stored in an array list.
 for (int etId = 0; etId <= 3; etId++) {
        etChallenges = new EditText(getContext());
        editTextList.add(etChallenges);
        mLinearLayout.addView(etChallenges);
    }

    etChallenges.setOnFocusChangeListener(new View.OnFocusChangeListener() {
        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            int last = 0;
            for(last =0; last <= editTextList.size()-1; last++){
                if(last == editTextList.size()-1){
                    etChallenges = new EditText(getContext());
                    editTextList.add(etChallenges);
                    mLinearLayout.addView(etChallenges);
                    break;
                }
            }
</code>
Answer: An optional route out is have a recyclerview with an edittext and an initial item size of 3 and then you can add more edittexts once the last item on the recyclerview is clicked or active.
Comment: That is a nightmare dealing with the recyclerview or list view, been there tried that.


SE for teachers/school

Question: My girlfriend works as a school teacher, and as she takes a long time in correcting compositions I want to ask a question about homeworks correction. Is there any appropriate network/site here on Stack Exchange?
Comment: Area51 has a site in definition, but I'm not aware of any active teacher-oriented stacks. http://area51.stackexchange.com/proposals/33114/education-technology
Comment: Is it a question specific to any academic subject or just about the process in general?
Comment: @jonsca  not really to any subject. Just the ones who require the pupil to make a composition in their native language.
Comment: Well, there is a writing site, but you'd have to check their faq as to whether techniques for critiquing would be on topic there.
Answer: Writers might consider this on-topic, depending on how the question is formatted:

If it's about redlining a student essay and the issues involved with doing that, it's essentially an editing question, which would be on-topic. If it's about presenting constructive criticism and encouraging good writing habits, that would also be on-topic.
If it's about grading, or student interaction, or setting up assignments, that would be closed as off-topic.
Comment: Also, feel free to ask about this on our Meta site if you're not sure of how to format the question.
Comment: Neil, thanks. You refer to writer meta, isn't it? I also submitted it to personal productioviti on SE http://productivity.stackexchange.com/questions/5098/how-to-spend-less-time-in-compositions-correction it seems it is a good place. Do you think submitting it also to writers, with a different format, is a good idea?
Comment: By the way, as I surprisingly noticed that no networks for undergraduate teachers where availabe on SE, I just proposed one http://area51.stackexchange.com/proposals/49571/teachers-school
Comment: @DanieleB - "Do you think submitting it also to writers, with a different format, is a good idea?" - Only if there are aspects of the question that the existing question you posted isn't covering that you think Writers can cover well. Also, yes, I meant Writers meta.
Answer: The only suitable place I found to make this question was the Personal Productivity  site, where I asked this: How to spend less time in compositions correction? which seems to get some answers.
In any case as I saw there was no ntwork for undergraduate schools, I opened this site proposal: Undergraduates

SE for teachers/school


How to represent matrices in python

Question: How can I represent matrices in python?
Answer: Take a look at this answer:
from numpy import matrix
from numpy import linalg
A = matrix( [[1,2,3],[11,12,13],[21,22,23]]) # Creates a matrix.
x = matrix( [[1],[2],[3]] )                  # Creates a matrix (like a column vector).
y = matrix( [[1,2,3]] )                      # Creates a matrix (like a row vector).
print A.T                                    # Transpose of A.
print A*x                                    # Matrix multiplication of A and x.
print A.I                                    # Inverse of A.
print linalg.solve(A, x)     # Solve the linear equation system.

Comment: Glad you cited the source. Not thrilled you copied the answer from someone else and did not provide you own explanation. Hard to believe this is currently the accepted answer and highest voted. Perhaps you could put a little effort in to explain "your answer"?
Answer: Python doesn't have matrices. You can use a list of lists or NumPy
Answer: If you are not going to use the NumPy library, you can use the nested list. This is code to implement the dynamic nested list (2-dimensional lists).
Let r is the number of rows
let r=3

m=[]
for i in range(r):
    m.append([int(x) for x in raw_input().split()])

Any time you can append a row using
m.append([int(x) for x in raw_input().split()])

Above, you have to enter the matrix row-wise. To insert a column:
for i in m:
    i.append(x) # x is the value to be added in column

To print the matrix:
print m       # all in single row

for i in m:
    print i   # each row in a different line

Answer: ((1,2,3,4),
 (5,6,7,8),
 (9,0,1,2))

Using tuples instead of lists makes it marginally harder to change the data structure in unwanted ways.
If you are going to do extensive use of those, you are best off wrapping a true number array in a class, so you can define methods and properties on them. (Or, you could NumPy, SciPy, ... if you are going to do your processing with those libraries.)

How to represent matrices in python


Collecting All Clients logs every night

Question: We have a financial institution we are bring on as a client running on Mac's.  The are looking to collect all the system logs from each computer every night and keep each for 90 days. I have seen others have scrips to collect system logs at time of an incident when someone is having an issue but nothing that will collect user data for security reason automatically. Can anyone point me in the direction of a 3rd party product or script structure?
Answer: You can use an automated central logging system, like Filebeat + ElasticSearch. The automated collection of logs you are referring to could be CMD+ALT+CONTROL+SHIFT+. which is a sysdiagnose command. It takes a long time to run and isn't generally considered a good idea to use as 'standard' log collection.
Using something that is actually made for collecting logs will help you out a whole lot better than a simple script.
If you wanted to go the script route anyway, you can create an applescript that collects to logs and copies it to a server. You can then make a Calendar appointment which has the option to add a script as an action. Another method would be using osascript from the commandline in combination with a crontab entry.
A third more user-friendly option for situations where you don't have a proper server system where you can add these things is Apple Remote Desktop Administrator. You buy it from the App Store and then you can setup periodic jobs to gather logs. You will also be able to completely remotely manage all the Macs.

Collecting All Clients logs every night


Can't change logo & custom welcome msg after upgrade from 2.1.2 to 2.1.3

Question: I've updated my magento install from 2.1.2 to 2.1.3. After that, for some reason, my logo and custom welcome message are gone, and I can't change them.
As you can see, I have added a logo and a custom welcome message:

But they are not shown on the website:

what I have tried in the meantime:
- Flushed all cache multiple times
- Updated Porto theme to the latest version (including 2.1.x patch)
- run php bin/magento setup:upgrade
- run bin/magento setup:static-content:deploy nl_NL
But no luck...
Anyone could help me and has an idea what is going on?
Thanks!
Answer: This seems to be a know issue: https://github.com/magento/magento2/issues/7949


Access denied Please try to logout and sign in again. If this message persists, please contact the store owner

Question: i getting the error "Access denied Please try to logout and sign in again. If this message persists, please contact the store owner." when i try to login in admin panel. i have no other username and password.I also tried to log out and login again but same problem. please tell me any solution.
Answer: Normally, that appears when you add a new user but you don't set good role:
https://www.templatemonster.com/help/magento-how-to-deal-with-access-denied-issue-in-admin-panel.html
In the table admin_role, do you have any row with 'Administrators' as role_name ?
You can update your database to put right role to your user (look the tables admin_role / admin_rule / admin_user). You can also create a new admin user with magerun if you have it installed.


Swift Instance Variable Underscore Prefix?

Question: Did Swift drop the underscore-prefix convention for instance variables, e.g., _window? If so, why?
Comment: Sure, I selected one.
Comment: Are any of the below answers worthy of a 'answer'?
Comment: The thing that bothers me about this is that the swift property can seemingly be accessed with or without reference to self.  So if you see a variable called `count` there's no way to determine at a glance whether it's an instance variable or a local variable (that I'm aware of).  And instance variables can be "out-scoped" by local variables!  Argh.  $5 says underscore notation will be back for Swift 3.
Answer: Apple still uses _ in its Xcode boilerplate code as a convention for a non-public variable.  You'll see a pattern like such:
class Foo {
  var _bar : Bar? = nil
  var  bar : Bar {
    if _bar == nil {
      /* compute some stuff */
      _bar = Bar (/* ... */)
    }
    return _bar!
  }
}

where access to the property is meant to be through the bar computed property.  You find this in Apple CoreData templates.
Comment: That makes converting my old code much easier. Nice.
Comment: The underscore is used to opt out of explicitly naming a parameter. Given that the Swift compiler isn't exactly lenient, this is unlikely to be an oversight. Rather Apple intended - at least for the time being - that the underscore be valid variable name syntax .
Answer: In Objective-C when you declare a property @synthesize would create the getter and setters for you automatically since clang 3.2. So, the default @synthesize for a property "foo" would look like this:
@synthesize foo = _foo
because of that _foo would then be the iVar. In other words you could have done the @synthesize yourself and called the iVar whatever you liked:
@synthesize foo = myiVarFoo
so in this case there is no "_"
So now in Swift from the documentation:

Swift unifies these concepts into a single property declaration. A Swift property does not have a corresponding instance variable, and the backing store for a property is not accessed directly.

So from the documentation it's clear that swift does not have a corresponding instance variable thus  no need to have the "_" around anymore.
Answer: The underscore prefix was meant not to confuse the instance variable _foo with its getter foo.
In swift there's not such distinction between ivars and getters. Instead you only have properties, making the _ convention non necessary.
Comment: there still exist scenarios where a private property - that ideally has the same name as a getter - could be useful. As stored properties cannot be overridden, it might be useful to have a superclass that provides a stub method, say foo(), that must be overridden by the subclass. The subclass method might just return _foo.
Answer: The answer is no because there are no "instance variables" right now in Swift. Only properties (stored properties and computed properties).
Comment: For all practical purposes we have instance variables, constants. And thus people need a practical naming system to denote private members.
Answer: I'd say this _underscoreName convention is dropped (although some Apple templates still have it).
Swift's "Lazy Stored Properties" make _these unnecessary. This post:
http://mikebuss.com/2014/06/22/lazy-initialization-swift/
explains it well.
Answer: I use a leading underscore to denote a private symbol.
Yes, the underscores do hamper readability at first, but there is a valuable payoff in comprehension and maintainability.
e.g.:
final class SomeClass
{
    fileprivate let _kMagicNumber: CGFloat = 3.14

    fileprivate struct _PrivateInfo
    {
        let foo: Int
        let bar: String
    }

    fileprivate var _privateInfo: _PrivateInfo

    fileprivate func _setup(with info: _PrivateInfo) { ... }

}

etc.
At a glance, you can see which elements belong where.
You don't need to option-click or do the "who does this belong to?" dance.
Code comprehension shouldn't rely on an IDE's features. And there are times (GitHub, raw text files) where an IDE isn't available.
I understand the "it's not convention" argument. But conventions aren't written on stone tablets. Swift is rapidly evolving, as is our usage of it.
If the Swift team were to produce an annotation syntax for private symbols tomorrow, I'd use it. But until then...
Since I've got my soapbox out, please prefix your extensions.
Consider this snippet:
let color = "#ff7733".hexColor

Where does the "hexColor" come from? Your own code? The Swift standard library? Foundation? UKit? (Hah!) A CocoaPod? Who knows?
(Seasoned CocoaPods users will know that every second open-source library implements a "hexColor" property. With all the problems that entails.)
So, given a company or project name like "Double Secret Probation", consider using:
let color = "#ff7733".dsp_hexColor

Finally, I strongly recommend the books "Writing Solid Code" and "Code Complete".
Answer: The convention of a prefixing private vars long preceeded that of ObjCs (weird) property synthesis concept. Clarity was the original reason for such a prefix, not differentiation though it was useful and common to expose a public getter without the underscore...for obvious reasons. IMO, ObjC prop synthesis just put a big fat monkey wrench in the works confusing the h*** out of everyone...
What if you wanted a private synthesized property? In order to underscore-prefix your private synthesized property, you'd need a double underscore backing var. Apple specifically warned against double underscores and this created confusion. Should we bother to use synth'ed properties internally or stick with the backing var (which still had an underscore and was clearly private)? Should we just stop differentiating between private and public vars? Why??
In practice people would use the synthesized version internal to a class as a kind of smart setter, if and only if they wanted the smarts – but that broke down the ideal of encapsulation – choosing whether to use the synth'ed setter required apriori knowledge of what happened behind the scenes.
Meanwhile, as pointed out above, apple's internal code still used the convention, sometimes for synthesized properties too IIRC. And they still do for swift properties! But not consistently...The biggest evidence your language design policy is confusing is when your own devs aren't using it consistently!
Clarity was the original motive and it worked well. I say:
BRING BACK THE UNDERSCORE!
...for private vars and methods :)
(P.S. Dart even has this as an actual language convention in lieu of a private keyword!)


Explosion in space

Question: I'm curious about what happens if an explosive substance detonates in space. On Earth, I guess a good chunk of the energy released is carried away by shock waves in the atmosphere. But in space, the medium that supported the propagation of the shock wave on Earth is much more rarefied, so how does that work?
Comment: @Frank: you actually do have shockwaves in the intergalactic medium due to supernovae, and the density peaks caused by this can cause new stars to form in the regions around the compressed region of the shockwaves, or it can cause stable stars to go supernova.
Comment: my instinct would be to check with experiment (which would be a very special kind of cool) but I doubt it's been done in any sort of large scale.
Comment: I'm personally going to have a hard time setting up that experiment :-) - I was also thinking about supernovae "explosions" in astrophysics. Are those just shock waves that abruptly modify the properties of space like on Earth? Space still has a few atoms per square meter/kilometer of matter in it, right?
Comment: OK, I have no problem with that. But I'm wondering how it actually works. On Earth, in the atmosphere, I can see how the gas molecules push each other, propagating the shock wave (is that right?) - but if the intergalactic medium has 1 molecule per cubic kilometer, what are the odds of a molecule colliding with a neighbor to propagate the shock wave? Is that intergalactic shock wave then mostly electromagnetic energy?
Comment: @Frank: I suspect Jerry meant "interstellar" rather than "intergalactic". The density if the interstellar medium varies but is on the rough order of one molecule per cm³. The chance that a molecule will hit something as it passes through any particular cubic centimeter is rather small, but there are so _very many_ cubic centimeters to pass through that it eventually will hit something. (Also note that if the interstellar gas is ionized, the ions don't need to hit each other perfectly in order to exchange some momentum).
Answer: What is a shock wave ?
It is a form of wave front arising from the scatter of the explosion parts. In the interaction with the medium, the average energy and momentum of the original particles/fragments is diminished transferring them to the wave front.
When there is no medium the particles/fragments/gas following momentum conservation disperse linearly until they meet an obstacle. If they are in a gravitational field they will follow the corresponding paths prescribed by the field instead of linearly, and one would have to solve for those the equations.
Supernovae, discussed in a comment by @JerrySchirmer create their own medium by the enormous amount of matter they have, thus shock waves are generated. That is a different story. If there is no medium there is no shock wave.
Answer: I am not a chemist but my understanding of a chemical explosion is that there is a very fast release of energy and PRODUCTS. So I would say that the products are accelerated and expand. Since there is no atmosphere to work against, the dynamics is quite simple. A couple of years ago NASA used an impactor to study a comet. Maybe there is a model of the plume in the published papers.
Comment: Yes, I think I overlooked the release of products besides energy. That's probably also critical in the case of exploding supernovae.
Answer: Some portion of energy is released as radiation, electromagnetic shockwave will travel in space far away.
Electromagnetic waves travel with a speed relative to medium specifications. When medium specifications are not constant over a distance, shockwaves occur.
Answer: I was just reading a sample of some random book that I came across ('Great Formulas Explained') and stumbled upon this formula that deals with 'Explosions' : Taylor-Sedov Formula . I then got reminded of this post on 'Stackexchange - Physics' and thought of posting here.
Here's a snippet pulled from this sample:

When a strong explosion takes place, a shock wave forms that
  propagates in a spherical manner away from the explosion. The shock
  front separates the air mass that is heated and compressed due to the
  explosion from the undisturbed air.
Using the concept of similarity solutions, the physicists Taylor and
  Sedov derived a simple formula that describes how the radius (in m) of
  such a shock sphere grows with time (in s). To apply it, we need to
  know two additional quantities: the energy of the explosion E (in J)
  and the density of the surrounding air D (in Kg/m3). Here's the
  formula:
r = 0.93 * (E/D) power 0.2 * t power 0.4

This formula is also used for modelling Supernova explosions. A search for 'Taylor Sedov formula for explosions' on any good search engine will lead you a good number of sources to read. Here are a couple of 'em:
1) Blast Wave
2) Supernova Remnant
3) Supernova Remnant Explained With Formulas

Explosion in space


What is the process to remove frost off an airliner?

Question: My aunt recently was going on a flight home and she boarded the flight, but her flight was delayed due to frost on the aircraft. She noticed this crane like device above the aircraft wing during the removal process. How do they remove frost off an airliner?
Comment: I couldn't find any good tags for this question. If you guys find any tags that would fit with this question then go ahead and add it in, and you probably want to delete my frost removal tag.
Comment: On Youtube: [Aircraft Deicing Philadelphia International Airport](https://www.youtube.com/watch?v=GFcfEiCY7J4) (and many more linked).
Comment: @Simon Sort of...  Frost can form even on very hot days (due to cold fuel in the wings).  While the answers apply, the linked question isn't quite a duplicate, especially since it isn't even always required to remove frost in the first place.
Answer: Frost is removed through the application of (typically) Type I de-ice fluid (information about de-/anti-ice fluids). Fluid application is generally from a truck with a lift so that the operator can spray the aircraft from above. The fluid is generally hot, diluted with water and under pressure so you'll see lots of steam coming off of the fluid spray. The truck will drive around the airplane spraying the wings, tail and fuselage as necessary to completely remove snow, ice and frost.
Some airports have static mounted de-ice towers that are more like cranes and some operators have automated trucks where there is no operator in the lift and they can do the whole operation from the cab of the truck.


Can the new REST API now make WP into it's own push notification server?

Question: I'm not a coder by any stretch but if i'm not mistaken, if I wanted to use my WP website as a source of dynamic content inside a phone app then I'd need a 3rd party server to send the push notifications out to the app users, BUT now with the REST API I can now use my WP website as a push server for apps?
Answer: Those technologies are totally independent of each other. The rest API can not be used as it is (in this context I mean the end points) for push notifications as there is a protocol for that and probably all kinds of restrictions browsers place. On the other end, nothing was preventing you from implementing those protocols before there was a rest API, and nothing prevents you from doing it now.
there are even plugins that claim to implement it for years by now https://wordpress.org/plugins/push-notifications-for-wp/ (no idea about the quality of it, was just the first result on google)
Comment: My understanding was those plugins can only push out with/to browsers and can only be pushed out with/to apps when you use a 3rd party (usually the plugin's server). I'm just trying to get my head around the big deal the API has going for it, in terms of making apps?
Comment: https://premium.wpmudev.org/blog/wordpress-rest-api/
"Using the REST API, mobile developers will potentially be able to treat WordPress installs as just another server, with defined endpoints from the point of view of their apps. That fact alone opens up WordPress as a possible true backend for native mobile apps and paves the way for all manner of future integrations."
Comment: sorry, but I am not responsible for whatever iditic PR wpmudev does. The is no mgic in the rest API, all the things that it does could have been done earlier, maybe with somewhat more coding but definatly could have been done


Neutrinos passing through black holes

Question: What would happen to a neutrino that, traveling parallel to the black hole, crossed it's event horizon?  Would it come through the other side unaffected? Or, A neutrino and a black hole just happen to be traveling in the same direction but the neutrino get close enough to cross the event horizon.  Is it now trapped inside the event horizon even though technically it only interacted with the black hole on a gravitational level?
Comment: Does have a black hole "other side"?
Comment: I'm definitely my question...
Comment: I just expanded my question?
Comment: @Harlemme My answer doesn't really change post-edit. There's nothing special about a neutrino; it can get trapped in a black hole like any other particle.
Comment: But something must be able to escape, if only through quantum tunneling, otherwise evaporation wouldn't be possible.
Comment: @Harlemme Virtual particles can escape, yes, but not real particles that enter the black hole.
Answer: In general, don't think of black holes as material objects like stars or planets. We can ascribe properties like mass, charge and angular momentum to them, but if you're near a black hole and reach out to touch its event horizon, you won't feel anything (assuming you're still alive). Your hand will simply pass through empty space, and then into the black hole. Think of black holes instead as regions of spacetime, with the curious property that if you enter one, you can never exit.
I'm guessing your question is motivated by the fact that neutrinos interact extremely weakly with normal matter. They have very little mass and no electric charge, and mainly influence other particles through the weak nuclear force - which is, of course, weak, although not as weak as gravity. The problem with taking this assumption further and concluding that a neutrino might pass through a black hole unharmed is that black holes aren't "normal matter". They're sections of spacetime, and while they may contain matter, that matter is not at all important when interacting with other particles. The only thing here that is important is that they are sections of space which have only one-way openings. Once inside, nothing can leave.

Neutrinos passing through black holes


Counting all subsequences constrained to a condition

Question: I was trying to find all subsequences constrained to the following conditions:

remove element from the end.
remove element from the beginning.
remove element from both sides.

For example, given the sequence $(1,2,3,4)$ have subsequences $\{(1,2,3,4), (1,2,3), (1,2), (1), (2,3,4), (2,3), (2), (3,4), (3), (4)\}$. So, we have get total 10 subsequences.
Attempt: I was thinking of using combinators ${N}\choose{i}$, where $N$ is the length of subsequence in our case and $i$ is the limit boundary of subsequence that starts at $i=1$ and increase all the way to $N-1$. However, since jumps are not allowed, this approach does not seem valid as it will count subsequence like $(1,3,4)$ which is not allowed.
Can you think of an hint/approach based on combinators/permutations to solve this please if possible or this can only be solved iteratively (through for loops/recursion)?
Answer: If I understand it correctly, you are counting the number of continuous subsequences. Every continuous subsequence one-to-one corresponds to a pair of positions representing its start position and end position, so the total number is $\binom{N}{2}$.


Does Stack Exchange have tools to check for broken links?

Question: Do we have tools to check our questions and answers for broken links? I regularly stumble across them. We should fix them, either with changed URLs or with links to the Internet archive, to preserve the integrity of the answer, a good reader experience and (when only accessible by the Wayback machine) the content itself.
Comment: I have put [meta-tag:status-deferred] on this because it is something that would need to be implemented at the Stack Exchange Network level i.e. it is deferred to the SE developers.  I note that a similar feature request at Meta SE has not been declined (or completed): http://meta.stackexchange.com/questions/69832/is-it-possible-to-automatically-mark-broken-links
Answer: I am not aware of any such tools, as useful as they would be.
On Meta SE I found Is it possible to automatically mark broken links? which sounds similar to what you are asking for, so I recommend that you vote for it (like I just did).
In the meantime I think that we can only "fix 'em as we find 'em" as per How should we deal with questions that have broken links?
Answer: Upvoted the question because it would be useful if we could find tools that would check for broken links.
As I hear of websites undergoing redesign, I try to go back and re-edit my older answers to put the new links in, or to link to the Wayback Machine as needed.
One of the things I would also like to see cleaned up are the questions and answers that have naked links (with no labels), or with labels that are opaque (i.e. "this page").  If the link label is a searchable phrase, a user can look for the label on Google whether the underlying URL has human-readable elements in it or not.

Update: as I write this, the Evidence Explained website is undergoing redesign.  I need to edit all my answers (and there are many) that link to EE's Quicklessons.  The EE page is referring people to the Wayback Machine's copies of the old site in the meantime.
The Archive of Quicklessons is available via the Wayback Machine here. https://web.archive.org/web/20150905101409/https://www.evidenceexplained.com/tags/quicklesson
I am willing to use a local Markdown editor to make the changes if no online solution exists.
Comment: I agree strongly with your link labeling thoughts here.


What is the Fourier Transform of a constant signal?

Question: I am trying to figure out what the fourier transform of a constant signal is and for some reason i am coming to the conclusion that the answer is 1. Or better yet a step function.
Comment: the continuous Fourier Transform of a constant is **not** 1 (a constant), but is a dirac delta function. $$ \mathscr{F} \{ C \} = C \cdot \delta(f)  $$ and that is not 1.
Comment: this SE thing actually **imposes a length limitation** (i forgot how many characters).  that's one of the annoying things about SE.
Comment: Huh?${}{}{}{}{}$
Comment: @robertbristow-johnson Comments need to have at least 15 characters in them, but as my Huh? above illustrates, one can still get around the requirement by surrounding pairs of {} with dollar signs.
Comment: @DilipSarwate, answers must be at least 30 characters.  i s'pose my commment was longer than 30 characters.  but it was still to trivial to deserve an answer. {} {} what really bothers me is, when i am on the meta site, that SE's bot copy edits my response and, due to terseness or lacking capitals, says that the quality of my answer is not good enough.  that's when i would like to kick that bot's metal ass.
Comment: can you use $\LaTeX$ and math notation to spell out what you mean by a *"constant signal"*?  do you mean $$ x(t) = C \qquad \forall t $$ ?
Comment: I'm not that good with latex but yes that is what i mean.
Comment: @robertbristow-johnson that's the right and best answer, why not put it below even though it is short?
Answer: I'll complete a bit the answer given in a comment above.
Intuitively first, to which frequency corresponds a signal constant in time, for exemple $x(t) = 1$ $\forall t$ ? Such a signal shows no variation in time and hence contains only a component with frequency 0 (this is a DC signal). This means that its  Fourier transform must be 0 everywhere, except in $f=0$. Mathematically,
$$X(f) = \delta(f).$$
Now, can we prove this? Yes, simply take the inverse Fourier transform of $\delta(f)$ and use the properties of the Dirac delta $\delta(f)$
$$x(t) = \int_{-\infty}^\infty \delta(f)e^{j2\pi ft} \mathrm{d}f = \int_{-\infty}^\infty \delta(f) \mathrm{d}f = 1.$$
Answer: Fourier transforms (they are legion) somehow reflect the amplitude of (complex) sines in data. A flat signal "should" only have non-zero amplitudes on the $0$th frequency, and $0$ amplitude on the others. But what are we calling a flat signal?
I will restrict to two common acceptions.

In the continuous time, the signal spreads from $-\infty$ to  $\infty$, and a continuous-time Fourier transform naturally transforms this infinite spread into an infinite amplitude at the $0$th frequency, theoretically turned into a distribution, denoted by the Dirac $\delta$ function, as answered by @anpar
In a spatially bounded interval (like a constant-valued image), either continuous or discrete, assuming periodicity to maintain some flatness (using Fourier series or the discrete Fourier transform), you obtain a finite constant at $0$ frequency, and zero elsewhere.

This finite constant depends on how you normalize your Fourier transform.
Finally, on a single-sample signal, the DFT or FFT indeed gives you a constant "Fourier" transform:

fft(1)
ans = 1
Answer: When you take the Fourier Transform of a constant signal, the result will be a delta function centered at zero frequency. The delta function has a value of the amplitude of the constant signal.
To see why this happens, let's recall the formula for the Fourier Transform of a continuous-time signal $x \left( t \right)$:
$$ X \left( f \right) = \int x \left( t \right)  e^{-j 2 \pi f t } dt $$
where $X \left( f \right)$ is the Fourier Transform of $x \left( t \right)$, and $f$ is the frequency variable.
If $x \left( t \right)$ is a constant signal, then $x \left( t \right) = C$ for all $t$, where $C$ is a constant. Substituting this into the above formula, we get:
$$ X \left( f \right) = \int C  e^{-j 2 \pi f t} dt  \implies X \left( f \right) = C  \int e^{-j 2 \pi f t} dt$$
The integral in the above expression is equal to zero except when $f = 0$, in which case it is equal to the integration interval. Assuming that the integration interval is from $- \infty$ to $\infty$, we get:
$$ X \left( f \right) = C \int e^{-j 2 \pi f t} dt \implies X \left( f \right) = C \int e^{0} dt \implies X \left( f \right) = C \left[ t \right]^{\infty}_{- \infty} \implies X \left( f \right) = C \left[ \infty - \left( - \infty \right) \right] \implies X \left( f \right) = C \cdot \infty$$
Therefore, the Fourier Transform of a constant signal $x \left( t \right)$ is a delta function centered at zero frequency with a value of $C$, the amplitude of the constant signal.
In summary, when you take the Fourier Transform of a constant signal, the frequency will be zero, and the result will be a delta function centered at zero frequency with a value equal to the amplitude of the constant signal.


How to increase weight speedily?

Question: I am 19 years old boy. My height is 5.5, weight is  46 kg. I know I'm underweight. I've been taking exercise for approx. 2 years. I've achieved toned body but unable to gain muscles. What should I do to gain weight speedily?
Answer: This is too vague to give a specific answer to your needs but the easiest way for an underweight person is this:
Eat every 2 hours. You need to jam a lot of calories into your diet and eat often since your metabolism is so quick.
Eat an additional 500 calories a day
Eat 150 grams of protein, and 200 carbs a day(for your current bodyweight)
Workout 3 days a week, this is best for a beginner. Use rep schemes anywhere between 5 and 10 reps
Do more heavy compound exercises like deadlift, bench press, squats, etc.
The trick to gaining muscle is really 80% diet.. you'll be very full and wanting to throw up during the first week because it'll feel like your binge eating.

How to increase weight speedily?


Using AA Aviator Awards

Question: I signed up for a US Airways, now AA Aviator Credit card and earned 50,000 miles.  When I go online to redeem there are two choices of seats, Economy Miles Saver (none available for my dates) and Economy AA Anytime (some available).  Am I eligible for both of these?
Comment: The difference between the categories is usually just how many miles you need to use.  So you should be able use either fare if you have enough miles.
Comment: *Saver* and *Anytime* refer to seats, not to your frequent flyer status. The answer to this question (and for Delta) will be substantially similar to that of *[What is the difference between Saver and Standard awards on United Mileage Plus?](http://travel.stackexchange.com/questions/7915)*
Answer: These are just different tiers of rewards. Like most frequent flyer programs, AA has a tiered system where the Saver awards (the ones that you rightly note are not available) are cheaper, but go faster. Look at AA's reward chart for the most up to date info.
Answer: American Airlines draws no distinction between miles earned from credit card bonuses, credit card spending, or any other partners (for the purposes of elite status asssignment it is a different story). An AAdvantage redeemable mile is an AAdvantage redeemable mile. Put another way, the miles you earn from the card go into the same co-mingled pot as the miles from your other activity, whether from flying, bonuses, partners, customer service credit, transfers, or gifts.
The AAdvantage Terms & Conditions do not indicate any restrictions on who may redeem for the general award ticket types. MileSAAver awards are somewhat analogous to discount tickets; they are tightly capacity-controlled and heavily restricted. AAnytime awards are somewhat analogous to full-fare tickets; they are much more costly (generally double the redemption level by the award chart / redemption table), but are flexible, can be used on any available seat, and come with a few perqs like access to "Preferred" seats in the economy cabin.
In fact, holders of AAdvantage credit cards, including the Barclays Aviator cards with annual fees, may qualify for additional discounts for MileSAAver seats to certain destinations under the Reduced Mileage Awards program.

Using AA Aviator Awards


Nvidia High Performance Processor Setting leads to graphical bug (Seizure Warning) with current lighting system, drawing completely in the shader code

Question: I followed the Lighting tutorial on learnopenGL, modifying some of the code to work in a 2D game engine. Everything was looking great and my team got our game done and the lights were quite simple for our designers to use. However we ran into a rare bug. as shown here: https://www.youtube.com/watch?v=to0mMP5I0cs one team member was able to recreate the bug by switching his Nvidia settings to use the "High Performance Processor" as opposed to "Integrated Graphics". Otherwise everything renders properly. The bug doesn't appear when there are no lights and everything is rendered in its full color. We have gone through alot of Ideas already but they haven't worked and now I am at a loss. Does anyone have any ideas about what is going on?
Comment: Are you referring to the background? That actually looks quite cool. Can you reproduce that effect more reliably? :)
Comment: Admittedly it does look cool, but the randomness is due to garbage values. but it's seizure inducing which is not what we wanted. The problem was the vec3 for color in the shader wasn't initialized and while some drivers default initialized it, others left it with garbage values.
Answer: Always make sure you initialize your variables. Apparently some cards and drivers automatically initialize vec3 to (0,0,0), but others don't. That was what was going on here. Garbage values causing different colors at each fragment. By Initializing my resulting color vec3 to (0,0,0) at the beginning the problem is fixed.


What is an adjective for somebody who thinks they are helping you but actually aren't?

Question: I was wondering what word could describe a person[s] that is trying to help somebody and feels like they are being empathetic towards them, but is trying to be ignored by the other person? I was thinking "falsely-empathetic" or "anti-empathetic", but it sounds to me like the character I'm describing is not trying to help at all?
Comment: I got confused about who's doing what, but maybe you're looking for *empathetic*.
Comment: To clarify, if I understand correctly: Alice wants to be left alone. Bob tries to help Alice. Bob is genuinely trying to be helpful, but he has failed to understand Alice's feelings -- her wish to be left alone. So he is not being empathetic. What is a word for the kind of person Bob is being when he offers unwelcome help and does not know it is unwelcome?
Answer: If the person is trying to help because they are nosey, then busybody would fit. If they are sincerely trying to help, but the attention is unhelpful or unwanted, then do-gooder would be more suitable.


difference between st_accum and st_collect

Question: Can anyone please tell me the difference between ST_Accum and ST_Collect of PostGIS.
https://postgis.net/docs/ST_Accum.html
https://postgis.net/docs/ST_Collect.html
Answer: The ST_Accum function creates an array of input geometries, while ST_Collect creates a Geometry collection.
Think of it this way. If your inputs are a Bunch of Points, ST_Accum will return an array of points, while ST_Collect will return a Multi-Point.
If the inputs were lines, the ST_Collect would return a Multi-Line and so on.
Answer: The role of ST_accum and ST_Collect are different :

The ST_Accum functions creates an array of input geometries (doc),
while ST_Collect function create a geometry from an input array (doc).

So, you can use the output of ST_Accum as the input of ST_Collect.
The inverse will create an array with one element.


What does Lucy turn into at the very end?

Question: So, I just watched the movie Lucy (starring Scarlet Johansson), and although I think I got most of it, I do have some questions about it.
To begin with:

"Humans normally use only about 10% of their cerebral capacity"?

What is the significance of stating the figure to be 10% in context of the movie, especially when there seems to be a lot of disagreement stating otherwise? There is this article on Wikipedia: Ten percent of brain myth and another one which places this belief to be on the List of common misconceptions. Why, then, are we told that the usage is just 10%?
And the most essential question I have:

By the time she reaches 100%, what exactly does Lucy turn into?

Throughout the progression of her transformation, wherein Lucy steadily gets access to further remote areas of her brain, she is shown to acquire several powers. She travels through the space/time continuum, traveling back through time to reach the ape Lucy. Also, when there is a glimpse of planets, galaxies and universes, I'm thinking that is intended to imply that she gains knowledge of formation of galaxies as well.
At the very end, what exactly does she become?
After all this ends, and especially in light of the text Lucy sends: I am everywhere, would you say that Lucy has become God, or something beyond God, or something else entirely?
Also, when Lucy responds with the text at the end, what are we told? Does it mean that Lucy is now physically dead, but omnipresent via the USB, or perhaps even without it?
Comment: The whole "10% of our brain" thing is pretty ridiculous when you realize that your brain isn't used as a whole for a single function, but actually broken down in to different parts that are used for different functions (i.e. medulla oblongata for respiration, reflex, cerebellum for fine motor control etc.)
Comment: FWIW, the director has [stated](http://www.vulture.com/2014/07/luc-besson-director-lucy-chat.html) he is fully aware that the "10% of our brain" thing is entirely false.
Comment: For a one-word answer, the concept behind what happens to Lucy is [apotheosis](http://en.wikipedia.org/wiki/Apotheosis).
Comment: She [ascended into heaven](https://en.wikipedia.org/wiki/Entering_Heaven_alive) and becoming [omnipresent](https://en.wikipedia.org/wiki/Omnipresence) cosmic [consciousness](https://en.wikipedia.org/wiki/Consciousness#Spiritual_approaches) (God). Self Consciousness is awareness of being aware, possessed only by humans; and Cosmic Consciousness, awareness of the life and order of the universe, possessed only by humans who are enlightened.
Comment: I think the 10% thing was actually said slightly differently at one point (and completely seriously), then twisted by Hollywood into what it is now.  If the original intent was along the lines of "10% of your neurons are firing at any given moment", then it makes sense - as far as I know, if all neurons fired constantly, you couldn't function since there's no longer any peaks/lows to transmit information between neurons.
Comment: @Izkata You just described over-clocking very well!
Comment: @kenorb - wow. I wasn't aware of that.
Comment: Sounds like the director may have known it was false or said he had later, but decided to rely on it as a story-telling crutch.  Sad, given the premise appears interesting
Answer: She became what Luc Besson thinks of the Ultimate Human as being; a connection to the Universe itself, passing back information to its descendants as it transcends our experiences.

Does she become a godlike being, able to manipulate the electromagnetic spectrum as easily as you or I breathe? Most certainly. For her space-time is as flexible as matter is to us. She has as little to do with humanity as we do with a paramecium.

She is unlikely to have become God, the Prime Mover, the creator of the Universe, since she existed as a human and the Universe already existed. Unless you are partial to a Universe where causality can be...flexible. This would be a Universe where an action and a result are not necessarily related to each other directly.

Is Lucy dead? The movie does not posit her being dead. She is everywhere and nowhere. The policemen she used as an anchor to reality gets her final message because he was how she referenced her existence for a time. Lucy is now so far beyond our concepts of life and death, matter and energy, being and non-being as to be completely out of our realm of understanding.

As for the percentage counter:

Storytelling and narrative prose uses counters, calculators, and countdowns as a means of creating a thread for the viewer to become invested in the development of the character. It acts as a measuring tool, a timer for how much capability has passed as well as foreshadowing to what is to come. A simple tool, but effective to most viewers.

The calculation of brain activity is meant as a narrative thread to allow the viewer to follow along with Lucy as she transcends her humanity. Scientists agree, current brain theories have very little to do with the 10% activity model and how the brain works; it is an outmoded concept from an earlier age.
Comment: I have to say, anything that makes Scarlett Johansson into something that's no longer Scarlett Johansson is not ok in my book, regardless of how far up the evolutionary ladder she's gone.
Comment: I agree. An apotheosis away from the goodness that is Scarlett is a downgrade, at best.
Comment: @Monty129 Especially since she was the only thing that made the movie remotely bearable.
Answer:
Why, then, are we told that the usage is just 10%?

Because its the premise for the movie - it doesn't have to truthfully reflect actual known science, it just has to sound plausible to act as the basis for the story.
Comment: The director agrees: "It's totally not true. Do they think that I don't know this? I work on this thing for nine years and they think that I don't know it's not true? Of course I know it's not true!" http://www.vulture.com/2014/07/luc-besson-director-lucy-chat.html
Comment: There are some statistics about us only using 10% of our brains *consciously*, but that doesn't mean that the other 90% is unused, it means that the other 90% is devoted to regulating body temp, running the digestive system, and making sure you don't fall down.
Comment: @Nerrolken - I don't think that's actually true either, where did you hear it?
Answer: The original screenplay indicates that Luc Besson had in mind that she had transcended space and time to become part of the universe itself:

The camera hurtles at top speed through periods and plains toward
Lucy, sitting on her chair in the middle of the lab.
The camera arrives so fast, like a car speeding into a wall, and the
impact is so violent that Lucy disappears.
Her clothes fall on the floor. She is nowhere and, most likely, everywhere. She is now part of the Universe, part of this never-ending story that constantly lives and dies, like a simple cell.

Quite how this allows her to continue existing and what it means for the human race isn't spelled out. Based on the final scene, it seems likely that we're supposed to presume that she has become a god.

Oh, and the USB contained

"Twenty-five centuries of knowledge"

whatever that means.
Comment: "she had transcended space and time to become part of the universe itself" -- I don't know about you, but I'm already "part of the universe itself", though I didn't have to transcend space and time to achieve that.
Comment: Product placement for Samsung!
Comment: @ericsmith - Ah, but can you fit neatly into a flash drive?
Comment: I don't think it was ever implied that Lucy fitted neatly into a flash drive.
Comment: @EricSmith: I think the idea is that you are only "part of the universe itself" in the sense that a drop of water is contained within a jar ... whereas Lucy is "part of the universe itself" in the sense that she _is_ [part of] the jar. She's not in it any more; she _is_ it.
Answer: reff : Lucy Explained
The theory the movie sides with is that when the brain works close to the 10% capacity (which is the amount the average mind uses), humans will function as we know them to. Humans will have a conscience and cognisense. This is basically everyone we know.
The 10% theory is shunned upon by many, but let us ignore that for the sake of the movie.
When humans start to tap into more of their brains, the movie suggests that the humans will not be restricted by touch to access things (mechanical force). Lucy is able to access wireless networks by plugging into it mentally. The theory is that with higher % of brain usage, humans can access and use the electromagnetic fields just like we pick up a glass of water with our hands. In our world today, this is supernatural but the movie suggests that it is not supernatural but just a higher state of existence.

As Lucy's brain function elevates further and further, she is able to
  tap into and use all forms of energy around her. She can look into the
  past or the stars and galaxy because they are all forms of light
  energy that she can access. (eg: The reflection of yourself in a
  mirror is you looking at the past because light takes finite time to
  travel from you to the mirror and back to your eyes)

The final disintegration bit was a little outrageous. The theory there is that with 100% tapping of a brain's functions, you don't need to exist in the physical form of a human at all. She becomes an omnipresent conscience that is connected through pure energy. Pure energy that can alter other form of energy as she likes. She is able to control electromagnetic fields to get networks to send out SMSs, SMSs are after all signals that are sent to the phone over a wireless network.
There is also some of the Asian philosophies that are in alignment with the film:

Dvaitam: Is the concept that most of the world follows. There is a
  divine power and there are the creations of the divine power. This is
  dualism.
Advaitam: Is the concept of one single reality. Atman (the living
  soul) is the same as Bhraman (single reality). What life is, is merely
  an illusion that we perceive. Everything living is merely a combined
  conscience. To get to that realization is deemed attaining Nirvana.
Vishishtadvaitam: is the concept of one single reality too. The
  difference is that here we have the divine power has multiplicity.
  This means the living exist in a pseudo-singular existence, but death
  causes the being to unite with the single reality.
Lucy explains that "we never really die". This pairs well with the
  concept of Vishishtadvaitam where death only leads to rejoining a
  singular reality. Lucy, based on the concepts of Advaitam, has
  attained Nirvana and is now aware that she's part of that singular
  reality and doesn't need her physical body anymore. "She is
  everywhere".
Answer: I couldn't help notice the striking similarity between what happened to Lucy at end, and what they call Ascension in Stargate.
Answer: She became Shrodinger

Joke aside, she became a being outside of our comprehension, capable of being anywhere she want in time and space, and as such, everywhere and nowhere in the same time.
She don t have a physical body anymore, but she became one with the universe, space, time, she may not be god, but the being the closest to be it.