If I understand correctly, 105 should be written     one hundred five   as in     The building has one hundred five stories.   But is it     A one-hundred-five-story building   or     A one hundred five-story building   or something else?  Note: I'm familiar with the rules stated in the , but the answer there doesn't necessarily apply because numbers greater than 20 and less than 100 are hyphenated regardless. My confusion arises when combining the rule that 105 is not hyphenated on its own, but compound adjectives should be hyphenated. Note also that the links in the suggested duplicate are dead, so I rely only on the text of the answer.

Just read somewhere about this puzzling puzzle:  What is the difference between:   I'm doing a twenty four-hour shift tonight. I'm doing a twenty-four hour shift tonight. I'm doing a twenty-four-hour shift tonight.   I know number 1 is 20 x 4 hours. Number 2 and 3 is the same as far as I know. Is this true?


Which one faster either view or sql query? Please note that both view and sql query having the sql statements.

I want to know what is the difference between a query and a view in terms of performance. And if a view is costly, what else besides a query could I do to improve performance?


I recently purchased an  for an upcoming camping trip. I want to run it on low for two nights, or about 16 hours. With this in mind, I purchased   The capacity is advertised as 42000 mAh.  The IcyBreeze page indicates the amp draw is 1.0 A on low.   suggests I should get about 29.4 hours of battery life (using 42000 mAh capacity, 1000 mA draw, and the consumption rate of 0.7).  With a fully charged power source, I plugged the cooler in using the , set it to low, and ran it until it stopped. I only got about 5 hours of battery life - far less than what I was expecting.  Clearly I am misunderstanding something about the battery life calculation. So I guess I have two questions:   How can I more accurately estimate battery life for this setup? A little off topic, but the portable power source is still well within the return window, and I an open to alternative suggestions for how I might get 16 hours of battery life with a portable power source (non-generator).

I would like to know how to calculate battery life when using an LED strip. The LED strip is powered by 8 AA batteries in series. LED Current Draw = 260 mA. LED power consumption: 3.1 W. LED Operating Voltage range: 9-14.8 VDC. Please see attached images for battery datasheet.  This is my calculation, but I'm not sure if it's correct:     Battery Life = (Battery Capacity)/(Load Current) = 2000 mAh /260 mA = 7.7 Hours   This is for one battery, and the lights are powered by 8 batteries, so is the total battery life = (7.7)x(8) = 61.6 hours ?


Sample code:  class A {     public doSomethingFancy() {          .....          doJOb();     }     private doJob() {         B b  = new B();     }      private class B {     } }   class B is only needed for class A.Or is only used in class A.  Is there need to declare class B as static ? yes/no Why?

What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?


Prove for for all $n\in \mathbb{N}$: $\sum_{l=0}^{n}\binom{n}{l}=2^{n}$  I know the steps of induction but i have no idea how to prove this equation with binomial coefficient.  1) For the induction base i need to take one number and it should be $n=1$. So, do i use this value $n$ for both $n$ and $l$ in the equation? In that case i believe that equation is not valid.   2) Should i for inductive claim increase both $n+1$ and $l+1$?

Prove by induction that for all $n \ge 0$:  $${n \choose 0} + {n \choose 1} + ... + {n \choose n} = 2^n.$$  In the inductive step, use Pascal’s identity, which is:  $${n+1 \choose k} = {n \choose k-1} + {n \choose k}.$$  I can only prove it using the binomial theorem, not induction.


Show that the number 9 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 9.  Show that the number 3 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 3.  Are semigroup and monoid theory could be useful?

Let $s(x)$ be an abstraction for casting out nines of integer $x$. For all integers $x$, prove $s(x) \equiv x$ mod $9$  I'm not asking for an answer more of a way to attack this problem. Can't think of where to start


