Give a cubic polynomial, defined on the open interval (-5,4), which reaches both its min and max values Give a cubic polynomial, defined on the open interval (-5,4), which reaches both its min and max values.  I don't know if there is a direct approach to solving this but I have been stuck on it for a while and I don't know what the answer is. Any help is appreciated.
Determining functions from specifications... my high school teacher asked this question today, and I am struggling to find an answer that will work. The question is outlined below:  Give an example of a cubic polynomial, defined on the open interval (-3,3), which reaches both its maximum and minimum values.
I have this input:  sdkxyosl 1 safkls 2 asdf--asdfasxy_asd 5 dkd8k  jasd 29 sdi44sw 43 asasd afsdfs 10 rklyasd 4   I need this output:  sdi44sw 43 dkd8k  jasd 29 asasd afsdfs 10 asdf--asdfasxy_asd 5 rklyasd 4 safkls 2 sdkxyosl 1   So i need to sort the lines by the last column.  I don't know how many columns are in one line.  I just can't figure it out, how to do it. I don't have "perl powers". I just have ~average scripting powers with sed, awk, cut, etc..   Does somebody know how to do it? I have ubuntu mate. I have recently changed my password using the passwd command. I know now that I have made a mistake because I also have my home directory encrypted with the previous password.  Consequently after enter my new password at login screen it return me back to the login screen.  Can someone please help me?  I am able to enter to grub boot menu and shell, i am also able to log into guest user. Sorry if the topic is duplicate but I haven't found the same question  Thanks in advance. Why is part of my model not being rendered? String replace method is not replacing characters Is there a term for the moment when a lot of users visit/log onto your website at the same time? Is there a term for the moment when a lot of users visit/log onto your website at the same time? Notify-send ignores timeout? Maybe I'm doing something wrong, but shouldn't the commands (run separately) notify-send -t 1 &quot;test&quot; notify-send -t 1000 &quot;test&quot; notify-send -t 10000 &quot;test&quot;  have different timeouts? The first being nearly instantaneous, the second taking 1 sec and the third 10 seconds? In all cases it seems to take about six seconds for me. Is there a way around this behaviour? As the developers label this as a &quot;feature&quot; instead of a bug, I would like some alternatives. What does this phrase from The adventures of Tom Sawyer sentence mean: "True, the knife would not cut anything, but it was a "sure-enough" Barlow, and there was inconceivable grandeur in that -- though where the Western boys ever got the idea that such a weapon could possibly be counterfeited to its injury is an imposing mystery and will always remain so, perhaps."  Thank you! Best practices with STDIN in Ruby? I want to deal with the command line input in Ruby:  &gt; cat input.txt | myprog.rb &gt; myprog.rb &lt; input.txt &gt; myprog.rb arg1 arg2 arg3 ...   What is the best way to do it? In particular I want to deal with blank STDIN, and I hope for an elegant solution.  #!/usr/bin/env ruby  STDIN.read.split("\n").each do |a|    puts a end  ARGV.each do |b|     puts b end How can I draw simple trees in LaTeX? I need to draw a tree, and constantly using dotty and including the PNGs is starting to be a pain. Is there a way to get LaTeX to draw it's own trees that doesn't involve learning an entirely new language like TikZ? Possible bug in sidebar "question asked:" date Is it OK to crosspost Stack Overflow questions, now that the Portuguese SO is open? Is there a canonical explanation for how Ant-Man's weight works when he shrinks down that's consistent with the various events depicted in the film?    I think the explanation given in the film is roughly "the suit compresses the space in-between atoms, so your size decreases, your density increases, and your total mass stays the same", however it seems to be portrayed in contradictory ways.  For instance:   He can float in water, and even be sent shooting through the air by a relatively gentle flow of water filling a bathtub.  This wouldn't happen if he retained his original mass, as he'd essentially be the densest thing on the planet and should sink like a stone even in a vat of molten lead. Upon landing after being ejected from the bathtub, the ceramic tile underneath him shatters.  That takes a significant amount of force, and similar effects are used at other points in the movie where he falls onto (or straight through) various things. He's able to get sucked into a vacuum-cleaner.  One that didn't even appear to be a high-end, extra powerful vacuum-cleaner, let alone one capable of sucking up a 200 pound piece of dust.   He can run along the barrel of a gun as someone shoots it, apparently without causing them to drop the weapon or even have trouble continuing to aim it.     Does a more consistent explanation exist in other media, that would fit with the above examples?  Or is this simply a case of the power being made to do whatever happened to be most convenient at the time? Custom URL Hack - anybody know how can i find the fields IDs from "User" object? How can I reverse (flip horizontal) a table? NEWID() In Joined Virtual Table Causes Unintended Cross Apply Behavior My actual work query was an inner join, but this simple example with cross join seems to nearly always reproduce the problem.  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT NEWID() TEST_ID ) BB ( B )   With my inner join I had many rows for which I added to each a GUID using the NEWID() function, and for about 9 out of 10 such rows the multiplication with the 2-row virtual table produced the expected results, just 2 copies of the same GUID, while 1 out of 10 would produce different results. This was unexpected to say the least and gave me a really hard time trying to find this bug in my test data generation script.  If you take a look at the following queries using as well non-deterministic getdate and sysdatetime functions, you won't see this, I don't anyway-I always see the same datetime value in both final result rows.  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT GETDATE() TEST_ID ) BB ( B )  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT SYSDATETIME() TEST_ID ) BB ( B )   I'm currently using SQL Server 2008 and my work around for now is to load my rows with GUIDs into a table variable before finishing out my random data generation script. Once I have them as values in a table as opposed to virtual table, the problem goes away.  I have a workaround, but I'm looking for the ways to workaround without actual tables or table variables.  While writing this I tried without success these possibilities: 1) placing the newid() into a nested virtual table:  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT TEST_ID     FROM (         SELECT NEWID() TEST_ID     ) TT ) BB ( B )   2) wrapping the newid() within a cast expression such as:  SELECT CAST(NEWID() AS VARCHAR(100)) TEST_ID   3) reversing the order of appearance of the virtual tables within the join expression  SELECT * FROM (     SELECT NEWID() TEST_ID ) BB ( B ) CROSS JOIN (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A )   4) using uncorrelated cross apply  SELECT * FROM (     SELECT NEWID() TEST_ID ) BB ( B ) CROSS APPLY (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A )   Just before finally posting this question, now I tried this with success it seems, a correlated cross apply:  SELECT * FROM (     SELECT NEWID() TEST_ID ) BB ( B ) CROSS APPLY (     SELECT A     FROM (         SELECT 1 UNION ALL         SELECT 2     ) TT ( A )     WHERE BB.B IS NOT NULL ) AA ( A )   Anyone have any other more elegant, simpler workaround? I really don't want to use cross apply or correlation for a simple row multiplication if I don't have to. Average distance between two random points in a square Points in Polygon missing from QGIS 2.16.x? Looking to do a basic Hex analyis with some random points within the Gulf of Mexico.      I created a hex grid from MMQGIS  Under my Vector tool - Analysis tools, I dont have Points in Polygon.  Is it missing on 2.16.3 (2.16.x)? Possible to do a MySQL foreign key to one of two possible tables? Using CBC with a fixed IV and a random first plaintext block Is there a standard naming convention for XML elements? Is there any standard, de facto or otherwise, for XML documents? For example which is the "best" way to write a tag?  &lt;MyTag /&gt; &lt;myTag /&gt; &lt;mytag /&gt; &lt;my-tag /&gt; &lt;my_tag /&gt;   Likewise if I have an enumerated value for an attribute which is better  &lt;myTag attribute="value one"/&gt; &lt;myTag attribute="ValueOne"/&gt; &lt;myTag attribute="value-one"/&gt;