C# question. Say I have a customers class that has a bunch of props for storing string only data such as name postal data and phone numbers.   I don't use this entity for ORM as I'm only adding it to some type of collection for use during app life cycle. Additionally I don't need to add any entity specific methods to it or persist the data to xml or database, or even to a webservice.  Is it better to make this a struct rather than a class? or no benefit? Also side question, should I make the collection Customers, a list structure?  Be harsh, please critique.. :)   struct customer     {         private string name;          public string Name         {             get { return name; }             set { name = value; }         }      }  struct Customers<List> {     private customer cust;      public customer Cust     {         get { return cust; }         set { cust = value; }     }  }

When should you use struct and not class in C#? My conceptual model is that structs are used in times when the item is merely a collection of value types.  A way to logically hold them all together into a cohesive whole.  I came across these rules :   A struct should represent a single value. A struct should have a memory footprint less than 16 bytes. A struct should not be changed after creation.   Do these rules work? What does a struct mean semantically?


How can we sort a dictionary in python using the internal state of the value?  For example:  myDict = {'a': {'day': [0, 1, 2, 5], 'week': [4, 3, 1, 2, 3]},           'b': {'day': [0, 6, 2, 5], 'week': [4, 3, 1, 2, 3]}}   I want to sort the dictionary keys by the second value of the day list for their corresponding value dictionaries.

I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.


The text on the footer overlaps the text on the sidebar:    This is easier to see if I change the colour of the text:    It also happens on Stack Overflow:    But not Ask Ubuntu:

I just edited an answer on Unix&Linux and when scrolling down, the semi-transparent right sidebar boxes "How to edit" and "How to format" kept their fixed positioning and overlapped with the page footer.     While posting this, I have seen several (not) duplicate questions about this issue, and although from my personal taste, I would prefer the boxes to stop scrolling before the footer is reached, I can accept the development teams decision to let it overlap.   However, on all those other posts, the boxes had an opaque background, so that the footer was hidden and the box content was readable. Here the boxes are transparent though, so the texts get mixed and are no longer well readable.


I use Ubuntu 16.04 and seek to harden my SSH authentication in a special manner.  The current situation:  I have a machine with a minimal Ubuntu server I use mainly to transfer files to via its local OpenSSH server. Now, I don't have a firewall on that machine from a few reasons and I also avoid using a key pair hence I use only a password. One of the only ways I have left to defend from brute force attacks, and the one I most desire at the moment, is using a mechanism that blocks a user for X amount of hours, after Y amount of connection tries.  The desired situation:  I wish to have a standalone mechanism (that is, not as part of a firewall) that blocks a user for X amount of hours, after Y amount of connection tries as a way to defend from brute force attacks.  My Question:  Do you know a utility (and specific configuration) that will let me achieve the desired situation?

What measures can/should I take to make sure that security around my SSH server is absolutely impermeable?  This will be community wiki from the start, so lets see what people do to secure their servers.


I want to assign cell numbers to each grid cell (only having a point in the middle) beginning with 1 at the upper left corner, numbering consecutively by rows. The cells that I want to number are shown below.  Could you help me do that?

I have a layer in which the order of the OBJECTID's is rather random.   How do I assign a new field in the data table that assign's number to each polygon based on it's position on the map?  I'd like to have the top left polygon have number 1 and then increment from left to right, top to bottom.


It is known that the atmosphere consists mostly of oxygen and nitrogen, with oxygen constituting about 21 % and nitrogen 78 %. Since released helium and hydrogen gases rise upwards in the atmosphere, when they are released from a container, one would naïvely think that the lighter nitrogen would rise above oxygen, and then we would have "onion-like" structure of atmosphere, with different shells consisting of different elements. But clearly this is not the case. Why this reasoning fails for nitrogen?

I learned that our atmosphere has ~78% Nitrogen and ~21% Oxygen. If I fill a glass with 21% water and 78% Canola Oil, the more dense (and thus heavier) water will take a full bottom later and Canola Oil will sit on top and take the rest of the space.  Why don't we see the same in our atmosphere? Troposphere is the bottom layer, Oxygen is Heavier than Nitrogen; but why is the composition of the bottom layer of our atmosphere still same as the overall composition? What obvious clue am I missing?


There is a song at The Queen's Gambit episode Adjournment (S1E6), at the bar scene:                                A woman sings a song like "I remember when it rains...". I was not able to find it on the web and it makes me crazy. If you know the name please let me know. Lyrics (credit to user Daphne):  I remember springtime, I remember when it rained I remember night-time, the happiness and pain I remember you, but I can't remember love, when I do when I do I remember nature, and many other things I remember Big Joe Turner, what he sounds like when he sings I remember you, but I can't remember love

Looking for song name and possibly a full song recording. Lyrics: I remember spring time I remember when it rained I remember night time the happiness and pain I remember you but I can't remember love when I do when I do I remember nature and many other things I remember Big Joe Turner what he sounds like when he sings I remember you but I can't remember love....


In the dungeon there are spike balls that are annoying! Can I destroy the blocks around it for it to be gone?

The dungeon has giant swinging spike balls that cause no end of frustration to explorers such as myself.  They dare to keep bold, intrepid, totally-not-thieving adventurers out of the depths with their inability to be destroyed!...Or do they?  I have tried removing the block that they rest on to no avail, but is there any practical way to remove the giant spike ball that plagues the dungeon?  Or, failing that, is there an elegant solution to dealing with these grossly annoying obstacles?


So I was wondering and going back to Harry Potter recently and I was trying to figure out why Dumbledore put Marvolo Gaunt's Ring. The ring that Dumbledore had expertly deduced was an Horcrux was already heavily guarded by Voldemort in Little Hangleton and the only possible solution would be destroy it which Dumbledore eventually did with the Sword of Gryffindor.  It seems extremely careless and stupid of him to do such a thing. Why would the headmaster try a ring that would eventually kill him, as pointed out by Severus Snape?

Dumbledore put on Marvolo's ring, knowing that it was the Resurrection Stone which was on the ring. He also knew (even though he "lost his head" in his excitement to see his family again) that the ring was a Horcrux and would "surely carry a curse":  When I discovered it, after all those years, buried in the abandoned home of the Gaunts - the Hallow I had craved most of all, though in my youth I had wanted it for very different reasons - I lost my head, Harry. I quite forgot that it was now a Horcrux, that the ring was sure to carry a curse. I picked it up, and I put it on...  -Deathly Hallows, Ch 35 - KING'S CROSS Now when Harry realised that the Resurrection Stone was inside the Snitch, all he had to do was turn it three times for it to 'work':  He closed his eyes and turned the stone over in his hand three times. He knew it had happened, because he heard slight movements around him that suggested frail bodies shifting their footing on the earthy, twig-strewn ground that marked the outer edge of the forest.  -Deathly Hallows, Ch 34 - THE FOREST AGAIN I may be missing something, but did Dumbledore incorrectly use the Resurrection Stone? or did Harry just 'think' that he had to turn it thrice? I'm assuming the answer may have been that Dumbledore wanted to have the ring on, and then turn it thrice whenever he felt like conjuring up his family; or that he simply "lost his head"; but he surely didn't need to put it on right? What is the correct way to use the Resurrection Stone?


Sometimes, but rarely, when I post an answer that turns out to be incorrect and it makes more sense to just start over, I delete it and re-post a second. Of course, the first is still there, although it's deleted.  Other than something like that, though, are there acceptable reasons for adding more than one answer to a question?

When is it okay to post two answers to one question?


How can I make a word in a code sample bold? I only see asterisks around the expected bold text.  sample **sample** sample