I'm getting an NullPointerException when im trying to sort my arraylist with "ObjectEpisodes" in it.  The null pointer appears when im trying to sort the ArrayList but then some of the objects dont have a date to sort on. I'm getting those information via JSON and API calls.  What is the best way to handle those null pointers?  My Object implements Comparable:          public Date getDateTime() {             return convertDate(getAirdate());         }            public Date convertDate(String date)         {             SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");             Date inputDate = null;             try {                 inputDate = dateFormat.parse(date);             } catch (ParseException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }             return inputDate;         }          @Override         public int compareTo(SickbeardEpisode another) {             return getDateTime().compareTo(another.getDateTime());         }   Here is were i call Collections.sort(episodes):  private static List<ObjectEpisodes> parseEpisodes(String url) {         List<ObjectEpisode> episodes = new ArrayList<ObjectEpisode>();          String json = download(url);          try {             JSONObject result = new JSONObject(json);             JSONObject resultData = result.getJSONObject("data");             Iterator<String> iter = resultData.keys();             while (iter.hasNext()) {                 String key = iter.next();                 JSONObject value = resultData.getJSONObject(key);                 ObjectEpisode episode = new ObjectEpisode(value);                 series.add(serie);             }         }         catch (JSONException e)          {             e.printStackTrace();         }          Collections.sort(episodes);          return series;     }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm interested in making a sport game for practice, but giving it some fun twists sort of like nintendo does, (super strikers charged, mario golf.)  I'm planning on using unity, but since I am by no means an expert I'm trying to figure out a sport that will be reasonably easy to create.  I'm aware that its not going to be easy, but, for instance I'm not going to make a game like madden, which would have a ton of difficult stuff like play calls which involve predetermined paths and intelligence on both sides, in general way to difficult.  What would be a good sport to try a stylized version of? I'm aware that this is a subjective question, but it isn't a question where any answer is as good as another, so I think it's allowed according to the guideline, but correct me if I'm wrong I guess.

I believe that in order to become a good game developer, you need to make games.   From a programmer's perspective, what are some good entry level games to get your hands dirty? What skills and challenges do each of these games teach you?


I want to calculate the lower limit bound for given price(2.65 * 0.9)   2.65 * (1 - 0.1) = 2.385  then round it to 2 decimal places, the result 2.385 -> 2.39   round(2.385) = 2.39  but when I use C++ to implement above: double pclose = 2.65; double range = 0.1; double lmtdown = pclose * (1 - range); double lmtdownAfterRound= std::round( lmtdown * 100 ) / 100;  printf("pclose=%.2f, range=%.2f, limit down before round=%f,\n", pclose, range, lmtdown); printf("limit after round=%f\n", lmtdownAfterRound);  but the result printed is 2.38!!!!!! instead of 2.39 I wanted pclose=2.65, range=0.10, limit down before round=2.385000, limit after round=2.380000  I have tried anohter round method with std::floor: lmtdownAfterRound= std::floor(lmtdown * 100 + 0.5) / 100; printf("limit after round =%f\n", lmtdownAfterRound);  the result is still 2.38: limit after round with floor=2.380000  is there something wrong in my c++ code, How can I get the correct round value?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Looking to find a way, via string match, to find multiple occurrences of the same word using the streamreader class and contains method (or some other approach).  Below only returns a match on the first occurrence, however if I'm evaluating a string that has "the" 3 times in the string, how can I capture all 3 of those for a count result?  while ((line = file.ReadLine()) != null)     {       if (line.Contains(text))       {           counter++;       } }

I am doing something where I realised I wanted to count how many /s I could find in a string, and then it struck me, that there were several ways to do it, but couldn't decide on what the best (or easiest) was.  At the moment I'm going with something like:  string source = "/once/upon/a/time/"; int count = source.Length - source.Replace("/", "").Length;   But I don't like it at all, any takers?  I don't really want to dig out RegEx for this, do I?  I know my string is going to have the term I'm searching for, so you can assume that...  Of course for strings where length > 1,  string haystack = "/once/upon/a/time"; string needle = "/"; int needleCount = ( haystack.Length - haystack.Replace(needle,"").Length ) / needle.Length;


I would like to know if I can install Ubuntu on an old computer Their characteristics are: Intel core i3 380M 2.53 GHZ processor 2 GB ram memory 320GB hard drive

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


Why do you square things in stats? I have run across this a lot, in both data mining and statistics classes, but no one has ever been able to give me an answer. One specific example is when summing the deviation scores in statistics you have to square them (otherwise the sum is 0). Why do you square them rather then using something else, like absolute value.   Difference between prior question: If you have an answer for the problem above, does your answer apply to most statistics stuff that does this? If not, why not.

In the definition of standard deviation, why do we have to square the difference from the mean to get the mean (E) and take the square root back at the end? Can't we just simply take the absolute value of the difference instead and get the expected value (mean) of those, and wouldn't that also show the variation of the data? The number is going to be different from square method (the absolute-value method will be smaller), but it should still show the spread of data. Anybody know why we take this square approach as a standard?  The definition of standard deviation:  $\sigma = \sqrt{E\left[\left(X - \mu\right)^2\right]}.$   Can't we just take the absolute value instead and still be a good measurement?  $\sigma = E\left[|X - \mu|\right]$


As per the title, do the Monk's mantras affect the Witch Doctor's pets?

There are a number of skills that provide benefits to a player "and their allies".  Do any of these include creatures summoned by a witch doctor?    Examples:   Does a Monk heal affect summons? Do non-witch doctor abilities buff them? If you have two witch doctors in a party, can they buff each other's summons?


I have a table with dates & times in columns.  I need to select the date portion only from a column named last_date.  I see all the information on selecting, but they do not include a column name.  Could someone point out how to select the date portion from a field in a table using the column name??  Thank you

SELECT GETDATE()   Returns: 2008-09-22 15:24:13.790  I want that date part without the time part: 2008-09-22 00:00:00.000  How can I get that?


I am having one big problem. I had dual-boot on my PC: I had Windows 7 and Ubuntu. Yesterday I upgraded to Windows 10 and I deleted the partition where Ubuntu was installed.  When I restarted my laptop it says grub rescue. I tried with these commands: ls, set, root but when I type insmod nomral it says unknown file system. Also when I try ls (hd0,msdos1,3,4 or 5).  I don't have any OS CD or USB and I only have this laptop. I need it so much today.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I have two exact same pictures and they are both the same x:y size. But one of them is 105 KB and the other one is 109 KB. Which of them is of better quality?

I have a Casio EX-S12. It has a setting for image size, but also a separate setting for what it calls "image quality". There are three image quality values: "Fine", "Normal", and "Economy".  The Casio manual is not clear on what image "quality" actually means -- specifically how it's different from image size. All they say is that the "Fine" setting "helps to bring out details when shooting a finely detailed image of nature that includes dense tree branches or leaves, or an image of a complex pattern." I'm confused because isn't this what image size is all about (more pixels = more detail)?  In terms of memory usage, the manual also says that for a 5 megapixel picture, a "Fine" image takes up 2.99 MB, a "Normal" image takes up 1.62 MB, and an "Economy" image takes up 1.12 MB, so this "image quality" setting of theirs is certainly having a significant impact on memory usage.  My question is, what exactly is "image quality", if it's not image size? What is the "thing" that is taking up additional memory?  Thank you.


Let $t \in \mathbb{N}$, let $p_1, ...,p_t$ be $t$ distinct prime numbers. Let $R$ = { $\alpha \in \mathbb{Q}$ : $\alpha=\frac{m}{n}$  for some $m \in \mathbb{Z}$ and $n \in \mathbb{N}$ such that $n$ is divisible by none of $p_i$}. Show that $R$ is a subring of $\mathbb{Q}$ which has exactly $t$ maximal ideals. I'm getting stuck here because i have no idea to solve this problem. Checking $R$ is a subring of $\mathbb{Q}$ is trivial but i don't know how to solve the next part. I wondering that whether every $p_i$ is belong to some maximal ideal $P_i$ and every $P_j$ are distinct. I need help. Many thanks.

Find all rings $R$ satisfying $\mathbb Z \subset R \subset \mathbb Z[\frac {1}{2}]$.   Solution: Let $f \in R$. Then $f= \frac {m}{2^n}$ for some integers $m,n$.  Since $2^{n-1} \in R$, hence $\frac {m}{2} \in R$. Hence one gets that $ \frac {1}{2} \in R$, so $R=\mathbb Z[\frac {1}{2}]$, so there is no ring $R$ satisfying given conditions.     What are the other possible solutions of this problem?    P.S: You can give a solution using any theorem from commutative algebra also.


I need to clear up what I mean by order here. I am simply asking about what order the data is fetched in.  If I simply SELECT * FROM table; in SQL Server without an ORDER BY clause, I find that the results always come in the same order. That certainly is not the case with some other database servers, such as PostgreSQL.  Is the observed behaviour actually happening? I presume that the results will be returned in the order the rows were added.  I have not tried with very large tables, but it certainly appears to be the case for the tables I have worked with.  Note:  This question relates only to SQL Server. I quite understand that SQL itself does not have a preferred order, and that is my experience with other databases.  The point is that SQL Server appears to prefer the allocation order, and I wondered whether that's true.  Note 2:  As regards this question’s being a possible duplicate, I have no interest in why rows are being added anywhere in particular. I just want to know whether they are normally returned in allocation order …

Whenever I manually insert a row into a table in SQL Server Management Studio 2008 (the database is SQL Server 2005) my new row appears at the TOP of the list rather than the bottom. I'm using identity columns and this results in things like   id  row 42 first row 1 second row 2 third row   When rows are fetched and not explicitly ordered. This results in a different appearance when the rows are fetched for the web app and changes what a TOP 1 query returns.  I know I can order by them, but why is this happening? Most of my data is inserted through a web application, all inserts from this application result in a First In First Out ordering, e.g. latest insert is at the bottom, so the ids are all in a row. Is there some setting in the server or Management Studio that causes this improper ordering?


I'm making a hangman game. However, I am struggling when trying to output the word that the player has to guess but as blank characters e.g. if the word was 'great', the program would output _ _ _ _ _  I've used a for loop to create an array that has the same amount of characters as the word, but whenever I run my code, I get an java.lang.NullPointerException.  I have tried researching the issue and looking in the java documentation, however I am new to the language and find it hard to make sense of the issue and how to resolve it. Where am I going wrong?  import java.util.*;  public class Hangman  {     static char[] word1 = {'a', 'm', 'a', 'z', 'i', 'n', 'g'};     static char[] word2 = {'f', 'a', 'b', 'u', 'l', 'o', 'u', 's'};     static char[] word3 = {'g', 'r', 'e', 'a', 't'};     static Random random = new Random();     static int choice;     static char[] choice_array;     static char[] num_of_spaces;      public static void main(String args[])     {         System.out.println("-------");         System.out.println("Hangman");         System.out.println("-------");         choice = random.nextInt(3)+1;         switch (choice)         {         case 1:             choice_array = word1;             break;         case 2:             choice_array = word2;             break;         case 3:             choice_array = word3;             break;         }         System.out.println(choice_array);         for(int counter = 0; counter < choice_array.length; counter++)         {             num_of_spaces[counter] = '_';         }         System.out.println(num_of_spaces);     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'd like to cut out AirPlay entirely.  Looking for an answer, I read   But it didn't really offer a direct solution.    Here is my problem:  I have the household media room connected to an Airplay capable receiver.  Our media server is a secondary Mac that runs 24/7 for the express purpose of serving media throughout the house.  This is a headless machine that does not ever output any audio of its own, and in fact could have all audio drivers disabled and it would be perfectly fine with me.  What happens is, this machine appears to spontaneously decide that it wants to connect to the Airplay receiver, which causes my Media room to suddenly switch input sources and is seriously irritating and confusing to other members of the household.  If I could simply disable Airplay completely on this machine, then all would be well.  But I don't want to impact any other internet connectivity as I have multiple apps that need to communicate at all times in both directions to the outside internet.  Is there in fact a direct way to simply disable Airplay entirely in Mac OS X?

I want to prevent the user from being able to stream to remote speakers with any client on their laptop. Is there a way to globally disable AirPlay on a Mac OS X (10.6 or 10.7) system?


I have been making the same cheesecake for some time.  It is a New York style.  I use premium ingredients and it always tastes great. This is a recipe that my mother always used.  The difference between ours is that I have cracking on the top.  The cracks are not insignificant; when it happens, it is in the shape of a T, it stretches about 5 inches by 5 inches long, and it runs deep. How can I prevent this? I remember my mom saying to be careful when it's in the oven, to walk lightly.  I am careful to do that. Are there any other surefire suggestions?

I've been making cheesecakes for a while and they always end up cracking on the top.  I was told to try putting a pan of water in the oven with it to keep the humidity up, which might help a little, but then it tends to crack when it's cooling.  Am I overcooking?  Or baking at the wrong temperature?  Whipped cream can only cover up so much.


Can we change our profile info like profile picture and name and if yes than how can we do so?  Can anyone help?

I currently do not have access to a computer and I want to edit my Stack Exchange profile.  Is this even possible on the mobile app? I can't find any button to edit or anything similar.


By default, the time in AM/PM style is shown, I would like to have the same that ls gives:  2013-01-09 01:12   That is 24 hours and ISO 8601.  How can I do this?  I am aware of the following question. Maybe that question was too general to be answered:   I tried the following:   I click on the actual clock-display and I get a calendar. In that calendar I read "Time & Date Settings.." - so I click on it: No effect. No nothing. I right-click on the clock-display but I get the same calendar like when left-clicking on it.

Presently the date is showing as mmm dd hh:mm:ss. Is there any way that I can change it to as per my liking. For example : dd mmm, hh:mm:ss.


I have one activity for movie details, I want to open this from two different places and I have two different classes to pass. I try something like this but its not working, there is no error but nothing is happening. This is one place where I am starting new activity, movieDb2 is an object of class for Movie from TMDb API. Intent intent = new Intent(getActivity(), MovieDetails.class);                 intent.putExtra("class", "movieDB");                 intent.putExtra("object", movieDb2);                 startActivity(intent);  And here is other place where I am starting this activity, watchlist is a class of entity from my database. Intent intent = new Intent(getActivity(), MovieDetails.class);             intent.putExtra("class", "watchlist");             intent.putExtra("object", movie);             startActivity(intent);  And here is my activity when I am receiving this objects: public class MovieDetails extends AppCompatActivity {      TextView textView;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.movie_details);         textView = findViewById(R.id.t1);          Bundle bundle = getIntent().getExtras();         if(bundle.getString("class") == "movieDB"){             MovieDb movieDb = (MovieDb) bundle.getSerializable("object");             textView.setText(movieDb.getOriginalTitle());         }         else if(bundle.getString("class") == "watchlist"){             Watchlist watchlist = (Watchlist) bundle.getSerializable("object");             textView.setText(watchlist.getMovieTitle());         }     } }  What I am doing wrong?

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?


The following code:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title>A</title>     <script type="text/javascript" src="./script.js" />     <script type="text/javascript">alert("This is skipped.");</script> </head> <body>     </body> </html>   passes the validation test at W3C and Chrome does not display any Javascript errors on this page. However, the entire text <script type="text/javascript">alert("This is skipped."); is not parsed by the Javascript engine which just looks for the </script> tag even though it's self-closed. The file "script.js" is loaded, however.  In Chrome, Firefox and IE 11, this leads to this same behaviour.   Why is this? What is actually happening here?

What is the reason browsers do not correctly recognize:  <script src="foobar.js" /> <!-- self-closing script element -->   Only this is recognized:  <script src="foobar.js"></script>   Does this break the concept of XHTML support?  Note: This statement is correct at least for all IE (6-8 beta 2).


I'm trying to write to a text file the following data:   TEXTed       00:01:27    8.0 xxxxxxx         Some test  TEXTed       00:01:35  251.0 xxxxxxx         Some text   I'm using streamwriter, first building my string and then writing to file:                  var v15timeString = item.Duration;                 var v15fileString = "             " + item.Time + "       ";                 v15SR.Write(v15fileString);                 var durLength = item.Duration.Length;                 v15SR.BaseStream.Position = -durLength;                 v15SR.WriteLine(item.Duration);   The problem I'm having is for 8.0, 251.0 How do write off these. I want to maintain the .0 for this in all the lines. In layman terms this column should be right aligned. I'm refering this to as item.duration in my code as above.  I did an attempt as above by doing a streamreader.BaseStream.Position = -durLength, but the .Position doesn't take a negative number. How can I seek back after v15filestring, based on durLength, and then write out the item.Duration  Keeping in mind I need to strictly maintain this column as left aligned in the text file as shown in my sample above.  Kindly help. Thank you.

What is the best way to create a fixed width file in C#. I have a bunch of fields with lengths to write out. Say 20,80.10,2 etc all left aligned. Is there an easy way to do this?


Problem statement  Many new users are unaware of how to formulate a good question, particularly for the technical sites like Stack Overflow, Super User (OK, all of SE). This leads to many new questions being:   Closed Downvoted Deleted   In addition, it leads to a fair bit of community work trying to determine what they are asking. This leads to bad experiences for everyone - askers receive "hostility" and the community wasting effort.  Proposal  My suggestion is to create an A/B study analyzing the effects of pre-populating the question box with text, indicating the parts of a question that are important to a good question. The goal is to increase the quality of questions initially.  Right now, much of the burden on pulling out the details of questions are on the community. If a question is vague, it will normally not be improved without comments. If it's not clear, similarly the community has to ask/etc.  I would like to push this burden onto question askers more directly by pre-populating the required information for lower reputation users.  This would look similar to the following (probably could be word smithed), when clicking "ask a new question"      Note that the intent is to make all this text visible in both the input field as well as the actual post body.   Depending on what site this is ultimately added on the specific wording may need to change, particularly the first line.  Desired outcomes  The goals of such a pre-formatted box are:   Make it clear what information is expected   If users don't fill this out it (or leave the pro format text) it is clear they did not bother to read the box they dumped questions into  Help with rubber-duck debugging   Questions which have information addressing those three questions are considerably more likely to be scoped/answerable questions  Guide users unfamiliar with SE (but otherwise capable in asking good questions) in how to do so   Often simple typo types of questions are useless on SE anyways Many people are more than capable of asking good questions but are just unfamiliar with SE Optimize for pearls, not sand  Provide users who receive hostility (downvotes/close votes) a rationalized feedback, particularly if they blatantly ignore the pre-populated text   If users ignore one or more of the sections they now are deliberately choosing to ignore how SE works    A/B study guidelines  I propose that this be implemented in an A/B study, with the following criteria and metrics.   Target users - users who have less than 50 reputation (or are at risk of a question ban, regardless of reputation) Target site - while this fits on Stack Overflow most naturally, this could easily be adopted for a large number of sites Metrics   Conversion rate of questions asked after clicking "ask a question." Lower % conversion --> good. Close rate of questions asked, lower --> good Median and quartile scores of questions asked, higher --> good Average/median time spent writing a question (if this information is available), higher --> good User retention, specifically how many users ask additional questions

suggested to have templates for tags. Their example was with the  tag on Stack Overflow.  I'm suggesting a more general approach:  Templates, Mark II  I suggest that each site will have a template. That template will prefill the  textbox when a new question is asked. However, it will be completely optional.  Something like (for Stack Overflow):  ## The Problem ## { Please tell us what the problem is with as many details as possible.   Include language, operating system, and any other relevant information.   Remember to add the relevant tags below, too. } ## Attempted Solutions ## { Please tell us what you've tried so far. Have you tried searching Google?    What queries? } ## Existing Code ## { Do you have any existing code to show? Please keep it short and simple.    We should be able to detect the problem right away. }   Why am I suggesting this?  Well, it seems as though most users will stick with the default. They don't bother to read, and so prefilling the question form for them with information that we know might be relevant, will forceWe'll get to that in a second them to actually stop and read.  Scenarios:   Best case: User arrives to ask a question, actually reads the template, fills the correct information in the placeholders. (Yeah, because that'll happen a lot) Neutral: User simply removes all of the template text and rewrites their own question. Result is exact same as we have currently. Worst case: User will ignore or misunderstand the template, will use it wrong or not at all and we'll get something like  <template text here, still unfilled> <(crappy) question>   This can be solved in a couple different ways. We could detect the template tags (i.e. { }, subject to discussion), and throw an error when a user attempts to post with them still available. We could also act more autonomously and remove placeholders which still exist.    Some more points:   Templates should be per-site, not per-tag. Sure, there are differences between the tags, but all questions are expected to have the same general information, and this isn't meant to be a rule, but a guideline to help write better questions. Site templates should be editable by that site's mods, like close reasons. We could autofocus on the first placeholder, and perhaps implement TAB to jump from one placeholder to the other, similar to mixins in IDEs. This doesn't have to be implemented everywhere. This suggestion makes sense to Stack Overflow or Superuser, but not to Anime & Manga or Gaming All of the details are subject to discussion, and all discussion is welcomed.


