TeX's algorithms for "breaking paragraph into lines" and "setting the glue"

I want to learn more about the implementation of TeX's text-justification algorithm (setting the glue).   After scanning through ch.12 of Knuth's TeXbook, I'm guessing that setting the glue must consist in a constrained linear program   whose variables represent the interword glue, and whose constraints correspond to shrinks & stretches allowed for each interword glue.   However, if my intuition is correct, the linear program in question must get prohibitively large pretty quickly as the length of the document increases, at least, for computers back in the day. Does setting the glue use some heuristic instead?  EDIT: Thanks to egreg for his . However, I realise I should have included the paragraph-making algorithm in my question.  I'm still not quite clear on the interplay between   the paragraph-making algorithm (which, I presume, determines where line breaks occur), and the text-justification algorithm (which determines the interword glue).   It seems to me that the two problems are not independent. Does the paragraph-making algorithm, in the process of generating line break after line break, not use information about each glue item (natural width, stretch and shrink components), too?


What is the meaning of SuperClass s=new SubClass();?

Test.java  public class Test {      public void go(){                System.out.println("Test go");     } }   Test2.java  public class Test2 extends Test { public void go(){            System.out.println("Test 2 go"); }  public void back(){     System.out.println("Test 2 back");     }    }  class Demo{      public static void main(String[] args) {      Test t=new Test2();     t.go(); // Output : "Test 2 go"     t.back(); //Compile time error.   }   }   I read some issues on stackoverflow regarding this but I did not understood the meaning of SuperClass s=new SubClass();. Also in output if Object of Test can access the go() method of Test2 then why it cannot access back() method.


Let $R$ be a ring with unity (not necessarily commutative) and $I$ an ideal of $R$.  Suppose that for every element $a \in I$ there exists an element $c\in I$ such that $ac=a$. Note that $c$ is related to $a$. Now we have the following question:  Can we say that  for every element  $a\in I$ there exists an idempotent element $c\in I$ such that $ac=a$?    Of course we have many examples such that the answer is true for them but in general  we don't know.


How can I add a custom compose key sequence?  For example, I would like Compose, |, > to type the ▸ symbol.  I have tried adding the following to ~/.XCompose:  # Import default rules from the system Compose file include "%L"  # Custom definitions <Multi_key> <bar> <greater> : "▸" U25B8 # Black right-pointing small triangle   but the new sequence is not usable anywhere except for xterm.   and then enabling the Compose input method in IBus did not solve the problem; IBus imitated many compose key sequences, but not the one I had created.


I have recently got a new job, it's all good except that it will require me to travel frequently,5 hours trip once every month at least.  My fear isn't during the take off and landing like most people have, nor for a crash or anything like it.  I get my anxiety during the cruise, when the plane is all level and smooth, it's more like a fear of heights but I don't have that actually.  Have anybody ever get this type of fear? How can I get over it, I tried sleeping but I can't sleep on planes, the maximum amount of sleep I ever got on a plane was half an hour during a 15 hours trip.  This is not a duplicate or related to the mentioned question. I am not afraid of the sounds the airplane makes or maneuvers, I am not even afraid of turbulence and had many flights with very turbulent weather to the extent that one flight attendant fell on the floor, and bags started to fall from their places, my fear and anxiety didn't increase during these times at all


Is there a hack to force Twitter not to convert words like ASP.NET to links?

Currently, Twitter converts anything that has dot inside it into a link, e.g. ASP.NET becomes , Any.DO becomes  etc. I currently make a space if I want the word to stay the way it should, e.g. "ASP. NET" though it is not right.  Is there a hack around this Twitter bug? Like if there would be some unicode character that looked like a dot and could be inserted there or something like that.


One point tracking - Image in Render Layers is not showing on the movie

Hi all, I am following a one point tracking tutorial on youtube and everything worked fine until the compositing stage. I am having trouble showing the Renter layers on the movie. Is there anything i missed? Please help!  Best Regards, Gary


Can I make a public directory under a private directory?

I have a personal folder /a/b on the server with permission 700. I don't want others to list the contents in /a/b. The owner of /a is root.  Now I need to open the full authorities of directory /a/b/c to all users.  I changed the permission of /a/b/c to 777 but it is still inaccessible for others.


Do periods and question marks come inside the quotation mark, or outside?

I am very well aware of punctuation usage difference between American and British usage, but this part confuses me a little.  Example:     A. Why did he ask, "Who are you?"   B. Why did he ask, "Who are you?"?   C. Why did he ask, "Who are you"?   The reason I am confused is because a question is enclosed in a question. Now I know when to put a question mark inside and outside quotation mark:     He asked, "Will you go and jump in the pond?" [a question within a statement]      He really said, "Go jump in the pond"? [a statement within a question]   So, which one of the three options is correct? Same goes for use of the period. Should it be placed inside or outside:     D. He said, "Pluck that flower."   E. He said, "Pluck that flower".   F. He said, "Pluck that flower.".   If I pick the D option, would it also mean that my sentence ended with the enclosed sentence? If I pick the E option, would it mean that my sentence ended while the enclosed sentence was incomplete?  B. and F. seems awkward. Please help!


I have been recently reading up on some material and was exposed to the Lebesgue integral, although I was unsure as to why if $EX < \infty$, we have that $$EX = \int_{-\infty}^0 xdF(x) - \int_0^\infty xd[1 - F(x)].$$ I know that $$EX = \int_{-\infty}^\infty xdF(x),$$ although I was wondering is it the same as the first equation above because intuitively the "rate of change" of $d[1 - F(x)]$ is simply the same as $dF(x)$ but negative? My second question would then be suppose that $\int_{-\infty}^0 xdF(x) $ exists. Then is this really equal to $-\int_{-\infty}^0 F(x)dx $? If so, then why? Thank you very much!


How to tell if a SSN is in the right format

So I need to write a program to decide if a SSN is valid or not. I have seen this question posted here before but it looks like everyone else is using things a bit more advanced than what I learned so far. I have this so far:  import java.util.Scanner;   public class Homework4_21 {      public static void main(String[] args) {         // TODO Auto-generated method stub         Scanner input = new Scanner(System.in);          System.out.print("Enter a SSN: ");          String ssn = input.next();         String number = (String.valueOf('0') +                  String.valueOf('1') +                  String.valueOf('2') +                  String.valueOf('3') +                  String.valueOf('4') +                  String.valueOf('5') +                  String.valueOf('6') +                  String.valueOf('7') +                  String.valueOf('8') +                  String.valueOf('9'));         if ((number.contains(ssn.substring(0, 1))) && (number.contains(ssn.substring(1, 2))) && (number.contains(ssn.substring(2, 3))) && (ssn.substring(3, 4) == String.valueOf('-')) && (number.contains(ssn.substring(4, 5))) && (number.contains(ssn.substring(5, 6))) && (ssn.substring(6, 7) == String.valueOf('-')) && (number.contains(ssn.substring(7, 8))) && (number.contains(ssn.substring(8, 9))) && (number.contains(ssn.substring(9, 10))) && (number.contains(ssn.substring(10, 11))) && (ssn.length() == 11) )          System.out.print(ssn + " is a valid social security number.");      else         System.out.print(ssn + " is an invalid social security number.");          }  }   The idea is that I make a string, 'number', which has all numbers from 0-9 and then compare that to each numerical value in the string 'ssn' to make sure there are no letters or characters in those spaces. I also check to see if the '-' were put in the correct places.  Now my problem is whenever I enter a valid SSN I get the invalid response. I tested each part of the if statement to make sure that each substring provides the correct value. For example an input     Enter a SSN: 123-45-6789   Would print     123-45-6789 is an invalid social security number.


How do complex number exponents actually work?

I know Euler's formula and how to take complex exponents, but in it it's $e$ to an imaginary angle, not a number, it seems. From my understanding pi itself is not an angle, but $\pi$ radians is. And since cosine can only take in an angle, or at least a representation of one, and the variable is the same everywhere in Euler's formula, the exponent should be an angle and not a number. The question is then raised could I then say $e^{180i}=-1$? Surely this has a single numerical value though, right?   I've been bothered by this for a long time. Am I wrong or how can I take an exponent with a complex number?   Edit for the duplicate: I understand how to take them and how they're supposed work and be justifyed/proved, but raising something to the power of an angle which is what I thought was meant to be happening made me question how they actually worked that could allow this.


java 8 regular expression for meta characters

Trying to write a regular expression to check if the sentence as metacharacters "I need to make payment of $50 for the purchase, should i use CASH|CC". In this sentence i need to identify if metacharacters are present. \\\\$ or ^(\\\\$)\\$. What is the right syntax for Pattern.matches("^([\\\\$]$)", text); to identify the special characters. I don't need to replace just identify if the sentence contains these characters.


Only $1$ Nontrivial Subgroup $\Longrightarrow |G| = p^2$

I am pretty new to this site , so I am not sure how things work, but I am in desperate help with a question that I don't know where to start or finish with. It is for a test I have to study for.  Here it is   "If $G$ is a group having only one non-trivial proper subgroup. Prove that $G$ is cyclic and $o(G) = p^2$ where $p$ is a prime number"  Please help me, I have no idea what to do.


How can I remove Thumbs.db files from Window 7 without affecting any other files? I have already turned off indexing as I use a program called Everything for searches.


Prove that if in a group $(ab)^2= a^2 b^2$ then the group is commutative.  I am having a hard time doing this. Here is what I have so far: Proof:  $a^2 b^2= a^1 a^1 b^1 b^1$ =$aa^{-1}bb$ =ebb Hence,$aa^{-1}=e$  I am stuck, I do not know if this is the right process in proving this


Trouble getting a color in Photoshop to show correctly in my browser

My website has a background color of #EEEEEE (238,238,238). I have an image with a light grey background I want to blend with this background. In Photoshop I used brightness adjustment to get (238,238,238). But when I put the image on my site it shows as #EEEDEE, so it doesn't blend nicely, and the difference is visible. I played with the magenta/green settings of Color Balance, but I never seem to get #EEEEEE in my browser, it's either #EEEDEE or #EEEFEE. I already switched from a .jpg file to a .png file.  How can I create the right color for my browser?


htaccess file to perform specific rules to different domains

I have one application with is server over a number of domains (each customizes the appearance of the application.  In addition, there is a common domain which has multiple subdomains to display the same data as above.  So - www.apples.com appears the same as apples.efruit.co.uk  and - www.bananas.co.uk appears the same as bananas.efruit.co.uk  etc  Now, I have a wildcard ssl for the efruit.co.uk domain so I want to use the htaccess file to force all efruit.co.uk requests to use https (if not already doing so).  All other domains will not have an ssl so they will need to use http to avoid browser warnings - again from the htaccess file.  I would also like to use the htaccess file so that if someone types www.apples.efruit.co.uk it rewrites as apples.efruit.co.uk (over https as above). However, www. is fine if it's not an efruit.co.uk domain.  Finally, I then have the standard and well documented rewrite rule for codeigniter to make the url prettier.  Here's what I have so far.  Options +FollowSymlinks RewriteEngine On  RewriteCond %{REQUEST_URI} !(health_check\.php)$ RewriteCond %{HTTP_HOST} ^(.*)\.efruit\.co\.uk RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]  RewriteCond %{HTTP_HOST} !^(.*)\.efruit\.co\.uk RewriteCond %{HTTP:X-Forwarded-Proto} =https RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L]  RewriteCond %{HTTP_HOST} ^www\.([^\.]*)\.efruit\.co\.uk$ RewriteRule (.*) https://%1.efruit.co.uk$1 [R,L]  # block hidden directories RewriteRule "(^|/)\." - [F]  RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]   The only bit that seems to work though is forcing efruit.co.uk domains to be served over https.


Why is there no bijection between the set of all sequences whose elements are the digits $0$ and $1$ and the positive integers?

I have a problem understanding theorem 2.14 of Rudin's Principles of Mathematical Analysis. The theorem is the following:  $\textbf{Theorem 2.14:}$ Let $A$ be the set of all sequences whose elements are the digits $0$ and $1$. This set is uncountable. The elements of $A$ are sequences like $1,0,0,1,0,1,1,1,...$  $\textbf{Question:}$ Why there is not a $1$-$1$ mapping of the set $A$ to the set of all the positive integers? I  would think that every positive integer (denoted by $J$ by Rudin) can be represented by an element of $A$ by using the binary representation. So each number is $$J_n = \sum_{i=0}^\infty s_{ni}2^i  $$ where $s_{ni}$ is the $i^\text{th}$ element of the sequence $s_n$ (using zero-based numbering). Then, if $A\sim J$, shouldn't $A$ be countable? Rudin mentions this theorem implies that the set of all real numbers is uncountable, so I understand this sequences actually represent real numbers and not the natural numbers, but why? I know my logic has at least one mistake (likely a huge blunder), but what is it?


About $\mathbb Z_{p}[\sqrt{k}]$, when is it a field?

I give up. I'm new in the fields world, and      I'm trying to give a sufficient and necessary condition for $\mathbb{Z}_{p}[\sqrt{k}]=\{a+b\sqrt{k}:a,b\in \mathbb{Z}_{p}\}$ to be a field ($p$ is a prime and $k$ is a positive integer).    I claim that the condition is that $p$ doesn't divide $k$, but I don't know if this is true, I've tried to prove this but I've got stuck in the "sufficient" part.  It would be great if some of you can help me, thanks!.


ls -la symbolics... what does that last symbol mean?

Possible Duplicate:          when I type ls -la I get this familiar output...  drwxr-xr-x+  38 kent  staff       1292 Nov  6 11:09 . drwxr-xr-x    5 root  admin        170 Aug 14 14:11 .. -rw-r--r--@   1 kent  staff         16 Jun 18 14:13 .AB64CF89 -rw-------    1 kent  staff          3 May  5  2009 .CFUserTextEncoding -rw-r--r--@   1 kent  staff      15364 Nov  6 11:11 .DS_Store   my question is about the file settings on the far left eg:  drwxr-xr-x+   I know that the first char 'd' means directory. and the next 9 chars I understand as well (permissions) but what is the final char in this field? (empty or + or @ )


I have the code below to execute SQL in a java method, im getting a null: java.lang.NullPointerException when running the code.           public void addPrevious(TodaysDate Date){                 String paymentDate = ("SELECT PAYMENTDATE FROM table1  where DATE IN (SELECT ID FROM _DATE WHERE ID = ( SELECT MAX(ID) FROM _DATE WHERE ID < ( SELECT MAX(ID) FROM _DATE ) ))");                 String reportingUnit = ("SELECT REPORTING_UNIT FROM table1  where DATE IN (SELECT ID FROM _DATE WHERE ID = ( SELECT MAX(ID) FROM _DATE WHERE ID < ( SELECT MAX(ID) FROM _DATE ) ))");                 String insertLastDate =  ("INSERT INTO table1(PAYMENTDATE, REPORTING_UNIT, Date) VALUES  ("+paymentDate+", "+reportingunit+", "+asOfDate+")");                  getSession().createQuery(paymentDate);                 getSession().createQuery(reportingunit);              }   I'm calling the code using the code below. I cant figure out where the null value is coming from, I tried debugging but the program crashes before getting anything useful   AdjustmentHibernate AdjustmentHibernate = new AdjustmentHibernate(); AdjustmentHibernate.addPrevious(asOfDate);


Am I doing this right? Finding the time derivative of expectation value of momentum

I am currently working through the problems in , with the goal of hopefully understanding how magnets work. At the moment I am a little stuck on one of the early problems in the first chapter. And I would like a Hint about how to proceed. The problem is to solve the time derivative of the expectation value of momentum of a particle. ie: $$ \frac{d\left<p\right>}{dt}. $$ My working so far Just prior to that question the text gives an expression for momentum, $$\int\limits_{-\infty}^{+\infty}{\Psi^*\left[-i\hbar \frac{\partial}{\partial x}\right]\Psi}dx, $$ (Where $\Psi$ is a function satisfying Schrödinger's equation, $i$ is the square root of negative 1, and $\hbar$ is Planck's constant divided by $2\pi$.) So my initial approach was to try and differentiate this with respect to $t$. $$ \frac{d}{dt}\int\limits_{-\infty}^{+\infty}{\Psi^*\left[-i\hbar \frac{\partial}{\partial x}\right]\Psi}dx. $$ However I didn't know how to do that, so I asked around in the maths chatroom, and got a lot of help. Specifically  from @RobJohn: $$ \begin{align} \int vv'\,\mathrm{d}x &=vv-\int vv'\,\mathrm{d}x\\ &=\frac12vv+C \end{align} $$ So I suppose it would follow that, $$ \begin{align} \int\limits_{-\infty}^{+\infty}{         \left(             \Psi^*                 \left[                     \frac{\partial}{\partial x}                 \right]             \Psi         \right)         }\,\mathrm{d}x &=  \left[\Psi^* \cdot \Psi\right]_{-\infty}^{+\infty} - \int\limits_{-\infty}^{+\infty} {\Psi\frac{\partial \Psi^*}{\partial x} }\,\mathrm{d}x\\ &= \frac{1}{2}|\Psi|^2 \Big|_{-\infty}^{+\infty}, \end{align} $$ And then, $$ \begin{align} &\frac{d}{dt}\int\limits_{-\infty}^{+\infty}{\Psi^*\left[-i\hbar \frac{\partial}{\partial x}\right]\Psi}dx \\&=-i\hbar \frac{d}{dt}\left( \frac{1}{2}|\Psi|^2 \Big|_{-\infty}^{+\infty} \right). \end{align} $$ But this feels wrong. I'm not sure exactly why. (Maybe it's just because it is the limits of my maths)  For reference, regarding what I understand, my maths is pretty low-level, I took a course in undergrad calculus over 10 years ago and only just passed that at the time, and my physics knowledge is not much further than that of an enthusiastic lay person.


Does deflect missiles factor in damage resistances/immunities?

The  class gains the deflect missiles ability at level 3:     Deflect Missiles      Starting at 3rd level, you can use your reaction to deflect or catch   the missile when you are hit by a ranged weapon attack. When you do   so, the damage you take from the attack is reduced by 1d10 + your   Dexterity modifier + your monk level. If you reduce the damage to 0,   you can catch the missile if it is small enough for you to hold in one   hand and you have at least one hand free.      If you catch a missile in this way, you can spend 1 ki point to make a   ranged attack with the weapon or piece of ammunition you just caught,   as part of the same reaction. You make this attack with proficiency   regardless of your weapon proficiencies, and the missile counts as a   monk weapon for the attack, which has a normal range of 20 feet and a   long range of 60 feet.   What happens when the damage from the attack includes damage types which the monk is immune or resistant to? At level 10, for example, the monk becomes immune to poison. So a poisoned arrow from an  would only do piercing damage to the monk. If the monk was under the effect of the  spell they would be resistant to the piercing damage from the arrow.  So if a level 10 monk under the influence of a Blade Ward spell was shot at by an assassin and the attack would succeed. What damage total is the monk trying to beat? The full damage roll of the piercing and poison damage? Half of the piercing damage alone?


How to link to a shared library without lib* prefix in a different directory?

I have to link my code to a shared library without the lib prefix. (say, foo.so) The first problem is -l option does not find the file. So I tried directly including this file to the last compilation like this:  gcc a a.o /PATH/TO/FOO/foo.so   But in this case, a is hard linked to foo.so as an absolute path as seen in "ldd a":  /PATH/TO/FOO/foo.so  In the final deployment both files would end up being in the same folder, so this should be normal link, not the absolute path. How can I do this?


How does drawing then discarding work with a full hand?

If my opponent has a full hand of 7 cards and I cast , what happens?  Do they discard the two cards they draw and then discard four more for a total of six cards discarded?


How to make a question appear on the "Linked" list?

In what way may I alter the list of "Linked" questions appearing aside? Explicit links (from the question's body) are always put on the list, but these are not the only ones existing there – a few strongly related questions also appear on the list. Is it done automatically, through moderator tools, or by some other means unknown for me?  I is sometimes useful to point at a question which presents a useful example or shows the same problem from a different point of view. Also, it would be a good way to promote own questions which could enrich a discussion on other user's topics.


the Error JAVA ,int id=rs.getInt(1); id=id+1 String str=String.valueOf(id); jLabel15.setText(str);

private void formComponentShown(java.awt.event.ComponentEvent evt) {                                         // TODO add your handling code here:     try(         Connection con=ConnectionProvider.getcon();         Statement st=con.createStatement();)       {         ResultSet rs=st.executeQuery("SELECT MAX(donorID) from donor");         if(rs.first())         {             int id=rs.getInt(1);             id=id+1;             String str=String.valueOf(id);             jLabel15.setText(str);         }         else             jLabel15.setText("1");     }     catch(Exception e){             JOptionPane.showMessageDialog(null, e);     } }


Ok, it was late last night and you know what happens when running sudo at that time...disaster.  I ran  sudo dd if=/dev/zero of=/dev/sdb bs=8k count=10k   on two of my harddrives, both containing my data. (I was testing write speeds).  First drive had ext4(ubuntu) partition and ntfs partition (latest is important to me). Second drive had ntfs or fat32 (XP installed) and ntfs also with data(important). So is there any hope? I have read that dd starts writing from first block. What is there? Partition tables?  fdisk -l says:  Disk /dev/sdb: 640.1 GB, 640135028736 bytes 255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000  Disk /dev/sdb doesn't contain a valid partition table


How do you deal with the equations numbering in Pages?

How can I number equations in Pages following standard form:  P.S. No, I don't want to use MS Word... I usually write in LaTeX, however, some documents/papers cannot be given for a review in .tex format.


Can I upgrade Ubuntu 12.04 (dual boot) to 13.04 from a DVD

I use Ubuntu 12.04 LTS on a dual boot system. I upgraded my PC's motherboard to Gigabyte GA-H77M-D3H motherboard. 12.04 no longer sees the network interface !  I now want to upgrade to 13.04. Is there a 13.04 download I can put onto a DVD and then upgrade 12.04 after I have booted up 12.04 ?


How can I subdivide a face which is next to a face that is already subdivided?

I want to subdivide a face whose neighbour's faces are subdivided.   Here is an example of such a face:    How can I subdivide selected faces?


I need to generate a PDF/A format with TexStudio, is it possible ? Should I use other ide to do that ?


How long after the interview will I receive the Schengen visa for Greece?

I have submitted my application and done the biometrics on March 22. I have my interview on April 3. But I need my original passport before April 9, 2018 as I need to travel to Dubai on April 11, 2018.  I have attached a request letter and also the travel ticket to Dubai as proof so that they process my visa in priority and get it before April 9, 2018.  I want to know whether I will receive my visa and the passport before April 9, 2018 after that interview on April 3, so that I am able to travel to Dubai on April 11.  Thank you in advance.


I want to make a transparent mesh for particle hair. Don't know how to call it correctly

I'm newbie and not very familiar with definitions, so I could call something wrong.  How can I make an separate object with mesh like this (transparent) to use it for patricle hair system? I'm selecting faces of scalp I need, duplicate them and making them a separate object, but don't know how to make it's mesh transparent, with no material, just like at picture.  I've searched the web a lot, but all what I found is about making the material of mesh transparent. Maybe I just asked the wrong questions because don’t know how to call this option right.  Sorry for bad english, I'm not the native speaker.  Thank you in advance!


Is there a way to re-install Ubuntu Software Center?

My Ubuntu Software Center keeps crashing and it won't open :(   This happened after I installed GNOME 3.10 and then I GNOME 3.10 but the issue keeps happening.  Is there a way to reinstall the USC?


Schengen visa refused from German embassy

I am Sri-Lankan staying in Bangladesh working in well established company in Bangladesh. I, my wife and two kids applied for Schengen visa from German embassy in Dhaka. I got only sponser letter from my paternal uncle in Germany. We submit all company letter, bank account, school letters, insurance, booking air tickets, etc.  Our visa refused and the reason given "your intention to leave the territory of the member states before the expiry of the visa could not be ascertained" so I want to know what it mean. And how I apply again fix by this reason? Our annual vacation starts on 15 July for one month. I applied visa for 15 days. We plan to stay 15 days in Germany and travel to Sri Lanka and back to Bangladesh.


Who amongst the living Targaryens should be the ruler of Westeros?

This might be a duplicate or debatable. But as far as the releases of the books & TV series, who should rule Westeros as per the laws of that continent? Ignore the usurpers.  Is it Daenerys Targaryen or Jon Snow (Targaryen)?  If there are Targaryens alive, how can Baratheons be rightful rulers? If I'm not wrong the Baratheons are usurpers, right?


what operation repeated $n$ times results in the addition operator?

I had a difficult time in phrasing my question. But I was wondering if there is an operation that, when repeated n times, results in the addition operator. Same way as repeating addition n times results in the multiplication operator, and repeating multiplication n times results in the exponentiation operator etc.  So $n$ times addition of a number $x$ results in $x\times n$.  And $n$ times multiplication of a number $x$ results in $x^n$  Then my question is $n$ times ...what... results into the number $x+n$.  Let's call this operator: $@$.  For example, the following would then hold:  $$a\times a=a^2$$  $$a+a=a\times 2$$  $$a@a=a+2$$  My question is, does it make any sense thinking of such an operator, is there anything known about it, can it be followed through even further like $a\sim a = a@2$?


How do I insert data into mysql table using php

I am trying to enter data in MySQL table using PHP. Below is my code. What am I missing? The reason is, no data is inserted.  Database connection.  <?php class Dbh{     private $servername = "localhost";     private $username = "username";     private $password = "password";     private $dbname = "oop";     protected function connect(){         $conn = new mysqli($this->servername, $this->username, $this->password, $this->dbname);         return $conn;     } } ?>   Insert class for inserting the data into MySql table  <?php include_once 'Dbh.php'; class Insert{     public function insertData(){         $uid = $_POST['uid'];         $pwd = $_POST['pwd'];          $sql = "INSERT INTO user(uid, pwd) VALUES ('uid', 'pwd')";         mysqli_query($sql);         header("Location: ../index.php?data=inserted");     } } ?>   HTML form for inputting the data.  <?php include_once('Insert.php'); $data = new Insert(); ?>  <!DOCTYPE html>       <meta charset="UTF-8">     <title>Insert data into database</title>    <form action="classes/Insert.php" method="POST">     <input type="text" name="uid" placeholder="user name">
     <input type="password" name="pwd" placeholder="password">
     <button type="submit" name="submit">Insert data</button> </form>


which of these two servers are likely to do better under heavy http load?

As the title asks, the reason I'm asking is because I have a wordpress site which gets about 10K visitors per day on a dedicated server from iweb but in the evenings, around 8 to midnight the site crawls to a halt and page load time goes up to about 12 seconds or more compared to 2-3 during the day. Checking my google analytics its shows that traffic is pretty dispersed throughout the day so its not the case where the server is being hammered during those hours by visitors. The two server specs are:  ---------------------------------- 1 -------------------------------------  OS: Linux CentOS  CPU: Intel Core 2 Duo - 2.13 GHz  RAM: 2 GB  Storage: 2 x 300 GB hard drives  Bandwidth: 1,000 GB per month  ----------------------------------2 --------------------------------------  Core 2 Duo 2.4GHz (800MHz FSB)  4GB RAM  500GB SATA2  Enterprise Linux - CentOS - 64 bits  cPanel/WHM Internal  There's nothing weird in the logs for apache except Internal server error which happens a few times during those hours but not during the day and results in httpd and mysqld consuming 100% cpu for long periods of time. Load average on the server is usually about 15,15.x,15.x during those hours then in the day its 0.x,0.x,0.x


Explicit example of two non-isomorphic Hilbert spaces with the same algebraic dimension

I´m wondering if there exist a vector space A and inner products: $\langle\cdot{,}\cdot\rangle_1$ and $\langle\cdot{,}\cdot\rangle_2$, such that:   $\big( A,\langle\cdot{,}\cdot\rangle_1 \big)$ and $\big( A,\langle\cdot{,}\cdot\rangle_2 \big)$ are Hilbert spaces  $\big( A,\langle\cdot{,}\cdot\rangle_1 \big)$ is not isomorphic to $\big( A,\langle\cdot{,}\cdot\rangle_2 \big)$   An explicit example would be appriciated, Thanks!


How to measure capacitance without LC meter?

I would like to use capacitors salvaged from old electronics, but I currently don't have an LC meter.    What would be some really simple circuits, that would convert capacitance to something I can measure (voltage, current, frequency)?


Was the singularity at Big Bang perfectly uniform and if so, why did the universe lose its uniformity?

Am I right in understanding that current theory states that Big Bang originated from a single point of singularity?  If so, would this mean that this was a uniform point?  If so, as the universe expanded, what factors contributed to transforming its expansion in a non-uniform manner, to the point of what we can now observe? E.g., non uniform densities of matter and non-uniform cosmic microwave background noise, the latter we are told being the imprint of the very early universe.  I'm making assumptions here but I would be interested in understanding how, if it started uniformly, what made the universe become diverse.


Are the two definitions of a sufficient statistic equivalent?

I am confused about the fundamental definition of a sufficient statistic. I found two different definitions and I wounder if they are equal. with  data $X$ sufficient statistics $t$ parameter $\theta$  Definition 1, e.g. from: "A statistic $t = T(X)$ is sufficient for underlying parameter $\theta$ precisely if the conditional probability distribution of the data $X$, given the statistic $t = T(X)$, does not depend on the parameter $\theta$.", i.e. as formula: $$ p(X \mid t) = p(X \mid t, \theta) $$ Definition 2, e.g. from a : $$ p(\theta \mid t) = p(\theta \mid X) $$  The second definition should be equivalent to $p(\theta \mid t, X) = p(\theta \mid t)$: from $t=T(X)$ we can compute $t$ from $X$, so $p(\theta\mid X) = p(\theta \mid X, t)$. Is this correct? If yes then in the two definitions the $X$ and $\theta$ are exchanged.  So, my question is: Are the two definitions equivalent (in general or under some assumptions)?  Do I overlook something? P.S.: The second definition makes more sense if I look at the estimation of $\theta$ (estimator $\hat \theta$) from the data: $X \rightarrow \hat \theta$ and with the sufficient statistics $X \rightarrow t \rightarrow \hat \theta$. The arrows are not causal, e.g., the arrows do not reflect the data generating process which is probably $\theta \rightarrow X$, but not intermediated by a sufficient statistic(?). The first definition also makes sense: $t$ captures all the information about $\theta$ for $X$.


I know that a solution for this question exists on SE, I have seen it, but it doesn’t satisfy my query. I couldn’t understand the solution.  Here is an excerpt from one of the answers   $$z = e^{e^{i \theta} }$$  $$\implies z=e^{\cos \theta +i\sin \theta }$$  $$\implies z=e^{\cos \theta} e^{i\sin \theta }$$  $$\implies z=e^{\cos \theta}(\cos (\sin\theta) +i\sin(\sin \theta))$$  I didn’t understand the last line of the answer. Up to the third line, everything is clear.


Is the word 'group' singular or plural in sentence: "My group of tenth-graders is/are so well behaved?"

I have read similar questions on this forum and as per best of my knowledge it should be considered plural because it's referring to every student of class.   I read this sentence in my grammar book: "My group of tenth-graders is so well behaved?"  But my instincts says the word "is" should not be used. I'm confused now. Please confirm whether I'm right or wrong.


l7809cv voltage regulator: heat sink or not?

I'm using 9v regulator (l7809cv) with 12 1,5v AA batteries in series so that my application gets both 18v and 9v for my Arduino Uno r3 board.   I've been running it for about 15min without any problems, but when I touch the l7809 it feels really hot after 10min or so.   I've measured a current between the batteries and the l7809 to be steadily around 100mah. I haven't exceeded the maximum voltage input ratings, and as far as I can see, neither the current ratings (it says in the datasheet that it's "internally limited")  Maximum temp. appears to be 0 - 150 celcius, which seems to be more than enough.  So my question is, is it OK that the component gets so hot that it hurts touching it although it probably isn't 150 c, or should I make some kind of heat sink for it?


Help identifying a short SF about living the life of all human beings

Here's a novel that I cannot recall correctly the name. It'll be great if someone could help identifying its name.  WARNING: POTENTIAL SPOILERS BELOW  Hints:   It's a short novel. The main idea is that an individual lives the life of all human beings (to be explained below). Here's the storyline that I recall (sorry but it might be different from the actual novel, as I may make mistakes in memory):   There was an individual A who lived his whole life and died. After his death, he met an angel, who told him that he would be re-born and start a life as another person B. The same individual then lived through the whole life of B. After his death, he met the same angel. Then the same process repeated. The same individual lived lives of another person C, another person D, and so on. The same angel then revealed it: All those billions of people, past, present, and future, were all this same person experiencing different phases / roles. And when he / she finished experiencing all lives of human beings, he / she would eventually become one of the real humans, just like this angel itself.  I read it in the Chinese language. But I cannot now recall whether it's written by a Chinese author, or translated into Chinese. I didn't read the story from a book. I probably read it on my kindle or my laptop.


Extract just power features from OpenStreetMap

Is there a way to only download power features from OpenStreetMap in some sort of geodata?


I have seen people say both 0.25 mile and 0.25 miles. Should we use plural or singular for a fraction of a mile?


Interactive texture modification (such as swirling) in Unity

I am working on a game where I want to allow users to mix multiple colors (similar to shown in this video): . I have the following questions:  I am expecting that this is done using shaders. What kind of shader I have to use for such implementation? What will be the logic to create this type of shader? Are there any other ways using which this feature can be implemented? Are there any open source tutorials or examples?  I would appreciate any suggestions and thoughts on this topic. Thank you.


Holonomic constraints and degrees of freedom

and other sources define holonomic constraints as a function  $$ f(\vec{r}_1, \ldots, \vec{r}_N, t) \equiv 0, $$  and says the number of degrees of freedom in a system is reduced by the number of independent holonomic constraints.  I could take multiple such constraints $f_1, \ldots, f_m$ and formulate them as single one that is fulfilled if and only if all $f_i$ are fulfilled:  $$ f = \sum_{i=1}^{m}{\lvert f_i \rvert}. $$  This combined $f$ would obviously reduce the number of degrees of freedom by $m$ instead of $1$.  Alternatively, to avoid the absolute value, I could use a sum of squares  $$ f = \sum_{i=1}^{m} f_i^2 $$  instead. Where is my error in reasoning?


Evaluating each cell in a row based on the cell adjacent to it

I'm trying to set up a spreadsheet the will color the background of a cell based on the text within another cell. This would have to be set up in a row so that if (for example) B2: contained "done", then A2 would be colored green. Likewise for B3 and A3, B4 and A4, etc. I understand how conditional formatting works, I just don't know what formula to use to accomplish this.


When I upload this 110x110px image with 100px resolution it seams blurry.    Have any idea what's happening? Do you think it's the color?


I need 2 different Figure captions: Examples and Figures. If I use the \renewcommand, every time a figures appears, the counter won't stop and keep adding, like: Example 1. Figure 2. Example 3. Figure 4...  And I need: Example 1. Figure 1. Example 2. Figure 2.  Also, is it possible to make these 2 lists separate at the ToC?  Thank you.


Create wireless access point and share internet connection with nmcli

How can I create a Wi-Fi hotspot with the command line tool nmcli and share/bridge the ethernet internet connection with the wireless access point? Furthermore, how can I start this automatically at boot? Is this possible with nmcli?


How can I change the background colour for the applications panel in Ubuntu 18.04?

I do not know if that's the correct name for this panel, but I would like to change it to a blue colour, same as the desktop colour.  How to go about it? Thanks  edit:  i tried the suggestion at   to edit the gdm3.css file but after editing with new colour code and rebooting, the colour remains the same. are there other copies of the file in other directories being used beside /etc/alternatives/ ?


The "flair" link in the profiles for people with all-Unicode usernames is broken.  For example, clicking on it for  links to .  What's happening here is that the flair link is http://site.stackexchange.com/users/<userid>/<username slug>/flair. For such usernames, the slug is blank, which leads to http://site.stackexchange.com/users/<userid>//flair, which is just a link to the profile.  Could this be fixed? To fix it, we could either have the system recognize the double-slash, or remove the slug from the flair link (I don't see why it's needed).


How do I add/remove the "hidden" startup applications?

How do I manage (add/remove) all the startup applications in Ubuntu 11.10 and up?  Startup Applications doesn't show all the applications which are started during boot.


I wrote the following code in java that compares the n-th suffix of two words w1 and w2. However if I run the program with the words "Heeelloo" and "Helloo" and n = 4 it returns the following:  lloo lloo false   Here is the code:  private static boolean sufficesEqual(String w1, String w2, int n) {     String str1 = "";     String str2 = "";     for (int i = w1.length()-n; i < w1.length(); i++)          str1 = str1 + w1.charAt(i);     for (int j = w2.length()-n; j < w2.length(); j++)          str2 = str2 + w2.charAt(j);     System.out.println(str1);     System.out.println(str2);     return (str1 == str2); }   with those both words it should howevr be true. thanks for your help edit: I am only allowed to use .chatAt() and .length


What do you call someone who obsessively thinks they are sick?

Is there a single word in English to describe someone who is too worried about their health and even thinks they are sick, thus, taking frequent clinical tests or taking too much predictive medication,etc.


I am on ubuntu and would like to compile a kernel + Con Kolivas patch for my netbook (with lubuntu) .   The problem is my netbook is 32 bit and my ubuntu pc is 64 bit.   If I take the .config from the netbook, throw it into the kernel folder (with patch already applied) and try to compile it. It takes the config from the normal ubuntu pc (i am compiling on)  and asks me additional questions.   I hope you can help :)


Finding $\lim \limits_{x \to 0} \frac{1 - \cos x}{x}$, given $\lim \limits_{x \to 0} \frac{\sin x}{x} = 1$

I am working on a textbook problem. The first step is to prove that  $$\lim \limits_{x \to 0} \frac{\sin x}{x} = 1$$  (which I did). The exercise goes on     Use this limit [i.e. the one above] to find    $$\lim \limits_{x \to 0} \frac{1 - \cos x}{x}$$.   How can this be done? I don't really see a connection between the two...


Prove $\operatorname{rank}A^TA=\operatorname{rank}A$ for any $A\in M_{m \times n}$

How can I prove $\operatorname{rank}A^TA=\operatorname{rank}A$ for any $A\in M_{m \times n}$?   This is an exercise in my textbook associated with orthogonal projections and Gram-Schmidt process, but I am unsure how they are relevant.


Will the 2015 Nexus phones (5X, 6P) work with any US cell provider?

I'm pretty geeky, but I haven't really followed all the tech behind LTE rollouts and wireless bands and whatnot. I barely know the difference between CDMA and GSM. I know Verizon didn't use a SIM and generally phones weren't interchangeable, but that now they do use SIMs... Overall, I'm confused. But, confused or not, I want to buy a new Nexus phone. The  for the 6P just lists a bunch of bands and says:  GSM/EDGE: 850/900/1800/1900MHz UMTS/WCDMA: B1/2/4/5/8 CDMA: BC0/1/10 LTE (FDD): B2/3/4/5/7/12/13/17/25/26/29/30 LTE (TDD): B41 CA DL: B2-B2, B2-B4, B2-B5, B2-B12, B2-B13, B2-B17, B2-B29, B4-B4, B4-B5, B4-B13, B4-B17, B4-B29, B41-B41 Phone is carrier-unlocked with wide-range band support for service providers worldwide. Check with your service provider for more information.  That last bit is not very promising, since such information is generally buried in knowledgebases and forums on carrier websites, and anyway the carriers mostly want to sell me a phone directly and aren't highly incentivized to make this simple. Does this big long list mean that everything in the US — or, at least, T-Mobile, Sprint, AT&T, and Verizon — will work? Will they all work everywhere that they have coverage, or might it depend on certain bands being deployed in some areas? To make things worse, the 5X has a slightly different list — under LTE (FDD), 30 is gone but 1 is added. CA DL becomes LTE CA DL, and includes B4-B7 and B4-B12. Does this make any practical difference?


Output is same, and it always echos need to pull. If I remove the quotes around $text in if condition it throws the too many arguments error.   var="$(git status -uno)" &&   text="On branch master Your branch is up-to-date with 'origin/master'. nothing to commit (use -u to show untracked files)";   echo  $var;  echo  $text;  if [ "$var" = "$text" ]; then     echo "Up-to-date" else     echo "need to pull" fi


Is it possible to create this kind of query in SQL (SQL Server 2012)?

Pls, let me know if is possible to create this kind of query. I never saw something like that  Pls, check below the image. It´s exactly what I need to do!


Denote by $F(X,Y)$ the set of all functions from $X$ to $Y$. For sets $A$, $B$, and $C$ prove that a. $F(C,A\times B)$ is in one-to-one correspondence with $F(C,A)\times F(C,B$).  Let's give this bijective function between $F(C,A\times B)$ and $F(C,A)\times F(C,B)$ a name, for example $M$. If you start out with a function $g$ which maps out every $c$ to some ordered pair $(a,b)$, then $M(g) = (x,y)$ where $(x,y)$ is an ordered pair of functions. $x(c)$ = $a$ and $y(c) = b$.  In other words, $M$ looks at the behavior of the input function $g$ for every $c$, and splits $g$'s behavior across two functions.  I cannot seem to prove that $M$ is a bijection. Could someone please lay out how I can start with this since we are dealing with a function that maps a function to an ordered pair of functions.  Also, how would you do: F(C , F(B , A)) is in one-to-one correspondence with F(B × C , A).  Because, C maps to a function.


Finding 1832 birth details in Romania for Wolf Finkelstein?

Wolf Finkelstein was my great-great grandfather.  He was born in Romania in 1832 which was before that country came into existence.  I don't know how to find out anything about him such as who his parents were.? How could I determine a more precise location and date for his birth?  I think he was born in a town called Jassy which I have also seen spelled Iasi.


Choosing a domain name with joined words is good for SEO?

I am going to choose a domain name for my business. For that I am going to use joined words in my domain name.  For example, let's say my keywords are "painting" and "goa" and also that paintinggoa.com is not available to register.  In this case if I choose paintingoa.com is it good? Is it good for SEO purposes?  How will Google treat this domain name?


Prove that is $\bar{f}g$ is analytic then $f$ is constant or...?

I need help with the following exercise:  Prove that if $f$ and $g$ are analytic functions on a region $G$ such that $\bar{f}g$ is analytic then $f$ is constant or $g\equiv0$  Thanks!


Calculating $\lim_{x \to 1} \frac{\sqrt[3]{x}-1}{x-1}$ without L´Hôpital rule.

How to calculate the limit above without using L´Hôpital rule? I am not able to factor the numerator and I´ve also tried factoring the numerator.


Inverse Green's Function identity in derivation of Hedin's equations

I'm trying to work through a derivation of Hedin's Equations in Effect of Interaction on One-Electron States by Hedin and Lundqvist (1969) and I've come across an identity that is given without much explanation that I'd like to understand.   We start with an equation of motion with single particle Green's functions G:   $\left[ i\frac{\partial}{\partial t_1} - h(1) - \phi(1) - V_H(1)\right] G(1,2) - i\int v(1^{+},3) \frac{\delta G(1,2)}{\delta \phi(3)} d3 = \delta(1,2)$  where $1=(x_1,t_1)$, $h$ is the one-electron kinetic energy and ion interaction, $\phi$ is a small perturbing field that is set to zero at the end, $V_H$ is the Hartree potential, and $v$ is the Coulomb interaction.  They then insert the identity  $\frac{\delta G(1,2)}{\delta\phi(3)} = -\int G(1,4) \frac{\delta G^{-1}(4,5)}{\delta\phi(3)} G(5,2) d(4,5)$  which is then used to define the self energy  $\Sigma(1,2) =  -i \int v(1^+,3) G(1,4)\frac{\delta G^{-1}(4,2)}{\delta\phi(3)} d(3,4)$.  I know this identity is related to the definition of the inverse Green's function  $ \int G(1,3) G^{-1}(3,2) d(3) = \delta(1,2)$  but I can't figure out how to get from this definition to the identity that is inserted into the equation of motion. Any ideas?  Thank you!


How do you clone an Array of Objects in Javascript?

...where each object also has references to other objects within the same array?  When I first came up with this problem I just though of something like   var clonedNodesArray = nodesArray.clone()   would exist and searched for info on how to clone objects in javascript. I did find a  on StackOverflow (answered by the very same @JohnResig) and he pointed out that with jQuery you could do  var clonedNodesArray = jQuery.extend({}, nodesArray);   to clone an object. I tried this though, this only copies the references of the objects in the array. So if I   nodesArray[0].value = "red" clonedNodesArray[0].value = "green"   the value of both nodesArray[0] and clonedNodesArray[0] will turn out to be "green". Then I tried  var clonedNodesArray = jQuery.extend(true, {}, nodesArray);   which deep copies an Object, but I got "too much recursion" and "control stack overflow" messages from both Firebug and Opera Dragonfly respectively.  How would you do it? Is this something that shouldn't even be done? Is there a reusable way of doing this in Javascript?


Normal - $\chi^2$ mixture is a $t$ distribution

In the book Introducing Monte Carlo Methods with R, Robert & Casella mention that Student's $t$ density can be written as a mixture of normal distibutions with zero mean and $\chi^2$-distributed precision parameters (page 50, section 2.2.3): $$ X\vert y \sim N(0, \frac{\nu}{y})\quad\text{and}\quad Y\sim \chi_\nu^2\,. $$ I fail to see how the pdf of the mixture distribution $$ f(x) = \int dy\, g(x\vert y)p(y) $$ corresponds to that of a $t$ distribution with $\nu$ degrees of freedom $$ f_{t}(x) = \frac{\Gamma{\left(\frac{\nu+1}{2}\right)}}{\sqrt{\pi\nu}\Gamma{\left(\frac{\nu}{2}\right)}}\left(1+\frac{x^2}{\nu}\right)^{-\frac{\nu+1}{2}}\,. $$  This is what I've done so far:   The normal and $\chi^2$ distributions are in this case $$ \begin{aligned} g(x\vert y) &= \frac{y}{\sqrt{2\pi\nu^2}}\exp{\left(-\frac{x^2y^2}{2\nu^2}\right)}\\ p(y) &= \frac{1}{2^{\nu/2}\Gamma{\left(\frac{\nu}{2}\right)}}y^{\frac{y}{2} - 1}\exp{\left(-\frac{y}{2}\right)}\,. \end{aligned} $$ The mixture distribution is then $$ \begin{aligned} f(x) &= \int_0^\infty dy\, \frac{y}{\sqrt{2\pi\nu^2}}\exp{\left(-\frac{x^2y^2}{2\nu^2}\right)} \frac{1}{2^{\nu/2}\Gamma{\left(\frac{\nu}{2}\right)}}y^{\frac{y}{2} - 1}\exp{\left(-\frac{y}{2}\right)}\\ &= \frac{1}{\sqrt{2\pi\nu^2}}\frac{1}{2^{\nu/2}\Gamma{\left(\frac{\nu}{2}\right)}}\int_0^\infty dy\, y^{\frac{y}{2}}\exp{\left(-\frac{x^2y^2}{2\nu^2} - \frac{y}{2}\right)} \end{aligned} $$ I'm now trying to reduce the integral to a standard integral of the form $\int x^n \exp{\left(-a x^2\right)}$. Completing the square in the exponential gives $$ f(x) = \frac{1}{\sqrt{2\pi\nu^2}}\frac{1}{2^{\nu/2}\Gamma{\left(\frac{\nu}{2}\right)}}\exp{\left(\frac{\nu^2}{8x^2}\right)}\int_0^\infty dy\, y^{\frac{y}{2}}\exp{\left(-\frac{x^2}{2\nu^2}\left(y + \frac{\nu^2}{2x^2}\right)^2 \right)}\,. $$   This is where I'm not sure how to proceed. According to Wolfram alpha, the integral has a closed form involving Kummer's confluent hypergeometric functions ${}_1F_1$ $$ \int_0^\infty dx\, x^n \exp{\left(-a(x-b)^2\right)} = \frac{1}{2}a^{-\frac{n}{2}-\frac{1}{2}}\left(\sqrt{a}b n \Gamma{\left(\frac{n}{2}\right)}{}_1F_1{\left(\frac{1-n}{2};\frac{3}{2};-ab^2\right)} + \Gamma{\left(\frac{n+1}{2}\right)}{}_1F_1{\left(-\frac{n}{2}; \frac{1}{2}; -ab^2\right)}\right) $$ However, I'm not sure how this reduces to the pdf of the $t$ distribution. In particular I'm not sure how the term $\exp{\left(\frac{\nu^2}{8x^2}\right)}$ in front of the integral in $f(x)$ can disappear; or what to do with the hypergeometric functions.     Note 1: I tried a change of variables, $z = y + \frac{\nu^2}{2x^2}$, which gives me the integral $$ f(x) = \frac{1}{\sqrt{2\pi\nu^2}}\frac{1}{2^{\nu/2}\Gamma{\left(\frac{\nu}{2}\right)}}\exp{\left(\frac{\nu^2}{8x^2}\right)}\int_0^\infty dz\, \left(z - \frac{\nu^2}{2x^2}\right)^{\frac{y}{2}}\exp{\left(-\frac{x^2}{2\nu^2}z^2 \right)}\,, $$ but I'm not sure this is any improvement.   Note 2: It seems that the  can be expressed in terms of the confluent hypergeometric functions; however according to Robert & Casella, the mixture distribution is that of a (central) $t$ distribution with $\nu$ degrees of freedom. The noncentral $t$ distribution reduces to the central $t$ distribution in the case of a zero non-centrality parameter $\mu$, in which case the confluent hypergeometric functions reduce to $_{1}F_1 (a,b,0) = 1$. However this is clearly not the case here, where $a > 0, b > 0$, and the terms involving $_{1}F_1$ in the closed form above do not collapse.


less and more seem to have very similar functionality in that they both page through text a screen at a time.  What reasons are there to use one over the other?


I'm trying to post some piece of gradle script at it doesn't look like code. Here it works: buildscript {     repositories {         mavenCentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.5.+'     } }  But on stackoverflow if look like regular text with indents:  Browser: 31.0.1650.57 System: OSX 10.9


Why is $\lim_{n \to +\infty }{\sqrt[n]{a_1 a_2 \cdots a_n}} =\lim_{n \to +\infty}{a_n}$

Solving some problems regarding limits and sequence convergence, i stumbled upon a task, and it's solution relies on, and i quote: "We now use a well-known theorem : $$\lim_{n \to +\infty }{\sqrt[n]{a_1 a_2 \ldots a_n}} = \lim_{n \to +\infty}{a_n}$$  This isn't really intuitive (at least to me) and I don't know how to prove it. The original task was to find the limit of  $$\lim_{n \to +\infty }{\sqrt[n]{\bigg{(}1+\frac{1}{1}\bigg{)} \bigg{(}1+\frac{1}{2}\bigg{)}^2 \ldots \bigg{(}1+\frac{1}{n}\bigg{)}^n}} $$ which of course, using the expression above is just $e$.


At which point does a game count towards my stats?

Let's say my career best in eliminations is 20. Then I play a game from the start and I do 21 eliminations, but I disconnect before VICTORY/DEFEAT appears. Will my career best now be 20 or 21? Will my averages change? What about if I disconnect after VICTORY/DEFEAT, but before the stats appear?  At what point exactly do my stats get modified?


How do I get started?  If you need 5 points to answer a question why do you need to ask needless questions to get 5 points?


"Social-approval seeker" or "social approval-seeker" or "social-approval-seeker"?

What is the most appropriate hyphenation for this term for a person who seeks approval from others?   "social-approval seeker" "social approval-seeker" "social-approval-seeker" "social approval seeker" something else?   EDIT: To clarify, I mean to describe "a seeker of social approval", rather than "an approval seeker who is social".


A fair coin is tossed until a head comes up for the first time. The probability of this happening on an odd number toss is?  How do i approach this problem ?


Why am I not able to shutdown, log-off and restart after an upgrade to Ubuntu 13.10?

After the update neither my desktop (Asus) nor my laptop (HP) respond to the shut-down, log off or restart commands in the right top tool bar.  How do I fix the issue?


Can I attempt to activate an equipment's equip ability without a valid target?

Say I have a  on the field and a . The equip cost for piston sledge is "sacrifice an artifact". If I control no creatures, can I sacrifice the Mycosynth Wellspring to the Piston Sledge to benefit from its ability, or does the equip ability require a valid target in order to pay its cost?


Is there any method to generate MD5 hash of a string in Java?


I write enum with custom ToString() method example     public enum MyEnum{         a,         b,   }   My = MyEnum.a;   Console.Write(My.ToString); // ---> output : aaaaa   and in code My.ToString() Do you have idea ?


how to add values one by one in an array

I want to add 8 values of the clicked buttons in an array.  When a user will press any button the id/value against that button stored in an array but my array only save 1st value in the array at array [0].  How to insert other values in an array?  Here is the code:    function reply_click(obj) {   var id = [obj.id];   for (i = 0; i <= id; i++) {     alert(id);   } }  var arr = [id];  alert(arr);  if (id[0] == "1") {   alert(6666666666); }  if (id[0] == "2") {   id[0] = 1;   id[1] = 2;   alert(777777777777); }   if (id[0] == "3") {   id[0] = 1;   id[1] = 2;   id[2] = 3;   alert('login'); }  alert(id);  $(document).on('click', '.btn', function() {    alert($(this).val());    var myvalues = $(this).val();   alert(myvalues);    var cars = [myvalues, "myvaluesv", "Toyota"];   alert(cars);   var x = cars.length;   alert(x); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <button id="1" onClick="reply_click(this)">1</button> <button id="2" onClick="reply_click(this)">2</button> <button id="3" onClick="reply_click(this)">3</button>  <button id="tahira" name="btn" class="btn" value="tahirahassan">hi tahira</button> <button id="sobia" name="btn" class="btn" value="sobia">hi sobia</button> <form action="testingjquery.php" method="post">   <input type="submit" id="btn1" class="btn111" name="val1" value=" i am tahira" />   <input type="submit" id="btn2" class="btn112" name="val1" value="hassan" /> </form>


I'm trying to replace my cp function by an rsync function My cp function is the following  find /home/odroid/USBHD/Movies/ -iname "*.mkv" -mtime '-1' -exec cp -n {} /home/odroid/NASVD/Movies \;   do you guys have any idea how to do this(note the mtime can also be replaced by --ignore-existing


whole text file to string and count (nullpointerexception error)

** I want to get text from the user and find the number of words in the text according to the word searched. BufferedReader sets the readLine method to get all rows with while, but the program gives a null pointer exception error .  The program worked fine when I used a single readline.  I think the problem is in the while loop but I do not understand the problem.**    Please Write Path : C:\Users\Soul Collector\Desktop\yazi okuma  Please Write the Name of Text : buffer  Text File :  hi hello my name is suat   hello there   Hello   Write the key word :  hi  Exception in thread "main" java.lang.NullPointerException  at project2.Count.SingleWord(Count.java:83) at project2.Project2.main(Project2.java:45)   C:\Users\Soul Collector\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1  BUILD FAILED (total time: 18 seconds)            if(press == 2 )            {          System.out.print("Please Write Path : ");         scan.nextLine();         path = scan.nextLine();          System.out.print("Please Write the Name of Text : ");         txtname = "\\"+ scan.nextLine() + ".txt";          finalpath = path + txtname;          File dosya = new File(finalpath);         FileReader fr = new FileReader(dosya);         BufferedReader br = new BufferedReader(fr);         String dizi;         while((dizi = br.readLine()) != null){             System.out.println(dizi);          }            br.close();           /* StringTokenizer st = new StringTokenizer(dizi);          while(st.hasMoreTokens()){         System.out.println(st.nextToken());        }*/           String search=null;         System.out.println("Write the key word : ");        search = scan.nextLine();          Scanner s = new Scanner(dizi.toLowerCase());         while (s.hasNext()) {        toplamkelime++;            if (s.next().equals(search))                kelime ++;                   }         System.out.println("Key Word : " + search);         System.out.println("Count of key word : " + kelime);         System.out.println("\n\n\n Total Count of Words : " + toplamkelime );        }


How to make sure `has` method of `Map` or `Set` javascript collections compares objects by properties values?

I couldn't find more information on this but as far as I understand has method from Map and Set collections determines whether a given map or set has an object by checking for reference equality. But I'd like to check whether the objects are equal by comparing their properties.  For example:  let map = new Map(); let obj = {name: "Jack"}; map.set(obj, "myObj"); let result = map.has({name: "Jack"}); //false   result is false but the properties of the objects are identical, so in such case I'd like has to return true.  In Java I'd have to override equals and hashCode methods inside my class to achieve such functionality. Is there something similar I can do in Javascript without overriding has itself?


Why are global variables considered bad practice in C++? Is there a time where they are acceptable to use? If so when, and where? Ive heard mixed answers to this question, some say if it works it works, and others tell me to avoid using global variables as much as possible.


Using LinkedList and ArrayList interchangeably with List Interface

The code below shows the use of List interface in existing code.        LinkedList<Song> playList = new LinkedList<Song>();    List was applied:    List<Song> playList = new LinkedList<Song>();  Then LinkedList was changed to ArrayList:    List<Song> playList = new ArrayList<Song>();    And after these two edits, the codes worked exactly as before. It was actually for a media player with features (methods)like play, skip forward, skip backwards and replay. Hence the prior need to use LinkedList for the songs.  I have a limited understanding of both LinkedList and ArrayList. I know they are implementations of List interface (hence they are both bound by the methods dictated by the List interface).   However, does that mean that once I use a List interface it matters not whether I initialise the code with ArrayList or LinkedList? Do the LinkedList and ArrayList become indistinguishable placeholders?  Or are there specific differences in the instances by LinkedList and ArrayList when both are referenced by List interface?


Is there ever a good reason to run sudo su?

To launch a root shell on machines where the root account is disabled, you can run one of:   sudo -i : run an interactive login shell (reads /root/.bashrc and /root/.profile) sudo -s : run a non-login interactive shell (reads /root/.bashrc)   In the Ubuntu world, I very often see sudo su suggested as a way to get a root shell. Why run two separate commands when one will do? As far as I can tell, sudo -i is equivalent to sudo su - and sudo -s is the same as sudo su.  The only differences seem to be (comparing sudo -i on the left and sudo su - on the right):    And comparing sudo -s (left) and sudo su (right):    The main differences (ignoring the SUDO_foo variables and LS_COLORS) seem to be the XDG_foo system variables in the sudo su versions.   Are there any cases where that difference warrants using the rather inelegant sudo su? Can I safely tell people (as I often have) that there's never any point in running sudo su or am I missing something?


Expand reputation change event when clicking date, not just arrow

Steps to reproduce:   Open the reputation on a profile () Click on the date next to the arrow.   The details aren't expanded, even though the td has cursor:pointer. If you click the arrow, the details are toggled as expected.  I think the click function should be bound to the parent td rather than the arrow a.    Note this issue still exists on the  since  rolled out on Meta.


How can I get a type(type object) with its friendly name(string)?

For example, I want to have a method to get typeof(int) from "int", typeof(List<int>) from "List<int>", typeof(Dictionary<string, int>) from "Dictionary<string,int>", etc. If the friendly name is an ambiguous one in the calling context, it's ok to throw an exception or simply return a null. I can use a dictionary to store the map for all built-in friendly types, but it would be too complicated to map every concrete generic type manually. I cannot find a way to build up all the friendly names I may need. Is there some "eval" method in C# like in some script languages? I.e. so I can simply run typeof with the friendly name as input and get a Type object reference as the return value?


Create Language plperl - Error: could not load library plperl.dll

When I create language plperl , I get error: ERROR:  could not load library "C:/Program Files/PostgreSQL/9.1/lib/plperl.dll": The specified module could not be found.  But in my computer,  "plperl.dll" file is exist in "C:/Program Files/PostgreSQL/9.1/lib/..." folder   ( I can not post illustrative image, this forum require >= 10 reputations)  And if I select * pg_pltemplate, I get:  -[ RECORD 4 ]-+------------------------- tmplname      | plperl tmpltrusted   | t tmpldbacreate | t tmplhandler   | plperl_call_handler tmplinline    | plperl_inline_handler tmplvalidator | plperl_validator tmpllibrary   | $libdir/plperl


Duplicates of duplicates should be remapped

I noticed today another example of duplicates of duplicates: that  (A) was closed as a duplicate of  (B), but one day later (B) was closed as duplicate of  (C). Sometimes I need to click many times from one question to another until I get to the master question.  I think that it's better if the question (A) is closed as duplicate of (C), and even if (B) has already (helpful) answers, (B) and (C) could be merged.  Is it possible to remap all duplicates to the master question, just like the tag synonyms?


What damage is done when you force shut down?

If I were to hold down the power button and choke my PC to death, what damage in any of the parts will happen? Will the hard drive screw up because it was writing something? What will happen?


How do we pass the field api name in lwc for a lightning data table?

I have fetched all the fields to be displayed on the datatable in my apex query.  In my js file where i store the column details  @track columns = [{         label: 'Deal Name',         fieldName: 'Marketing_Activity__r.Name',         type: 'text'                 },     {         label: 'Deal Type',         fieldName: 'Deal_Type__c',         type: 'text'      },     {         label: 'Rent',         fieldName : 'Rent__c',         type: 'currency'      },     {         label: 'Term',         fieldName : 'Term_Mos__c',         type: 'number'     },     {         label: 'Security Deposit',         fieldName: 'Aircraft__r.Lease__r.Security_Deposit_Amount_Cash_or_LOC__c',         type: 'currency'      }   It fetches value for rent,term and deal_type. but not for Security deposit and Deal Name. Any suggestions??? How to display the above details on the datatable in lwc?


understand the use of the Hölder inequality in a proof

The following  result is the interior gradient estimate for harmonic functions.  Suppose $u$ is harmonic in $B_{1} .$ Then there holds \begin{align*} \sup _{B_{1 / 2}}|D u| \leq c \sup _{\partial B_{1}}|u| \end{align*} where $c=c(n)$ is a positive constant, and $B_r$ is denoted the open ball in $\mathbb{R}^n$  centering the  origin with radius $r$.  I'm having trouble understanding some part in the proof of the proposition and it states:  By taking $\varphi=\eta^{2}$ for some $\eta \in C_{0}^{1}\left(B_{1}\right)$ with $\eta \equiv 1$ in $B_{1 / 2},$ we obtain by the Hölder inequality \begin{align*} \Delta\left(\eta^{2}|D u|^{2}\right)=& 2 \eta \Delta \eta|D u|^{2}+2|D \eta|^{2}|D u|^{2} \\ &+8 \eta \sum_{i, j=1}^{n} D_{i} \eta D_{j} u D_{i j} u+2 \eta^{2} \sum_{i, j=1}^{n}\left(D_{i j} u\right)^{2} \\ \geq &\left(2 \eta \Delta \eta-6|D \eta|^{2}\right)|D u|^{2} \geq-C|D u|^{2} \end{align*} where $C$ is a positive constant depending only on $\eta .$  I get trouble understanding how the Hölder inequality was applied here. Thank you in advance.


QGIS image export changes the map center and scale

I've been trying to export a few map layers using QGIS print composer. First, I loaded the layers and opened the composer using Project -> New Print Composer:    Gave it a proper name:   Added a new map:   Exported as image:   However, the outcome is shifted a few dozens of kilometers westwards:   This specific west shift is inconsistent; sometimes I experience a smaller shift or a shift in another direction. Moreover, the scale often changes too - which makes map exporting impossble.  I'm using the newest QGIS version:   Any idea how to export the image properly? I'm currently using screenshots, which are a poor solution.


Why is the display of summary statistics changed after normalizing data?

I posted  on stackoverflow.com and have not received any answer. In case I get an answer from one of them, I will inform on the other.  I am using describe() to summarize data before and after normalizing data. import pandas as pd import urllib3 from sklearn import preprocessing  decathlon = pd.read_csv("https://raw.githubusercontent.com/leanhdung1994/Deep-Learning/main/decathlon.txt", sep='\t') decathlon.describe()  nor_df = decathlon.copy() nor_df.iloc[:, 0:10] = preprocessing.scale(decathlon.iloc[:, 0:10]) nor_df.describe()  At first, I have  Then I have  Could you please explain why the display is different? In the second one, the number is, for example,  $4.100000e+01$. I feel that this display makes it hard to check that the mean and variance of each column are 0 and 1 respectively.


I almost have no clue regarding python and scripting, and I was wondering if there is a simple script to create two nodes in the shader editor.  Something like this:    UV map → Image texture  That's it. but every time I try to copy from the info window I get errors in the console, please help!


I extracted CodeIgnitor to XAMPP's htdocs and when I tried to access index.php like this:     h t t p://127.0.0.1/ci/index.php   I get the following error message:     Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. Error 403......   How can I troubleshoot this problem?


Is there any info about how the paintings function?

So in both the books and the films Dumbledore's (headmaster's) office is filled with the paintings of previous headmasters. Even if the person the painting is of is dead they are still there and able to respond.  Do we know whether the paintings can think for themselves and learn and grow in wisdom? - although the fact they can learn or at least remember is demonstrated frequently.  Do they answer with all the knowledge of, let's say, Dumbledore would?  In my mind it's akin to being a ghost, or I guess even a horcrux of sorts. Leave behind some soul within a painting?


Why do we have to factorize the function before taking its limit

I am learning about limits and there is something that I cant quite understand:  If we have the function:     $$ f(x) =\frac{x^2-1}{x-1} $$   Let's say that we want to see which value for y (image) the function approaches as x (domain) gets closer to 1. On a nutshell, we have to take this following limit:     $$ \lim_{x\to1}\frac{x^2-1}{x-1} $$   As soon as we look to this function, we realize that the function is not continuous at x = 1 (By the way, can I say that?).   I know the algorithm to figure out the solution of the limit:  First, there is the need of eliminating the function discontinuity. Usually, it is just a matter of factorizing the function into a new function which the exactly same image as the one before with one crucial difference: The function is continuous for all real numbers   My doubts:Is my way to think about it correct? Can I think like that?  Take the example above:       $$ f(x) = \frac{x^2-1}{x-1} $$   After factorizing, we get:  $$ f(x) = {x+1} $$  If we plot both functions, they are the same, although the second one has its continuity all along the real numbers domain  Thanks in advance


Run a command when system starts for any users

How can my system run a command every time that it is started?  Is there any script that the system runs when it is starting?  I'm using CentOS 6.2.


How do I describe higher language verb types?

For example, present tense is "God blesses you" but there is another form which is "God bless you" in which "bless" is a different verb tense.  What is that higher verb tense that we use in more formal or higher forms English.


Bolzano-Weierstrass Theorem Proof Abbott (Ax. of Choice)

In Abbott's Proof of the Bolzano-Weierstrass Theorem, does Abbott use any form of the Axiom of Choice ?   I think he is since he chooses an $a_{n_k} \in I_k$ where there are multiple such $a_{n_k}$.


Is separate DS -160 form needed for my baby for US B1/B2 visa? and should I pay a separate fee for him(= 160 US$)?


I am attempting to defeat all of the bosses, to beat Terraria. This includes hard mode.   Who are the main bosses, throughout both regular and hard mode? Is there a particular preference I should take in defeating them?  It would definitely be worth considering multiple platforms, and the optional bosses, to make the answer more useful to other users.


Detect internet connectivity using JavaScript or jQuery?

I want to check if internet is available or not when the web page loads. I want to do this in order to:   disable like buttons request if offline, during development load local links if no network, otherwise load from HTTP call more data from server in appcache based offline apps only if user is online   How do I achieve this?


I am trying to solve a recursive function:  $$ T(n)= 2 T(n/2)+n \lg(n), \quad n>2,\quad T(2)=2,\quad n = 2^{k}$$  Master theorem didn't work. The result is pointless (if I did it right).  Any suggestions?


How can I make columns in Linq query rows?

I have a table which contains rows like below  Month - Agent   - ResolveCount   1     - John    - 14     1     - John    - 12            2     - Smith   - 64               2     - Smith   - 23            My Model:  public int Month { get; set; } public Agent Agent { get; set; } public int ResolveCount { get; set; }   My Linq Query     List<ResolveMonthlyAgentReport> _result =         (from t in ConversationCollection.AsQueryable<Conversation>().AsEnumerable()         where t.CompanyId == _companyId && t.CreateDate.Year == _year && t.ResolvedDate != null && t.ResolvedAgentId != null             group t by new { t.CreateDate.Month, t.ResolvedAgentId }             into grp             orderby grp.Key.Month             select new ResolveMonthlyAgentReport             {             Agent = _agentList.Where(p => p.AgentId.ToString() == grp.Key.ResolvedAgentId).FirstOrDefault(),             Month = grp.Key.Month,             ResolveCount = grp.Count(t => t.ResolvedAgentId == grp.Key.ResolvedAgentId)              })         .Where(p => p.Agent != null)         .ToList();   Result:  Month - Agent   - ResolveCount   1     - John    - 14     1     - John    - 12            2     - Smith   - 64               2     - Smith   - 23       . .  This is the result I Want:  Agent    - 1.month - 2.month - x.month John     - 14      - 12 Smith    - 64      - 23   How should my linq query be?


What is the best program for backing Ubuntu up to a hard drive?


When did you marry? Or get Married ? Why?

I saw a lesson in English, said in Past Simple the following examples:        When did you get married?   When did you graduate?      Now, Why he said at (1) "get married" NOT "marry" like "graduate" in (2). ??


Determine highest .NET Framework version

I need to determine the highest .NET framework version installed on a desktop machine from C\C++ code.  Looks like I can iterate the folders under %systemroot%\Microsoft.NET\Framework, but that seems kind of error prone.  Is there a better way?  Perhaps a registry key I can inspect?  Thanks.


The following paragraph is an excerpt from  entitled “Is North Korea a Nuclear Threat or Not? The President Now Says It Is” published on 22 June 2018:     “They [Trump’s supporters] said that by talking with Kim Jong-un, Donald Trump was going to start World War III,’” Ms. [Lara] Trump said. “And yet here we are on the cusp of a denuclearized Korean Peninsula,” she said, adding, “They won’t try and stop a loser, but they will try and stop a winner.”   What does the construction “They won’t try and stop a loser, but they will try and stop a winner” mean?


Troubleshooting memory pressure - how to avoid paging out SQL Server?

I have received the email below that states that an alert has been fired and     a significant part of SQL Server process memory has been paged out   should I raise the Minimum server memory to 1740 too?     Microsoft SQL Server 2005 - 9.00.5000.00 (X64)    Dec 10 2010 10:38:40      Copyright (c) 1988-2005 Microsoft Corporation   Standard Edition   (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)     There are other applications, even monitoring applications running on that server.   You can have a glimpse of those applications by looking at the picture below.    We received an alert at 12:15:37 PM on the wrsleic1 default instance that "a significant part of SQL Server process memory has been paged out."  We've investigated the alert and found that SQL Server previously reported this condition last year on 13/04/2015. SQL Server is currently allocated a maximum memory of 1.7 GB while the server has 4 GB physical memory available to it (and a dynamically sized page file that is currently 5 GB).  At the time of the alert SQL Server had it's maximum memory reserved while not necessarily actively using the cached data. Therefore when the server detected memory pressures from an external process (potentially IIS but we can't determine this retrospectively), SQL Server trimmed its working set to accommodate the requirement and is currently utilising approximately 900 MB.  The OS is responsible for memory management and SQL Server is designed to respond to memory release requests as it did at the time of the alert. Therefore if there was no perceivable impact to performance on the application that uses the hosted databases on this instance then we don't recommend any further action.   Lock Pages in Memory   The lock pages in memory has not been enabled for any sql server account.    I was going to change this, however, I decided to leave this server as it is because:  1) it is running on standard edition sql server 2005 SP2 and       Standard Edition Up until SQL Server 2005 SP3 Cumulative Update   Package 4 and SQL Server 2008 SP1 Cumulative Update Package 2 'Lock   Pages in Memory' was not supported in SQL Server Standard Edition.   2) after enabling it - needs a reboot      Question:         “Weather we require Lock Pages in Memory in SQL   Server 64-Bit”?      Answer:            YES   3) We should (hope so) migrate this server to sql server 2014 soon    and a reminder:


Compare two strings by order in alphabet in java

I have two Strings:  String string1 = "Abcdef" String string2 = "Axyz"   I usually code in python, so I'm really new to java. How do I compare these to strings and find out which one would come first in a dictionary(I mean the book not the datastructure)?


I'm fairly new to QGIS, but I'm getting the hang of it. I have two layers - one DEM and one raster made from shape file (Buildings), but need one with higher Elevation where the buildings are for terraflow. But I can't seem to get the raster calculator to work with if Statement. I found a Workaround by assigning a fixed elevation value to the building raster, that is higher than any Point on DEM.  But on DEMs with high Elevation difference this means that some Buildings are over 50m tall!!!  would like to make an if statement like this:  A  B A = DEM  B = Buildings  if(B>A,A+10,A)


Can I use exposure compensation in manual mode with auto ISO on a Canon DSLR?

When I use the auto ISO setting in manual mode I can not find a way to dial in the exposure compensation on my Canon 550D. Is this possible at all?  I encountered this in a situation where I wanted to fix my aperture and shutter speed for a time-lapse movie, but as the environmental lightning changed randomly (so bulb-ramping was not possible), I wanted to set my ISO to auto. However, this made the shots look too bright, hence I looked for a way to dial in an exposure compensation value.


How can I increase my test class code coverage above than 75 % for vf controller apex class?

I am new in salesforce development and I am new in test classes. Now I am trying to increase code coverage for vf page controller. Now it's showing 50% but I need more than 75% .. please any one help me for giving good suggestion for increasing the code.


Is it considered embarassing if adding a dedication to the family on the second page and giving credit in the acknowledgement section in the end for the support during hardships in an undergraduate thesis? What's too much and of disadvantage? Or is an undergraduate thesis quite forgiving and the question of 'too much' isn't an issue here?


How do I set the proxy to be used by the JVM

Many times, a Java app needs to connect to the Internet. The most common example happens when it is reading an XML file and needs to download its schema.  I am behind a proxy server. How can I set my JVM to use the proxy ?


My timeline has moved to the top window on my project somehow.  How do I move it to the bottom of the layout?


When I ran  on my code, for example:      if (some condition)     {         Some code...                 }   ReSharper gave me the above warning (Invert "if" statement to reduce nesting), and suggested the following correction:     if (!some condition) return;    Some code...   I would like to understand why that's better. I always thought that using "return" in the middle of a method problematic, somewhat like "goto".


Delete user profile from command line Windows 7

Frequently I need to delete all of the user profiles on a computer except for two accounts. I would like to have a script that can perform this for me.  The script must work for Windows 7.  Company policy makes it difficult to download and use any third party utility, so downloading a tool that can accomplish the task is not an acceptable alternative.  Currently I have a vbscript that performs other related functions so if I could do it in VBscript that would be great. If there is a way to do it straight from the Windows command line, that works too I can just call that from my VB script.  I've looked online and I cannot find a way to do this with either VBscript or with a microsoft cmdline utility that comes installed by default on Windows 7.  Does anyone know how I could perform this?


How to fix dark theme issues with Firefox

Since the update to Ubuntu 18.04 I use the dark theme 'Adwaita-dark' and have several input fields in Firefox there are not usable. The background and the color of the font is dark, similar colors.  It would not be set a alternate theme, like the light theme of Adwaita that mentioned in . I search for an solution that leave the dark theme about all applications.  How is it possible to fix theme to use the input fields, see the strings to input the right content?  The screenshot below in Google Drive should illustrate the problem on the title field on left side, right from the 'doc' icon.


I have a string which I want to cast to a byte array, however, my string is the actually representation of an image byte array (eg. String x = "00123589504e47..."). So, I'm stuck because doing x.getBytes(); doesn't do the job.. I need a way to cast the string to byte array and then save that byte array to an image in a specific directory. How can I cast it?


Is there some way to PUSH data from web server to browser?

Of course I am aware of Ajax, but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data. This increases server load.  Is there any better method (even using Ajax) other than polling the server frequently?


How to exclude a package from apt-get autoremove?

I'm in a situation where the list of orphaned packages to be removed by apt-get autoremove includes a package that I want to keep. Apparently I have accidentally removed a package which was depending on it. How can I now mark the package as explicitly desired, so that apt-get autoremove will not remove it?


let $k$ be an integer, and consider the set $S$ of functions from $\mathbb{N}$ to $\mathbb{N}$ where $g(x) =0$ for all $x>k$. I want to show $S$ is countable.   This is what I have so far, but I am not quite sure if I am going about it correctly, or what to do next.  So our functions will look like this   $A_1=\{(1,a_1),(2,a_2),(3,a_3),(4,a_4),....,(k,a_k), (k+1,0), (k+2,0)....\}$   It seems from here I should be able to show that there are only countable ways of doing this, but I am not quite sure how to say that. I think the best way would to come up with a bijection from the naturals to $S$ but for the life of me I can't come up with one.  I would love some help. Thanks in advance.


What is the meaning of tuple under function definition

recently, I read codes from   In lib/fast-rcnn/models.py, there are lots of tuple-under-function style code. for example, _vgg_fc()  def _vgg_fc(self):     (self.feed('conv_out', 'rois')     .roi_pool(7, 7, 1.0/16, name='pool5')     .fc(4096, name='fc6')     .dropout(self.keep_prob, name='drop6')     .fc(4096, name='fc7')     .dropout(self.keep_prob, name='vgg_out'))   I wonder what is the different from the code below?  def _vgg_fc(self):     self.feed('conv_out', 'rois')     .roi_pool(7, 7, 1.0/16, name='pool5')     .fc(4096, name='fc6')     .dropout(self.keep_prob, name='drop6')     .fc(4096, name='fc7')     .dropout(self.keep_prob, name='vgg_out')


how to set my image example number as image number

I have application with which I am generating my PDF from various chapters and sections, by adding and removing chapter and sections. So I found problem with example numbers and image numbers. For example I am writing in chapter 2 that Something is shown on example image (2.1) and there is image 2.1. But if I remove chapter 1, my chapter 2, becomes chapter 1 and my image number is 1.1, not 2.1 . How can I set my example numbers correct?  Thanks.


How can I disable automatic addition of keyboard layouts in Windows 10?

I don't know how did it happen but I'm used to FR layout yet it keeps installing US layout.  Is there a way to lock them to those two layouts FR and AR (SA)?


I tried to post an answer in the   I got this:    ...but I am able to  in the formatting sandbox    ...and I have more than 10 rep on MSE:    One needs 10 reputation to post an answer in a protected post, but I have more than 10, and I am allowed to post comments, which is a 50 rep privilege.  Then why am I not allowed to post an answer in the formatting sandbox?


What are the principles for setting a dslr camera to capture motion blur while panning with a moving subject?

When following a moving subject carefully by panning the camera, I want to keep the subject steady in the frame and avoid any vertical movement while panning. The goal is to capture the object of the shot with a streaked background while camera is in motion panning and keep the moving subject is sharp.


Given the factors of $N$, is there a method for computing the factors of $N-1$ or $N+1$?

Given the prime factorization of $N$, is there a known method for computing the prime factorization of $N-1$ or $N+1$, which is more efficient than the best known method for doing that without it?  I assume that the factors of $N$ can be "skipped" while searching for the factors of $N-1$ or $N+1$, but I don't see how it can improve the general case performance (i.e., for any given value of $N$).  UPDATE:  This question can also be stated as follows: is there a known method for computing the prime factorization of $N$, given the prime factorization of either one of its neighbors (which is more efficient than the best known method for doing that without it)?


I'm a C/Python programmer in C++ land working with the STL for the first time.  In Python, extending a list with another list uses the .extend method:  >>> v = [1, 2, 3] >>> v_prime = [4, 5, 6] >>> v.extend(v_prime) >>> print(v) [1, 2, 3, 4, 5, 6]   I currently use this algorithmic approach to extend vectors in C++:  v.resize(v.size() + v_prime.size()); copy(v_prime.begin(), v_prime.end(), v.rbegin());   Is this the canonical way of extending vectors, or if there is a simpler way that I'm missing?


Proving that a continuous map is surjective

Let $f:\mathbb{R}\to \mathbb{R}$ be a continuous map such that $\overline{f(\mathbb{N})} = \mathbb{R}$. Prove that $f$ is surjective.  I tried to use the definition of the continuity and $\overline{f(\mathbb{N})} = \mathbb{R}$ to show that $f$ is surjective but it didn't work. Since $f$ is continuous, the preimage of every open set is open. Also it results in $f(\overline{A})\subseteq \overline{f(A)}$ for every set $A$. How this couples with $\overline{f(\mathbb{N})} = \mathbb{R}$ to show surjectivity?


I have seen this everywhere but how do I show that : if $a$ is an element of order $n$ in a group $G$ then the order of $a^k$ is $\frac {n}{(n,k)}$.  We know, since $a$ has order $n$, then $a^n = 1$


Using LaTeX, can we prevent others from editing pdf file properties?

After opening a .pdf file with Adobe Acrobat, go through menu File->Properties->Description tab, we can see the fields such as Author, Subject, Title, Keywords etc. If the .pdf file is created with LaTeX in the usual way, these fields are editable. How could we prevent this? For example, I have seen some .pdf files with these fields uneditable (grayed out). Maybe they are created with other softwares. Does LaTeX offer such functionality?  I know maybe I can use Adobe Acrobat to post-process the .pdf file generated by LaTeX, using password to add some restrictions. However, I don't quite need password protection. I just don't want someone else to change the Author field. And I want to have it all set up in LaTeX itself.  After looking at another thread, I found the solution: Use PDFtk(www.pdflabs.com). I only tried its Windows version. The Windows version comes with 3 kinds: PDFtk Free(GUI, free, limited functions cannot encrypt/decrypt), PDFtk Pro(GUI, not free, unlimited functions), PDFtk Server(command line, free, unlimited functions). I recommand the command line version.  For example:  pdftk unsecured.pdf output secured.pdf owner_pw abcd1234  will generate the file secured.pdf from the original file unsecured.pdf, and secured.pdf is encrypted with the owner password (please distinguish between owner password and user password) "abcd1234". By default it encrypts everything. However, it seems that whitespace is not allowed in the password.


I have successfully written a Bubblesort class.  Now I am trying to break the functions apart to make the code cleaner.  Here is the working code:  public class BubbleSortTest {      public static void main(String[] args) {         int[] array = {93, 60, 65, 45, 50};         bubbleSort(array);         printArray(array);     }      public static int[] bubbleSort(int[] array) {         for(int i = 0; i < array.length - 1; i++) {             for(int j = 0; j < array.length - 1 - i; j++) {                 if(array[j] < array[j + 1]) {                     int temp = array[j];                     array[j] = array[j + 1];                     array[j + 1] = temp;                  }              }          }          return array;     }      public static void printArray(int[] array) {         for(int i = 0; i < array.length; i++) {             System.out.print(array[i] + " ");         }     } }   For this example, I want to take the functionality of the if statement in the bubbleSort function and make it into its own swap function.  So the code I want would look like:  public class BubbleSortTest {      public static void main(String[] args) {         int[] array = {93, 60, 65, 45, 50};         bubbleSort(array);         printArray(array);     }      public static int[] bubbleSort(int[] array) {         for(int i = 0; i < array.length - 1; i++) {             for(int j = 0; j < array.length - 1 - i; j++) {                 if(array[j + 1] > array[j]) {                     swap(array[j + 1], array[j]);                 }              }          }          return array;     }      public static void swap(int largerElement, int smallerElement) {         int temp = largerElement;         largerElement = smallerElement;         smallerElement = temp;     }      public static void printArray(int[] array) {         for(int i = 0; i < array.length; i++) {             System.out.print(array[i] + " ");         }     } }   When I run the latter code, swap is essentially doing nothing.  I thought a fix to this was to create a non-void function to return the values, but I can't return both values without encapsulating them in an object (correct me if I'm wrong).  There must be something wrong with the swap function.  I'm probably missing something fundamental.  What's wrong with the latter code?


How can I later review guides shown at reputation milestones?

I want to know how to review guides that were shown to me when I  got a certain reputation. For example:   how to use '@' sign how to flag in posts how to edit posts how to accept answers   Some things are not shown in the FAQ sections. I don't want to search Meta for answers to questions, I want to review (or re-study.) Is there any way to get this guide again?   Specifically, I don't remember how to reply messages multiple guys by one message. I want to review (re-study) the guide for using @. I know if I want to review badges I can use my Notifications. What about for my other privileges?     UPDATE ( due to toolbar changes )   How can I view my privious privileges on meta site ?


Let X a continous variable and Y a binary variable with joint distribution : $$p(x,y;\beta,\rho_1,\rho_2,\phi_1,\phi_2)=\frac{1}{Z(\beta,\rho_1,\rho_2,\phi_1,\phi_2)}\exp(-0.5 \beta x^2+1_{y=0}\rho_1 x+1_{y=1} \rho_2 x+1_{y=0} \phi_1+1_{y=1} \phi_2)$$ with Z a normalising constant.  The conditional of X given Y is a Gaussian depending on Y and the conditional of Y given X is a Bernoulli variable whose probability $P(Y=1)$ is depending on X.  Is it possible to use Gibbs sampling?


Sorting a string vector based on an associated integer vector

I have two vectors   vector<string> names={"Raymond","Cynthia","David","William","Mike"}    , then I am doing a get_mark() call on each student to get   vector<int> marks={50,80,45,25,90} .    Now I need to sort both vectors based on marks of student,  i.e., result has to be  vector<int> marks_sorted ={25,45,50,80,90}    and   vector<string> names_sorted ={"William","David","Raymond","Cynthia","Mike"}   One method I can think is do sort of marks first then compare sorted and unsorted marks vector and then sort names, but is there an elegant way of doing this?  -Just adding one way of doing this for reference of someone else  #include "stdafx.h" #include <iostream> using std::cout; using std::cin; using std::endl; #include <vector> using std::vector; #include <utility> using std::pair; #include <algorithm> using std::sort; #include <string> using std::string;  int _tmain(int argc, _TCHAR* argv[]) {      vector<int> data ; data.push_back(5); data.push_back(16); data.push_back(4); data.push_back(99);  vector<string> names ; names.push_back("Crystal"); names.push_back("Bob"); names.push_back("Mynah"); names.push_back("TopNerd");  vector<int> index(data.size(), 0); for (int i = 0 ; i != index.size() ; i++) {     index[i] = i; } sort(index.begin(), index.end(),     [&](const int& a, const int& b) {         return (data[a] < data[b]);     } ); for (int i = 0 ; i != index.size() ; i++) {     cout << index[i] << endl; }       for (int i = 0 ; i != index.size() ; i++) {     cout << data[index[i]] << endl; }           for (int i = 0 ; i != index.size() ; i++) {     cout << names[index[i]] << endl; }          getchar();      return 0;  }


Can I pursue Masters in a field different to the one in which I got my Bachelors degree?

I will be graduating from BS Aeronautical Engineering in about 6 months. But over the last couple of years, I realized that I'm more passionate about Geopolitics, international relations and diplomacy. So, I'm thinking of changing fields in Masters. I intend to opt a degree in International relations, public policy and economics.   Now, as mentioned in the question, how difficult is changing majors like that? What is the attitude shown by universities toward applicants like me? And how do I go about convincing professors to take me in?


security - is this my public key? my private key? or the keys of the program I'm using?

I asked a recent, separate Ask Ubuntu question with the following in the body:  W: An error occurred during the signature verification.  The repository is not updated and the previous index files will be used.  GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease:  The following signatures couldn't be verified  because the public key is not available: NO_PUBKEY 76F1A20FF987672F   As you can see part of my error message exposes PUBKEY 76F1A20FF987672F. Was this the public key of WINE, or is this my own public key?  Most importantly, is this PUBKEY 76F1A20FF987672F information I should NOT be posting on a public forum (this one)?  I assume a private key is the only thing I would never want to divulge. I'm reading  page now, but it's a little overwhelming.


Can I leave Germany before my long term visa expires, came back after and take Schengen visa?

I'm brazilian, living in Germany with a type D visa (for internship) that expires on 31.07.2018. If I go to London(UK) and come back on 01.08.2018, can I stay here for 90 more days? I entered in Germany on 30.01.2018. So 01.08 will be more than 180 days.


Text editor to open big (giant, huge, large) text files

I mean 100+ MB big; such text files can push the envelope of editors.  I need to look through a large XML file, but cannot if the editor is buggy.  Any suggestions?