Frequently when I ask a question I have to include quite a bit of code for reference purposes.    It would be nice to be able to bold the important lines in the code.  For example this code:  <DataTrigger Value="True">     <DataTrigger.Binding>         <MultiBinding Converter="{StaticResource DisableWorkItemConverter}">             <Binding ElementName="MainForm" Path="PickedWorkItemID"/>             <Binding Path="Id"/>         </MultiBinding>     </DataTrigger.Binding>     <Setter Property="IsEnabled" Value="False"/>     <Setter Property="IsSelected" Value="False"/> </DataTrigger>   Is not way long, but the important part (as seen in ) is the second to last line.  However, if I try to bold it, it ends up looking like this:  <DataTrigger Value="True">     <DataTrigger.Binding>         <MultiBinding Converter="{StaticResource DisableWorkItemConverter}">             <Binding ElementName="MainForm" Path="PickedWorkItemID"/>             <Binding Path="Id"/>         </MultiBinding>     </DataTrigger.Binding>     <Setter Property="IsEnabled" Value="False"/>     **<Setter Property="IsSelected" Value="False"/>** </DataTrigger>   Not what I was going for.  It would be nice to be able to draw attention to specific lines of code when needed.    (One suggestion of a different color background sounds nice too (ie a yellow background to draw the eye to the relevant code.)  If there is some other way to bold in code please let me know.


Is there any LaTeX option to treat " characters (ASCII 0x22) as either an opening quote or a closing quote, depending on whether it's at beginning or end of a word?  e.g. I supply the text like:  "hello", world.  and LaTeX would treat that as equivalent to:  ``hello'', world.

I did not know that latex had different symbol for opening and closing quotation marks. I've used it like "abc" every where and just realised that I really should have used ``abc". Is there anyway I can convert all the quotations to become like ``abc"? Doing it manually will take forever as I have a lot of quotations.


The definition of Blackbody states that they absorb all incident thermal radiation. Why does this imply that its radiation spectrum is independent of its composition? Is there some thermodynamical argument I'm missing there?  Thanks.

In the derivation of the , there is nothing whatsoever that relates to a particular/specific material. But we nonetheless use this formula for several distinct sources in nature, such as the Sun and the CMB. How can it be applicable to so many different things? As far as I understand, the emitted photons come from the rotational and vibrational levels. But shouldn't these levels depend on the particular material/elements that the object is made of?   Summarising:   Is the black body radiation formula applicable to an macroscopic object composed of different elements only?  How can it describe so different things (eg Sun spectrum, CMB) if there is nothing in the formula that relates to a specific material/element? If the photons come from vibrational/rotational levels transitions, shouldn't these depend on the object in question? Also, what's the actual reason why there are no contributions from translational motion? And what about excited electrons?


In the film how does NASA manage to accomplish the complex engineering task of getting a group of people to mars but are seemingly unable to to build a spacecraft that does not blow over in a strong wind? Seems like this might have been captured in some initial requirement for the mission given the atmospheric conditions on mars would have been known long in advance?

At the beginning of the film The Martian, part of the dialogue implies that one of the crew has the job of monitoring the MAV to check it is still upright. The importance of this job is clearly shown when a storm hits.  Later we find out about another MAV which will be in place for a significant period of time before it is needed, yet no one shows any concern that it may also be at risk of toppling.  So given the importance of this escape craft, why wasn't any plan in place to tether the first craft? And were NASA just gambling on the weather that the latter MAV didn't topple before it was needed?


1. How is the electric field set up in a wire by a battery so that we can  assume that potential at a node is constant?  2. What happens to the electric field across a resistance which makes voltage 'drop'?     Assume the following circuit:      The battery sets up some electric field throughout the wire, with a component along (parallel to) the wire (otherwise, there is no current). Zooming into the wire,   Here I display only the component of the electric field and electron velocity that is along the wire. As the electron moves a distance d, the work done on it by the electric field is Eqd. This work is non-zero. In other words, electric potential energy of the electron varies with the distance it travels along the wire - and thus so does potential. How, then, is potential on a node the same?    Now, add a resistive load:    The potential at all points on the wire above the battery is 10V, below it - 0V. Considering the above - how is this so?    NOTE: I am aware that a non-ideal wire has resistance. My question lies with what resistance has to do with a difference in potentials in the first place - and why voltage drop is not CAUSED BY a charge's distance from the terminals of the battery.    Exact duplicate it is.


How can I prove the following equality; $$\sum_{n=1}^{\infty}\frac{1}{n2^n}=\ln 2\,.$$

Problem:  Show that $$\ln2 = \sum_\limits{n=1}^\infty\frac1{n2^n}.$$  My progress:  The problem before this one had me find the Taylor series for $\ln(1-x)$ which was $$-\sum\limits_{n=1}^\infty \frac{x^n}n$$  so I figured I'd use $x=-1$ and plug that into the Taylor series. However, there was a side note stating that the Taylor series I found is only valid for $x\in(-1, 1)$. And in any case, my calculation isn't going anywhere, since I end up with the series $1-\frac12+\frac13-\frac14\cdots$  Question 1: How can I use this to solve the problem stated initially, and in the title?  Question 2: I can see why $x$ is restricted to be less than 1, to prevent taking the log of zero or a negative. Why is it not valid for x greater than 1?


I tried to edit my comment (which is not possible) but without being able to tell what each of the icons meant I accidentally pressed the share button.   The card popped up but I couldn’t dismiss it or even select any of the options to then cancel the share.   I took a video but then realised you couldn’t see my finger movements, but I attached an image to where I was talking about:     App Version: 1.6.6.2 Device: Unknown (iPhone10,4) OS Version: Version 13.2.2 (Build 17B102)

The Share menu in iOS 13 got a redesign, and the Stack Exchange iOS app is no longer compatible with it. I can still use it to copy the link, but when I try close the menu, it remains stuck. Opening another app and then returning automatically dismisses the menu, but then I can't use the back button anymore to return to the question list. (I'm still able to refresh the page, so it's a navigation issue.)    Ironically, I discovered this bug while trying to mark  as a duplicate; in the app, the quickest way to do that is to use the Share menu to copy the link to the original question to the clipboard...   App Version: 1.6.6.2 Device: iPhone 7 Plus OS Version: Version 13.1 (Build 17A844)


I purchased Pokémon Gold, second hand, but it keeps deleting its save data at random intervals. I started playing it the other day, and when I came back a day later, found that the data had been deleted.   , however the user asks concerning their game not being able to save at all. To test, I quickly started a new game, saved, and restarted. The save file was there as it should have been, although when I came back the next day, that new data had also been deleted.   I do not think this could be from a dry battery, either, as if it was, it would not be able to hold a save at all. Why does Pokémon Gold randomly delete my save?

I recently bought a copy of Pokémon gold version at a car boot sale. I played it for a while but then I had to stop, so I saved and then turned the game boy off, and took the game out. The next day when I put it back in my Game Boy and switched it on, all my save data was gone and the only options were New Game and Cancel.   I checked online to see if it was fake, but it looked the same as all the real ones. I also compared it to my Pokémon  red which I know is genuine, and all the details of the cartridge were the same (except for colour and sticker of course) here are some pictures of the comparison between the two games      Does anyone know whether this copy of Gold IS fake? How can I tell? Or is it just broken?


I built an apex class for an invocable method that runs from a flow to generate a link to authenticate a user to a community. The apex class updates a field on the contact record when the contact (a partner portal user) clicks the flow button and is linked then to a website. The class generates a code from the calculation of midnight at the start of the year, with the current time in GMT/UTC format. It's my first time in a while writing a test class so wanted to gather so insights.   global class PassKeyInvocable {   @invocableVariable(required=true)   global List<Contact> contactId;    //Gather the contact record Id from the user record. Just the first and only one. @InvocableMethod(label='The Users Contact Id' description='Get the users contact id')   global static void PassKey(List<Id> contactIds) {  id contactId = contactIds[0];      //calculate the passkey (an unique variable the vendor wants) by comparing the current  date/time with Janurary 1st of the current year in GMT // STATIC VALUES PROVIDED BY THE VENDOR Integer Offset = 43994; Integer Multiplier = 3290;           //Get the current time zone and establish the time zone offset      //Get the first day of the year in GMT DateTime oFirstYear = dateTime.newInstanceGMT(dateTime.now().year(), 1, 1, 0, 0, 0);           // get current GMT Time in UTC date/time DateTime oUTCDate = DateTime.newInstance(                                             System.now().year(),                                             System.now().month(),                                             System.now().day(),                                             System.now().hour(),                                             System.now().minute(),                                             System.now().second());      //get # hours elapsed since the start of the year   Long firstOfTheYear  = oFirstYear.getTime();   Long currentDateTime = oUTCDate.getTime();   Long milliseconds    = currentDateTime - firstOfTheYear;   Long seconds         = milliseconds/1000;   Long minutes         = seconds/60;   Long hours           = minutes/60;    Long Calculate = (Offset + hours) * Multiplier; String Passkey = String.valueOf(calculate);             //Gather contact Id from the user record (Invocable Flow requires a collection) and just          get the first value [0].        //Pass the passkey to the user's contact record, which the flow will append to the          destination url.     List<Contact> contactRecord = [Select Id FROM Contact WHERE Id =:contactId];      contact c = contactRecord[0];          c.Passkey__c = Passkey;     update c;     }              }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


In Pokémon Go, via the Pokedex, 249..250..251 numbers do not even register in my Pokedex however in my daughters they do.  Why is that?  My game is up to date.

Why does my friend only have 138 spaces in his Pokédex, when I have 142 spaces in the Pokédex?    We both play the game on Android and I am pretty sure we both have the same version of the game.  Could it maybe be because my friend got it from Germany while I downloaded the apk? Did I maybe find or hatch special Pokémon that don't appear in the Pokédex before I get them? Is there even more Pokémon? Do I have special powers?


string var = "Hello"; cout << var << endl;  We get the result using only the object, without the help of a member variable. I want to implement a class that will work like string. For example: class Test { public:     int x = 3; };  Test var2; cout << var2 << endl;  How can I get implement the class so the cout line prints the value of x without referring to it?

I am writing a small matrix library in C++ for matrix operations. However my compiler complains, where before it did not. This code was left on a shelf for 6 months and in between I upgraded my computer from debian etch to lenny (g++ (Debian 4.3.2-1.1) 4.3.2 ) however I have the same problem on a Ubuntu system with the same g++.  Here is the relevant part of my matrix class:  namespace Math {     class Matrix     {     public:          [...]          friend std::ostream& operator<< (std::ostream& stream, const Matrix& matrix);     } }   And the "implementation":  using namespace Math;  std::ostream& Matrix::operator <<(std::ostream& stream, const Matrix& matrix) {      [...]  }   This is the error given by the compiler:     matrix.cpp:459: error: 'std::ostream&   Math::Matrix::operator<<(std::ostream&,   const Math::Matrix&)' must take   exactly one argument   I'm a bit confused by this error, but then again my C++ has gotten a bit rusty after doing lots of Java those 6 months. :-)


I am fed up trying to upgrade to 14.04  I have tried everything I can find from Ask and nothing is helping. Can I just kill it and install 14.04? Or uninstall completely than boot up with a 14.04 disk?  Please dont make me go back to Gates!

I would like to see a full how-to guide on how to install Ubuntu.


Prove that if $\gcd(a, b) = 1$ then $\gcd(2a + b, a + 2b) \in \{1, 3\}$   I can get up to: $\gcd(2a + b, a + 2b) | 3(a + b)$  But I am unable to move forwards. I would like a hint?  BY Bezout's, there exists integers $x, y$ such that $ax + by = 1$.   $d = \gcd(2a + b, a + 2b) \implies (2a + b)u + (a + 2b)t = d$ for integers existing $u, t$.  But this isn't helping much. What can I do?

If $a$ and $b$ are relatively prime, prove that $a + 2b$ and $2a+b$ are also relatively prime or have a $\gcd$ of $3$.  I'm very new to number theory so please don't assume I am familiar with some of the terminology.


Ok I knew nothing about the definition of mass but I do know that mass can be converted into energy and vice versa. And I read that anything that have stress, energy and momentum will bend spacetime,    what about mass, how does it affects the geometry of spacetime?

In General Relativity Theory, mass can warp spacetime. However, in my view interaction only occurs between pieces of matter. Spacetime is not matter; how can it be affected by matter?


I know there are solutions such as using the keypad to encode ASCII code or using special keys to map accent.  But I am looking for a solution like in   I understand the complexity of having both a keyboard mapping and a UI that shows the selections you can do since Linux core and desktop environments are separated, plus it might not work in non-graphical environments.  But is there a way to configure this mapping (or does it exist already) in a way that we could press for example e, holding it while pressing 1 and have an è. does this can conflict with things like the terminal or os keybinding?  if it does not exist, where could I find the resources to develop it? for once, I agree with an OSX principle: keystroke is not very useful and could result in alternate inputs instead.  EDIT: I am looking if the OSX mapping already exists before doing my own, and if it doesn't and I want to do it, is there a way to do it without a compose key?

