Is there any indication in the books that Dumbledore figured out (after the stunt Sirius pulled with Snape,  trapping him in the Whomping Willow with Moony maybe ) that the Marauders (sans Lupin) are animagi?  If yes, why didn't he encourage them to register?  Why risk an Azkaban senence, which is surely unhealthy, when you can register and transform whenever you please?  All Snape had to do in his death eater period is to warn the ministry there were three unregistered animagi about and let them face the investigation and the consequences if it was proven - and then Dumbledore would lose three order members.   He could have even saved them the trouble saying that they were learning how to turn into animals under his (or McGonagall's) supervision.

Is there any information in canon (or from JKR) to indicate that Dumbledore knew that three of the Marauders were Animagi?  I can't recall anything, but Harry seems to be firmly convinced that Dumbledore knows "everything that goes on around here," and that assessment seems to be accurate during Harry's years.


I'm trying to modify the SIAM class to allow PDF bookmarks. Please use the following version of the class file: . Here is a sample code that fails to produce PDF bookmarks:  \documentclass{siamltex} \usepackage{hyperref} \usepackage{lipsum} \begin{document}  \title{A Test of PDF Bookmarks} \author{Jane Doe} \maketitle \begin{abstract}   \lipsum[99] \end{abstract} \section{Introduction} \lipsum[1] \section{Main Ideas} \lipsum[2] \section{Conclusions} \lipsum[3]   \end{document}

The following code is in the preamble of my LaTeX document:  \documentclass{llncs} \usepackage{amsmath,amssymb} \usepackage{url} \usepackage[algoruled,vlined]{algorithm2e} \usepackage{graphicx,subfigure}   \usepackage{hyperref}  \hypersetup{colorlinks=true,citecolor=blue}   \numberwithin{equation}{section} % numbering according to the section \bibliographystyle{plain}  %Choose a bibliograhpic style \begin{document}  \title{The Title} \maketitle \section{A} \label{sect:A} \subsection{a} \subsection{b} % ... \section{B} \label{sect:B} \subsection{a} \subsection{b} % ... \section{C} \label{sect:C} \subsection{a} \subsection{b} % ... \end{document}   Note that the text is organized into sections and subsection. However, after compiling the code, the Adobe PDF preview does not show the "tree" branching on the left. Instead, it just shows "The Title", and that option has no branching with the "+/-" sings. How could I achieve this?


I have recently been offer a job as Account Technician, it's all done online.  The job seems true with job search out and a decent webpage.  My question is they want me to accept money thru Bitcoin or Email transfer thru my bank account and move it all to another Bitcoin account.  Is this legitimate?

A woman on Facebook recently contacted my dad.  She asked him to get a bank account so she could send him money, and he would send money to her employees (about 12 people), and she would pay him for doing so each time. She said the last person who she had do this for her ran away with all her money. But he would have made more money continuing to do this money transfer thing for her. I am not sure if this is a scam or not. Sounds weird to me, but my dad said it’s worth the try.  I had to get the bank account in my name because my dad has bad notices on his records for falling for fraud traps and asking for refunds too many times. She stressed to him that it had to be the bank “American Christian Credit Union;” for what reason, I’m not sure. There is no large amount of personal money in this bank account, just the minimum amount to open the account: $25.  I’m skeptical about this and confused as to why this person would send a large amount of money to a random person on the Internet?  Has anyone heard of any scams like this?  What should I look out for?


I have recently been trying to install Shutter and I get This error when I type sudo apt-get install shutter  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  shutter : Depends: libgnome2-perl but it is not going to be installed            Depends: libgnome2-vfs-perl but it is not going to be installed            Depends: libgnome2-wnck-perl but it is not going to be installed            Depends: libgnome2-gconf-perl but it is not going to be installed            Depends: libxml-simple-perl but it is not going to be installed            Depends: libwww-mechanize-perl but it is not going to be installed            Depends: libwww-perl but it is not going to be installed            Depends: perlmagick            Depends: libgtk2-imageview-perl but it is not going to be installed            Depends: libnet-dbus-perl but it is not going to be installed            Depends: libgnome2-canvas-perl but it is not going to be installed            Depends: libgtk2-unique-perl but it is not going to be installed            Depends: libproc-processtable-perl but it is not going to be installed            Depends: libjson-xs-perl but it is not going to be installed            Depends: libnet-dropbox-api-perl but it is not going to be installed            Recommends: libgoo-canvas-perl but it is not going to be installed            Recommends: libgtk2-appindicator-perl but it is not going to be installed E: Unable to correct problems, you have held broken packages.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I'd like to get the real disk usage of a database, i.e. the amount of megabytes or gigabytes (could be any) that the tables use with all of their respective rows.

How can I write a query using Oracle SQL Developer to find how many blocks my database is using? (tables & indexes)


My 2019 16" MacBook Pro with 2.6GHz 6-core i7 processor on macOS 11.3.1 is constantly running . I've checked the ActivityMonitor, but no app is using excess amounts of CPU, energy, or memory. I've obviously tried rebooting & updating my Mac. I also make sure my fans aren't blocked so there's enough room for air flow and I have cleaned the interior from dust. What else can I do?

Occasionally my machine will have a kernel_task instance max out the CPU:    This can last from minutes to sometimes hours. The machine is effectively unusable in this state. Restarting doesn't help; a new kernel_task pops up again until it finishes whatever it's doing.  How can I find out what this process is doing?


I really had no idea how to write these questions out without copying and pasting them onto here, so I am sorry for that..I hope adding a picture is fine. I would appreciate any kind of help, and if you dont mind suggesting a useful website, or video that can explain these problems to me. Thank you

Could someone take me through the steps of decomposing  $$\frac{2x^2+11x}{x^2+11x+30}$$ into partial fractions?   More generally, how does one use partial fractions to compute integrals $$\int\frac{P(x)}{Q(x)}\,dx$$ of rational functions ($P(x)$ and $Q(x)$ are polynomials) ?    This question is asked in an effort to cut down on duplicates. See .  Also see .


As in title I am interested in getting interested how English grammar (as a whole) could benefit my English communication skills. So to emphasize, I don't look for a 100% complete ultra deep grammar book. All I am looking for is a book to get me interested and convince me (with real life examples) that (obviously) a better understanding of English grammar would benefit my English communication skills.  Thank you for your recommendations.

Before marking this post duplicate or voting to get it closed (the reason for which I simply don't get just because it is a grammar forum after all! If I am seeking recommendation for a book that means I will be coming back someday to the same site for my doubts also provided I get a not so harsh reply!), please read this and help this MBA aspirant.   A little about myself and my research so far. I am a very critical reader of English Grammar and the kind of person who aims at perfection.  Currently, I am keen on taking on English grammar again after a certain gap. Well, I am aiming for MBA, so preparing for entrance exams for the same.  I bought the religiously followed Wren and Martin and started studying it chapter by chapter. I was surprised when I read the pronouns chapter. I studied all the rules given and then started practising but it came as surprise when I found when many of the attempted questions were wrong. The reason simply being the rules for those specific sentences were not given.   For example:     We scored as many goals as they/them?    According to me, the answer should be they, but it's them according to the solution manual. Worse still, the solution manual offers no explanation for this.  So after a chat with my teachers I was suggested to follow the blogs of grammarians and look for any rules for the sentences that have contradictory answers!  I did so and was clarified by  post of pronouns, Rule 5.  Then I saw a book by the same author. I was momentarily happy. It was Momentarily because the reviews on Amazon were too bad about this book. After reading a couple of forums about the book I found a common statement saying that no grammar book is exhaustive.  So, it's okay for me to have more than one. And my simple question is what will be a good and almost exhaustive (if not fully exhaustive) book of English grammar to help get through the subtle usages of English in my management entrances  which is crisp and to the point and yet covers all important rules and syntax, and most importantly having practice tests at the end with solutions and explanations?


I am trying to install  for Windows 7. But when I run it, I get the following error:     The program can't start because MSVCP120.dll is missing from your computer. Try reinstalling the program to fix this problem.   How do I fix this?

Ok, so I was getting an error trying to add a file to a game for full screen windowed mode, and it gave me the error "program cant start missing MSVCR120.dll is missing". Alright, no problem, so everything I searched for said install vcredist_x86.exe, but when I try to run it I get the same error. I cannot figure out or find anywhere how to fix it. I am running 64 bit windows 7 so it is the right file type.


When casting scorching ray must the caster choose his targets first and then roll each ray to determine if they hit?  Or, can they choose one target at a time and see the results of the attack and damage before choosing the next target and ray attack?     Example: Wizard casts scorching ray and there are 3 skeletons.  If the first ray kills the first skeleton can he then aim the other 2 rays at the next one, or does it need to be pre-determined where each ray is going to go?

For spells like Magic Missile and Scorching Ray that involve multiple ranged attacks, when do you pick targets for each ray/missle?   Do you pick them all up front and then roll attack/damage? Or do you pick one, roll attack/damage, and repeat?


When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many different figures for the total size of my files? Can't computers add?  Speaking of adding: when I add the “Used” and “Available” columns of df, I don't get the total figure. And that total figure is smaller than the size of my partition. And if I add up my partition sizes I don't get my disk size! What gives?


There's only a handful of big events or facts to be spoiled that I can think of in the main Borderlands 2 game. In no particular order:      - Angel is not an AI - she is a siren.  - Angel has been manipulating the Vault Hunters on Jack's behalf since the first game.  - Angel is Jack's daughter.  - You kill Angel.  - Jack kills Roland.  - Jack kills Bloodwing.   I'm aware there are some spoilers (particularly the last two items on the above list) in Tiny Tina's Assault on Dragon's Keep, but I haven't played all the way through to know what others there might be.  If the above list is all there is, then I believe a player only needs to complete up to the following point in the main game in order to be "spoiler safe" going into Dragon's Keep:      Where Angels Fear to Tread (Part 1)   Is this correct, or does Dragon's Keep have other significant spoilers from later on in the Story missions (or in some sidequests) that I haven't thought of? What are all the main game spoilers in Dragon's Keep, and what missions does a player need to complete in the main game to avoid them?  (Of course, please use spoiler notation where appropriate, by putting >! at the start of lines containing spoilers.)  Note: This question is not about preparation for DLCs in terms of game mechanics such as player leveling. I only want to know what part of the main story should be completed to avoid discontinuity and spoilers in this particular DLC.

I'm late to the Borderlands 2 party, but I picked up the Season Pass for a steal.  I'm still only in the teens as far as my level is concerned.  However, there are now 3 DLC packs out and I've got them all installed.  Sometimes it's tempting to go away from the main quest and just jump into something new and potentially interesting.  In BL1, I played through the DLC between playthroughs of the game, treating the add-ons like continuations of the game post-final-boss.  I'm not sure if this is a good idea in BL2 (or even if it was smart in BL1, honestly...)  Is there a recommended level for starting the DLCs?  Will I encounter enemies that are too hard if I go early, or too easy if I go late?  Are there some weapons or quest rewards that I really can't get the most of until after I'm a certain level?


#include <iostream> #include <stdlib.h> #include <time.h> using namespace std;  void randnum() {     int random;     srand((unsigned int)time(0));     for(int i=1;i<=5;i++)     {         random=(rand()%39)+1;         cout<<random<<endl;     } }  int main() {     cout<<"Five random number is here"<<endl;     randnum();     system ("PAUSE");     return 0; }   I am randomly doing this to practice C++. I always get confused in setting the range of random generator (is my method correct? from 1-39). Also how can I prevent numbers from overlapping one another? That is, if I am outputting 5 different numbers from 1-39, it can always 5 different numbers like 4,5,2,7,12 instead of 4,5,2,4,12 (4 is used twice here)

I'd like to generate unique random numbers between 0 and 1000 that never repeat (i.e. 6 doesn't show up twice), but that doesn't resort to something like an O(N) search of previous values to do it. Is this possible?


