Parent profile on chat is not updated if the account is deleted

In , every user has a parent profile and it is linked to a site. They are shown as affiliated to that site. e.g  is linked to Movies & TV.   Now, I have seen some user profiles who have a site linked as parent site but their account is deleted.  was active on chat after their account on the site is deleted.  Why are the chat profiles not updated? How are users able to chat even when they have no account on parent sites?


$$\int \frac{\mathrm{d}x}{\sqrt{x}+\sqrt{x+1}+\sqrt{x+2}}$$  I tried substituting $x=z^2$ ... also $x=\tan^2 \theta$ ... but couldn't solve it either ways... if someone can help then it would be good.


Question is to verify that $Z[i]/(3)$ is a field. If it is identify it's elements. I verify it follows. Since Z[i] is PID, and 3 is irreducible , so 3 becomes prime hence (3) is prime ideal ,so it is maximal ideal hence given quotient ring is field. I know number of elements in it by formula which will give 9. But how can identify elements?


Missing confirmation of changes to "group policy"/"configure automatic updates"

For the record, I dispute that this question is already answered elsewhere on SO.  I just upgraded from Windows 10 home to Windows 10 Pro purely because I have heard that it is only possible to prevent the dreaded forced reboot issue with home. I followed the first few steps in the solution given =>  and got to the following screen:    The instructions state "configure it as needed"... but it appears that the default is already what I need, i.e. download automatically but then wait for me to manually give permission to install (& reboot). So I just clicked "OK". The instructions go on to say that I should go to the advanced options part of windows update and I should see the words "Some settings are managed by your organisation" in red writing in the window. But I see no such thing. All I see is the following:    Did I do something wrong? Maybe in the most recent versions of pro my desired behaviour is the default? Maybe in the most recent versions Microsoft chose not to show the red writing any more?


How do I split a string with multiple separators in JavaScript? I'm trying to split on both commas and spaces, but AFAIK JavaScript's split() function only supports one separator.


Can you play older versions of cards in standard?

Say, for example, you have a card that is still legal in standard but the version you have of it comes from a set that has since been rotated out. Can you still play the version from your older set?


Prove that if $f'(x)≠0$ on an interval $( a , b)$ on $A$ for a differentiable function $f$, then $f$ is one-to-one on $A$.  I was wondering whether the proof in the attached picture is correct. Could anyone please help me?


why does the program throw StackOverflowError?

I'm working on a program where the monkey climbs a tree.   10 feet takes 10 minutes. he falls back 3 and rests for 10 minutes.   the code I have written I thought worked when I traced it on paper, but returns stack overflow when I run the program.  *edit - ok so somehow i no longer get a stack overflow, but i don't get the result i need. it prints 30 regardless of the poleHeight. Ive tried tracing it but i don't see where Im making a mistake.  for poleHeight= 18;  static double climbTime(double poleHeight){      double time = 0.0;     double t = 10.0;     double climbed = 7.0;      //base case     if(poleHeight <= 10.0){         time = poleHeight;       }     else{         poleHeight = poleHeight - climbed;         t = t + 10.0;         climbTime(poleHeight);     }      return (time + t + 10.0);  }


Internal network DNS can't be configed to route domain.com to www.domain.com?

We host a domain on the internet that is accessible outside of our internal network using domain.com or www.domain.com, but is our actual internal network domain as well, but the external website is only accessible from our computers using www.domain.com - using domain.com gives "connection refused" in Chrome, and does a Bing search in IE.  I've asked our DNS guy about it, and he says internally domain.com goes to the internal network domain controller, and can't be rerouted/directed to the www version.  I've only done config on websites, not internal networks, so is there no way for domain.com from our internal network computers to resolve to www.domain.com?


Condition for a symmetric matrix to be positive definite

Given $A=\left ( a_{ij} \right )_{5\times5}$ which is a $5 \times5$  matrix with entries $$a_{ij}=\frac{1}{n_{i}+n_{j}+1}$$ where $n_i,n_j \in \mathbb{N}$ where $0\leq i,j\leq 5$.Then  $A$ is positive definite if.     $n_1> n_2 > n_3 > n_4 > n_5$   The solution i tried - The matrix formed under this condition is $$\begin{pmatrix}  \frac{1}{n_1+n_1+1}&\frac{1}{n_1+n_2+1}  & \frac{1}{n_1+n_3+1} & \frac{1}{n_1+n_4+1} &\frac{1}{n_1+n_5+1} \\  \frac{1}{n_2+n_1+1} & \frac{1}{n_2+n_2+1} & \frac{1}{n_2+n_3+1} & \frac{1}{n_2+n_4+1} &\frac{1}{n_2+n_5+1} \\  \frac{1}{n_3+n_1+1} &  \frac{1}{n_3+n_2+1}& \frac{1}{n_3+n_3+1} &\frac{1}{n_3+n_4+1}  &\frac{1}{n_3+n_5+1} \\   \frac{1}{n_4+n_1+1}& \frac{1}{n_4+n_2+1} &\frac{1}{n_4+n_3+1}  &\frac{1}{n_4+n_4+1}  &\frac{1}{n_4+n_5+1} \\  \frac{1}{n_5+n_1+1} &\frac{1}{n_5+n_2+1}  & \frac{1}{n_5+n_3+1} &\frac{1}{n_5+n_4+1}  & \frac{1}{n_5+n_5+1} \end{pmatrix}$$  the above matrix is symmetric and all the entries are positive.Also we know that a symmetric matrix $A$ is positive definite iff all its eigen values are positive .The other condition for  a matrix to be a positive definite is $$x^{T}Ax >0 \forall x \in \mathbb{C}$$ next i am not geting how to solve this question.  Please help  Thankyou  edited-


Unable to find elements in modal popup using selenium

I need to confirm a modal popup. I have a form which I fill up and have to move to next page. When I click continue, a modal popup appears asking if the details filled are correct?  There are two button and some other description on it. One button reads cancel and other says Yes, information is correct. I tried switching to the modal element by   driver.switchTo().frame(0);  // there is only one popup   However, whatever I do with webDriver after that results in NullPointerException as no webelement is found.  This is what am trying   WebElement modalButtonContainer = AutoUtils.findElementByClassName(modalOverlay, "modalButtonContainer"); WebElement modalButton = AutoUtils.findElementByClassName(modalButtonContainer, "buttonClass"); modalButton.click();   But it all results in NullPointer. How do I click the modalButton?


(1 ≤ N ≤ 1e+5) I have to find how many cases in this condition: i < j and array[i] > array[j] here I have tried: k = int(input()) n = tuple(map(int, input().split())) h=0 i=0 j=0 for j in range(k-1):     for i in range(j+1,k):         if n[j]>n[i]:             h+=1 print(h)  but it gives time limit. is there better way to iterate it. Test case 1: 10 7 6 2 4 1 5 10 3 9 8


foreach over files in order of file indexes (file1.png, file2.png, file10.png)

this is my code:  private void Method1() {     int i = 1;     foreach (string file in Directory.EnumerateFiles(ImagesPath))     {         if (Path.GetExtension(file).EndsWith(".png"))         {             string image = (Path.GetFullPath(file));             i += 1;                         }     } }   The imagesPath is a string that binds to a folder which contains images,  Image1.png, Image2.png . . . . Image10.png, Image11.png . .   I want to iterate from Image1.png--->Image2.png, but the foreach iterates Image1.png-->Image10.png-->Image11.png and so forth.  Is there any way to override this?


Can we be informed about actions on site-meta posts?

Can we be informed about activity on our meta posts? For example upvotes might have a grey icon in the rep notification menu? Something like this:  And for comments it is the same.  Instead of not knowing anything and only coming back a few days later when you get some badge. And we can also be informed about things like question closes.  Also,  is not what I'm looking for. I'm not a mod!


NullPointException on Caldroid function setBackgroundDrawableForDate

I'm using Caldroid Lib to create a custom calendar inside my Android App, when loading a date value in setBackgroundDrawableForDate i am using the following lines of code.  public class CaldroidSample extends AppCompatActivity {  @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.calendar_main);      CaldroidFragment caldroidFragment = new CaldroidFragment();     Bundle args = new Bundle();     Calendar cal = Calendar.getInstance();     args.putInt(CaldroidFragment.MONTH, cal.get(Calendar.MONTH) + 1);     args.putInt(CaldroidFragment.YEAR, cal.get(Calendar.YEAR));      caldroidFragment.setArguments(args);caldroidFragment.setBackgroundDrawableForDate(new ColorDrawable(Color.GREEN), ParseDate("28/04/2016"));      getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, caldroidFragment).commit();  }  public Date ParseDate(String date_str) {     SimpleDateFormat simpleDateFormat = new SimpleDateFormat(             "yyyy-MM-dd", Locale.getDefault());     Date dateStr = null;     try {         dateStr = simpleDateFormat.parse(date_str);     } catch (ParseException e) {         // TODO Auto-generated catch block         e.printStackTrace();     }     return dateStr;  }  }   I am getting the following error, don't know whats the issue here.  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vv.melioring.calendarapp/com.vv.melioring.calendarapp.CaldroidSample}: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference at java.util.Calendar.setTime(Calendar.java:1195) at com.roomorama.caldroid.CalendarHelper.convertDateToDateTime(CalendarHelper.java:112) at com.roomorama.caldroid.CaldroidFragment.setBackgroundDrawableForDate(CaldroidFragment.java:433) at com.vv.melioring.calendarapp.CaldroidSample.onCreate(CaldroidSample.java:66) at android.app.Activity.performCreate(Activity.java:6010) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)  at android.app.ActivityThread.access$800(ActivityThread.java:155)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5343)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)


I googled and came to know that there are many continuous functions which cannot be drawn by hand, like Cantor, Weierstrass functions etc.  Now this question was asked in a college admission interview. We had to explain our answer. So what and how to approach the answer?!


Image Sequence -> Timeline relation. How could I make an image sequence start at frame 20?

I'm working in EVEE right now and I am trying to make an image sequence start in the middle of the timeline. Is there a fairly simple way to do this? Thanks in advance


SQL query for insert into with update on duplicate key is error

I got error on the following query  INSERT INTO tableName3 (column1, column2)     SELECT          b.column1,         SUM (a.column2) AS SumColumn2     FROM          tableName1 AS a     JOIN          tableName2 AS b ON a.column1 = b.column2      GROUP BY          b.column2 ON DUPLICATE KEY UPDATE tableName3    SET column2 = SUM (a.column2) AS SumColumn2   The error messages are      Incorrect syntax near the keyword 'ON*'   and      Incorrect syntax near the keyword 'AS'   How to fix it?


What is the best (most robust) way to install a custom Xindy style?