Currently I use the character palette applet in gnome panel to put special characters into text.  This is okay, but I have to stop typing, select the character I want from the applet and then copy and paste.  Is there a way to simply type special characters with different key combinations? If so, how do I do it?


Was trying to tweak a menu entry and in an effort to get it to work I deleted all contents of /etc/grub.d. Is there a way I can easily restore it? This question has to be a duplicate by now so if someone can redirect me to an answer that too would be great. :)

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


We use a powershell script to download sql scripts from SVN and apply them to our databases. It works fine except when it comes to Unicode characters. For instance the script contains an insert for 'Saint Barthélemy' and when inserted through the powershell it will end up being 'Saint Barth?lemy'. If the same script is executed through SSMS the value will be inserted correctly. I use following Powershell code: Import-Module -Name SqlServer Invoke-Sqlcmd -ServerInstance $SQLServer -Database $defaultDatabase -InputFile "$tempFolder\$fileName" -AbortOnError -OutputSqlErrors $true -IncludeSqlUserErrors -verbose  Is there any setting that might impact the character translations? This happens with SQL Server 2016

We have a simple T-SQL script file (.sql), which we execute through Powershell. Everything works fine, except the script portion, where we are using some special characters as string (example: 'ô' ).   The same script works fine, if I just execute it through SQL Server Management Studio, but through Powershell it's not rendering these special characters properly.  Here how we access the script file to execute on all databases on instance  Add-PSSnapin SqlServerCmdletSnapin100 Add-PSSnapin SqlServerProviderSnapin100 invoke-Sqlcmd -InputFile "C:\DailyPatch\run.sql" | Out-File -filePath "C:\DailyPatch\dbname.txt"  $text=Get-Content C:\DailyPatch\dbname.txt $a = $text.length $a=$a-3  $logFile = 'C:\DailyPatch\dblog.txt'  for ($i=3 ; $i -le $a ;$i++) {        write-host $text[$i]     $error.clear()      Invoke-sqlcmd -inputfile "C:\DailyPatch\Script4AllDBs.sql"-database $text[$i]-OutputSqlErrors $true|Out-File -filePath "C:\DailyPatch\dbname.txt"      foreach ($rr in $error) {         $text[$i] >> $logFile         $rr >> $logFile     } }   How to set collation in Powershell to avoid such kind of issues?  ps. Unicode thing is already handled on script side  Added: Special characters are being changed to � (Replacement Character)


So, I have to prove this by mathematical induction and I have never done it!  $$\sum_{i=1}^n i^2 = n(n+1)(2n+1)/6$$  However, I have learnt better the theory behind this way to prove statements and studied a couple of easy examples yesterday. I am trying this now but it may be I make some mistakes - perhaps, at the beginning - because I don't get an identity in the final passage. Is this the goal, right? Namely, two have 2 equal lines in the equation (?)  This is my attempt:  Let's prove the base case before with 2 (I choose 2 instead than 1 because with 1 the formula looks more trivial, in my opinion. I guess the choice of the number is arbitrary). Thus:  n=2 , i = sum of natural numbers, according to the rule, up to n, in this case, up to 2. I get:  $$1^2 + 2^2 = 2(2+1) (2*2+1) / 6$$ $$5 = 5$$  (I jumped a step in the computation here to be shorter)  So, the formula is true for 2.  Now, I have to introduce a general number k such that k is a natural number and, for underlying the progression of N, I write: k+1.  However, at this point I have my first doubt: how to write i^2?. Should I leave it like this and replacing only n by k+1?. I am trying to find a way for writig also i in terms of k+1 but I can't find it. So, for now I leave it like this and I work only on the right side of the formula. As I have understood so far, I have to replace n by k+1 simply. So, I write only the right part of the formula in this way:  $$(k+1)*[(k+1)+1]*[2(k+1)+1] / 6$$  I compute the terms:  $$(k+1)*(k+2)*(2k+3) / 6$$  I expand:  $$k^2+2k+k+2*(2k+3) / 6$$  I sum like terms:  $$(k^2+3k+2)*(2k+3) / 6$$  Expand again:  $$2k^3+3k^2+6k^2+9k+4k+6 / 6$$  Sum like terms again:  $$(2k^3+9k^2+13k+6) / 6$$  Already in this passage I don't like this 13, prime number which doesn't allow me to simplify nicely, and which let me think that I made a mistake. I could simplify in this way:  $$k^3/3 + 3k^2/2 + 13k/6 + 1$$  but I don't end up with any similarity with the left side of the formula.  Could you give me some help, please? ...I am already tired...  UPDATE:  I hope you don't put this post as a duplicate for the fact is going to be proved the same statement, as I am trying also to learn how to write a proof with my own style. So, answers to this question may help me to achieve the goal, at least for this question. However, I read and I will also similar questions already posted in order to learn more about proof writing.  UPDATE: Can I write the proof in the following way? After proved for the base case, I write:  Let's assume that k=n and there exists a general number k+1 which appartains at N (I would like to condensate what you refer as steps 2 and 3) so that $$\sum_{i=1}^n i^2 = \sum_{i=1}^{i=k+1} i^2 = k(k+1)(2k+1)/6 + (k+1)^2$$ - I don't know how to put that 1 upon sigma  and then I simply proceed with the algebraic passages (?)


I'm trying to inherit a non-template class from a template class that specified witch type I need  My code is like this:  the header file for base class(updated):  //base.hpp template<typename T> class Base { public:     Base(T a,int b) :             aa(b) {         this->bb = a;         // ... some code     }     // .. some functions ( all are NOT virtual ) protected:     const int aa;     T bb;     // .. some non-constant variables }   The header and code for derived class:  //derived.hpp #include <SFML/System.hpp> #iclude "base.hpp"  class Derived: public Base<sf::Vector2i> { public:     Derived(float, int, Vector2i);     // .. other methods protected:     // .. other variables }  //derived.cpp #include "derived.hpp"  Derived::Derived(float initf, int myint, Vector2i vec) :         Base(vec, myint) {     // ... some codes }   "sf" referes to the namespac for working with SFML library. I'm using SFML 2.0 that compiled from the source using cmake  (for more information you could see: )  When I try to compile these codes with a command similar to this:  $ g++ ./main.cpp ./derived.cpp ./base.cpp -lsfml-system   I get some linker error that tell:  In function `Derived::Derived(float, int, sf::Vector2<int>)': undefined reference to `Base<sf::Vector2<int> >::Base(sf::Vector2<int>, int)'   Also I'm using "g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3" as my C++ compiler with C++11 enabled.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


What are the differences between went through, been through and gone through. For instance:  I have BEEN THROUGH a lot this year.  I WENT THROUGH a lot this year.  I have GONE THROUGH a lot this year.

Could you please tell me whether this conversation is grammatically correct or not.  A : Where were you last week ? or Can I ask like this "Where have you been in the last week ?"  B : I went to Swiss on a holiday trip. I have just got home. or can I just answer like this "I have been to Swiss."  A : With whom did you go ?  B : I went with Harsh. I first planned to go with Harsh and Chris but as Chris has been to that place many times, he was not interested and didn't join with us.  A : What about your dad ? I can't see him anywhere. Where did he go ?  B : He has gone to Australia on business. He will reach home at weekend.  A : When did he go ?  B : He went yesterday.  I had some doubts on "have been", "have gone". I searched more about it and learned the difference. Now, I framed up this conversation using those words. If there are any mistakes, please let me know. Thank you!


String firstanswer = scan.nextLine();     if(firstanswer == answer2)         {             System.out.println("OK lets get started");             }     else         {             System.out.println("That is incorrect, of course you want to play");             }   //answer2 is set to "yes", i declared it above

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Let $G_1$ and $G_2$ be finite groups, and let $K≤G_1 \times G_2$. Let $H_1 = \{ g \in G_1 : (g,e) \in K\}$ and $H_2 = \{g \in G_2 : (e,g) \in K\}$ and suppose $|G_1|$ and $|G_2|$ are coprime. Then show that $H_1 \times H_2 = K$. Show that if $|G_1|$ and $|G_2|$ are not coprime then this does not have to be the case.   My working: I have proved that $H_1 ≤ G_1$, $H_2 ≤ G_2$ and $H_1 \times H_2 ≤ K$. And since $|G_1|, |G_2|$ are coprime, we must have $|H_1|, |H_2|$ are also coprime. Then given that $|G_1 \times G_2|$ = $|G_1||G_2|$, I am trying to use Bézout's Lemma or some similar thing to show that $H_1 \times H_2 = K$.   As for the second part, I have no idea.

Let $G_1$ and $G_2$ be finite groups and let $K \le G_1 \times G_2$      (i) Set $H_1 = \{ g \in G_1 : (g,e) \in K \}$ and $H_2 = \{ g \in G_2 : (e,g) \in K \}$. Show that:   $$H_1 \le G_1; \quad H_2 \le G_2; \quad H_1 \times H_2 \le K.$$      (ii) Suppose that $|G_1|$ and $|G_2|$ are coprime. Show that $K = H_1 \times H_2$.      (iii) Show that this result need not follow if $|G_1|$ and $|G_2|$ are not coprime.   I have done part (i). I was doing part (ii) and got stuck:  Since from above I showed that $H_1 \times H_2 \subseteq K$, now I only need to show that $H_1 \times H_2 \supseteq K$.  Let $(g_1,g_2) \in K$ where $g_1 \in G_1$ and $g_2 \in G_2$. Since $K \leq G_1 \times G_2$, we have $(g_1,e) \in K$ and $(e,g_2) \in K$. Hence $g_1 \in H_1$ and $g_2 \in H_2$.  Finally we have $(g_1, g_2) \in H_1 \times H_2$  As I haven't used the fact that order of G_1 and G_2 are coprime, there must be something fundamentally wrong with my proof.