I've win xp and win 8 installed at the same time (dual-boot) and now I'm thinking about removing windows xp and just keep windows 8 for the usage,  The problem is that I'm unsure how to proceed on with the process or even using what terms should I google for a tutorial of such nature..  Any help would be greatly appreciated :)

How do I completly remove XP from my pc. I currently have a dual boot with XP and Windows 7. Since installing Windows 7, I have never used XP. Can I remove it without causing problems with Windows 7?


We all know that     You can earn a maximum of 200 reputation per day.   So if a user gets 30 up votes on his answer today, he can only get 200 reputation today. But what about the rest 100 reputation, will he get 100 reputation tomorrow or 100 reputation are gone for good?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


I am working on an Graphical User Interface, which uses two JTextFields(the third one shouldnt be relevant to this question) and a JComboBox. The selected Item from the ComboBox should decide which Textfield is added to the Arraylist "Gewínner" if the Button "Speichern" is pressed.   I am not allowed to use an inner class for the Listener.   Now the Problem: Whenever my ActionPerformed-method gets used i get an NullpointerException in the getGewinner-method.  With the help of System.out.print I found that the null that gets pointed is the variable Winner in the call Winner.getSelectedItem().toString().  The Question: Why is Winner == null? Shouldnt it be initiated in the constructor? How can I change it ?  The Code In Question:  The GUI:   public class ErgebnisFrame extends JFrame{  private JLabel Spieler1, Spieler2, Gewinner, Punkte; private JTextField one, two; private JComboBox <String> Winner; private JButton Abbruch, Speichern;  public ErgebnisFrame(){     super();     this.setVisible(true);     this.setLayout(new GridLayout(5,2));     this.setSize(300,400);       this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      JPanel Spieler1 = new JPanel();     Spieler1.add(new JLabel("Name von Spieler 1"));     this.add(Spieler1);      JTextField one = new JTextField(1);     this.add(one);      JPanel Spieler2 = new JPanel();     Spieler2.add(new JLabel("Name von Spieler 2"));     this.add(Spieler2);      JTextField two = new JTextField(1);     this.add(two);      JPanel Gewinner = new JPanel();     Gewinner.add(new JLabel("Gewinner"));     this.add(Gewinner);      JComboBox<String> Winner = new JComboBox <String>();     Winner.addItem("Spieler 1");     Winner.addItem("Spieler 2");     this.add(Winner);      JPanel Punkte = new JPanel();     Punkte.add(new JLabel("Punkte des Gewinners"));     this.add(Punkte);      JTextField points = new JTextField(1);     this.add(points);      JButton Abbruch = new JButton("Abbrechen");     JButton Speichern = new JButton("Speichern");     Speichern.setActionCommand("Speichern");     Speichern.addActionListener(new SpeichernListener(this));     this.add(Abbruch);     this.add(Speichern); }  public String getSpielerName(int Par){     switch(Par){         case 1: return one.getText();         case 2: return two.getText();         default: return "Es gibt nur zwei Spieler";          } }  public String getSpieler1Name(){     return one.getText(); }  public String getSpieler2Name(){     return two.getText(); }  public String getGewinner(){      return Winner.getSelectedItem().toString(); }  public static void main (String [] args){      ErgebnisFrame Haupt = new ErgebnisFrame();       } }   the Listener:  public class SpeichernListener implements ActionListener {  private ErgebnisFrame Frame; private static List <String> gewinner = new ArrayList <String>();  public SpeichernListener(ErgebnisFrame frame){     this.Frame = frame; }  public void actionPerformed(ActionEvent e) {     if(e.getActionCommand().equals("Speichern")){         if(Frame.getGewinner().equals("Spieler 1")){             gewinner.add(Frame.getSpieler1Name());         }         else{             gewinner.add(Frame.getSpieler2Name());         }     }  }  public List <String> getGewinner(){     return gewinner; }   }

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?


request.onreadystatechange = function () {   if (this.readyState === 4) {     var nav = this.responseText;   } };  -->use nav here<--  How can I use my variable nav outside this function without being undefined?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I want to prove that for two sequences, say $a_k$ and $b_k:$  $$ \limsup_{n \to \infty} \left(a_n + b_n \right) \leq \limsup_{n \to \infty} a_n +\limsup_{n \to \infty} b_n$$  If we let $M_n =\sup \{ a_k : k \geq n \}$ and $N_n = \sup \{ b_k : k\geq n  \} $, then obviously  $$a_k +b_k \leq M_n+ N_n \Leftrightarrow  \sup \{a_k+b_k: k \geq n \} \leq M_n + N_n$$  After that, the order limit theorem should suffice, right? Thanks.

I am stuck with the following problem.     Prove that $$\limsup_{n \to \infty} (a_n+b_n) \le \limsup_{n \to \infty} a_n + \limsup_{n \to \infty} b_n$$   I was thinking of using the triangle inequality saying $$|a_n + b_n| \le |a_n| + |b_n|$$ but the problem is not about absolute values of the sequence.  Intuitively it's clear that this is true because $a_n$ and $b_n$ can "reduce each others magnitude" if they have opposite signs, but I cannot express that algebraically...  Can someone help me out ?


Is the "Square Root of 4" equal to ±2 or 2? And the twist here is that if it is equal to ±2, then, what is "√4 + 2"? Is "√4 + 2" equal to just "4", or "4 and 0"? I am studying root right now and I just cant figure it out.

It is perhaps a bit embarrassing that while doing higher-level math, I have forgot some more fundamental concepts. I would like to ask whether the square root of a number includes both the positive and the negative square roots.  I know that for an equation $x^2 = 9$, the solution is $x = \pm 3$. But if simply given $\sqrt{9}$, does one assume that to mean only the positive root? And when simply talking about the square root of a number in general, would one be referring to both roots or just the positive one, when neither is specified?


This regular expression: /\{(\w+)\}/g returns ["{name}", "{color}"] and ignores my parenthesis around (\w+)  Why doesn't this work? What is the correct regular expression?    Token replacement:  const item = {   name: 'foo',   color: 'bar' };  let str = `'{name} - {color}'`  console.log( str.match( /\{(\w+)\}/g ) );

I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.


I road in a book that the function $f(x)=\sqrt{x} \sin(x)$ is differentiable at 0. Personally, I don't think so since f is undefined on the left of $x=0$. Can you confirm my thought or the book?

Assume $f$ has a domain of $[a,b]$. Is it possible that $f$ is differentiable on the closed interval $[a,b]$, or must the maximal domain for $f'$ be $(a,b)$?


For any system can we always say that entropy increases with temperature. In other words: $$\left(\frac{\partial S}{\partial T} \right)_{\{\alpha\}}\ge0$$ where $\{\alpha\}$ is the set of parameters held constant. Either way  can it be proved?

Entropy change, $\Delta{S}$, can be found from the $\frac{1}{T} - Q$ graph. When the temperature doesn't change during the dispersal of heat energy in the system, the area under the graph is more, that is, change in entropy is more. But, when the temperature increases, the area under the graph decreases, that is, change in entropy is less.  I have taken $Q$ on the x-axis and as $T$ is a function of $Q$, $\dfrac{1}{T}$ is represented on the y-axis. Now, when $T$ doesn't change, the graph covers a rectangular area but when $T$ increases, the graph covers much smaller area.  So, what's the reason? Do the number of possible microstates decrease when the temperature decreases?


