I am having a doubt regarding to this issue where let's say my page load  is  <title>Test Only</title>   and I change the  value by using javascript to  <title>Test Use JS Change</title>  // this is my Javascript code to update the <title> value after page load $(function(){     $('title').html('Test Use JS Change'); });   May I know for Search Engine Bot, will they recognize my title as Test Use JS Change or Test Only  It is because when I see the browser tab/ inspect element to view dynamic source, the title has been updated but when I purely view source only, it shows the default title that I defined.  Would need some advise regarding to this. Thanks!

I have a webpage that implements a set of tabs each showing different content. The tab clicks do not refresh the page but hide/unhide contents at the client side.  Now there is a requirement to change the page title according to the tab selected on the page ( for SEO reasons ). Is this possible? Can someone suggest a solution to dynamically alter the page title via javascript without reloading the page?


I followed the instructions on  for installing Drush, proceeded by the recommended steps for  and a new Drupal 8 project. My project (cfbtv) is located at ~/sites/cfbtv and it appears the composer template (whatever that is) installed Drupal in the web directory.  When I try the recommended Composer commands they fail. composer update devel outputs the following.     Package "devel" listed for update is not installed. Ignoring.   Loading composer repositories with package information   Updating   dependencies (including require-dev)   Nothing to install or update   Generating autoload files   When I run composer require devel, I get this message.     [InvalidArgumentException]   Could not find package devel at any version for your minimum-stability (stable).   Check the package spelling or your minimum-stability.    require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...    So what is the problem here? Composer seems to have installed properly, but I'm surprised these commands aren't working. Maybe it works and I'm not using it correctly.

I've been away from drupal for 2-3 years. I just came back around and installed drush via composer () and now every time I try to use drush I get a message telling me that I should be using composer:  ~/sites/d7 $ drush version  Drush version : 9.0-dev-gd4a3872 ~/sites/d7 $ drush dl drupal-7.x  [notice] dl has been deprecated. Please build your site using Composer. Add new projects with composer require drupal/[project-name]. Use https://www.drupal.org/project/composer_generate to build a composer.json which represents the the enabled modules on your site.   I downloaded drupal 8 following these , but when I try to use drush in that project I get this message:  ~/sites/cfbtv/web $ drush dl devel This codebase is assembled with Composer instead of Drush. Use `composer update` and `composer require` instead of `drush pm-updatecode` and `drush pm-download`. You may override this error by [error] using the --pm-force option.   Is there something wrong with my local env, or is drush a thing of the past now?


Plot Details/Summary  This one is going to be a real longshot. I've only read a couple parts of the story, and I only remember a couple of moments from those parts of the tale. Hopefully they will be memorable enough for it to be identified.  The protagonist in the story is a human female soldier who fights on various planets as part of mankind's ongoing military campaign (against who or what, I do not remember).   She wears advanced, powered combat armor and carries very advanced weaponry.    I also recall that the protagonist may have been gay.  It sticks in my mind she has a girlfriend who is a fellow soldier, though assigned to a different vessel, and they spend long periods of time away from each other.  I believe there was a paragraph where the protagonist arrives at a base/starport, and finds out her partner shipped out just a few hours earlier.  The first specific detail I can remember is a battle where the protagonist is seriously wounded.  She is hit in the lower leg by a powerful enemy weapon. The weapon's blast penetrates her armor, and mangles the lower leg off just below the knee.  Her powered armor immediately activates its triage protocols.  A razor-sharp iris-valve located in the mid-thigh amputates her ruined lower leg, while other systems inject her with painkillers and other medicines to keep her from going into shock.  I believe that is the final scene in the first part of the story I read.  The second detail I recall comes from the second part I read.  The protagonist is sunning herself on the beach with her partner, both of them enjoying a couple weeks worth of shore leave.  The docs have grown her a new leg.  The protagonist states she still has some therapy to do before she gets full use of the limb back, but that she will be back in the fight soon enough.  Timeframe of Publication  I'm thinking this one is from the 1970s.  I remember reading both parts in a couple of old sci-fi magazines that my dad had picked up at a used book store.  It might have come out in the early 80s, but no more recent that that, IIRC.  I don't think it would been published earlier than the 1970s.

I've been looking for the name of a sci-fi romance book about space travel but haven't been successful so far. I came across it a few years ago, read the plot on its back cover but didn't read the book. It is about two spacecraft pilots, a man and a woman, who travelled at light speed (or maybe FTL, I can't remember) in separate ships. Every time they return to Earth, centuries have passed on Earth because of time dilation. They meet each other for a few times on Earth in different eras, but don't know when, if ever, they will meet again. I don't know how it ends.   If anyone knows which book I'm talking about, could you please tell me the name? Thanks a lot!


The code below works and it is so clean: <?php     preg_match('/(bar)/', 'love hotel bar', $matches);     print_r($matches);  As you can see before calling the function $matches is undefined, which normally should return an error... The function parameter is filled by value and it is accessible out scopes. ❌ Bad <?php $title = get_og_tag('title'); $description = get_og_tag('description'); echo $title; //My title  ✅ Could be Good <?php get_og_tag($title, $description, $og_url, $og_image, $twitter_card); echo $title; // [error] $title, $description, ..etc, undefined...  For the code's clarity cake How to create functions like this?

Are PHP variables passed by value or by reference?