Prove that $$\sum_{r=1}^{n}(-1)^{r-1} \, H_{r} \, {}^{n} C_{r} = \frac{1}{n},$$ where ${}^{n}C_{k} = \binom{n}{k}$ and the Harmonic numbers are defined by $$H_{n} = \sum_{j=1}^{n} \frac{1}{j}.$$  My attempt: I opened the summations, and re-combined the series but I am getting the same terms again.  Using integration I was able to resolve the series and it converted into  integration of $$ \int_{0}^{1} (1-x)^{n-1} \, dx.$$

Wikipedia has a proof of the identity $$ H_{n} =\sum_{k=1}^{n} (-1)^{k-1} \binom{n}{k} \frac{1}{k}$$    Curiously, there is also the identity  $$ \frac{1}{n} = \sum_{k=1}^{n} (-1)^{k-1} \binom{n}{k} H_{k} $$  Can the second identity be derived from the first one?


Do they all mean the same thing, or are there any technical differences?  I worked at McDonald's. I used to work at McDonald's. I had worked at McDonald's.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


Can someone tell me how to add a ArcGIS FeatureServer to a QGIS plugin? I've found a post here on how to add maplayers which is simple enough but I can't find an description on how to do the same for FeatureServer layers. I'm trying to build a plugin to load a large number of various WMS, WFS, maplayer, featureserver datasets in QGIS without having to manually load them.   example:   maplayer syntax that works:  iface.addRasterLayer("url='my_featuere_layer_url' layer='0'", "mylayer", "arcgismapserver")

I have a password protected ArcGIS-FeatureServer Service, the service provides 25 layers.  Using "Add Layer --> Add ArcGIS-FeatureServer-Layer" works like it should.  Is there any way to add these kind of layers with PyQGIS? I could not find a documentation or example anywhere.  How to Add a normal WFS layer with PyQGIS is well documented.  For ArcGIS MapServer it is super-easy:  iface.addRasterLayer("url='my_featuere_layer_url' layer='0'", "mylayer", "arcgismapserver")   But the provider "arcgismapserver" is not documented anywhere, just found an example after some search, so I expect that there is a similar solution for ArcGIS-FeatureServer.


$$\sum\limits_{k=1}^{n} (k+1) \binom{n}{k} = 2^{n-1} \cdot (n+2)-1$$  Maybe it's simple to prove this equation but I'm not sure how to get along with the induction. Any hints for this? Or may I use another method?  Thanks a lot!

I am trying to prove this binomial identity $\sum_{r=0}^n {r {n \choose r}} = n2^{n-1}$ but am not able to think something except induction,which is of-course not necessary (I think) here, so I am inquisitive to prove this in a more general way.  The left side of an identity occurs while solving another problem (concerning binomial theorem) so I am more interested in deriving the right side from the left side, else I have to remember it now onward.  EDIT: I am more interested in an algebraic proof rather than combinatorial argument or something involving calculus (however I liked  and  solution), hence I am removing the combinatorics tag.


Which one of the below sentences is correct?     Celebrities often face troubles maintaining the privacy of their lifestyles.      Celebrities often face troubles maintaining the privacy of their lifestyle.    I am always confused about the form of the object after the possessive plural pronoun, because I have read many sentences where the author uses just the singular form after the plural pronoun. What is the exact grammar behind this?

Which of them is correct?     Everyone has their own stories   or      Everyone has their own story   What I'm asking about is that how could we decide that we should use a plural or singular noun after the word "own"? Is it correct to think that if a subject of the sentence is singular then a noun following the word "own" must be singular too?   Here are some examples below:     People have their own stories.      Dang has his own story.      Evenyone has their own story.


name email phonenumber eric example@gmail.com 01381031 tuna tuna@gmail.com 1571051  above is the personal_details.txt def personal(userid):     print("Modify personal details")     newemail = input("Enter your new email: ")     newphone = input("Enter your new phone:")     with open("personal_details.txt", "r+") as file:         for line in file:             line = line.split()             if userid == line[0]:                 file.seek(0)                 file.write(" " + newemail + " " + newphone)                 file.truncate()  I am creating profile system which users can modify the details. I wanna overwrite the text in line[2] and line[3] of the files but it keeps overwriting the whole files. Im quite new to python so I really need some helps to figure out this problem.

I want to loop over the contents of a text file and do a search and replace on some lines and write the result back to the file. I could first load the whole file in memory and then write it back, but that probably is not the best way to do it.  What is the best way to do this, within the following code?  f = open(file) for line in f:     if line.contains('foo'):         newline = line.replace('foo', 'bar')         # how to write this newline back to the file


I'm doing a girl here (the concept is not mine, I'm just training) and when I click on mirror modifier Blender creates the other part of the model far away from the first one, not close like it should    I have no idea how to change that, does someone know what is the reason it works that way?

When I add a mirror modifier it sometimes doesn't mirror correctly, giving me an overlapping mesh. How can I fix this?


I am trying to understand why the following piece of code produces the output of 7.  int main() {     int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};     int b[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};     int c = 5;     int *p = a;      printf("%d", (c[b])[p]);      return 0; }

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


I posted something online and someone said it was wrong so...  I said : I just changed my phone number. That person said that i should have said : I have just changed my phone number.  Which one was the correct version?


public class P {   String m(int i) {     return "P.m(int)";   }    String m(Object o) {     return "P.m(Object)";   } }  public class Test {   public static void main(String[] args) {     P p = new P();     System.out.println(p.m(Integer.valueOf(42)));   } }   I can't understand why this program prints "P.m(Object)" instead of "P.m(int)".

I noticed today that auto-boxing can sometimes cause ambiguity in method overload resolution. The simplest example appears to be this:  public class Test {     static void f(Object a, boolean b) {}     static void f(Object a, Object b) {}      static void m(int a, boolean b) { f(a,b); } }   When compiled, it causes the following error:  Test.java:5: reference to f is ambiguous, both method     f(java.lang.Object,boolean) in Test and method     f(java.lang.Object,java.lang.Object) in Test match  static void m(int a, boolean b) { f(a, b); }                                   ^   The fix to this error is trivial: just use explicit auto-boxing:  static void m(int a, boolean b) { f((Object)a, b); }   Which correctly calls the first overload as expected.  So why did the overload resolution fail? Why didn't the compiler auto-box the first argument, and accept the second argument normally? Why did I have to request auto-boxing explicitly?


I am trying to learn assembly language and am trying to do a basic "Hello, World" output. The error I am getting is:  ld: warning: -arch not specified ld: warning: -macosx_version_min not specified, assuming 10.10 ld: warning: ignoring file hw.o, file was built for unsupported file format  ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )  which is not the architecture being linked (x86_64): hw.o Undefined symbols for architecture x86_64:   "start", referenced from:     implicit entry/start for main executable ld: symbol(s) not found for inferred architecture x86_64   My .asm file:  1 section .data msg db "hello, assembly!"  section .text global _start _start:    mov rax, 1      ; rax: temp register; when we call syscall, rax must contain syscall number                    ; 1 means that we will use sys_write system call    mov rdi, 1      ; rdi: used to pass 1st argument to function                    ; it will be the first argument of sys_write    mov rsi, msg    ; rsi: pointer used to pass 2nd argument to functions                    ; msg will be second buf argument for sys_write    mov rdx, 13     ; rdx: used to pass 3rd argument to function                    ; third paramater, length of the string. 3rd argument of sys_write    syscall         ; we have all arguments now we call sys_write with syscall    mov rax, 60     ; pass 60 to rax for syscall exit    mov rdi, 0      ; error code, so with 0 are program must exit succesfully    syscall         ; execute exit code   What I am entering in the command prompt:  $ nasm -f elf64 -g -F dwarf hw.asm $ ld *.o   After I execute the second line on the command prompt, I get the error above.