I'm reading a paper recently and encounter a optimization equation which I can't understand: $\max_{x\in\{x|x^TPx\le1\}} c^Tx =(cP^{-1}c^T)^{1/2} $ where $P\succ0$   Anybody knows why the result is $(cP^{-1}c^T)^{1/2}  $?

Let $A \in \mathbb{R}^{n\times n}$ be a positive definite matrix, $x \in \mathbb{R}^n$ and $c \in \mathbb{R} \setminus \{0\}$. I got to determine the maximum  $$\max\{c^Ty:y\in \mathcal{E} (A,x)\}$$  where $\mathcal{E} (A,x)$ is an ellipsoid defined by $A$ and $x$.   How can I determine this maximum? Can anyone give me a hint?


how many ring homomorphisms are there from $\mathbb{Z}_{18} \to \mathbb{Z}_6$  My thought is that: there is a basic ring homomorphism: trivial one Another one is $\phi(1) \to 1$  since $\phi(ab) = ab = \phi(a)\phi(b)$ The last one is $\phi(1) \to 3$. For this case, $\phi(ab) = ab*\phi(1) = 3ab$. $\phi(a)\phi(b) = 3a*3b = 9ab = 3ab$ because I do "mod 6". I just noticed $\phi(1) \to 4$ also works. So there are 4 ring homomorphism. Is my thought correct?

I face the problem of finding how many non-trivial ring or group homomorphisms there are from $\mathbb{Z}_m$ to $\mathbb{Z}_n$, where $m<n$. Is there any general formula?   At the moment, I want to know how many ring homomorphisms there are when $m=12,n=28$.  Please help.


I'm trying to figure out the tricks of class inheritance in C++ and I've built a sample project:  #include "stdafx.h" #include <iostream> using namespace std;  class A { public:     A()     {         cout << "Class A initialized" << endl;     }      ~A()     {         cout << "Class A destructed" << endl;     } };  class B : public A { public:     B()     {         cout << "Class B initialized" << endl;     }      ~B()     {         cout << "Class B destructed" << endl;     } };   int _tmain(int argc, _TCHAR* argv[]) {     cout << "A* a = new A()" << endl;     A* a = new A();     cout << "B* b = new B ()" << endl;     B* b = new B ();     cout << "A* ab = new B()" << endl;     A* ab = new B();      cout << "delete a" << endl;     delete a;     cout << "delete b" << endl;     delete b;     cout << "delete ab" << endl;     delete ab;      int i;     cin >> i;      return 0; }   The output I get is:  A* a = new A() Class A initialized B* b = new B () Class A initialized Class B initialized A* ab = new B() Class A initialized Class B initialized delete a Class A destructed delete b Class B destructed Class A destructed delete ab Class A destructed   I can understand the behavior of class B as a derived class - first it constructs the base class and then the derived class. When it calls the destructor, it does the work the other way around. Seems logical.  What I can't understand, is the behavior of ab (allocation of B which I put into an A pointer), why does the constructor act the same as pure B, but the destructor runs only on A?  Thanks.

I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why?


The menu bar in eclipse isn't working! I tried removing and installing it again but no help.  In my other PC, running the same version of ubuntu (13.10), the menu bar is on the top of the window, not on the very top of the screen like in the screenshot

I'm using Ubuntu 13.10 (with JDK 1.7.0_45).  I've downloaded and uncompressed Eclipse Kepler for Java EE Developers.  The software menus are messed up. I didn't notice similar problems in other software.  When I click any menu in Eclipse, the drop-down seems to be "cut". Sometimes the drop-down shows, but the options are invisible.  I tried Eclipse Indigo, but the same problem occurs.


I need to roll back the recent Ubuntu upgrade that I did, my PC has become unusable.  The mouse pad freezes, left and right click buttons chooses to work when they want to.   I did the update after getting a notification on May 1, 2020 and everything doesn't seem right anymore.   How do I roll back this updates??

I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible?


I am submitting a publication to IEEE.  In the course of the process, they've asked for a cover letter.  Is this request typical of journals and other publications?  What is expected to be on such a letter?

How to write a cover letter to journal when submitting a manuscript?   In the letter, it is expected that I propose 5 referees. Is this the only reason to write a cover letter? Will the cover letter be sent to the referees or only to Journal's staff? I feel reluctant to praise my contribution in the cover letter. The article should defend it itself. Is the praising important part of the cover letter? Is it required?


i have tried installing gnome from repositories i.e. from ubuntu software centre but it shows this error while installing    currently i am having AMD graphic card gallium 0.4 on AMD rs780 so can it support gnome complexities

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Can anyone tell me how to install google drive in Ubuntu 15.10?

I'd like to install a  client for Xubuntu (12.04).  I'm getting non-English Google results, and I didn't find  in the Xubuntu repositories.   Does anyone know of a client that works well for Ubuntu or it's supported derivates (or installation instructions for grive?)


I tried to create a generator, that returns the proper divisors of n (not including n itself). It works fine until 256, but starts including n starting from 257 ... I could not figure out why. Thanks for your help!  def divisorGenerator(n):     large_divisors = []     y = int(math.sqrt(n))     for i in xrange(1, y + 1):         if n % i is 0:             yield i             if i is not n / i and n is not n / i:                    large_divisors.insert(0, n / i)     for divisor in large_divisors:         yield divisor

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


Sometimes, there is an edit made by users with not enough rep. So I click, and sometimes approve. There, I have a message saying "2 more users needs to approve for the edit to take place", or something similar.  I have the privilege to edit. Why isn't my approval enough? If I think the edit is worth it, that means it's an edit I want to see. So I could edit the post right away.  I don't get the thinking behind this.