I try to find how many fender words in my txt file but I get nullPointerException. I m waiting for your helps. Thank you :)  public class ScanTxt {  private static BufferedReader buffer; static int count=0;   public static void main(String...args) throws IOException{ readFile(); } public static int readFile() throws IOException {     buffer = new BufferedReader(new FileReader("C:/Users/ASUS/Desktop/myfile.txt"));          StringBuilder strbuild = new StringBuilder();         String line = bufferr.readLine();          while (line!=null) {             strbuild.append(line);             strbuild.append("\n");             line = buffer.readLine();             if(line.equalsIgnoreCase("fender")){                 count++;             }         }         return count;   }

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?


When I write this to give permission to www directory:  zeb@zeb-Lenovo-B570:/var$ chmod 251 www/ zeb@zeb-Lenovo-B570:/var/www$ ls   Its gives error:  ls: cannot open directory .: Permission denied   I want to give permission to www folder so that I put my .php file here.  Help ?

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


Reading an  I came across the following C# syntax in method name.  private class sortYearAscendingHelper : IComparer {    int IComparer.Compare(object a, object b)    {        ...    } }   I understand Compare method is method of IComparer interface, but coming from C++ I am not certain what this syntax means. If Compare is part of interface, I would expect to mention that only like int Compare(...). Why we have to specify class?

What are the differences in implementing interfaces implicitly and explicitly in C#?  When should you use implicit and when should you use explicit?  Are there any pros and/or cons to one or the other?    Microsoft's official guidelines (from first edition ) states that using explicit implementations are not recommended, since it gives the code unexpected behaviour.  I think this guideline is very valid in a pre-IoC-time, when you don't pass things around as interfaces.  Could anyone touch on that aspect as well?


im in a trouble. I want to prove a proposition about Lebesgue integral, it would be great if the following were true: I have the definition of measure convergence of a functions sequence on E: $ \forall e>0\forall d>0 $ exist N such that: $ n≥N \implies m(${$x\in E:|f_{n}(x)-f(x)|≥e$})<d The doubt that I have is Can I say $lim_{n\rightarrow \infty} f_{n}=f$ in almost all points? In other words If A:={x$\in E:(lim_{n\rightarrow \infty} f_{n})(x)≠f(x)$} Then m(A)=0? Thanks <2+1

I am having some conceptual difficulties with almost everywhere (a.e.) convergence  versus convergence in measure.   Let $f_{n} : X \to Y$. In my mind, a sequence of measurable functions $\{ f_{n} \}$ converges a.e. to the function $f$ if $f_{n} \to f$ everywhere on $X$ except for maybe on some set of measure zero.   However, the definition of convergence in measure is that $f_{n} \to f$ in measure if for every $\varepsilon>0$  \begin{equation} \mu(\{x:|f_{n}(x)-f(x)|\geq\varepsilon\})\to0 \text{ as } n\to \infty \end{equation}  Heuristically, it seems to me that convergence in measure is just saying that the subset of $X$ for which $f_{n}$ does not converge to $f$ must have a measure of zero.   I cannot see the difference between a.e. convergence and convergence in measure. If anyone can point out my conceptual error it would be much appreciated.


I would like to prove that the iterative Jacobi method to solve $Ax=b$ is convergent for a strictly diagonally-column dominant matrix $A$. I have seen this solution . However, I would like to know if there's an alternative way to prove it. For example, this is a proof of convergence for strictly diagonally-row dominant matrices:  $A=L+D+U$ and the iteration matrix is $B_J=-D^{-1}(L+U)$. We have $$\max_{1\leq i \leq n} \frac{1}{a_{ii}} \sum_{i=j,j\not =i}^n |a_{ij}|=\alpha<1$$ Then, $$||B||_\infty=\max_{1\leq i \leq n} \sum_{i=j,j\not =i}^n \frac{|a_{ij}|}{|a_{ii}|}=\alpha<1$$ Therefore, Jacobi converges for $Ax=b$.  Is there a way to do the proof in a similar way to this one?

The Jacobi method is an iterative method for approaching the solution of the linear system $Ax=b$, with $A\in\mathbb{C}^{n\times n}$, where we write $A=K-L$, with $K=\mathrm{diag}(a_{11},\ldots,a_{nn})$, and where we use the fixed point iteration $$\alpha_{j+1}=K^{-1}L\alpha_j+K^{-1}b,$$ so that we have for a $j\in\mathbb{N}$: $$\alpha-\alpha_{j+1}=K^{-1}L(\alpha-\alpha_{j}).$$  Now my syllabus provides a proof for convergence for the case that $A$ is diagonally-row dominant, but I and our teacher both couldn't see a way to rewrite the proof to a proof for the diagonally-column dominant case. The proof for the diagonally-row dominant is given using the $\|\cdot\|_{\infty}$ norm, and I found on the internet that the diagonally-column dominant case can be proved using the $\|\cdot\|_{1}$ norm. The proof strategy would be to show that $$\|\alpha-\alpha_{j+1}\|\leq \rho^j\|\alpha-\alpha_1\|,$$ for some matrix norm $\|\cdot\|$ and a $0\leq\rho<1$, from which convergence would follow immediately.   Does anyone have an idea how to continue? Using the $\|\cdot\|_{1}$ norm as suggested by the internet we want to have something like $$\|\alpha-\alpha_{j+1}\|_1\leq\|(K^{-1}L)^j\|_1\cdot\|\alpha-\alpha_1\|_1,$$ and somehow conclude $\|K^{-1}L\|_1$ should be bounded by $1$. I know about the characterization $$r:=\max_{i\in\{1,\ldots,n\}}\Bigg\{|a_{ii}|^{-1}\sum_{\substack{i&=1\\ i&\neq j}}|a_{ji}|\Bigg\}.$$  I'd like to proof this without Gershgorin's theorem, since this is not covered in my course. It is fine if the case follows from the diagonally-row dominant case.


I know it is true that we have  $$\sqrt{1+2\sqrt{1+3\sqrt{1+4\sqrt{1+\cdots}}}}=3$$  The argument is to break the nested radical into something  like  $$3 = \sqrt{9}=\sqrt{1+2\sqrt{16}}=\sqrt{1+2\sqrt{1+3\sqrt{25}}}=...=\sqrt{1+2\sqrt{1+3\sqrt{1+4\sqrt{1+\cdots}}}}$$  However, I am not convinced. I can do something like  $$4 = \sqrt{16}=\sqrt{1+2\sqrt{56.25}}=\sqrt{1+2\sqrt{1+3\sqrt{\frac{48841}{144}}}}=...=\sqrt{1+2\sqrt{1+3\sqrt{1+4\sqrt{1+\cdots}}}}$$  Something must be wrong and the reason behind should be a misunderstanding of how we define infinite nested radical in the form of  $$ \sqrt{a_{0}+a_{1}\sqrt{a_{2}+a_{3}\sqrt{a_{4}+a_{5}\sqrt{a_{6}+\cdots}}}} $$ I researched for a while but all I could find was computation tricks but not a strict definition. Really need help here. Thanks.

In my answer to the recent question , @GEdgar correctly raised the issue that the proof is incomplete unless I show that the intermediate expressions do converge to a (finite) limit. One such quantity was the nested radical  $$ \sqrt{1 + \sqrt{1+\sqrt{1 + \sqrt{1 + \cdots}}}} \tag{1} $$  To assign a value $Y$ to such an expression, I proposed the following definition. Define the sequence $\{ y_n \}$ by:  $$ y_1 = \sqrt{1}, y_{n+1} = \sqrt{1+y_n}. $$ Then we say that this expression evaluates to $Y$ if the sequence $y_n$ converges to $Y$.   For the expression (1), I could show that the $y_n$ converges to $\phi = (\sqrt{5}+1)/2$. (To give more details, I showed, by induction, that $y_n$ increases monotonically and is bounded by $\phi$, so that it has a limit $Y < \infty$. Furthermore, this limit must satisfy $Y = \sqrt{1+Y}$.) Hence we could safely say (1) evaluates to $\phi$, and all seems to be good.  My trouble. Let us now test my proposed idea with a more general expression of the form $$\sqrt{a_1 + \sqrt{a_2 + \sqrt{a_3 + \sqrt{a_4+\cdots}}}} \tag{2}$$  (Note that the linked question involves one such expression, with $a_n = 5^{2^n}$.) How do we decide if this expression converges? Mimicking the above definition, we can write: $$ y_1 = \sqrt{a_1}, y_{n+1} = \sqrt{a_{n+1}+y_n}. $$ However, unrolling this definition, one get the sequence $$ \sqrt{a_1}, \sqrt{a_{2}+ \sqrt{a_1}}, \sqrt{a_3 + \sqrt{a_2 + \sqrt{a_1}}}, \sqrt{a_4+\sqrt{a_3 + \sqrt{a_2 + \sqrt{a_1}}}}, \ldots $$ but this seems little to do with the expression (2) that we started with.   I could not come up with any satisfactory ways to resolve the issue. So, my question is:     How do I rigorously define when an expression of the form (2) converges, and also assign a value to it when it does converge?   Thanks.


Is there a way I can use apt-get install command to install a package and its first level dependencies only instead of all the dependencies recursively?  EDIT:  I am dealing with ROS and would like to install a single package with only its first level dependencies. I don't actually want to install or update the system dependencies that this ROS package depends on, "recursively". During running a particular application if any 'dependency-not found' error is thrown, I would like to see what exactly is missing. I hope this helps.  PS: Also, it seems that there is an apt-get command to install only the first-level dependencies but couldn't find any. Any help is greatly appreciated.

I'm trying to install the package LaTeXila, and the output looks like this:  $ sudo apt-get install latexila --no-install-recommends Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   latexila-data latexmk luatex tex-common texlive-base texlive-binaries   texlive-common texlive-doc-base texlive-latex-base Suggested packages:   rubber texlive-latex-extra debhelper Recommended packages:   texlive texlive-latex-recommended texlive-luatex lmodern   texlive-latex-base-doc The following NEW packages will be installed:   latexila latexila-data latexmk luatex tex-common texlive-base   texlive-binaries texlive-common texlive-doc-base texlive-latex-base 0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Need to get 29.3 MB of archives. After this operation, 74.5 MB of additional disk space will be used. Do you want to continue [Y/n]?   I don't want to install the texlive packages. I've installed texlive manually from . Any suggestions?


I need a help regarding my question I searched a lot  Somewhere I found the answer of the sequence is $\frac{n(n-1)}{2}.$

Say you have +1 on first iteration, +2 on second, and so on until N, and you want to know the total.  That's easily calculate using (N * (N + 1) ) / 2.  What's that equation or technique called?


I would like to show a custom error message to override the standard Salesforce message of 'No applicable approval process was found.' The error message is due to the user not checking a box, which causes the process to fail. It would be better to have a message that would tell the user why the process is failing and to simply check the checkbox in order to fix it themselves.  Could someone help point me in the right direction of a possible visualforce page that could accomplish this?

I have requirement where an user should not be able to submit  a master record for approval until all the related child records are approved.  Submit for approval button on approval history related list cannot be removed. So, this is not an option.  The approach I was thinking is to have a custom field on the master record which specifies whether all child records are approved and add that field in the entry criteria. S0, the record won't be submitted as it does not satisfy the entry criteria. But I need to inform users why they are not able to submit the record. So, I want to customize the error message as well. I have done some search and could not find anything.  Can anyone please let me know if this is possible or suggest any workaround for the above scenario?


I have a custom class "CarSharing", with an attribute "availableCars". An ArrayList availableCars is inizialized in the constuctor . When I create a CarSharing object and try to call the ArrayList in a method I get a java.lang.NullPointerException.   public class CarSharing {        private ArrayList<Car> availableCars;    public CarSharing() {     ArrayList<Car> availableCars = new ArrayList<Car>();       // I can use the List inside of the constructor    }        public void addAvailableCar(Car newCar) {      availableCars.add(newCar);  // Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at CarSharing.addVerfuegbaresAuto(CarSharing.java:12)   }   Any Ideas? Thank you.

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?


Issue Description  When viewing a question where the accepted answer has the same score as non-accepted answers, the accepted answer does not appear first in the list.  Example  Viewing  and refreshing it will result in the accepted answer migrating up and down the list. Note that the sort order is by votes. Reproducable on  as well.

What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable?      For more information, see "" in the .


Still, I don't understand how come the satellites won't fall into earth. I know the general explanation to this question is that the satellite's horizontal velocity is too fast that makes the gravity impossible to pull it to the earth.  This, for me, sounds like the gravitational force need to take a few moments to sense the existence of this object and then pull it downward, just right at the moment the earth notice the object and begin to pull it for its position, it had already moved to another place.   Well, I think since the vertical velocity id independent of horizontal velocity, therefore, no matter how fast the horizontal speed is, it will not prevent the gravity to pull it straight down to the earth, isn't it?   can someone point out what's wrong with my understanding here?

Why doesn't the Moon fall onto the Earth? For that matter, why doesn't anything rotating a larger body ever fall onto the larger body?


I would like to install Ubuntu 13.10 on this laptop. I have a USB installation disk. When I boot up with it I get to the menu with option to try Ubuntu without installing. When I select this option screen goes blank.  Specs HP Split 13 x2 PC Processor: Intel Core i5-4202Y 1.60-GHz processor (3.00-MB L3 cache, dual core, 4.5 W) Chipset: Integrated system on chip (SoC) platform controller hub (PCH) Graphics Internal graphics: Intel high-definition graphics Support for HD decode, DX11, HDMI, and PX 5.0 Panel 13.3-in (1920×1080), full high-definition (FHD),light emitting diode (LED), AntiGlare (AG) TouchScreen with MultiTouch enabled; 16:9 wide aspect ratio; typical brightness: 400 nits; slim (3.0-mm), UWVA, support for eDP 13.3-in (1366×768), HD, LED, AG, TouchScreen with MultiTouch enabled; 16:9 wide aspect ratio; typical brightness: 200 nits; slim (3.0-mm), support for eDP

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I have installed Ubuntu on my desktop, but my monitor don't pass more than 800x600 resolution.  My monitor is good at 1360x768. How can I set resolution at 1380x768 ?

After installing Ubuntu 10.04 with my Samsung SyncMaster B2030, native resolution (1600X900) is not found in the list of resolutions.


I have a large CHM file but tired of clicking next button. What's the best way to convert them to PDF?  P.S: terminal way please.

I have some documents that are in a .chm format. I wondered if there is a file format that can be easier to navigate, supported and of equal file size in Ubuntu?  If there is, I would like to start converting all those books and probably using them with less hassle on all my Ubuntu PCs and my Android phone.


I'm trying to read some XML nodes and store them into a Java object. I can read some of the elements of the object while I can't read others and I don't know why. Here is how a part of the XML looks like:  <problems>   <problem id = "1">       <quest>22-16:4</quest>       <result>18</result>       <chapter_id>1</chapter_id>       <type>text</type>   </problem>   <problem id = "2">       <quest>16+2*12</quest>       <result>30</result>       <chapter_id>1</chapter_id>              <type>text</type>     </problem>   <problem id = "3">       <quest>72:2-18</quest>       <result>18</result>       <chapter_id>1</chapter_id>             <type>text</type>      </problem>   <problem id = "4">       <quest>12*4-15:5</quest>       <result>45</result>       <chapter_id>1</chapter_id>           <type>text</type>        </problem> </problems>   And here is the XMLHandler:  try {         Configuration configuration = new Configuration().configure();         SessionFactory sessionFactory = configuration.buildSessionFactory();         Session session = sessionFactory.openSession();       File fXmlFile = new File("C:\\Users\\buciu\\workspace\\teachApp\\xml\\problems.xml");     DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();     DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();     Document doc = dBuilder.parse(fXmlFile);     doc.getDocumentElement().normalize();      NodeList nList = doc.getElementsByTagName("problem");      for (int temp = 0; temp < nList.getLength(); temp++) {          Transaction transaction = session.beginTransaction();         Node nNode = nList.item(temp);          if (nNode.getNodeType() == Node.ELEMENT_NODE) {              Element eElement = (Element) nNode;              Problem p = new Problem();             ChapterDAO chdao=new ChapterDAO();              p.setQuest(eElement.getElementsByTagName("quest").item(0).getTextContent());             p.setResult(eElement.getElementsByTagName("result").item(0).getTextContent());             Chapter c = chdao.findTChapter(eElement.getElementsByTagName("chapter_id").item(0).getTextContent());             p.setType(eElement.getElementsByTagName("type").item(0).getTextContent());             p.setChapter(c);              session.save(p);             transaction.commit();             }         }     } catch (Exception e) {     e.printStackTrace();     }   I can read the quest, result and chapter_id elements, but I cannot read the type element. I used my application without it so far, I just added it as a new element and now I want to create another object, updated.   The error it gives me is simple(pointing at the line with setting the type element):  java.lang.NullPointerException     at testsManagement.XMLHandler.readXMLProblems(XMLHandler.java:57)     at Main.main(Main.java:30)   So do you see where is the problem? Thanks!


I ran into a funny situation.  I am using the BlockCypher API to generate crypto addresses, and what BlockCypher returns as a response is a Json object with the following fields: "address", "public", and "private".  This is my code:  HttpClient client = new HttpClient();  HttpResponseMessage response = await client.GetAsync(endpoint); if (response.IsSuccessStatusCode) {    string json = await response.Content.ReadAsStringAsync();    dynamic dynamicJson = JsonConvert.DeserializeObject(json);    return new MyAddress()    {      Address = (string)dynamicJson.address,      PublicKey = (string)dynamicJson.public,      PrivateKey = (string)dynamicJson.private    }; }   but I am having problems since public and private are keywords in C# :)  Obviously, there are many alternatives, such as using dynamicJson["public"] or deserializing into an existing class to avoid dynamic, but I am just wondering if there is a way to escape these keywords or some other workaround.

Using asp.net MVC I'd like to do this inside a view:  <%= Html.TextBox("textbox1", null, new { class="class1" }) %>   This statement does not compile because class is keyword in C#. I'd like to know how I can escape the property names such that this compiles.  It is possible to get this to compile if I change the "class" property to "Class" (uppercase C). But this is not suitable because strict xhtml says that all attributes (and element) names must be lowercase.


There's a  button click event in a lengthy code I've written. I have a list of objects in it. Each time the button is clicked, the list should be modified ( for example, some items should be removed ) and then iterated using a foreach loop.  List<Person> lp=new List<Person>(); lp.RemoveAt(2);  foreach(Person j in lp) {     // do something }   When I try to execute the above code, it results in an exception.  InvalidOperationException : Collection was modified; enumeration operation may not execute.  I found some solutions on the internet and tried them. One of them is,  foreach(Person j in lp.ToList()) {     // do something }   But nothing could stop the exception.  can someone help with this ?

I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur.  Collection was modified; enumeration operation may not execute  Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers() is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows Forms client subscribes, the subscriber ID is added to the subscribers dictionary, and when the client unsubscribes, it is deleted from the dictionary. The error happens when (or after) a client unsubscribes. It appears that the next time the NotifySubscribers() method is called, the foreach() loop fails with the error in the subject line. The method writes the error into the application log as shown in the code below. When a debugger is attached and a client unsubscribes, the code executes fine. Do you see a problem with this code? Do I need to make the dictionary thread-safe? [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class SubscriptionServer : ISubscriptionServer {     private static IDictionary<Guid, Subscriber> subscribers;      public SubscriptionServer()     {                     subscribers = new Dictionary<Guid, Subscriber>();     }      public void NotifySubscribers(DataRecord sr)     {         foreach(Subscriber s in subscribers.Values)         {             try             {                 s.Callback.SignalData(sr);             }             catch (Exception e)             {                 DCS.WriteToApplicationLog(e.Message,                    System.Diagnostics.EventLogEntryType.Error);                  UnsubscribeEvent(s.ClientId);             }         }     }          public Guid SubscribeEvent(string clientDescription)     {         Subscriber subscriber = new Subscriber();         subscriber.Callback = OperationContext.Current.                 GetCallbackChannel<IDCSCallback>();          subscribers.Add(subscriber.ClientId, subscriber);                  return subscriber.ClientId;     }      public void UnsubscribeEvent(Guid clientId)     {         try         {             subscribers.Remove(clientId);         }         catch(Exception e)         {             System.Diagnostics.Debug.WriteLine("Unsubscribe Error " +                      e.Message);         }     } }


I'm stuck in proving that the order of an element divides the order of the group.  I've already proved Lagrange's theorem that for $H<G, |H|||G|$   And I know that for any $a\epsilon G, |a|=|<a>|$  The problem is that though I know this for a fact, I need to prove that the order of the element equals the order of the cyclic subgroup it generates but how do i prove this result to finally conclude that the order of a divides G using lagrange?  Please help.

Proving this can be done as follows: consider a finite group G and elements $g_i \in G$ for some integer $i$. Now consider $\langle g_i \rangle = \{g_i^n: n\geq 0\}$, a generator. It can be proved that $\langle g_i \rangle \leq G$ and that the order of $g_i$ is equal to the order of $\langle g_i \rangle$, so $|\langle g_i \rangle| \leq |G|$.  We can now use Lagrange's theorem which states that if $H \leq G$ then $|H|$ divides $|G|$ and we're done. But...  Is there a simpler way to prove this fact?


Does summation $$\sum_{n=1}^\infty\frac{1}{n(\log n)^{a}}$$ converge if $a>1$?

Show that the series   $$\sum_{n=2}^{\infty} \frac{1}{n\, (\log n)^s}$$ converges for $s >1$ and diverges for $s=1$.


Scenario:  I have a generic list of Audits and a generic list of AuditImages. These two lists have been compiled from database tables. As a result of this, ONE AuditImage can have MANY Audits. As you will see below, the classes that the tables map to are joined by a foreign key relationship "ImageID" when they are in the database, however once the data is extracted to lists in code, there is no "PHYSICAL JOIN".  Classes That DB Tables Map To:  public class AuditImage {     public Guid ImageID { get; set; }     public string LowResUrl { get; set; } }  public class Audit {     public Guid AuditID { get; set; }     public Guid ImageID { get; set; }     public DateTime CreatedDate { get; set; }     public string CreatedBy { get; set; }     public string Comment { get; set; } }   The Problem:  I now want to compile a list of "Trail" objects by extracting the data from each list and combining it on "Audit.ImageID == AuditImage.ImageID", into a new list.  public class Trail {     public Guid ImageID { get; set; }     public DateTime CreatedDate { get; set; }     public string CreatedBy { get; set; }     public string Comment { get; set; }     public string LowResUrl { get; set; } }   (The above essentially combines the "LowResUrl" field with each Audit based on the ImageID being the same.)  The Question:  How should I go about doing this!? I had thought about using foreach loops and linq to create a new list of trail objects but I can't quite think of exactly how I would go about doing this?!  Help would be greatly appreciated.

Say I have two lists:  var list1 = new int[] {1, 2, 3}; var list2 = new string[] {"a", "b", "c"};   Is it possible to write a LINQ statement that will generate the following list:  var result = new []{      new {i = 1, s = "a"},     new {i = 1, s = "b"},     new {i = 1, s = "c"},     new {i = 2, s = "a"},     new {i = 2, s = "b"},     new {i = 2, s = "c"},     new {i = 3, s = "a"},     new {i = 3, s = "b"},     new {i = 3, s = "c"} };   ?  Edit: I forgot to mention I didn't want it in query syntax. Anyway, based on preetsangha's answer I've got the following:  var result = list1.SelectMany(i =>  list2.Select(s => new {i = i, s = s}));


I installed Windows 10 via Boot Camp Assistant with no problems yesterday, but needed to uninstall to make the partition larger. I uninstalled it also using Boot Camp Assistant and received no error message. It was successful and Windows was removed. I now want to reinstall, however BCA cannot find the space. I only have one APFS container which contains all of my space and Terminal displays plenty of unallocated space.  I have been searching for four hours and I've encountered a lot of people with problems who didn't use BCA or got an error using it, but I don't know what to do when BCA was successful.  I am on a mid-2012 MBP running Mojave. I understand there are some differences in older and newer Macs when using Boot Camp.  I know I can clean install Mojave and restore from Time Machine before I used Boot Camp the first time, but I would rather avoid it and also I worry about using BCA again, when I had a problem even when it encountered no errors. I want to install Windows again.  diskutil list:     #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *251.0 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:                 Apple_APFS Container disk1         250.8 GB   disk0s2  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +250.8 GB   disk1                                  Physical Store disk0s2    1:                APFS Volume Macintosh HD            111.1 GB   disk1s1    2:                APFS Volume Preboot                 43.9 MB    disk1s2    3:                APFS Volume Recovery                509.5 MB   disk1s3    4:                APFS Volume VM                      2.1 GB     disk1s4

As it can be seen from the screenshot below my APPLE SSD is of size 500GBs, but my Apple_APFS Container disk1 is of size 450GBs. There was a Container disk 2 of size 50GBs before but I successfully removed it using:   sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s4   I tried resizing the main APFS cotnainer with the following command:  diskutil apfs resizeContainer disk0s2 0   but I am getting the following error:     Error: -69519: The target disk is too small for this operation, or a   gap is required in your partition map which is missing or too small,   which is often caused by an attempt to grow a partition beyond the   beginning of another partition or beyond the end of partition map   usable space   Following some screenshots displaying the current state of the sysetm:   diskutil list /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *500.3 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:                 Apple_APFS Container disk1         449.3 GB   disk0s2    3:       Apple_KernelCoreDump                         655.4 MB   disk0s3  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +449.3 GB   disk1                                  Physical Store disk0s2    1:                APFS Volume Macintosh HD            362.2 GB   disk1s1    2:                APFS Volume Preboot                 55.2 MB    disk1s2    3:                APFS Volume Recovery                517.2 MB   disk1s3    4:                APFS Volume VM                      1.1 GB     disk1s4


Is there a way to speed up the animation time for switching between spaces? (Or maybe turning them off?). Preferably without buying a third party app. Maybe there's an option defaults.  I'm on Sierra 10.12.6.  Thanks

I would very much like to disable the sliding animation that occurs when switching desktops via ctrl+→/← or ctrl+[number] in Lion.   This was previously accomplished in previous versions with this command:  defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES && killall Dock   This new animation is even more slow than in Snow Leopard - nearly 1 second to switch - a real productivity killer.  Any help greatly appreciated!


On stackoverflow I asked questions which were apparently preposterous. I got somehow suspended when creating my recreating my account. I assume this somehow gives me a bad name. Is there any way to get a nice, fresh start again as if I did not ever visit before? Like possibly, I am more likely to get suspended again or for longer time if I already did. Is there any way to get a completely fresh start again? I just want a clean slate that's all.

My account has been , besides the following restrictions:  an account will be locked at 1 reputation the user page will have a visual indication that the account is in timed suspension, and for how long the account holder will be unable to vote, ask, answer or comment  What else does timed suspension prevent me doing? For example, can I still edit my own posts or delete content? And what is a network-wide suspension?


class A { public:     virtual void x() = 0;     virtual void y() = 0;     virtual int z() = 0; };  class B: public A { public:     void x();     void y();     int z();     void w(); };  class C: public A { public:     void x();     void y();     int z(); };   "Class 'i' has virtual method 'j' but non-virtual destructor", where i = A, B C, and j = x, y, z  Do I need a virtual destructor?

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?


My company is evaluating becoming a Microsoft Dynamics Partner to do Dynamics installs.  We'll probably start with NAV 2009, because it seems to be the easiest to develop for.  However, we can't even find out what a typical Dynamics NAV 2009 license costs.  This is pretty important for us to know so that we can start to identify our market before investing in training, etc.  Does anyone know how much Dynamics NAV 2009 costs?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


The electric field is in Y direction.Therefore shouldn't force be also in the vertical direction.Also if electric field is y direction then what's the force that is pulling the slab inside the capacitor? I am not asking to calculate the force.I am just asking what's the origin of this force

In the above problem, it states that the dielectric fluid is "pulled up" by an electric force. However, I don't see why this should be true. The electric field (and therefore any electric force) between the plates of the capacitor is horizontal, so there should be no vertically acting force pulling the fluid up. What is wrong with my reasoning, and how does one go about solving the problem?   Also, what does it mean by the work done by the battery? Is it simply $C(x)\cdot V^2_0$?


I want to remove those tuples which had same values at index 0 except the first occurance. I looked at other similar questions but did not get a particular answer I am looking for. Can somebody please help me? Below is what I tried.  from itertools import groupby import random Newlist = []  abc = [(1,2,3), (2,3,4), (1,0,3),(0,2,0), (2,4,5),(5,4,3), (0,4,1)]  Newlist = [random.choice(tuple(g)) for _, g in groupby(abc, key=lambda x: x[0])] print Newlist   my expected output : [(1,2,3), (2,3,4), (0,2,0), (5,4,3)]

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


According to , \colon is of type \mathpunct. But in the MWE below, the outputs of the two lines are not identical. Why not?  \documentclass{article}  \usepackage{amsmath}  \begin{document}  \begin{align*}     & g\colon X\to Y\\     & g\mathpunct{:} X\to Y \end{align*}  \end{document}

I noticed that in many documents you encounter $f: X \to Y$ instead of $f \colon X \to Y$. Another example are quantified expressions: $\forall x: P (x)$ versus $\forall x \colon P(x)$. I find the \colon visually more pleasing, however I sometimes think I seem to be the only one, given the overwhelming amount of documents that seem to use :. Is there a rule of thumb to decide where you should use either \colon or :?


Please help me for prove this inequality: $$\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\geq \frac{9}{a+b+c} : (a, b, c) > 0$$

Given that $a,b,c$ are distinct positive real numbers, prove that $(a + b +c)\big( \frac1{a}+ \frac1{b} + \frac1{c}\big)>9$   This is how I tried doing it:  Let $p= a + b + c,$ and $q=\frac1{a}+ \frac1{b} + \frac1{c}$.  Using AM>GM for $p, q$, I get:  $$\frac{p+q}{2} > {(pq)}^{1/2}$$ $$\sqrt{(a + b +c)\bigg(\frac1{a}+ \frac1{b} + \frac1{c}\bigg)} < \frac{\big(a+\frac1{a} + b+\frac1{b} + c+\frac1{c}\big)}2$$ And for any $x\in \mathbb{R}, \space \space x+\frac1{x}≥2.$ Thus,   $$(a + b +c)\bigg(\frac1{a}+ \frac1{b} + \frac1{c}\bigg)<9, $$ which is the opposite of what had to be proven. What did I do wrong?


I'm having an argument with my girlfriend about which of these is correct. Could someone help? Commas necessary or no?   I don't consider this an exact duplicate question of "Happy Birthday, Sir!" because it also refers to the first comma. Should there be a first comma?

Which one is grammatically correct?   Happy Birthday sir! Happy Birthday, sir!   And where should I put "sir" in this sentence?   Congratulations for completing another trip around the sun!   Also suggest the position of the exclamation mark. Is it necessary or not?


I just installed Ubuntu 17.04 using the netinstaller (UEFI).  After connecting via SSH to the machine I see the 12.04 end-of-life warning.  Is this a bug and can I somehow remove it?  Using username "anonymous". Authenticating with public key "imported-openssh-key" Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-20-generic x86_64)   * Documentation:  https://help.ubuntu.com  * Management:     https://landscape.canonical.com  * Support:        https://ubuntu.com/advantage   * Ubuntu 12.04 LTS ('precise') end-of-life was April 28, 2017    ongoing security updates for 12.04 are available with Ubuntu Advantage    http://j.mp/U1204esm  Last login: Wed May 10 08:24:24 2017 from 8.8.8.8 anonymous@private-server:~$

I just did a do-release-upgrade going from Ubuntu 16.04 to 17.04. However, now when I login via SSH I have the following message   Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-20-generic x86_64)   * Documentation:  https://help.ubuntu.com  * Management:     https://landscape.canonical.com  * Support:        https://ubuntu.com/advantage  Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems!  $ sudo do-release-upgrade -m server  0 packages can be updated. 0 updates are security updates.   My question is, how can I remove the   Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems!  $ sudo do-release-upgrade -m server   it wasn't there prior the release-upgrade  I checked and I am on Zesty  lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 17.04 Release:    17.04 Codename:   zesty   My question is not, how can I remove this message, this I found. My question is more, is there a reason why this appears after a release-upgrade? Is this message something generic not taking into consideration the current version of Ubuntu? Or maybe my system is not updated properly?


In the encryption step of the RSA encryption to get the cypher text $C$  $C \equiv M^e \pmod n$  I am struggling to understand how we know that there only exists one $M$ that maps to a certain $C$?  Does there not exist an $M$ and an $N$ such that $M^e \equiv N^e \pmod n$? How do we know this?

I decided to read the original RSA paper A Method for Obtaining Digital Signatures and Public-Key Cryptosystem because of a question I had about RSA (which is not the question I'm about to ask, but may be a question on here at some time) and came across something I had never seen before in any textbook description of RSA (Note: this comes from the beginning of ).  for any integer (message) $M$ which is relatively prime to $n$, $M^{\phi(n)} \equiv 1\pmod{n}$  The part I don't recall ever hearing in class, or coming across in a text book, or seeing in any description of RSA I've ever read is that $M$ and $n$ must be relatively prime. So, I decided to play around with a toy example of RSA to see what would happen. I use $p=13$, $q=31$, $e=7$ and $M=2p=26$ (for completeness: $d=103$, $\phi(n)=360$, $n=403$). I observed the following using my toy instance of RSA: $M^e\equiv M\pmod{n}$, $M^e\equiv 0\pmod{p}$ and $M^e\equiv M\pmod{q}$. Do these equivalences hold for all $M,p,q$ when $M$ and $n$ are not relatively prime? How would I prove this? What is the real-world effect of this?


When trying to add or multiply certain values, double conversion generates incorrect results.   >0.1 + 0.2 > > 0.30000000000000004  > 0.1 * 0.1 > > 0.010000000000000002   Is there any fix for this other than repetitive round() statements? Thanks!

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


Can there be negative correlation but the regression line has a positive change when there is an increase in the independent variable?

Is it possible to obtain a positive correlation between a regressor and a response (+0,43) and, after that, obtain a negative coefficient in the fitted regression model for this regressor?  I'm not talking about changes in the sign of the regressor among some models. The coefficient sign always remains.  Could  the remaining variables of the fitted model influence the changing of the sign?


For Example, if I had two lists:  listA = [1, 2, 3, 4, 5] listB = [red, blue, orange, black, grey]   I'm trying to figure out how to display the elements in the two argument lists in two columns, assigning 1: red, 2: blue... and so on.  This has to be done without using the built-in zipfunction.

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


[I am re-posting this; I posted it as "guest" inadvertently.]  soapUI 5.5.0, community edition.  Created REST requests with parameters (style = plain). Wanted to use them in request body as variables, but that did not work. Tried "${#firstName}" and "{firstName}"  The result was  "firstName": "",[\n]"  The call works fine with all values specified.


I have a vector layer which is a grid. In the table attribute I calculated, using Zonal Statistics, the mean value of two raster layers, for each cell of the grid.  Now, I would like to use GroupStats to have some means value of a column compared to the second one.  For example :  R1   R2 10   15 10   25 11   14   I want to obtain :  R1    R2 10    20 11    14   So that is easy :   But as I have to do this a lot of time, I would like to write a Python script for this or to use Graphical Modeler.  But it seems that there is no module for Python, and no possible use in Graphical Modeler as it's a plugin.  Does someone would know how to manage with this ?  I use Qgis 2.18.9

Is it possible to calculate the sum of polygon areas based on whether or not it has a value in another column?   For example:  In column 2 I have the area of polygons. I want to calculate the area of all polygons that contain 'AG' in column 1 or all polygons that are IN column 1. But calculate them separately so I can get the total area of each type in column 1.


Let $a,m,n\in\mathbf{N}$. Show that if $\gcd(m,n)=1$, then $\gcd(a,mn)=\gcd(a,m)\cdot\gcd(a,n)$.  Proof:  Let $u,v\in\mathbf{Z}$ such that $\gcd(m,n)=um+vn=1$. Let $b,c\in\mathbf{Z}$ such that $\gcd(m,a)=ab+cm$. Let $d,e\in\mathbf{Z}$ such that $\gcd(a,n)=ad+en$.  So $\gcd(a,m)\cdot\gcd(a,n)=a^2bd+cmen+aben+emad$.  Where do I go from here?

How can I prove that if $\gcd(a, b) = 1$, then $\gcd(ab, c) = \gcd(a, c) \times \gcd(b, c)$?  By eea there exists $ax+by=1$ from $\gcd(a,b)=1$ so a and be are co-primes there also exists $dk=a$ and $dj= b$ where $d=\gcd(a,b)=1$ this is all the information I have gathered from the question but I dont know how to approach and solve it. Can anyone help explain to me how to arrive at the answer? Thanks!


Tapping the iOS Software Engineer recommended job link sent me to a "Not Found" page.

The link to the recommended job in the app brings you to a page with the text: Not Found    Looking at the link it seems like after changing the URL structure in Stack Overflow Jobs they have not been updated in the apps.  For the job in the screenshot this is the used URL in the app:    The correct URL is:


I'm using these settings:  \epstopdfsetup{outdir=./} \usepackage[italian]{babel} \usepackage[T1]{fontenc} \selectlanguage{italian} \usepackage[utf8]{inputenc} \usepackage{hyperref}   in order to write my documents in UTF-8 and get a PDF with all my italian accents in their right place. Everything works smoothly and the output is OK, except for the fact that what I get are not real accented characters, but those "accent workarounds" that latex usually does in place of using a UTF-8-font. The problem is not the document itself, but when I copy its content in another program. For instance, when I copy an "à" from my documents and I paste it into an editor, the result is an "a`". What I think is that it's not compiling with a font that supports UTF-8, am I right? I've also tried with luatex, but what I get is the same matter. So: how can I obtain real utf-8 characters in my PDFs?  Example  \documentclass[a4paper, 11pt, twocolumn, twoside]{report}  \usepackage[italian]{babel} \usepackage[T1]{fontenc} \selectlanguage{italian} \usepackage[utf8]{inputenc} \usepackage{hyperref} \usepackage{lmodern}  \begin{document}  Ciao this is a test: à  \end{document}

I've been trying to set a document using lualatex in my TeXLive 2010 installation. Unfortunately, the non-ASCII characters are left out from the output. In the following minimal document produces a PDF with no warnings or errors but it only contains the second line. Using the inputenc package results in an error Unicode char ... not set up for use with LaTeX.  \documentclass{minimal} \begin{document} číčí abcd \end{document}   pdflatex handles the document fine. My version of lualatex is  This is LuaTeX, Version beta-0.60.2-2010071421 (Web2C 2010) (rev 3736)   Thanks for any pointers.  EDIT: For bonus points, how would I use the Bitstream Charter fonts? I use the mathdesign package, but with them (and even when loading fontspec, fontenc and/or luaotfload), the non-ASCII characters are missing :/   \usepackage[bitstream-charter]{mathdesign}


The fight in the film was really awesome but I just assumed it would end with Black Widow showing up to calm Hulk down since Hulk is supposed to have limitless strength and become more powerful as he gets more angry.   Since Black Widow was incapacitated by the Scarlet Witch I thought Hulk would surely just thrash the Hulkbuster then run off but instead the fight cuts off and in the next scene they're on the jet with Bruce Banner shivering and Stark looking mildly pleased with himself as if he was somehow able to subdue him.   How did he do this? Does this mean the movie Hulk has far more limited power than in the comic books?

In  we see Tony Stark fight the Hulk using the . The destructive battle apparently ends in      the Hulk being knocked out by Iron Man.   Or something along similar lines. During the fight, Stark wishes a number of times for the Hulk to get knocked out and/or "Go to sleep!"    My question is, how is this possible? As confirmed by , "the Hulk's potential strength has no finite element inside." It's often quoted that "the madder the Hulk gets, the stronger the Hulk gets,"  so how is it possible to knock him out to begin with?


Can we write a batch file to export all or some environment variables to a file in windos 7?

I want to have a look into my Environment variables as a text file into XP Professional. Is there any way?


I have my power settings on Ubuntu to suspend when inactive for 10 minutes. And I have set my 'Power on lid close on battery' as Do Nothing. However, with this setting my laptop doesn't suspend itself if I close my lid but neither does it suspend itself and by the time I get home the laptop is completely dead. If I set my 'Power on lid close on battery' to Suspend then it suspends itself however, it also cuts out all the wifi and VPN connections. Is there a way I set my laptop such on lid close it does nothing and preserve the wifi and VPN connections but after 10 minutes of inactivity whether lid closed or not suspends itself?

I frequently leave my laptop idle and close the lid when i do so. Problem is that the wireless turns off if i do so and my downloads can't happen.  Is there anyway to prevent that from happening?  I am using 10.04.   P.S. I have already disabled suspend from happening on default


When I boot Ubuntu 14.04, Wifi works properly for few minutes, but after that I can't connect to internet.But still my Wifi status shows connected.  lshw   - *-network       - description: Wireless interface                product: RTL8723BE PCIe Wireless Network Adapter                vendor: Realtek Semiconductor Co., Ltd.                physical id: 0                bus info: pci@0000:04:00.0                logical name: wlan0                version: 00                serial: ac:b5:7d:20:cd:e4                width: 64 bits                clock: 33MHz                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless                configuration: broadcast=yes driver=rtl8723be driverversion=4.1.6-040106-generic firmware=N/A ip=192.168.1.142     latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn                resources: irq:16 ioport:3000(size=256) memory:f0c00000-f0c03fff   lspci   Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter   lspci -vvnn   Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)   Kernel driver in use: r8169  Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]   Kernel driver in use: rtl8723be

I have installed Ubuntu 15.04 on my laptop with RTL8723BE Wi-fi card. But it is always disconnecting from network. I have tried echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf but that didn't helped. What can I do to prevent the wifi from disconnecting? If I upgrade to kernel 4.X, will it help?  ~$ lspci -knn | grep Net -A2  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be   ~$ rfkill list 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   ~$ ifconfig && iwconfig && route -n && ping -c 1 google.com eth0      Link encap:Ethernet  HWaddr 38:63:bb:cd:4a:7e             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:3 errors:0 dropped:0 overruns:0 frame:0           TX packets:53 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:752 (752.0 B)  TX bytes:8445 (8.4 KB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:3870 errors:0 dropped:0 overruns:0 frame:0           TX packets:3870 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:314613 (314.6 KB)  TX bytes:314613 (314.6 KB)  wlan0     Link encap:Ethernet  HWaddr c0:38:96:6d:c4:83             inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::c238:96ff:fe6d:c483/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15240 errors:0 dropped:0 overruns:0 frame:0           TX packets:14627 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:14410285 (14.4 MB)  TX bytes:2192744 (2.1 MB)  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:"DIR-615"             Mode:Managed  Frequency:2.437 GHz  Access Point: 00:90:4C:08:00:0D              Bit Rate=150 Mb/s   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-22 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:186   Missed beacon:0  lo        no wireless extensions.  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    400    0        0 wlan0 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0 PING google.com.Dlink (172.26.136.19) 56(84) bytes of data. 64 bytes from 19.136.26.172.in-addr.arpa (172.26.136.19): icmp_seq=1 ttl=249 time=102 ms  --- google.com.Dlink ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 102.547/102.547/102.547/0.000 ms


I am an undergraduate student at an American university and am applying for an Msc at LSE for the 2021-2022 school year. I need advice on a letter of recommendation. I already have one professor who is writing me a LOR, but am having trouble finding a second professor. Here are my options for the second LOR:  A PhD student who taught a class on anthropology. She can write much more personally about my work, work ethic, analysis, and character since she knows me on a much more personal level. I'm applying to LSE's international migration program, and in her class, I wrote several essays on the topic (Partition of South Asia, identity formation in diaspora, etc.), so she can directly write about my work in this field. She agreed to write me a LOR, but encouraged me to first look for a Professor.  The second option is a history professor. I got A-'s in both his classes, and he knows me fairly well on a personal level. But I don't think his LOR would be as strong as the PhD student's. I reached out to him and didn't heard back. I just sent him another email.   According to the LSE website, an academic reference is "tutors who have taught you at university" and "who know your work well, and who, preferably, can comment on subjects or skills relevant to the programme(s) you are applying for." I know LSE pays quite a bit of attention to personal character via LORs and personal statements, so I don't know if it would be more beneficial to have a professor who has more prestige and credibility, but who doesn't know me personally vs. a PhD student who has less prestige and credibility, but knows my personal character and work ethic much better. Any advice would be appreciated. Especially those with experience with LSE admissions.

I am a MA student who frequently works with undergraduates on projects. One student has asked me if I can write her a letter of recommendation for graduate school. Are there any risks to me submitting a letter, as opposed to her finding a faculty member (who likely would not be in the same field as her interests)? For graduate school applications how much does the position of the person writing a recommendation letter matter, as opposed to his/her academic familiarity with the student? I have already advised her to check with the programs she is applying to in case they have requirements.  Edit: I realize I left this unclear before-- she has two tenured professors willing to write letters. If I agreed to, I would be the third letter. The department is small, so there might not be too many options for an additional letter.


As the title says. I am getting a lot of dropped sandstone that I would like to get killed, but I also have bamboo and minecarts that I don't want getting deleted. Is there any way to do this using command blocks? The /fill command will not work for me, as I need dropped items killed, not placed items.

I've got a capture the flag arena. One issue we keep running into during play, is that of clutter.  We have /gamerule keepInventory false, so the pitch gets rather cluttered with armor, weapons and building materials, such that it becomes difficult to pick the flag up, due to full inventories.  I've discovered the following command to remove all drops from the arena:  /kill @e[type=Item]   However, this removes all the floating items from the ground. I'd like, if possible, to preserve the flag from being destroyed.  I have this command for detecting the flag:  /testfor @e[type=Item,x=40,y=1,z=40,dx=40,dy=27,dz=80] {Item:{id:"minecraft:banner",Damage:4s}}   But I'm not sure how to combine the two in a way that it will destroy everything except for the flag.  Any ideas?


I accidentally deleted my Clash of Clans App. I went to Playstore to get a new App so that I could get access to my village and clan . Hoewever, now I cannot get access with the new icon. It says: "Clash of Clans has stopped" What should  I do? I cannot loose my village. I put massive effort , time and money into it

I unintentionally and stupidly wiped my Clash of Clans game data. I went to Application Manager on my Android and clicked 'Clear data'. (I used this for fixes before and it never started a new game.)   Now, my level 60 or so base has been wiped as if was to start a new game. Have I doomed myself to starting again or is there a way in which I can retrieve my old game save? Maybe by contacting Supercell? I have a snapshot of my base.


In the above block of code, I am trying to understand how the line return reverse((i++, i)) is working.  #include <stdio.h>         void reverse(int i);         int main()         {             reverse(1);         }         void reverse(int i)         {             if (i > 5)                 return ;             printf("%d ", i);     //        return reverse(i++); -- stack overflow             return reverse((i++, i));         }   I also found the below piece of code which works similarly.  #include <stdio.h>     int main()     {         int y = 1, x = 0;         int l = (y++, x++) ? y : x;         printf("%d\n", l);     }   I am sorry if the question is very basic one. I felt it very difficult to understand. If someone can explain, it will be helpful.


Is there a way to block (by a password/PIN code or what else) all kinds of software installation on an Android tablet/smart phone by third-application or codes? I want to customize a android OS for my parents, but many apps may install other apps in background. So I try to install all apps for their need and disable all kinds of further installation.  Is there any way to do this? I can write code by myself, so if there is some code can do this, it will also be good for me.

My mom has an android tablet and she doesn't even know what a site is, her e-mail, or even the password of her facebook account. She's an average user. The internet is facebook in her eyes. She has no need for apps or anything, it's just, only, precisely facebook. All is facebook.  How can I completely disable installing apps in android so they can't be installed in any way or form, I mean, not by URL, not by clicking, not by app store, not even by another program. Just disable the entire thing altogether.  Doesn't need to be safe, have locks, passwords etc. I'm not trying to secure the device from intruders, attackers or robbers, I'm trying to secure it from its very own user.  Please help. I just had to remove two anti-virus apps that were opening adware pages when she tried to open facebook lite, and that's obviously a no-go, apps which she "had not installed." Clearly there's some voodoo going on here for them to just popup, or maybe she just did it unknowingly, but none of that's relevant. How can you just disable installs so this couldn't ever happen again?


I understand that the Incredible Hulk's strength is next to infinite, fueled by his anger; but what’s some of the greatest applications of this that we’ve seen? Either from the movies or the comics. At this point the greatest thing I have seen him do was when he one-punched the giant worm carrier in the first Avengers movie. Is there a larger application of his strength somewhere though, something more impressive? Examples are appreciated

Most incarnations of The Hulk I've seen or read about state that he is as strong as he needs, basically meaning that there is no limit to how strong he can get.  Is there any canon regarding this? Have we seen the upper limit of the Hulk's strength?


I am interested to know if there are any animals having blood groups similar to human blood groups? Is it possible to transfuse blood between humans and those animals?

Humans have the ABO and Rhesus blood typing systems. I have two questions about it:   Why have we evolved these blood types? Do other animals have different blood types as well?


How do you evaluate this summation $$\sum_{t=0}^{n}{t\binom{n}{t}x^t(1-x)^{n-t}}$$ where $0 < x < 1?$

Why does:   $$ \sum_{k=0}^{n} k \binom nk p^k (1-p)^{n-k} = np $$ ? Taking the derivative of:   $$ \sum_{k=0}^{n}  \binom nk p^k (1-p)^{n-k} = (1 + [1-P])^n = 1 $$   does not seem useful, since you would get zero. And induction hasn't yet worked for me, since – during the inductive step – I am unable to prove that:   $$ \sum_{k=0}^{n+1} k \binom {n+1}{k} p^k (1-p)^{n+1-k} = (n+1)p  $$   assuming that:   $$ \sum_{k=0}^{n} k \binom {n}{k} p^k (1-p)^{n-k} = np  $$


Does the suffix -gate necessarily refer to a political scandal? Can it refer to a scandal involving large businesses but no government officials?   Could burgergate refer to a scandal in which a company passed horse meat off as beef for burgers?  I'd appreciate your help.

I have found it in an article. Since it may be related to politics, instead of providing with an actual quote of context, let me re-phrase it with my own words:  John Smith, a famous politician, has been caught on a certain kind of public offense. This person has committed similar offenses in the past. The article is titled, "A new Smithgate".  What is the meaning of gate here?


What is the difference in style and meaning between the following two in terms of the adjective "nice"?   (It is nice not to be rude.) (It isn't nice to be rude.)   besides, what is the difference in style and meaning between the following two in terms of the verb "decide"?   (I decided not to come) (I didn't decide to come.)

I don't think you understood me. / I think you misunderstood me.    Do these senteces mean the same thing? If not, what's the difference?  Edit: I just realized that I asked something different from what I originally wanted. So I am also interested in the following comparison:     I don't think you understand me. / I think you don't understand me.


I am trying to find how to change some password policy settings in OpenLDAP (on a system-wide level, not on a per user level) such that all LDAP account users (i.e., existing and new users) have their passwords to expire after 90 days.  I know the main parameter that controls this is the maxPasswdAge parameter but I am not sure how to set this. I have tried different ldapmodify options  but it fails:  ldapmodify -W -x -D "cn=Manager,dc=mydomain,dc=local" -f test.ldif   dn: cn=pwdpolicyentry,cn=common,cn=products,cn=OracleContext,o=my_company,dc=com changetype: modify replace: pwdMaxAge pwdMaxAge: 7776000   The error message was ..  modifying entry "cn=pwdpoilicyentry,cn=common,cn=products,cn=Oraclecontext,dc=mydomain,dc=com" ldapmodify :no such object(32)  matched DN: dc=mydomain,dc=com    My questions are   Are there any alternatives to doing this, for example: just change a setting manually somewhere in some configuration file and restart the LDAP server.  Are there any services that need to be bounced once this is done?

I am trying to find how to change  some password policy settings in openLDAP (on a system-wide level -  not on a per user level) such that ALL LDAP account users (ie existing and new users) have their passwords set to expire after 90 days.  I know the main parameter that controls this is the maxPasswdAge parameter but I am not sure how to set this.  We are running openldap 2.3.43 on RHel 5.3.  Can anyone share their experience on this?


How can I calculate the following limit,  $$\lim_{x\to0}\frac{e^{-1/x^2}}x=0$$  If I plug $x=0$ I get the following,  $$f'(0)=\lim_{x\to0}\frac{e^{-1/0^2}}0=\infty$$

Given the following limit,  $$\begin{align} \lim_{x\to 0}\frac{e^{-1/x^2}-0}{x-0}\\\\ & \end{align}$$  How do I calculate it? when pluggin in 0 I would get $\frac{0}{0}$


I'm trying to dual boot ubuntu alongside windows. 8 I've tried many times with various versions, but the full hdd 500 gb is displayed with no partitions. I've created unallocated space in windows. Currently there are 4 partitions. but none is getting displayed.  the output of sudo fdisk -l is below     ubuntu@ubuntu:~$ sudo fdisk -l  Disk /dev/sda: 8004 MB, 8004304896 bytes 255 heads, 63 sectors/track, 973 cylinders, total 15633408 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x05f17be2  Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048    15632383     7815168    b  W95 FAT32 Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xc3ffc3ff  Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *   157288448   158005247      358400    7  HPFS/NTFS/exFAT /dev/sdb2       158005248   402685289   122340021    7  HPFS/NTFS/exFAT /dev/sdb3            1985   880490519   440244267+   f  W95 Ext'd (LBA) Partition 3 does not start on physical sector boundary. /dev/sdb5            2048   157286399    78642176    7  HPFS/NTFS/exFAT /dev/sdb6       402701416   880490519   238894552    7  HPFS/NTFS/exFAT  Partition table entries are not in disk order

I want to install Ubuntu 12.10 64 bit alongside Windows 8, so I created some free space in Windows 8.  When I try to install Ubuntu using a Live USB, the free space created is not visible and the partitions shown are completely different.  But when I click the option "Try Ubuntu", I am able to use my Windows partitions.


If a question A is closed as unclear, it means that it is unknown what the asker meant. (Otherwise the question would have been edited rather than closed.)  If some question B is unclear (also if it's written similarly to A), it can be closed as unclear. If question B is clear, it is unknown whether B is a duplicate of A because it is unknown what question A means (see above).  So it should be impossible to mark a question B as a duplicate of an unclear-closed question A. Why is it possible?  Edit: If B is very similar to A, then closing it as unclear or as duplicate both is appropriate. The latter is easier/faster as explained in . And this is a problem. Because if A and B are somewhat dissimilar, this creates an unnecessary dilemma of choosing either speed (closing as duplicate) or clean logic (closing as unclear).  Edit regarding possible duplicate of this question: I'm asking why an action that depending on the situation is either illogical or unnecessary is technically possible. The question you marked as duplicate of mine asks about formulations in the duplicate policy regarding "broad" and "narrow" questions. The other question marked as duplicate is about a bug in the vote calculation. These are all different questions!

I recently got  in the Close Votes queue (). Before I voted to close it, it had 2 votes to close it as a duplicate, 1 vote to close it as "off-topic" and 1 vote to close it as "unclear what you're asking". I voted to close it as "unclear what you're asking".  So at the end, there were two votes to close as a duplicate and two votes to close as "unclear what you're asking". According to , the last close vote will be used to determine the close reason in case of a tie. In this case, the last close vote was mine and the reason was "unclear what you're asking". But it was still closed as a duplicate.  What's going on here? Is this a bug? Is the answer I linked to wrong? Is there a special case for duplicates? Something else?


Trying to find a book I read in the late 70's or very early 80's.   As I remember, the plot centered around a rock star who transferred his consciousness to a computer, and whom "made contact" with a Russian telepath. The telepath was, iirc, actually a "living brain" - or slices of - held in some form of life-sustaining container. One of them may have been based on a satellite, and may have had telekinetic powers.

I read this quite a while back, part of my parents library (they're in their 50s now) I think the book was probably published in the 70s or 80s, my copy was paperback. I don't recall the cover art, but I have vague recollections of a satellite on the cover and maybe blue with grid-lines below it?  I've made concerted efforts to find it again but to no avail. My parents don't remember it either, but mum's an avowed book-aholic and buys a lot of books, reads them once and forgets about them, so that's not so surprising.  The key parts I remember:   Both the Soviets and Americans were working on psychic techniques and technologies, with real and tangible results including Remote Viewing. MK-ULTRA was explicitly namedropped in relation to the American psychic program. The Soviets and Americans both had orbiting superweapons, One was a microwave laser (or something very similar) and the other used slivers of the brains of psychics to blow people's brains up in a wide area. A super-psychic (male) took offence to the state of the cold-war and took control over the orbital weapons by manipulating the onboard computers psychically. There's a gruesome description of a psychic weapon being tested on monkeys in a lab, the POV character throws up afterwards in horror. I think there might have been more than one POV character. There's an extended description of the psychic orbital weapon as experienced by people in its area of effect. Similar to the monkeys, it builds up, starting with alzheimer-esque hand-shaking and building up to seizures and screaming before their brain liquifies fully and either comes out the nose and ears or outright blows the skull open. (this is one of the more vivid recollections I have of the book) I remember that the super-psychic was working wholly alone and did most of his psychic stuff from motels halfway around the world from events. I believe the super-psychic also killed other psychics explicitly. The weapon satellites had code-names Both weapons were used on cities in the course of the story I vaguely recall an office building getting targeted specifically at one point.


I'm trying to partition my sda2. Right now I have:  sda1: fat32: efi  sda2: lvm2 pv: ubuntu-vg  But GParted says my sd2 has 0b unused space. I used du -sh /*; but I have nothing that consumes all the spaces.  Anyone has an idea? Thx

I want to shrink my second (LVM) partition, in order to create a new partition in the newly freed space. I am using the Live CD to do so, because I know I can't resize/move this partition while it is in use. When I opened GParted in the Live CD, I realized that I could not resize the partition, because when I right-click it, the option "resize/move" is disabled.  I tried to unmount it, to "lazy" unmount it (umount -l /dev/sda2) but it didn't work.  A screenshot from GParted:


I looked through several postings, but didn't see anything that related to this specifically.  If there is a thread, would you please post a link?  I have written a java app.  It has a basic gui that gathers user preferences, then downloads files from the web based on those preferences.  It works just fine in eclipse.  It works just fine when I export into a .jar file on the same machine it was developed on.  However, when I try to load it on a different machine, it brings up the gui and gathers information, then just hangs.  It's irritating because I cannot troubleshoot the problem.  I'm sure I'm not the first person to have this problem, so I equally sure there are tools out there to help me, but since I've taught myself up to this point, I've not come across any.  Does anyone have any recommendations about what I might try, please?

I know there's some JAVA_OPTS to set to remotely debug a Java program.  What are they and what do they mean ?


I have this habit, of making snide remarks on questions of poor quality.  In the vast majority of cases the question ends up being closed anyway, and I only add my comment after the question has started receiving the close votes, so its fate is more or less known. But still, there appears to be a problem.  For example, there is this question , to which I added a comment saying "you begin by finding a micromonitor and a microkeyboard".  The question already had one close vote and two downvotes at the time I added that comment, and @gnat had already added the standard comment saying "career and education advice is explicitly off-topic per help center. See meta.programmers.stackexchange.com/a/6488/40980".  I know comments of this type are not a good idea, and I should refrain from posting them.  Usually they point to some of the issues of the question, instead of being purely joking, as the above example is, but I agree, they are nothing but a habit that I should kick.  But please read on, I have something to ask which has to do with how this web site works.  So, it appears that some moderator has actually gone into the trouble of removing that comment of mine.  Which is fine, I am not complaining about it, as I said I know I should not have made that remark in the first place.  My issue is of an entirely different nature.  Here is the rub: I did not receive any notification about the fact that my comment was removed.  This is not a one-off kind of event, the other day I had done a similar thing, and it was the first time I begun to realize that there must be moderators on stackexchange who go around removing inappropriate comments.  And then it downed upon me that these snide remarks of mine may have been axed by moderators for years, and I would not know, because I have not been receiving any notifications, nor do I remember every single post on which I once left a snide remark to go see if it is still there.  So, I would have probably realized that these comments are not welcome on stackexchange a lot sooner if I had been receiving notifications about such instances of moderation events, and many of these comments would have never been posted in the first place if I had received notifications the first few times I wrote comments of this kind.  So, shouldn't there be some kind of notification sent when comments are removed for reasons of inappropriateness?  Amendment 1  If someone like me is finding out that comments are ephemeral after a couple of years of using the site, then clearly, some kind of information is missing somewhere.  Generally, you cannot force people to read walls of text of "terms of use" before using a site, so when you have an opportunity to send additional information by means of notifications about actions taken by the user, that's an opportunity worth pursuing.  In other words, notifications about things are good.  Amendment 2  So, this is worse than I thought.  If it is possible that a comment containing useful information may be deleted, then I believe that a notification should really be sent, and it should contain the original text of the comment, in case the OP has a use for it.

I think you should be notified if anything of yours is deleted or even flagged, preferably with some explanation (even if it's a simple categorisation like #rude, #irrelevant, #incorrect) and who did it.  Recently, a couple of comments of mine vanished without warning or evidence afterwards. I'm fine with deletion, but I think it should be used sparingly and be based on democratic decisions. What's the harm of letting a comment simply sit with no up-votes or responses rather than outright removal? Or allow downvoting and then negatively voted comments are hidden by default?  I get the impression that anything I post could be deleted. Very few people want to be unpopular or do the wrong thing. It takes time to understand what something is about and how best to use it (this site). Whether or not what I posted deserved to be deleted is irrelevant because I got no feedback. No-one can learn without feedback. The number of frivolous comments with many upvotes I've seen shows how inconsistently the rules are applied. A community that gives too much power to highly rated users won't grow but turn stagnant.  Sorry if this was rude, inappropriate or pathetic. I'm aware that similar discussions have occurred. In any case, I'll continue to use the site and move on...


There is a paper I want to cite where, on the title page of the article, the authors names appear without any middle initials (i.e., one of the authors is Mark Smith).  However, this one author frequently publishes using his middle initials (i.e., Mark E. Smith).  What is the appropriate way to cite this-with the name as it appears in the article, or the name as the author typically uses it?  For what it's worth, the source article appear in a mathematical journal, and I want to cite it in a paper that will eventually appear in a mathematical journal.

Since I've been using Mendeley to manage and extract metadata from my PDFs, I've come to notice that authors are sometimes denoted with all their initials and sometimes with just one. I assume this has to do with different journal's rules on denoting author's names. However, this makes a mess in my author list in Mendeley, as the same person may be known under two or even more names (e.g.: "Last, F."; "Last, First"; "Last, First M,"; "Last, First Middle").   If, for completeness' and tidyness' sake, I edit the author fields to always have the most complete name of the author available to me regardless the journal the author published in, I inevitably will change the way I cite them. For example, an article from a certain journal only uses the first initial:     Last, F. Article Title, Journal name, x:y (YYYY), pp. xxx-xxx    After I have "updated" my authors, it is possible my citation includes also the second initial, i.e.:     Last, F.M., Article Title, Journal name, x:y (YYYY), pp. xxx-xxx   So my question is: am I incorrectly citing the article when I include more complete information about the author's name than is given by the journal article itself?


show that if $f$ is homeomorphism of $[0,1]$ onto itself, then there is a sequence of polynomials $P_n(x)$, $n=1,2,\ldots$, such that $P_n$ converge to $f$ uniformly on $[0,1]$ and each $P_n$ is homeomorphism of $[0,1]$ onto itself.

Let $f:[0,1]\rightarrow [0,1]$ be a homeomorphism. Show that , there exists a sequence of polynomials  $$(P_n(x))_n$$ such that $P_n(x)$ converge uniformly to $f$ on $[0,1]$ and every $P_n(x)$ is a homeomorphism from $[0,1]$ to itself.   I think that if we put additional condition that f be $C^1$ then $f'$ will be non-negative and continuous. Moreover, Weierstrass theorem says that there will be exist non-negative sequence of polynomials $(Q_n(x))_n$ such that it converges uniformly to $f'$ on $[0.1]$. Now it seems that $$P_n(x)=\int_{\mathbb{0}}^{x}Q_n(t)\:dt$$ works .  Is this true ? Is there other ways?   Thanks


I have Strings which look like this one, but with different Id.  [{"Id":33,"Title":"Sweden, Stockholm - Järfälla: Dienstag, 31. Januar 2017 - Mittwoch, 1. Februar 2017"}]   How can I split them so that they become:  Sweden, Stockholm - Järfälla: Dienstag, 31. Januar 2017 - Mittwoch, 1. Februar 2017   I know that I can represent the quotation marks using \", but I don't know how to apply the split or String.prototype.split function in this case.  I tried  var text = "[{\"Id\":33,\"Title\":\"Sweden, Stockholm - Järfälla: Dienstag, 31. Januar 2017 - Mittwoch, 1. Februar 2017\"}]".replace("[{\"Id\":33,\"Title\":\"", '');   alert(text);   But that would still leave "}] at the end and besides, the Strings have different ID's so that would only work for this case.  Thanks in advance!

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


Take a look on this code. 10/3 return 3.3333332538604736328125000 and when I multiply by 3 in a calcutor i get 9.99, but if do the same by the code i get exactly 10.00. How it's posible ?  #include <stdlib.h> #include <stdio.h>  int main() {      float v = 10.f/3.f;     float test = v*3.f;     printf("10/3 => %25.25f \n (10/3)*3 => %25.25f\n",v,test);     return 0; }   This is the assembly code without printf, compiled using default gcc 7.2.1 parameters:  0000000000400497 <main>:   400497:       55                      push   rbp   400498:       48 89 e5                mov    rbp,rsp   40049b:       f3 0f 10 05 b1 00 00    movss  xmm0,DWORD PTR [rip+0xb1]        # 400554 <_IO_stdin_used+0x4>   4004a2:       00    4004a3:       f3 0f 11 45 fc          movss  DWORD PTR [rbp-0x4],xmm0   4004a8:       f3 0f 10 4d fc          movss  xmm1,DWORD PTR [rbp-0x4]   4004ad:       f3 0f 10 05 a3 00 00    movss  xmm0,DWORD PTR [rip+0xa3]        # 400558 <_IO_stdin_used+0x8>   4004b4:       00    4004b5:       f3 0f 59 c1             mulss  xmm0,xmm1   4004b9:       f3 0f 11 45 f8          movss  DWORD PTR [rbp-0x8],xmm0   4004be:       b8 00 00 00 00          mov    eax,0x0   4004c3:       5d                      pop    rbp   4004c4:       c3                      ret       4004c5:       66 2e 0f 1f 84 00 00    nop    WORD PTR cs:[rax+rax*1+0x0]   4004cc:       00 00 00    4004cf:       90                      nop   I think mulss is rounded by a CPU feature.  For note, 10/3 in the GNU BC program returns 3.3333333333333333333333 ( *3 => 9.9999) and in SciLab returns 3.3333333333333334813631 ( *3 => 10).

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


In one of our clients' (testers') databases the Identity column of a SQL Server Local Db datatable looks thus:    So, most of the time the identity increases by one, but sometimes the identity jumps up by 10,000. Possibly this coincides with moving the database between computers and reattaching them to SQL Server Local Db.  What may be related is the fact that this is an Entity Framework Code First generated database with Migrations. At one time there was a migration that executed the following Transact SQL: Sql("DBCC CHECKIDENT (Sessions, RESEED, 10000)"), This database may have seen this migration. However, I deleted the migration afterwards and the _MigrationsHistory table in the database does not have a record for this particular migration.   If I have a look at the design for the table it specifies an identity of (1,1).  So, does anyone have some inkling about what is going on? Can I stop the 10,000 jumps?  EDIT: The reseed had nothing to do with it. As indeed can be read  the jump by 10,000 is a feature of SQL server for identity columns of type big int (64 bit).  Why I bother? The SQL Server Localdb engine is connected to a legacy VB6 application that we are migrating to .Net. The VB6 code is geared towards using 16 bit identity fields. Jumps of 10,000 at a time are disastrous...

I'm trying to generate unique purchase order numbers that start at 1 and increment by 1. I have a PONumber table created using this script:  CREATE TABLE [dbo].[PONumbers] (   [PONumberPK] [int] IDENTITY(1,1) NOT NULL,   [NewPONo] [bit] NOT NULL,   [DateInserted] [datetime] NOT NULL DEFAULT GETDATE(),   CONSTRAINT [PONumbersPK] PRIMARY KEY CLUSTERED ([PONumberPK] ASC)     );   And a stored procedure created using this script:  CREATE PROCEDURE [dbo].[GetPONumber]  AS BEGIN     SET NOCOUNT ON;      INSERT INTO [dbo].[PONumbers]([NewPONo]) VALUES(1);     SELECT SCOPE_IDENTITY() AS PONumber; END   At the time of creation, this works fine. When the stored procedure runs, it starts at the desired number and increments by 1.  The strange thing is that, if I shut down or hibernate my computer, then the next time the procedure runs, the sequence has advanced by almost 1000.   See results below:    You can see that the number jumped from 8 to 1002!   Why is this happening?  How do I ensure that numbers aren't skipped like that?  All I need is for SQL to generate numbers that are:   a) Guaranteed unique.  b) increment by the desired amount.    I admit I'm not a SQL expert. Do I misunderstand what SCOPE_IDENTITY() does?  Should I be using a different approach? I looked into sequences in SQL 2012+, but Microsoft says that they are not guaranteed to be unique by default.


Comments are often described as "second-class citizens" on Stack Exchange:      Comments are purposely second-class citizens, but this seems like privileging them--protection for comments that should be removed!       While I agree comments are second class citizens, ...     Etc.  When I refer to comments being "second-class citizens", I'd like to add a reliable reference to show that I'm not just a random person on the Internet stating an anti-comment opinion.  Thus, I want to include a link to a reliable reference.  But I don't know which link to use...  Question: What's the canonical link for comments being "second-class citizens"?  It's not on the help page: .

Users with less than 50 reputation points cannot write comments on questions and answers that they don't own.  Why does this limit exist? But I want to contribute now. What should I do instead? But I can't write a good answer without more information! Shouldn't I be allowed to post comments if I have reputation on a different site? But I saw a new user posting a comment! How did they do it? Why do I need 50 reputation to comment on my own post?   See also:    in the Help Center


I'm sick of needing to reboot my computer every time I wish to use another OS, or run a virtual machine that skimps on power. With the onset of large amounts of memory for computers nowadays I began to think that there must be some way to run two OS's in memory with a way to switch between the two. In my mind, it doesn't seem too difficult;    a compatibility layer boots up after bios,  which in turn boots to OS1.  While in OS1, software is run that triggers a save to ram boots back to the compatability layer, and then boots to OS2.  This way, the OS's can be used side by side and boot times are cut drastically short since both OSs are already in ram.   Both OS's have their own designated and protected memory so there is no problem there... I mean, it seems fine, but no one has done it, so there must be some reason as to why. I would love some insight into this please.

Is it possible to dual boot two OS's at the same time?  For example: I'm currently dual booting Ubuntu 11.04 and Windows 7. Ubuntu is running on a single 500gb HDD, Windows 7 is running on 1TB RAID 1 mirror. To switch between the two OS's, a reboot is required. Is it possible to switch between the two OS's without a reboot?  NOTE: I'm fully aware of the capabilities of VirtualBox and VMWare Player - I use both. Please don't answer "Use Virtualization!"  EDIT: If this is not possible can you share why it's not possible? To me, it doesn't seem like it would be that difficult. Keep in mind that my vision is unencumbered by knowledge!


I have an Ubuntu 20.04 server and I installed Monit. I want to secure the web interface. I followed the following instructions :  $ cd /var/certs $ sudo openssl req -new -x509 -days 365 -nodes -config ./monit.cnf -out /var/certs/monit.pem -keyout /var/certs/monit.pem $ sudo openssl gendh 512 >> /var/certs/monit.pem $ sudo openssl x509 -subject -dates -fingerprint -noout -in /var/certs/monit.pem $ sudo chmod 700 /var/certs/monit.pem  1) When I run the following command I got an error. Yet I do it with "sudo". Why is it not working ? ubuntu@myserver /var/certs $ sudo openssl gendh 512 >> /var/certs/monit.pem -bash: /var/certs/monit.pem: Permission denied  2) It says in the address bar "not secure", yet I am using HTTPS. Is this normal ?  I would also like to know what these 2 command lines are for : $ sudo openssl gendh 512 >> /var/certs/monit.pem $ sudo openssl x509 -subject -dates -fingerprint -noout -in /var/certs/monit.pem

Disclaimer: I'm pretty novice at sysadmin stuff.  I'm trying to set up port forwarding in an AWS EC2 instance, this has to be done in the command-line because I don't want to go in and edit anything, it has to be automatic (it's part of a build process).   sudo echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf      Permission denied   The weird thing is I've been (successfully) using sudo for pretty much every command that required su privileges. If I do sudo su before the command (trying it out by hand in an ssh session), then it works.  Reasons behind this? Possible solutions that don't involve sudo su or manual edits?


I just installed Ubuntu 20.04 and saw a problem while installing programs with apt. I am in a closed environment without internet but with a full copy of the Ubuntu Archives with apt-mirror.  When i want to install some programs "apt install" now uses snap to download these files..   Example:  apt update  apt install chromium-browser  Reference:   Is there a special switch or config to deactivate this feature? This would be really useful to me!

How do I remove snap? apt pretends it's not there but I can still call commands with it.  Trying to rm it says "read only file system"  root@tunnel:/# apt remove snap Reading package lists... Done Building dependency tree Reading state information... Done Package 'snap' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@tunnel:/# snap whoami email: -