Does anyone know of any good tools (I'm looking for IDEs) to write assembly on the Mac. Xcode is a little cumbersome to me.  Also, on the Intel Macs, can I use generic x86 asm?  Or is there a modified instruction set? Any information about post Intel.  Also: I know that on windows, asm can run in an emulated environment created by the OS to let the code think it's running on its own dedicated machine. Does OS X provide the same thing?


I am new to Ubuntu and is trying to configure my environment so i can launch Sublime Text 2 directly from the terminal. I followed the solution on this post but no luck so far.  These are steps I did (steps from this ):   -> cd  -> mkdir bin -> sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl   In my .bash_profile I added:  export PATH=$PATH:~/bin  This is the error I got:  ~$ subl --help No command 'subl' found, did you mean:  Command 'subs' from package 'libsubtitles-perl' (universe)  Command 'publ' from package 'atfs' (universe)  Confusions:  First of all, I don't understand why we need to create a bin folder. This folder is now in Home/bin and I don't think I am using it. (I know there are two bin folders. One in File System/usr/bin and the other one File System/usr/local/bin. I am not sure the difference here.)  Second, I noticed  that after I ran the command above (sudo ln -s...) I created a link in my usr/bin folder. However, when I checked this link file, it said the link is broken so i suspect that there is something wrong with the sudo command I executed.   ERROR: This link cannot be used, because its target "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" doesn't exist.  This commnad:   sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl   Does /Applications/Sublime Text 2.app indicates the location of my sublime text 2? If yes, then my sublime text is actually in Home/Programs/Sublime Text 2. So should I change the command to sudo ln -s "/Programs/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl ?   I already tried this, but since there is already a link file in my usr/bin, I got an error when I tried to run the command above.   ERROR: ln: failed to create symbolic link `/bin/subl': File exists  When I attempted to remove it, it said permission denied.   Sorry, I am asking a lot because I am new to Ubuntu. Any help will be appreciated. Thanks a lot.

After following , I cannot launch Sublime Text from command line. How can I fix this?


I read that $\Bbb R/\Bbb Z\times\Bbb R/\Bbb Z$ is a torus and $\Bbb R^2/\Bbb Z^2$ is a flat torus. I want to know is the above facts are true,if false then what is the actual topological structure of torus and flat torus.

I know that the donut-shaped geometric object in $\mathbb{R}^3$ is homeomorphic to a square with identified opposite sites. However, while the latter has a clear symmetry between two dimensions, the former doesn't (as an idea to formalize this, I would think of the fact that you can put a string through the donut hole, and the string then identifies one direction of the two).   Just as I was writing this question, I saw a similar question,  , and a comment there says that representing the torus in $\mathbb{R}^4$ in $\mathbb{R}^3$ instead is what breaks symmetry. What I wonder is how this symmetry can be described in geometric terms? That is, which quantity tells us that one of the torus manifolds in $\mathbb{R}^3$ and $\mathbb{R}^4$ has some symmetry and the other doesn't? If you don't agree with my thoughts about symmetry, what other differences are there between the two?


In a directory and its subfolders I need to see all the files with the png extension.  For this, I used the command ls -R *.png  I get an error saying that the directory *.png doesn't exist. I am surprised that my regular expression is not recognized.  ls: Cannot read '*.png': the file or the directory doesn't exist

I am using locate command.   I want to find all files that end with specific extension and have specific keyword in their name.  For example I want to find image such as this:          myImageFromSummer.jpg      I want to search by keyword "Summer" and extension ".jpg".  How would command look like for this task?


I have tried so many times now but it doesn't work! I have an Acer Aspire V with Windows 8.1 64-bit, 2.50 GHz AMD Quad-Core Processor A10-5757M, 512MB AMD Radeon HD 8650G Graphics System Memory, 8GB DDR3 Memory and 1TB (1000GB) HDD. I tried to install with USB because I don't have a DVD-Drive. I used Universal-USB-Installer, selected Ubuntu 64-bit, browsed and found ubuntu-14.04-desktop-amd64.iso and selected it. I also selected the USB-Drive I will install it on and clicked Create. Then it installed Ubuntu on the USB. I restarted the computer with the USB-Stick plugged in. Then the Acer title screen started to blink. I tried to tap the F12 button but it either not worked! Please help! What do i need to do?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have saved my data on MYSQL database using "utf8_general_ci". I wrote it on Bangla font. But when I am trying to show data using php it is showing "????..." instead of showing the charecters.  <?php  $con = mysqli_connect("localhost","appsaadr_edu","pass","appsaadr_edu");  $result = mysqli_query($con,"SELECT * FROM lnews ORDER BY id DESC");  echo "{\"news\":"; $arr = array();  while($rows = mysqli_fetch_array($result)){     $test['id'] = $rows['id'];     $test['title'] = $rows['title'];     $test['text'] = $rows['text'];     $test['time'] = $rows['time'];      array_push($arr,$test);  }  echo json_encode($arr); echo "}"; ?>   What to do now?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have a jQuery code where I am trying to append to an existing div a label tag which contains a URL. Below is the code:  var strURL = 'http://financials.morningstar.com/ratios/r.htmlt=tup&region=usa&culture=en-US'; var str = '
'; str += '' + strURL + ''; str += '
'; $('#existingDiv').append(str);     When the page is actually displayed it shows the URL as:     ®ion=usa&culture=en-US

How do you safely encode a URL using JavaScript such that it can be put into a GET string?  var myUrl = "http://example.com/index.html?param=1&anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl;   I assume that you need to encode the myUrl variable on that second line?


I am currently reading Liddell Hart's "History of the Second World War", and I'm wondering why he sometimes uses her/she when talking about Japan. In my understanding of English, it should be its or their (if you want to refer to the Japanese people).  For instance:     From 1931 onward the Japanese were aggressively engaged in expanding their footholds on the Asiatic mainland at the expense of the Chinese, ...   makes sense to me, but:     It is remarkable that she deferred striking for more than four month, while trying to negotiate a lifting of the oil embargo   or     Until early in 1941 Japan's plan in case of war against the United States was to use her main fleet in the southern Pacific in conjunction with an attack on the Philippine Islands, ...   does not.  Can somebody explain why Japan is female, and are there more countries for which her should be used?

While talking about ships and countries, is it a good practice to use the feminine form?  For example:  "Her economy" - while referring to a country's economy "Her flag (or deck etc)" - while referring to a ship  Is this practice common? Is it used today?


I have a printer Canon PIXMA iP3600. Following you steps this was installed without problems, but it doesn't print. The test page is sent to the printer and I can see it in the spool, but it never prints.   What can be wrong? I run Ubuntu x64.

I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2.   How do I solve this? Are there proprietary drivers for my Canon printer or scanner?


It is stated that according to quantum field theory the value $0$ for the projection of the spin of the photon would be impossible because the photon has null mass, thus photon has two polarizations only (unlike $W$ and $Z$ which have 3 polarisations). Could it be explained further what is the relationship/explanation with the argument of null mass for impossibility of projection 0 of spin ? (I do know that photon has null mass). Is there an easy mathematical proof ?

I read from Mandl & Shaw that when quantizing massless vector particles such as photons in Lorentz gauge, there are 4 linearly independent polarization vectors (2 of them being able to "gauged away"), while when quantizing massive vector particles such as W bosons, there are only 3 linearly independent space-like polarization vectors. It also says that when W and Z gauge bosons "eat" the Goldstone bosons from Higgs field, they become massive and acquire longitudinal polarization. So apparently there is some rule that says massive vector particles have longitudinal polarization, while massless particles don't. Why is that? From what principle is it derived? Their Euler-Lagrangian equations are essentially the same (both look like Klein-Gordon equation), just one of them has $m=0$. Is it the case that when $m=0$, it has four linearly-independent solutions while only three when $m\neq0$ ?


In this exercise one must show that $$f(x,y) = \begin{cases} 0 \text{     if } (x,y) = (0,0)\\ (x^2 + y^2) \sin\left(\frac{1}{x^2 + y^2}\right) \text{     else} \end{cases}$$ is differentiable for all $(x,y) \in \mathbb{R^2}$  In the lecture, we have proven that if all partial derivatives of $f$ exist and are continuous, then the derivative of $f(x,y)$ exists everywhere.  I start by calculating the partial derivatives of $f$ at $(0,0)$: $$\partial_xf(0,0) = \lim_{x\to0} \frac{f(x,0)-f(0,0)}{x} = \lim_{x\to0} \frac{x^2\sin({1 \over x^2})}{x} = 0$$ Similar for $\partial_y$: $$\partial_yf(0,0) = \lim_{y\to0} \frac{f(0,y)-f(0,0)}{x} = \lim_{y\to0} \frac{y^2\sin({1 \over y^2})}{y} = 0$$  We know that for all other values of $x$, $\partial_x f = 2x\sin\left(\frac{1}{x^2+y^2}\right)-\frac{2x\cos \left(\frac{1}{x^2+y^2}\right)}{x^2+y^2}$  I have tried to show that $\lim _ {x,y \to (0,0)} \partial_x f = 0$. (to show f is continuous) this however is problematic, since this limit doesn't exist. This implies that the partial derivates are not continuous at all points. Which makes this approach of proving that $f$ is differentiable useless.  How do I prove that $f$ is differentiable on all of $\mathbb{R}^2$.  I am open for all kind of suggestions. Thanks for your time.

$$f(x,y,z)=\begin{cases} (x^2+y^2+z^2) \ \sin \frac{1}{\sqrt{x^2+y^2+z^2}} \qquad (x,y,z) \ne (0,0,0) \\ \\ 0 \qquad (x,y,z)=(0,0,0) \end{cases} $$   At first, I study the continuity in the origin.  I apply the concept of sequential continuity: $x_n \rightarrow x_0 \Rightarrow f(x_n) \rightarrow f(x_0)$   So, $x_n=\frac{1}{n}  $ $$x_n \rightarrow 0 \Rightarrow f(x_n,x_n,x_n) \rightarrow f(0,0,0)=0$$ $$\lim_{n\rightarrow +\infty} \frac{3}{n^2} \ \sin \frac{1}{\frac{\sqrt{3}}{n}}=0 $$  How can I continue the study of differentiation?  Thanks!


I have an object(chair) and light in my scene, everything works fine in object/edit mode. I can switch between display methods and the lights/color change accordingly. But when I click the chair and go into TexturePaint mode, there is no more light/shading. A metallic material will be pure black, an image texture will show all the colors completely flat.  Changing to Lookdev or Rendered Mode doesn't help either. Any idea why this is happening?  Thanks!

blender 2.8 texture paint material mode not showing shaded object. IT just displays flat color for the object silhoutte. LookDev mode is enabled and it shows the flat color instead of the actual shading of the object with all the respective textures for normal, height etc applied.


I am a product designer, I use MacBook Pro for my design work. Whenever I design an app/website/web pages after it went live the big problems comes up as color differences in the Apple screen and other windows/Linus etc screens. So how should I resolve this? Is there any method/codes libraries available for this to use or if there any method available to use while at the time of designing the screens.  Thanks in the advance.

This question has to do with color in the context of web pages.  Computer monitors and mobile screens can vary a lot in their color rendering, meaning that a given color on one monitor can look much different on another monitor.  For example, some greens and teals may look pleasant on one monitor but look sickly yellowish on others.  Are there certain web colors that are "safer" than others (NOT to be confused with the outdated practice of using "web-safe color palette")?  Or do you just create the web design on a calibrated monitor and know that's all you can do?


Using the definition: $f’(x)=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}$ i try to find the derivative of the absolute value function. My first two steps are, $f’(x)=\lim_{h\to 0} \frac{|x+h|-|x|}{h}$  rewritten as $\lim_{h\to 0} \frac{\sqrt{(x+h)^2}-\sqrt{x^2}}{h}$ It’s at this point that I’m not sure about my last step, and if it’s correct then I’m lost on how to proceed in order to get the h cancellation to evaluate the limit. I apologize if this is a duplicate. Thank you.

Please Help me derive the derivative of the absolute value of x using the following limit definition. $$\lim_{\Delta x\rightarrow 0}\frac{f(x+\Delta x)-f(x)}{\Delta x} $$ I have no idea as to how to get started.Please Help.  Thank You


$T_1=x+1/x$ is an integer greater than $2$. Prove that $x^n+x^{-n}$ is an integer. For what values on $n$, $t_1$ divides $t_n$.  I am stuck with this problem. Please help.

Suppose r + 1/r is an integer. r is real and positve. How to prove r^n + 1/r^n is an integer by induction for all natural numbers n.