I’m developing a (non-public) custom class which has a comparing Xindy style file (.xdy). I’m installing the class feels etc. according to TDS with a script (or by unzipping to the right directories). But I couldn’t figure out a robust way to install the Xindy file, since it doesn’t use kpsewhich. So what is the best place to save such a style? It should   work with TeX Live and MikTeX be as easy as possible ideally not requiring to change .profile or something like that   I don’t know what systems the users have. But I guess most of them are basic users without any knowledge about installing packages or using the Terminal/Bash/…  Deployment via CTAN is not possible since the class/style is exclusive and non-public.


I am  always wondering about the seemingly odd syntax $1^n$ which designates the security strength of a cryptographic algorithm.  Who invented this (odd) syntax and what was the reason for inventing it?


Sanitize/Rewrite HTML on the Client Side

I need to display external resources loaded via cross domain requests and make sure to only display "safe" content.   Could use Prototype's  to remove script blocks. But handlers such as onclick or onerror are still there.  Is there any library which can at least   strip script blocks, kill DOM handlers, remove black listed tags (eg: embed or object).   So are any JavaScript related links and examples out there?


Word for a person who avoid accountability of his promises by denial and shaming

What do you call a person who gives a promise and then denies, and shames and demonizes you for your orginal inquiry. For example a person might promise to sponsor you and then deny of giving such promise and start to shame you for inquiring about sponsorship.


NullPointerException when writing csv file

I want to write a csv with the opencsv libary, however, when running the code I get a NullPointerException.  public void exportToCSV(ArrayList<Data> list) throws IOException {         log.info("write CSV file");          String writerPath = "C:\\Users\\User\\Desktop\\Output\\output.csv";          CSVWriter writer = new CSVWriter(new FileWriter(writerPath), ';');          //headers                 String [] entries = {"ID", "Date"};          writer.writeNext(entries);          List<String[]> data = new ArrayList<String[]>();         for (int m = 0; m < list.size(); m++) {             data.add(new String[] {                     list.get(m).getID,                     (list.get(m).getDate().toString()==null) ? "null" : list.get(m).getDate().toString(), //Here i get the NullPointerException             });         }         writer.writeAll(data);         writer.close();     }   I guess that getDate() is null, which type is a Timestamp. However, why does my proposed solution not work in writing a String when getDate() is null.  I apprecaite your reply!


Are polynomial fractions and their reductions really equal?

I'm reading Larson's AP Calculus textbook and in the section on limits (1.3) it suggests finding functions that "agree at all but one point" in order to evaluate limits analytically.  For example, given  $$ f(x) = \frac{x^3-1}{x-1} $$ we can factor and reduce to get $$ \frac{x^3-1}{x-1} = \frac{(x-1)(x^2+x+1)}{x-1} = \frac{\require{cancel} \bcancel{(x-1)}(x^2+x+1)}{\require{cancel} \bcancel{(x-1)}}=x^2+x+1 $$ But it then refers to this reduced expression as  $$ g(x) = x^2+x+1 $$ suggesting that $f(x) \neq g(x)$ (also implied by the figure below).      Is it true that $f(x) \neq g(x)$?  I realize that $f(x)$ as originally expressed is indeterminate at $x=1$, but doesn't the cancellation of $(x-1)$ allow us to calculate the "true" value of $f(1)$?  If so, I believe the graph of $f(x)$ in the figure is misleading at best by drawing the plot as being undefined at $x=1$.


NullPointerException when using Handler for updating progressBar

public class MainActivity extends Activity {      Button button = (Button)findViewById(R.id.btn);     ProgressBar bar = (ProgressBar)findViewById(R.id.pbar);      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);           button.setOnClickListener(new OnClickListener() {              @Override             public void onClick(View v) {                 // TODO Auto-generated method stub                 updateHandler.post(updateThread);             }         });      }      @Override     public boolean onCreateOptionsMenu(Menu menu) {         // Inflate the menu; this adds items to the action bar if it is present.         getMenuInflater().inflate(R.menu.main, menu);         return true;     }      @Override     public boolean onOptionsItemSelected(MenuItem item) {         // Handle action bar item clicks here. The action bar will         // automatically handle clicks on the Home/Up button, so long         // as you specify a parent activity in AndroidManifest.xml.         int id = item.getItemId();         if (id == R.id.action_settings) {             return true;         }         return super.onOptionsItemSelected(item);     }        Handler updateHandler = new Handler(){          public void handleMessage(Message msg) {             bar.setProgress(msg.arg1);             updateHandler.post(updateThread);         };     };      Runnable updateThread  = new Runnable() {          int i = 0;         @Override         public void run() {             // TODO Auto-generated method stub             System.out.println("------------");             i = i+10;             Message msg = updateHandler.obtainMessage();             msg.arg1 = i;              try {                 Thread.sleep(1000);             } catch (InterruptedException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }              updateHandler.sendMessage(msg);             if (i==100) {                 updateHandler.removeCallbacks(updateThread);             }         }     };   }   Logcat:     java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.zxy.handlerpbtest/com.zxy.handlerpbtest.MainActivity}: java.lang.NullPointerException


If $f,g$ are continuous at a , show that $h(x)=\max{f(x),g(x)}$ and $k(x)=min{f(x),g(x)}$, are also continuous at a (quick question)

If $f,g$ are continuous at $a$, show that $h(x)=\max(f(x),g(x))$ and $k(x)=\min(f(x),g(x)) \text{ are also continuous } \forall x\in X$.  Hello. I am aware this question has been asked before and I also know the solution. But since I did it another way, I wanted to make sure my reasoning is correct. I'll make my argument just for one part since it is analogous:  We know $f,g$ are continuous at $a$. Suppose $h(x)$ is not continuous at $a$. This would imply that either $f$ or $g$ are not continuous there, which is a contradiction.  Is this ok?


"Install VMware Tools" greyed out after installing ubuntu 15.04 on vmware player 7.1

"Install VMware Tools" greyed out after installing Ubuntu 15.04 on VMware Player 7.1. I tried checking "No proxy" instead of default "Windows proxy settings" at "File->Preferences->Software updates-> Connection Settings". This did not work either. Is there a way to install VMware Tools?


If a user's avatar shows in a chat room but they don't say anything, can they be pinged?

I know that a user can only be pinged if they join a chatroom, but I'm not sure if that means they have to say something first or not.


Why does Ubuntu 14.04 Trusty Tahr use sheep as emblem?

I have a very unimportant question: I am curious, why does Ubuntu 14.04 use sheep as emblem? Why not an elephant or ant or another animal?


Null Pointer while comparing values of JSONArray

Building an android application for reviewing colleges, the College page which shows Null pointer Exception works fine when opened manually(through Home Screen) but on searching the college and on the invocation of onClick the same College Page gives Null Pointer Exception which fetches data using volley library from database.     java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null object reference           at com.learnxapp.xfinder_collegeandcoursefinder.CollegePage2$4.onResponse(CollegePage2.java:199)           at com.learnxapp.xfinder_collegeandcoursefinder.CollegePage2$4.onResponse(CollegePage2.java:188)           at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:90)           at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:102)           at android.os.Handler.handleCallback(Handler.java:873)           at android.os.Handler.dispatchMessage(Handler.java:99)           at android.os.Looper.loop(Looper.java:193)           at android.app.ActivityThread.main(ActivityThread.java:6718)           at java.lang.reflect.Method.invoke(Native Method)           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)   Error is caused due to the following lines of code, which used to show user comments on the college page:    public void parseJSON3(){      String url="url_here";      JsonArrayRequest request = new JsonArrayRequest(Request.Method.GET, url, null, new Response.Listener<JSONArray>() {         @Override         public void onResponse(JSONArray response) {             try {                  for(int i=0 ; i < response.length() ; i++){                      JSONObject cdata=response.getJSONObject(i);                     String cid=cdata.getString("cid");                     String uname = cdata.getString("uname");                     String ucomment = cdata.getString("ucomment");                     if(Rank2.equals(cid))                         dataList3.add(new DataFetchCollegeDetails(uname, ucomment));                  }                  exampleAdapter= new Rcyc3AdapterComments(CollegePage2.this,dataList3);                 RcycleComments.setAdapter(exampleAdapter);             } catch (JSONException e) {                 e.printStackTrace();             }         }     }, new Response.ErrorListener() {         @Override         public void onErrorResponse(VolleyError error) {             error.printStackTrace();         }     });     requestQueue3.add(request); }   Compiler shows error at line when i'm checking to see if Rank2 is the same as cid.


For a given power, which will be larger, a motor or a generator? Is there a certain relationship between motor/generator size and power?


If I add or remove a tag from a question, does it count as an edit? If so, if I edit tags on enough posts, will I receive a badge as I would for other edits?  Suppose a question is tagged . Then I edit the post by adding another tag like . Would such a change count as an edit, and if so, would it bring me any closer to a badge?


How do I get the height and depth of a box as a dimension?

In order to avoid misalignment issues with tikz nodes I have decided to set the options text height and text depth so that all nodes have the same height and depth as a normal line of text.  According to Wikipedia, the standard height of a line of text is .7\baselineskip and the standard depth .3\baselineskip. Therefore I do  \documentclass{article} \usepackage{tikz} \begin{document}  \begin{tikzpicture}   \node[draw,text height=.7\baselineskip,text depth=.3\baselineskip] at (0,0) {x};  \end{tikzpicture} \end{document}   But this means I have to remember these values.  Is there a command that would compute the height and depth of box that I can use in these circumstances? E.g. text depth=\depthof\strut.  Note:  This question is very similar to .  However the solution given there involving the calc package no longer seems to work.


Significance test in trimodal distribution

I have a trimodal null distribution that looks like this:  In order to calculate the significance we just check how extreme the values are respect to our null distribution.  We do it this way:    find.pvalue <- function(value, null.dist, length(null.dist))  {     if (value<0) {       p = (sum(null.dist < value)+1)/length(null.dist)     } else {       p = (sum(null.dist > value)+1)/length(null.dist)     }     return(p)   }   Then adjust FDR.  This is how I would do it for a normal distribution, but is this correct way to test for extreme values for a null distribution like this one?   Thanks


The sum $\sum_{k=0}^{n} (-1)^k \frac{{n \choose k}}{{n+k \choose k}}=\frac{1}{2}$

The sum $$\sum_{k=0}^{n} (-1)^k \frac{{n \choose k}}{{n+k \choose k}}=\frac{1}{2}?$$ can be checked by Mathematica. Here, the question is how to do it by hand?


Is there any Stack Exchange site for mobile's special features disussion?

I just realized that it's possible for companies (e.g. Xiaomi, OnePlus) to include their own special features to their android phones. My Xiaomi Mi 9T Pro has some special features include (GameTurbo, Floating window, etc.), but the company only provides one way to use it, obviously, there are many different phones that come with special features. My question is, do Stack Exchange sites have any site for using/developing those features?  I already have a question about my phone's special features, but I didn't find any Stack Exchange site, that is specific to ask that kind of question.


Javascript regular expression for email validation we should not allow duplicate words after @ in the email

function verifyEmail(component){         var status = false;         var emailAddress = component.value;         if(emailAddress == ""){             return true;         }         var emailRegEx = /^([A-Z0-9._%+-])+@([A-Z0-9.-])+\.([A-Z])+$/i;              if (!(emailAddress.search(emailRegEx) == -1)) {                  status = true;              }              return status;     }   This regex accepting duplicate words after @ . Eg: leela.lokesh@in.csc.com.com Here com word is coming 2 times. we should not allow duplicate words after '@'


What were Saruman's original intentions, and how did they change over time?

led to a suggestion that I open a separate question on a related subject.  Sauron started out good, became bad, briefly repented, the went full-on evil.  Saruman too started out as a good guy, but very gradually turned to the Dark Side, so to speak.   I know some of the factors which contributed to his slow decline - jealousy of Gandalf, gradually increasing egotism, corruption at the hands of Sauron via the Palantir, and so on. And I know - in part because of the answers to  - what Saruman's intentions were during the events of The Lord of the Rings:  basically, he wanted to pretend he was Sauron's buddy for as long as it was profitable to do so, steal the Ring, use it to defeat his enemies (including Sauron), and eventually take Sauron's place (which, whether or not this was Saruman's intention, would automatically make him the baddest baddie in Middle-earth).     But I know little (aside from what I have already mentioned above) about what his intentions were from the time he came to Arda to the time Gandalf located the One Ring, how soon they began to change, and why.  What were Saruman's original intentions, how soon did he begin to stray, and what started that process?


