I need the format of the section titles to match with the default ones used in MS Word (actually with a bit different coloring), but I can't really find a way to change specificly the sections' format. What is the way of doing this?  (my LaTeX docs should look like some previously written Word docs)  What I have:    \documentclass[12pt,a4paper]{book} \usepackage{enumerate}           \usepackage[utf8]{inputenc}       \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amssymb}         \usepackage{amsmath} \usepackage[ a4paper, top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry}  \usepackage{fancyhdr}    \usepackage{color} \usepackage[hungarian]{babel} \usepackage{graphicx} \usepackage{titlesec} \usepackage{xcolor} \usepackage{sectsty} \usepackage{roboto}  \setcounter{secnumdepth}{3} \setcounter{tocdepth}{4}  \definecolor{darkblue}{RGB}{47,84,150} \definecolor{midblue}{RGB}{0,112,192} \definecolor{lightblue}{RGB}{0,176,240}  \allsectionsfont{\sffamily} \chapterfont{\color{darkblue}} \sectionfont{\color{darkblue}} \subsectionfont{\color{midblue}} \subsubsectionfont{\color{lightblue}}  \begin{document}      \chapter{Chap}     \section{lvl1}     \subsection{lvl2}     \subsubsection{lvl3}  \end{document}   What I want:    edit: I figured out coloring, added pictures and code, I'm using MikTex


A Bounded Continuous Function on a Circle

Suppose $f$ is continuous and: $$ |f(e^{i \theta})| \leq M $$ Suppose: $$ |\int_{|z|=1}f(z)dz| = 2\pi M $$ I am trying to show that $f(z) = c \bar{z}$ for some constant $c$ with $|c|=M$


Preposition confusion - Do you learn somthing 'at' school OR 'in' school?

I know that we use the preposition at to describe a place. I learned French at school is one of the examples I can think of.   I came across two examples that use the preposition 'in' with 'schools' in the context of 'learning'.   Example #1 from the  website:      Eleven things that you will never learn in school.   Example #2 from      Do you think the skills you learn in school will help you get the job you want?   The use that I had in my mind is here on      Should Parents Control What Kids Learn at School?


Use one password for administration and another for system login

How can I give a user one password for normal usage when logging in, and another password for system administration and sudo access? I want one user to have two passwords.


I'm designing an algorithm to do the following: Given array A[1... n], for every i < j, find all inversion pairs such that A[i] > A[j]. I'm using merge sort and copying array A to array B and then comparing the two arrays, but I'm having a difficult time seeing how I can use this to find the number of inversions. Any hints or help would be greatly appreciated.


Can a monster attack with the same action that it's using to hold a grapple?

I'm unclear on how attacks and grappling work with monsters as opposed to players. Let me elaborate my question.    With PCs, it seems clear to me. Let's say a PC has two creatures grappled and thus has no free hands. If the player attacks on its turn, it can make an unarmed strike against one of the grappled creatures (although it's not clear if it can use the hand that's grappling to make that attack: squeeze, crush, etc.).    Now in the case of a monster, it seems unclear because they have specific actions/attacks that can grapple. Can those same attacks be made even if they are holding the grapple? I'll use a couple of examples to clarify.  A  has two options for attack: Bite and Constrict (which grapples on a hit). If a snake hits character A with Constrict (A is grappled) on turn 1, and turn 2 rolls around, can it attack a still-grappled character A with Constrict, or must it use Bite?  A  has multiattack with Bite and Tail, but can't use them on the same target. If a T-Rex hits character A with Bite (A is grappled) on turn 1, can it then Bite a still-grappled A on turn 2, since it can't attack A with its tail?  I'm asking because because a lot of gameplay or monster strategy blogs seem to indicate in their examples that the answer to this is "no".


How should we cope with 12 month old waking in the night?

We are trying to get our 12 month olds sleep routine improved now that both of us will be returning to work.  We've been working on getting the settling routine sorted out each night, and haven't quite yet got to him falling asleep on his own, but he does now settle quickly at the end of the routine in our arms.  We will be moving to trying to get him to settle in his cot soon.  Once settled he will tend to do about 3-4 hours in his cot before waking screaming.  When cuddled he will settle down in about 10 minutes and can generally be put back in his cot.  However often he will wake several times.  Last night he went down at 8, woke at 10, woke at 12, woke at 1am.  Each time putting him back in his cot.   At that point we gave up and brought him into our bed where he slept through to 6am.  When waking up he is often on either all fours or standing in the cot whilst screaming.  The main problem is that he's no longer sleeping "solidly" and will often poke and prod his mum in his sleep, and she therefore doesn't get a great nights sleep.  And with us both back to work we both need our sleep as much as possible.


How to use Turnigy MultiStar ESC with generic microcontroller?

I just got the .  I have a motor and a battery hooked up to the ESC. On the three pin connector, I attached the brown ground wire to a ground pin, and yellow signal wire to a PWM-capable IO pin. I'm trying to figure out how to send motor signals to the ESC, with no luck. I know that I need to send PWM output through the yellow signal wire, but I don't know the frequency or high time of the PWM signal. Also, I've read that certain ESC's have an arming procedure, and I'm not sure how that works.  How do I control my ESC from a generic output pin hooked up to a microcontroller?


Recently my iCloud backup for my iPhone SE has grown and my 5GB free iCloud is almost full.  Is there a way to view what is included in the backup, to find the biggest items, and possibly remove them?  Note: I don't have a Mac computer.  About the duplicate: That question is about the next backup and it's size, this one is about the existing backup on iCloud. This are two different. My "Next Backup Size" is a mere 64 MB.


Factors of the form $4n+2$ $(n\geq 1)$ of a number N

I need to find the total number of divisors of $N =2^53^45^{10}7^6$ that are of the form $4n+2$, $(n\geq1)$.  My attempt:-  $4n+2 = 2(2n+1)$  Clearly exponent of $2$ is only $1$, no other option is there, so $2^1$  $3,5,7$ are themselves of the form $(2n+1)$ so all of their exponents except 0 will satisfy the relation.  So I thought that the exponent of $3$ can be - $1,2,3,4$  Exponent of $5$ can be $1,2,3,4,5,6,7,8,9,10$  Exponent of $7$ can be $1,2,3,4,5,6$  So according to me the answer would be $4 \times 10 \times 6 = 240$  But I also noticed that $2 \times 7 \times 3^0$ would also satisfy this...so I have to take the 0th exponent of 3 afterall. So how would I do this?


I am making manwiches for Halloween, how long can I keep it warm on the stove so that the kids can eat off and on during the day?


I need to find the limit: $$\lim_{x\to0}\frac{x\cot(x)-1}{-17x^2}$$ I've been tried L'Hopital and Taylor but it's not going so well.. thank in advance


Question:     Find out $\displaystyle{\int e^{\cos x}~dx}$.   My Attempt:  Let $\cos x = y$. Hence $-\sin x\ dx = dy$ or $$dx = \displaystyle{\frac{-dy}{\sin x}=\frac{-dy}{\sqrt{1-\cos^2x}}=\frac{-dy}{\sqrt{1-y^2}}}$$ So  $$\begin{align}\int e^{\cos x}~dx &= \int e^y\left(\frac{-dy}{\sqrt{1-y^2}}\right)\\ &=-\int\frac{e^y}{\sqrt{1-y^2}}~dy \end{align}$$  This integral is one I can't solve. I have been trying to do it for the last two days, but can't get success. I can't do it by parts because the new integral thus formed will be even more difficult to solve. I can't find out any substitution that I can make in this integral to make it simpler. Please help me solve it. Is the problem with my first substitution $y=\cos x$ or is there any other way to solve the integral $\displaystyle{\int\frac{e^y}{\sqrt{1-y^2}}~dy}$?


Play sound through two or more outputs/devices

I think this is a pretty simple concept.  I have one sound card and one pair of bluetooth headphones.  I want to play my audio through both my sound card and my bluetooth headphones.  I believe Windows has checkboxes allows you to "check" outputs to enable/disable them, but Ubuntu seemingly has the equivalent of radio selectors (you can only select one at a time).  Bonus Question: On a similar note, I have 5 analog output channels on my sound card (in addition to my digital & HDMI audio) -- I would like to be able to determine what comes out of each of those ports (e.g. "front speakers" on all 5 or "front", "center", "back", etc).  Thanks in advance!


A normal subgroup intersects the center of the $p$-group nontrivially

If $G$ is a finite $p$-group with a nontrivial normal subgroup $H$, then the intersection of $H$ and the center of $G$ is not trivial.