I already have the "Edit Questions And Answers" privilege. Yet, if I approve someone else's edit, I'm told that more votes will be required before the edit is accepted.  This seems a bit peculiar to me, since I could just copy the edited version and paste it myself.


I used gnuplot, but decided to use tikz now. When I need put log scale in colorbar in gnuplot  I write logscale cb. What options for tikz?  Thank you for your help.  \documentclass[tikz]{minimal} \usepackage[latin1]{inputenc} \usepackage{pgfplots} \usepackage{tikz} \usepackage{graphicx} \usepackage{graphics} \usepackage{amsmath} \pgfplotsset{compat=newest} \usepackage{tkz-kiviat} \usepackage{luamplib} \usepgfplotslibrary{colormaps} \usetikzlibrary{shapes,arrows} \usepackage{pgfplotstable} \usepackage{tikz-3dplot} \pagestyle{empty}  \begin{document} \input{u10cxz.tikz} \end{document}  \begin{tikzpicture}         \begin{axis}[         xlabel={\footnotesize $x$ [$m$]},ylabel={\footnotesize $z$[$m$]},zlabel={\footnotesize $C$ [$g/m^3$]},         width=10cm,         height=10cm,         view={120}{40},         grid=both,         colormap,         colorbar]         \addplot3 [surf,x domain=0:12,y domain=30:70, z domain=0:0.00006, samples=50] table[x index=0,y index=2,z index=4]{data/u10cxz.dat};         \end{axis}     \end{tikzpicture}

Good morning,  I have some .txt files that contain 3 columns of data: the first one corresponds to the x-axis value of each point, the second one corresponds to the y-axis value of each point, and the third one corresponds to the value that i want in the color bar (meta index).  When I plot the whole thing, the colorbar does not scale with the data in the third column of my txt files.  Here is my code:  \documentclass[varwidth]{standalone} % *** PACKAGES *** \usepackage{standalone} % Pour les stand-alone \usepackage[usenames,dvipsnames]{xcolor} % 68 dvips colors à déclarer avant tikz \usepackage{tikz} % Pour les figure Tikz \usepackage{pgfplots} % Pour tracer les courbes à partir de fichiers de données \usepackage{pgfplotstable} % Pour pouvoir lire les tableaux des fichiers .txt % *** PACKAGES END *** \pgfplotsset{compat=1.12} % pour définir la version de pgfplots \pgfplotsset{ /pgfplots/colormap={hsv2}{rgb255(0cm)=(0,0,0) rgb255(0.10cm)=(128,0,128) rgb255(0.5cm)=(0,0,230) rgb255(1.cm)=(0,255,255) rgb255(2.5cm)=(0,255,0) rgb255(3.5cm)=(255,255,0) rgb255(6cm)=(255,0,0)} } % Pour définir les couleurs de la colomap \begin{document} \tikzset{mark options={mark size=1.5, line width=0.01pt}} \begin{tikzpicture} \begin{axis}[             clip mode=individual, % Pour plot dans l'ordre             enlargelimits=false,     colorbar,     colorbar style={ylabel=$C_{ligne,si}$},%,ytick={0,0.2,...,1}},     width=0.7\textwidth,             height=0.6\textwidth,     grid=major,     minor x tick num=1,             xlabel={Real($\lambda (A)$)},     minor y tick num=1,             ylabel={Imag($\lambda (A)$)},     tick label style={font=\footnotesize}, ] \foreach \m in {1,2,...,100} {\edef\temp{\noexpand\addplot+[mark=*,only marks,scatter,scatter src=explicit] table[x index=0,y index=1,meta index=2] {./DATA_01/Valeurs_Propres_\m.txt};}\temp} \end{axis} \end{tikzpicture} \end{document}   and here is the end result that I get:   The color bar starts at 10^-6 and goes up to 10^-3; Now I would like the colorbar to scale logarithmically (instead of linearly) so that the "space" between 10^-6 and 10^-5 is the same than between 10^-5 and 10^-4 and between 10^-4 and 10^-3.  I am joining a .zip with my folder containing my .tex files and the .txt files if someone is willing to go this far to help me.   Thank you very much for your help!  VS


I have been using Ubuntu since last week.  I have a Dell Vastro laptop which has access to LOGIN with FINGERPRINT.  How could I access this using this Ubuntu.

I have a Dell laptop with fingerprint reader inbuilt. I just ran lsusb on terminal and got the following result:   Bus 002 Device 003: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 05ca:1820 Ricoh Co., Ltd Integrated Webcam Bus 001 Device 003: ID 0a5c:21bc Broadcom Corp. BCM2070 Bluetooth 2.1 + EDR Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Is it possible to use fingerprint scanning instead of traditional login with 16.04 and Unity ? Thanks.


I'd like your feedback on a situation I'm facing with my stakeholders with regards to a particular web form design. I'm new to my role as a UX Designer and hope to learn from experienced folks here.  Currently, we have a long form that we cannot break into multiple pages. This is a solution I've brought forth to the stakeholder, but unfortunately, did not take off.  I went with a multi-column form field design. I'm aware that multi-column forms are bad in terms of readability and where possible, we should stick to a single column form (this is not possible due to the length of the form and that we cannot break them into multiple pages). I accept these risks - at least in the first product iteration till we get more user feedback on this, but for now, let's assume the following:   We've a multi-column form design. Each row in the form will have at most 3-4 form fields. The entire form is placed within a modal (again, this is something we can't move away from due to technical constraints)   Currently, our form looks something like below (information masked):    One of the key issues from our stakeholders was that:   For dropdowns and calendars, where there is normally a visual indicator (i.e. an arrow pointing down, calendar icon) accompanying the field: if we stretch it all the way out at 100% of modal width, users may not know that the field is a dropdown or a calendar. It was suggested that we avoid fields that stretch out all the way at 90% modal width and keep it short in length (e.g. see nationality field in the screenshot, suggestion is to keep it at the same length as gender, given name, etc)   My thoughts on it are:   It is a desktop based app and people are viewing this on a normal-sized monitor screen. They'll be able to see within their peripheral vision that the fields (that are currently stretched at 90% modal width) is actually a dropdown or a calendar. I would assume that people would normally click on the "currently active/default value" in the dropdown or the date in the datefield, and they don't bring their cursor all the way to the edges of the field where the "down arrow" (in dropdown) or "calendar icon" (in datefield) are to click; hence, it is OK to stretch the fields at 90% modal width.   Unfortunately, due to the nature of the project, we are unable to run usability tests until after the product launches... These are very real constraints we're facing as UX designers in the organisation we're at, and would like to tap in the experiences of other designers for advice.

I'm trying to give the best experience to users of a very huge system (like a CRM). It has a lot of forms and much of these have a lot of fields. My doubt is about if I should use a single column form (which raises too much vertical scrolling), or a two columns form (which needs less vertical scrolling and uses more horizontal white space) and a last one with four columns (which has few scrolling and uses almost whole white space to try to keep most of the fields above the fold).  It's important to say that our clients hate scrolling, and they always ask why we don't use the horizontal white space when we present a one column form).  So I'm little bit confused about it, because a lot of UX studies and good practices recommend to do not use/avoid multicolumn forms but the clients most of times ask multi column forms.  Our clients are very used to desktop programs and not everybody is very familiar with web based systems.  Below follows some possibilities I would like to share to illustrate an example of a complex form in the system with the three possibilities I mentioned:    In the example above I'm using the one column form (most recommended in UX studies), but with a very long vertical scroll.    In the second example I tried to reduce vertical space by using two columns.    This is the client's favorite one, 4 columns using white space and trying to keep everything above the fold.   The lengths of fields are based on the average of characters amount for each field.   I would like to know your opinion about the best approach to this case.


I have been trying to install Canon Pixima G2010 printer in Ubuntu 16.04. But drivers are not in the list. How can I install the drivers?

I just bought this new printer Canon PIXMA G2000, and I can't find any driver for my Ubuntu. I research this printer and this is the first canon printer with ink-tank.   How long it will take usually for canon to release an official driver for linux?  I try using the printers app and on dash home, and search for printer driver to download. But, no matches found.   Is there any universal driver for canon printer on 16.04?


Let's consider a simplified electricity grid - say there are two power plants (A and B) 1000km apart. There's a town (L1) half way between them, and another town (L2) some distance downstream from B. The time taken for the electricity to travel from A to B is about 1/300th of a second, so that would put A's output 1/5th or 1/6 of wavelength out of phase with (itself?) the time it's got to plant B. Does plant B synchronise to the plant A's phase as it is at plant A, or plant A's phase as it is when it gets to plant B? If the former (presumably using a global time source as the basis), then the two would be in phase when they reach L1, but not when they reach L2. If the latter, then they'd be in phase reaching L2, but not reaching L1.         – Schematic created using

I have been an EE for over forty years and never did find out the right answer to this one....  How do power-stations and transformer switching stations ensure that the power they are feeding into the grid is in-phase with the existing power on the lines.  I know they are VERY serious about setting the line frequency to a ridiculously good accuracy. However, obviously, you can not connect a power line to another line that is 180degress out of phase. Even a small deviation would presumably cause a huge drain on the system and generate a rather strange, and out-of-spec AC waveform.  OK I can imagine a solution at the power station that uses the target line frequency to synchronize the alternators before flipping the switch perhaps. However, that switching station 100km away maybe switching onto a line from a different alternator that is much closer or farther away and consequently at a different point in the phase cycle...  How do they do that...   Note his is NOT the same as  That article only pertains to a local generator and is not, in my mind, the same as the main power grid and transformer switching.


I have unallocated space of 196 GB as you can see. And I want to create NTFS partition for it to be used in Windows10. But I get this error.  Before installing I had a big partition in NTFS I delete it and create a smaller logical partition for 50gb for Ubuntu and I want to use the rest for data storage but it give me this error.    I heard we can create as many partition in extended but I can't create any.

How can I add new logical partition?  I already have an extended partition, so I tried to use GParted to add a new logical partition.   I tried to resize the extended partition, but such an option is not available. I tried to add a new logical partition but it only gave primary partition options.