Is there a way to read the current terminal content (visible window, or full buffer, whatever it's easier) programmatically?  I need this because I'm trying to develop a program which, after executing an arbitrary command, works with its output. I stress after - I know pipes are used for this, but the purpose of the program is avoiding that.  A possible solution would be a combination of a programmatic Select all followed by an xsel invocation, although I don't know any way to perform the first operation [in Gnome Terminal].

How may I read the EXISTING output content from another terminal, like an SSH terminal?  The scenario is I ran a program in a GUI session but later on I need to read its output remotely without touching its GUI session (I know I can if I use VNC). I did a bit search in StackExchange but their stories are different.   gives a solution to redirecting its FUTURE output towards the remote terminal but still, the EXISTING output is missing. Any solution to this?


I have been working on one part of the proof where my aim is to show that $C =  D$. I have been able to prove that $ A \triangle C = A \triangle D$.  Is it reasonable to conclude $ C = D $ from $ A \triangle C = A \triangle D$ ?

I don't quite yet understand how $\oplus$ (xor) works yet. I know that fundamentally in terms of truth tables it means only 1 value(p or q) can be true, but not both. But when it comes to solving problems with them or proving equalities I have no idea how to use $\oplus$.  For example: I'm trying to do a problem in which I have to prove or disprove with a counterexample whether or not $A \oplus B = A \oplus C$  implies $B = C$ is true.   I know that the venn diagram of $\oplus$ in this case includes the regions of A and B excluding the areas they overlap. And similarly it includes regions of A and C but not the areas they overlap. It would look something like this:    I feel the statement above would be true just by looking at the venn diagram since the area ABC is included in the $\oplus$, but I'm not sure if that's an adequate enough proof.  On the other hand, I could be completely wrong about my reasoning.    Also just for clarity's sake: Would $A\cup B = A \cup C$ and $A \cap B = A \cap C$ be proven in a similar way to show whether or not the conditions imply $B = C$? A counterexample/ proof of this would be appreciated as well.


We have a directory that we cannot delete because...     Cannot remove item C:\myDir: The process cannot access the file 'C:\myDir\' because it is being used by another process.   Inside Resource Monitor > CPU > Associated Handles, a search for myDir shows that cmd.exe is using our directory.  Inside , running as administrator, our attempts to terminate cmd.exe are met with this:      Unable to terminate cmd.exe (PID 4656): An attempt was made to access an exiting process.    Beyond restarting the computer, how else can we kill this process and thereby delete or rename our directory?

I closed an application, but the process remained in the list. I try to stop in from the task manager, but nothing happens. No error messages, process just stays in the list. I try to debug it, but the debugger says:     Unable to attach to the crashing process. The requested operation is not supported.     This happens with VS2008 and some other programs, sometimes.  How to terminate it?


I've managed to install Ubuntu 14.04 on my new Samsung ATIV Book 9 Lite ultrabook. After updating some configuratiosn in the UEFI installation was very easy. The only questions and issue I believe I'm still experience is when booting.  I believe when the laptop would be displaying the grub boot options I see the following. There is a black screen with a purple border of 10px around the screen. I'd like to know how I can update my system so that I see the grub boot manager.  I've run these commands:  sudo cat /etc/default/grub  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"   The command was not possible, sudo efibootmgr.

After trying (and failing) to install better ATI drivers in 11.10, I've somehow lost my grub menu at boot time.  The screen does change to the familiar purple colour, but instead of a list of boot options it's just blank solid colour, and then disappears quickly and boots into the default entry normally.    How can I get the bootloader back?  I've tried sudo update-grub and also various different combinations of resolutions and colour depths in startupmanager application with no success (640x480, 1024x768, 1600x1200, 16 bits, 8 bits, 10 second delay, 7 second delay, 2 second delay...)   edit:   I have already tried holding down Shift during bootup and it does not seem to change the behaviour.  I get the message "GRUB Loading" in the terminal, but then the place where the grub menu normally appears I get a solid blank magenta screen for a while.  Here are the contents of /etc/default/grub  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=" vga=798 splash"  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"


Is there any closed form for this summation? $$\sum_{k=0}^n\frac{x^k}{k!}$$ where $n$ is finite and $x$ a real parameter

What is the closed form of  $$\sum_{k=0}^n \frac{x^k}{k!}$$  as a function of $x$ and $n$?  Knowing that it converges to $e^x$ when $n\to \infty$.


What is the best artificial intelligence software for Ubuntu? Windows has Cortana.  Apple has Siri.  Android has Google now. What is/are linux AI System?

I am new to Ubuntu and I was wondering if there was an  like Cortana or Siri in the software center.


Let $n$ an integer, $n>1$.  Suppose there exist two real square matrices $A,B$ of size $n$ such that :   $A^2+B^2=AB$ $AB-BA$ is invertible   Prove that $n$ is divisible by $3$.

I saw this tucked away in a  and am asking this question to preserve (and advertise?) it. It's a nice problem!  Problem: Suppose $A$ and $B$ are real $n\times n$ matrices with $A^2+B^2=AB$. If $AB-BA$ is invertible, prove $n$ is a multiple of $3$.


I look at System.IO.File.Move, "move" the file to a new name.   System.IO.File.Move("oldfilename", "newfilename");   But it not enough for me to using this method.   Infact I want to recursively copy a folder and all of it's subfolders into a new path and change name of these file. anyone could take me a pieces of code?

I want to copy the entire contents of a directory from one location to another in C#.  There doesn't appear to be a way to do this using System.IO classes without lots of recursion.  There is a method in VB that we can use if we add a reference to Microsoft.VisualBasic:  new Microsoft.VisualBasic.Devices.Computer().     FileSystem.CopyDirectory( sourceFolder, outputFolder );   This seems like a rather ugly hack. Is there a better way?


Suppose that $f$ is $n$ times differentiable at $x_0$ and $p$ is a polynomial: $$p(x) = a_0 +a_1(x-x_0)+...+a_n(x-x_0)^n$$    of degree $\leq n$ such that    $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p(x)}{(x-x_0)^n} =0$$    Show that $a_r= \frac{f^{(r)}(x_0)}{r!}$ if $0 \leq r \leq n$, that is $p=T_n$, the $n^{th}$ Taylor polynomial of $f$ about $x_0$.   First,  $f^{(r)}(x_0)$, with  $0 \leq r \leq n$, does exist according to the hypothesis.  If n=1, let's check that $a_1 =\frac{f'(x_0)}{1!}=f'(x_0)$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p(x)}{(x-x_0)} =0$$   $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p(x)}{(x-x_0)} \cdot \lim\limits_{x \rightarrow x_0} (x-x_0)=0 \cdot \lim\limits_{x \rightarrow x_0} (x-x_0)$$   $$\lim\limits_{x \rightarrow x_0} f(x)-p(x) = 0$$ $$\lim\limits_{x \rightarrow x_0} f(x) = \lim\limits_{x \rightarrow x_0} p(x)$$ $$\lim\limits_{x \rightarrow x_0} f(x) = \lim\limits_{x \rightarrow x_0} [a_0 +a_1(x-x_0)]$$ Taking the limit with $f(x)$ and $p(x)$ continuous $$f(x_0) = a_0 +a_1(x_0-x_0)$$ $$f(x_0) = a_0$$ Finding $a_1$: $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p(x)}{(x-x_0)} =0$$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-a_0-a_1(x-x_0)}{(x-x_0)} =0$$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0} =\lim\limits_{x \rightarrow x_0} \frac{a_1(x-x_0)}{x-x_0}$$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0} =a_1 \cdot \lim\limits_{x \rightarrow x_0} \frac{(x-x_0)}{x-x_0}$$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0} =a_1 \cdot \lim\limits_{x \rightarrow x_0} 1$$ $$\frac{f'(x_0)}{1!} =a_1 $$  Assumption $P_{r-1}$: $a_{r-1}= \frac{f^{(r-1)}(x_0)}{(r-1)!}$ to be true such that $$g_{r-1}=\lim\limits_{x \rightarrow x_0} \frac{f(x)-p_{r-1}(x)}{(x-x_0)^{r-1}} =0$$  Finding $a_r$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p_r(x)}{(x-x_0)^r} =0$$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p_{r-1}(x)-a_r(x-x_0)^r}{(x-x_0)^r} =0$$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p_{r-1}(x)}{(x-x_0)^r} = a_r \lim\limits_{x \rightarrow x_0} \frac{(x-x_0)^r}{(x-x_0)^r}$$ $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p_{r-1}(x)}{(x-x_0)^r} = a_r $$  Given $f(x) - p(x) = R(x)$ with $R(x)$ a polynomial of degree $r$, we have $R(x)=o((x-x_0)^r)$. Therefore as $x \rightarrow x_0$, $R(x) \rightarrow 0$.  Given $f(x) - p_{r-1} =R_{r-1}$ with $R_{r-1}(x)$ a polynomial of degree $r-1$, we have $ \lim\limits_{x \rightarrow x_0} R(x) = \lim\limits_{x \rightarrow x_0} R_{r-1}(x-x_0) = 0$  $$\lim\limits_{x \rightarrow x_0} \frac{f(x)-p(x)}{(x-x_0)^r} = a_r $$ $$ \lim\limits_{x \rightarrow x_0} \frac{[f(x)-p(x)]^{(r-1)}}{[(x-x_0)^r]^{(r-1)}} = a_r $$ $$ \frac{1}{r!} \lim\limits_{x \rightarrow x_0}  \frac{ f^{(r-1)}(x)-p^{(r-1)}(x) } {x-x_0} = a_r $$ $$ \frac{1}{r!} \lim\limits_{x \rightarrow x_0}    \frac{ f^{(r-1)}(x)-f^{(r-1)}(x_0) } {x-x_0} = a_r $$ $$ \frac{1}{r!} \cdot f^{(r)}(x_0) = a_r $$  I understood that you are supposed to apply L'hospital rule and do the $(r-1)^{th}$ derivative, but I unsure of the correctness of argumentations of the last 5 lines above (or if it is correct, what would the justifications be?)  leading to the end  result.  $$ \frac{f^{(r)}(x_0)}{r!}=a_r$$  ?