By substituting $z = h(t)$ show that $\delta(h(t))=\sum\limits_{i}\frac{\delta(t−t_i)}{\mid h^{\prime}(t_i)\mid}$

Firstly, apologies in advance for using an abuse of notation by placing the Dirac-delta inside an integral. But for my level of understanding, I have no choice.  This question involves one of the Dirac-delta properties: $$\delta(bt)=\frac{1}{\mid b \mid}\delta(t)$$ where $b \gt 0$ and $b \in \mathbb{R^+}$; which was proven in this  asked by myself.  This is essentially a word by word copy of a  given on page 470:      Given $$\delta(bt)=\frac{1}{\mid b \mid}\delta(t)$$ and by    considering an integral of the form  $$\int  f(t)\delta(h(t))\mathrm{d}t$$ then making a change of variables to $z =  h(t)$, we may show that $$\displaystyle\delta(h(t)) =  \operatorname*{\Large\sum}\limits_{i}\cfrac{\delta(t − t_i)}{\mid  h^{\prime}(t_i)\mid}$$ where the $t_i$ are those values of $t$ for    which $h(t) = 0$ and $h^{\prime}(t)$ stands for   $\cfrac{\mathrm{d}h}{\mathrm{d}t}$.   Could someone please show the steps in this derivation as I have no idea how they reached $$\color{#180}{\displaystyle\delta(h(t)) = \operatorname*{\Large\sum}\limits_{i}\cfrac{\delta(t − t_i)}{\mid h^{\prime}(t_i)\mid}}$$   Many thanks.


Use non-consuming regular expression in pySpark sql functions

How can I use existing pySpark sql functions to find non-consuming regular expression patterns in a string column?  The following is reproducible, but does not give the desired results.  import pyspark from pyspark.sql import (     SparkSession,     functions as F)  spark = (SparkSession.builder          .master('yarn')          .appName("regex")          .getOrCreate()          )  sc = spark.sparkContext sc.version # u'2.2.0'  testdf = spark.createDataFrame([     (1, "Julie", "CEO"),     (2, "Janice", "CFO"),     (3, "Jake", "CTO")],     ["ID", "Name", "Title"])   ptrn = '(?=Ja)(?=ke)'   testdf.withColumn('contns_ptrn', testdf.Name.rlike(ptrn) ).show()   +---+------+-----+-----------+ | ID|  Name|Title|contns_ptrn| +---+------+-----+-----------+ |  1| Julie|  CEO|      false| |  2|Janice|  CFO|      false| |  3|  Jake|  CTO|      false| +---+------+-----+-----------+   testdf.withColumn('contns_ptrn', F.regexp_extract(F.col('Name'), ptrn, 1)).show()   +---+------+-----+-----------+ | ID|  Name|Title|contns_ptrn| +---+------+-----+-----------+ |  1| Julie|  CEO|           | |  2|Janice|  CFO|           | |  3|  Jake|  CTO|           | +---+------+-----+-----------+   testdf.withColumn('contns_ptrn', F.regexp_replace(F.col('Name'), ptrn, '')).show()   +---+------+-----+-----------+ | ID|  Name|Title|contns_ptrn| +---+------+-----+-----------+ |  1| Julie|  CEO|      Julie| |  2|Janice|  CFO|     Janice| |  3|  Jake|  CTO|       Jake| +---+------+-----+-----------+   The desired results would be:  +---+------+-----+-----------+ | ID|  Name|Title|contns_ptrn| +---+------+-----+-----------+ |  1| Julie|  CEO|      false| |  2|Janice|  CFO|      false| |  3|  Jake|  CTO|       true| +---+------+-----+-----------+   As the third row in the Name column contains 'Ja' and 'ke'.  If regexp_extract or regexp_replace are able to extract or replace non-consuming regular expression patterns, then I could also use them together with length to get a Boolean column.


Show that $\int_0^\pi f(\sin x)\,\mathrm{d}x = 2\int_0^{\pi/2}f(\sin x) \, \mathrm{d}x$

Any tips on how to show that $$\int_0^\pi f(\sin x) \, \mathrm{d}x = 2\int_0^{\pi/2} f(\sin x) \, \mathrm{d}x \text{ ?}$$


How to forward specific log file outside of /var/log with rsyslog to remote server?

How can I forward message from a specific log file like /www/myapp/log/test.log with rsyslog client to remote rsyslog server? This log file is outside of the directory /var/log.


Reputation and reputation graph out of sync

I noticed that the top point of the reputation graph is not showing the current reputation as expected. I think this happened after I have reported  some suspicious ratings and I have received some user removed messages and a drop on the reputation as well. But there is about 400 difference and I can't see what it is.  I tried to force it recalculate my reputation by visiting the/reputation page but didn't succeed.  Edit: after investigating on reputation history, the only reason that could cause this is the bounty awarded by a deleted user.


multi price in drupal commerce in drupal 7

I have a shop created with drupal commerece modules,I enabled 2 currency in my shop , but only show one of them, I want to show price in 2 currency       something like this price :  10$  / 20 IRR I use multi currency module to achieve this job, but  I my problem is in payment  phase, I use multi currency module to achieve this job,in multicurrency  module's setting I don't want  use  synchronize method, if you want have two field in my product , one form $ and another for IRR, I did this job by this method     first enable IRR currency in  admin/commerce/config/currency  then in  admin/commerce/config/currency/handling under Enable dedicated price fields for Product check Iranian Rial  by doing this  another field added you my product ( ** Price for IRR** ), this is good , after this I enable  *currency selector * block ,in checking out process by switching the currency I don't see any change in current currency of billing and cart. :( why changing currency not changing cart currency?


I've been doing daily snapshots on a btrfs subvolume for nearly 3 years, resulting in over a thousand snapshots. I am experiencing occasional small stalls (a few seconds) in basic filesystem operations such as creating new folders and moving files. There is plenty of free and unallocated space left. filefrag does not report excessive fragmentation on a random sample of files I've tested.  I've not been able to find any published gotchas on snapshots being the root cause of this issue, but is there any issue with making and keeping a large number of them?


Which is correct: "could care less" or "couldn't care less"?

What's the deal with the phrase "could care less"?  Whilst growing up, I've always known people (parents etc) to use the phrase "couldn't care less", but I've also come across people who use the phrase "could care less" to mean the same thing (that is, "I do not care at all about that").  To me "couldn't care less" seems a lot more logical. If I couldn't care less about something, that implies I do not care about it at all. In contrast to this, to my mind the phrase "could care less" seems to indicate "I do care about this to some degree at least", but that's definitely not the meaning intended.  What's going on here? Is my (logical) analysis correct or in error?


says that a photon of  to $10^{-62}$ kg has been detected:     10×10−62 kg   Mass equivalent of the energy of the lightest photon   detected [citation needed]   This equates ($mc^2=E=hf=h\frac{c}{\lambda}$) to a wavelength of $\lambda=2.2\times 10^{20}$ m (roughly a million ly)! Can anyone provide a citation for this measurement? And how can such a large wavelength/low energy photon be detected?  Edit  Apart from the quotation (true/false un/reliable un/documented ....), I'd like to learn about the lightest photon detected, or about the instrumental limit: what is the lower limit of energy that can be registerd by an intrument (or the greatest wavelength), and how it is done? For example, can you detect a radiowave of 1 Hz?


Null Pointer Exception when passing an array of objects to a static method

I am new to programming, and am working with an Array of objects for the first time.  I have a class called Account, which is to represent a bank account.  In the main method of my ATM machine class, I create an array of Account objects.  I fill the array with instantiated objects via static method.  I have two additional static methods (one prints out the arrays, which I put in for testing, and another is suppose to check if the Bank Account ID is valid).  Both of these static methods throw a Null Pointer Exception when the array of Account objects are passed to these respective static methods.  When I comment these two static methods out, everything works fine.  Any help would be appreciated.  Code is below:  package banking;  import java.util.Scanner;  public class AtmMachine {     public static void main(String[] args) {         //Create account array of size 10         Account[] bankAccounts = new Account[10];          //Create 10 accounts         createAccounts(bankAccounts);          /*         //PROBLEM AREA         //Print Bank Accounts         printAccounts(bankAccounts);         */           //Menu         menu(bankAccounts);      }      public static void createAccounts(Account[] bankAccounts) {         for (int i = 1; i < bankAccounts.length; i++) {             bankAccounts[i] = new Account(i, 100);         }     }      public static void menu(Account[] bankAccounts) {         //Create Scanner object         Scanner input = new Scanner(System.in);          while (true) {             System.out.print("Enter your account number: ");             int accountNumber = input.nextInt();                //THIS IS THE PROBLEM             /*             //Check to see if a valid account             if (!isAccount(accountNumber, bankAccounts)) {                 System.out.println("You entered a wrong account number.  Try again.");                 continue;             }             */               //Enter the menu of the account system             accountMenu(bankAccounts[accountNumber]);           }     }      //THE PROBLEM METHOD     public static boolean isAccount(int account, Account[] bankAccounts) {         for (int i = 0; i < bankAccounts.length; i++) {             if (bankAccounts[i].getId() == account) {                 return true;             }         }         return false;     }      public static void accountMenu(Account myAccount) {         Scanner input = new Scanner(System.in);          System.out.println("Main Menu: ");         System.out.println("1. Check Balance");         System.out.println("2. Withdraw");         System.out.println("3. Despoit");         System.out.println("4. Exit");          int selection = input.nextInt();          while (selection < 4) {             if (selection == 1) {                 System.out.printf("The balance is %.2f.\n", myAccount.getBalance());             } else if (selection == 2) {                 System.out.print("Enter the amount to withdraw: ");                 myAccount.withdraw(input.nextDouble());                 System.out.printf("The new balance is %.2f\n", myAccount.getBalance());             } else if (selection == 3) {                 System.out.print("Enter the amount to deposit: ");                 myAccount.deposit(input.nextDouble());             } else {                 System.out.println("You entered a wrong amount.");                 continue;             }              System.out.println("Main Menu: ");             System.out.println("1. Check Balance");             System.out.println("2. Withdraw");             System.out.println("3. Despoit");             System.out.println("4. Exit");              selection = input.nextInt();           }      }      public static void printAccounts (Account[] bankAccounts){         for(int i = 0; i < bankAccounts.length; i++){             System.out.println("Account " + i + " has an id of " + bankAccounts[i].getId() + " and a balance of " + bankAccounts[i].getBalance());         }     }  }


I have a problem making faces while modeling. When I make a face in Blender and try to put loop cut I just can't .... Anybody knows another way to connect/make faces ? Please answer me..


Can't use Varchar variable from sql as String in java

I am making a java app and i have some trouble while importing data from sql server to java arraylists. The database has some inserts and when i run main in java i am calling a method that does the jdbc and is filling some arraylists with data. The jdbc has been done succesfully but when I am checking the department of an Employee (Manager, deposit manager etc...) it appears that the program doesn't even check the if... else if... else if.... blocks. In sql String variables are written as VARCHAR(40)...       Connection dbcon ;             Statement stmt;                 try {                 dbcon = DriverManager.getConnection(url);                 stmt = dbcon.createStatement();                  String s = ("SELECT * FROM Employee");                 ResultSet rs = stmt.executeQuery(s);                 while (rs.next()) {                     String f = rs.getString("fullname");                     int id = rs.getInt("idEmployee");                     String d = rs.getString("department");                     String e = rs.getString("email");                     double sa = rs.getDouble("salary");                     Date da = rs.getDate("firstDate");                     int l = rs.getInt("leaves");                     String u = rs.getString("username");                     String p = rs.getString("password");                     double o = rs.getDouble("overall");                      if (d == "Manager") {                         new Manager (f, id, d, e, sa, da, l, u, p, o);                     } else if (d == "Loan Manager") {                         new LoanManager(f, id, d, e, sa, da, l, u, p, o);                                        } else if (d == "Deposit Manager") {                         new DepositManager(f, id, d, e, sa, da, l, u, p, o);                     } else if (d == "Private Customer Manager" ) {                         new PrivateCustomerManager(f, id, d, e, sa, da, l, u, p, o);    Is there anything i can do to fix this problem?


I have a very easy (maybe silly) question, but I cant get it done....  How can I close hole like above (or bigger) mantaining the round shape?


if i hang mass loaded vinyl like curtains around the room,will it soundproof the room do other neighbours will not complain when im doing music in strange hours? what other options do i have for a rental apartment?  i know about this product  but i don't know if it will soundproof the room  thanks


Prove that every non-zero element of $\Bbb Z_p$ has an order which divides $p-1$.

How do I prove this if I am given the information that: $p \ge 2$ and is a prime and $g$ is an element of order $p − 1$ in $\Bbb Z_p$. I know I am supposed to use Fermat's little theorem and do a contradiction proof but I am not quite sure on how to do it.


I want to test some simple code for pep8 compliance using pytest pep8 in Ubuntu 18.04. The command I use in the terminal is  my_name@my_name's-laptop:~/my_folder$ py.test --pep8 simple_flask.py  But it gets stuck at 'collecting 1 item'. But if I press ctrl-c, it executes. I wonder what is wrong. My simple_flask.py code is     from flask import Flask  app = Flask(__name__)   @app.route('/') def hello() -> str:     return 'Hi there from Flask!'  app.run()   Any suggestions on how to solve this?


How to automate similar commands to multiple servers via SSH?

I have x servers that I can connect via SSH via passwords. If I have to connect with only 1, I will ssh root@IPaddress. It will then ask for my password, and when authenticated, I can execute commands there.  What if I have x servers all being the same and I wish to execute the same command on every one of them? How can I do this with a single command or two?


Is there a prefix that indicates that an event recurs four times a year?

"Semi-annually" describes an event that recurs every 6 months. Is there a similar term for an event that recurs every 3 months? (I'm guessing that "semi-semi-annually" isn't the correct answer.)  More importantly, is there a resource or table somewhere that I can use in the future to construct prefixes for other intervals shorter than a year?


Help with proof that $\mathbb Z[i]/\langle 1 - i \rangle$ is a field.

I have been having a lot of trouble teaching myself rings, so much so that even "simple" proofs are really difficult for me. I think I am finally starting to get it, but just to be sure could some one please check this proof that $\mathbb Z[i]/\langle 1 - i \rangle$ is a field. Thank you.  Proof: Notice that $$\langle 1 - i \rangle\\  \Rightarrow 1 = i\\  \Rightarrow 2 = 0.$$ Thus all elements of the form $a+ bi + \langle 1 - i \rangle$ can be rewritten as $a+ b + \langle 1 - i \rangle$. But since $2=0$ this implies that the elements that are left can be written as $1 + \langle 1 - i \rangle$ or $0 + \langle 1 - i \rangle$. Thus  $$ \mathbb Z[i]/ \langle 1 - i \rangle = \{ 0+ \langle 1 - i \rangle , 1 + \langle 1 - i \rangle\}. $$  This is obviously a commutative ring with unity and no zero-divisors, thus it is a finite integral domain, and hence is a field. $\square$


Why no Top Physicists Work on Bohmian Mechanics?

I'm curious to hear some opinions from serious physicists on this site as to why no top physicists have ever worked on Bohmian Mechanics. Except Bohm and Bell, the theory has received virtually no attention from the world's most elite physicists. It does receive a lot of attention from lesser known physicists, and they are not well respected.   Bohmian Mechanics just seems like a much more sensible theory. All paradoxes completely vanish, no Schrodinger's Cat, no particles in two places at once, no nonsense about the moon only being there when you look at it.  Why won't any heavyweights take this reasonable approach seriously?


I have seen some previous post about logout from terminal but those were for old versions. I didnt find the way for logout in Ubuntu 13.10 from terminal.  How can I logout from terminal in Ubuntu 13.10 ?


exception of nullpinter when using getText() method:

i built a code in Frame class and call another class frame named search which contains bottun. and i try to add this button action :             s=new Search();            s.button_1.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent arg) {              String a =s.text_1.getText();             JOptionPane.showMessageDialog(new JFrame() ,a);...   I try to run this but it says   Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException..


I want to transfer my world from my PC to a second PC, but I cannot find the world files.  Can you please help me?


Italic 'et al' using natbib and agsm...HOW?

I am using natbib and agsm for harvard style referencing. My related code is  \usepackage{natbib}  \bibliographystyle{agsm}   Then I am using \citep{} for citations. My problem is that in text I am getting (Author et al., 2012) and I want (Author et al., 2012). Does anyone know how to change this and get 'et al' in italics in the text?


Given the following list of lists:  iters=[['EY11', 'EY12', 'EY13', 'EY14'],        ['EY21', 'EY22', 'EY23', 'EY24'],        ['PY11', 'PY12', 'PY13', 'PY14'],        ['PY21', 'PY22', 'PY23', 'PY24']]   I'd like to modify this list to transpose the values (for lack of a better description) like this:  iters=[['EY11', 'EY21', 'PY11', 'PY21'],        ['EY12', 'EY22', 'PY12', 'PY22'],        ['EY13', 'EY23', 'PY13', 'PY23'],        ['EY14', 'EY24', 'PY14', 'PY24']]   I can do this with one sub-list at a time like this:  [i[0] for i in iters]   but now I just need to know how to iterate through each sub-list and automatically make the new list of lists (also, I can't predict how many sub-lists there will be in my actual data, so I'd like to avoid hard-coding the current number of sub-lists in i[0].  Thanks in advance!


I re installed Ubuntu 12.04 from a flash drive, it doesn't boot without the flash drive.   I tried to install the grub in using the command sudo grub-install /dev/sda but it says it cannot find the device for /boot/grub and asks if the device is mounted  I checked with the disk utility program, the disk is there, its name is sda1 and it is mounted.  What could be my next move?


I have a problem to solve and I have something that i don't know how to do.  The half-space Gaussian integral is given :  $$\int_{0}^\infty \exp(-ax^2)dx = \frac{1}2 \sqrt{\frac{\pi}{a}}$$  I have to calculate   $$\int_{0}^\infty \exp \left(-y^2 - \frac{c^2}{y^2} \right)dy$$  So I think we need to use a u-substitution but i can't find something...  Is someone have an idea ? :)  Thanks for your answers  Mathieu


Unit Testing problem with Product2 records: A Product with this SKU already exists

I'm using the Product object and store the product sku within the StockKeepingUnit field. According to the , this field is considered unique, which is totally fine and expected for me. However, when I use apex testing classes, my product2 testing records that I create for testing are conflicting with the product2 records already part of my Salesforce instance. This doesn't make a lot of sense to me because I am not using seeAllData=true in my testing classes, those records in my Salesforce instance should not get into conflict with my testing records. Here is the error message I get when I try to insert a test record that has a product sku equal to a product2 record already part of my Salesforce instance. System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, A Product with this SKU already exists.: [StockKeepingUnit] I've tested it in a brand new scratch org to the same result. HOW TO REPRODUCE: I've added a new product2 record through the dev console Product2 testExistingProduct = new Product2(StockKeepingUnit='60235280574',Name='Fake Name',IsActive=true); insert testExistingProduct;  Here is the testing class @isTest private class TestDuplicateSku {     @testSetup static void setup() {         Product2 testExistingProduct = new Product2(StockKeepingUnit='60235280574',Name='Fake Name',IsActive=true);         insert testExistingProduct;     }          @isTest static void   TestBasicProductAddProperties() {         Test.startTest();         Test.stopTest();         Product2 updatedProduct = [select id,StockKeepingUnit from Product2 where StockKeepingUnit='60235280574'];         System.assertEquals('60235280574',updatedProduct.StockKeepingUnit,         'Product sku should be defined');     } }  Error message:  TestDuplicateSku.TestBasicProductAddProperties  System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, A Product with this SKU already exists.: [StockKeepingUnit] force-app/main/default/classes/TestDuplicateSku.cls:5:1


I'm testing Ubuntu 18.04 with my current desktopand everything works correctly except for the Wi-Fi adapter. I'm using a TP-LINK TL-WN8200ND version 2.  As requested , my wireless-info output is at .  I've tested Mint 19, Kubuntu and KDE neon, with similar results.  Is there an official driver that works out of the box?


We write linear combination  of two spans as $a(1,1,1)+b(1,0,0)+c(1,1,0)$. Any vector $v$ in $\mathbb{R}^3$ can be expressed as $(a+b+c, a+b, a)$. Also linear combination of $W_2$ cannot form vector in $W_1$ other than $(0,0,0)$, $W_1\cap W_2=(0,0,0)$, and therefore direct sum is $\mathbb{R}^3$.  I am not sure if my method is correct, so could anyone help?


My understanding was that Chewie was bound to Han with a 'life-debt' for Han having freed him from slavery.   In Episode VII,       Han is slain. Does this mean that all obligations arising from the life-debt are canceled?


Convert unicode escape sequence to string

My imported text contains several Unicode escape sequences  \u0092 \u0093 \u0094 \u0095 \u0096  Sample text:   string str = " Canadian Equity Funds may also invest in or use derivative instruments as described in “Investment Strategies – Use of Derivative Instruments" ";   Example c# text:    may also invest in or use derivative instruments as described in \u0093Investment Strategies \u0096 Use of Derivative Instruments\u0094."   I tried using this  Regex rx = new Regex(@"\\[uU]([0-9A-F]{4})"); var newString = rx.Replace(input, match =>  ((char)Int32.Parse(match.Value.Substring(2), NumberStyles.HexNumber)).ToString());   I get exactly  the same string.  I tried about every way I could to convert these to actual text, but to no avail. What am I supposed to do with them?


Regular expression to find string inside curly brackets while keeping curly brackets

Hi I am only starting out with Regexs, and am trying to write a regular expression to find string inside curly brackets while keeping curly brackets  Text: "This is a {nice} text to search for a {cool} substring". Answer I want: {nice} and {cool}   I have already looked through the answer here:   This almost does what I want, except that it only returns what's inside the curly brackets. I want to keep the curl brackets.


I have recently installed Ubuntu 13.04 on my PC, and it's quite slow. I'm not sure what is causing the trouble, but it looks to me like it's Unity, because all the applications take a long time to start.  I have an Intel Core 2 Duo 2.2 GHz CPU and 1.5GB RAM. I don't have any extra graphics or video card installed. And from what I have read I know that Unity uses a lot of GPU if there is a GPU installed. So if this is the cause of my poor system performance, would switching to a new desktop environment be advisable? Do you have any other suggestions for how to improve my system's performance?


Recently, at McCain's funeral Obama said:     "After all, what better way to have the last laugh than to make George and I say nice things about him to a national audience."   Is it "George and I" or "George and me"?


In bash, I tried writing a script to run the last N commands. For say, N=5  for i in {1...5} do     !-5 done   The problem is that !-5 gets replaced by the 5th-last command on my shell (say time) and the 'time' command runs 5 times.   Can I make any alteration to my script to make it run the last 5 commands on my shell in series?    NOTE: I posted this question AFTER checking out other similar question which did not answer my requirements. The situation were analogous to this: Qn1 - "How do you print 3 consecutive tildes '~~~' in C++" Ans: cout<<"~~~";  Qn2 - "How do you print N consecutive tildes '~~~' in C++"  Ans: Run a loop and do cout <<"~"; inside the loop  The questions marked duplicate are similar to Qn1 from above and what I wanted was the answer to Qn2 from above. So, I debate the fact that it is a duplicate to the previous question.


My outcomes is binary variable.  I would like to perform logistic regression model to estimate the treatment effect of Xs. However, the follow up time was longer for outcomes=1 and shorter when outcomes=0.  The probability of the outcome can be affected by the follow up time, the longer a subject was followed up, the more chance we observe a outcome=1.  I considered including the follow up time as an offset, like poisson regression model.  Is it reasonable?  Otherwise, how can I control the difference in follow up between the two groups.


Prove $[0, 1]$ and $(0, 1]$ are equinumerous by use of bijection

What my thought was that the bijection was a piecewise function:  $f(x) = 1/n+1$ if $x = 1/n$ for some $n \in \Bbb N$ and $x=1/n$ if $x \neq1/n$ for some $n \in \Bbb N$.  However, the textbook says this is incorrect. I don't actually see why. Was it a matter of brackets or the open variable $(0,1]$, which is what I tend to think.


Why are local variables not initialized in Java?

Was there any reason why the designers of Java felt that local variables should not be given a default value? Seriously, if instance variables can be given a default value, then why can't we do the same for local variables?  And it also leads to problems as explained in :     Well this rule is most frustrating when trying to close a resource in a finally block. If I instantiate the resource inside a try, but try to close it within the finally, I get this error. If I move the instantiation outside the try, I get another error stating that a it must be within a try.      Very frustrating.


I’m going to Spain in 3 months, and it will be my first flight in 8 years.  I have always had problems with my ears when I was younger. I have had lots of grommets in because of hearing loss and ear infections and had my last ones removed 2 years ago.   I still get a bit of pain in my ears even now when we drive up a hill, and my ears pop or if we go on a train through a tunnel. Even if my mum has her window open in the car and I don’t, it sends my ears wild.   However, the last time coming home on a plane from America when I was 9 or 10, I had severe pain in my ears when landing. It has always put me off flying and now I have a flight coming up. I’m very nervous.   Can someone give me some tricks and tips to calm my nerves and ease my worries? I really don’t want to not go on a plane ever again. I want to travel and I don’t want this stupid reason to hold me back from life!   I have tried the ear pressure plugs, swallowing, bowing your nose and nothing works!   I will try and get some pain meds from doctors but what if it hurts?


How to check whether my Intel-based Mac is 32-bit or 64-bit

I want to install new software that has these two versions, and I need to know which one to install.  How can I tell the 32 or 64 bit capabilities of my Mac?


Since advantage and disadvantage caused in a heavily obscured area cancel out, what effect does it have in combat?

The rules say that creatures in a heavily obscured area "effectively suffer from the blinded condition".   The  condition states:      Attacks rolls against the creature have advantage, and the creature's attack rolls have disadvantage.   So when the  spell (to use one example) is cast, combatants gain advantage and disadvantage when attacking others who are also inside the area, .   Since they then cancel each other out and attacks are made normally, what really changes?


404 errors and "repository does not have a release file" when using 'sudo apt update'

When running the command sudo apt update I get the following problems that bothers me a lot: $ sudo apt update  Hit:1 http://repo.mysql.com/apt/ubuntu eoan InRelease     Hit:2 https://deb.debian.org/debian buster InRelease                Ign:3 http://ppa.launchpad.net/morphis/anbox-support/ubuntu hirsute InRelease Hit:4 https://deb.debian.org/debian-security buster/updates InRelease Hit:5 https://download.sublimetext.com apt/stable/ InRelease        Ign:6 https://storage.googleapis.com/cros-packages/88 buster InRelease Err:7 http://ppa.launchpad.net/morphis/anbox-support/ubuntu hirsute Release   404  Not Found [IP: 91.189.95.85 80] Hit:8 https://storage.googleapis.com/cros-packages/88 buster Release Reading package lists... Done E: The repository 'http://ppa.launchpad.net/morphis/anbox-support/ubuntu hirsute Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  When trying to use sudo apt autoremove I get the following result: $ sudo apt autoremove E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?


Prove $\int_{0}^{\infty} \frac{x^{p-1}}{1+x} dx = \frac{\pi}{\sin (p \pi)}$ without using residue theorem or Beta function

I need to prove that $$\int \limits_{0}^{\infty} \frac{x^{p-1}}{1+x} dx = \frac{\pi}{\sin (p \pi)}$$ for $0<p<1$. I know how to do it using residue theorem and using the Beta function integral definitions. Also, I can transform the integral to a summation; but that is cheating. So, is there any simpler way to evaluate the integral using the integral definition of gamma function, or something lighter than the residue theorem?


Why is $ {n\choose k} \equiv 0 \pmod n$ if $n$ is prime?

For all $n>k$, why is: $$ {n\choose k} \equiv 0 \pmod n$$ if $n$ is prime? Any hints anyone? I am really puzzled.


Can a transfer go through if the IBAN and SWIFT is correct, but the beneficiary name is wrong?

A customer of mine wants to pay me from the usa to my account with N26 bank.N26 Bank is a German online bank with no branches but available to customers in the euro-zone.I opened my account online in Portugal.When my customer made the transfer and sent me the slip,i discovered the beneficiary name was completely wrong but the Iban and Swift was correct.Will the wire transfer go through with correct Iban and Swift but incorrect beneficiary name?


Predict rare happen event using logistic model?

The response variable is binary (dead="1" or not="0"),and there are 4 numeric independent variables. I tried logistic regression and 2 of independent variables are significant. However, the prediction is bad because all the predict outcome went to "0".  I think that is because there are a lot of more "0"s than "1" in the data.  Is there any package in R contains some kind of correction? Or should I use logistic model at all? If I use classification methods like LDA, will it have the same problem?


1099 for settlement what about lawyer fees?

I am getting a settlement from a business over a suit but most of the settlement will go to the attorney to cover their fees incurred on contingency.  If the 1099 reports the full settlement, will I have to pay taxes on the full amount or if not, how do I tell the IRS it is not all taxable. Otherwise, I could easily end up owing more in taxes than I get for my small portion.


Cartographic techniques for symbolizing routing data

Some common problems with displaying routes created from street data, such as bus routes, include:   Routes may overlap themselves, such as when a route takes the same road in opposite directions Routes may overlap other routes that take the same street. Routes are often overly detailed, or "noisy", owing to their derivation from street data. Indicating a route's direction unambiguously without overloading it with arrows can be a challenge.   What are some techniques for dealing with these issues in order to create a practical and usable route map, such as this ? Do you know of any such public transport maps that were produced by automatic techniques rather than manual illustration/digitization?  Specifically I am using ArcGIS 10, but solutions involving other software are welcome as well.  One technique I have had some success with for dealing with 1) is using ArcMap's  with a negative offset -- assuming the lines are oriented in the direction of travel, this will offset the lines such that the right and left-hand sides are distinct and oriented as you would expect (at least for  countries, for left-hand traffic countries one would use a positive offset). However the result tends to be a bit wonky around turns, interchanges and and U-turns, and is inflexible when dealing with multiple routes.  Another possibility that I am not very familiar with but which seems promising is  -- however, I have not had much luck in finding examples of using representations for transportation maps and whether it might fit the bill.


SQL Query - Finding rows for a highest index number

I am struggling to find a correct way to query the following scenario. Consider the below table as example, where I want the row with index_no 124 for that dvpc and pid value of the columns. Please suggest.  Index_No    dvpc     pid     rate 123         123      30      0.01 124         123      30      0.02


How to solve Syslinux 4.07 EDD Load error Boot error

I had the blue screen, downloaded Ubuntu using universal USB...  In a new USB, formatted and when I inserted it in my laptop I got the error in the title of my post. Any help there?


I want to be able to see a frame and 'calculate' (either mathematically or intuitively) the DoF of the picture to be taken.   The most basic variable would be the aperture; my question is do other variables also have effect on DoF? Especially the distance from sensor to object.   Suppose I want to photograph an object with dimensions X and my camera with aperture set on f/1.4 only focuses on half of the object. Can I change something other than the aperture to ensure the whole object is in focus?


Regression testing after dimension reduction

I have a 12 item Likert scale for my predictor variable [IV], and a 9 item Likert scale for my dependent variable [DV]. I used SPSS and did factor analysis on both scales, and found that the IV had 3 components, while the DV had 2.  I would like to report the relationship between the IV and the DV using regression analysis. How to accomplish this based of the finds of the factor analysis?  Thanks in advance.


Show that $d(z,a)=|\frac{z-a}{1-\overline{a}z}|$ is a metric on the unit disk

For any $z, a$ in the open unit disk, we define$$d(z,a)=\left \vert \frac{z-a}{1-\overline{a}z} \right \vert$$  Show that $d$ is a metric on the open unit disk.     It is easy to show $d(z,a)=d(a,z)$ and $d(z,a)=0$ $\rm iff$ $z=a$. However, I am having trouble showing that it satisfies triangle inequality. Any help would be appreciated!


Apologies if this has been asked before (I did check and I believe it wasn't). I have a question about the  of photons (or other particles). Depending on what and how we measure the photon turns out to be either a wave or a particle. Recently I saw some web page (and I can't remember where) that maybe neither is true. Both the wave perception and the particle perception are just that: perceptions, strengthened by our perhaps limited ability to observe. What if the reality of the photon is something else, something "on top" of our two perceptions?? Could someone direct me to a site that could tell me more about it (or maybe debunk the whole idea?)?


My bluetooth headset works either as headphones or microphone, not both

I've bought a Mpow H10 Headset a couple of years ago and I've always used it on my phone, great sound experience. Now I'm trying to use them on Discord but I'm having some issue. On my profiles I can see  Headset | Mpow H10 Hands-Free AG Audio  and  Headphones | Mpow H10 Stereo   Whenever I listen using the Headset profile I hear to a lot of screeching and terrible sounds, Headphones works ok though. Of course the only input profile I see it's the headset's. The problem is, using Discord, I need to use the headset profile on both input and output to make the microphone work, if I use the headphone profile on output I can't hear anything. I've used Driver Booster to update any driver on my pc. I've already tried unchecking Audio Sink and Handsfree Telephony on the Services Properties on the Control Panel but no luck. The only close solution I've found so far is using the monitor as output but I'd really like to use my headset for everything. What should I do?


Finding conjugacy classes and normal subgroups of $D_8$, the dihedral group of order $16$

What are the conjugacy classes for the dihedral group $D_8$ of order 16?  What are its subgroups of order $4$, and which of them are normal subgroups?    I know that $\{e\} ,\{r^2,r^6\},\{r,r^7\},\{r^3,r^5\},\{r^4\},\{s,r^2s,r^4s,r^6s\},  \{rs,r^3s,r^5s,r^7s\}$ are the conjugacy classes, but I don't understand how they derived these in my book; they just mentioned it without explanation.


How to use conditional operator in react js

In many places I'm setting modified by, created by etc:  const test = this.state.isValueEdited ? {   modifiedById: getLoggedInUser().userId, } : {  // TODO };   How could I check if getLoggedInUser has some value, than access .userId.. otherwise lets set null.  Thanks  Cheers


Error malformed entry 53 in list file /etc/apt/sources.list (component)

Whenever trying to install any software or try to run sudo apr update command it shows up this error as mentioned in the title and also along with it The list of sources could not be read. I am running 18.10 version of ubuntu.


Tikz: Multi-line text in the node description

I use tikz to create pictures in latex.  My picture consists of set of nodes. Every node has its own text inside the node, for example, "This node is valuable":    \node (mynode) [mystyle,right=of anothernode] {This node is valuable};        When I compile the document I see the description as one line.   This node is valuable  Is it possible to split the line into multiple lines? Like this:  This node  is  valuable  Which commands should one apply in order to achieve this?


Find the number of triangles formed by n lines.

You are given $n$ lines with equations $ax+by+c=0$. Moreover, no $3$ lines pass through the same point. You have to find the number of triangles that can be formed using these lines.  Input  First line of input contains $N$ - number of lines. $N$ lines follow, each line contains three integers $a$, $b$ and $c$ corresponding to the formula of $i$th line. Moreover, $a$ and $b$ will not be simultaneously $0$ for a line.  Output  Output a single integer corresponding to the number of triangles formed by these $N$ lines.  Constraints  1<=N<=300000 |a|,|b|,|c|<=10^9    Sample Input -    6   0 1 0   -5 3 0   -5 -2 25   0 1 -3   0 1 -2   -4 -5 29      Sample Output - 10


Linear Transformation - linear algebra question


Bootstrap overlay over image blocks button

I am trying to currently trying to create an overlay for a card body in Bootstrap. But i am not sure how to proceed now because the overlay keeps blocking the button that is located inside the card and I need to be able to click on the button. Not sure what to do now, some help would be amazing.  Html is here:       .rafting {         background-image: url(./img/rafting.jpg);         background-size: cover;         color: white;              }          .rafting:before {       content: "";       position: absolute;       left: 0; right: 0;       top: 0; bottom: 0;       background: rgba(0,0,0,.5);     } <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

NOS OFFRES

                  Go somewhere

                  Go somewhere

                   Hello


Confusing Integral Expression: $\int{\frac{1}{x+\sqrt{x^2-x+1}}dx}$

I have this integral expression to be evaluated:     $$\int{\frac{1}{x+\sqrt{x^2-x+1}}dx}$$   I've followed these steps:   Completed the square in $x$ and then substituted $u=x-\frac{1}{2}.$ Trig substituted $u = \frac{\sqrt{3}}{2}\tan t.$ and then simplified the equation thereby giving:    $$\int{\frac{\sqrt{3}\sec^2t}{\sqrt{3}\tan t+\sqrt{3}\sec t+1}dt}$$   I know up to this, but I'm unclear what to do next. Feel free to correct me if I'm wrong.


There has been a change in our DB and one of the SPs has been deleted. We have no idea who did it or when.  Is there any way to find it out? Or enabling an option to be able to track this in future?


Where should libraries be copied to sites/all or sites/all/modules?

I currently have it in both locations, but figure this is incorrect. The problem is, when I try to remove it from sites/all/modules the superfish module complains, and says that it's needed.   What am I doing wrong?


I'm not quite sure how this happened, but somehow a completely empty hierarchy of directories has ended up in my repository:  com/ com/companyname/ com/companyname/blah/ com/sun/ com/sun/java/ com/sun/java/jax_rpc_ri/   I think what happened was that these directories did have files in them, but then a developer realized he/she shouldn't have checked them in in the first place since these are by-products of the build process, so he/she removed the files but somehow the empty directories are left in the repository as ancient relics.  How can I remove this from CVS? The only results I seem to be able to find on google say that there shouldn't be a need to remove empty directories as CVS won't keep them around in the first place, and that the -P (prune) options to cvs update should remove them from the working directory  - which is zero help if you actually have empty directories in your repository.  A cvs remove and cvs commit doesn't seem to take care of this situation:  $ cvs remove -Rf com cvs remove: Removing com cvs remove: Removing com/companyname cvs remove: Removing com/companyname/blah cvs remove: Removing com/sun cvs remove: Removing com/sun/java cvs remove: Removing com/sun/java/jax_rpc_ri $ cvs commit com cvs commit: Examining com cvs commit: Examining com/companyname cvs commit: Examining com/companyname/blah cvs commit: Examining com/sun cvs commit: Examining com/sun/java cvs commit: Examining com/sun/java/jax_rpc_ri $ ls -l com total 24 drwxrwxr-x  2 matt matt 4096 Oct 15 14:38 CVS drwxrwxr-x  9 matt matt 4096 Oct 15 14:38 companyname drwxrwxr-x  4 matt matt 4096 Oct 15 14:38 sun   It's still there!  Does SVN have this weird behavior too?


Is the extra damage from Assassin's Strike maximized on a critical?

The executioner assassin has the following power  Encounter No Action Trigger: You hit an enemy within 5 squares of you with an attack using a weapon. Effect: The target takes 1d10 extra damage. If the target is helpless, this damage is maximized.  My question is the following. Most striker extra damage features are maximized on a critical hit. Is this feature also maximized on a critical or only under the circumstances listed? Or is it maxed on a critical as well.


If $X$ is an infinite set, then $X$ with the discrete topology is not compact

I am new to compact sets, and I had some hard time trying to solve this:  Let $X$ be an infinite set; $T$ the discrete topology on $X$ .Prove that $(X,T)$ is not compact.  I know that I may consider the open cover $\{\{x\},x \in X\}$ and prove that it doesn't have a finite subcover,but I don't know how to write it exactly.  Moreover, I seriously can't understant why $X$ itself cannot be considered as a finite subcover?  Any help is appreciated.


Interplay of Hausdorff metric and Lebesgue measure

Consider the space $\mathcal{K}(\mathbb{R}^{n})$ of compact subsets of $\mathbb{R}^{n}$ endowed with the Hausdorff metric $\rho$, and let $\lambda$ denote the $n$-dimensional Lebesgue measure on $\mathbb{R}^{n}$. Now, I understand that $\lambda$ is not continuous with respect to $\rho$, i.e. that $[ \lim_{k \to \infty} \rho(K, K_{k}) = 0 ] \not \Rightarrow [ \lambda(K) = \lim_{k \to \infty} \lambda(K_{k}) ]$. But my question is: Suppose $\lambda(K_{i}) = \lambda(K_{j}) = C$ for every $i, j \in \mathbb{N}$, i.e. the sequence $k \mapsto \lambda(K_{k})$ is constant; does this imply that $\lambda(\lim_{k \to \infty} K_{k}) = C$? If not, I'm interested to see a counterexample.  Thanks.


All requests seem to be going "through" something

Sorry for the title, its hard to put the problem into proper words.  Basically, in Firefox or Chrome, I try to navigate to stackoverflow.com.  The request fails and the URL I see in the navigation bar is:  http://d2e24t2jgcnor2.webhostoid.com/Secure/Error?URL=http%3A%2F%2Fstackoverflow.com%2F&ResponseCode=504&user_id=5b5033d3-3543-4b7c-9844-055afde93841&uc=20140915&subid=20140915&source=browsersafeguard-rockettab-spigot&version=1.0.5370.12627&implementation_id=browsersafeguard-rockettab-spigot%20&block_host=False&reg=False&redirectms=True   This looks shady and my internet seems slower lately. I have a few questions:   Why is my request going through this strange URL? Do the query parameters reveal my identity? How can I stop this?   I use my cell phone’s 3G network and tether it to my laptop.


Grammar of "with" in "We had no idea WITH what his purpose was"

"I have no idea 'WITH' something". Is it correct to use with as a proposition here? A line in a high school text book I saw says "We had no idea WITH what his purpose was"


How do I list all of the files in a commit?

I am looking for a simple Git command that provides a nicely formatted list of all files that were part of the commit given by a hash (SHA-1), with no extraneous information. I have tried: git show a303aa90779efdd2f6b9d90693e2cbbbe4613c1d  Although it lists the files, it also includes unwanted diff information for each. Is there another git command that will provide just the list I want, so that I can avoid parsing it from the git show output?


How do I solve the following equation?  $$\cos(x) - \sin(x) = 0$$   I need to find the minimum and maximum of this function:   $$f(x) = \frac{\tan(x)}{(1+\tan(x)^2}$$  I differentiated it, and in order to find the stationary points I need to put the numerator equal to zero. But I can't find a way to solve this trigonometric equation.


What is #shadow-root, and why does it put display none on my font awesome classes?

Why does the shadow-root styles put display none on my .fa-xxx classes?  The shadow-root thing adds the classes I use to a display none pile, but only the specific ones I add!  I'm using PHP to include navigation, footers and such, but these don't get effected by it. For example it works just fine in my navigation. There it displays the font just fine.  What is causing this, and how do I control it?


Question about bilinear form on Hilbert space

I am trying to verify the following  Let $H$ be a Hilbert space, and let $a(\cdot,\cdot)$ be a real continuous bilinear form on $H$  Then, define the operator $A:H-> H'$ as $Au(v) :=a(u,v), v\in H$  Also, define the operator $B:H->H'$ as $Bu(v) :=a(v,u), v\in H$.  Then, I want to show that A is surjective if and only if B is injective.  Here is my attempt:  Assume A is surjective. Let $w,z \in H$ such that $Bw(v) = Bz(v), v\in H$. That is, $a(\cdot,w) = a(\cdot,z)$.   By using surjectivity of A, then I can find $s$ and $t$ in $H$ such that $a(s,\cdot) = a(\cdot,w)$ and $a(t,\cdot) = a(\cdot,z)$.  Then, I somehow want to conclude that z = w, but I am not sure how what to do next.  How should I proceed?


$\vert \mathbb{R}^{\mathbb{Z}} \vert = \vert \mathbb{R} \vert $?

I want to show that $\vert \mathbb{R}^{\mathbb{Z}} \vert = \vert \mathbb{R} \vert $. Do the real numbers and the countable product of real numbers have the same cardinality?


I use save as methods as well as MXD Doctor but nothing happening. I have previously 10.5 version and I have saved my work in MXD. Now I have 10.3.2 version. How can I open .MXD files?


Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException....Caused by: java.lang.NullPointerException

I'm using spring-boot with SPring data.And just trying to create a simple create of username with hashed password to db via command line.  I'm getting this error and says that my service is null?. As I was looking of how my values are being passed, they seem to be all passing the correct values anyway. I just don't get where and why it says null pointer exception, all the while I my JPA repo save function is receiving the proper attributes.  My Entity is..   @Entity  @EntityScan  public class Users {   @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id;  @Column private String username; @Column private String password;   @Override public String toString() {     return new StringJoiner(", ", Users.class.getSimpleName() + "[", "]")             .add("id=" + id)             .add("username='" + username + "'")             .add("password='" + password + "'")             .toString(); }  public int getId() {     return id; } public void setId(int id) {     this.id = id; } public String getUsername() {     return username; } public void setUsername(String username) {     this.username = username; }  public String getPassword() {     return password; }  public void setPassword(String password) {     this.password = password; } }   And my main class is.  @SpringBootApplication public class HashingexerApplication {      @Autowired     UserService userService;      public static void main(String[] args) {         SpringApplication.run(HashingexerApplication.class, args); //        Scanner input=new Scanner(System.in);         String username, password;         System.out.println("Enter a username: "); //    username = input.nextLine();         username = "josh";         System.out.println("Enter a password: "); //    password = input.nextLine();         password = "pass";         String salt = "_Hello_World";         System.out.println("Password before encryption: " + password);         System.out.println("Salt to be added is: " + salt);         String saltedPass = password + salt;         System.out.println("Unencrypted Salted Password is: " + password + salt);         String passwordEncrypt = BCrypt.hashpw(password, BCrypt.gensalt(12));         System.out.println("Encrypted Salted Password is: " + passwordEncrypt);         Users users = new Users();         users.setId(1);         users.setUsername(username);         users.setPassword(passwordEncrypt);         System.out.println("Object:: " + users);         HashingexerApplication d = new HashingexerApplication();         d.save(users);     }     public String save(Users users) {         System.out.println("method: " + users);         userService.save(users);         return "Done";     } }   Error Details:     Exception in thread "restartedMain"   java.lang.reflect.InvocationTargetException   at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at   org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)   Caused by: java.lang.NullPointerException     at   hashingexer.hashingexer.HashingexerApplication.save(HashingexerApplication.java:61)     at   hashingexer.hashingexer.HashingexerApplication.main(HashingexerApplication.java:51)     ... 5 more


Where can I find ready-to-use database models ?  I don't need a database with data in it, but only schemas (UML diagrams). Perhaps something like the , but much more complex and real world.


I am new to Python and I am using the Python console in QGIS 3.10 to make the coordinate grid on a vector layer. I had lots of vector files which are basically square shaped of 500 meters but all are of different location. I want to export this vector file but after making grid on top of that. I want to do it in Python as I can loop it and do all the process at once. My workflows goes like this:  Load vector layer Open map canvas Display vector layer in map canvas Make coordinate grid on top of that Export that as image  Here is my code and in output it is nit creating the grids am new to Python and I am using the Python console in QGIS 3.10 to make the coordinate grid on a vector layer. I had lots of vector files which are basically square shaped of 500 meters but all are of different location. I want to export this vector file but after making grid on top of that. I want to do it in Python as I can loop it and do all the process at once. My workflows goes like this: Load vector layer Open map canvas Display vector layer in map canvas Make coordinate grid on top of that Export that as image Here is my code and in output it is nit creating the grids fn = r"C:\Users\Asus\OneDrive\Documents\map secien\360m\parent  > grid\grid_no_A1.shp" layer = iface.addVectorLayer(fn, '', 'ogr') >  > from qgis.PyQt import QtGui   layers = > QgsProject.instance().mapLayersByName('grid_no_A1') layer = layers[0]  > project = QgsProject.instance() manager = project.layoutManager() > layoutName = 'Layout1' layouts_list = manager.printLayouts() > # remove any duplicate layouts for layout in layouts_list: >     if layout.name() == layoutName: >         manager.removeLayout(layout) layout = QgsPrintLayout(project) layout.initializeDefaults() layout.setName(layoutName) > manager.addLayout(layout)   > # create map item in the layout map = QgsLayoutItemMap(layout) map.setRect(20, 20, 20, 20) >  > # set the map extent ms = QgsMapSettings() ms.setLayers([layer]) # set layers to be mapped rect = QgsRectangle(ms.fullExtent()) > rect.scale(1.0) ms.setExtent(rect) map.setExtent(rect) > map.setBackgroundColor(QColor(255, 255, 255, 0)) > layout.addLayoutItem(map)   map.attemptMove(QgsLayoutPoint(5, 20, > QgsUnitTypes.LayoutMillimeters)) map.attemptResize(QgsLayoutSize(180, > 180, QgsUnitTypes.LayoutMillimeters)) >  >  > #grid = QgsLayoutItemMapGrid(layout) out = QgsLayoutItemMap(layout) grid = QgsLayoutItemMapGrid("hr", out ) grid.annotationEnabled() > grid.setIntervalX(0.1) grid.setIntervalY(0.1) > grid.setAnnotationEnabled(True) >  >  >  > layout.addLayoutItem(out) >  > layout = manager.layoutByName(layoutName) exporter = > QgsLayoutExporter(layout)   fn = > r'C:\Users\Asus\OneDrive\Documents\map secien\layout_export.jpeg' > exporter.exportToImage(fn, QgsLayoutExporter.ImageExportSettings())


I'm trying to change the login url from wp-login.php to simply 'login'. I'd been looking through another plugins source to find ways of doing it.  Some of the applicable parts that I've got so far:  register_activation_hook( __FILE__, 'my_plugin_activate' ); register_deactivation_hook( __FILE__, 'my_plugin_deactivate' );  add_action( 'init', 'my_plugin_rewrite' ); add_action( 'login_init', 'my_plugin_login_init' ); add_action( 'template_redirect', 'my_plugin_display' );  function my_plugin_activate() {     add_rewrite_tag( '%login%', '([^/]+)');     add_permastruct( 'login', '/%login%' );     flush_rewrite_rules(); }  function my_plugin_login_init() {     if ( '/wp-login.php' == $_SERVER['PHP_SELF'] ) {         header( 'HTTP/1.0 404 Not Found' );         global $wp_query;         $wp_query->set_404();         require TEMPLATEPATH . '/404.php';         exit;     } }  function my_plugin_display() {     global $wp_query;     switch( $wp_query->query_vars['pagename'] ) {         case 'login' :             include( ABSPATH . '/wp-login.php' );             exit;             break;     } }   The problem I'm having is in the "my_plugin_display" function.  $wp_query->query_vars['pagename'] happens to be empty. How can I test if the url is at /login? Is this the right hook to use?


Applying for grad school without undergraduate background

Is it possible to apply for a graduate program in theoretical physics without having a bachelor's degree in physics or mathematics?  I'm completely self-taught. I'm half way through Jackson electrodynamics and Peskin QFT. These books are taught to students at a graduate level, let's say that I can pass the GRE exam and graduate level examinations. Is it possible that this would substitute for an undergraduate degree?


How to play a YouTube clip in background/minimised?

The stock YouTube app (here on 2.1-eclair, but applies to all android versions) stops playing when I minimised, switched to another application or even when I lock the phone. And when I resume it restart downloading the clip from the beginning. Is there any way that I can play YouTube clips in the background? Note, I only the audio to continue playing.


How to uninstall Windows from a Dual Boot system?

I installed Ubuntu in the dual-boot configuration so that I can still boot up in Windows. But I just want to get Windows off of the machine.  Anyone know how to do this without having to go through another Ubuntu install? Also are all of the Ubuntu updates safe to take? Does Ubuntu have restore points in case something goes haywire from the updates?


I have recently learned all the basics of blender from modeling to rendering, I am little bit confused about where to start 3d designing in blender. please suggest...


Level shifting a +/- 2.5V signal to 0 - 5V

I have a front end module that generates an (ECG) signal that varies from +/-2.5 V. I want to shift this signal to 0 - 5V. What is the best way to do this? Would a summing amplifier like the below circuit good enough? With R1 = R2 and V1 = 2.5V, V2 = my signal, V3 = V4 = GND


Why, in topology, is continuity defined with inverse images?

In topology we defined a continuous map to be a map between 2 spaces $f: X \mapsto Y$ such that if $U\subset Y$ is open then $f^{-1}(U)$ is open.  Why did we use the preimage; why not say 'a continuous map always maps open sets to open sets'?


Meromorphic on unit disc with absolute value 1 on the circle is a rational function.

Let $f$ be a meromorphic function on the open unit disk such that $f$ has a continuous extension to the boundary circle.Suppose $f$ has only poles in the open unit disc and suppose $|f(z)|=1$ for all $z$ with $|z|=1$.Prove that $f$ is a rational function.


How much transfer time for domestic flight arriving in LGA, transferring to JFK for an International Flight?

I am planning a flight from Atlanta, Georgia to Manila, departing Monday, March 13th.  I want to catch the flight to Manila at 11:54 am out of JFK.  The earliest flight i could find getting into jfk from atl arrives at 10:27am.  Is that cutting it too close?  The other option is to fly into LGA.  There is a flight that arrives in LGA by 8:10 am.  Is that  enough time to go by taxi from LGA to JFK and arrive at JFK by around 10 am on a monday morning?  If I buy the ticket, does that mean the carrier(s) have left enought time for the transfer?


Which is correct  1 Get out the house. Or 2 Get out of the house? I've heard that the American English standard is the first one and the British English standard is the second one. Is that true? The Oxford dictionary says in a side note that out as a preposition is standard in American English while the prepositional phrase out of is standard in British English while saying out is not standard.


What is the shortest/longest distance from $9x^2 + 4y^2 = 36$ to $(5,5)$?   Using Langrange Multipliers, I've set up the standard equation with $$g(x,y) = (x/2)^2 + (y/3)^2 = 1$$ $$f(x,y) =  (x-5)^2 + (y-5)^2$$ and $$ \nabla f = -\lambda \nabla g.$$ This gives us $$2(x-5) = - \lambda x / 2$$ $$(y-5) = - \lambda y / 9.$$ Solving for $y$ and $x$, I have $$ y = 9x / (x + 4) $$ $$ x = 4y / (9-y) .$$ But if I plug this value for $y$ into the original ellipse, I get $$ x^4 + 8x^3 + 48x^2 - 32x - 64 = 0.$$ Somehow this doesn't seem quite right as it's now cumbersome to solve for $x$. Where am I going wrong and is there a better approach?


Largest equilateral triangle which fits inside a square

What is the area of the largest equilateral triangle which fits inside a square of side a?  so area of trinagle is $\frac{a^2}{2}$, however it is wrong, why ?


I'm attempting to customize the search form block. I'd like to be able to change the search submit button, by either changing the text, or turning it into an icon and other various changes.   I assumed I'd be able to make these changes within a template, but the default block--search-form-block.html.twig only contains  {%   set classes = [     'block',     'block-search',     'container-inline',   ] %} <div{{ attributes.addClass(classes) }}>   {{ title_prefix }}   {% if label %}     <h2{{ title_attributes }}>{{ label }}</h2>   {% endif %}   {{ title_suffix }}   {% block content %}     {{ content }}   {% endblock %} </div>   I don't see anyway I can change anything such as the submit text. Is there any way to make direct changes to the search form block?


How can I edit apache settings file on 17.10?

I've installed 17.10 , php7 and apache2 via apt. I'm not able to edit the apache files to use an specific directory to use the files. I've tried   sudo gedit /etc/apache2/apache2.conf but it returned:  No protocol specified Unable to init server: No se pudo conectar: Conexión rehusada (gedit:2064): Gtk-WARNING **: cannot open display: :0  I've also tried using sudo -s and the command.


Install some packages (with deps) on machine that has no internet connection

I have server with installed minimal "Ubuntu 14.04. server" on it. This server has no internet connection. How can I deliver on this machine packages like qemu-kvm, libvirt-bin, virtinst (with their deps, of course!). I only can ssh to this server. Is ubuntu have "everything dvd", like CentOS have, for example? Or, mb I can buil this dvd/cd by myself?


What is the best way of searching the whole classpath for an annotated class?  I'm doing a library and I want to allow the users to annotate their classes, so when the Web application starts I need to scan the whole classpath for certain annotation.  Do you know a library or a Java facility to do this?  Edit: I'm thinking about something like the new functionality for Java EE 5 Web Services or EJB's. You annotate your class with @WebService or @EJB and the system finds these classes while loading so they are accessible remotely.


How do I use capsh: I am trying to run an unprivileged ping, with minimal capabilities

I am experimenting with capabilities, on Debian Gnu/Linux. I have copied /bin/ping to my current working directory. As expected it does not work, it was originally setuid root. I then give my ping the minimal capabilities (not root) by doing sudo /sbin/setcap cap_net_raw=ep ./ping, and my ping works, as expected. Then sudo /sbin/setcap -r ./ping to revoke that capability. It is now not working as expected. I now try to get ping working using capsh. capsh has no privileges, so I need to run it as root, but then drop root and thus all other privileges. I think I also need secure-keep-caps, this is not documented in capsh, but is in the capability manual. I got the bit numbers from /usr/include/linux/securebits.h. They seem correct, as the output of --print shows these bits to be correct. I have been fiddling for hours, so far I have this. sudo /sbin/capsh  --keep=1 --secbits=0x10  --caps="cap_net_raw+epi" == --secbits=0x10 --user=${USER} --print -- -c "./ping localhost" However ping errors with ping: icmp open socket: Operation not permitted, this is what happens when it does not have the capability. Also the --print shows Current: =p cap_net_raw+i, this is not enough we need e. sudo /sbin/capsh    --caps="cap_net_raw+epi" --print -- -c "./ping localhost" will set the capability to Current: = cap_net_raw+eip this is correct, but leaves us as root. Edit-1 I have now tried sudo /sbin/capsh --keep=1 --secbits=0x11  --caps=cap_net_raw+epi  --print -- -c "touch zz; ./ping -c1 localhost;" This produces: touch: cannot touch `zz': Permission denied ping: icmp open socket: Operation not permitted  The first error is expected as secure-noroot: yes But the second is not Current: = cap_net_raw+eip Edit-2 If I put == before the --print, it now shows Current: = cap_net_raw+i, so that explains the previous error, but not why we are loosing capability when switching out of root, I though that secure-keep-caps should fix that. Edit-3 From what I can see, I am loosing Effective (e), and Permitted (p), when exec is called. This is expected, but I thought that secure-keep-caps, should stop them being lost. Am I missing something. Edit-4 I have been doing more research, and reading the manual again. It seems that normally e and p capabilities are lost when: you switch from user root ( or apply secure-noroot, thus making root a normal user), this can be overridden with secure-keep-caps; when you call exec, as far as I can tell this is an invariant. As far as I can tell, it is working according to the manual. As far as I can tell there is no way to do anything useful with capsh. As far as I can tell, to use capabilities you need to: use file capabilities or have a capabilities aware program, that does not use exec. Therefore no privileged wrapper. So now my question is what am I missing, what is capsh for. Edit-5 I have added an answer re ambient capabilities. Maybe capsh can also be used with inherited capabilities, but to be useful these would need to be set on the executable file. I can not see how capsh can do anything useful without ambient capabilities, or to allow inherited capabilities.  Versions:  capsh from package libcap2-bin version 1:2.22-1.2 before edit-3 I grabbed the latest capsh from git://git.debian.org/collab-maint/libcap2.git and started using it. uname -a Linux richard-laptop 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux User-land is 32bit.


Prove the dimension of an affine algebraic variety X is equal to the dimension of its projective closure $\overline{X}$

We know the dimension of a affine algebraic variety $X\subseteq$ $\mathbb{A}^{n}_k$ (k a field, and $X$ does not have to be irreducible) is the biggest integer r such that there exists a strictly increasing chain $Z_{0}\subset Z_{1}\subset ... \subset Z_{r}\subset X$ of affine algebraic varieties in X. On the other side,  $\overline{X}$ $\subseteq$ $\mathbb{P}^{n}_k$ is the smallest algebraic subset in $\mathbb{P}^{n}_k$ (k a field) such that $X\subseteq$ $\overline{X}$. I tried proving that the projective closure preserve the inclusions, i.e., if $Z\subseteq Y$, for $Z, Y\subseteq X$, then $\overline{Z}\subseteq \overline{Y}$, for $\overline{Z},\overline{Y}\subseteq\overline{X}$, but I don't know how to proceed or if this will help me with the initial problem.


Good practices in screen states management?

I wonder what are the best ways to organize different screens in a game?  I am thinking of it like this:  Inheriting a base State class, and overriding update and render methods, to handle the current screen. Then, under certain events a StateManager is able to activate another Screen State, and the game screen changes as only the current State is rendered.  On the activation of a new screen, effects like fading could be added, and also the same goes for its deactivation. This way a flow of screen could be made. By saying when A ends, B starts, allowing for complex animations etc.  Toughts?


So… "whom I would trust" OR "who I would trust" — which is correct?

Consider the following two sentences:     (A) The man or woman has not been born yet whom I would trust to write   error-free English.      (B) The man or woman has not been born yet who would trust me to write   error-free English.   In sentence (A), a nonexistent person is the subject of "has" and the object of "trust" in the relative clause, which begins with "whom". In sentence (B), our ghost is the subject of both the initial clause and the relative clause, which begins with "who". In (A), I am the subject of trust, whereas I am the object of it in (B)—hence the use of "me".   Since "trust" has the force to change "I" to "me" in (B), I believe it should also have the force to change "who" to "whom" in (A). Am I right or wrong, and why? Should a contact clause be used in (B) instead, and if so, why?   EDIT: Having accepted the correct answer, I was right about "whom" being used in (A), but "who" could also be used in (A), in everyday speech and writing (informal contexts). The answer to my second question about the contact clause is probably no for (B) but yes for (A)! With a contact clause sentence (A) would read: "The man or woman has not been born yet I would trust to write error-free English." The relative pronoun can be removed in (A) because it's not the subject.  As a side note, I consider both relative clauses (A) and (B) to be defining relative clauses, because even though the relative clause deals with a non-existent subject, the relative clause still restricts the meaning of the first clause, thusly defining it via negativity (as similarly happens in a sentence like, "The Stack Exchange website has not been created yet within which every answer is not a million times better than any answer given to any question on Yahoo Answers.").