I am trying to do a 4-line multi-line match.  My code finds the first one.  But not the others.  Here is the pattern:  pattern = re.compile("([a-z]+\.com\.|net\.)[.\s\S]+(Z[A-Z0-9]+)")   Here is the subject:  sub = """yahoo.com. Public 8 Z2RVE9XGX4PFJN google.com. Public 7 Z2VATLWTLBDR5D """    Here is the complete code:  import re pattern = re.compile("([a-z]+\.com\.|net\.)[.\s\S]+(Z[A-Z0-9]+)")  sub = """yahoo.com. Public 8 Z2RVE9JJGX4PFJN google.com. Public 7 Z2VATZOPLBDR5D """  m = pattern.findall(sub)  print(m)   Here is the result:  [('yahoo.com.', 'Z2RVE9JJGX4PFJN')]   And finally, here is the desired result:  [('yahoo.com.', 'Z2RVE9JJGX4PFJN'), ('google.com', Z2VATZOPLBDR5D')]   Thank you.


Should I use exit() or just return statements in main()? Personally I favor the return statements because I feel it's like reading any other function and the flow control when I'm reading the code is smooth (in my opinion). And even if I want to refactor the main() function, having return seems like a better choice than exit().  Does exit() do anything special that return doesn't?


I would like to compute the value of this series:  \begin{equation*} \sum_{n = 0}^{+ \infty} n . e^{- \alpha n} \end{equation*}  Where $\alpha$ is a constant.


Is there a way to monitor processes starting in the system before they start?  Example: On programs like ZoneAlarm or Antivirus programs, when you run a program it asks you if you allow running this program or not before it runs...


I'm using Chrome, version 37.0.2062.124 m, and FireFox 22.0 and the computation gives me wrong result:  5*0.1 //the result is 0.5 6*0.1 //the result is 0.6000000000000001, it should be 0.6 7*0.1 //0.7000000000000001 8*0.1 //0.8   If possible to answer, how did they come up with this? If not, is there any library that does the job? I don't need new data type, float is enough, I just want this to get the correct result.


Can we use "to" before home, if we are using determiners (her, my, your etc.) before home?

I know these sentences are correct:     I am going home.      I am coming home.      I went home.   Please let me know, are these sentences also correct or not:     I am going to her home.      I am coming to your home.      I went to his home/house.   Or these are correct:     I went her home.      I am going her home.   Thanks in advance.


Sequential Continuity does not imply Continuity

We say that a function, $f: X \to Y$ ($X, Y$ are topological spaces) is sequentially continuous if $f(x_n)$ converges to $f(x)$ whenever $x_n$ converges $x$. Give an example of a function that is sequentially continuous but not continuous.  I tried letting $X$ be $\mathbb R$ with cofinite topology and $Y$ be $\mathbb R$ with discrete topology where $f$ is identity map but $f$ is neither sequential continuous or continuous. There are no simple solutions online since most use ordinal sets and we have not yet covered that in our topology class.


How to Batch change file extensions within subfolders

I am very new to Command Prompt, and only started using it as of 1 day ago.  I have a folder in a location, for example C:\Users\Administrator\Desktop\Images, and inside that folder there is roughly 650 sub-folders, each containing around 20 images, a mix of JPG's and PNG's. I am looking for a command line for CMD which will go through all sub folders and change each .png file into a .jpg file.  I have done a little research and found some information, however it is very hard to follow and understand, and I am still unable to do it. I am wanting to keep the file names, however change each file extension from a .png to a .jpg.  I understand that for 1 folder, the line is something like ren *.png *.jpg. However, this does not apply changes to subfolders.


Mark two partition as bootable on flash drive

I have a 64GB flashdrive split in to two partitions.  First partition (45GB).  1. Boot-able (grdlr) 2. Uses Easy2Boot 3. Has several bootable iso's on it using Easy2Boot 4. It is formated as FAT32   Second partition (19GB)  1. Boot-able (bootmgr) 2. Has a windows 7 32bit on it. 3. It is formated as ntfs   The problem that I am facing is that I can only have one marked as boot-able, so to change I have to put my Puppy Linux Live CD in my computer and make the other partition as boot-able and this can be a real pain. So if any on knows how I could make it give me the option to chose which partition I want to boot from. Thanks in advance.


Why does the dock appear on the left when my screen is locked?

The dock doesn't work correctly after I enter my password, either.


I didn't think I had to add an extra z when making it plural, but I did. Why is that? Just some weird anomaly like so many things in English spelling? Or is there a history behind it?


I really like WinKey+TAB, except the only real use I have for it is to effectively move through my windows like I do with CTRL+TAB in Chrome.  Is there any way to disable this visual effect and just have my windows flash like tabs on my computer (I already have all visual effects disabled)?  If this question is chosen to be reopened great, but I did eventually find a solution to this issue:              Create D_WORD value LivePreview_ms with a value of 1 within:      HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AltTab


I am tying to integrate $a_n= \frac{1}{L} e^x\sin\left(\frac{n\pi x}{h}\right)dx$ and get the solution in sinh form.  I have gotten the long answer, but cannot figure out how to turn it into sinh. Can someone help me with the steps?


Why is fine focus adjustment sometimes necessary on DSLRs?

Many DSLRs have a "fine focus adjustment" option, stored in the camera per lens.  Why is it that some lenses need this?   Why do some lenses not project a focused image onto the sensor when the camera body has adjusted it to a point where it believes focus is correct?   I assume this is a side effect of NOT using the sensor itself to confirm focus, using the phase detection array instead...


Render is duplicating random frames when loaded into 3D tracker

I am trying to render an edited clip at 23.98 fps for use with motion tracking in a different project that shares the same frame rate. However, when I go to the tracker when the rendered clip is loaded, some of the frames show up twice in a row, thus throwing off the whole track. Any idea why this is happening?


What is the most general way to compute (formally not numerically) the following integral:  $\int_\mathbb{R}\exp(iuz - \frac{(x-z)^2}{2t})dz, \space t>0$


Difference between datatype*  vs. datatype *

I studying how to create linked lists in C. Take a look at .  First he creates the structure using the following code;  struct node  {   int data;   struct node *next; };   Its clear that *next is a pointer variable of the type node.  But when he goes forward, he does this;  struct node* head = NULL; struct node* second = NULL; struct node* third = NULL;   Now here I have a problem comprehending what he is trying to do; is he creating nodes of the names, head, second and third? or he is simply trying to create pointer variables of the type node?  Since he puts them equal to NULL; I'd assume he is trying to create pointer variables. But couldn't he do the same using this?  struct node *head = NULL; struct node *second = NULL; struct node *third = NULL;   Thanks


From Maxwell equations, Gauss Law read: $\nabla\cdot\vec{E} = \rho/\epsilon_0$ Integrating this divergence over some volume and applying the Divergence theorem leads to: $\int \vec{E}\cdot d\vec{S} = Q/\epsilon_0$ One could think that going into a 2D world (flatland) would change Gauss Law by: $\int \vec{E}\cdot d\vec{l} = Q/\epsilon_0$, but this is not a result we would get from applying this dimension reduction to the differential form of Gauss Law, is it? The same problem applies to a 1D world


I want to create my own light source using high power 1W LEDs. Can I solder high power 1W LEDS on aluminum with 60/40 solder?


What is the variance of the mean estimator of simple linear regression?

While my textbook explicitely writes down the mean and variance of the simple regression coefficients, I am interested in knowing $\text{Var}(\beta_0 + \beta_1 x)$ for a fixed $x$. My attempt is to write $$\text{Var}(\beta_0 + \beta_1 x) = \text{Var}(\beta_0 )+xVar(\beta_1)+x\text{Cov}(\beta_0, \beta_1)$$. Yet I am stuck trying to figure out how to compute the covariance term. I would appreciate thoughts on how to calculate this quantity.


Use English in Equations and Hebrew in Regular Text

I use Lyx in Hebrew, which means regular text is written in Hebrew, but equations are of course written in English. I used to have an installation, which (I believe by accident during installation process) every time I entered any equation environment, my language was auto-set to English. Then, returning to regular text it was again auto-set to Hebrew.  This was very convenient, as it saved me the trouble of changing languages all the time, and of course there is zero use of Hebrew in math except Aleph for cardinality.  I now wonder whether there is a more conventional way to achieve this without trying to make random mutations to Lyx installation processes. Thanks!


Write down the sum of sum of  sum of digits of $4444^{4444}$

Let $A = 4444^{4444}$;  Then sum of digits of $A = B$; Then sum of digits of $B = C$; Then sum of digits of $C = D$;  Find $D$.  What should be the approach here?


How can I set the value of a DropDownList using jQuery?

As the question says, how do I set the value of a DropDownList control using jQuery?


Is it possible to specify a Java classpath that includes a JAR file contained within another JAR file?


Is it good practice to label edits as "Edit"?

Is it recommended to write post edits to the bottom of a question and start them with "EDIT"?  Example:     EDIT: I tried to do x, y, and z, but they didn't work.


For a person without a comp-sci background, what is a lambda in the world of Computer Science?


Can you store a Twinned (metamagic) Spell into a ring of spell storing?

says:  Any creature can cast a spell of 1st through 5th level into the ring by touching the ring as the spell is cast. The spell has no effect, other than to be stored in the ring.   says:  When you cast a spell that targets only one creature and doesn’t have a range of self, you can spend a number of sorcery points equal to the spell’s level to target a second creature in range with the same spell.  Can I use metamagic to cast a twinned spell into the ring, (meaning anyone can cast that spell twinned out of the ring) and if so are there any additional restrictions?


Can I install Ubuntu on dell inspiron 3521 with windows 7


Where I could find this particular typrewriter-like font in lyx?

I'm writing my thesis in philosophy using Lyx and found out that most of them are written with this particular typewriter-like font. Could someone tell me where i could find this font? Does Lyx already provide a similar font?   Thanks to everybody


Can I measure a journey time < 100 years on a 100 light year voyage?

So, I'm traveling to another star 100 light years away in my spaceship. This ship has a solar sail pushed by a laser beamed from my home star system, so can achieve a velocity close to c. It's also got a robust parachute to slow down with.  I understand that if I measure light coming from my origin star, it will always still seem to be streaming past me at light speed (but will red shift as my speed increases). Light coming from my destination star also travels past me at light speed, and will become increasingly blue shifted as I gain speed.  I also understand that an observer checking on my speed at my origin or destination will always find it to be less than c.  However, will I perceive that in terms of the time it apparently takes me to reach my destination, my speed was greater than c? In other words, will it seem to take less than 100 years to reach the destination? 10 years on my watch, say. Or 1 year. Or a week?  Ie, as far as I'm concerned, while light keeps zipping past me at light speed, do I continue to accelerate unabated to an arbitrary apparent speed?  If not, how do I notice my continued acceleration being prevented?


Make suggested questions that might have my answer aware of the tags

I'm currently writing a questions about namespaces for c++. After writing the title, SO will propose related answers to my question from title only. Unfortunately (very fortunately really), namespaces apply in many languages so unless I make a specific reference to c++ in the title, the suggested answers will not be aware of the target language for my question.  I thought that editing the tag sections of the question then going back to the question title would prompt different suggestions but it did not.  My question title is "Global namespace is not checked in other namespaces". I do agree that it is not the finest title, but I have trouble formulating a correct question since I understand my problem poorly for the moment.    This is what I get after typing in the title for suggested questions:        Note that none are for C++. This list does not update after adding the body or tags.


Find all $f$ such that $f(xy+f(x))=f(f(x)f(y))+x, \forall x,y\in \mathbb{R}_{>0}$

Find all functions $f:\mathbb{R}_{>0}\rightarrow \mathbb{R}_{>0}$ such that $$ f(xy+f(x))=f(f(x)f(y))+x, \forall x,y\in \mathbb{R}_{>0} $$  If someone can give me a hint for this question I would be very grateful. edit: We can see that $f$ is injective because: $f(x)=f(y)$ then the equation above tell's that $x=y$.


How to stop the person using my stole phone what app?

Since my phone been stolen..I already blocked my phone..so the new SIM card resend back..when I install at new phone.i find out my what app still been use...so what should I do now?


Is the value of the sum $1-1+1-1+1-1+\cdots$ does not exist?

Let $a_k:=(-1)^k$ where $k\in\mathbb{N}$. $\mathbb{N}$ is the set of all non-negative integer.  And we define the partial sum $S_n:=\sum \limits_{k=0}^{n}a_k$. Notice that the sequence $\{S_k\}$ diverges which also implies that the infinite series $\sum \limits_{k=0}^{\infty}a_k$ cannot be defined.  If I consider the infinite sum $1-1+1-1+1-1+\cdots$, then this statement is equivalent that I just defined the infinite series $\sum \limits_{k=0}^{\infty}a_k$, which is contradiction.  But, suppose that the sum $1-1+1-1+1-1+\cdots$ exists and let the value of the sum be $S$. Then, we can easily observe that $S=1-S$, therefore $S=1/2$. The supposition of this proposition already proved as false, but if I ignore the definition of infinite series, it holds.  Which one is right? Or are these propositions depends on what we define?


Unity: getting a maximum of 10 out of 20 questions quiz game Multiple Choice

So I have followed the tutorial of the Unity Quiz game and wondered that If i want the game to present only up to 10 questions but the pool of questions have 20 or so so this is the script from the tutorial that I have somewhat edited.     I have a script called Game Controller   void Start()         {             dataController = FindObjectOfType<DataController>();                                // Store a reference to the DataController so we can request the data we need for this round          currentRoundData = dataController.GetCurrentRoundData();                            // Ask the DataController for the data for the current round. At the moment, we only have one round - but we could extend this         questionPool = currentRoundData.questions;                                          // Take a copy of the questions so we could shuffle the pool or drop questions from it without affecting the original RoundData object          timeRemaining = currentRoundData.timeLimitInSeconds;                                // Set the time limit for this round based on the RoundData object         UpdateTimeRemainingDisplay();         playerScore = 0;         questionIndex = 0;          ShowQuestion();         isRoundActive = true;     }   void ShowQuestion()     {         RemoveAnswerButtons();          QuestionData questionData = questionPool[questionIndex];                            // Get the QuestionData for the current question         questionText.text = questionData.questionText;                                      // Update questionText with the correct text          for (int i = 0; i < questionData.answers.Length; i ++)                              // For every AnswerData in the current QuestionData...         {             GameObject answerButtonGameObject = answerButtonObjectPool.GetObject();         // Spawn an AnswerButton from the object pool             answerButtonGameObjects.Add(answerButtonGameObject);             answerButtonGameObject.transform.SetParent(answerButtonParent);             answerButtonGameObject.transform.localScale = Vector3.one;              AnswerButton answerButton = answerButtonGameObject.GetComponent<AnswerButton>();             answerButton.SetUp(questionData.answers[i]);                                    // Pass the AnswerData to the AnswerButton so the AnswerButton knows what text to display and whether it is the correct answer         }     }      The script that Hold the Questions and Answers   using UnityEngine; using System.Collections; using UnityEngine.SceneManagement;  public class DataController : MonoBehaviour  {     public RoundData[] allRoundData;      void Start ()       {         DontDestroyOnLoad (gameObject);          SceneManager.LoadScene ("MenuScreen");     }      public RoundData GetCurrentRoundData()     {         return allRoundData [0];     } }


Resources for studying different set theories

Ok so lately I have been fascinated about general structure of mathematics and I have read some books on set theory.  I have gone through the Endertons introductory book on set theory which operates in ZFC,but I have understood that use of classes simplifies many things,that is how I got to know about NBG set theory.  Lately I have heard of many other set theories such as Morse-Kelly ,ZF,Tarski-Grothendieck set theory.  I would like to get some resources which explain these theories and how they relate to one another,and what are the pros and cons of each theory.  Thanks in advance


What is the bold part on monitor and some charger cables

On many monitor or chargers, there is a bold part:    First of all, what is it called?  Then, what does it do?  Does a cable without this part have any advantages as we see nowadays many chargers don't have this part anymore?


I have a table that shows 10 record and whenever i click on 'create PDF' button..whole page is rendered as PDF..But i have a requirement that if i select lets say any 5 record from the table using the check box..then only that records should appear in the pdf  my vf page:  <apex:page controller="queryaccountrecords"  > <apex:panelGrid columns="2"> <apex:form > <apex:pageBlock title="Account_Records"> <apex:repeat value="{!accts}" var="dbItem"> <apex:inputCheckbox id="ankita"/> <apex:outputField value="{!dbItem.Name}" />
 </apex:repeat> </apex:pageBlock> <apex:commandButton value="Create PDF" action="{!createpdf}"/> </apex:form> </apex:panelGrid> </apex:page>   my controller:  public class queryaccountrecords {     public Account[] accts{get;set;}     public queryaccountrecords()      {         accts= [SELECT Name FROM Account LIMIT 10];     }      public pagereference createpdf()     {     pagereference redirect = new PageReference('/apex/generatepdf');     redirect.setRedirect(true);     return redirect; }     }   page that is rendered as pdf:  <apex:page controller="queryaccountrecords" renderAs="pdf" showHeader="false" sidebar="false"> <apex:panelGrid columns="2"> <apex:form >  <apex:pageBlock title="Account_Records">  <apex:repeat value="{!accts}" var="dbItem"> <apex:outputField value="{!dbItem.Name}" />
 </apex:repeat> <apex:commandButton value="Create Pdf" action="{!createpdf}"/>  </apex:pageBlock> </apex:form> </apex:panelGrid> </apex:page>   can someone please help me?  Thanks Ankita Singh


What are the chances of encountering a shiny Ultra Beast?

I always wanted a shiny Kartana, so I soft reset Kartana all the time. I've been doing this for about four days now at 5000 light years. But I never find one, what is the chance?


Is there any performance difference between #include  and #include "filename"?

I understand the difference between #include <filename> and #include "filename" as answered in . Is there any performance difference between them? If yes, how do you prove the performance difference in this case? What is the best use case for each?


I have several plots saved as .pdf in a folder and I would like to know if there is a way of adding all of them in a document at once, without typing the path to each file.


How to create multiple graduated layers using different attributes/columns?

I have a shapefile for which I'd like to create multiple graduated layers for each attribute/column. At present, I manually duplicate the layer and then change the column from the drop down list, select a color ramp and update the classes. As I have numerous layers to create, how do I go about automating these steps? Can I do this using a python script?


How do I set up keyboard shortcuts that use the Super key?

I want the Super key to behave as a regular modifier key, just like Ctrl, Shift and Alt.  Currently, it doesn't.  Using the System Settings to set a shortcut like Super+Up will set the shortcut, but the shortcut will be unusable. Pressing Super+Up instead functions just like pressing a single Up. The Super modifier is ignored and the shortcut never gets activated. Likewise for shortcuts such as Super+W (i.e. it's like pressing an unmodified single W).  I've used CompizConfig to unbind all Unity-related shortcuts, but Super still behaves in this weird, special way.  How can I create keyboard shortcuts such as Super+W that work?


I have Lenovo Ideapad Y510 with dual core 1.6 Ghz processor, 1GB ram, 160GB HDD. I want to upgrade my current cpu with any latest one like i3, i5 or i7 to get more speed but don't know if it is possible. I don't know how to get all technical details of the pc so I have have attached a screenshot of boot screen, hope you will find all required info about my pc to answer this question.  I am a java developer so my basic need is to run eclipse and java application and application server with db like MySql very smoothly on my machine. Earlier I was using Win7 but machine was running slow so I switched to Ubuntu 12.04 but not much improvement so I thought to upgrade the cpu and memory. I need your suggestion that to which cpu I can upgrade and should I also upgrade ram.


Evaluate the line integral $\int_{C}^{ }xe^{y}ds$, where $C$ is the line segment from $(-1,2)$ to $(1,1)$.    I know that I need to first get a parametrized equation. I got $r(t) = [(2t - 1), (-t + 1)]$. I am not sure how to proceed.


how to set a static ip on ubuntu 14.04 which is runing on wmware workstation 10.

i configured master and slave setup. but some times after restart the machines wired ip address changes. how to set a static ip step by step. please help me thank you.


$[a+b]\geq[a]+[b]$ for all a,b belongs to Real number

At first I think of triangle inequalities  but it is totally different. Then I consider  that is this bracket symbolize anything in maths or these were just normal square brackets.  I am really not getting anything please help me with the proof.


concatenate each characters from 2 strings in a list

I'm trying to concatenate each character from 2 strings in a list. Also, is it possible to do it by using list comprehension?  s = ['ab', 'cde']   Result:  ['ac', 'ad', 'ae', 'bc', 'bd', 'be']


Taylor series $\sum_{n=0}^\infty a_n(z-z_0)^n$ of an holomorphic function $f$ has one null coefficient for all $z_0$ then $f$ is a polynomial

Let $f \in H(\Omega)$, where $\Omega \subset \mathbb{C}$ open.  Suppose that for all $z_0 \in \Omega$ the Taylor series associated to $f$ $$\sum_{n=0}^\infty a_n(z-z_0)^n$$ has one null coefficient $a_N$. How do I prove that $f$ is then a polynomial (without applying Baire's category theorem)?


I always wonder if I should put the punctuation after an inline formula inside the formula, like in \(x = 1.\)  or outside \(x = 1\).  Which is the correct choice, and why? The related question is about punctuation between formulas, so I think it is slightly different that this.


Do I have to buy or need a 3D-enabled phone to use Google Cardboard?

Google cardboard comes with 3D glasses. Does that mean that we will be able to watch 3D videos using a smartphone like the Moto-G (1st edition) which is not 3D enabled?


Difference between including / at the end of a directory path and and omitting it

I am just wondering is there a difference in what happens when I leave / at the end of a file path for example:  root /var/www/website.com/   And omitting it like:  root /var/www/website.com   How is this handled or is there a difference?


How can I interpret "energy" in signals?

I am learning about various signal processing methods in my university course, and I can't seem to grasp what 'energy' in signals represent. I mean, I know that it is the integral of the absolute value of energy squared (side question: why is absolute value needed?), but I don't know the meaning of what this energy is. Is there an intuitive way to think about these energies? Thanks a lot.


What's the intuition of the transpose of a matrix?

I know the transpose is to swap the columns and rows of a matrix. And $A^T$$A$ is a symmetric matrix which elements are the inner product of each column of $A$. But I didn't understand the intuition of transpose. Suppose $A_{m \times n}$, and A transform a vector from $\Bbb R^n$ to $\Bbb R^m$. But $A^T$ transform a vector from $\Bbb R^m$ to $\Bbb R^n$. What's the relationship between them? Could anyone please explain the relationship between $A^T$,$A$,the inner product and symmetric matrix. I think there would be a intuition explaination.


How to use recursive function in postgresql

I am a beginner and have a problem with recursive function,  I have 2 tables: table 1:  mzk_zlecenia id number type   table 2:  id_order type_of_relationship id_source   how can I do with this tree? using a recursive function?


When we express acceleration in plane polar coordinates, we can find that $\vec{a}= \left(\ddot{r} - r \dot{\theta}^2\right)\hat{r} +  \left(r \ddot{\theta}-2\dot{r}\dot{\theta}\right)\hat{\theta}$. Here, the first term indicates the radial acceleration and the second term indicates the centripetal acceleration.  Books say that the third term is the rate of change of tangential speed(?) and the fourth term is coriolis acceleration.        From the book An Introduction to Mechanics by D. Kleppner and R. Kolenkow.   Now, the book says that the coriolis acceleration in our expression here is a real one.  Can anyone explain me the true meanings of the third and the fourth terms with physical interpretations ?


I'm using a site created on Pantheon and now I'm not using pantheon.  So the core is not installed with composer. Now I want to upgrade core with composer but I don't understand how.  I've some modules installed with composer, so I try to add drupal/core :  compose require "drupal/core"   It's ok, but if I try to this, the aren't upgrades:  composer update drupal/core --with-dependencies   I've core 8.6.1 and I wanto to update to 8.6.2.  Thanks


First of all before i created this dao I was doing this operation in a helper class and it was working well. Now I'm getting a NullpointerException on this line where I call dao.   Student stu = pf.getUser(request.getParameter("st_id").toString());  I tried to trace it and find the problem but i couldn't.   I'm new in jdbc so any suggestions will be appreciated.   This is my student dao; program doesn't even enter the getUser method.   public class StDAO extends BaseDAO {      public Student getUser(String Id) throws Exception {         String query = "select * from students where id=" + Id;         ResultSet rs = execQuery(query);         return new Student(rs.getString("name"), Id, rs.getString("gpa"));     }      public void addUser(String id, String name, String gpa) throws Exception {         String query = "INSERT INTO students (name, id, `gpa`) VALUES ('" + name + "'," + id + "," + gpa + ")";         ResultSet rs = execQuery(query);     } }


Julián Aguirre gave a simple-amazing answer for this question:   Unfortunately, i don't understand how to deduce the last inequality $a+b-c<(a+b)/2$.  Somebody help me. I don't know what I'm missing.


I'm not going to lie to you. I want to become immortal. Yes, I'm fine with watching all my friends and relatives dying, never liked them much anyway. In fact, outliving a few of my obnoxious friends is exactly what I need... Oh, I would love to watch them shrink and wrinkle while I'm forever young.   So I've been doing some research. It turns out that very powerful druids have a  that allows them to age really slowly. That sounds cool but I'm not into druids. Too naturalistic, too neutral, too... dirty? Anyway, definitely not for me.   Then, there's the option of becoming a Lich. Well, I have to admit, that's a bit extreme even for me -- and that says a lot. That said, it's not out of the question... But I'd like to explore my options first.   Finally, I learned about a  that produces an exact copy of myself that stands inert until I die. When that happens, my soul transfers to this body and ta-da, I'm alive again. I have to admit, that this is by far the best option I know of so far (with the worst one being a druid). That said, the transfer of soul part sounds a bit scary.   So now I'm asking you, my dear shady, hooded person whom I just met in this awful tavern in the most infamous part of the city: How can I prolong my life? Remember that I'm not looking to become invincible (I wouldn't oppose it of course), just prolonging my life for as long as possible. Ideally, I would like to avoid complicated procedures such as transfering souls and the such (too much work) but for lack of better options I would do anything. Money and ethics, of course, are not a problem (never have been).   I've opened my notebook and I'm all ears. It goes without saying that if your solution is acceptable I will make you rich. Wench! Another drink for this person whom I cannot see the face of!


If $G$ is a group show that if $(a \cdot b)^2 = a^2 \cdot b^2$ then $G$ must be abelian.   $\begin{aligned}(a \cdot b)^2 = a^2 \cdot b^2 & \iff (a\cdot b)\cdot(a \cdot b) = (a \cdot a)\cdot (b \cdot b) \\& \iff a \cdot (b \cdot (a \cdot b)) =a(a \cdot (b\cdot b)) \\& \iff (a^{-1} \cdot a) \cdot (b \cdot (a \cdot b)) =(a^{-1}\cdot a)(a \cdot (b\cdot b))\\& \iff (b \cdot (a \cdot b)) =(a \cdot (b\cdot b)) \\& \iff (b \cdot a) \cdot b =(a \cdot b)\cdot b\\& \iff (b \cdot a) \cdot (b \cdot b^{-1}) =(a \cdot b)\cdot (b \cdot b^{-1}) \\& \iff b \cdot a = a \cdot b\end{aligned}$  Thus $G$ must be abelian. Is this right? Is there less clunky way to write it if it's?


Add spatial csv-layer in QGIS3.10 in a standalone script

I want to add a csv-layer by PyQGIS in a standalone script. This is my code: uri = 'file:///C:/Users/sml/Desktop/point.csv?delimiter=,&crs=epsg:4326&xField=x&yField=y' vlayer = QgsVectorLayer(uri, "point", "delimitedtext") print(vlayer.isValid()) QgsProject.instance().addMapLayer(vlayer)  The same code works fine in the QGIS Python console, but it can't work in a standalone script. I don't know why.


Why does the weighing balance restore when tilted and released

I'm talking about a Weighing Balance shown in the figure:    Press & Hold on onside of the horizontal beam and then release it. It makes some oscillations and comes back to equilibrium like shown in the figure.  Both the pans are of equal equal masses. When the horizontal beam is tilted by an angle using external force, the torque due to these pan weights are equal in magnitude & opposite in direction. Then why does it come back to it position? What's making it to come back?


Why is the link list merge function not working in Java?

The problem arises in the merge function at 'while(m.next!=null)'. It throws a "NullPointerException".   public class Linked {      node ptr1;     node ptr2;      void merge()     {         node m=ptr1;          while(m.next!=null)             m=m.next;         m.next=ptr2;     }      void printmerged()     {         node m=ptr1;          while(m.next!=null)             System.out.print(m.data+", ");         System.out.println(m);     } }


How to get the size of an array from over-allocated part of memory in C++

I wanted to dig into how delete [] is knowing how many elements it has to erase from memory. I found  which is pretty clear. I know the implementation is compiler-specific but I just have the problem here to get the correct size of the array from the memory. I have no direct need of this functionality, just want to understand more clearly. As stated at  the size of an array can be stored by over-allocating memory. char* tmp = (char*) operator new[] (WORDSIZE + n * sizeof(int));  Afterward, the pointer to the first array element is derived and the number of elements is stored at tmp pointer. int* p = (int*) (tmp + WORDSIZE); *(size_t*)tmp = n;  My assumption is here that in case of decrementing the p pointer two times (I assume WORDSIZE == sizeof(size_t) with sizeof(size_t)== 8 Byte) I should get the array size n. I made a small example  where I try to get the array size but somehow I get 49 instead of 40 as the array size in case of 10 array elements. int* tmp = arr - 2; std::cout << "Array size: " << *tmp << std::endl;  Address 0: 0x9efe70 Address 1: 0x9efe74 Address 2: 0x9efe78 Address 3: 0x9efe7c Address 4: 0x9efe80 Address 5: 0x9efe84 Address 6: 0x9efe88 Address 7: 0x9efe8c Address 8: 0x9efe90 Address 9: 0x9efe94 Array size: 49 <- In question  Probably my assumptions about WORDSIZE or the implementation in the compiler were wrong. What am I missing? I know about  but the answers are not really satisfying my question. For those who have problems with repl.it, the full example: #include <iostream>  void printMemoryLayout(int *arr, int n) {     for(int i = 0; i < n; ++i) {         std::cout << "Address " << i << ": " << &arr[i] << std::endl;     } }  int n = 10;  int main() {     int* arr = new int[n];      printMemoryLayout(arr, n);     int* tmp = arr - 2;     std::cout << "Array size: " << *tmp << std::endl; }  UPDATE: The compiler used was clang 7.0.0.3


Start of string to have one X and not 2 X's

I am trying to find a way of checking if a string starts with only one "X" but not 2 X's in a regular expression.  So I think I have tried  Regex.IsMatch(teststr, "^[^X]{1}?^[XX]"); Regex.IsMatch(teststr, "^[^X]{1}?"); Regex.IsMatch(teststr, "^[^X]{1}"); Regex.IsMatch(teststr, "^[^X]?");   The results should be, if string Starts with 1 X only then give me all except the ones that start with only 1 X. A string with 2 X's is allowed


I've read many articles that use the term 'emergency services ' and ' location services' .   Why not service instead? Why must it be plural? Thank you


Should I test private methods or only public ones?

I have read  about how to test private methods. I usually do not test them, because I always thought it's faster to test only public methods that will be called from outside the object. Do you test private methods? Should I always test them?


Show the whole date, even for posts from the current year

Background When a date is to be shown that is from this year it is shown as "Mar 12" for the "12th of March" rather than "Mar 12 '14". While the full form is not what I'm used to (as a European) it is at least unambiguous. However "Mar 12" reads as "March 2012" to me and confuses me every time. Although I have (after months of pain) stopped misreading it I still feel the Parse Error: Needs Stack Exchange Mode and the slight pause as my brain tried to reparse it. The most recent example of someone confused by this is here . I was myself caught by this . Feature request Even for recent dates; once the date is shown at all show the full date including the year. So this post was posted on Mar 22 '14. This seems to have no downsides as it takes no extra space (there needs to be space for the long form anyway) and is much clearer to those of us who don't use an American date system.


Indian citizen: do I need a Croatia/Bosnia/Montenegro visa if I have a Schengen visa?

My upcoming travel plans include applying for a multi entry Schengen visa to visit Europe (France, Italy, Hungary and Belgium). However in between this trip, I also plan to visit Croatia, Bosnia and Herzegovina and Montenegro. As per the visa rules for these 3 countries that I read online, I found that merely possessing a multiple entry Schengen visa (with an active entry remaining) for these 3 countries is enough for being eligible to get a visa on arrival for these 3 countries.   However, having recently gone through this article ()  which gives the example of Serbia (having the same rules as the other 3 countries of visa on arrival for multi entry Schengen holders), I am in doubt.  It would be great if someone could confirm that my plan is okay and I can enter Croatia, Bosnia and Montenegro on a multiple entry Schengen visa.


Stripping spaces from custom JSP tag output

I wrote a custom JSP tag that basically constructs a URL to the full domain name of my site, e.g. http://example.com. The problem is that within my tag file, I have spaces to properly format my code, and these spaces are included when I use the tag in JSP files.  For example, if I use my tag like this:  <link rel="stylesheet" type="text/css" href="<custom:domainNameUri />${stylesheet}" />   It will show up like this in the page's source code:  <link rel="stylesheet" type="text/css" href="            http://example.com  /css/bootstrap.css" />   How do I prevent spaces from being output from my tag so it doesn't break things when I use the tag?  Edit: Here is part of the tag's source code:  <%@ attribute name="includePort" required="false" type="java.lang.Boolean" description="Whether or not to include the server port in the URI" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>  <c:set var="domain" value="${pageContext.request.serverName}" />  <%-- Build domain name URI --%> <c:set var="uri" value="${pageContext.request.scheme}://${domain}" />  <c:choose>     <c:when test="${includePort == true}">         <c:out value="${uri}:${pageContext.request.serverPort}" />     </c:when>      <c:otherwise>         <c:out value="${uri}" />     </c:otherwise> </c:choose>


URL path structure for a website with several directories

I am making a website with several directories that will have a high amount of content.  For now I have separated the URLs into categories so that they’re like this:     www.example.com/student/   www.example.com/student/student-name/   www.example.com/student/student-name/biography   www.example.com/student/student-name/image-gallery/   www.example.com/student/student-name/image-gallery/gallery-name-1   www.example.com/student/student-name/image-gallery/gallery-name-2   www.example.com/student/student-name/contact   www.example.com/teacher/   www.example.com/teacher/teacher-name   www.example.com/teacher/teacher-name/biography   www.example.com/teacher/teacher-name/image-gallery/   www.example.com/teacher/teacher-name/image-gallery/gallery-name-1   www.example.com/teacher/teacher-name/image-gallery/gallery-name-2     There are many teachers, students, galleries, videos, etc.  There are several more categories that are made in the same way, but before going online I would like to check whether this is the best way.


Why do networks need a common ground cable?

I was reading about Serial communication in computers and embedded systems and found the following statement -      Computers connected by wires must have a common ground reference,   typically provided by a ground wire in the cable. ()   What is the reason for this? I thought that the ground wire was only for protection against electrical leakage. What would be the need for a common ground wire in communication networks?


Is there a way to block installations of programs on Ubuntu?

we have a small office (25pcs) running ubuntu 13.04. Is there a group policy on ubuntu that will disable all installations of programs. I want to disable the users installing random programs. I know in windows you can, not so sure sure about Ubuntu 13.04. Any help will be appreciated. THANKS


change the way \ref reference a subsection

Hi I have a problem with sectioning:  I would like to call each section with Roman numbers I, II, III and each subsection with letters A, B, C and subsubsections with Arabic numbers 1, 2, 3. However when using \ref{} to cite subsubsection 2 in subsection B of section III, I would like to have III.B.2 but I only get B.2. The same for the section I would like III.B..   This is what I have so far.  \documentclass[12pt,letterpaper,leqno,doublespacing]{article} \renewcommand{\thesection}{\Roman{section}} \renewcommand{\thesubsection}{\Alph{subsection}} \renewcommand{\thesubsubsection}{\arabic{subsubsection}} \begin{document} \section{sec 1} \subsection{subsec 1} \subsection{subsec 2} \subsection{subsec 3} \section{sec 2} \subsection{subsec 1} \subsection{subsec 2} \section{sec 3} \subsection{subsec 1} \subsection{subsec 2} \subsubsection{subsub 1} \subsubsection{subsub 2}\label{reference} This is section \ref{reference} \end{document}


I have a site made by wordpress. This site has some google rankings on 1st page in some keywords. Some pages appeared on 1st page of google search. However, since about 2 months ago, some ranking drops have been beginning as below.  Also, appeared keywords in google search console were reduced. Is this happening as a result of google penalty? I had no black seo to this site.


sed command to find lines which are not of specific size


Galois group of $x^3 - 2 $ over $\mathbb Q$

I know the Galois group is $S_3$. And obviously we can swap the imaginary cube roots. I just can't figure out a convincing, "constructive" argument to show that I can swap the "real" cube root with one of the imaginary cube roots.   I know that if you have a 3-cycle and a 2-cycle operating on three elements, you get $S_3$. I have a general idea that based on the order of the group there's supposed to be at least a 3-cycle. But this doesn't feel very "constructive" to me.   I wonder if I've made myself understood in terms of what kind of argument I'd like to see?


Is there a demonstrable correlation between question length and question quality?

This is just an idea I've been toying with , really. I'm curious about the correlation  between  question length and question quality. "Quality" here would be translated into "likelihood of not being closed."  Because when you go through Stack Overflow, most of the very short questions end up having issues of some kind.   But is there a way for us to measure whether there's a lower threshold whereby we are very certain that the question is problematic? For example, I doubt anyone would argue that you can make a great question with just 15 or so words.  For example, here's a demo I just ran & subsequently deleted:        But surely you'd rather see an example from the real jungle, here's a recent one:        My question is - why were the body-size limits determined to be  30 characters (though I believe there's a typo there, as it's not simply 30 char's)?


Does it make sense to upgrade the graphics driver when running Ubuntu on virtualbox?

I am using Nvidia graphics card. I run Ubuntu 16 on virtualbox. Host OS is windows 10. Does it make sense to upgrade the graphics driver in my Ubuntu image running on virtualbox? My CPU also support integrated Intel Graphics.


Axioms which are used to prove Gödel's second incompleteness theorem

Gödel's second incompleteness theorem concerns the question of proving consistency of certain axiomatic systems. But what set of axioms is used to prove Gödel's second incompleteness theorem itself? Is there a possibility that the set itself is proven inconsistent in the future?


Error in file handling in python2.7 in windows

I am new to python2.7, i wanted to copy file placed in different directory and write to a file placed in current directory, but i don't know how to switch between different drectories.


Examples and further results about the order of the product of two elements in a group

Let $G$ be a group and let $a,b$ be two elements of $G$. What can we say about the order of their product $ab$?   says "not much":     There is no general formula relating the order of a product $ab$ to the orders of $a$ and $b$. In fact, it is possible that both $a$ and $b$ have finite order while $ab$ has infinite order, or that both $a$ and $b$ have infinite order while $ab$ has finite order.   On the other hand no examples are provided. $(\mathbb{Z},+), 1$ and $-1$ give an example of elements of infinite order with product of finite order. I can't think of any example of the other kind! So:   What's an example of a group $G$ and two elements $a,b$ both of finite order such that their product has infinite order?     Wikipedia then states:     If $ab = ba$, we can at least say that $\mathrm{ord}(ab)$ divides $\mathrm{lcm}(\mathrm{ord}(a), \mathrm{ord}(b))$   which is easy to prove, but not very effective. So:   What are some similar results about the order of a product, perhaps with some additional hypotheses?


Why do gamma ray and x-ray photons which have significantly higher energy travel at the same speed as photons of visible light?

Photons which constitute X-rays and gamma rays have a significantly higher energy than those which constitute the visible light. If they have so much more energy, why do they travel at the same speed as photons of visible light. If we add energy to particles such as electrons, we can make them move faster. For example, if we give energy of the order of 220,000 eV to an electron, we can make the electron attain speeds of 90% the speed of light. Why does the same rule not apply to photons?


Let $A,\,B$ be subsets of the set $X$. Prove one of de Morgan's Laws of Set Theory

Let $A,\,B$ be subsets of the set $X$. Prove one of de Morgan's Laws of set theory:$$X\setminus(A\cap B)=(X\setminus A)\cup(X\setminus B)$$


Elementary proof that $Gl_n(\mathbb R)$ and $Gl_m(R)$ are homeomorphic iff $n=m$

Prove that $Gl_n(\mathbb R)$ and $Gl_m(R)$ are homeomorphic iff $n=m$   Since $Gl_n(\mathbb R)$ is homeomorphic to an open subset of $\mathbb R^{n^2}$, this boils down to proving that two open subsets of $\mathbb R^n$ and $\mathbb R^m$ are homeomorphic iff $n=m$.  This can be done via homology, of which I know absolutely nothing.  Do you know a proof that doesn't cover things an undergraduate isn't supposed to know ?  EDIT: I'll close the question, since it's a duplicate of


I am readying in this website for a long time today similar questions and the answers provided about the issue I am asking now but I have to say I am more baffled than I was originally.  My original question would be:  I have read in many textbooks when they teach integration that they emphasize not to treat dx as a quantity but only as a notation that shows which is the variable of integrations. The same textbooks after a while they start talking about differentials and based on the following expressions  $$ df = f'(x)dx\quad df = f_{x}dx+f_{y}dy $$  they say that now that differentials have been introduced we can treat them as independent variables and use them freely as fractions.  Now I was always working with that idea, but after some digging I start seeing a lot of different answers, especially in here, and most of them were conflicting.  There were people mentioning Non-Standard Analysis and Differential Forms and were trying to justify that we can treat differentials as fractions. Also there were other people saying that every time we treat them as fractions we actually apply other theorems and so we don't actually treat them that way.   So the questions I have to ask now is:   Can we actually treat differentials as fractions in EVERY framework, or is there today a debate about it?  I don't want personal opinions or what we can do in a specific framework. I saw a lot of people mentioning that in single variable calculus you may treat them like that because you won't do mistakes. Can you actually treat them like that strictly mathematically in EVERY framework or you can just do it for ease but you actually apply different theorems behind the scenes? If differentials can't be treated in EVERY framework as a fraction then is it defined and proven that they can be always treated as a fraction in some frameworks? Given that we have defined differentials as  $$ df = f'(x)dx\quad df = f_{x}dx+f_{y}dy $$  then didn't we automatically defined than they can be used as independent quantities, so they can be seen as fractions also? Shouldn't we accept them as fractions from the moment of that definition existed?


How many and which are the uses of "const" in C++?

As a novice C++ programmer there are some constructs that look still very obscure to me, one of these is const. You can use it in so many places and with so many different effects that is nearly impossible for a beginner to come out alive. Will some C++ guru explain once forever the various uses and whether and/or why not to use them?


"anyone who is qualified" or "anyone whom is qualified"?

So my class has this question, which is:     Probably it can be anyone (who/whom) is qualified, perhaps even Mr Capp.   (Found on page 112 in Grammar for Writing Workbook.)   I personally put who, because the way I'd phrase that into a sentence is like such:       He/She is qualified for the job.     However, my fellow students say because it's a product of a preposition it should be phrased like:       The one qualified for the job is him/her.   Any help would be useful.


Proving Cardinality of Cosets in Abstract Algebra

*****************updated question**************  The question starts off like this:   Let $H$ be a subgroup of a finite group $G$. Prove that $|Ha| = |Hb|$ by proving that there exists a bijection $f : Ha \rightarrow Hb$. Find this bijection.   I know that I have to show injective and surjective but want to know if anyone thinks this is correct in this fashion  $$Let\ a\in G, \ y, x \in Ha,then \ x=ra, y=sa\ for\ some\ r,s \in H. $$ $$we\ define\ f:Ha \rightarrow Hb\ by \ f(x)=hb$$ $$suppose \ f(x)=f(y)$$ $$rb=sb\ for\ some\ r,s \in H$$   $$r=s$$   $$xa^{-1}=ya^{-1}\ (from\ x=ra\ and\ y=sa)$$ $$x=y$$ This shows injective. for the onto part this is really wanted to check $$let\ x\in Ha, y\in Hb\ and\ a,b \in G\  such\ that$$ $$x=sa,\ y=sb\ for \ some\ s \in H$$ $$then\ f(x)=sb$$ $$=yb^{-1}b\ (from \ y=sb)$$ $$=y$$ Thus, we have shown that $\forall y \in Hb, \exists\ x \in Ha \ such \ that f(x)=y  $  here we have shown the function is also surjective and hence a bijection exist between $Ha$ and $Hb$ and therefore we know then  $|Ha|=|Hb|$


Why is my Mango Pickle foaming with Gas after 3 days, it is beginning to overflow, even though I left 2" from the cap

We made a mango pickle with green mangoes. Below is the typical recipe that was used:  20 small tender green mangoes 200g salt 2tsp. turmeric powder 2” asafoetida (rock type) 1 tbsp. peppercorns 3 tbsps. Mustard seeds ¼ tsp. fenutgreekseeds 2 tbsps. Mustard dal 100g red chilli powder 1 sp. Turmeric powder 500ml sesame seed oil   Preparation :  Wash and wipe the mangoes thoroughly. Slit them into fours. Chop 4 or 5 mangoes into cubes.  Sprinkle the salt and turmeric powder on all the mangoes, mix them well ands place in a plastic or wooden vessel. Keep heavy weight over the mangoes and leave them for 4 days.  Daily, turn the mangoes gently, upside down to ensure that the natural green colour of the mangoes has changed. Drain out the grime and salt if any into a pan and boil it. Cool.  Meanwhile remove the soft seeds from each of the mangoes carefully. Remove the black skin too if any. Should there be any hard seed, do not remove it. Next, heat a tablespoon of oil in a small pan, keep the flame low and toss in the asafoetida. Remove it after a minute. Repeat with peppercorns, mustard and fenugreek seeds. Cool the spices and grind fine. Do not use nay water. Heat the remaining oil in another pan and cool thoroughly. Now mix the chilli powder with mustard dal, turmeric powder and the ground spice, add salt (the mixture should be slightly salty). Mix some cooled oil into spice mixture. Stuff each mango with a small lump of the spice paste. Place all the stuffed mangoes in a wide mouthed jar. Pour the grime and the remaining heated and cooled oil.  Now 3 days later this pickle is foaming with gas.  How can I prevent this from happening.  What am I doing wrong.  I have seen some of your posts and you seem to have a lot of experience in this area.


How to make timer stop on click Javascript

I'm trying to make a timer within javascript. I want the timer to stop on click but it won't. I have two parameters: "start" and "stop". I want my program to restart the timer if the start button is clicked while the timer is already going and to stop when the stop button is clicked.  function timer(start, stop) { let count; if (start) {     let count = 0;     setInterval(() => {         count++;         console.log(count);     }, 1000); } if (stop) {     count = count; }   }


Preserve formatting when command output is sent to a variable?

I have a bash script. If I run this command to:   grep for certain patterns,  transform the output,  sort the output  dedupe the output    then I get one grep find per line in terminal  LC_ALL=C grep -o --color -h -E -C 0 -r "$pattern" /pathto/Pre_N/ | tr -d '[:digit:]' | sort | uniq   However, if I put it in an output variable then the formatting is lost (upon echoing to a file or echoing on screen).  #!/usr/bin/env bash output=$(LC_ALL=C grep -o --color -h -E -C 0 -r "$pattern" /pathto/Pre_N/ | tr -d '[:digit:]' | sort | uniq) echo $output > $fn   How can I preserve the formatting of the out put of this command once I save it to a variable?


Difference between "crontab -e" & editing crontab file manually?

I noticed some people use "crontab -l" to view cronjobs and "crontab -e" to edit them. However there are also times where people manually modify "/etc/crontab" to view/add/remove cronjobs.  Both methods work fine, the only thing I noticed is that cronjobs added with "crontab -e" doesn't show up inside "/etc/crontab" even though it still runs normally.  I'd like to know what are the differences between these 2 methods? Are there any advantages/disadvantages over each other?  PS. I'm on CentOS.


I came across the following sentence in a workbook:     There was a possibility of ... (he) going to England.   The book says the answer is his, not him.  Would him be grammatically incorrect? If so, why?


Salesforce Internal Server - What's in a GACK?

Background  I have been working with Salesforce Support for several weeks now trying to get them to escalate an internal server error with GACK 2134764861-123797 (1611479512) (1611479512). After a long period of waiting I was told that in order to escalate quickly they needed to reproduce the issue in a controlled way. This was again taking them a considerable amount of time so I created a reduced test case myself () that concisely reproduces the issue with a very small amount of code. I was told that this wasn't a valid reproduction because it caused a different GACK (1291518605-518052 (1659192199) (1659192199)) despite reproducing the exact same user experience.  My Question  What makes up a GACK? Is there any information that I can take from their structure that can give me clues on which errors are related without access to the full back-end tools that Salesforce Support uses? It is not infrequent that without premier support it takes me upwards of two weeks to escalate platform bugs and I am hoping that I can somehow use the information from the GACK to reduce this time.


Schwinn Racer - Frequent Punctures - Schwalbe Marathon Plus

I'm a noob, based in Hyderabad and planning to cycle to work - atleast 2-3 times in a week (36 kms from house to work - can't do it right-away - but plan to definitely do it later, when I build up the stamina). My problem is, in Hyderabad with the Metro work going on - the roads are a disaster, my bike, which is a Schwinn Racer (Single-Speed Coaster breaks) is a great road bike, but I'm got fed-up of the frequent punctures, sometimes (5-6 in a month), I changed the tubes 2-3 times, checked tyre pressure, etc., but still the same.   I'm thinking of putting in the Schwalbe Marathon Plus tires - both front and back, do you guys think that it will be enough? Or its something to do with my bike itself? Any and all suggestions are welcome!


Number of surjective functions from $[k]$ to $[n]$

I want to prove that the number of surjective functions from $[k]$ to $[n]$ is given by $$\sum_{j=0}^n \binom{n}j (-1)^j (n-j)^k$$ I know there is a link with inclusion exclusion formula because the first term of the sum counts all possible functions from a set of k elements to a set of n elements but then I don't see what is happening.


Weird pixelated white border. Ubuntu Xenial (16.04)

Out of the blue I started getting these weird borders around my windows. It either happens after coming back from full-screen applications, or after system resume. A reboot fixes this problem, but only temporarily. I have not updated my graphics drivers (not manually, automatically maybe) or had any problems since installing last year.  My video card is a NVIDIA Quadro K1000M, and I've been using NVIDIA binary driver version 375.39 since launch. I have not yet tried tinkering with the drivers, seeing if it would fix the problem or not.


Evaluate $\sum_{n = 1}^{\infty} \frac{\sin (n)}{n}$

The sequence  $$\sum_{n=1}^{\infty} \frac{\sin (n)}{n}$$  converges to a specific value. Convergence tests of any kind are available in a quick search, but I'm struggling to find the proof that this sequence converges to $(\pi - 1)/2$. , complex logarithms are used.  I do not have any knowledge about series and sequences, just a real analysis / real functions background.  Is it possible to make the same proof, using only real functions? If yes, where can I find this proof?


CSS: vertical center responsive image within 100% height absolute div

I'd like to center an image (that changes dimensions according to the screen size) horizontally vertically in a div. That div is positioned absolute and has a height of 100%. Under that div, another div is placed.  I made a

     You can't see this without scrolling

    I want to center the test image vertically in the red div.  Thanks!


Geometric interpreation of triple product ∇ · (∇ × a)

In vector calculus I understand how div is kind of a measure of how much a point acts as a source or sink of the field lines or a measure of the flux through a closed shape at a point in a sense. The curl is a measure of how much rotation the surrounding vector field causes at a point (Please correct if this is wrong).  Just wanted to know if there was also a geometric meaning for the triple product   ∇ · (∇ × a). I cant seem to reason it out.


How can I change font family (and size) for footnotes? Would be great to see a small example.


What is the finite sum of an alternating odd sequence with binomial coefficients: $ \ \sum_{k=0}^{j} \binom{j}{k} \ \frac{(-1)^k}{2k+1}$?

Do we have a nice expression for the following finite series? $$ \sum_{k=0}^{j} \binom{j}{k} \ \frac{(-1)^k}{2k+1}.$$ Any help is really appreciated since I can skip the part concerning the partial sums.


Why Roll-up Summary is not supported between Account and Contact in Salesforce?

Why salesforce does not support Roll-up Summary on Account for Contact as it is only supporting one standard object which is Opportunity ?  I have checked for Roll-up Summary (  ) and salesforce says that its mandatory to have Master-Detail relationship between objects then only you can have Roll-up Summary field on parent object.  According to above, how is Roll-up Summary on Account is supported for Opportunity object ?  Please check these screenshots:


Do anti-parallel photons affect each other gravitationally?

We know that two parallel photons have no gravitational effect on each other because they never pass through each other's light cone.  The question is, what happens to anti-parallel photons?  It stands to reason they pass through each other's light cone at some point after they pass each other giving an opportunity to exchange energy and bend their paths.  What confuses me however is if the photons are exactly the same color do they redshift each other as if they both redshifted this would lead to missing energy.


Controlling label/attributes of grid/fishnet index using ArcGIS for Desktop and ArcPy?

I have used the Grid index feature tool to create an index grid. The label/attribution of the page names are populated in a "row" orientated manner. eg lef to right a1,a2,a3,a4,a5,a6 b1,b2,b3,b4,b5,b6 c1,c2,c3,c4,c5,c6  How can I calculate a field so I can have the page names label/attribution in a "column" orientation?eg:  a1,b1,c1,d1,e1 a2,b2,c2,d2,e2 a3,b3,c3,d3,e3 a4,b4,c4,d4,e4


Filter for post_thumbnail: link to small src and add data-attribute

I wonder how I can link manually to the smallest filesize for the_post_thumbnail() within its filter function …  add_filter( 'post_thumbnail_html', 'post_thumbnail_html', 10, 3 );  function post_thumbnail_html( $html, $post_id, $post_image_id ) {      $html = '' . '' . '';      return $html;  }   So now my image src is just the post_id (e.g. 38). How can I link to the smallest filesize possible and add another data-attribute that links to the largest file?  My output should finally look like this …      Thank you in advance!  edit/update: I'd love to do the same for images inside the_content(). Any idea how to apply the same thing to normal images in posts. The src should always hold the smallest size wordpress creates and the data attribute should link to the largest filesize.


What does the indicator icon with three dots over a power plug mean in Ubuntu 20.04?

I have a Dell XPS 15 9570 with a Dell WD19 Dock and on this Dock I have 2 Monitors. The internal Monitor of the Notebook is off but the Lid is open.  I have installed Ubuntu 20.04 LTS.  Everything is working fine, except the following Icon in the Top bar is blinking (Appearing and Disappearing). I don´t know what that is.  It looks like a cord but the Notebook charging as expected.    It blinks sometimes in a faster and another Time in a slower speed -> Something between 2 - 5 Seconds.  Appearing:   Disappearing:   The Dock are the complete Time connected.  Exact behavior: It's blinking when I have connected my Laptop to the WD19 Docking Station. It's not blinking when I connect my Laptop ONLY to the normal Power Cord or have NO connection to Dock and Power Cord. But it's also blinking when I connect to the Docking Station AND the normal Power Cord.  Do anyone knows what this means? And how can I stop this? It's really annoying when some icons jumping all the time left and right!  Here I found some logs. Maybe this is the Event:


Can you fit a 2012 Macbook Pro non-retina display onto a 2015 retina Macbook Pro laptop?

My display is broken but it seems that the cheapest display out there for the exact same display that I used to have is a prohibitive $500.  The 2012 displays though which are not retina, seem to be $130 and hence not an unreasonable purchase.  Does anyone know if a Macbook Pro circa 2012 non-retina display is compatible with a mid-2015 Macbook Pro retina?


Conditionally Loading JavaScript/CSS for Shortcodes

I released a plugin that creates a shortcode and requires a JavaScript file and a CSS file to load on any page that contains that shortcode. I could just make the script/style load on all pages, but that's not the best practice. I only want to load the files on pages that call the shortcode. I've found two methods of doing this, but both have problems.    sets a flag to true inside the shortcode handler function, and then checks that value inside a wp_footer callback. If it's true, it uses wp_print_scripts() to load the JavaScript. The problem with this is that it only works for JavaScript and not CSS, because CSS should be declared inside <head>, which you can only do during an early hook like init or wp_head.    fires early and "peeks ahead" to see if the shortcode exists in the current page content. I like this method much better than the first, but the problem with it it won't detect if the template calls do_shortcode().  So, I'm leaning towards using the second method and then trying to detect if a template is assigned, and if so, parse it for the shortcode. Before I do that, though, I wanted to check if anyone knows of a better method.   Update: I've integrated the solution into my plugin. If anyone is curious to see it fleshed out in a live environment you can  or .  Update 2: As of WordPress 3.3, it's now possible to , and the JavaScript file will be called within the document's footer. That's technically possible for CSS files as well, but should be considered a bad practice because outputting CSS outside the <head> tag violates W3C specs, can case FOUC, and may force the browser to re-render the page.


How to install different version of program?

What is the usual way of installing a different version of a program on Ubuntu?


Iterate over list taking three items at a time

If I have a list with:  ["A","Bb","C","D","E","F","G"]   how can I iterate over it so that I can output the following:  "A Bb C" "D E F" "G"


How can I show $q^k$ does not divide ${{n}\choose{q}}$ when $q$ is a prime factor of $n$ and $k$ is the largest integer such that $q^k$ divides $n$?

Suppose that $n \in \mathbb{N}$ is composite and has a prime factor $q$. If $k \in \mathbb{Z}$ is the greatest number for which $q^k$ divides $n$, how can I show that $q^k$ does not divide ${{n}\choose{q}}$?  Clearly, since $$ {{n}\choose{q}} = \frac{n!}{(n-q)!q!} = \frac{n(n-1)(n-2) \dots (n-q+1)}{q!} $$ So it suffices to show that, no element of the set $$ \left\{ n-1, n-2, \dots, n-q+1 \right\} $$ is divisible by $q$, which is clearly true, but I am unsure of how to show this rigourously.


Why does Möbius transformation $f(z)$ map the unit disk $|z|<1$ to itself?

$f(z)= a\frac{z-z_0}{\overline{z_0}\cdot z-1}$, where $\left|a\right| = 1$ and  $\left|z_0\right| < 1$ .  If $\left|z\right|= 1$, it is obvious that $\left|f(z)\right| = 1$, thus  $f(z)$ maps unit circle to unit circle.  If $z= z_0$, $f(z)= 0$.   So why does this transformation send  $\left|z\right|<1$ to itself?


What happens when your group is victim of a surprise attack but you can't be surprised?

My character was unaware of a group of bandits, but  my character cannot be surprised (I have a Weapon of warning) but the rest of my group is out of the range of my weapon of warning, do I get to take my turn even when the rest of my party was surprised? Do I take my turn before the attack of the enemy if my initiative is   high enough? Please help.


ORDER BY FIELD(id, ?) not working in PDO

I am trying to execute a query that shows only articles inside this array $res. It contains article IDs   $res = Array ( [0] => 42 [1] => 41 );  $res1 = $res; $res2 = $res;  $Search = $db->prepare("     SELECT * FROM articles     WHERE id IN :res1     ORDER BY FIELD(id, :res2); ");  $Search->execute([     ':res1' => $res1,     ':res2' => $res2 ]);   but it is returnig this error     Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? ORDER BY FIELD(id, ?)' at line 2 in C:\xampp\htdocs\index.php:16 Stack trace: #0 C:\xampp\htdocs\index.php(16): PDO->prepare('\r\n\t\t\tSELECT * F...')


Convergence of $\sum_{n=0}^{\infty}ne^{-\beta n}$

I am working in a problem of statistical mechanics and a partition function I found is of the form: $$ Z = \sum_{n=0}^{\infty}(n+1)e^{-\beta n} $$ I used the ratio test and the series converges. I want to find a closed form for this. I tried: $$ \sum_{n=0}^{\infty}(n+1)e^{-\beta n} =  \sum_{n=0}^{\infty}ne^{-\beta n} +  \sum_{n=0}^{\infty}e^{-\beta n} $$ The second term of the right-hand side is simply $1/(1-e^{\beta})$ (geometric series). So the question comes down to: does this series have a closed form? $$ \sum_{n=0}^{\infty}ne^{-\beta n} $$ where $\beta>0$


Find all continuous functions such that $f(x+y) = f(x)f(y)f(xy)$   I solved it and got the two very obvious solutions, $f(x) = 0$ and $f(x) = 1$. Any other such functions?


Why was Imperial Suk conditioning so highly regarding given this event?

In Dune, the Atreides family disregarded any evidence of Dr. Yueh being a traitor since he had been certified by Imperial Suk conditioning. This conditioning apparently ensured loyalty to the Emperor and/or their assigned master, although no details are given regarding how it works. The novel repeatedly mentions that Suk conditioning is unbreakable, with Yueh's inner monologue hinting at some sort of mental triggers or hypnotism.  However, as we see in the novel, all it takes for the Harkonnens to break Yueh is to      torture his wife in a pain amplifier.   Given the seeming ease with which this "conditioning" was broken, why is it considered such an infallible stamp of trust?  Note: I am not trying to find the specifics of how the conditioning is done. What I'm trying to ask is why such conditioning is so highly regarded. If torturing a loved one is all it takes to break an initiate of the program - and that seems to be the case for Yueh - it would be useless.


Group by SQL Server (show all elements in selected group by)

I'm a litte confused with query, I have problem to showing table in query from SQL Server. Hope my screenshot below clearly shows my problem:


I have a document like this  1 0.2 1 0.3 1 0.1 2 0.8 2 0.5 2 0.3   I want to add the lines if the first column are the same and output something like this  1 0.6 2 1.6   How can I do this with awk? Or maybe it is easier with other tools?  PD: the first column are the same for each 3 lines always, so maybe make an array that adds $2 until line count goes to 3 and print? something like this awk 'BEGIN {x=0,n=1} {n++,x=x+$3}'but with some condition?


What would be a good fault tolerant sceme for a small Windows Server-Exhange domain?

We are out to setup a Windows 2012r2 server with Exchange 2013. It is just to be a simple single domain at one site with about 25 users. So my boss want something that is fault tolerant, if the hardware or software fails we can come up within a day. My boss is talking of buying two Server boxes just to have hardware redundancy in the coming years,  but I am unsure because I do not think we also want to buy addition server licenses?  Would we need to buy 2 copies of the software? So the question is what kind of simple server setup do you advise for this?


Is it possible to consider $S^n$ as a $0$-simplex and a singular map of an $n$-simplex so that the $n$-simplex forms the surface of $S^n$ minus a point, and the point is the singular map of the $0$-simplex? Can a (singular map of an) $n$-simplex have zero boundary for $n>1$? I am trying to understand the homology groups of $\mathbb{R}^n$ with finitely many points removed. I imagine I could use the Mayer-Vietoris exact sequence and homotopy invariance, but I want to try to find the groups directly from the definition to confirm that I am right.


Question: Is $\mathbb{Z}= \{\dots, -3, -2, -1, 0 ,1 ,2 , 3, \dots \}$ countable?  My attemp so far: Let us create the following one-to-one correspondence between $\mathbb{Z}$ and $\mathbb{N}$. $$\begin{matrix}1 & 2 & 3 & 4 & 5 & 6 & 7 & \dots \\ \updownarrow & \updownarrow & \updownarrow & \updownarrow & \updownarrow & \updownarrow & \updownarrow & \dots\\0 & 1 & -1 & 2 & -2 & 3 & -3 & \dots\end{matrix}$$ In order for $\mathbb{Z}$ to be countable we must define a function $f:\mathbb{N} \to \mathbb{Z}$ so that $\mathbb{Z} \sim \mathbb{N}$. $$\displaystyle f(n) = \begin{cases} \frac{n}{2} & n \text{ is even} \\ -\frac{n-1}{2} & n\text{ is odd} \end{cases}$$ To show that $\mathbb{Z} \sim \mathbb{N}$ we require $f$ to be bijective. From the picture above, we can clearly see that $f$ is surjective since $\forall z \in \mathbb{Z}\  \exists n \in \mathbb{N}$ such that $f(n) = z$. Hence we must now show that $f$ is injective. We need to consider three cases:  $n_1, n_2$ are odd $n_1, n_2$ are even $n_1$ is odd and $n_2$ is even  Case 1: \begin{align}f(n_1) &= f(n_2) \\ \implies -\frac{n_1 -1}{2} &= -\frac{n_2 -1}{2} \\ \implies n_1 -1 & = n_2 -1 \\ \implies n_1 &= n_2\end{align} Case 2: \begin{align}f(n_1) &= f(n_2) \\ \implies \frac{n_1}{2} &= \frac{n_2}{2} \\ \implies n_1 &= n_2\end{align} I am, however, experiencing some difficulty showing the injective property for the $3^{rd}$ case. Can anyone please give me some assistance with that specific case?


How to replace the special character from the string in Apex

We need to remove the all special character from the string in apex.  String s1 = 'a"b*c:5>x<y?z/de|f\''; String regExp = '"*:<>?\/|\/‘; String replacement = '1'; String s2 = s1.replaceAll(regExp, replacement); System.debug(s2);   Above code shows,      Illegal string literal: Invalid string literal '"*:<>\/?|'. Illegal character sequence \/' in string literal error.   How to remove the special character from the string in apex.


null pointer exception when calling function

I am getting a null pointer exception when I try to call a function.  I am able to call this function in another function without issue but when i try to call it a second function i get a null pointer.  public class Approvals extends SnowPortalBasePage {      @Steps     ApproveNewApplicationSteps tommy;      private static Logger logger = LogManager.getLogger();      public void approveNewEnvironment(String envName){         tommy.logIntoApproverAccount();     <--- throws null pointer     }      public void approveNewApplication(RegisterNewApplicationFormData formdata){          benchmark b = new benchmark();         tommy.setFormData(formdata);         b.start("logging into approver account");         tommy.logIntoApproverAccount();  <--- works         b.stop();         b.start("completing data assessment and rationalization task");         tommy.completeDataAssessmentAndRationalizationTask();         b.stop();         b.start();         tommy.completeTask();         b.stop();         logger.info(b.resultsSec());     } }   this is the class with the method that is being called  public class ApproveNewApplicationSteps {      private static Logger logger = LogManager.getLogger();     private static int MAX_RETRIES = 10;     SnowPortalBasePage JohnDoe;     RegisterNewApplicationFormData formData;      public void logIntoApproverAccount() {         JohnDoe.getDriver().quit(); // close out the previous webdriver         JohnDoe.clearBrowserCookies();         JohnDoe.loginToSNOW(url, "testuser", "password");         JohnDoe.getDriver().switchTo().defaultContent();         JohnDoe.openUrl(url); }   Any help is appreciated.


Do I need a transit visa for India to USA via Dubai?

If I book a flight (Emirates) from New Delhi to Fort Lauderdale via Dubai, i.e halt at Dubai for a duration of 2 hours or 8 hours, then will there be any problem? Do I need a transit visa?


Gson isJsonObject() throws NullPointerException

I have the following code:  final JsonObject source = source.toJson(); final JsonElement relatedSpace = source.get("myField"); if(relatedSpace.isJsonObject()){   //do something }   isJsonObject() does return instanceof JsonObject; according the the Gson code. instanceof should do a null check first, so I'm not sure how it's possible that my code is throwing a NullPointerException when relatedSpace is null. I can easily check for null first to fix the issue, but I'm wondering why this happens.


Why didn't the Avengers just cut off the hand of Thanos instead of trying to take the Infinity Gauntlet off?

I guess they should have just cut off the hand of Thanos at that time. But why didn't they do that? Is it not possible to cut his hand?


Being a DB noob, I'm trying to generate SQLite statements to import records with "First_Reported" and "Last_Reported" datestamps, but can't seem to get the "First_Reported" working correctly.  I have a few years worth of scans I'm trying to import. There'll be plenty of duplicates, so I just want to update the "Last_Reported" column if the record already exists. If not, then create the record.  I've searched SO and have tried following some of the other solutions (), I just can't seem to get this right. I'm not sure if I'm going about this the wrong way, or just fat fingered something?  Any suggestions? For hundreds of thousands of rows, should I be using something else? I'm looking for efficiency and don't want something that "just works". I want to do it the "right" way.  I created the table as such;  CREATE TABLE Scan_Results (First_Reported text, Last_Reported text, Hostname text, IPAddress text, Network text, OSInformation text, DisplayPath text, TestName text, Message text, FindingObject text, FindingResult text, FindingExpr text, UNIQUE (Hostname, IPAddress, Network, OSInformation, DisplayPath, TestName, Message, FindingObject, FindingResult, FindingExpr));   And I'm trying to insert/update the rows with this;  WITH new (First_Reported, Last_Reported, Hostname, IPAddress, Network, OSInformation, DisplayPath, TestName, Message, FindingObject, FindingResult, FindingExpr) AS ( VALUES('2017-08-15', '2017-08-30', 'someHost', 'someIP', 'someNet', 'someOS', 'someDisplay', 'someTest', 'someMessage', 'someObject', 'someResult', 'someExpr') ) INSERT OR REPLACE INTO Scan_Results (First_Reported, Last_Reported, Hostname, IPAddress, Network, OSInformation, DisplayPath, TestName, Message, FindingObject, FindingResult, FindingExpr) SELECT old.First_Reported, new.Last_Reported, new.Hostname, new.IPAddress, new.Network, new.OSInformation, new.DisplayPath, new.TestName, new.Message, new.FindingObject, new.FindingResult, new.FindingExpr FROM new LEFT JOIN Scan_Results AS old ON new.Hostname = old.Hostname;


How to select the Kernel version on an Ubuntu server?

I installed a different kernel on my VPS, but it's not being used automatically and I can't select it in grub because I don't have access to the server during boot. How do I configure which kernel to use via ssh while it's booted up?  The kernel in use now came with the server image. The one I want to use now is the current generic kernel from the repositories.


Conversion Error after Comatibility Level upgrade. Removing the order by resolves the error... why?

I have a SP that I can't share the entire contents of, but I'll do my best to facilitate test queries. The context: we had been running on compat level 100 up until this week when I changed the level to 130. It was only after that happened that we started to see the ol' conversion error (see bottom of post) whenever trying to run the SP. I was pretty floored by that so to compare I dropped the DB to level 100 and sure enough it worked. I am currently working in a restore db with level 130 to debug this. I have also seemingly narrowed down the part of the SP that's causing trouble, and I am STUMPED. You can see the query below. When running this by itself outside of the SP, there is no issue at all, and the query completes. I have also found that commenting out/removing the ORDER BY allows the query to run without issue in the SP. This doesn't make any sense to me. My understanding is that the ORDER BY statement is the very last thing to be executed, so any values used in the order by have already been filtered down. Additionally, in the case that I am testing the whole SP in, there is only one row, and it does indeed convert to a datetime. I have tried a number of things like aliasing the column and using the alias in the order by. I have tried putting everything but the top and the order by in a subquery and then using the outer query to filter down to the top 1. I have tried using CAST instead of CONVERT. I have tried converting to DATE instead of DATETIME. What does seem to work is using a subquery with a ROW_NUMBER() window and then using the row num to filter in an outer query. This feels inelegant and is extra work for the engine to perform, so I would like to figure out the why. FYI: the below query is using the exact value ('2020-12-29') that is being used when the error is thrown. This is also the only value being used. declare @cycle_date table(result varchar(200) )  insert into @cycle_date values('2020-12-19')  select top 1 convert(datetime,result) from @cycle_date where isdate(result)=1  order by convert(datetime,result)   Conversion failed when converting date and/or time from character string. Any help with this is greatly appreciated. Thanks! Quick edit: I also did try converting and casting to DATETIME2, as well. No dice.


Filter features based on attribute percentage threshold

I have a layer (vector layer imported from a Shapefile) in QGIS 2.8.3 with a bunch of features with a single numerical attribute, 'level'. I would like to filter the features with a threshold that is a certain percentage of the maximum value. For instance, if the threshold is 20% I would like to perform an expression like:  "level" > .20 * max("level")   or more SQL like:  "level" > .20 * (select max("level") from table)   These obviously doesn't work in the query builder or expression based filter. Is there a way to do this, with a different syntax, or do I need to use a different tool?


A comparison between the verbs (come in / by), (drop in / by), (check in / by) (step in / by) and come over

Suppose a lonely mother who has a son who does not give his mother a call for a long time (he doesn't go to his mother home to make sure what is going on and how is his mother's conditions from each viewpoint); then once when son for a reason goes to her home, mother wants to ask (kindly and with a smile on her lips) why you do not visit me at all for a long time; in this scenario do the following sentences mean the same? Which one doesn't sound natural and why? If no what is the difference between them?        Why don’t you come in?   Why don’t you drop in?   Why don’t you check in?   Why don’t you step in?   Why don’t you come by?   Why don’t you drop by?   Why don’t you check by?   Why don’t you step by?   Why don’t you come over?


How can I make n-level loop similar to my manual 5 level for loop in java  public class TestPermutation {    public static void main(String[] args)   {     int[] input = {1,2,3,4,5};     ma(input);   }    public static void ma(int[] input)   {     int n = input.length;     for(int i=0;i<n;i++)     {       System.out.println(input[i]);       for(int j=i+1;j<n;j++)       {         System.out.println(input[i]+" "+input[j]);         for(int k=j+1;k<n;k++)         {           System.out.println(input[i]+" "+input[j]+" "+input[k]);           for(int l=k+1;l<n;l++)           {             System.out.println(input[i]+" "+input[j]+" "+input[k]+" "+input[l]);             for(int m=l+1;m<n;m++)             {               System.out.println(input[i]+" "+input[j]+" "+input[k]+" "+input[l]+" "+input[m]);             }           }         }       }     }   } }   How can we do? Anyway this is an output from my code.   1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 5 1 2 4 1 2 4 5 1 2 5 1 3 1 3 4 1 3 4 5 1 3 5 1 4 1 4 5 1 5 2 2 3 2 3 4 2 3 4 5 2 3 5 2 4 2 4 5 2 5 3 3 4 3 4 5 3 5 4 4 5 5


How do I backup all Gnome Tweaks configuration?

I am about to upgrate from 17.10 to 18.04 but I'm afraid to lose all my Gnome desktop preferences in the process (always been using Unity until 17.10).  I made many changes through "Gnome Tweak tool" and I would like to backup all the current config so I can restore it in my new installation (the same question applies for a fresh   At the same time, I'd like to know if there's a similar way to backup all other configuration for Gnome in general (Nautilus, etc.)  Any info would really help, thank you in advance...


How to find out the following function f which is a function of r?

If $\nabla^2 f(r) = 0$, show that $f(r) = a\log r + b$, where $a,b$ are constants and $r ^2 = x^2+y^2$.  I know $\nabla$ for cartesian coordinates. But i am not getting idea how to solve above?


I have to get the first element of an array., but it is possible that the element is empty; If the element is empty I put an empty field (I am trying to generate a pdf)  Here is my code now:  public void makePdf(Long id) throws IOException {     Candidacy ca = candidacyRepository.findOne(id);      cos.beginText();      cos.showText(        ca.getInterviews().stream().map(Interview::getAgency).map(Agency::getAgencyName).collect( Collectors.toList()).get(0)!=null?ca.getInterviews().stream().map(Interview::getAgency).map(Agency::getAgencyName).collect( Collectors.toList()).get(0):""));       cos.endText(); }   So I will wish not to prevent the generation of the pdf. Thank you very much for your support!  UPDATE  Sorry for the lack of precision: I also sort on the date.  public void makePdf(Long id) throws IOException {         Candidacy ca = candidacyRepository.findOne(id);          cos.beginText();          cos.showText(            ca.getInterviews().stream().sorted((a,b)-> a.getInterviewDate().compareTo(b.getInterviewDate())).sorted((a,f)->f.getInterviewDate().compareTo(a.getInterviewDate())).sorted((b,f)->b.getInterviewDate().compareTo(f.getInterviewDate())).map(Interview::getAgency).map(Agency::getAgencyName).collect( Collectors.toList()).get(0)!=null?ca.getInterviews().stream().sorted((a,b)-> a.getInterviewDate().compareTo(b.getInterviewDate())).sorted((a,f)->f.getInterviewDate().compareTo(a.getInterviewDate())).sorted((b,f)->b.getInterviewDate().compareTo(f.getInterviewDate())).map(Interview::getAgency).map(Agency::getAgencyName).collect( Collectors.toList()).get(0):""));           cos.endText();     }   I get a NullPointerException:/ Thank you for you help


Polling the keyboard (detect a keypress) in python

How can I poll the keyboard from a console python app?  Specifically, I would like to do something akin to this in the midst of a lot of other I/O activities (socket selects, serial port access, etc.):     while 1:       # doing amazing pythonic embedded stuff       # ...        # periodically do a non-blocking check to see if       # we are being told to do something else       x = keyboard.read(1000, timeout = 0)        if len(x):           # ok, some key got pressed           # do something   What is the correct pythonic way to do this on Windows?  Also, portability to Linux wouldn't be bad, though it's not required.


Error mounting /dev/sda3 at /media/dany/Data: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda3" "/media/dany/Data"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.


When shutting down, how to automatically override an app prompt that interrupts the process?

I've scheduled a daily 1:00 AM shutdown of my MacBook but an app interrupts the process with a prompt that I need to manually answer before the shutdown can continue. How do I force an automatic override of this prompt or prevent it from appearing in the first place so the machine can shutdown successfully?  The app in question is Audio HiJack on macOS - Sierra.


if $f:[a,b]\longrightarrow [a,b]$ is continuous and $\alpha , \beta \in \mathbf{R}^+$ then  there is some $c\in [a,b]$, $$f(c)=\dfrac {\alpha f(a)+\beta f(b)}{\alpha+\beta}.$$ Should I use Intermediate Value Theorem?


Summation of series involving binomial coefficients and polynomial of degree at most n-1

Prove that if $p$ is a polynomial of degree at most $n-1$, then   $$\sum_{k=0}^n \binom{n}{k}(-1)^k p(k) = 0.$$  This was probably asked before but I couldn't find it anywhere. Can anyone please help me out here? Looks like the proof is extensive.


how to find a bijection from R to (0,$\infty$)?

how can I find a bijection from R to (0,$\infty$)?


Understanding the p-value in Spearman's rank correlation

I have some pairs of datasets (n=200 or thereabouts), of samples which are non-negative and not normally distributed. I think these pairs of variables are related, probably linearly.   Calculating Spearman's rank correlation on these datasets gives some strange results. The correlation coefficients show that the pairs of variables are weakly, positively correlated (e.g. rho of around 0.4), but the p-values are very low (e.g. 4.1e-10).  My vague understanding of this is that the variables are weakly, positively correlated but the probability of unrelated variables producing the same correlation is very low. Does this mean we can be reasonably certain that a positive correlation exists or have I misunderstood?


Meta Analysis With Percentages in Studies

Suppose we have 5 studies of our choice with percentage in results. Can we perform meta analysis based on percentage, as mean, sd or other values are not reported in any of those studies.


What do you call a person who's just been released from jail?

Is there a specific word for a person who has just been released from jail?