So I'm viewing a short proof on the uniqueness of Taylor polynomials.     Uniqueness of Taylor polynomial:   Let $f:]a,b,[ \rightarrow \mathbb{R}$ $n$ times continuously   differentiable and $x_0 \in ]a,b,[$. If $p$ is $n$th degree polynomial   function for which       $$f(x)-p(x)=o(|x-x_0|^n), \space \text{when} \space x \rightarrow x_0$$  then      $$p(x)=T_{n, x_0} f(x)$$   Proof starts like:  $$\frac{p(x)-T_{n, x_0}f(x)}{(x-x_0)^n} = \frac{p(x)-f(x)}{(x-x_0)^n}+\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n}$$  then   $$\frac{p(x)-f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  $$\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  Now my problem is, how can one actually say that the above approach $0$ if the denominator approaches $0$?


find the radius  of convergence  of the power series  $\sum_{n=0}^{\infty} z^{n!}$.  My attempt : $\sum_{n=0}^\infty z^{n!}$ is a power series of the form $\sum_{n=0}^\infty {c_n z^n}$ with $$ c_n=\begin{cases} 1 & \text{if $n=k!$ for some integer $k$,}\\ 0 & \text{else}. \end{cases} $$  Any hints/idea/solution will be appreciated  thanks u

$\sum_{n=0}^{\infty}z^{n!}$  My textbook says its answer is 1. But I think the sequence is not power series because it cannot be expressed as the form of $CnZ^n$.   Am I right? Or where do I have a mistake?


I browse SE a lot. Not directly, but for most questions I put in google I get the answers in SE. Sometimes I would like to comment, or vote some questions/answers but I don't have enough reputation.  I have a few questions, but half don't have answers (probably because they are hard/impossible, and other questions I have would be duplicates), and I find it very hard to get points from answering, because when I know an answer, many other people do and are faster and better at it. I would need to be much more active (constantly refreshing unanswered list page) than I have time for.  I signed up for already 10 communities, because I wanted to up-vote some really helpful (low voted) answers, in the likes that some day I get enough reputation for them to count. I only have questions/answers in 4 of them. Now I realize I probably won't ever get the reputation in those communities.  Are there any tips for me to speed up my reputation increase? And what about the communities that I don't expect to gain reputation at all, but would still like to vote/comment?

I have been reading Stack Exchange for years - mostly not logged in, and have never posted (this is my first). I'm simply not very talkative, and very good at googling.  Recently a few occasions have come up when I've wanted to comment on a question.  I wanted either to ask for, or provide, clarification which did not warrant a new answer.  How do I gain enough reputation to comment without:   asking questions which have already been answered or that I can figure out on my own, or posting my comment like as an answer (i.e. being  rude)?


I am searching for an example of a non-abelian group $G$, s.t. all elements in $G$ have order $p$, where $p$ is a prime number. For $p=2$ such an example does not exist. How did I come up with such a question? If $G$ is abelian with the property above, we can define a $\mathbb{F}_p$-vector space structure on $G$. And my proof used that $G$ is a $\mathbb{Z}$-module. So the above question arose naturally.

If there exist any group which has only elements of prime order? (except of $p$-elementary abelian, $Q_{8}$ and $D_{2p}$)


Is there a possibility to define a variable that will be used as a default argument in the constructor?  #include <iostream> class Foo { public:     Foo(int x) { num = x;}     void print(int y = num)     {         std::cout << y << std::endl;     } private:     static int num; }; int main() {     Foo f(5);     f.print(); }   this compiles but I get linking errors LNK2001 unresolved external symbol "private: static int Foo::num" (?num@Foo@@0HA)

Very simply put:  I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions.  Anyway, I have defined two static unsigned char variables in my class public scope, when I try to modify these values in the same class' constructor, I am getting an "unresolved external symbol" error at compilation.  class test  { public:     static unsigned char X;     static unsigned char Y;      ...      test(); };  test::test()  {     X = 1;     Y = 2; }   I'm new to C++ so go easy on me. Why can't I do this?


I have the driver of my wireless USB adapter (tp-link TL-WN725N) from CD and currently the machine has no internet. I'd like to install the driver from CD via the command-line to be able to use the wireless capability in the basement. I have no long network cable. Thanks!

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks


All images are hosted on Imgur. What will happen if they close? And their host crashes.  Many questions have very important images for many purposes. I was just wondering if the site is prepared?

It seems that images uploaded on the SE sites are hosted on . Are these images stored somewhere else too? I mean, is there some sort of backup plan for restoring them? What happens if  goes bankrupt or something bad happens to it?


String str = "hello";     String s = str;      System.out.println(str==s);      String str2 = new String ("world");     String s2 = str2;     System.out.println(str2 == s2);      String str3 = str + str2;     String str4 = "helloworld";     String str5 = new String ("helloworld");     System.out.println(str3 ==str4);      System.out.println(str3 ==str5);  Output true true false false Can anyone explain to me the output of the above program snippet in Java?

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


i try to have the meta charset set to UTF-8. It do work for the base.html.twig file :  <meta charset="UTF-8"> <title>{% block title %}Welcome!{% endblock %}</title> {% block stylesheets %} ... <link rel="stylesheet" href="/css/app.css"> {% endblock %}    As you can see my navbar wich is located into this file is correctly reading special char with accent :  But it's not working when i'm on a file that extend the base.html.twig :  Here it is the code of the file that extend base.html.twig {% extends "base.html.twig" %}  {% block body %}

         <form>

                          Accéder à tous nos produits

                          Gestion du stock

         </form>

 {% endblock %}  As you can see the character é and à are displayed with a <?> If i add the meta charset into the second file : <meta charset="UTF-8">  It work, but i don't want to add this to all my file ! I'm suppose to extends base.html.twig so... Could you please explain me why it seams to fail ?

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


I have a 600 pages long pdf file. I would love to be able to split it in different pdf files, one containing odd-numbered pages: 1,3,5,7,9,11 etc. and another file containing even-numbered pages: 2, 4, 6, 8, 10 etc.  Could anyone help me create something like that ?

I have a PDF that consists of several hundred pages of bilingual text. Since I need to use OCR on each language separately, I want to grab the even and odd pages and make two separate PDFs, using convert or ghostscript. The language I want to do first is on the odd-numbered pages. What convert or ghostscript command can I use to grab these and write them to a new file?


A few folders appeared in my hard drive ("D:\Music" is one of them), and I can't delete them. I tried to go to Security properties and change the owner, but got "Owner cannot be displayed". When I try to change it, it says that "you do not have permission to view or edit". The same happens with trying to give Administrator privileges. I tried:  del "\\?\D:\Music\" the trick with WinRar by checking "Delete files after Archiving" through CMD → run as administrator → attrib -S -H -R "D:\Music\*.*" /S and attrib -S -H -R "D:\Music\" /S rd /S /Q "D:\Music" also failed  Nothing works. Can anyone help me?