More than a couple of people have suggested making it possible to remove/cancel/undo/whatever a moderator flag. Some seemed to be worried about flag weight or whatever. (I know "flag weight," per se, is gone; that doesn't mean mis-flagging isn't monitored.) I don't care about that, I care about wasting moderator time, and avoiding silly misunderstandings.  There is exactly zero reason why a moderator should have to look at a flag I've raised if I see that the reason for the flag has been corrected, and it leads to seemingly-nonsensical flags (because by the time the mod sees them, the situation isn't as described) and nonsensical replies to those flags from moderators (because things have changed).  This can be avoided by giving users with sufficient rep (or whatever other measure you want to use) the ability to remove their own flag prior to a mod getting to it.  Most of the requests for this (e.g., , or ) don't actually have a status-declined on them, but overall it seems as though there's been a decision not to allow users to cancel their own flags. Could we revisit that?

I'm wondering (since it just happened to me), is it possible to "cancel" ("undo", "delete", "retract", whatever) a flag I just raised if I misclicked it, so the mods won't waste time?  I looked everywhere, but I can't find such a feature.


I've a weighted sum of the 2 Gaussian distribution functions as below. How can I get a random number based on this sum of functions. The number of functions can vary up to 10.

How can I sample from a mixture distribution, and in particular a mixture of Normal distributions in R? For example, if I wanted to sample from:   $$ 0.3\!\times\mathcal{N}(0,1)\; + \;0.5\!\times\mathcal{N}(10,1)\; + \;0.2\!\times\mathcal{N}(3,.1) $$  how could I do that?


I am thinking of creating a number of 3D objects/models which will have a particular object/model in all of them,  for example a building which I will use in many other projects with different additions to it and so if I need to make a modification to the building (which is in many other projects) it will automatically flow through to all the other projects which will have that building in them (hope I have explained enough) rather than have to edit all the projects for a change to the building. Is that possible and if so what is the procedure? I know that blender files can be appended and .fbx etc imported but not sure if it is possible what I have in mind.

I have created several designs for a particular project and they are related, but I don't want to have to keep recreating any similar elements, such as shared materials or textures.  How can I use the existing data in a new Blender file?


I am looking for tsql query to get all the associated users in all dbs for a login. Tried below SQL, but this is not giving right result set. If I execute this query under the Database context where the user is present, it gives output as if user is present in all DBs. Same query executed under the Database context where the user is absent, gives 0 rows as if user is not present in any of the DBs. exec sp_msforeachdb 'select  ''?'' AS DBName,dp.name as username from sys.database_principals dp join sys.server_principals  srp on dp.sid=srp.sid where srp.name=''domain\account'''  Thanks

When looking at the properties of a particular login, it's possible to see a list of users mapped to that login:   I profiled SQL Server Management Studio (SSMS) and I see that SSMS connects to every database one at a time and retrieves information from sys.database_permissions  Is it possible to write a single query that retrieves the user mapping information shown above or am I forced to use a cursor or sp_MSforeachdb or something like that?


Question: If $G$ is an infinite group, and $A, B$ subgroups of finite index in $G$, then prove $A \cap B$ has finite index in $G$.  I'm trying to show that $A\cap B$ can not have infinite index, but I can't make contradiction. I do not see where the problem in $A \cap B$ have infinite order comes from. I thought this look easy when I first saw it, but now I'm not so sure..I'm sure its true, but do not know where the contradiction comes from.   Thank you for help if you choose to help

Let $(G,*)$ be a group and $H,K$ be two subgroups of $G$ of finite index (the number of left cosets of $H$ and $K$ in $G$). Is the set $H\cap K$ also a subgroup of finite index? I feel like need that $[G\colon(H\cap K)]$ is a divisor of $[G\colon H]\cdot[G\colon K]$, but I dont't know when this holds.  Can somebody help me out?


The image shows experimental data for the ratio of cross sections $$R=\frac{\sigma(e^+e^-\rightarrow\text{hadrons})}{\sigma(e^+e^-\rightarrow\mu^+\mu^-)}.$$ I am wondering why $R$ is so large for the $Z$ resonance. I thought that it would only depend on the branching ratios of the $Z$ decay into hadrons and muons, but this gives $R\approx 20$ which is much too small.

Below is experimental data for the ratio $$R=\frac{\sigma(e^+e^-\rightarrow hadrons)}{\sigma(e^+e^-\rightarrow\mu^+\mu^-)}$$ as a function of the centre of mass energy $\sqrt s$. I am interested in the peak at around $100GeV$ which corresponds to the resonance of the $Z^0$ boson. There are two ways of looking at this that I have in mind:  We can effectively ignore the electromagnetic process around this energy, and so each process should have it's own Breit-Wigner peak centred on the mass energy of the $Z^0$. The ratio of these is just a constant. Thinking in terms of Feynman rules and again ignoring the electromagnetic process around this region, each process has the same propagator and vertex factors (roughly - ignore quark mixing) and there are some extra factors due to different quarks being possible and colour degeneracy, but still the ratio should be a constant (one possible issue here is interference between Feynman diagrams which I have neglected?).  So my question is why does the peak exist in the data?


We have a newborn baby girl, and she keeps falling asleep at the breast during feeding.  This makes the feeding session super long, because we constantly have to try to find ways to wake her so she can finish eating.   What makes this worse, is that our baby girl has a really hard time falling asleep in her bassinet. We have tried a few different swaddles, and none of them seem to work all that well.  So our girl is exhausted, and understandably falls asleep while feeding.  Does anyone have any tips or advice on how to keep a newborn asleep in bassinet?  Currently she is averaging around 11 or so hours of sleep per day, which seems low relative to everything that’s out there.  For ref, she is one week old.  Thanks!

My daughter is 2 months old and is exclusively breastfed. After drinking for only 5 mins she falls asleep again and wakes up crying again after 30 mins. We have tried different things like tickling her but have failed to keep her awake to drink for longer. Her weight is in normal range now but we are worried about of her not getting enough. Pls suggest some way of keeping her awake and feed longer.


I found some questions and answers where one of the relevant words  contains a typo. (In my case the user wrote 'QlickView' instead of 'Qlikview'.)   I would like to change (edit) these questions and answers, so that the search finds them. But it is not possible to save one letter changes.   Should I flag these questions and answers or is there a better way to improve?

I just attempted to fix a typo on a question on cooking.stackexchange.com and saw this     Oops! Your edit couldn't be submitted because:         Your edit summary must be at least 10 characters   This edit is less than 6 characters; surely more can be improved with your edit?      So, misspelled words have to just be left misspelled?  That could prevent the post from being found in a search.


I have five computers with two of them with windows 7 and others have windows server 2012 OS. There is no internet access in the LAN. I want to sync the time automatically by making one of them as NTP Server others are clients. According to my research, meinberg NTP software should works in my cenario but I was unable to achieve my goal. Is there any another way?

I have some computers that run Windows 7 embedded and are connected to each other by a switch, but are not connected to a larger network or the internet.  After a few weeks, the clocks drift and it is difficult to figure out what is going on in the logs between them.  Is there a way to keep the clocks on these computers synchronized?  Within 1 second would be good enough for my purposes.  I've searched for a solution and everything seems to link to or is a copy of this page:    One of the computers acts as a master for the others and I have configured it as described in the section "Configuring the Windows Time service to use an internal hardware clock" in the above article.  I've attempted to configure another computer as described in the "Configuring the Windows Time service to use an external time source" section, using the IP address of the master for the NtpServer option.  I waited 15 minutes and their clocks did not synchronize (they remain about 1 minute apart).  Also, is there a way to find error messages produced by the w32time service?  Currently, my only approach is to change something and wait to see if it works.  These computers are not in a domain.


This question/answer seems exactly what I need.  But I tried installing import_3dm-master.zip as it suggests, and the rhino3dm-master.zip on which it seems to depend (downloaded zips from GitHub) and don't see a new import format on the File->Import list. What simple, obvious thing am I missing? (And I can't just add a comment to that thread because I just signed up and apparently need a 50 to comment. Hmmm.)

I'm totally new to blender - mostly work in Rhino, but am wanting to use it to render models that I build in rhino so am trying to install the .  I had blender 2.80 installed. Tried installing the addon from the .zip file on my desktop (import_3dm-master) it shows a message in blue in the bottom right of the screen stating that it has installed that addon but it doesn't show in the addon menu under any of the categories.  I tried extracting the file and copying it directly into the addon folder. Still nothing. Tried installing the import_3dm-v0.0.2 version. This shows up in the menu but has an error (shown in screenshot below). I even installed blender 2.82a in the hopes that this would somehow solve the problem but no luck... Here is the error message I get:    Q: How to install this add-on properly?


I am running Ubuntu 12.04. When I run sudo apt-get update now I get the following errors at the end:  W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-amd64/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.92.201 80] E: Some index files failed to download. They have been ignored, or old ones used instead.   I don't know how long this error has been occurring for, but those repositories seem like ones I want and need to have working, so I'd like to fix it. What is the correct address (or an alternate) address to use for these repositories?  Edit  The only entries in my sources.list file which have the host gb.archive.ubuntu.com (The precise-backports entries do not seem to be failing?):  deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse   When I navigate to  in my browser I can see the following folders:   precise-backports precise-proposed precise-security precise-updates precise -- main -- multiverse -- restricted -- universe   This makes me think the paths changed and so the entries in my sources.list are badly formatted now, I'm not sure how to change them to be correct though.  Edit 2  The question marked as a duplicate explains how to remove 404'ing repositories, but *this question explicitly asks what the correct address for precise/12.04 restricted, multiverse and universe ppa is or how to get it. I am not clear how either is a duplicate of the other.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I was playing around in React Native and came across this error. I don't understand why the first snippet throws an error, while the second one runs fine. This does not work: let newContent = { ...oldContent }; // <-- oldContent is a 'const' newContent.value = newValue; // <-- property at 'root level' can be modified newContent.nested.a = b; // <-- throws 'You attempted to set the key with the value on an object that is meant to be immutable and has been frozen.'   But this works fine: let newContent = { ...oldContent }; newContent.value = newValue; newContent.nested = {    a: b, }  The value of nested.a is defined on oldContent. Is this expected behaviour or am I doing something wrong in the first snippet?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


The text that comes to the right of checkbox comes in two lines. When I use the float:right property the text moves below the checkbox and without this property one lines comes to the right of checkbox and rest starts from below the checkbox Below is the code snippet with float property:   input[type=checkbox] {   margin-top: 10px;   margin-right: 10px; }  label {   width: auto;   float: right; } <input type="checkbox" name="optIn" value="Y"> I would like to receive email from you. By checking the box you agree that you have read the Privacy Policy and Terms of Use