Why can't I give myself a nickname?    I have already tried about 50 names. I have tried many American names and some nonsense names.  Any suggestions?

The app keeps asking for a nickname, and I have entered dozens of names, but it keeps saying that the names aren't available. How can I find an available name?


If $a < b$ are real numbers, then    $(a,b) \sim (0,1)$ $[a,b] \sim (0,1)$     For the first one, it is quite simple.  Pf (1): Let $f:(a,b)\rightarrow (0,1)$ be defined by $f(x)=\frac{x-a}{b-a}$. Clearly, $f$ is a bijection.  Pf(2): Let $g:[a,b]\rightarrow (0,1)$... (here I want to say something along the lines of) be defined by $g(x)=\frac{x-a}{2(b-a)}, a<x<b$ which clears space for a and b as they are included.. Is this reasoning correct? How do I formally write up the a and b part? Looking for an explanation.

Let $x,y,a,b$ be real numbers.  For $x<y$ and $a<b$, show the cardinality of $[a,b]$ equals the cardinality of $[x,y]$.  I did the above problem, by defining a linear function as a bijection between the intervals. The next part of the problem states,     Extend your result (from above) to open and half-open intervals.    I'm just not sure what exactly I'm supposed to do next, the question seems vague. Am I supposed to show $(a,b)\sim (x,y)$? $[a,b]\sim (x,y)$? $[a,b)\sim (x,y]$?


In my LaTeX document I've defined several environments for various types of entities: theorem, lemma, corollary, definition, notation, and example.    And in the text when I reference one of them I have to add a descriptive word such as the following.  As we see in Lemma~\ref{lemma.100} and Theorem~\ref{theorem.105}, any such set is finite.   The problem is that from time to time, I change my mind about whether a certain entity should be a lemma or a theorem or a corollary etc.  I can easily change the definition site from \begin{lemma}...\end{lemma} to \begin{theorem}...\end{theorem}, but then I need to change all the use-sites as well.  Is there a better way?   Can I somehow define my lemma, theorem etc environments so that I can use a reference such as \envref{ent.100} and that will expand to Lemma~\ref{ent.100} if ent.100 is a lemma, but expand to Theorem~\ref{ent.100} if ent.100 is a theorem?  The same problem exists for tables and figures, but somewhat less often.  I'm not sure if it is important, but here is how I'm defining my environments currently.  \documentclass[a4paper]{article} \usepackage{xcolor} \usepackage{amsthm} \usepackage{framed} \theoremstyle{plain}% default \newtheorem{prototheorem}{Theorem}[section] \colorlet{shadecolor}{orange!15}  \newenvironment{theorem}    {\begin{shaded}\begin{prototheorem}}    {\end{prototheorem}\end{shaded}}  \newtheorem{protolemma}[prototheorem]{Lemma} \newenvironment{lemma}    {\begin{shaded}\begin{protolemma}}    {\end{protolemma}\end{shaded}}  \newtheorem{protocorollary}[prototheorem]{Corollary} \newenvironment{corollary}    {\begin{shaded}\begin{protocorollary}}    {\end{protocorollary}\end{shaded}}  \theoremstyle{definition} \newtheorem{protonotation}{Notation}[section] \newenvironment{notation}    {\begin{shaded}\begin{protonotation}}    {\end{protonotation}\end{shaded}}  \newtheorem{protoexample}{Example}[section] \newenvironment{example}    {\begin{shaded}\begin{protoexample}}    {\end{protoexample}\end{shaded}}  \newtheorem{protodefinition}{Definition}[section] \newenvironment{definition}    {\begin{shaded}\begin{protodefinition}}    {\end{protodefinition}\end{shaded}}  \begin{document}    \section{Introduction}   \begin{lemma}   \label{ent.201}   If $V$ is a set of subsets of $U$, and $\exists X_0 \in V$ such that   $X \in V$ implies $X_0 \subseteq X$, then $X_0 = \bigcap V$. \end{lemma}  Intuitively, Lemma~\ref{ent.201} says that given a set of subsets, if one of those subsets happens to be a subset of all the given subsets, then it is in fact the intersection of all the subsets.  \begin{theorem}   \label{ent.188}  %% used   If $V \subseteq U$, and if $F$ is a set of binary functions defined on   $U$, then there exists a unique $clos_F(V)$, and it is closed under $F$. \end{theorem}  We can see from Lemma~\ref{ent.201} and also from Theorem~\ref{ent.188} such sets are always finite. 2 \end{document}

Inspired by my earlier question , here is another similar question.  There are many different packages for making cross references. Among them , , , , … The  package defines its own cross-referencing command for theorems…  Which collection of packages provides which kind of functionality, and which packages cause conflicts with each other?


I currently have a desktop computer with both Windows 10 and Ubuntu 16.04 on it. Windows 10 is on drive C: and Ubuntu is installed on a 100 GB partition on drive D:  I'm not happy with Ubuntu 16.04 on my desktop and have instead fully installed it on my laptop. So I am now looking at uninstalling it off the desktop computer.  However I am having issues doing this as I can't delete the Ubuntu GRUB boot and replace it with my the proper Windows one. I have tried repairing the Windows boot (through the bootrec /fixboot command and bootrec /fixMbr) but it doesn't seem to work and I feel it may be because Ubuntu is on a different drive so therefore so is GRUB.  Can anyone help or suggest how this can be fixed?

I have a Win/Ubuntu 11.10 dual-boot setup, where I am running the OSes on separate partitions of my laptop HDD. I assume the best method of uninstalling is 'simply' a matter of deleting the Ubuntu partitions -once I've made sure control is given to the Windows bootloader instead of grub after POST.  The question is: How do I do that?  Stuff I've tried:  I tried the boot-repair CD (), but that was a bit beyond my abilities to figure out if I could do it with that tool :/.  I also tried EasyBCD (). It couldn't identify my ext3 partitions, let alone change the bootloader.  Lastly, I tried installing startup-manager in Ubuntu, and using that to set the Win7 bootloader as default. But upon restart, it still loads grub.


I have a limited amount of free disk space left on my machine, (around 9 - 10 GB), and I would like to try out the latest Ubuntu 16.04 LTS on my computer, so my question is that, Is it possible to install Ubuntu 16.04 LTS with less than 25 GB of disk space (which is stated on the official documentation, as the recommended disk space for installation)?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


The data that I have has strong negative correlation with the response variable.   var1    -0.3049408       var2    -0.2874333       var3    -0.2760590       var4    -0.2708325       var5    -0.2697072       var6    -0.2667927       var7    -0.2425371       var8    -0.2406525       var9    -0.2405309       var10   -0.2263708     But when I added them to the linear models, some of the variables coefficients are positive. My colleague is saying that this doesn't make sense because the correlations are negative and explaining that var 8 has positive coefficients while other variables are -ve doesn't make sense. Is this true? If the model is correct, does it need for the coefficients to be negative if correlations are negative?

Give some examples where a simple correlation coefficient has a sign opposite to that of the corresponding partial correlation coefficient and comment on it.   It is a question from an examination paper.Please help.


Computerized cryptanalysis has obviously made formerly "secure" hand ciphers like Playfair, Four Square, and the Hill Cipher obsolete because they can be defeated in seconds. But is there a hand cipher where a modern computer attack does not have an advantage over a cryptanalysis done by hand? There are certainly tasks that are more quickly done by humans, rather than computers. I'm wondering if there is a hand cipher that takes advantage of this.

By "hand cipher", I mean a symmetric cipher for which encryption and decryption can can both be performed with a pencil on graph paper, consuming about 10-20 seconds per character by a proficient user. Additional simple tools, e.g. a deck of cards or a multiplication table, may be used to expedite the process. No mathematical proficiency is required other than mental addition, subtraction, and maybe multiplication.  Basically, it should be a cipher that someone of average mathematical abilities can master, and it should require no digital technology or cryptographic tools that cannot be constructed out of paper.  For example, four-square in CBC mode seems secure to me because CBC is a well established mode of operation and four-square seems to be a good block cipher as it accommodates large keys and seems to produce a random-looking output. However, the fact that four-square in CBC was never widely adopted before digital encryption became a consumer technology leads me to believe that someone broke the cipher and thus discouraged people from using it.  So is there any hand cipher that the best supercomputers would take years to cryptanalyze? If not, then for which hand cipher is the best known attack the most complex?


Harry and Cedric both had the trace. All three unforgivable curses were cast in their presence.  The trace tells you what spell is cast, where it's cast, and who is the presence of it.  We know this, because the Ministry knew that the Patronus charm was cast in the presence of Dudley.  How, exactly, did they not know Voldemort had returned, and killed Cedric?

During Goblet of Fire, Voldemort lured Harry away from Hogwarts and into a Muggle cemetery. This was done during the Triwizard tournament to make Harry’s death look like an accident.  Harry was supposed to have a Trace on him, so why couldn’t the Ministry tell an underage wizard was performing magic (Expelliarmus) in a Muggle cemetery? Or (as the Trace seems to pick up ANY magic used near a young wizard/witch) magic used by the Death Eaters?


I am trying to set up cronjobs to excecute some emailing to clients periodically but I am seeing no output fromm the test I wrote here  is the crontab line      * * * * * php /var/www/html/pms/notices/test.php   and here is the test.php code      <?php      include(__DIR__ . "/config.php");      $log_message = 'It works';         error_log($log_message . "On:" . date("l jS \of F, Y, h:i:s A P") . "\n", 3, ROOT_PATH .'Logs/activity.log');           <?   I expect  the activity.log file to have 'it works' written to it every minnute  but nothing is. Could I be doing anything wrong? If yes what is it? or where can I get good tutorial on how to set up cron jobs I have tried changing my line to     * * * * * /usr/bin/php -q /var/www/html/pms/notices/test.php   as suggested in another question but that  has not helped

I have setup a cron to execute one of my php scripts. But the problem is the php script is not being executed at all not even partially.  Here is the cron I have set up  45 23 * * * /usr/bin/php -q /var/www/myscript.php   I have tried the following   I removed the cron from normal user to root user still no results. I changed the permissions on the script using chmod +x /var/www/myscript.php I have used the command whereis php it gives the following  php: /usr/bin/php /usr/share/man/man1/php.1.gz    Now, I don't know what else I can do. Please Help.  P.S. I can execute the script manully and it runs perfectly.