I downloaded a file from the internet (I can link to it here, but in the interests of not annoying other users, I won't post the link), and I can't delete the file with the message:   You need permission to perform this action  You require permission from the computer's administrator to make changes to this file   Trouble is, I am the administrator and UAC is completely off.  If I go into the Properties/Security tab, I get the message   You do not have permission to view or edit this object's permission settings   Clicking "Advanced"/Owner, it says:   Current owner: Unable to display current owner.   If i try to change the owner, I get the same message:   Unable to set new owner on file  Access is denied.


So I have this code:  def validate_username(username):     find_username = cursor.execute("SELECT username FROM user WHERE username = ?", (username, ))     if find_username.fetchone() is not None:         username_is_valid = False         invalid_reason = 'Username already exists'     elif len(username) > 255:         username_is_valid = False         invalid_reason = 'Invalid format'     elif not match(r"[^@]+@[^@]+\.[^@]+", username):         username_is_valid = False         invalid_reason = 'Username must be an email address'     else:         username_is_valid = True         invalid_reason = None     return username_is_valid, invalid_reason   So obviously, it will return one of those:  (False, 'Username already exists') (False, 'Invalid format') (False, 'Username must be an email address') (True, None)   Now what I want to do is to pass those two arguments into variables so that they can be reused, printed, etc. but for some reason I can't really find how to do it online; I'm assuming because I don't word my question properly. Maybe someone here can provide some guidance?  Basically the goal here is to run the function with the username, then if the username is invalid, print why it's invalid and if it's valid, then proceed further.

The canonical way to return multiple values in languages that support it is often . Option: Using a tuple Consider this trivial example: def f(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return (y0, y1, y2)  However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget which value is where. It's also rather ugly to unpack them wherever you want to receive them. Option: Using a dictionary The next logical step seems to be to introduce some sort of 'record notation'. In Python, the obvious way to do this is by means of a dict. Consider the following: def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return {'y0': y0, 'y1': y1 ,'y2': y2}  (Just to be clear, y0, y1, and y2 are just meant as abstract identifiers. As pointed out, in practice you'd use meaningful identifiers.) Now, we have a mechanism whereby we can project out a particular member of the returned object. For example, result['y0']  Option: Using a class However, there is another option. We could instead return a specialized structure. I've framed this in the context of Python, but I'm sure it applies to other languages as well. Indeed, if you were working in C this might very well be your only option. Here goes: class ReturnValue:   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return ReturnValue(y0, y1, y2)  In Python the previous two are perhaps very similar in terms of plumbing - after all { y0, y1, y2 } just end up being entries in the internal __dict__ of the ReturnValue. There is one additional feature provided by Python though for tiny objects, the __slots__ attribute. The class could be expressed as: class ReturnValue(object):   __slots__ = ["y0", "y1", "y2"]   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  From the :  The __slots__ declaration takes a sequence of instance variables and reserves just enough space in each instance to hold a value for each variable. Space is saved because __dict__ is not created for each instance.  Option: Using a  (Python 3.7+) Using Python 3.7's new dataclasses, return a class with automatically added special methods, typing and other useful tools: @dataclass class Returnvalue:     y0: int     y1: float     y3: int  def total_cost(x):     y0 = x + 1     y1 = x * 3     y2 = y0 ** y3     return ReturnValue(y0, y1, y2)  Option: Using a list Another suggestion which I'd overlooked comes from Bill the Lizard: def h(x):   result = [x + 1]   result.append(x * 3)   result.append(y0 ** y3)   return result  This is my least favorite method though. I suppose I'm tainted by exposure to Haskell, but the idea of mixed-type lists has always felt uncomfortable to me. In this particular example the list is -not- mixed type, but it conceivably could be. A list used in this way really doesn't gain anything with respect to the tuple as far as I can tell. The only real difference between lists and tuples in Python is that lists are , whereas tuples are not. I personally tend to carry over the conventions from functional programming: use lists for any number of elements of the same type, and tuples for a fixed number of elements of predetermined types. Question After the lengthy preamble, comes the inevitable question. Which method (do you think) is best?


I would like to run an update as below on a 100 million row table in batches so as to not cause locking/without downtime and not affecting replication.  Update tbl     set col_new = col where (do 1 day at a time) perform pg_sleep(120);   col is timestamp without time_zone, col_new is timestamptz  Can someone help me with the syntax?

I have a table with approximately one million rows.  It is being used in production and I ran an UPDATE which covers ~95% of those rows.  After five hours I cancelled the request because it was taking so long.    The table has an auto-incrementing ID column, so I tried extending the WHERE condition of my query to include id BETWEEN 1 AND 500.  This update completed in approximately two seconds. I then manually iterated up through the id in batches of 500, e.g. BETWEEN 500 AND 1000, then BETWEEN 1000 AND 1500.  At this rate it will require 2000 batches of 500 to update the whole table.  Updating 2000 batches at 2 seconds each is just over an hour.    My questions are:    What reasons are there for this difference? I don't care about transaction isolation, so is there a way to simulate this 'update in batches', without having to script the 2000 updates to run separately.


I have a lot more experience with the Windows Firewall with advanced functionality than I do with IPTables. With the WFAF, I was able to lock down a program so that it could only connect over specific ports via specific protocols to specific IP addresses (as opposed to basically just saying "outgoing connections on port 80 are fine.") I'm not sure how I can duplicate that with IP tables. Can anyone provide some quick and dirty tips? Like, let's say I wanted firefox to only be able to use ports 80 and 443, what would I do?

I've been reading around but can't seem to find a way to create per-process firewall rules. I know about iptables --uid-owner but that only works for outgoing traffic. I've considered scripting netstat and iptables but this seems terribly inefficient since if a process is only active for a small time-frame the script might miss it. Basically I want to enforce specific restrictions regarding port and dst on a process while leaving other processes unaffected. Any ideas?    For reference selinux can do exactly this and it works fairly well. Setup is a bit of a pain though.


Once in a while after I try to open a page I see . Usually this page only shows up once in a while and doesn't account for a permanent problem. So it would be nice to be able to try to open the original page again.  The URL for that page sort of contains the original URL - it looks like this  https://stackoverflow.com/error?aspxerrorpath=/OriginalSubPathITriedToOpen   so I can technically edit it in the "URL" field in my browser and try to reopen the page, but this is not very convenient (but definitely ).  Could you please provide a "you can retry this request" link the same way as  page?

Currently I have to manually remove the /error?aspxerrorpath= part from the address to try again. And right now a lot of Oopses happen!


Say I have a collection of $n$ random variables $X_i$ that don't necessarily have any special properties like independence or identical distribution.  Is it true in general that $\text{Var}\left(\sum_{i=1}^n a_iX_i\right)=\sum_{i=1}^n\sum_{j=1}^n a_ia_j\text{Cov}\left(X_i,X_j\right)$, where the $a_i$ are constants?  I got to that equation by looking at the formula $\text{Var}\left(aX+bY\right)=a^2\text{Var}\left(X\right)+b^2\text{Var}\left(Y\right)+ab\text{Cov}\left(X,Y\right)$, viewing variance as a special case of covariance, and thinking about adding successively more variables.  If so, it looks like I could calculate the variance of a sum of random variables by adding up all the elements in their variance-covariance matrix--which would be interesting, since the combination of random variables itself is just a one-dimensional thing.  I think it clearly holds in the two-variable case, but I didn't find any discussion on the topic in the case of $n$ variables.

Let $X,A,B,C,D$ be time-series variables and the covariance between any two pairs of these are known.  Suppose we want to find $\textrm{cov}(X,aA + bB + cC + dD)$, where $a,b,c,d$ are constants.  Is there any way of doing this without expanding out $E[(X-E[X])(aA+......)]$?


Does anyone know the equation of a 3-Dimensional egg. Like a real egg( the uneven type where it is more wide on one side), not an ellipsoid in 3D cartesian form.I can't seem to find it anywhere, I mean there is one even for the heart in 3D, so there should be one for an egg right?

This morning, I had eggs for breakfast, and I was looking at the pieces of broken shells and thought "What is the surface area of this egg?" The problem is that I have no real idea about how to find the surface area.    I have learned formulas for circles, and I know the equation for an ellipse; however, I don't know how to apply that.   The only idea I can think of is to put an egg on a sheet of paper and trace it, and then measure the outline drawn, and then try to find an equation for that ellipse and rotate that about the $x$-axis.  Now, my problem is how I can find the equation of the ellipse from the graph, and will my tracing method really be the edge of the egg?  Also, can I use the ? Will I have to use some techniques to solve the integral that are not covered in the ?  There has to be a better method for finding the surface area. Please, help me understand how to find the surface area of an egg; i.e., how to use my mathematical knowledge for something other than passing exams.


i know a lot of differences between pc and console version but i dont know any difference between mobile and xbox360/ps3. is there any difference?

I love the game Terraria for PC and played it for ages. Now I saw Terraria on the PS3-Store and gave it a shot. After some wandering around I saw something like a snow-biome and realised later on, that I was on a floating Island. I haven't played much of Terraria the last months, but this stuff seems kind of new. In addition I haven't found the (current) differences between the PC and the Consoleversion. Is there just one (upcoming?) Patch missing on the PC? What's included or - like the title said - what are the current differences (besides the splitscreen-feature of course)?


If we flip a fair coin $10$ times, what is the probability we get $\ge 4$ consecutive heads?  An approach would be to consider the probability of all consecutive heads, cut off by tails, e.g.,  HHHHTxxxxx  THHHHTxxxx  ...  HHHHHTxxxx  THHHHHTxxxx  ...  but this is complicated, and also has a problem that some patterns overlap (e.g., HHHHTHHHHT). Is there a simpler way to do this?

Tossing a fair coin for $N$ times and we get a result series as $HTHTHHTT\dots~$, Here '$H$' denotes 'head'  and '$T$' denotes 'tail' for a specific tossing each time.  What is the probability that the length of the longest streak of consecutive heads is greater than or equal to $k$? (that is we have a $HHHH\dots~$, which is the substring of our tossing result, and whose length is greater than or equal to $k$)  I came up with a recursive solution (though not quite sure), but cannot find a closed form solution.  Here is my solution.  Denote $P(N,k)$ as the probability for tossing the coin $N$ times, and the longest continuous heads is greater or equal than $k$. Then (For $N>k$)  $$ P(N,k)=P(N-1,k)+\Big(1-P(N-k-1,k)\Big)\left(\frac{1}{2}\right)^{k+1}   $$


How does one create (in a view) a list of the children (2nd, 3rd or 4th level) of a taxonomy vocabulary? In other words, if I want to display ONLY the 3rd level down of a parent term. Is that possible? Thanks. :)

I have spent days trying to determine a clean way to do the following:   Display a list of all top-level terms in a vocabulary with links to their child terms Upon clicking a link, be taken to a list of the children of those terms.  Ad infinitum until the lowest-level term, for which a list of nodes tagged with that term will be displayed.    This seems like it would be pretty commonly-needed functionality but I can't find any solution that can handle arbitrary depth, particularly if not all term trees  descend to the same depth.  An ideal solution would be one that uses Views 3, Contexts, EntityFieldQueries, or anything else that's well-supported in Drupal 7.  I'm able to do almost exactly what I want by making a simple view with three node:term relationships (term, term's parent, and term's parent's parent) and user those for sequential contextual filters. The only problem with this is that if there's a node with a termpath of too little depth, it gets listed as "uncategorized" and generates a dead link. Instead of doing that I'd like it to link to the next child term available.


Does a simple pendulum come to stop due to the action of gravity ?  Consider : No air drag, No change in place.

I am attempting to settle a friendly bet.  Would a pendulum swing indefinitely in a hypothetical vacuum (i.e. no air resistance) having a hypothetical frictionless bearing (i.e. no energy lost due to friction) assuming the following   The frictionless vacuum is on Earth (9.8 m/s^2). The pendulum is already in motion and no other external forces other than gravity act on the pendulum.


I'm doing bachelor's in Physics and in 3rd semester the professor introduced Mathematical methods with us, which seemed like a great book at first but by the time we started a chapter on Tensor analysis, I realized I couldn't understand after that. Same goes for other students. Somehow I managed to get an A+ but now we have the second volume of the book and it's just too hard to understand.  Is there like a book or books that explains the mathematics in much more detail? I've studied Vector analysis and ODEs but the chapters on Matrices and group theory and series are still a blur.

What are the best textbooks to read for the mathematical background you need for modern physics, such as, string theory?  Some subjects off the top of my head that probably need covering:   Differential geometry, Manifolds, etc. Lie groups, Lie algebras and their representation theory. Algebraic topology.


I have just learnt quantum physics in school and learnt the concept of wave-particle duality. But I still have trouble understanding what the de Broglie wavelength is. What does it mean for a particle to have wavelike properties? If everything is a wave then why don't we just phase through one another? There's also a question asking you to calculate the de Broglie wavelength of the moon around earth and an electron around an atom and asking you why you can consider the moon as a "particle" but not the electron. I don't really get the answer of "wavelength significantly smaller than the orbital radius, therefore moon is a particle vice versa" though :( Why is it that wavelength being significantly smaller than the radius mean that it is a particle?