This is one of the minor CSS problems that plague me constantly. How do folks around Stack Overflow vertically align checkboxes and their labels consistently cross-browser? Whenever I align them correctly in Safari (usually using vertical-align: baseline on the input), they're completely off in Firefox and IE. Fix it in Firefox, and Safari and IE are inevitably messed up. I waste time on this every time I code a form. Here's the standard code that I work with:   <form>     <div>         <label><input type="checkbox" /> Label text</label>     </div> </form>    I usually use Eric Meyer's reset, so form elements are relatively clean of overrides. Looking forward to any tips or tricks that you have to offer!


By numeric experiment, I have noticed that $$ \underset{i=0}{\overset{k}{\sum }}(-1)^{i+k} (i+n-1)^k \binom{k}{i} = k! $$ for any integer $n$ and $k \ge 1$. How can we prove this?

The successive difference of powers of integers leads to factorial of that power. Here's the formula:     $$\sum_{r=0}^{n}\binom{n}{r}(-1)^r(n-r)^n=n!$$   Can anyone give a proof of this result?  Note: The original question was to prove the more general     $$\sum_{r=0}^{n}\binom{n}{r}(-1)^r(l-r)^n=n!$$   for an integer $l$, which some of the answers address.


The intent of this command sequence is to loop through the 3 options and display either the book/page or instrument no. for each. A excternal programatic function will validate that there is either a book/page of Instrument for each option. I still do not have a feel for how to effective use the available commands but if I can get this going I can build from here.  \newcommand\ErDeedABookA {} \newcommand\ErDeedAPageA {} \newcommand\ErDeedAInstA {I113} \newcommand\ErDeedBBookB {B211} \newcommand\ErDeedBPageB {P212} \newcommand\ErDeedBInstB {} \newcommand\ErDeedCBookC {} \newcommand\ErDeedCPageC {} \newcommand\ErDeedCInstC {I313}  \newcommand\LP {A} \newcommand\Er[1]{ErDeed#1Book#1} \newcommand\AB {\csname\Er\LP\endcsname}  \newcounter{zz} \setcounter{zz}{1} \renewcommand\thezz{\Alph{zz}} \renewcommand\LP {\thezz} \newcommand\EBI {} \newcommand\EBB {} \newcommand\EBP {}  \whiledo {\value{zz} < 4}% {% \ifcsempty {\AB} {\renewcommand\Er[1]{ErDeed#1Inst#1}\renewcommand\EBI {\csname\Er\LP\endcsname} Instrument No. \EBI} {\renewcommand\Er[1]{ErDeed#1Book#1}\renewcommand\EBB {\csname\Er\LP\endcsname} Deed Book \EBB,  \renewcommand\Er[1]{ErDeed#1Page#1}\renewcommand\EBP {\csname\Er\LP\endcsname} Page \EBP}    \stepcounter {zz}% }

I am trying to understand the  \ifdefempty and \ifdefvoid macros. The documentation says that \ifdefempty     Expands to true if the control sequence is defined and is a   parameterless macro whose replacement text is empty, and to false   otherwise.   Similarly \ifdefvoid     Expands to true if the control sequence is undefined, if is a macro   whose meaning is \relax, or a parameterless macro whose replacement   text is empty, and to false otherwise.   From these descriptions I thought that \def\myempty{}, \def\myrelax{\relax}, and \def\myemptyempty{\myempty} would all be both "empty" and "void", but \def\myempty{} is the only one that is either "empty" or "void". What am I missing?  \documentclass{minimal} \usepackage{etoolbox}  \begin{document}  \def\myempty{} \def\myrelax{\relax} \def\myemptyempty{\myempty}   \ifdefempty{\myempty}{Empty}{Not empty}  \ifdefempty{\myrelax}{Empty}{Not empty}  \ifdefempty{\myemptyempty}{Empty}{Not empty}  \ifdefvoid{\myempty}{Void}{Not void}  \ifdefvoid{\myrelax}{Void}{Not void}  \ifdefvoid{\myemptyempty}{Void}{Not void}  \end{document}


I am comparing a variable to many enum values, but the IntelliSense is giving me this warning:    if (val == MyEnum.Value1 | MyEnum.Value2 | MyEnum.Value3){    //code }   My enum looks like this:  public enum MyEnum {     [Description("Value1")]     Value1 = 0,     [Description("Value2")]     Value2 = 1,     [Description("Value3")]     Value3 = 2, }   What is it and what should I do? Is it safe? All i want to avoid is having to write the long version of an if multi-value comparison block.

From time to time I see an enum like the following:  [Flags] public enum Options  {     None    = 0,     Option1 = 1,     Option2 = 2,     Option3 = 4,     Option4 = 8 }   I don't understand what exactly the [Flags] attribute does.  Anyone have a good explanation or example they could post?


How can I solve this exercise?  Suppose that $A,B,C,D$ are $n\times n$ matrices with entries in a field $F$,  satisfying the conditions that $AB^{t}$ and $CD^{t}$  are symmetric and $AD^{t}-BC^{t}=I$.  Here $I$ is the $n\times n$ identity matrix, $M^{t}$ is the transpose of $M$. Prove that $A^{t}D-C^{t}B=I$  Thanks for your help

Let A,B,C,D be complex matrices $n \times n$ such that $AB^T,CD^T$ are symmetric and $AD^T-BC^T=I$. Prove that $A^TD-C^TB=I$. Can anyone give me any idea? Thank you.


Metcalfe's law is a simple principle that says a network with n nodes has n(n-1)/2 possible undirected connections between nodes. It is often illustrated thus (wikipedia):    Is there an easy way to replicate this in TikZ. Ideal would be an approach that allows the user to specify the number, n, of nodes and then draws n nodes symmetrically positioned around a circle with all of the possible n(n-1)/2 connections between them.

I already have a code that draws a regular hexagon the following way   \begin{tikzpicture}[every node/.style={draw,shape=circle,fill=blue}] \path (0,0) node (p0) {} (-1.5,-1) node (p1) {} (-1.5,-2.5) node (p2) {} (1.5,-2.5) node (p3) {} (1.5,-1) node (p4) {} (0,-3.5) node (p5) { }; \draw (p0) -- (p1) (p0) -- (p1) (p0) -- (p2) (p0) -- (p3) (p0) -- (p4) (p0) -- (p5) (p1) -- (p2) (p1) -- (p3) (p1) -- (p4) (p1) -- (p5) (p2) -- (p3) (p2) -- (p4) (p2) -- (p5) (p3) -- (p4) (p3) -- (p5) (p4) -- (p5); \end{tikzpicture}   But Now I need to remove one of the points and to draw a regular pentagon the same way. So I need to remove (P5) and to recalibrate all other points (change their coordinates) But I don't need to change the code much.  Is there a way to do it by just slightly changing my code here. ?


I don't know the probability of rolling a large straight with 5 six-sided dice, so I need to know what the probability is.  What is it?

Happy Sunday, I was wondering how to calculate how many combinations could be rolled in the game of Yahtzee in getting a large straight. A large straight is when you roll and the dice com out 1,2,3,4,5 or 2,3,4,5,6. Can any one give me some guidance???


Recently broke my iPhone 11 and upon trying to redownload apps after repairs, found one has been taken off the Australian app store. I use it lots, was actually the app I was using right before breaking the phone. I'm hesitant to change regions to download it because I'm unsure of the consequences for other apps and settings. I have two movies, a bit of music on my Apple ID and plenty of apps. How much of this will remain untouched? Probably sounds silly but I'd like to know if I can switch countries, download the app, and switch back with everything there or if it's worth creating an ID linked to a foreign country to  login and log back out with the app. Or if it's not worth it at all. I have any payment details needed to make the switch I'm sure.

The answer of  explains that it is to install apps bought on the Mac App Store on multiple computers.  My problem is a little bit different. I moved to another country and I had to change the country also in my iTunes profile, due to my new credit card. As a result my iTunes store, App Store and Mac App Store are now associated to the new country.  How can I access and download my purchased Apps on my new MacBook Pro?  Probably one solution would be to change again the country, but it wouldn't be optimal.


If $h:X \to Y$ is a homeomorphism of metric spaces, how do I prove that $X$ is compact if and only if $Y$ is compact?     I can't find the complete formal proof for it anywhere.   My idea: I assume I would take an open cover $\mathcal U$ of $f(X)$ by sets open in $Y$? Then since $f$ is continuous, $f^{-1}(U)$ is open in $X$ for all $U \in \mathcal U$? Or is that the wrong place to start?  Step by step help/solutions appreciated!

Let $X$ be a compact metric space and $Y$ any metric space.  If $f:X \to Y$ is continuous, then $f(X)$ is compact (that is, continuous functions carry compact sets into compact sets). Proof:  Consider an open cover of $f(X)$. Then $f(X) \subset \bigcup_{\alpha \in A}V_\alpha$ where each $V_\alpha$ is open in $Y$. $X \subset f^{-1}(f(X)) \subset f^{-1}\left(\bigcup_{\alpha \in A}V_\alpha\right) = \bigcup_{\alpha \in A}f^{-1}(V_\alpha)$. Hence $\bigcup_{\alpha \in A}f^{-1}(V_\alpha)$ is an open cover of $X$.  Since $X$ is compact then we can choose a finite subcover $\{V_i\}_{i=1}^n$ such that $X \subset \bigcup_{i=1}^n f^{-1}(V_i)$. So then $f(X) \subset f\left(\bigcup_{i=1}^n f^{-1}(V_i)\right) = \bigcup_{i=1}^n f\left(f^{-1}(V_i)\right) \subset \bigcup_{i=1}^n V_i$, a finite subcover of $f(X)$.  $\therefore f(X)$ is compact.  Does this proof have an error? Thanks for your help.


I was doing a physics problem and found that I reached an interesting equation:-  To cross the river directly from A to B (making a right angle with the velocity of the stream), how must the fisherman direct his/her boat's motion? Find the angle ($\alpha$) between the velocity vector of the stream and the resultant velocity vector of the boat. The magnitude of the velocity of the boat is $v=2.778ms^{-1}$ and that of the stream is $u=1.3889ms^{-1}$. Solution: We know from the : $$\tan\theta=\frac{Qsin\alpha}{P+Qcos\alpha}$$ Similarly, $$\tan(90^{\circ})=\frac{u\sin\alpha}{v+u\cos\alpha}$$ $$\implies\frac{\sin(90^{\circ})}{\cos(90^{\circ})}=\frac{u\sin\alpha}{v+u\cos\alpha}$$ $$\implies \frac{1}{0}=\frac{u\sin\alpha}{v+u\cos\alpha}$$ $$\implies{v+u\cos\alpha}=0$$ Now, isn't $\;\dfrac10\;$ undefined? How is cross-multiplication valid here? I'm very confused. Edit: It's not $v+v\cos\alpha$. It is $v+u\cos\alpha$. Extremely sorry for the typo.

I was doing a physics problem and found that I reached an interesting equation:   To cross the river directly from A to B (making a right angle with the velocity of the stream), how must the fisherman direct his/her boat's motion? Find the angle ($\alpha$) between the velocity vector of the stream and the velocity vector of the boat. The magnitude of the velocity of the boat is $v=2.778\mathrm{ms}^{-1}$ and that of the stream is $u=1.3889\mathrm{ms}^{-1}$.  Solution: We know from the : $$\tan\theta=\frac{Q\sin\alpha}{P+Q\cos\alpha}$$ Similarly, $$\tan(90^{\circ})=\frac{u\sin\alpha}{v+u\cos\alpha}$$ $$\implies\frac{\sin(90^{\circ})}{\cos(90^{\circ})}=\frac{u\sin\alpha}{v+u\cos\alpha}$$ $$\implies \frac{1}{0}=\frac{u\sin\alpha}{v+u\cos\alpha}$$ $$\implies{v+u\cos\alpha}=0$$ Now, isn't $\;\dfrac10\;$ undefined? How is cross-multiplication valid here? I'm very confused.


How to increase the gap before and after the dot?    Here's a MWE:  \documentclass[a4paper]{article}  \usepackage[inline]{enumitem}  \begin{document}  \begin{itemize*}   \item[] First point   \item Second point   \item Third point \end{itemize*}  \end{document}

This question is somewhat of a follow up to an answer to a previous question ().  I would like to create a list environment (similar to itemize and enumerate) such that the output of the list environment is a comma-separated list.  For example, the following input:  \begin{commalist}     \item Item A     \item Item B     \item Item C \end{commalist}   Should produce the following output:  Item A, Item B and Item C.   Additionally, it would be nice to be able to specify the use of a comma instead of the final and (so that the output is instead Item A, Item B, Item C..


Was AF 3550 Paris to Detroit actually cancelled On April 24 2020? The airline says it STILL hasn’t been so and are refusing a refund except of taxes.

Where can I find historical data on flights, specifically Delta international flights?  I need to find out about cancellations, diversions and any other flight data pertaining on particular route at a given time.  This source has to be official and stand up to legal scrutiny.


I was in interview, the interviewer asked me this question, I couldn't satisfy him with proper answers he was looking for, Need help, Thanks

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


I Opened my old laptop for the first time in years , and it's still on Ubuntu 10.10. Can't seem to figure out how to get it to upgrade to the most recent version.   Any help would be appreciated ?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I'm a new D&D 5e player and I'm making a character using both the players handbook and the new Mordenkainen’s Tome of Foes book. I was wanting to create a Githyanki Fighter.  I noticed that the fighter class give proficiency to all simple and martial weapons and all armor, while the githyanki race feature "Martial Prodigy" has proficient with light and medium armor and with shortswords, longswords, and greatswords.  Do I double the proficiency of these weapons and armors or what exactly would happen in this case? Do they stack somehow or are they redundant?

In the PHB on pg. 146 it states that there are two weapon categories in which the players can be proficient: simple and martial.  As per  answer to another question, being proficient in either category makes the players character proficient in using all weapons of the respective category.   However in the race descriptions the players are given proficiency for specific weapons. Dwarfs, for example, have the trait Dwarven Combat Training giving proficiency with battleaxes, handaxes, throwing hammers and warhammers.   How do the two types of proficiencies interact with each other?


\section{section} \subsection{subsection} \subsubsection{subsubsection} \paragraph{paragraph} \subparagraph{subparagraph}   Outcome:     Why in table of content or text as  1.1.1.1.1 subparagraph   I am using document class:  \documentclass[12pt,oneside]{book}

So we have something like:  \documentclass{article} \setcounter{secnumdepth}{2} \setcounter{tocdepth}{2} \usepackage{amsmath}  \begin{document}  \tableofcontents  \section{Brushless Motor Fundamentals} \subsection{Brushless Motor Operation} \subsubsection{DC Motor Operation} Torque is generated in DC motors from the magnetic force, also known as the Lorentz force, which is produced when an electric current is passed through a coil in a magnetic field. This force is given by $F=q[E+(v\times B)]$, where $F$ is the force perpendicular to the coil, $E$ is the electric field in the coil, $B$ is the magnetic field, and $v$ is the velocity of the charged particles in the coil. From mechanics, torque is $\tau=F\times r$.  \section{Brushless Motor Fundamentals 2} \subsection{Brushless Motor Operation} \subsubsection{DC Motor Operation 2} If the electrical force is ignored and the remaining magnetic force is used, with the assumption that $v$ is perpendicular to $B$, we find that $\tau=qvBrsin\theta$.  \end{document}   How to show subsubsections and paragraphs in TOC?


I can't boot into Ubuntu 12.04 just CentOS. How should I do to revert back Ubuntu GRUB?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I was looking at a construct's immunities and noticed "immune to magic" in its list. Naturally, this means you can't really cast spells at it. How does this affect magical weapons? Do Enhancement bonuses have no effect when attacking these creatures? Do weapon special abilities like flaming and frost not do damage to it? Furthermore, would an alchemist's bombs damage the creature at all? Since they explode using the alchemist's own magical powers.

I was fighting a , and attacked with a weapon enhanced with electricity, does this trigger the golem's immunity to magic?  Does attacking with an enhanced weapon count as a magic attack?


I made a form to be completed by my visited on my web page. I'd like the completed form to be sent to my email, as it will have healthcare information.  I see that the completed form is sent to CognitoForms.com. I need the forms sent to my email, as I really don't want another dashboard to manage.  I need to be able to print this form from the email.  Is there a way to change this?

It says that Cognito Forms can send email notifications when a form is submitted. Where would I find those email notification settings?   I would like for my website clients to be the recipients of those email notifications. Do they have to have an account or a verified email address?   Also, is the form data included in the email notification? Also, is there an advantage to using the WordPress Plugin vs the regular embed code?


When I go to Settings then to Wifi, I cannot turn it On.  I had read in another question I should Reset Network Settings but that did not seem to help.  Does anyone have any idea what I could do?

In my iPhone settings where I'm supposed to turn Wi-Fi on or off, it is just grey & says 'No Wi-Fi'.  I have reset network settings, restored phone, re-synced everything, but still have this problem. Does anyone know how to fix this?


I have created the chat room for magento. I would like to invite top users of magento tag. How can I do this?

The  suggests that after creating a chat room I should be able to invite users to chat from the room menu. I created  to discuss a problem but the room menu has no such invite function.  suggest I should only be able to invite users who are already in a chat. Update: While testing  we discovered there are three separate systems, which further adds to the confusion. Can you please correct the current documentation, update it to show how chat currently works, and in particular address these points of confusion?


I want a cli utility or script that shows all the Wifi devices or hotspots or access points and their signal strength.  I want to log this data using Python. I will write the logging script myself. But I'd prefer it if the CLI utility were a python script so that I can modify it.

I am trying to connect to my WEP network just using the command-line (Linux).  I run:  sudo iwconfig wlan0 mode Managed essid 'my_network' key 'xx:xx:... hex key, 26 digits'   Then I try to obtain an IP with  sudo dhclient -v wlan0   or  sudo dhclient wlan0   without success (tried to ping google.com).  I know that the keyword is right, and I also tried with the ASCII key using 's:key', and again, the same result.  I get the message below when running dhclient:  Listening on LPF/wlan0/44:... Sending on   LPF/wlan0/44:... Sending on   Socket/fallback DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3    I have no problem connecting with WICD or the standard Ubuntu tool.


Let $a, b, c, d \in \mathbb{R}_{>0}$, then prove that  $\frac{a}{b} + \frac{b}{c} + \frac{c}{d} + \frac{d}{a} \geq 4$  Can this be done without using AM-GM inequality, or without using any identity/theorem of inequality? I don't want it to be concise or elegant, I just want rigorous steps that show explicitly how we achieve that result.   Thanks in advance

Prove that, $\dfrac{a}{b}+\dfrac{b}{c}+\dfrac{c}{d}+\dfrac{d}{a}\ge 4$ where we do not use AM-GM inequality on the given statement to prove it. Typically, I am actually looking for a little advanced and elegant solution.    EDIT: $a,b,c,d>0$


I am completely new here and I am overwhelmed. This is a wonderful ocean of information both on and in between the lines.   Is there be a way to leap from random topic to random topic? I usually implement a page that does that on my sites and it would be great to have something like that to navigate through this Pool of Wisdom too. Just F5 and -poof- another topic.   It would be a great help to get a feeling for this place and its companions for newbies like me.     Thank you all for what you showed me in this humble first post of mine in this community.   The need for the random button subsided once I found the power of the tag-button filters.  What I will never forget, is what I found out about this Q&A site. It is very healthy. I undeliberately and very hesitantly injected this off-topic question on Stack Overflow and within 5 minutes, I was shoved this way by five sober and friendly white blood cells. The Organism is very strong and decisive on staying healthy.   This simple post is one that I'll never forget. I feel welcome here, and should I do anything wrong, I have every confidence that I'll be standing corrected in no time, so false habits won't get a chance to creep in.   I greet you, and thank you for this warm welcome.

Wikipedia has a "" link on the front page that makes it easy for people to start exploring. It would be interesting to have something similar for Stack Overflow, perhaps with an additional (optional) constraint for "unanswered" questions. This might help eventually provide some attention to long-forgotten questions that weren't lucky enough to get an answer when they were new.