I have a cuboid with height, width and length not of same scale. When I Smart Project UV map for this, I get islands of same size.   I think I must get islands of different sizes as height, width and length are not of same scale for my cuboid.   Am I doing anything wrong or is it normal ?

I have the model of house with seams on it.  When I'm trying to unwrap it (U > unwrap) It unwraps wrong.   Some polygons are bigger then others, and I don't know what to do. How do I unwrap it proportional?


I know that, by definition, a Hilbert space $\mathscr{H}$ is separable if there exists a countable subset $X$ such that $\operatorname{span}(X)$ is dense in $\mathscr{H}$.  I want to prove that $\mathscr{H}$ is separable if and only if there exists a countable and dense subset.  I know I have to try with combinations like "$p+iq$" with $p$ and $q$ rational, but I can't find the way.

I want to show that every an infinite-dimensional separable (contains countable dense set) Hilbert space has a countable orthonormal basis.  I know that every orthogonal set in a separable Hilbert space is countable, it is help me with the proof?


For Lie algebra $L$ with root $\alpha$, show that if $x \in L_{\alpha}$ then ad$x$ is nil-potent. So $L_\alpha= \{x \in L : [h,x] = \alpha(h)x$ for all $h \in H \}$ where $H$ is a Cartan subalgebra of $L$. My thoughts: Given $x \in L_\alpha$ I have seen that there exists $y \in L_{-\alpha}$ s.t. span$\{x,y,[x,y]\} \cong sl(2,\mathbb{C})$. Now I'm pretty sure this isomorphism can be chosen so that $x \rightarrow e$ where $e$ is the $2 \times 2$ matrix with a $1$ in the upper left and $0$ elsewhere, and I saw some stuff when I classified the irreducible modules of $sl(2,\mathbb{C})$ that eventually $e^n(x)$ will be zero... This all being said, this exercise is before I learned about how span$\{x,y,[x,y]\} \cong sl(2,\mathbb{C})$ so this information should be unnecessary... I'd appreciate some help on this one.. Thanks!

$ \DeclareMathOperator{\ad}{ad}$ Let $L$ be a semisimple Lie algebra with root space $L=H \oplus \bigoplus_{\alpha \in \Phi}L_\alpha$. Let $x\in L_\alpha$ with $\alpha\neq 0$. I want to show  Then $\ad x $ is nilpotent.  I know that if $\alpha, \beta\in H^*$ then $[L_\alpha,L_\beta]\subset L_{\alpha+\beta}$. I think I should make if we could show that there are only finitely many non-zero $L_\alpha$, we could use this fact to push $x$ into a trivial root space. Then it should follow that $(\ad x)$ is nilpotent? I am slightly confused as to what it means for $(\ad x)$ to be nilpotent, is it that $(\ad x)^n$ is zero, or is it that $\ad^n x$ is zero? Note this is a Proposition in Humphreys book but I do not see how it follows directly.


I constantly need to add reference lines to my PGF plots which should match the data. I am looking for ways to implement a command that does this automatically and I am hoping someone can give me some pointers on the best way to do this. The following MWE with the comments hopefully illustrate the point: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest}  \begin{filecontents}{line12.dat}   x y   1 48.43734545112396   2 89.8468830844395   4 210.67967341436497   7 475.619178754322   8 603.599030569327   9 821.1933877936549 \end{filecontents} \begin{document}  \begin{tikzpicture}   \begin{axis}[xmode=log,ymode=log,xmin=1, xmax=10,domain=1:10]     % This is the line plot     \addplot[scatter,only marks,mark=o,draw=black] table[x=x, y=y] {line12.dat};     \label{myline}      \addplot[dashed] {x^2};  % This is the reference line which does not match the data      % To make the reference line f(x) align with the data,     % I have to multiply by a constant: mean(y_i / x_i**2)     \addplot[dashed] {18.89041408136126 * x^2};  % This is the reference line      % I want to implement a command that does this automatically like this     % \addref[dashed, x=x, y=y] {line12.data}{x**2};      % Or even just referencing the line if that is somehow possible     % \addref[dashed, data=myline] {x**2};   \end{axis} \end{tikzpicture} \end{document}   Once I know how to implement this, I am hoping to introduce some logic to remove outliers as well or use other functions to find the constant (like the median).

Goal: create a plot to compare the empirical convergence rate of a numerical method with the one expected from the theory.  Accordingly, given a loglog-plot, I would like to add the line which has a prescribed slope (in this case, the convergence of the method) and the best intercept to fit the data (e.g., in a least-square sense).  Question: how to do a linear regression with fixed slope in pgfplots?  What I have done so far is the following: (1) compute the regression line (of the logarithm of the quantities), (2) save the intercept, (3) plot the line with the slope expected from the theory and this intercept.  This is a good approximation of what I am looking for, provided the data are in agreement with the theory.  Thanks  MdFB


I've seen "turn thrice widdershins" (or variations thereof, such as "turn around thrice widdershins") several times online (, , ). It seems to be Gaelic in origin, having to do with fairies or witchcraft, but I can't find any concrete information about where this phrase actually came from or how it's significant.  Any idea as to the origins of this?

I've been hearing the words "deosil" used for clockwise and "widdershins" for anticlockwise, but where do they come from?  I'm told that "widdershins" is from a Scottish term meaning , is this correct?  I can't find any evidence of the origin of deosil. Where did it come from? Did it originally mean something else?


Let $a,b,c\in\mathbb Z$. Then   $$ \gcd(a,b)=\gcd(a,c)=1\implies\gcd(a,bc)=1. $$   I tried using Bezout's Lemma, that states: if $a$ and $b$ are relatively prime, then $a\mid bc\implies a\mid c$.  This means in our case that $a\mid bc\implies a\mid c\ \land\ a\mid b$.  Is this the right approach? How to continue from here?  EDIT  Can I conclude from Bezout's lemma, that in our case, if a number divides $bc$, that is divides both $a$ and $b$? The reverse holds also. So the common divisors of $a$ and $bc$ are the same are the common divisors of $a$ and $b$, and $a$ and $c$?

How do I go about proving this?  If $\gcd(a,b)=1$ and $\gcd(a,c)=1$, then $\gcd(a,bc)=1$. I'm very confused with gcd proofs.


How can I check if a player is holding a specific tool? The specific tool can be made of any type of material. Example: /execute as @a[nbt={SelectedItem:{id:["minecraft:PICKAXE-ANY-TYPE"]}}] run say "I am holding a Pickaxe"

In Minecraft 1.16.1, I’m trying to make a system thats detects when one of several fake players doesnt have a specific score. Here is my first attempt: execute unless score sticks_have page-2 matches 2.. unless score plank_have page-2 matches 1.. run ...  After trying this, I realized that all scores need to be in the correct range before it runs the command! But I want it to run the command when any of the scores are in range. I thought of using the following command, but it doesn’t detect fake players: execute unless entity @a[scores={sticks_have=2..,plank_have=1..}] run...  I know I can use multiple command blocks, but I would rather not, just do I can conserve space. What can I do?


I tried to implement a counter using Java 8's LocalTime and Instant, both works fine but the output is a bit confusing! when ever I use Instant I got smaller values for the same loop ? any idea?  // using Instant  Instant before=Instant.now(); // something time consuming for(int i=1;i<100000000;i++); Instant after=Instant.now(); Duration duration=Duration.between(before, after); System.out.println(duration.toMillis());   // using LocalTime LocalTime xBefore=LocalTime.now(); for(int i=1;i<100000000;i++); LocalTime yAfter=LocalTime.now(); System.out.println(ChronoUnit.MILLIS.between(xBefore, yAfter));

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


I posted a bounty to a fairly corner-case question at  . Sadly, 30 minutes after posting the bounty, I realized what the answer was. That's fine though, I understand how bounties work.  There are still no other answers to the question, so nobody can get the bounty. But I still get system notifications and emails pleading with me to award the bounty before it expires.  These emails and notifications should only be sent if a bounty can actually be awarded.

I got me an email for a bounty that was going to expire in 23 hours, so I went to see if I could award it.  It turns out  has only been answered by myself, so I can't award a bounty.  Which means the email was essentially spam.  (Or if you prefer, one more worthless automated reminder of the type that I train my spam filter to hide from my inbox.) It's bad enough that my bounty will expire worthless—does the system really need to get my hopes up that an answer arrived only to dash them when I actually follow the link in the email?  Could the system add one more check to see if a bounty could be awarded before encouraging users to go out and award it?  For reference, here is the text of the email minus emphatic formatting:  Reminder: Your Bounty Is Ending Soon! Your bounty on the question … Option to disable “share a link to this question” popup? … ends in 23 hours. Don't forget to review the answers and award your bounty by clicking the bounty icon to the left of each answer. If you don't award your bounty, the highest scored answer (with a minimum of 2 score) provided after your bounty started may be automatically awarded half the bounty amount! For more information, refer to the bounty faq. Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Meta Stack Overflow, unsubscribe from all Meta Stack Overflow emails with a single click. Stack Exchange Inc. 55 Broadway, 26th Floor, NY NY 10006 <3


I understand that in $(\Bbb R ,d)$, any open interval $(a,b)$ is topologically equivalent to $\Bbb R$. But here the topology is unspecific, so I have no idea how to proceed.  Could anybody help me? Thanks!

I need to show that any open interval is homeomorphic to the real line.  I know that $f(x)=a+e^x$ will work for the mapping $f:R \to (a,\infty)$ and $f(x)=b-e^{-x}$ will work for the mapping $f:R \to (-\infty,b).$  Without using two functions, how can I prove the result in general?


Be $(a_n)_{n\in N}$ a sequence in $ R $ and $a\in R$. Show that $\lim_{n\to \infty}a_n=a ~~~~~\Rightarrow ~~~~~\lim_{n\to \infty} \left(\frac1n \sum_{k=1}^n a_k\right) = a$