I often hear about the wave-particle duality, and how particles exhibit properties of both particles and waves. However, I wonder, is this actually a duality? At the most fundamental level, we 'know' that everything is made up out of particles, whether those are photons, electrons, or maybe even strings. That light for example, also shows wave-like properties, why does that even matter? Don't we know that everything is made up of particles? In other words, wasn't Young wrong and Newton right, instead of them both being right?


led me to  which have a bunch of explanation on email validation. The last regex seems the most accurate and recommended. I've searched SO for this regex but the implementations I found slightly differ.  I would like to test the following regex provided on the website with my current set of emails and make some tests.  I tried to make the title and this question as precise as possible (for you and the search engines), feel free to suggest edits.  The regex in question is the following:  \A(?=[a-z0-9@.!#$%&'*+/=?^_`{|}~-]{6,254}\z)  (?=[a-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}@)  [a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)* @ (?:(?=[a-z0-9-]{1,63}\.)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+   (?=[a-z0-9-]{1,63}\z)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\z   I escaped the / characters but it still doesn't seem to work for some reason.  My goal is to use this regex like so:  const regexEmail = new RegExp("...")   I created a sandbox for this regex available on , but the email address is not found.  I am no pro at regex and usually get only pre made stuff. The help of this community is greatly appreciated.

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


As far as i know we do not need to add "never" because ain't is already have a negative meaning.

I know the ultimate meaning of this is "I have no money."  But why? If ain't means have not, then isn't it true that "I ain't got no money" would be read as "I have not got no money"?  Can I have not got [no money] be interpreted as double negative, and hence determining that "I have money", which is not the true meaning of such saying?


I read in java basics while instantiating object we should use same class name as constructor with parameter firefox which means webdriver driver= new webdriver(FirefoxDriver) then how come we are using  Webdriver driver = new FirefoxDriver()  kindly explain

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


Is there a difference between defining an unnumbered equation with  Option 1:  \begin{equation*} ...  \end{equation*}   versus  Option 2:  \[ ...  \]   If there are differences, they are not apparent in my use of the commands.

I once learnt, that it is uncool to use $$, but why is that? Why does \[ not act as a abbreviation to \begin{align}? I noticed, that there is a difference, since one cannot use & and \\ inside a block started with \[.


I have a model i wanna sell on CGTrader, and i know some people might be using different software like 3DS Max or Maya, so i want to make my blender model available to all software. one of my objects on the model is using a glossy shader to create a silver look. i don't know if maya has a glossy shader, so would it be smarter to go with something every software has, textures? should i use a metal texture or a glossy shader? which one is applicable to most software? is there a glossy shader in other 3d software?

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


I have a column criteria which contains below similar text in each of its row:-  inclusion : ajjsdijd sdsjdjs ieroeito trorg inclusion sdkjwedk  exclusion : sdkjwdowek  ksdldk exclusion skdkefk kfkwkfwe    I want to extract the text between first inclusion and exclusion occurance. So, here i want result as   ajjsdijd sdsjdjs ieroeito trorg inclusion sdkjwedk   Also, I want to extract the text after first exclusion keyword:  sdkjwdowek  ksdldk exclusion skdkefk kfkwkfwe    I am currently using below PostgreSQL but this creates issue and picks text between first inclusion and last exclusion..  substring(lower(criteria) from 'inclusion(.+)exclusion') substring(lower(criteria) from 'exclusion(.+)')

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


I'm using NetBeans to build a java project, I try to read every error shown in the console and put it in frame to be shown to user. I searching for a way to do that I found Console c=System.console() to take every output written in console so I try first to test this command by read errors and put them in a file    if(c.readLine().equals("")){         System.out.println("OK!!!");     }else{          System.out.println("not OK!!!");         try {          FileWriter myWriter = new FileWriter("Error.txt");          myWriter.write(""+c.readLine().toString());          myWriter.close();          System.out.println("Successfully wrote to the file.");       } catch (IOException e) {          System.out.println("An error occurred.");          e.printStackTrace();        }     }   But I get this error exceptionException in thread "AWT-EventQueue-0" java.lang.NullPointerException  And this error exception still even after I put System.out.println("Something here");in main project to see if this exception shown because I don't put nothing in console but gone when I scanner something in console, but this is not what I looking for so how can I read error from console?

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?


Recently, I asked a question on stack exchange, to check if something I am working on was already done. I myself could not find this specific thing, so I asked the community.   Then, a discussion about my problem followed, and some people provided (possibly inaccurate) proofs. Independently, I figured out a proof by myself.  Now, I want to publish the proof of my result. Is this ok? Can I post this on Stack Exchange and then still publish it?

Sometimes we may ask questions on stack exchange or online forums wherein the response is helpful or even essential to a piece of work that gets published in an academic journal. If this occurs, how should credit be given to those involved in the exchange? Should they all be included as authors? Should a link to the forum be included as a reference in the paper?  Once something is in a stack exchange or forum, it's "published". Perhaps in the future, the current peer review model will transform into people writing blogs and posting in forums and databases. But for now, how might this issue be dealt with while forums, blogs, etc coexist with journals?


Blender version: 2.9 and above (but probably going back to 2.8). Workflow:  Object linked from separate file. Library Override added to linked object Modifier added to override object Python Script attempts to remove said modifier  Resulting error: Operator bpy.ops.object.modifier_remove.poll() Cannot edit modifiers coming from linked data in a library override | Error in execute function of DeleteArray  I'm struggling with this, because the same modifiers I'm trying to remove via Python, but can't, I can manually delete in the user interface.

Lets assume you have 1 object with 4 modifiers added to it. I am curious how one would approach the task to apply all or to delete all modifiers of a just selected object that has many modifiers already added.  The console reads out the modifier delete as  bpy.ops.object.modifier_remove(modifier="Box Right ")   So "Box Right " I might have to replace with something like active.object.modifier.name and then work each modifier off?  This would be very helpful when you want to generate a static mesh for animation or 3D printing.


Is there a word or phrase to express the idea of a group of people and the speaker, collectively, where the group of people is explicitly not the people who are being spoken to?  For example, consider the hypothetical situation where I am a representative of a country and I wish to talk about my country by saying we, us, and our.  Also consider that I am talking to group of other country representatives (the U.N. would be a good example) and that I need to go back and forth from addressing the group to addressing my country as a group.  In this scenario, I wish to use non-ambiguous pronouns for my country.  Is there a word or phrase that can help express this idea?

In English, "we" has no  - context is needed to determine whether it means we-including-you or we-excluding-you.  What context can a speaker provide to disambiguate without sounding awkward?  I'm wondering in particular how to reword sentences like "We need to meet tomorrow."


Use the triangle inequalities to prove that:  $$\frac{|a+b|}{1+|a+b|}\le\frac{|a|}{1+|a|} + \frac{|b|}{1+|b|}$$ for all $a,b\in\mathbb{R}$.  I've made it this far, but it doesn't seem to be helping much; what I end up with at the end isn't very useful:    Clearly I'm taking a wrong turn somewhere, but I'm not sure what else to try.  Any advice?

Is $\frac{\vert x+y\vert}{1+\vert x+y\vert}\leq\frac{\vert x\vert}{1+\vert x\vert}+\frac{\vert y\vert}{1+\vert y\vert}$ true for all $x,y\in\mathbb{R}$?  If not, how can I prove that $\int\frac{\vert f-h\vert}{1+\vert f-h\vert}\leq\int\frac{\vert f-g\vert}{1+\vert f-g\vert}+\int\frac{\vert g-h\vert}{1+\vert g-h\vert}$? I tried C-S: $$\sum_{cyc}\frac{|x|}{1+|x|}=\sum_{cyc}\frac{x^2}{|x|+x^2}\geq\frac{(x+y)^2}{x^2+y^2+|x|+|y|}.$$ Thus, it's enough to prove that $$\frac{(x+y)^2}{x^2+y^2+|x|+|y|}\geq\frac{(x+y)^2}{|x+y|+(x+y)^2}$$ or $$|x+y|+(x+y)^2\geq x^2+y^2+|x|+|y|,$$ which is wrong for $(x,y)=(1,-1).$


If we observe the formula $E=hf$ which solved the ultraviolet catastrophe. We know that before Planck proposed the solution to the ultraviolet catastrophe, light was considered as continuous stream of energy.   But Planck discovered that light is made of individual packets of energy, at the rate of $hf$, which can only be absorbed, or emitted, in quite discrete amounts.  But my question is that if light is made up of quanta, one quantum of electromagnetic energy is called a photon. Then how can photons have a frequency since photon is a particle. So how can the formula $E=hf$ be used?

in classical physics frequency represents how many cycles in one unit time, but I do not know how we define a frequency for a particle? what does it mean for a particle to have a frequency, the book I read it from just says Energy is proportional to the frequency of the photon but where is frequency?


I'm trying to publish a satellite raster (.tif) into GeoServer and display it in a web application using OpenLayers. I tried to use many procedures but without any good results. This is the original raster :  I tiled the raster and made a TileWMS call here is the result :  If I make a Image call :     This is the result of gdalinfo if it helps :   Driver: GTiff/GeoTIFF Files: image.tif   Size is 11517, 13539   Coordinate System is:   PROJCS["IMAGINE GeoTIFF Support   ERDAS IMAGINE 2018  16.5.0.376   Projection = Lambert Conformal Conic",       GEOGCS["Merchich",           DATUM["Merchich",               SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,                   AUTHORITY["EPSG","7011"]],               AUTHORITY["EPSG","6261"]],           PRIMEM["Greenwich",0],           UNIT["degree",0.0174532925199433],           AUTHORITY["EPSG","4261"]],       PROJECTION["Lambert_Conformal_Conic_2SP"],       PARAMETER["standard_parallel_1",34.86645766666667],       PARAMETER["standard_parallel_2",31.72392566666667],       PARAMETER["latitude_of_origin",33.3],       PARAMETER["central_meridian",-5.4],       PARAMETER["false_easting",500000],       PARAMETER["false_northing",300000],       UNIT["metre",1,           AUTHORITY["EPSG","9001"]]]   Origin = (797632.239454125985503,491944.985518844972830)   Pixel Size = (0.512510120364827,-0.512510120364827)   Metadata:     AREA_OR_POINT=Area     TIFFTAG_MAXSAMPLEVALUE=2018     TIFFTAG_MINSAMPLEVALUE=1     TIFFTAG_RESOLUTIONUNIT=1 (unitless)     TIFFTAG_SOFTWARE=IMAGINE TIFF Support   Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved   @(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date: 2004/09/15 18:42:01EDT $     TIFFTAG_XRESOLUTION=1     TIFFTAG_YRESOLUTION=1   Image Structure Metadata:     INTERLEAVE=PIXEL   Corner Coordinates:   Upper Left  (  797632.239,  491944.986) (  2d 8'23.51"W, 34d59'20.20"N)   Lower Left  (  797632.239,  485006.111) (  2d 8'32.05"W, 34d55'35.15"N)   Upper Right (  803534.819,  491944.986) (  2d 4'30.91"W, 34d59'14.16"N)   Lower Right (  803534.819,  485006.111) (  2d 4'39.62"W, 34d55'29.11"N)   Center      (  800583.529,  488475.548) (  2d 6'31.52"W, 34d57'24.67"N)   Band 1 Block=11517x1 Type=UInt16, ColorInterp=Gray     NoData Value=2.13054804926827954e-53   Band 2 Block=11517x1 Type=UInt16, ColorInterp=Undefined     NoData Value=2.13054804926827954e-53   Band 3 Block=11517x1 Type=UInt16, ColorInterp=Undefined     NoData Value=2.13054804926827954e-53   Band 4 Block=11517x1 Type=UInt16, ColorInterp=Undefined     NoData Value=2.13054804926827954e-53   EDIT : The question was marked as a duplicate of  one but I don't think it is because I don't know if we have the same problem, since the other post doesn't contain more details

I am using Geoserver to upload and display GTiff images in OpenLayers. The images are unsigned 16 bit grayscale at about 300MB size and are processed to to give better performance using the methods .  When viewing the images in OpenLayers it changes darkness when zooming in/out and from what I understand this is coming from the ContrastEnhancement property in the style script (SLD).  This is not necessary with the images I have and are only lowering the performance.   Is it possible to disable this altogether?  Changing from Normalize to Histogram in SLD makes it better, but now black values for some reason will be treated as no-value and become transparent when zooming in.  I am fairly new with GeoServer.


I am creating a model the will iterate through the feature classes in the dataset.   It will select attributes from each feature class, the only issue is, two of the feature classes will cause a break in the process due to being void of the attribute.   Is there a way to exclude the two said feature classes from the iteration?

I have a model that has two preconditions, in which I need to figure out if there is a way to prioritize one precondition to 'run' prior to the second. Is anyone aware of any built-in ability to do so with Model Builder or that can suggest a work around?  For instance, if I try to 'link' one precondition to another, I get the error "Can only connect a variable to a process", this is because my 'output' has a precondition that a python script needs to be run against it first, and then that output has the second precondition executed (but only once the original output has been altered by the Python script).


Minecraft game apps on iOS and Android are both now simply labeled as "Minecraft."  Can these connect to standard Minecraft and PaperMC servers or is some other plugin/module to modify something like PaperMC to work with these mobile editions of Minecraft? I'm thinking that they've dropped the "Bedrock" and "PE" nomenclature, but it still may exist and is simply confusing in this respect...

My kids are playing Minecraft on 2 PCs, creative mode.  They are connected by the way of one of them starts a single player game on the other one than joins that game over the LAN.  Can I, using Minecraft PE on my iPad, join their game as well?


Basically, I need to remove the 'cache' part of request headers when requesting a particular static resource (a pdf).  Is this possible to achieve?  A bit more context:  I'm comparing two calls to a file (calls as in assigning the path of pdf to a src attribute of an iframe). One works, one doesn't. Using fiddler2 I've had a look at the traffic and it appears that the only difference is that the request headers of the request that doesn't work includes If-Modified-Since in the 'cache' part of it's headers. If I can remove this I think it'll solve the issues I'm having as I understand caching and iframes displaying pdfs can be potentially problematic. If I'm wrong, and it doesn't solve it, I'll at least have ruled that out as a problem.  EDIT: This is a problem exclusive to IE 8 if that's any help:

Our investigations have shown us that not all browsers respect the HTTP cache directives in a uniform manner.  For security reasons we do not want certain pages in our application to be cached, ever, by the web browser. This must work for at least the following browsers:   Internet Explorer 6+ Firefox 1.5+ Safari 3+ Opera 9+ Chrome   Our requirement came from a security test. After logging out from our website you could press the back button and view cached pages.


This a continuation to the . Got compile error  g++ -fpermissive -std=c++11 te2b.cc te2d.cc /tmp/ccUVm8OV.o: In function `notify(std::string, int)': te2b.cc:(.text+0x80): undefined reference to `void notify<char const*>(char const*, char const*&&)' /tmp/ccUVm8OV.o: In function `main': te2b.cc:(.text+0xe6): undefined reference to `void notify<int>(char const*, int&&)' collect2: error: ld returned 1 exit status   Guess my extern for a template function was not declared right, don't know how to correct it. Any ideas?  Thanks!  ====== te2b.cc======  #include <vector> #include <iostream> #include <unordered_map> #include <stdarg.h> using namespace std;  extern char notifyBuf[]; template <typename ... Ts> extern void notify(const char* format, Ts&&... args); void notify(string s, int maxSize=0) {     if (maxSize && (maxSize < s.size())) {         s.erase(maxSize);     }     printf("second invokation\n");     notify("%s\n", s.c_str()); } int main(int argc, char *argv[]) {     string s = "hi tom";     //notify(s);     notify("hi %5d \n", 89);         printf("%s\n", &notifyBuf[0]);     notify(s, 5);     printf("%s\n", &notifyBuf[0]);     return 0; }   ====== te2d.cc =======  #include <sys/shm.h> #include <malloc.h> #include <unordered_map> #include <string> #include <iostream> typedef unsigned char uchar; typedef unsigned short uint16; using namespace std;  char notifyBuf[0x100000] = "s"; template <typename ... Ts> void notify(const char* format, Ts&&... args)  {     sprintf(&notifyBuf[1], format, std::forward<Ts>(args)...); }

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