We had a theorem that the means of a sequence also converges:     Let $(a_n)_{n\in\mathbb N}$ be a convergent sequence. Then $\displaystyle \overline a_n=\sum_{k=1}^n \frac{a_k}n$ also converges.   I've tried to prove it:  $|\overline a_n-a|=\frac1n|\sum_{k=1}^n(a_k-a)|\leq\sum_{k=1}^{M-1}|a_k-a|+\sum_{k=M}^n|a_k-a|$  The second sum is $<\frac{\varepsilon}2$, because there is an $M\in\mathbb N$ so that $(a_n)_{n\in\mathbb N}$ converges. Now you can consider all $n\geq\max\{M,\frac2{\varepsilon}\sum_{k=1}^{M-1}|a_k-a|\}$ and so $|\overline a_n-a|<\varepsilon$.  But can you also say that there is a $K\in\mathbb N$ such that $\frac1n\sum_{k=1}^{M-1}|a_k-a|<\frac{\varepsilon}2$ for all $n\geq K$? And do I have to take the first sum from $k=1$ to $M$ or can you do it as above?  Thanks for helping.


I first eject device using sudo eject /dev/sr1. And then sudo umount /dev/sr1. But now it's not showing me the device which i'm unmounted. I want to mount it using command.

Is there a way to mount back a USB stick that is once ejected, without physically detaching it and then plugging it in?  It was a live-usb of Linux Mint 14 in it, if it helps.


I am making a web, where I have to use an image for a desktop view and, instead of a "responsive" design, when the page gets smaller, the image gets cropped.  So, in order to do that I made a css rule establishing a min-width of 700px.  Problem is that, when I see the page in my cel, it has an overflow-x because of the image.  I have tried with overflow-x hidden and making and extra div like...

   ... but it did not work either.  This is the css of the image I am talking about:  @media screen and (max-width: 767px){      #pic-bg{         min-width: 700px;     } }   Is it because of this min-width? How do I have to do it instead, for the image to gets cropped avoiding the overflow?

I want to show an image from an URL with a certain width and height even if it has a different size ratio.  So I want to resize (maintaining the ratio) and then cut the image to the size I want.  I can resize with html img property and I can cut with background-image.  How can I do both?  Example:  This image:     Has the size 800x600 pixels and I want to show like an image of 200x100 pixels   With img I can resize the image 200x150px:      That gives me this:           And with background-image I can cut the image 200x100 pixels.
&nbsp;
    Gives me:
&nbsp;
      How can I do both?  Resize the image and then cut it the size I want?


Normally, when a user accepts an answer, he/she gets +2 reputation and the answerer gets +15 reputation.  My question is why is this rule not applied to accepted self-answers?  What is the logic behind this?

Today, when you accept an answer you did not provide, you get a +2 reputation, however, if you accept your own answer, you get +0.  I expect the reason for this is to stop people gaming the system by asking and answering their own questions repeatedly.  However, this has the downside of providing a disincentive of accepting your own answer when it seems the best and instead accepting an inferior one in order to get the reputation bonus.  Therefore, I propose that the accept your own answer is only worth zero when there are no answers provided by anyone other than yourself.  I feel this keeps the intent of preventing gaming the system for reputation, while removing disincentive from picking the best answer, even if it is your own.


I am trying to show that if the series $\sum_\limits{n=1}^{\infty}a_n^2$ converges, then the series $\sum_\limits{n=1}^{\infty}{a_n \over n}$ converges absolutely. How might I approach this?

Suppose $\sum{a_n}$ converges. How do I prove that $\sum{\frac{\sqrt{a_n}}{n}}$ converges.  So I know that just because  $\sum{a_n}$ converges, do not mean I can say anything about the converges of its square root. So I know that I can prove that if  $\sum{\sqrt{a_n}}$ converges then $\sum{\frac{\sqrt{a_n}}{n}}$ converges by Abel's Test, but I do not know where to start for the case where  $\sum{\frac{\sqrt{a_n}}{n}}$ diverges


I am stuck in my present (AP-SOUTH) and deleted (US-EAST) S3 bucket.  I had mistakenly created a bucket in US-EAST (cdn.example.com.s3-website-us-east-1.amazonaws.com) and mapped my subdomain - cdn.example.com  I allowed read public access and added the following policy to US-EAST S3   Then i tested it by placing a test.txt file and   It was success. Also tried using  using Flexible SSL inside your CloudFlare. It was success too.  Afterwards When i realized my mistake, i deleted the US-EAST bucket and created AP-SOUTH S3 bucket (with same bucket name) (cdn.example.com.s3-website.ap-south-1.amazonaws.com) and pointed the same subdomain cdn.example.com to it and accordingly updated the DNS at cloudflare.  But now even after 42 hours, my subdomain cdn.example.com is still pointing to deleted bucket US-EAST.  Am i missing something here? Any pointers will be appreciated. Just in case, I am using S3FS-FUSE with magento.  Proper error is as below as requested:-  404 Not Found Code: NoSuchBucket Message: The specified bucket does not exist BucketName: cdn.example.com RequestId: 0E46EDA9081940FC HostId: WnxB9/4C8uQi8k81rEX/FZSFa6s8w6Xt6ohIV3tec6BCg8VHfyaps2MPrw8qfX6/Jpba+fmNCUA=

I'm currently trying to set up a small static website with my domain from NameCheap using AWS S3, but I'm having trouble correctly pointing requests to the corresponding S3 bucket.  These are my configurations for the services I use:  NameCheap  CNAME         www  example.com.s3-website-ap-northeast-1.amazonaws.com. URL Redirect  @    http://www.example.com/   AWS S3  Static Hosting example.com.s3-website-ap-northeast-1.amazonaws.com.   I am fairly new to web hosting/domain stuff so please bear with me, but from what I understand from my registrar configuration is: users entering the naked domain example.com are redirected to www.example.com which then points to the AWS S3 bucket. Then the CNAME record then points to the corresponding AWS bucket.  Howeverwhen I try to visit www.example.com I somehow get pointed to the www.example.com bucket instead of the example.com bucket landing me to the AWS Bucket not found page.  Extra Details   I've checked with DNS Checker that www.example.com's CNAME record indeed points to example.com.s3-website-ap-northeast-1.amazonaws.com.. I've also tried making a www.example.com bucket then redirecting it to example.com but it seems it points to the actual domain instead of the bucket therefore causing a redirect loop. example.com->www.example.com->www.example.com (Bucket)->example.com->∞


I understand all of the bitwise operations (in Java specifically) except bitwise left shift.  I've combed the "stacks" and read many "explanations" on different pages, but I am still left unsatisfied.  Either this is an extremely complicated concept or it is not well understood and obscure.  But, I know it must be relevant to some extent because I have seen Java algorithms (today) that indeed use the left shift operator "<<".  So if someone could break this down in plain English that would be great!

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ...   What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.


Not really a 3d question but I pressed a button and.. the property window is zoomed out a ton how can I get it back to normal I do not know what button I pressed. I have tried middle mouse button I could not find anything.

I zoomed in / out of one of my UI panels and I can't figure out how to zoom back out/ in to get it normal size.   How can I reset the zoom level of UI panels?


I'm using this regex string:  /rfi .*?(.*) .*?\((.*)\)/i   Group 1 finds the rfi number & group 2 returns the contents inside the ( ). With test string: "New RFI 087 (Concrete Beam at Planter)" everything works fine, but with test string "New RFI 087 (Concrete (Beam) at Planter)" it crashes.  Is there anyway to search inside the ( ) but ignore multiple ( ) inside of it ?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I am using copy contents from another similar websites but I always change the title a bit.But I want to know is this way good for my website that get result by google or not?! Do I get visitors from google search or not?!

This is a general, community wiki question regarding duplicate content.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .     What does Google consider to be duplicate content? Will the way I am presenting my content result in a duplicate content penalty? How can I avoid having my site's content treated as duplicate content?


I have a node with a Field Collection [field_videos]. I would like to be able to progrmatically load a node and add field collection items. The field collection contains the following fields:   field_video_url field_video_title   How can I achieve this in Drupal 8? The few examples I've seen online are for Drupal 8.1 or 8.2 and don't seem to work in the latest version of Drupal.  My code currently looks like this:  $field_collection_item = FieldCollectionItem::create([         'field_name' => 'field_videos', ]); $field_collection_item->setHostEntity($node); $field_collection_item->set('field_video_title', 'This is my Title'); $field_collection_item->save();   This gives the error: "Error: Call to a member function getEntityTypeId() on null in Drupal\field_collection\Entity\FieldCollectionItem->setHostEntity()"

I have 1 field collection  Field collection: CKT Info child2   machine name: field_ckt_info_child2  In that have 2 fields:  Field1: English CKT child2   machine name: field_eng  Field2: Maths CKT Child2   Machine name: field_maths_ckt_child2  I have set field setting "unlimited" to this field collection. Now I just want to add new field collection item in existing Field collection(CKT Info child2) programmatically. I have tried below code but it's not creating new field collection item.   function createFC()  {    $field_collection_item = entity_create('field_collection_item', array('field_name' => 'field_maths_ckt_child2'));    $field_collection_item->setHostEntity($node);    $field_collection_item->set('field_maths_ckt_child2', "SET SUCCESS");    $field_collection->save(); }


Setting:  I am writing a thesis, which consists of two parts that have to be completely independent from eachother but use the same structure, i.e. both contain for example a 'Data' chapter. Thus, chapters are numerated following the part number (Roman), e.g. Chapter I.3 or Chapter II.2. The MWE below does that and sets the headers (tribute to esdd, ).  Problem:  Unfortunately, using this solution the table of contents is affected for higher part numbers (starting from II) in the way that spaces seem to vanish, e.g.: "II.2Heading on level 0" with the missing " " between "2" and "H". Is there a way to fix this?  Current output (toc):    Unfortunately, I am not well-versed in manipulating the toc (and adding '\ ' in front of all section and chapter names seems wrong), so I highly appreciate all help!  MWE:  \documentclass{book}  \usepackage{blindtext} \usepackage[markcase=used]{scrlayer-scrpage}  %headers setup \providepairofpagestyles{thesisSimple}{% \clearpairofpagestyles \automark[chapter]{chapter} \ihead{\headmark} \ohead[\pagemark]{\pagemark} } \ifoot{} \ofoot{} \pagestyle{thesisSimple} \providepairofpagestyles[thesisSimple]{thesis}{% \automark*[section]{}% } \providepairofpagestyles[thesisSimple]{review}{% \ofoot[\shorttitle/\authorname]{\shorttitle/\authorname} \ifoot[\today]{\today} } \pagestyle{thesis}  %adjust chapter names to include part number for uniqueness \renewcommand\thechapter{\thepart.\arabic{chapter}} %following the suggestion of esdd  \begin{document}  \tableofcontents  \part{First part} \blinddocument  \part{Second part} \blinddocument  \end{document}

Following minimal document:  \documentclass{report}  \begin{document} \renewcommand*\thechapter{\Roman{chapter}} \tableofcontents \setcounter{chapter}{6} % Problem starts at chapter 7 \chapter{Seven} \chapter{Eight} \section{Eight-one} \section{Eight-two} \end{document}   yields this output (cut to size for your convenience):    Clearly, the chapter (and section) headings hang into the chapter (section) numbers. For the previous chapter numbers, this isn’t a problem since all chapter titles are aligned to the same column and the numbers I–VI are sufficiently narrow.  (The same happens regardless of document type, I’m actually using scrreprt with the same result.)  How can I prevent this?


I have a zombie process that refuses to be removed, have tried killall -9 1913 and pkill with no effect. Any help would be very much appreciated.Running Ubuntu 12.04.2 LTS. Thank you.  aruna@aruna-desktop:~$ ps -aux | grep Z Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND aruna     1913  0.0  0.0      0     0 ?        Z    12:07   0:00 [lightdm-session] <defunct>

Transmission is intermittently hanging on my NAS.  If I send SIGTERM, it doesn't disappear from the process list and a <defunct> label appears next to it.  If I send a SIGKILL, it still doesn't disappear and I can't terminate the parent because the parent is init.  The only way I can get rid of the process and restart Transmission is to reboot.  I realize the best thing I can do is try and fix Transmission (and I've tried), but I'm a novice at compiling and I wanted to make sure my torrents finished before I start messing around with it.