Somewhere (in some book) I have read and added to my notes following definition:     Given a set $X$ a semi-algebra is a subset $\mathcal{S}\subseteq \mathcal{P}(X)$ such that         $X\in\mathcal{S}$;   for all $A,B\in\mathcal{S}$, then $A\cap B\in\mathcal{S}$; and   for all $A\in\mathcal{S}$, then there are finitely many $A_k\in\mathcal{S}$ such that $A^C=\bigcup_{k=1}^n A_k$ with disjoint union.      I can't find anything about it using search engines, thus the defined object must have some other, more official, name. Any idea?

I am wondering if someone could help me with basic properties of semi algebra. We say that $S$ is a semi algebra of subsets of X if    $\emptyset \in S$ If $P_1$, $P_2 \in S$, then $P_1 \cap P_2 \in S$   If $P \in S$, then $X \backslash P$ can be written as a finite union of  sets from $S$.   But I am finding that sometimes it is defined using the following 3' instead of 3.  3'. If $P \in S$, then $X \backslash P$ can be written as a disjoint finite union of  sets from $S$.  My question is are these definitions equivalent? If so can someone please show me how we can obtain 3' from the first three conditions?  Thank you.


When I first got my bike, I had the saddle too low and I experienced some pain in my right knee while riding.  I seem to have "fixed" this problem by raising it some.  However, that got me thinking... what would happen if I raised it even more so that my legs would be straight (not bent at the knee) when the pedal was at the bottom?  Would this give me increased power?  Have power tests been done to verify what level of leg extension produces the most power?  Are there any problems allowing your leg to fully extend (straighten)?  I may try this sometime but wanted to get some info here first.  I asked someone at the local bikeshop and they told me there is a chance of hyperextending if I do that but I asked myself how if the position is fixed?  I think the general rule is to have a little bit of knee flex while the pedal is at the bottom but maybe that is a guideline and not a "hard" rule.   I wanted to add that I don't use any fancy riding shoes or any clips.  Just regular "street" shoes. Also, my typical longest ride in a single day is only about 10 miles max.  That translates into about a little over 1 hour at an average speed of less than 10 MPH.  Also, I am not sure why some people might say it is "bad" to straighten your leg totally when riding cuz when we walk we have alternating straight legs so why not the same when we ride a bike?  When we lift a heavy object off of the  floor, the hardest part is when our legs are bent the most, indicating that is the most inefficient position.  When our legs are nearly straight it is much easier for us to lift weight such as a heavy box that is already at waist height for us.

I was wondering, for a correctly sized mountain bike, or hybrid, should I be able to place my foot flat on the ground, when I sit on the bike seat?


Could somebody explain me how to sum the following series $$ (x-1) + (x-2) + ... + 1 = ? $$ I got above series as a part of equation and was wondering how to simplify it. As a matter of fact, we have arithmetic progression here which can be easily summarized. I used  to calculate the sum like . However, Wolfram did something which I don't understand. It simplified the equation and gave me the following result: $$ \sum_{k=0}^{x} \big(1-k \big) = -\frac{1}{2} (x-2)(x+1) $$ Don't see how to get the right-hand side of the sum. It looks like there is a theory behind the scene, but I don't know where to start looking from. My guess is it somehow connected with generating functions, but I'm not sure. Can somebody hint me?

Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$.  How? What's the proof? Or maybe it is self apparent just looking at the above?   PS: This problem is known as "The sum of the first $n$ positive integers".