I set my spawnpoint accidentally far away from my creations in minecraft and am wondering if there's any way to find it and get back, some command? Or something that will do this? Also the world is completely flat if that helps any. Pls help worked hard on these builds!

I wandered too far to go look for sheep and now I'm on a completely different island.  How do I find my way back to my house?


The remainder of division of $P(x)$ by $x^2−1$ is $2x+1$, and the remainder of division of the same polynomial by $x^2−4$ is $x+4$. Compute the remainder of division of $P(x)$ by $x^2−3x+2$.   I will translate these into math equations  $$P(x) = (x^2-1)Q(x)+ 2x+1$$  $$P(x) = (x^2 -4)R(x)+x+4$$  And let   $$f(x) = P(x) $$  We're asked to find the remainder when this polynomial is divided by $x^2 -3x+2$. So, there are two equations, which is why I'm confused with what to use in the equation $f(x) = P(x)$. What am I missing here?  Regards

If I have a polynomial $f(x)$ and is divided by $(x- 3)$ and $(x + 6)$ the respective remainders are $7$ and $22$, what is the remainder when $f(x)$ is divided by $(x-3)(x + 6)$?  I tried it by doing:  $$f(x) =(x-3)(x+6)q(x) + ax+b $$ And, $a$ and $b$ comes out to be $-\dfrac53$ and $12$ respectively.  But I'm not sure how to solve any further. And kindly explain exactly how it's done


I am getting unexpected results when adding items to sets that are in a list such that i can specify the set i need by indexing the list as shown in the following code:  def get_friends_of_users(network):     f1 = lambda x: x[0]     f2 = lambda x: x[1]     users_friends = [set()] * max(max(network, key=f1)[0], max(network, key=f2)[1]+1)     net_users = set()     for i in network:         users_friends[i[0]].add(i[1])         users_friends[i[1]].add(i[0])         net_users.add(i[0])         net_users.add(i[1])         #print(users_friends)     return net_users, users_friends   let the variable network be the following list of tuples:  network = [(3, 5), (2, 1), (2, 4), (1, 5), (5, 0), (3, 2), (3, 0)] which describes users and their friends as (user_ID, friend_ID).  I want the variable users_friends to be a list of sets of all friends for each user as following:  User ID=0 has friends with IDs = 3, 5   User ID=1 has friends with IDs = 2, 5   User ID=2 has friends with IDs = 1, 3, 4   User ID=3 has friends with IDs = 0, 2, 5   User ID=4 has friends with IDs = 2   User ID=5 has friends with IDs = 0, 1, 3.  But when i uncomment the print statement in the code i can see that every time i execute the statement users_friends[i[0]].add(i[1]) or users_friends[i[1]].add(i[0]) it adds the item to all sets in the list.  so, this was the output:  [{3, 5}, {3, 5}, {3, 5}, {3, 5}, {3, 5}, {3, 5}]  [{1, 2, 3, 5}, {1, 2, 3, 5}, {1, 2, 3, 5}, {1, 2, 3, 5}, {1, 2, 3, 5}, {1, 2, 3, 5}]  [{1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}]  [{1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}]  [{0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}]  [{0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}]  [{0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, 5}]   My question is: why it adds the item to all sets in the list and how to make it add to the set that i specify by indexing the list of those sets?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I read a statement from a document on Serializer. It mentions no gearbox Serializer.  Do you know what it meant?

I'm trying to understand the HDMI implementation in Xilinx application note . In especially,  I don't understand the diagram below where there are connections between gearboxes and oserdes2.    As you can see the above diagram, there are 10:5 Gear Boxes and 5:1 OSERDES2 modules. Now I'm stuck on: why are the 10:5 Gear box and 5:1 OSERDES2 used in implementing a TMDS video interface in the Spartan-6 FPGA? Would you please let me know? Additionally, why doesn't it use different types of modules such as 10:1 Gear box and 10:1 Oserdes2?


How come 11 / 3 = 3.66 and 11 // 3 = 3. Also, -11 / 3 = -3.33 and -11 / 3 = -4 Based on my understanding both results in division with the difference of integer and float. At first, I thought double slash rounds up but with the provided result above, it proves that there should be another reason and I wonder what that could be?! Please someone Explain. Thank you

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


I can find catchphrases for all of the other doctors but not the sixth. Does he not have a saying just for him?

What are the catchphrases of the eleven (at the time of this posting) Doctor incarnations in Doctor Who?  For example I know of a few:     Chris Eccleston (9th Doctor): Fantastic! David Tenant (10th Doctor): Allons-y!, I am so sorry   Et cetera.  Does anyone have a list of all of the doctor's catchphrases over the years?


Trying to find title/author of story I read many years ago, around 1964. Story was written from the point of view of a snail like creature. The central character describes (stream-of-consciousness?) himself and other characters moving along a path in a constant search for food. The story ends with the main character falling into what turns out to be the fuel tank of a space ship.

It may be called The Gleanors, or something.  They each have a strip of land to glean, with neighbors doing the same. the story is hard to remember, but it was totally interesting. When I think back, I can only say that they must have been an excellent writer, to be able to do so much with so little in the story.


Fantasy/scifi combo - band of travelers who must get from "sphere" or domain to domain - each geographic area is ruled by a magician - it turns out later these are people who are unwittingly tapping into the computer grid they all live on to alter their own reality?

Way back in high school I read a series about colonization of other planets. In the books, contact was lost with the rest of the civilization and over time people with mathematical ability were able to control the computers that were doing the terraforming...and later came to be seen as wizards.  I cannot for the life of me remember the author or title...can anyone help?


Is it "time off of work" or "time off work" without 'of'?  Ex: I need to take some time off (of) work next month.

What is the difference when you say "get off of something" and "get off something"?


if an email is in the format   firstname.lastname@gmail.com  coditions to check via the regex :  email has only 1 @  firstname.lastname   at the very end its either a .com or .net or .co.in  it should not accept emails like  abcdef@tcs.xyz  but should accept abc.def@tcs.com or tcs.co.in    var empmail = 'charles.x.markus.bukowski@company.com' var fullName = empmail.split('@')[0].split('.'); var firstName = fullName[0]; var lastName = fullName[ fullName.length-1 ] ; var fullName = empmail.split('@')[0].split('.');

Is there a regular expression to validate an email address in JavaScript?


I'm using an IMPORTDATA function tied to a auto-running script to pull in a .TSV data file from an obscure webform system. That all works well, and I'm able to generate a nice dashboard from this data.  However, the way the originating system works is causing some problems. When someone updates their data, instead of making the updates in the original row in the TSV, the originating system creates a new row with a new timestamp (and the new data). I can see that they're duplicates because the rows both have the same primary key (email address), but I can't figure out how to merge the rows and/or delete the older row, keeping only the newer one.  Google is failing me on figuring out what functions to use here. Any advice?

I have a form where students can enter choices: for instance the specialisation they want to pursue, and the semester when they will start that specialisation.   , but it has not much interest, other than add addition data to the . You can copy the sheet locally to edit it, and it will still pull the form data over.   I decided not to use the option on the form to allow only one entry per student as students often change their mind, make a new entry several months later. They were told that only their last entry will be considered at a specific deadline.  I wish to have some reporting in place that shows an overview of all choices, lists the students per specialisation etc... but only taking into account their last entry, and without deleting previous entries made.   To look up the last entry for a specific user, it is easy using:  query(importrange("1L3V0HIN69aVvCV-4Hx7m39w6zsuBZEaK2L0JDULP0NY","Form Responses 1!A:E"),"select Max(Col1), Col2, Col3, Col4 where Col2 contains '"&C1&"' group by Col2,Col3,Col4 order by Max(Col1) desc limit 1",0)   The e-mail (or part of it would be stored in C1). The trick is the limit 1 clause at the end combined with the order by clause.  But this no longer works when trying to filter for the whole cohort following a specialisation at a specific start date, or counting the amount of students per specialisation, etc.   This is where I could use some help. Maybe adding a column "outdated" and filling that in via an array formula could be an option, but I struggled with making that work on the original response spreadsheet.