Let us have two matrices: $A,B$ which are both $n$ x $n$ type, and $AB+A+B=0$ stands. Prove, that in this case, $AB = BA$.  I tried to do such matrices, and the statement stands, but how should I do a proving in general? Thanks!

Given matrices $A$ and $B$, where that $AB = A + B$, prove $AB = BA$. I keep coming up with AB = AB. It seems like basic algebra, but for the life of me, I'm getting nowhere :/. Someone help please?


Suppose I want to tabulate file  as follows. \documentclass{article} \usepackage{csvsimple,longtable} \begin{document} %https://fred.stlouisfed.org/graph/fredgraph.csv?id=WILL5000INDFC \csvautolongtable{WILL5000INDFC.csv} \end{document}  Can I read it remotely during compiling? Or can I automatically download and include it during compiling?

I am using PHP on my server to create a latex table from a database, which is working fine.  The problem I have now is getting that into my latex document.  I thought that giving it the path would allow it to get the file from the web and input it like normal but that doesn't work and I've been unable to find anything online about doing this sort of thing.  Here is an example of what I'm trying to accomplish:  \documentclass{article} \begin{document} \input{http://example.com/generated-latex.php} \end{document}


I have bee months trying to revive a PC that is so old, people that I told about it just say to junk it. But I believe that there is a Linux OS out there that can help me out.  The Type of PC that I'm trying to Revive is a 2001 Gateway Desktop with an Intel Pentium 4 processor. The Processing speed is 1.50Gz, and the System Bus Speed is 400MHz. The Cache RAM is 256KB and the total Memory with a friend's Driver that I installed on it is 512MB but 256MB with the one it came with. It also runs on Windows xp but the OS is messed up. Its so slow that I booted up Lubuntu up there once (and that was my only time), and it was lagging a lot. I tested on my laptop (HP AMD Turion 64x2 with 2GB RAM), and it worked perfectly. Ubuntu or any OS Linux can I install on my computer?

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


I am DMing an homebrew DND 5e adventure. My players are going to defend a village from an orc tribe.  The village will have around 100 armed farmers. Players also gained support of a local dwarven mining expedition (around 30 dwarves), and freed an enslaved kobold tribe from the orcs (about 15 surviving kobolds).  The village will be defended by 100 farmers, 30 dwarves and 15 kobolds against 50ish orcs and 30ish goblins.   They don't know the exact numbers, I will adjust depending on how they will prepare for this.  I took a look at Unearthed Arcana mass combat, but I think it's unlikely to be fun, interesting or balanced for this type of battle.   Some flaws I've identified in Unearthed Arcana for my case:    With units compromising of max 25 units, BR ratings will be extremely low. Most units would be hit once and be dead, or not be hit and nothing happens. For example a unit of 15 orcs (BR 3) against a unit of 20 armed farmers (there is no CR for farmers.. but I would say 1/4, so 20 farmers will have 2 BR) would have a big chance of dying in one hit without causing any damage.  Having 2 or 3 BR will be a huge difference due to the fact that units will either deal 2 BR damage or 5 BR damage. So if a units have 3 BR it has a chance of surviving an attack, while with 2 BR the unit either takes no casualties or is wiped. Movement and speed is multiplied by 10, range is not. This means that archer units will be forced to melee very quickly.   Most of the post about mass combat either suggest to use Unearthed Arcana Mass  Combat rules (which I don't want to use for the reasons above), or design small encounters and objectives around the battlefield.  While the second option could work, I would like to let the players actually command small units around the battlefield. They will spend a couple of sessions preparing traps and strategies to help them in the battlefield (pitfall traps, fires in the fields, ambushes..), and I think they would enjoy to see their result in a "battle" environment.  Is there any system that can let the players play out the battle, more suited to my case?

TL;DR;  I want to model a strategic battlefield fight for my players to command and participate. I'm seeking advice on how to model it mechanically so that it is exciting for the players.  Background  The final scene of Act II of my campaign is envisioned to be a big battle between the army of the Big Bad and the allied forces gathered by my players. The full set of Act II runs with the players gaining the allegiance of the different factions to support them on the fight.  Now, in terms of that final scene, I'm struggling to decide how to DM the fight. In games and movies the action is made epic by having cinematic scenes of the fight happening with cuts to our heroes doing their amazing things, be it just plowing through dozens of enemies in quick succession or fighting the big ugly overpowered monster that is otherwise cause havoc among the army. I want that feeling  The set up will involve an army of several thousand enemies agains the different forces gathered by my players. Depending on what they've done during the second act, they'll have more or less support with a minimum number of regiments belonging to several faction (i.e. the silver guard of Wizardwight).  Intended way of DMing the scenario.  What I've come up with is to have the players be military leaders. Draw the map of the battlefield and have them manage the battlefield strategically and tactically, distributing the units and, somehow, enabling a dice based mechanism to evaluate how well each unit is doing. This will transform the tabletop into something similar to Warhammer Fantasy. They can choose to join a particular place of the battlefield to help either together or separately.  I have absolutely no idea on how to model this mechanically (as far as I know D&D 5e does not cover this kind of fights).  Question:  What are good ways to mechanically model this kind of strategic army combat? Should I switch to a different system just for this scene or can I model this with D&D 5e?  Notes on level: At this point I expect my players to range between level 9-12 and for the party to be between 3 and 4 players (this is not a limitation of the campaign, more like the players I'm running the campaign with).


I know that ldd utility can list all libraries linked to a process but I want it the other way around. I want all processes linked to a library. I want to replace a shared library without crashing the system and make sure that the process reads the new library. A safe way is to check how many processes are using it and then shut them down using a script, replace the library and start them again.  I'll be really glad if there is a better way to do it. thanks in advance.

This command is doing the rounds for detecting currently running processes using glibc:  lsof | grep libc | awk '{print $2}' | sort | uniq   I find it intensely annoying, since /libc/ matches not only libc, but on my system:  /lib/x86_64-linux-gnu/libcap.so.2.24 /lib/x86_64-linux-gnu/libcgmanager.so.0.0.0 /lib/x86_64-linux-gnu/libcom_err.so.2.1 /lib/x86_64-linux-gnu/libcrypt-2.19.so /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcamel-1.2.so.45.0.0 /usr/lib/unity-settings-daemon-1.0/libcolor.so /usr/lib/unity-settings-daemon-1.0/libcursor.so /usr/lib/x86_64-linux-gnu/colord-plugins/libcd_plugin_camera.so /usr/lib/x86_64-linux-gnu/colord-plugins/libcd_plugin_scanner.so /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libcanberra-gtk3-module.so /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2.11301.0 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11301.0 /usr/lib/x86_64-linux-gnu/libcanberra-0.30/libcanberra-pulse.so /usr/lib/x86_64-linux-gnu/libcanberra-gtk3.so.0.1.9 /usr/lib/x86_64-linux-gnu/libcanberra.so.0.2.5 /usr/lib/x86_64-linux-gnu/libcap-ng.so.0.0.0 /usr/lib/x86_64-linux-gnu/libck-connector.so.0.0.0 /usr/lib/x86_64-linux-gnu/libcolordprivate.so.1.0.23 /usr/lib/x86_64-linux-gnu/libcolord.so.1.0.23 /usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3.0.1 /usr/lib/x86_64-linux-gnu/libcupsmime.so.1 /usr/lib/x86_64-linux-gnu/libcups.so.2 /usr/lib/x86_64-linux-gnu/samba/libcliauth.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli_cldap.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli-ldap-common.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli-nbt.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli_smb_common.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli_spoolss.so.0 /usr/lib/x86_64-linux-gnu/samba/liblibcli_lsa3.so.0 /usr/lib/x86_64-linux-gnu/samba/liblibcli_netlogon3.so.0   I understand that libc is used by pretty much everything, but I'd like to refine this command. Consider its applications for other libraries. How can I do this?  The flaw in this approach, in my opinion, is that the package providing libc may include a whole host of other shared library files (all of which may or may not be covered under the umbrella term that is the library name, like glibc, or libboost-python). Using a word boundary or - to mark the end of libc doesn't really fix this. This may not be a flaw, perhaps, as Braiam points out, since many or all of these .so files may link to a core file in which the flaw resides, as is the case for libc6 on Debian.   If a specific OS/distro is needed, assume Debian Linux.  Also annoying is that this command could be condensed to lsof | awk '/libc/{print $2}' | sort -u.


I skimmed over this question , and I'm currently under the impression that it's a widespread belief that the empty set contains itself. But a contradiction seems to arise: if the empty set contains itself, then it's NOT empty. After all, if we call a set non-empty just because it contains the empty set, then why should we treat the empty set itself differently?  Then it occurred to me that maybe mathematicians define "empty" differently in set theory. Maybe by "empty set" they mean a "set that contains only itself", instead of a "set that contains absolutely nothing".  Is my surmise correct?

In a  question, an answerer says:  an empty bag is a bag with nothing inside it.  Makes sense, but I'm reading a textbook right now that says:  The empty set has only one subset (namely, itself).  Which seems odd to me. If a set is empty, why would it contain a subset? Regardless of whether or not the subset is also an empty set, the "empty set" still contains a subset, so how is it really "empty"? To go back to the empty bag analogy, it just sounds like my text book is saying:  an empty bag is a bag with nothing but an empty bag inside it.  Which doesn't make sense because then the bag isn't empty. I can't wrap my head around this concept.


I am trying to split a string using regex on $ symbol but the output is not what I want. string = "43$hello" list_of_splits = re.split("$",string)  Output: ['43$hello','']  Output I want: ['43','hello']  It's visible by the output that "$" is a special character in regex, but now by how can I do this?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?