Within Hogwarts, where could you spend money?

This was inspired by a recent question about the .  As far as I can recall, during Harry's time at Hogwarts, there were no places within Hogwarts castle or the school grounds where the students would have to regularly spend money (at least during term time). I know that people can easily forget they have money in their pockets, but students at Hogwarts appeared to have no reason to always keep money on-hand. The only exceptions I can recall to this were mail-order items - like when Harry and co. order presents for each other - or paying the owls for newspaper and magazine subscriptions.  My question is, aside from what I've mentioned above, were there any approved shops, services etc. within Hogwarts that the students had to pay money for? Let's assume the early days of Weasleys' Wizard Wheezes doesn't count as they probably weren't operating within the school rules!


I'm using a 2015 MacBook Pro (15-inch Retina). I've recently installed Windows using Boot Camp Assistant and now I want to remove it.  To remove the BOOTCAMP partition I have tried the following:   Going to Boot Camp Assistant > Continue > Restore Result it was stuck half way. Going to Disk Utility > click BOOTCAMP partition > Erase > Mac OS Extended (Journaled) Result Unmounting disk. Couldn’t open disk. Operation failed…   Can someone help me with this?


How can I detect a client-side capsLock keypress...I have tried creating the following function that I wanted to launch when a key is pressed   <script type="text/javascript" language="javascript"> function changeCapsLock(e) {    if (typeof capsLockON != 'undefined' && e.keyCode == 20) {       capsLockON = !capsLockON;       displayMsg();          }       }   //Display the message if CapsLocks is ON, otherwise conceal the message     function displayMsg() {           if (capsLockON)                 document.getElementById('divCapsWarning').style.visibility = 'visible';         else       document.getElementById('divCapsWarning').style.visibility = 'hidden';    } }   </script> </head>  <body onkeydown="changeCapsLock(event)">    but the onkeydown event does not fire when the CapsLock is pressed?


I tried to find $f(a) = \int_{0}^{\infty} \frac{\log(x^{2}+a^{2})}{x^{2}+b^{2}}$. After differentiating I get : $f(a) = \frac{\pi \log(a+b)}{b} + C$. But it's not easy to find this constant. I represent constant as $\int_{0}^{\infty} \frac{\log(x^{2}+1)}{x^{2}+1} - \pi \log(2)$. Any hints ?


Getting NullPointerException when setting TextView values from SharedPreferences

Here is my SignInActivityCode  public class SignInActivity extends AppCompatActivity implements GoogleApiClient.OnConnectionFailedListener, View.OnClickListener {  GoogleApiClient mGoogleApiClient; private static final int RC_SIGN_IN=0; private String TAG = "SignInActivity";  @Override protected void onCreate(@Nullable Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.signin_activity);      try{         getSupportActionBar().hide();     }catch (Exception e){         e.printStackTrace();     }      GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)             .requestEmail()             .build();      mGoogleApiClient = new GoogleApiClient.Builder(this)             .enableAutoManage(this, this)             .addApi(Auth.GOOGLE_SIGN_IN_API, gso)             .build();      SignInButton signInButton = (SignInButton) findViewById(R.id.sign_in_button);     signInButton.setSize(SignInButton.SIZE_STANDARD);     signInButton.setOnClickListener(this);  }  @Override protected void onStart() {     super.onStart();     mGoogleApiClient.connect(); }  @Override public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {  }  @Override public void onClick(View v) {     switch (v.getId()){         case R.id.sign_in_button:             signIn();             break;     } }  private void signIn(){     Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);     startActivityForResult(signInIntent, RC_SIGN_IN); }   @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {     super.onActivityResult(requestCode, resultCode, data);      // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);     if (requestCode == RC_SIGN_IN){         GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);         handleSignInIntent(result);     } }  private void handleSignInIntent(GoogleSignInResult result){     Log.d(TAG, "handleSignInResult:" + result.isSuccess());     if(result.isSuccess()){         GoogleSignInAccount acct = result.getSignInAccount();          Toast.makeText(this, "Sign in successful!", Toast.LENGTH_LONG).show();         setDefaults(acct.getDisplayName(), acct.getEmail(), acct.getIdToken());         Intent intent = new Intent(SignInActivity.this, MainActivity.class);         startActivity(intent);     }     else{         Toast.makeText(this, "Sign In Failed!\nPlease try again.", Toast.LENGTH_LONG).show();     } }  public void setDefaults(String name, String email, String token){     SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);     SharedPreferences.Editor editor = sharedPref.edit();     editor.putString("userName", name);     editor.putString("userEmail", email);     editor.putString("userIdToken", token);     editor.apply(); }   }  and here is how I am applying the information passed to the MainActivity in my nav_header_main.xml file  @Override protected void onCreate(Bundle savedInstanceState) {  initializeUserInfo(); } private void initializeUserInfo() {      userName = (TextView) findViewById(R.id.nav_user_name_tv);     userEmail = (TextView) findViewById(R.id.nav_user_email_tv);      final SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getBaseContext());      name = sharedPref.getString("userName", "");     email = sharedPref.getString("userEmail", "");      try{         userName.setText(name);         userEmail.setText(email);     }catch(Exception e){         e.printStackTrace();     } }   and the error that I am getting in the logs     Blockquote   java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference


${n \choose k} \bmod m$ using Chinese remainder theorem?

I don't really see too many sites explaining how this is done. Does anyone know how this works? I'm trying to find $\binom{n}{k}\bmod m$, where $n$ and $k$ are large and $m$ is not prime. I think it can be done with the Chinese remainder theorem, but I don't understand how it is all put together.


My last name is not the same on ticket as on passport; rest of details are same

I'm traveling from JED Saudi Arabia to Singapore by Saudi airlines. My last name doesn't match the passport. But all other details are same, e.g. passport no., DOB, etc.


What's mean these microcontroller pin input/output modes?

I bought an . When I saw the reference manual, I saw that it has several I/O modes.  For input: floating, pull-up, pull-down For output: analog, open-drain, push-pull  I have already worked with AVR MCUs which have tri-state and pull-up. So I can understand pull-up and pull-down, but, I can't understand the modes floating, analog, open-drain, push-pull. What do these modes mean and when do I use which?


LinkedList indexOf method implementation

I have the following method in a program of mine:  /**   * Returns the index of the first occurrence of the specified item.  * If the specified item in not part of the list  * the method indexOf returns -1  *   * @param item  * @return index of the first occurrence of the item; -1 if the word was not found.  */ public int indexOf(String item) {         int index = 0;      //While we haven't reached the end of the list     while(head != null) {         //If the items are equal return true         if(head.item == item) {             return index;                    }         //Set the head to the next and increment the index           head = head.next;         index++;     }     return -1; }   While everything looks correct to me (other than needing to change head.item == item to head.item.equals(item)), it is not giving me the correct index.   While it does give me -1 for an element that is not in the lest, every time it is returning 0 as the index for an element that is in the list and I cannot figure out for the life of me why index is not incrementing.   Any input would be greatly appreciated! Thanks


Getting java.lang.NullPointerException while ArrayList from Sqlite

I'm getting error below while on button click                                                         java.lang.NullPointerException at com.gor.hocam.MainActivity.getListitem(MainActivity.java:329) at com.gor.hocam.MainActivity$2.onClick(MainActivity.java:222) at android.view.View.performClick(View.java:4445) at android.view.View$PerformClick.run(View.java:18446) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5139) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612) at dalvik.system.NativeStart.main(Native Method)   My Button that i clicked is (MainActivity.java:222 is the first line below);  getListitem(); System.out.println(dersadilist.size());  String[] arrRecords = dersadilist.toArray(new String[dersadilist.size()]);  int arr[] = new int[derskodulist.size()]; for (int i = 0; i < derskodulist.size(); i++) {     arr[i] = Integer.parseInt(derskodulist.get(i)); }    new MaterialDialog.Builder(MainActivity.this)     .title("Son Çözdüğünüz Dersler:")     .items(arrRecords)     .itemsIds(arr)     .itemsCallback(new MaterialDialog.ListCallback() {         @Override         public void onSelection(MaterialDialog dialog, View view, int which, CharSequence text) {             Toast.makeText(MainActivity.this, which + ": " + text + ", ID = " + view.getId(), Toast.LENGTH_SHORT).show();         }     }).show();   Here my getListitem ( which is = (MainActivity.java:329);      public void getListitem() {      List<Scoredata> score = db.getAllContacts();      for (Scoredata sc : score) {         dersidler = String.valueOf(sc.getId());         dersadlari = sc.getName();         topscore = sc.getScore();         derskodlari = sc.getKodu();         //sc.getScore();          dersidlist.add(dersidler);         dersadilist.add(dersadlari);         scorelist.add(topscore);         derskodulist.add(dersadlari);     }    }   Thats my Scoredata;  public class Scoredata {  int id; String name, kodu, score; public int getId() {     return id; } public void setId(int id) {     this.id = id; } public String getName() {     return name; } public void setName(String name) {     this.name = name; }  public String getKodu() {     return kodu; } public void setKodu(String kodu) {     this.kodu = kodu; } public String getScore() {     return score; } public void setScore(String score) {     this.score = score; }  public Scoredata(String name, String kodu, String score) {     super();      this.name = name;     this.kodu = kodu;     this.score = score; } public Scoredata() {     super();     // TODO Auto-generated constructor stub }  }   And getAllContacts on my DbHighestScore;  public List<Scoredata> getAllContacts() {     List<Scoredata> scoreList = new ArrayList<Scoredata>();        // Select All Query     String selectQuery = "SELECT  * FROM " + TABLE_CONTACTS + " ORDER BY id DESC";      SQLiteDatabase db = this.getWritableDatabase();     Cursor cursor = db.rawQuery(selectQuery, null);      // looping through all rows and adding to list     if (cursor.moveToFirst()) {         do {             Scoredata score = new Scoredata();             score.setId(Integer.valueOf(cursor.getString(0)));             score.setName(cursor.getString(1));             score.setKodu(cursor.getString(2));             score.setScore(cursor.getString(3));               scoreList.add(score);         } while (cursor.moveToNext());     }     cursor.close();     db.close();      // return contact list     return scoreList; }


Review: If true, what makes the vacuum of a local ${\rm U(1)}$ gauge theory unique?

Long back, I posted a question with title "", which, as the title suggests asked whether the vacuum of a "spontaneously broken" the gauge theory is unique.   If I understand it correctly, the answer by @ACuriousMind was that the vacuum is degenerate even in presence of a gauge field. However,  which seems to disagree. Between $10$-$11$ minutes he emphasizes that the vacuum is actually gauge-invariant and non-degenerate or unique!  Can someone explain what makes the vacuum of a gauge theory unique, if really so? I failed to understand Prof. 't Hooft's line of reasoning. Below are two screenshots from this lecture. From the slide below, the comment about the vacuum is important    Again, the comment below regarding the vacuum of gauge theory is important


Markdown parsing error on link, possibly caused by "-_-"s in URL

A user posted this link in chat:  Well, almost; he linked to this: (don't mind the newline I've added for your comparison pleasure) http://www.newegg.com/Product/Product.aspx? Item=N82E16811119233&cm_re=Cooler_Master_haf_912-_-11-119-233-_-Product)  ...but as you can see above, Markdown looks at that couple of -_-s and decides that it's actually an attempt to make the link italic. Attempting to fix the link as such:  (again, ignore the whitespace). [http://www.newegg.com/Product/Product.aspx?  Item=N82E16811119233&cm_re=Cooler_Master_haf_912-_-11-119-233-_-Product]  (http://www.newegg.com/Product/Product.aspx?   Item=N82E16811119233&cm_re=Cooler_Master_haf_912-_-11-119-233-_-Product)  Results in [this message on chat][1], rendered so: (again, whitespace and HTML comment added for you):                                           http://www.newegg.com/Product/Product.aspx?        Item=N82E16811119233&amp;cm_re=Cooler_Ma&zwnj;&#8203;ster_haf_912--11-119-233--Produc   It just so happens that the link works anyway, even with the erroneous  and s injected in it. [1]:


I am using the Paper theme on Ubuntu 16.04. Whenever I am renaming a folder/file, I cannot see the selected text, it just appears white. How and from where do I change the settings so that the selected text is visible when renaming? I do not wish to use a different theme. I found one answer to  but the answer is for Ubuntu 12.04, hence asking a new question.  Thank you for the help.


Suppose I have a rocket thats exerts a force (with negligible loses in mass), which cancels out the downward force of gravity. Clearly my rocket could be moving at a constant velocity (ignore air resistance) or not at all. Nothing seems fishy yet, but what about this: Clearly, no work is being done, but energy is still being expended to keep the rocket in place. So how can the energy expended be found (please no answers of the form: bond enthalpies of fuel etc., I am sure there is an explanation for this in Newtonian kinematics/energetics)?   Because if we try to use the formula $\mathrm{Work} = F \cdot d$, then $d$ could be zero or anything at all, which doesn't tell us anything useful. Another similar scenario would be that of two rocket exerting forces in opposite directions, clearly energy is being expended but no work so what to do?


What’s an equivalent focal length of a fullframe lens on a crop sensor?

I have an old SLR film camera lens with a focal length of 58 mm mounted on my Micro 4/3 camera with a crop factor of 2. How does mounting the lens on a different sized sensor change the effective focal length? I know an x mm lens for my sensor works as 2*x mm fullframe equivalent, but I am not sure about the math in this case.


What is a good book for self learning in geometry and topology and physics?

I am a graduate student in physics. I want to self-study topology geometry and physics. I use the book of Nakahara with the same title. However, this book is not convenient for self-study in my opinion. I have the following problems while studying this book;   There are not enough number of examples. When a mathematical definition is given, it is very easy to misunderstand it. And it is very hard to have an intuition on the idea presented. The definitions and the presentation are very concise, so in order have a feeling of what actually the presented ideas means, I usually need to address youtube to see whether someone explained already, however not everything is on youtube. There is an inconsistency on the notation, and there are also typos. So if you are learning it for the first time, this inconsistency can made some concepts impossible to grasp.   The good part of this book is, the topics covered are exactly what I need.   Thus do you have any book to complement this book with a more intuitive explanation, which is self-study friendly, and with more examples. Or even better, do you know any book that treats the same topic in a more pedagogical manner. I specifically ask a book that covers same topics with  Nakahara's chapters 2-10  which is pedagogical and suitable for self-learning, or a book to complement this one.


What does the symbol with a shield and two swords next to clan members' names mean?

When I open my clan roster, I now notice there is a symbol that has a shield + two swords next to most clan member's name.  What does this signify?  Are they ready for clan battles?


Line 17 Syntax error: unexpected end of file

i have an error that says line 17: unexpected end of file. i know others have already asked this, i tried to do the solutions given to them but still i am having the error. i am using ubuntu server 16.04 LTS. i used nano editor to write my bash.sh file. and i also downloaded the dos2unix already.  did the command sudo dos2unix bash.sh, it says converting file bash.sh to unix format...  after i do this i try to run again  using sudo ./bash.sh usertest and i still have an error  my code is very simple just to test an argument:  USER=$1  DATE=`date +%d%m%y`  if [ -z "$1" ];then     echo "Wrong format"    exit 1 else    if [ -d "\home\$USERNAME" ]; then      echo "correct" fi


How to show the cardinality $0$ is less than the cardinality $1$

I know that to show this I have to show there’s an injection from the $\varnothing$ to $\{\varnothing\}$. But how can one even define a function on the $\varnothing$?


I am wondering why a method of a class doesn't look into its enclosing scope, if a name is not defined.  def test_scope_function():     var = 5     def print_var():         print(var) # finds var from __test_scope_function__     print_var()   globalvar = 5 class TestScopeGlobal:     var = globalvar # finds globalvar from __main__      @staticmethod     def print_var():         print(TestScopeGlobal.var)   class TestScopeClass():     var = 5      @staticmethod     def print_var():         print(var) # Not finding var, raises NameError  test_scope_function() TestScopeGlobal.print_var() TestScopeClass.print_var()   I would expect TestScopeClass.print_var() to print 5 since it can read classvar in the TestScopeClass body.  Why this behavior? And what should i read in the  to get to know about it.


I want draw a simple shark.  \begin{tikzpicture}     \draw[fill=#1] (1,1) to[bend left=50] (3,1) to[bend left=50]      (1,1);     \draw[fill=#1] (3,1) -- (3.5,1.5) -- (3.3,1) -- (3.5,.5) -- cycle;     \draw[fill=white] (1.6,1.1) circle (.15cm);      \draw[fill=#1] (1.55,1.1) circle (.05cm);          \end{tikzpicture}


I am trying to initialize a list, but then I have to change each cell in said list. I did:  matrix = [[[0] * len(t[0])] * len(t[0])]   But when trying to change one cell it changes the entire column of the matrix. Why is this?


When I go to install Brasero on both the terminal & Ubuntu Software it gives me errors. I am running Ubuntu 18.04.05 LTS and I have a 1 TB laptop that I am using it on.   Any help would be much appreciated...


I use the qqnorm function to calculate normal scores in R:  x <- 1:10 y <- qqnorm(x)$x   How are these kind of normal scores calculated?


jQuery Event Keypress: Which key was pressed?

With jQuery, how do I find out which key was pressed when I bind to the keypress event?  $('#searchbox input').bind('keypress', function(e) {});   I want to trigger a submit when ENTER is pressed.  [Update]  Even though I found the (or better: one) answer myself, there seems to be some room for variation ;)  Is there a difference between keyCode and which - especially if I'm just looking for ENTER, which will never be a unicode key?  Do some browsers provide one property and others provide the other one?


How to disable Linux Image and Header Updates?

I'm running an Ethereum mining rig on Xubuntu (Ubuntu 16.04.3 LTS). With this, I have been running the latest AMD Blockchain GPU drivers and ROCM kernel. I had 4 GPUs running at 29 M/H, but upon rebooting my system these dropped to 23 M/H. Initially I thought this was an issue with my AMD drivers, and tried a fresh installation of everything. However, it appears to have been caused by an update to linux image and headers to version 4.13.0-26. Running the following commands resolved the issue:  sudo apt remove linux-image-4.13.0-26-generic sudo apt remove linux-headers-4.13.0-26-generic reboot   My question: Is there a way to avoid these updating again while still being able to run other general package updates?


Google Sheets: How to combine 2 ranges in 1 column

I am looking for a way to combine 2 / potentially more columns into 1 column, where all values (text) of the source columns are combined with each other (covering all possible combinations of the values from the 2 columns):     Column 1 Column 2 Column 3     Value 1a Value 2a Value 1a + Value 2a   Value 1b Value 2b Value 1b + Value 2a   Value 1c Value 2c Value 1c + Value 2a     Value 1a + Value 2b     Value 1b + Value 2b     Value 1c + Value 2b     Value 1a + Value 2c     Value 1b + Value 2c     Value 1c + Value 2c


As I said in the title, keep inventory is not working. I have cheats on and no mods and I know for sure it is on.


My professor gave us the following definition: Let $R$ be a commutative ring. $r \in R$ is prime if $r.R$ is a prime ideal. Then he concluded that this definition tells us $r \notin R^*$ but I do not understand why, could anyone explain this to me please? Answer(based on comments given below the question): A prime ideal is by definition a proper ideal, and if $r$ is a unit then $rR = R.$ The proof can be found in this link  and here it is: Proposition. Let $I$ be a left or right ideal of a ring $R$ with unity. Then $I = R$ if and only if $I$ contains a unit. Proof: Let $I$ be a left ideal of $R$. If $I = R$ then $1 \in I$, so $I$ contains a unit. Conversely, if $u \in I$ is any unit, let $u^{-1}$ be its inverse. For any $r \in R$, we have $r = r (u^{-1} u) = (r u^{-1}) u \in I$, because $I$ is a left ideal. Thus $I = R$. This logic is easily adapted for right ideals to show the same result. Certainly it then is true for two-sided ideals and ideals of unital commutative rings.


Voltage on the grounded conductive devices when plugging in non-grounded outlet

Most outlets in my house are non-grounded (line and neutral contacts only). I just bought a Hakko fx-888d soldering station, and immediately noticed that touching the iron-station cable gives the same sensation as when I plug in my aluminium Macbook.  This sensation disappears when I unplug both devices. I measured the voltage between the ground (from a grounded outlet in the bathroom) and the Hakko cable; it was about 100...110 V (I used the AC regime of the multimeter).   What causes this voltage? Is it dangerous for me or for electronics?  UPDATE: I live in the Netherlands, where having 2 contact outlet is allowed. The human safety is ensured by RCD = GFCI. The house is not that old and is well wired (with copper) and grounded, where required. While I'd be happy to improve it and rewire the ungrounded outlets, it doesn't make much sense as I am renting.   Also, plug orientation here is arbitrary (plug can be inserted in the outlet in two ways), so the design never relies on which wire is neutral and which one is line.


Prove that $~a,~b~$ are integers and $~a \ge2~$, then either $~b~$ is not divisible by $~a~$ or $~b+1~$ is not divisible by $~a~$.   Should I use contradiction of uniqueness of prime factorisation to prove or simply prove by mathematical induction?


I have a existing table in which i am adding a column as NgoId whose datatype is int. I want to add as NOT NULL to the column .  When I'm adding this I am getting the following error:     Unable to modify table.    Cannot insert the value NULL into column   'NgoId', table 'CSR.dbo.Tmp_tbl_post_category'; column does not allow   nulls. INSERT fails. The statement has been terminated.   Please help how to add the column with NOT NULL.


Hypothesis Test of Calculating P-Value for Average Height

Question: In 2003-2006 the average height of an American aged 20-29 was reported to be 67.25. Many believe that college students are shorter than average. A random sample of students produced the following data:  n=140, mean = 65.39, s = 4.64  Type in the test statistic rounded to TWO decimal places    Solution Attempt: I attempted to tackle this problem by choosing its sampling distribution as 1 sample T-test. I'm given no probabilities, so I don't think it's a Z-test.    Would the setup for the formula for solving for a t-value then be: $$t = \frac{65.39 - 67.25}{\frac{4.64}{\sqrt{140}}} = -4.74$$ Taking this value then and putting into R-Studio as $p value = pt(-4.74, df = 139, lower.tail = FALSE) = .999999$    This means if I choose a 95% confidence interval ... I fail to reject right? Because .9999 >> ..05


Static website and reverse proxy with NGINX

What I'm trying to do is server a static website (example.com) and also use the same domain and the server to proxy a game server backend (example.com/game-server).  This is my configuration, but neither the static page nor the game server appears to be working.  server {     server_name example.com      location /game-server {             proxy_pass http://localhost:7350/;             proxy_buffering off;             proxy_set_header X-Real-IP $remote_addr;     }      location / {             root /var/www/example.com;             index index.html;             try_files $uri $uri/ =404;     } }   The problem I'm having is that both work with "location /", but I'm getting 404 if I change it to something else.  I've tried:   "location /game/" "location /game" "location /website" "location /website/"    etc, none of them work.


RHEL / SELinux - Apache unable to write to a directory it can write to

I have a RHEL 7 machine running an Apache web server with multiple virtual hosts on it. I've recently run into an issue where I am unable to upload media, e.g. images / pictures / video, to my machine for applications such as a blog (WordPress) and a forum (XenForo). I've tried to check out what's going on and I can't seem to figure it out.  Both applications seem to share the same root problem. I've double-checked that the file permissions should be correct, yet I still run into the same errors.  Case 1  WordPress: ../wp-content/  $ ls -Alh total 8.0K -rw-rw-r--. 1 jflory apache   28 Sep 26 09:50 index.php drwxrwxr-x. 5 jflory apache   84 Oct 20 15:42 plugins drwxrwxr-x. 7 jflory apache 4.0K Sep 26 12:07 themes drwxr-xr-x. 2 jflory apache    6 Oct 20 15:42 upgrade drwxrwxr--. 3 jflory apache   17 Sep 26 11:40 uploads      “image.png” has failed to upload due to an error The uploaded file   could not be moved to wp-content/uploads/2015/10.   Case 2  XenForo  $ ls -Alh ../public_html/ total 76K drwxrwxrwx.  7 jflory apache   96 Oct 11 20:19 data drwxrwxrwx.  6 jflory apache 4.0K Jul 19 02:57 internal_data      The following errors occurred while verifying that your server can run   XenForo:      The directory /var/www/crystalcraftmc.com/public_html/data must be writable. Please change the permissions on this directory to be world   writable (chmod 0777). If the directory does not exist, please create   it.      The directory /var/www/crystalcraftmc.com/public_html/internal_data must be   writable. Please change the permissions on this directory to be world   writable (chmod 0777). If the directory does not exist, please create   it.      Please correct these errors and try again.   I have double-checked that SELinux context is correct by running sudo restorecon -Rv /var/www/. This has worked in the past, but this time, it was not the solution. HOWEVER, I have tried disabling SELinux with sudo setenforce 0, restarted the Apache service, and this resolved the issue. It seems like SELinux is to blame, but I unsure as to why, and I don't wish to keep it disabled.  I am completely lost about what the issue can be - none of this makes sense. If any further information is needed, please ask me for clarification.


Is there anyway to backup Outlook data files automatically even if Outlook is running? I thought of a standard task on Task Scheduler and use the copy command but it won't copy if Outlook is running. Is there anything within Outlook or Windows? We'll be using Outlook 2010 mainly but I would like to know about both 2010 and newer versions.


Fist timer to unix/ linux operating systems. I tried to download ubuntu to use in virtual box on a windows computer. then tried to boot the machine but got an error message that says "This kernel requires an x86-64cpu but only detected an i686 cpu. unable to boot. Please use a kernel appropriate for you cpu" Any suggestions as to how to fix this?


How to correctly pronounce "pan" and "pen" differently?

As a Portuguese speaker, I would pronounce both pan (/pæn/) and pen (/pɛn/) the same. In what can I base my pronunciation so I don't mistakenly pronounce these words the same again?


Find all n such that : $3 \mid (n2^{n}+1)$

Question :   Determine all natural numbers n such that 3   divides $n\cdot2^{n}+1$  Actually I don't have any ideas to approach but  my efforts :   I see $n=1,2,7,8,13,14$ so I think :   $n=6k+1$ and $n=6k+2$ $k\in \Bbb{N} $  If I'm not wrong but I don't know how ? I prove it ?


Receiving "Please insert CD error" when trying to install xubuntu desktop in 12.04

I have installed Ubuntu 12.04. I want to install xfce desktop. When I tried to install Xubuntu desktop, I got the  following message.  sudo apt-get install xubuntu-desktop  Media change: please insert the disc labeled  'Ubuntu 12.04.1 LTS _Precise Pangolin_ - Release i386 (20120817.3)' in the drive '/cdrom/' and press enter   I didn't know why I'm getting this error, and also I don't have CD drive. I installed Ubuntu using usb.  Please let me know how to install xubuntu desktop.


As far as I understand, cycles anti-aliasing in cycles (per default), works by sampling around a specific arc/vector determined by the camera position/rotation.   This explanation and my experience lines up with the answer here  but kind of disagrees with the explanation given in   specifically the image   describing sampling.   If sampling is working this way, the image will always be anti-aliased.  So my understanding for sampling is as follows    Where the radius of the circle is the width of the  width value of the "pixel filter" in the UI.   This would mean however, that either not all the space is sampled or the sampled space overlaps (thus blurring the image) and the only way to get high quality (super-sampling) anti-aliasing is to manually render at increased resolution and downsample the image later. Is there a way around this?


Should I use a semicolon or a colon in the following case?

I didn't like Anna calling Tom a bad person. However, most of the boys   in our class shared her view;/: Tom often bullied others, always   mocked the weak, and stole stuff from time to time.   Should that be a colon or a semicolon? And why?


Looking for a title of a sci-fi novel or story where a government department's job was to slow things down

I read a sci-fi novel or novella about a man that worked for a government department whose job it was to slow things down so the people didn't get run over by the government. Any ideas of the title? I think there was a lot of subterfuge between the agents. It's on the edge of my memory.


Structured Data error for “Missing: homeLocation” i have try setting all i could but still this error is still showing please how and where can i solve this issues  someone should help me out pls  and all my post has duplicate title and duplicate description please a guide line to fix it too. please help me.


Ubuntu not booting properly, or mounting properly... or installing updates properly

For the past couple days, following an attempt to update the OS, my computer shows this on boot-up:    The only reason I'm using it right now is that I booted up from an older version, but I've had problems with installing new version before, and also getting error messages like this:    I believe I've also had problems removing old ones through the terminal.  Anyways, what's the best route at this point?   EDIT:  Understanding it as a kernel panic, I managed to get some info on my boot files. Here's what came up.    => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of      the same hard drive for core.img. core.img is at this location and looks      in partition 112 for .  sda1: __________________________________________________________________________  File system:       ext2 Boot sector type:  - Boot sector info:  Operating System:   Boot files:        /grub/grub.cfg   sda2: __________________________________________________________________________  File system:       Extended Partition Boot sector type:  Unknown Boot sector info:    sda5: __________________________________________________________________________  File system:       crypto_LUKS Boot sector type:  Unknown Boot sector info:    ubuntu-vg-root': _______________________________________________________________  File system:        Boot sector type:  Unknown Boot sector info:  Mounting failed:   mount: unknown filesystem type ''   ubuntu-vg-swap_1': _____________________________________________________________  File system:        Boot sector type:  Unknown Boot sector info:  Mounting failed:   mount: unknown filesystem type ''   mount: unknown filesystem type ''  ============================ Drive/Partition Info: =============================  Drive: sda _____________________________________________________________________  Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes  Partition  Boot  Start Sector    End Sector  # of Sectors  Id System  /dev/sda1    *          2,048       499,711       497,664  83 Linux /dev/sda2             501,758 1,953,523,711 1,953,021,954   5 Extended /dev/sda5             501,760 1,953,523,711 1,953,021,952  83 Linux   "blkid" output: ________________________________________________________________  Device           UUID                                   TYPE       LABEL  /dev/mapper/sda5_crypt mLMv6i-emLW-vtk7-IRqk-QNrh-WhXk-VLqRFf LVM2_member  /dev/mapper/ubuntu--vg-root 5077026c-b631-4601-b0e9-fc228c6860e9   ext4        /dev/sda1        8fb7c16b-f131-4622-86f0-e3a54e5272c3   ext2        /dev/sda5        37bfa81a-5253-4b9e-bfb3-963476e52b17   crypto_LUKS   ========================= "ls -R /dev/mapper/" output: =========================  /dev/mapper: control sda5_crypt ubuntu--vg-root ubuntu--vg-swap_1  ================================ Mount points: =================================  Device           Mount_Point              Type       Options  /dev/mapper/ubuntu--vg-root /                        ext4       (rw,errors=remount-ro) /dev/sda1        /boot                    ext2       (rw)   ============================= sda1/grub/grub.cfg: ==============================     Specs:   Memory: 3.9 GiB Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4  Graphics: Gallium 0.4 on NV96 OS: 64-bit Disk: 980.1 GB (and yet it says I don't have enough space in boot)


Where is the 32bit download for latest Ubuntu Desktop?

There is literally no download link except for the bittorent file. Can anyone link me the direct download?


How to show wi-fi password without rooting your phone?

I have read  post, showing how to retrieve the stored wi-fi passwords. But I am not able to access the file. And I have also enabled android backup settings for data. I think it also saves wi-fi passwords. But I don't know from which site I can access my android personal data.  I have recently purchased a new mobile and rooting will void the warranty.  Any idea how to retrieve without rooting.  Thanks in advance !!


When talking about months should I use the preposition "on" or "in"?   For instance,      I am going to be there on/in April.


How many relays can I control arduino/raspi at the same time?

I'm thinking about a project using arduino or raspberry pi (I don't mind working with one or another). The thing is that in my project, I have to control at least.. 50 leds/relays and there will be activated at least 10 of them at the same time.  The easy way is using gpio directly with the leds/relays, but of course, neither arduino nor raspi have so many gpio outputs.  I was thinking on using some demultiplexers, but if I use them, then I may loose the ability to activate at least 10 at the same time..  For example: My project has 50+ leds/relays, and now I want to activate [1, 7, 12, 17, 21, 26, 32, 41, 44, 48] at the same time. One second after, I want to activate [6, 12, 15, 27, 29, 31, 35, 44, 47, 50] and all others will remain disabled.  Thanks in advance!


Debian how to install downloaded program

I just downloaded  . How do I install it? I am used to Windows programs installs where you open a .exe, simple and clean.  I see these files:  data.tar.gz control.tar.gz debian-binary   Each of these files have more files within them.


First Order Logic - Writing a formula for even sized domain

I am trying to write a formula that defines the structures with even sized domain.  However, since counting is not possible in First Order Logic (wouldn't want to use aggregate terms here), so I need an additional relation symbol which defines a partition of the domain into two equal-sized parts.  I can do this with a binary relation symbol, and it requires that: every domain element appears exactly once in the relation, and the relation is a bijection, so exactly half of the elements in the universe occur as the first element of a pair and the other half of the elements in the universe as the second element.  Im trying to write this in First Order Logic but I am not really sure how to go about doing it. Any help would be greatly appreciated!


Append or Add nested JSON into another JSON object

I am using typescript, I have an existing JSON response below coming through an API, {     "product":{     "prodId": "PROD100"     },     "packages":{     "pkgId": "PKG137"     },     "discount":"50",     "periodFrom":null,     "periodTo":null,     "totalAmount": "599",     "isActive": "false" }  I have another small JSON, which I want to append at the top of it "customer":{     "custId":"CUST1002"     },  Final Structure: {     "customer":{     "custId":"1002"     },     "product":{     "prodId": "PROD100"     },     "packages":{     "pkgId": "PKG137"     },     "discount":"50",     "periodFrom":null,     "periodTo":null,     "totalAmount": "599",     "isActive": "false" }  How do I achieve the same using push or unshift, or is there any best practice for the same in JavaScript or in typescript. Kindly suggest me


Can a US bank prevent you from making early payments to the principal on a home mortgage?

My friend was told by her bank she could not make early payments and apply them to the principal on her home mortgage. She wants to pay half her mortgage every two weeks and it seemed like a reasonable request.  She then asked what would happen if she just paid an extra lump sum once a year and asked it to be directed towards the principal. They told her they would only apply half to the principal and the other half to interest.  Are there any known laws explicitly allowing or preventing this behavior?


Not able to get the final rendered output(when f12 is clicked)

I am a newbie, just started rendering. I am not able to get the final image that I have rendered. When I press F12 I get just a window (the pic below) showing almost nothing. Can someone please tell me where I went wrong or what extra needs to be done? Thank you.


Can you use reflection to find the name of the currently executing method?

Like the title says: Can reflection give you the name of the currently executing method.  I'm inclined to guess not, because of the Heisenberg problem.  How do you call a method that will tell you the current method without changing what the current method is?  But I'm hoping someone can prove me wrong there.  Update:     Part 2:  Could this be used to look inside code for a property as well?   Part 3:  What would the performance be like?   Final Result I learned about MethodBase.GetCurrentMethod().  I also learned that not only can I create a stack trace, I can create only the exact frame I need if I want.    To use this inside a property, just take a .Substring(4) to remove the 'set_' or 'get_'.


How can I create a background pattern with small, cartoon-like, hand-drawn stencil images?

For example, in this picture (ignore the logo):    I love how the background is cute and made up of small, simple images. Where can I find resources like this background, or how can I recreate it?


Ways to reach Hogwarts school of witchcraft and Wizardry?

What are the various ways to reach Hogwarts School of witch craft and wizardry from the muggle world? Is Kings Cross Platform 9-3/4 the only way to reach Hogwarts from the Muggle world?


'Awaiting recommendation' on Scholar One before any review process

I submitted a manuscript to ScholarOne about 10 weeks ago. I'm aware of the typical workflow of a journal. There are two bullet points that have remained unchanged for about 8 weeks now - one saying 'awaiting reviewer scores' and the other saying 'awaiting recommendation'. From reading other posts, these don't seem to usually be said together - does it usually just say one or other? What does this mean?


Change user associated with Google Drive account (OSX) when old account does not exist

I've got Google Drive installed on Mac OSX 10.8.4 -- I no longer work and company X and want to associate Google Drive with company Y account.   I no longer have access to the old account so I can't go through the normal process of signing in and deactivating the account. I have tried deleting and uninstalling and still am being asked to sign in as the old user.  What did I miss? Where does Google Drive store the association with the old account?


Consider the following code:  public static void resize(int[] x){ x = new int[x.length*2]; System.out.println(x.length + " "); }  public static void main(String[] args){ int[] x = {1,2}; resize(x); System.out.println(x.length); }   The output is "4 2". The question is: I thought that when we are defining an array in the code of the new length, the other array (the previous one with length 2) would be discarded, as now the value of the array points to the "larger" array. So, why would then print out at the end as length 2? I used Arrays.toString to verify, and indeed, the actual values of the array after the void method are {1,2}. This is confusing, as I thought that the array itself would be changed as the value is a pointer to the memory address (in contrast with using the method on a char/int variable, which would not affect the value of the variable).


Derivation of formula of normal acceleration

Consider a particle that is described by $x(t)=(2.0-0.1t) \cos(0,5t)$ and $y(t)=(2.0-0.1t) \sin(0,5t)$ t in seconds and x,y in meters.    In previous subquestions we were asked to determine an expression for the module of the velocity vector and the tangent acceleration. The expressions obtained are:  $v=\sqrt{k^2 + w^2(r_0-kt)^2}$  $a_t=-\frac{kw^2(r_0-kt)}{\sqrt{k^2+w^2(r_0-kt)^2}}$  with $k=0.1$ and $w=0.5$ and $r_0=2.0$.  Now my question is in the next question, to find an expression with the normal acceleration.   My attempt was to take   $a_c = \frac{v^2}{R}$  $R = \sqrt{x^2+y^2}= 2.0-0.1t$  $a_c=\frac{k^2}{r_0-kt} + w^2$  The answer given by my textbook is however:  $a_c= 4k^2w^2 + w^4(r_0-kt)^2-\frac{k^2w^4(r_0-kt)^2}{{k^2+w^2(r_0-kt)^2}}$  I don't understand how this formula was derived. It seems like the third term of the sum is $-a_t^2$ but I can't understand the other two terms and what variables ares involved. And also I want to know why my answer is wrong or if it is equivalent to the one given, I can't understand that. Thanks!


Preventing LibreOffice from using smart quotes (“ ”) instead of (dumb) straight quotes?

I use LibreOffice Calc to make lists of programs with different parameters to run on an hpc cluster. For each batch of commands I must do a find and replace on the smart quotes, as they cause errors in command line arguments. It would be nice to cut this step out of my work flow. Does anyone know how I might change the default punctuation used?  Edit: Apparently the title font transforms dumb quotes into smart quotes.  Smart quotes have a different symbol depending on if they are at the start or end (“ ”)  Dumb quotes use the same symbol for the start and the stop ( " )


Monopoly Development Card - before of after the dice?

When do you use the Monopoly development card? Before or after rolling the dice? Please explain why using the official rules.


Does changing the order of the steps within a round affect the security of AES?

I was trying to understand the internal structure of AES (Advanced Encryption Standard)  The Standard order of steps within a round:   Substitute Bytes Shift Rows Mix Columns Add Round Key   Substitute Bytes, Shift Rows & Mix Columns satisfies the two most important properties required for a secure cipher i.e confusion and diffusion   Substitute Bytes provides Confusion i.e. that each binary digit (bit) of the ciphertext should depend on several parts of the key.  Shift Rows along with Mix Column provides Diffusion i.e. if we change a single bit of the plaintext, then (statistically) half of the bits in the ciphertext should change  Changing the order of Step 1 and Step 2 won't have any effect. But to what extent can we change the order of other steps? Does it weakens the security of AES, and if so, how?


Why "step into a car" but "step onto a plane"

Why do we say stepped into a car with cars but can't say the same with planes? Instead we say stepped onto a plane.


Should rice be stored in a sealed container in the refrigerator or should it be kept in a cabinet in sealed container?


Rename files adding their parent folder name

I want to rename file name with its parent folder name, adding the folder name before the current name.  for example:  Folder structure  SOCH NC KT 633-ROYAL BLUE-MULTI | | 1.jpg | | 2.jpg | | 3.jpg   Expected Result  SOCH NC KT 633-ROYAL BLUE-MULTI | |_SOCH NC KT 633-ROYAL BLUE-MULTI1.jpg | |_SOCH NC KT 633-ROYAL BLUE-MULTI2.jpg | |_SOCH NC KT 633-ROYAL BLUE-MULTI3.jpg  SOCH NC KT 710-BLACK-MULTI   Could anyone advise how this can be done in a .sh file? Is there any utility is available to do the operation?


Is there a metadata exclusion filter for the SVN DIFF command?

I use SVN as the source control system, and I wonder how to compare directories while ignoring any metadata differences. Is there a way to tell svn diff to compare only the actual content and ignore any metadata?   I mean metadata like SVN properties, etc. that don't affect the file content. Assume file X has an additional property in branch B compared to trunk T. Unfortunately it will show up in 'svn diff T B' even though the actual content of file X is the same.  I look for something like this:  svn diff https://example.org/tags/v1 https://example.org/tags/v2 -x -ignore-metadata --summarize   Update: I partially solved this by diff'ing directly on the filesystem instead of using the SVN tools. See my own answer below...


What is the best way to copy a list? I know the following ways, which one is better? Or is there another way?  lst = ['one', 2, 3]  lst1 = list(lst)  lst2 = lst[:]  import copy lst3 = copy.copy(lst)


Style Completion in Texlipse not working

Though TeXlipse is a great tex editor, one complaint I have is the lack of hot keys for common  style formatting for characters such as bold italic. I found the preference of TeXlipse has an page on style completion which seems to deal with the problem. My understanding of the usage of this feature is:    select a word Press Ctrl+space (on windows, the key is Ctrl+Alt+space) A window pops up and I can choose the format style listed in the style completion page in the preference.   However when I hit the enter to choose a format style, nothing happens? It seems that Eclipse ignores my action. Does anyone encounter this problem? And what is the alternative way to fast format characters using TeXlipse?


I recently found this picture   And I wanted to do something like that with tikz. Can someone do to me a MWE?


I used YUMI to make a bootable USB stick and I used both 12.04 and 13.10 iso files. On booting my laptop, it displays the YUMI image and asks for the kernel image of my choice. When I choose 12.04 or 13.10, it says   Boot:    and after this there is no progress. What should I do?


Deploy Visual webpart with feature which has webscope

I am new to sharepoint and was asked a question and I didn't know the answer of that, can someone please help. Please provide the reason for the solution.  Can we deploy Visual webpart with feature which has webscope, how and why/why not


I'm wondering whether I should use "can" or "could" in the following.     How can / could I concentrate with you breathing down my neck all the time?   I'd appreciate your help.


In Unity, why do my animator states wait until the end of each animation to change?

I'm trying to make a simple idle-walk transition in Animator using Unity. I've set a script that changes the Speed value from the Animator, and it works perfectly when I move the character forward when the game is on.  The transitions work well between both animations, except that they don't start automatically after the speed has changed to greater than zero.  I've found out that it waits until the animation loop gets to it's end, which makes the game feel dull and not fluid at all.    I don't think there's an issue with the code, but I'm attaching it anyway:  #pragma strict var anim : Animator;  function Start () {     anim = GetComponent("Animator"); }  function Update () {     var move : float = Input.GetAxis ("Vertical");     anim.SetFloat("Speed",move);     transform.Rotate(0,Input.GetAxis("Horizontal"),0);     transform.Translate(0,0,(Input.GetAxis("Vertical")*Time.deltaTime*move)); }


How to use Restrictions.and for joined table?

I want to get all questions marked by tags "one" and "two" with Criteria API:        Criteria criteria = sessionFactory.getCurrentSession().createCriteria(Question.class);     if (tags != null && tags.length > 0) {         criteria.createAlias("tags", "t", JoinType.INNER_JOIN);         Criterion[] criterions = new Criterion[tags.length];         for (int i = 0; i < tags.length; i++) {             criterions[i] = Restrictions.eq("t.name", tags[i]);         }         criteria.add(Restrictions.and(criterions));     }     return criteria.list();   When tags = ["one", "two"] nothing is returned, because, as I understand, hibernate firstly makes each row for each (question, tag) pair, then filters it, and only then grouping by Questions.   How can I fix this?  tags = ["one"] or tags = ["two"] works fine.


Bringing an internal hard drive to US as an emigrate

I'm from the Philippines and will be emigrating to US soon, specifically Hawaii. I'll be selling my PC locally, but I wanted to bring my hard drives with me since they have my important files, and games that are worth TBs. It'll be more economic to simply bring these drives rather than re-downloading them all again (Steam).   After reading a lot of articles online, they say that customs has the right to inspect the contents of the hard drive and/or copy a full backup of it for further inspection. Though I'm fine with it, it's a bit uncomfortable that they can just take my private data and be on with it, for the sake of security. Encrypting my hard drive may be worse, since they'll ask me what are the contents of it, and detain me for further 'investigation', based on online news and such.  So all I'd like to ask - is it okay for me to bring 2 (two) 3.5 inch Internal HDDs with me on the flight, on my hand luggage and still retain my privacy? Is it safe to encrypt my files, or simply zip sensitive files instead?  If this will just get me in trouble, can I use a courier service and safely deliver the hard drives? I'm not sure if it's safe to do this, since I believe hard drives can be sensitive to shock.


pgfplots and logscale not plotting below 10E0

EDIT about duplicate This question is not a duplicate of  as suggested. Contrary to this question, compilation does not fail. Furthermore, in the indicated post, the accepted answer states "I also don't know why it doesn't work." which is actually the question I would like an answer to. Why does the MWE does not plot the first point? EDIT: Removing the line restrict y to domain=1E-5:1E4 solves the problem but I would like to understand why. MWE \documentclass[border=5pt]{standalone}  \usepackage{pgfplots} % To produce graphs within tikz \pgfplotsset{compat=newest}  \begin{document}          \begin{tikzpicture}                  \begin{axis}[             xmin=-0,             xmax=7,             ymode=log,             restrict y to domain=1E-5:1E4,             ymin=1E-5,             ymax=1E4]                          \addplot coordinates {(0,1E-5) (3,1E1) (7,1E4)};                              \end{axis}              \end{tikzpicture}  \end{document}


Sometimes I hear people say something like the example below. Is it correct to use the word since in this manner?     Mosquitoes are surviving on earth since millions of years.


insert the Chinese character 'Biáng' with opentype

With the help of Source Han Serif (思源宋体), one can pseudo-encode some unencoded glyphs, such as the following Chinese character:    One can do this through the use of their IDSes (Ideographic Description Sequences) and the 'ccmp' (Glyph Composition/Decomposition) GSUB feature. The IDSes are ⿺ 辶⿳穴⿰月⿰⿲⿱幺長⿱言馬⿱幺長刂心 (traditional) and ⿺ 辶⿳穴⿰月⿰⿲⿱幺长⿱言马⿱幺长刂心 (simplified).  How can we do that in LaTeX?  (Note: the IDSes may not display normally on your computer!)  More information can be found in  and .


how do i fix this, it appears each time Windows 7 starts.

This is the message that appears at startup. there was a problem starting c:\users\name\appdata\local\conduit\backgroundcontainer\backgroundcontainer.dll the specifiedmodule could not be found. Windows 7 home premium.


Java ,Stack Calculator works fine if I manually push values to stack, but not if I push them using Scanner

I have to to a calculator that adds, subtract, multiply and divide the numbers one by one to a stack, and at the end it will show the result of all operations. Example.  Input:10 Input:+ Input:10 Input:= Output: 10+10=20  I tried to do it by manually pushing the numbers and operators, and it worked fine, for adding and subtracting only. (here is the code).   public static void main(String[] args) {     Stack<String> stack = new Stack();     stack.push("10");     stack.push("+");     stack.push("10");     stack.push("-");     stack.push("20");     stack.push("+");     stack.push("1");     stack.push("=");     int result=0;     int i;     int result=0;     for(i=0;i<stack.size();i++){         if (stack.elementAt(i)== "+"){            //does get in   I checked in the second code that the stack is similar to the one on the first code, and it is similar. For some reason, it doesn't want to go through the  if statement, even though it is equal to "+" or "-".  Stack<String> stack = new Stack();     Scanner sc = new Scanner(System.in);     while(sc.hasNext()){         String s1 = sc.next();         stack.push(s1);         if(s1.equals("=")) {             break;         }     }     int i;     int result=0;     for(i=0;i<stack.size();i++){         System.out.print(stack.elementAt(i));     }     for(i=0;i<stack.size();i++){         if (stack.elementAt(i)=="+"){         //doesn't get in


What's the difference between stochastic and random?


Using the basename of current path to define a new file

I'm trying to make a script that creates a temporary folder with a particular name, specifically the base name of the folder I'm running the script from. To do this I've tried to do this with the following approach.   setenv suffix $(basename $PWD) mkdir /tmp/userid_$suffix   But this fails with an illegal variable name error. I can't seem to figure this out after looking a number of sites and questions on here. How can I add the base name of the current folder to a new folder, either in one step or with setting a variable?


I have a problem as follows: $W_1$ and $W_2$ are subspaces of a finite-dimensional vector space $V$. $W^0$ is the annihilator of $W$.  (a) Prove $(W_1 + W_2)^0 = W_1^0 \cap W_2^0$.  (b) Prove $(W_1 \cap W_2)^0 = W_1^0 + W_2^0$.  Thoughts so far:  By definition of Annihilator,  $W^0$ is the set of linear functionals that vanish on $W$. I feel that I also should use dual, but not sure how to put things together.


Show that in a discrete metric space, every subset is both open and closed.

I need to prove that in a discrete metric space, every subset is both open and closed. Now, I find it difficult to imagine what this space looks like. I think it  consists of all sequences containing ones and zeros.   Now in order to prove that every subset is open, my books says that for  $A \subset X $, $A$ is open if $\,\forall x \in A,\,\exists\, \epsilon > 0$ such that $B_\epsilon(x) \subset A$.  I was thinking that since $A$ will also contain only zeros and ones, it must be open. Could someone help me ironing out the details?


How to align content of a div to the bottom

Say I have the following CSS and HTML code:    #header {   height: 150px; }

Header title
   Header content (one or multiple lines)
     The header section is fixed height, but the header content may change.  I would like the content of the header to be vertically aligned to the bottom of the header section, so the last line of text "sticks" to the bottom of the header section.  So if there is only one line of text, it would be like:   ----------------------------- | Header title | | | | header content (resulting in one line) -----------------------------   And if there were three lines:   ----------------------------- | Header title | | header content (which is so | much stuff that it perfectly | spans over three lines) -----------------------------   How can this be done in CSS?


Expected number of rolls on a 200 sided die to roll a 1?

We have a 200 sided fair die with faces numbered 1 through 200 and want to know how many rolls are expected to roll a 1. How would I go about calculating this?


Ubuntu 20.04 LTS / fix problem sudo apt update / is configuring multiple times

when I enter the line: sudo apt update, the Terminal shows me: (...) is configured multiple times... It is the first time I am using this operating system. Can anyone help me with this? Thanks you. All packages are up-to-date. W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list:64 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11-icons-hidpi (main/dep11/icons-64x64@2.tar) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list:64 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target DEP-11-icons-hidpi (main/dep11/icons-64x64@2.tar) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63 W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:61 and /etc/apt/sources.list:63


I am supposed to determine if function:  $$ f(x,y)=\begin{cases}\frac{x^{3}y}{x^{6}+y^{2}},&(x,y)\neq(0,0)\\ 0,&(x,y)=(0,0) \end{cases} $$ is continous on $\left ( 0,0 \right )$.   What I did: I substitute $y=x^{3}$:  $\lim_{\left ( x,y \right )\rightarrow \left ( 0,0 \right )}\frac{x^{3}y}{x^{6}+y^{2}}=\lim_{ x \rightarrow  0}\frac{x^{6}}{x^{6}+x^{6}}=\frac{1}{2}$  But I  do not know what to do next, I know that it is not continous, so that limit should does not exist.   Can anyone help me?


I have a lot of libraries written in C++. I want to call these libraries from C#, however, I have met many problems. I want to know if there is a book or guideline to tell me how to do that.


If two linear functionals are such that the kernel of one is contained in the kernel of the other, then they are proportional

Let $V$ be a vector space over $K$ and let $f,g \in V^*$ and satisfy $\ker f \subseteq \ker g$. Show there exist such $c \in K$ so that $c \cdot f =g$   How to approach this problem ?


How to install Ubuntu on different partition from Windows 10

I'm want to install Ubuntu on my computer, but I have some doubts about the installation process.  So I have a 256 GB SSD and a 2 TB HDD. I currently use Windows 10 as my primary OS and it's installed on my SSD in partition C: (it's important to note that my SSD has 3 partitions: a system backup partition, EFI system partition and C: )  Now, I'm forced to install Ubuntu on my HDD (it only has one partition: E:) because my SSD is almost full. Nevertheless, I can create a new partition on my HDD for installing Ubuntu   Is it possible to install Ubuntu on my HDD, which is partitioned as NTFS, and dual boot when I turn on my PC? If so, what's the correct installation process in order to do so?  I'm pretty new to Ubuntu and I would like to learn more  Thank you in advance


I am trying to prove the following identity: $$B_n(1-x)=(-1)^nB_n(x)$$  I know that $$B_n(1-x)=\sum_{k=0}^n\binom n k B_n\cdot (1-x)^{n-k}$$ (I do not know how to write here exactly what I want. So I mean that $(1-x)$ in degree $(n-k)$).  Hence $$B_n(1-x)=\sum_{k=0}^n\binom n k B_n \sum_{i=0}^{n-k}\binom{n-k}{i} (-1)^ix^i$$  Hope, you understand what I mean. Thanks for attention!


Import 100,000 rows of data from Excel to database using C#

I am trying to import data from Excel into SQL Server 2008 R2. Using the OLEDB provider. I am using Visual Studio 2010. ACE.OLEDB provider is not registered with my Visual Studio. I have 100,000 records in my Excel but it is copying only 65,535. The following is my code:    namespace WebApplication1 { public partial class Upload_page : System.Web.UI.Page {     protected void Page_Load(object sender, EventArgs e)     {      }     protected void btnUpload_Click(object sender, EventArgs e)     {         Response.Write("Working");         string path = "path";         OleDbConnection connection = null;         if (FileUpload1.HasFile)         {             path = string.Concat(Server.MapPath("~/Uploaded Folder/" + FileUpload1.FileName));             FileUpload1.SaveAs(path);         }         path = "C:\\Users\\temp\\Documents\\visual studio 2010\\Projects\\WebApplication1\\WebApplication1\\Uploaded Folder\\TempReport.xls";         try         {             string excelConnectionString = string.Format("Provider=Microsoft.jet.OLEDB.4.0;Data Source={0};Extended Properties=Excel 8.0", path);             connection = new OleDbConnection();             connection.ConnectionString = excelConnectionString;             OleDbCommand command = new OleDbCommand("select * from [ISO$]", connection);             connection.Open();             // Create DbDataReader to Data Worksheet             DbDataReader dr = command.ExecuteReader();             string sqlConnectionString = @"Initial Catalog=CensusTrack;Data Source=CWVQ-2K12E1D;Integrated Security=SSPI;";              // Bulk Copy to SQL Server              SqlBulkCopy bulkInsert = new SqlBulkCopy(sqlConnectionString);             bulkInsert.BulkCopyTimeout = 0;             bulkInsert.BatchSize =0;             bulkInsert.DestinationTableName = "[dbo].[2015_ISO]";             bulkInsert.WriteToServer(dr);             connection.Close();             Response.Write("Completed");             //Label1.Text = "Ho Gaya";         }          catch (Exception obj)         {             connection.Close();          }     }  } }   Can any one help me so that I can copy all the data from the Excel to the database table in one go?


How to fix blurry pictures taken with sony digital camera

I have some pictures taken with my sony digital camera.They are blurry,Is there any way to fix that?


Why was Stack Overflow named Stack Overflow? Where does its money come from?

Why was Stack Overflow named Stack Overflow?  Of course the stack overflow is a concept in programming, but I think there's more to it than that. What are the other reasons that this particular name was chosen for this QA site?  Also, how is is SO financially supported?


Why does Gensler's Star Test not work on some syllogisms?

All teachers are intelligent. All teachers are well-paid. From the Star Test, we can deduce that the argument must be invalid with whatever conclusion (according to the classical syllogism figures), because All T* is I. All T* is W. Here T is double-starred, so no conclusion follows. But I find the conclusion ∴Some I is W is also reasonable. So there are some limitations to the Star Test. How can we specify them?


Good resources to understand how LaTeX is constructed layer after layer?

I have been a user of LaTeX for a couple of years now, and I would like to start to be involved in the writing packages. The problem is that currently, a lot of things appear to me as "black magic".   In C and C++, I have a good culture of how the languages work from the raw hardware to the compiler and the high-level part (the part that most people use), but for the moment, in LaTeX, I only know the "high-level" layer and I would like to understand the basics starting from "the bare metal".   What would be good resources to understand the whole logic behind TeX and LaTeX, how does it work "behind the scenes" and how it is constructed layer after layer ?


If $f\left(z \right)=\sum_{n=2}^{\infty}a_{n}z^n$ and $\sum_{n=2}^{\infty}|a_n|$ converges then, $$\sum_{n=1}^{\infty}f\left(\frac{1}{n}\right)=\sum_{n=2}^{\infty}a_n\zeta\left(n\right).$$ Since if we set $C:=\sum_{m=2}^{\infty}|a_m|<\infty$, then $$\sum_{n=1}^{\infty}\sum_{m=2}^{\infty}|a_m\frac{1}{n^m}|\leq\sum_{n=1}^{\infty}\sum_{m=2}^{\infty}|a_m|\frac{1}{n^2}\leq C\sum_{n=1}^{\infty}\frac{1}{n^2}<\infty$$ and by Cauchy's double series theorem, we can switch the order of summation: $$\sum_{n=1}^{\infty}f\left(\frac{1}{n}\right)=\sum_{n=1}^{\infty}\sum_{m=2}^{\infty}a_m\frac{1}{n^m}=\sum_{m=2}^{\infty}a_m\sum_{n=1}^{\infty}\frac{1}{n^m}=\sum_{n=2}^{\infty}a_n\zeta\left(n\right).$$ This shows that $\sum_{n=2}^{\infty}\frac{\zeta(n)}{k^n}=\sum_{n=1}^{\infty}\frac{1}{kn(kn-1)}$.  My Questions:  1) It's obvious that $\sum_{n=1}^{\infty}\frac{1}{2n(2n-1)}=\log(2)$, but how can I evaluate $\sum_{n=1}^{\infty}\frac{1}{3n(3n-1)}$?  2) Is there another method to evaluate $\sum_{n=2}^{\infty}\frac{\zeta(n)}{k^n}$?


How do I power up the radio transmitter?

I'm on the "Taking Independence" mission with the Minutemen and now I need to power the radio transmitter. I already built a generator, but that doesn't seem to be enough, I need to connect it somehow.  How exactly do I connect the generator to the transmitter? The various electricity items I can build in the Workshop aren't really explained.


I'm trying to get rid of Ubuntu 16.04 have tried already to download a windows ISO to make bootable USB . Ubuntu messed up the first pendrive already.  I have tried another options like diskmanager, formating usb pendrive, but it cannot be loaded after changing boot order, doesn't recognize the new OS.  I'm Struggling with this for days! Many things doesn't work from Ubuntu (software store, downloading files, executing files or installing other apps.  What can I do?


my power supply is 400w, do I need a 400w UPS? my cpu is pentium g620 2.60Ghz,2gb 1333mhz ddr3 ram,160hdd,nvidia gt210 1gb gpu,400w psu samsung 22" LED


discrete change v. differential change in calculus

My understanding in univariate case is:  Suppose $f:\mathbb{R}\rightarrow\mathbb{R}$.  Then, $\frac{dy}{dx}|_{x=x_o}=f'(x)|_{x=x_o}$=$\lim_{\Delta x \to 0}\frac{\Delta f}{\Delta x}$, where $\Delta x=(x-x_o)$ and $\Delta f=f(x)-f(x_o)$.  Part of confusion is when I see something like:  $dy=f'(x)dx$.  What is happening here exactly? Why some books move around $dy$ and $dx$ as if they are discrete changes? Can somebody explain the difference between discrete changes and differential changes with clarity?  My understanding of $f'(x)$ at $x_o$ is the best affine approximation of $f$ at that point. Then, I use the term "sensitivity", because it is my understanding the derivative (or slope here) provides the information how sensitive function value at that point is to the very little change in $x$.  Then, what does $dy$ mean? Doesn't $dy$ also represent infinitesimal change? So I am confused difference between $dy$ and $\frac{dy}{dx}$ as well.   The terminologies that are used "instantaneous rate of change" or "slope" or "best affine approximation" or "how sensitive f is with respect to the argument at that point" amplifying the confusion.  Please help.


How to redirect to a page after submitting a form

I have a custom module that displays a form.  Upon submitting the form, I want to redirect the user to a different page.  How can I do that?


What diode modifiers are used in practice to model LEDs with SPICE (Berkeley v.3f5)?  are available to me:  #       Name    Parameter                    Units      Default Example  Area 1       IS      Saturation current             A         1e-14   1e-14    * 2       RS      Ohmic resistance               Ω         0       10       * 3       N       Emission coefficient           -         1       1.0 4       TT      Transit-time                   s         0       0.1ns 5       CJO     Zero-bias junction capacitance F         0       2pF      * 6       VJ      Junction potential             V         1       0.6 7       M       Grading coefficient            -         0.5     0.5 8       EG      Activation energy              eV        1.11    1.11 Si                                                                  0.69 Sbd                                                                  0.67 Ge 9       XTI     Saturation-current temperature exponent  3.0     3.0 jn                                                                  2.0 Sbd 10      KF      Flicker noise coefficient      -         0 11    AF      Flicker noise exponent         -         1 12    FC      Coeff. for for.-bias dep. cap. formula   0.5 13    BV      Reverse breakdown voltage      V         ∞       40.0 14    IBV     Current at breakdown voltage   A         1.0e-3 15    TNOM    Parameter measurement temp.    °C        27      50         The dc characteristics of the diode are determined by the parameters IS and N. An ohmic resistance, RS, is included. Charge storage effects are modeled by a transit time, TT, and a nonlinear depletion layer capacitance which is determined by the parameters CJO, VJ, and M. The temperature dependence of the saturation current is defined by the parameters EG, the energy and XTI, the saturation current temperature exponent. The nominal temperature at which these parameters were measured is TNOM, which defaults to the circuit-wide value specified on the .OPTIONS control line. Reverse breakdown is modeled by an exponential increase in the reverse diode current and is determined by the parameters BV and IBV (both of which are positive numbers).   For example, using this basic, cheap red:      I don't care much about high-frequency characteristics -- just would like to be able to match it's IV-curve within its operating specs (-10uA/-5V leakage to +100mA/+2.2'ishV forward):


What is the easiest way to convert files to an MP4?

I want to convert a MOV file to MP4 file. I have found many ways on YouTube, but in a fix which one will take less time.


I uninstalled some programs yesterday and it is possible I also changed/deleted some files/settings for Chromium browser. When I open new tab in Chromium, I only see blank page - no wallpaper, no shortcuts, no Google search field.  Is there any way to set new tab to this form?  I tried remove all directories for chromium that I found and reinstall it, but problem was not solved: sudo snap remove --purge chromium  sudo find / -name chromium sudo rm -r /etc/chromium sudo rm -r /usr/share/bash-completion/completions/chromium sudo rm -r /root/snap/chromium sudo rm -r ~/snap/chromium  sudo snap install chromium  I also find , but it for Google Chrome, so I do not have this option to use in Chromium. When I install Google Chrome, new tab looks as it should.


How do I get my players to form a PC party without just forcing them to?

I believe that it is generally a good thing that all the PCs travel together, as a "party". This way the GM has to manage one environment – not, say, five. The problem is how the GM can ensure such a relationship between the characters.  One simple and really great solution is to require the players to design their characters so that they know each other. This has the added advantage of cross-backstories – as the players try to adjust their stories to fit together, they get and create hooks for more narrative!  However, I am now experimenting with giving the players complete freedom at character creation and later meeting in-game. No luck so far.  It is not easy, as trusting someone with your life (what happens during combat) is not a trivial thing. Furthermore, people generally like others with the same behaviour/interests/skin colour. Fantasy is all about diversity – you do not character-generate a strong man with a sword, no, you generate a half-ogre with an axe never before seen!  How can the GM get players, with diverse characters who are strangers to each other, decide to have their PCs act as a coherent group. I absolutely want to avoid asking my players to just solve this through metagaming ("Hey Joe, think of a way to get together with those, I can't story-tell two separate groups at the same time!").  I'm not having the stereotypical problem where a bunch of PCs meet for the first time and are automatically so paranoid of strangers that they start trying to kill each other. My players have just created a bunch of characters who have their own legitimate interests, and are faithfully following those in completely different directions that don't result in a classic "party". I put the PCs in great peril together and everyone escaped by their own devices, but now I have to figure out get the guy who ran for the hills back together with the couple that entered the city. And, I want to do it by resorting only to reasonable in-game events, not out-of-game metagame suggestions.


What API function do I use for redirecting to external URLs?

When writing a module, for redirecting to Drupal paths, one uses drupal_goto.  Is there some API function that I should use for redirecting to external pages? Or is setting the Location with drupal_set_header the way to go?  PS I have to do some processing on the request; mod_rewrite/mod_alias on Apache-level or the Drupal Path redirect module, don't solve my problem.


So far I was able to write this but as you see is far from what I would like to achieve. I'm finding difficult to nest the braces. I would prefer to not use the math mode.   Can someone could please help me?     $  \parbox{2cm}{atti tipici di iniziativa della p.g.}\left \{  \begin{array}{l } \parbox{3cm}{atti di coercizione personale}\\  \parbox{3cm}{atti di acquisizione probatoria} \left \{ \begin{array}{l } \parbox{3cm}{atti di acquisiszione probatoria soggettiva}\\ \parbox{3cm}{atti di acquisiszione probatoria soggettiva}\\  \end{array} \right.  \end{array}\right. $


Intuitive explanation of Cauchy's Integral Formula in Complex Analysis

There is a theorem that states that if $f$ is analytic in a domain $D$, and the closed disc {$  z:|z-\alpha|\leq r$} contained in $D$, and $C$ denotes the disc's boundary followed in the positive direction, then for every $z$ in the disc we can write: $$f(z)=\frac{1}{2\pi i}\int\frac{f(\zeta)}{\zeta-z}d\zeta$$  My question is: What is the intuitive explanation of this formula? (For example, but not necessary, geometrically.)  (Just to clarify - I know the proof of this theorem, I'm just trying to understand where does this exact formula come from.)


Find all real numbers x such that $ |5x-1| ≤ |3x-2|$

I'm not entirely sure which proof method to use?  I'm stuck between induction or proof by cases.  --- edit ---  I have gotten a better understanding now, as I am using proof by cases, however it how can I prove that my answer is correct?


How can I print intermediate results from a pipeline to the screen?

I'm trying to count the lines from a command and I'd also like to see the lines as they go by.  My initial thought was to use the tee command:  complicated_command | tee - | wc -l   But that simply doubles the line count using GNU tee or copies output to a file named - on Solaris.


URL is not on Google - what does it mean and how to fix?

ANOTHER POSSIBLE DUPLICATE:        I'm new to optimizing pages for ranking in search engines and I've recently got in Google Search Console.  So whenever I try the URL Inspection tool with the home page of my site I get this message:     URL is not on Google       This page is not in the index, but not because of   an error. See the details below to learn why it wasn't indexed. Learn   more   Here's a more detailed view:   I'm feeling really frustrated because I don't really know what does this mean and there's no real actionable information on how to fix this.  However, when I try the Test Live URL feature I get the following:    This looks kind of ambigious information to me and I don't know if I should be worried?  I've tried to stick to the most fundamental practices for SEO so that everything on the page is moderately OK and does not have critical issues such as noindex etc.


Why do I get dark horizontal lines (stripes or bands) in bad lighting with my Fuji X-T1?

Can anyone explain why I get these lines when taking photos in bad/weak lighting? Here are some photos.


Sequence of rational numbers converging to an arbitrary irrational number $\beta$.

Here is the sequence of irrational number that converges to $\alpha\in \mathbb{Q}$. Take $x_n=\alpha -\frac{\sqrt{2}}{n}$. Clearly $\{x_n\}\rightarrow\alpha .$  But I'm trying to find a sequence of rationals that converges to arbitrary irrational number $\beta$. Can you give me such a sequence.


Comparing clustering stability over period of time

Suppose I am applying K-means clustering on two datasets generated by same process. How to compare clustering stability over a period of time? Let's say I have applied clustering in 2016 on a data set, and I want have applied  clustering on a dataset generated by same process in 2017. How to be sure that clusters have not changed/ they are stable ? More specifically , how do I know cluster 1 in 2016 is same as cluster 1 in 2017?


Find the value of $\lim_{n\to\infty} \int_0^1 \frac{nx^{n-1}}{x+1}dx$

Find the value of $$\lim_{n\to\infty} \int_0^1 \frac{nx^{n-1}}{x+1}dx$$  I just found that limit converge in $0<L<1$ but I don't know what should I do next.  I tried $\frac{nx^{n-1}}{x+1}<nx^{n-1}$ to sqeeze but It wasn't helpful.


Error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record

I have a batch job running asynchronously and I believe I am getting this error when the record run by batch job is being updated by a user at the same time. I am getting above error in test class and I have a feeling I might get the same error in production because of the batch job.    Cases are inserted into SFDC from ETL in loads of 1000. After cases are inserted, "After Trigger" is fired and these cases are sent to batch class after checking if the case status is not closed. Batch job then asynchronously posts the field value on these cases to web service.   My test class gives the error mentioned in subject when all tests are run in parallel.    If I select "Disable parallel apex testing" under options in Apex test execution, the test class passes but with the option unchecked, I am getting this error.  I referred to Mohith's answer for question # and considering to add  'for update' but I am confused on where to add that in my batch class.  trigger sends all list of cases to class which checks if status is closed. collect all cases that match above criteria and store them in list Pass this list to batch class   Here is my batch class:  public class CaseTriggerBatch implements Database.Batchable<caseVars>, Database.AllowsCallouts {      public List<CaseVars> cM;     public Integer count;             public CaseTriggerBatch(List<CaseVars> caseWrap){         cM = caseWrap;         count = caseWrap.size();     }          public Iterable<caseVars> start(Database.BatchableContext bc) {         return cM;     }      public void execute(Database.BatchableContext bc, List<CaseVars> scope) {  . . . } }   Test Class:    public static testmethod void testBatch(){                list<CaseVars> cVList = new list<CaseVars>();         for(integer i=0;i<10;i++){             CaseVars cV = new CaseVars();             cV.caseOwnerName = 'Test user'+i;             cV.accountName = 'Test'+i;             cV.parentAccountName = 'Parent'+i;             cVList.add(cV);         }                test.startTest();         Test.setMock(HttpCalloutMock.class, new SFDCCasePostToCM_Mock());         Database.executeBatch(new CaseTriggerBatch(cVList));         test.stopTest();     }   Update: Added test class.


I've been having a problem recently (Chrome 34.0.1847.116 m, Win7) where I cannot highlight text in the question/answer being reviewed (the text acts like it is a background image), nor can I use the scroll bar on the side of the page to look further down (though I can use the arrow keys most of the time when the mouse stops working. The other day the arrow keys stopped working and I could only use pgup/pgdn). I can still click "close", "edit", etc, but nothing else on the page is responsive. Obviously this has never happened even once on any other site (nor anywhere else on stack overflow), or I wouldn't be asking about it here. If I close the review tab and go back to it, the problem gets temporarily fixed. Has anyone else experienced this?


Recursive sequence.square root 3. Find the recursion ratio

$$\begin{cases} {a_n} = 3a_{n-1} - 3a_{n-2} + a_{n-3}\\ {a_0} = 1, a_1=2, a_2=5 \end{cases}$$  Hey everyone..  So far I have solved only questions of 2 root kind. I tried to solve this one but no success.. I dont know what do to after i found out:  $$x^{3} - 3x^{2} + 3{x} - 1 = 0$$ equals to: $$(x-1)^{3}$$  Aaaand lost.


GNOME Night Light Setting from the Command Line

How do I turn the GNOME night light on or off from the command line? I've got the command gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled but don't know what flag/argument/whatever to put on the end of it.  gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled ON gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled TRUE gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled YES PLEASE   None of those work.


“I do not know where … is” vs. “I do not know where is …”

Which of the following sentences is correct in a formal context?  Both?  If possible, please also explain why each of these sentences is correct/incorrect.     I do not know where the best place to ask this question is.      I do not know where is the best place to ask this question.


Replacement for Nested SELECT statements for every row in SELECT clause

I've created main SELECT statement like below. For every row in Base table (base on IDKey I've added columns with values from result of INNER JOIN of few tables.  SELECT   IDKey,    Name,    (select Amount from Table1 INNER JOIN Table2 ... where ID=IDKey) AS AmountTypeX,    (select Amount from Table1 INNER JOIN Table2 ... where ID=IDKey) AS AmountTypeY FROM BaseTable   BaseTable:  IDKey Name  ---------- 1     Ian 2     John 3     Ann ...   INNER JOIN of few tables Table1, Table2... :   ID Amount Type -------------- 1  100    X 1  200    Y 2  300    X 2  400    Y 3  500    X 3  600    Y ...   Result looks like:  IDKey  Name  AmountTypeX  AmountTypeY ------------------------------------- 1      Ian   100          200 2      John  300          400 3      Ann   500          600 ...   Do you have any suggestion how to avoid this nested SELECT statements in the main query at the begining and made this query simpler and more effective ?  I wast thinking about PIVOTING of the INNER JOIN result to look like below (all data for particular ID in one row) and then JOIN with main query but Have no idea how to do this and is it possible.  ID  X   Y ----------- 1   100 200 2   300 400 3   500 600 ...


How to add flavouring ingredients to steamed or boiled veggies?

I'm a newbie cook from to prepare the nightly dinner for my wife and I. I usually have a meat and stream or boil sweet potato, corn, Brussels sprouts, asparagus or broccolini.  It occurred to me that I was adding a little bit of butter and salt to everything that I cooked. I know if I bake something I could add rosemary etc, but how can I season / flavour food different steaming / boiling? Adding herbs to the water??


"ls" is giving a "Permission denied" error even though it worked?

I have a directory that have the r permission bit:  dr-------- 3 robert robert 4096 2017-12-17 03:47 dir   This directory have two files and one directory:  file 1.txt  file 2.txt  subdir   When I run the command ls dir (from the robert account), I get an error alongside the content of the directory:  ls: cannot access dir/file 1.txt: Permission denied ls: cannot access dir/file 2.txt: Permission denied ls: cannot access dir/subdir: Permission denied file 1.txt  file 2.txt  subdir   Why ls displayed an error even though it also displayed the content of the directory without any problem?


Problems with two fxml files and controllers in JavaFX

I have main class. It is located in package "view"  public class Main extends Application {  @Override public void start(Stage primaryStage) throws Exception{     try {        AnchorPane root = (AnchorPane) FXMLLoader.load(getClass().getResource("start.fxml"));         Scene scene = new Scene(root, 757, 562);         primaryStage.setScene(scene);         primaryStage.setTitle("Course Work");         primaryStage.show();     } catch(Exception e) {         e.printStackTrace();     } }  public static void main(String[] args) {     launch(args); } }   It successfuly load file start.fxml. Which is also located in package "view".  <?xml version="1.0" encoding="UTF-8"?>  <?import javafx.scene.text.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?>  <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="562.0" prefWidth="757.0" styleClass="anchor-pane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.Start">    <children>       <Button layoutX="48.0" layoutY="466.0" mnemonicParsing="false" onAction="#start" text="Ок">          <font>             <Font size="14.0" />          </font>       </Button>    </children> </AnchorPane>   Controller for this start.fxml is located in package "controller".  public class Start { private Stage stage;      @FXML     public void start(ActionEvent event) throws Exception {         try {             AnchorPane root = (AnchorPane) FXMLLoader.load(getClass().getResource("sample.fxml"));             Scene scene = new Scene(root, 757, 562);             stage.setScene(scene);             stage.setTitle("Course Work");             stage.show();         } catch (Exception e) {             e.printStackTrace();         }     } }   In method "start" I want to create new stage using sample.fxml. However I had some problems with it. For example - java.lang.NullPointerException. How can I fit it?


Show that the product of the distances from the foci to the tangent at any point of an ellipse is $b^2$ where $b$ is the semi-minor axis.   My process of proof so far:  Let $F(c, 0)$ and $F'(-c, 0)$ be 2 points that lie on the x-axis of the plane and $P(x_0, y_0)$ be the point that lies on the tangent to the ellipse. I simply started by simplifying the equation $$\sqrt{(x+c)^2+y^2}\sqrt{(x-c)^2+y^2}$$   However, this got me to a dead end. Plus, I feel as if there's some property about the tangent of an ellipse that I'm not using. If anyone could guide (not answer) me towards the answer, that would be extremely beneficial to my sanity (and knowledge, of course).  Thanks again.


Diff of PDF files leaves garbage on next command line

I would call this a curiosity more than a problem or anything else:  When using diff on two specific PDF files that are similar but not the same, I get some garbage dumped on the next command line.  For comparison, if I use two completely different files, I would get something like this  $ diff file1.pdf file2.pdf Binary files file1.pdf and file2.pdf differ   However, when used on the files in question:  $ diff version1.pdf version2.pdf | head 13,15c13,15 <          <xmp:CreateDate>2017-07-17T09:04:45-07:00</xmp:CreateDate> <          <xmp:MetadataDate>2017-07-17T09:06:06-07:00</xmp:MetadataDate> <          <xmp:ModifyDate>2017-07-17T09:06:06-07:00</xmp:ModifyDate> --- >          <xmp:CreateDate>2017-07-17T09:05:14-07:00</xmp:CreateDate> >          <xmp:MetadataDate>2017-07-17T09:06:04-07:00</xmp:MetadataDate> >          <xmp:ModifyDate>2017-07-17T09:06:04-07:00</xmp:ModifyDate>   [long output of differences removed]  > 0018068809 00000 n > 0018069141 00000 n > 0018073003 00000 n %%EOF189f22/Root 1 0 R/Info 321 0 R/ID[<1D82D53AF59549CBACDAEB25B1EED3D4><4527C00DC1904519AEFEA4304FBA532E>]>> \ No newline at end of file $ 1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;1;112;112;1;0x1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c   The files are obviously different, but why should anything come out on the next command line? Should this be considered a bug with diff?  I couldn't find anything relevant except  (I thought it was relevant because (a) it's also related to PDF files and (b) the garbage output looks similar).  If you're curious about the actual files in question, they came from  ( and ).  UPDATE: As suggested in the comments by @cas and @thecarpy, this is related to , because if I do $ cat file1.pdf, I get a very similar situation as when using diff.  However, there seems to be a difference (if I understand correctly) in what the OP of that question considers to be "messed-up terminal": I also tried $ cat img.png, and I got , because, no doubt, of content in the binary file that matched control codes; but in my question, characters are entered into the command line after the diff (or cat) process is terminated. This also seems to me to be contradicting @x-tian's accepted answer to that question (that you need to pipe for commands to be interpreted).  To make the question more specific and more explicit: why is this happening exactly (i.e., what causes this)? If there's a pattern in the PDF file of the form  ******** X 1;2c1;2c1;2c1;2c1......  where X is a control sequence that causes process to exit back to command line, what is X?


Who is the guy that lure us to his bandit friend and can I use him for boethiah?

Like someone truly deserve it. For example, I know a bandit that follow me because of an escort quest. Turns out he's leading me to ambush. I forget the quest and I forget the guy's name. Basically I was walking somewhere near high hrotghar. I think when I tried to go to Ivarstead. Then he asked me to escort him to his camp. In his camp his friends, the bandit attack me. I forget the name of the quest and the name of the guy. Given that he asked me to escort him, for a while he is a follower. I would love to sacrifice that bandit instead to boethiah. Can I? I forget the name of the bandit too.


Choose 2 good batteries out of 8 (4 bad 4 good)

A pack of 8 batteries is given, with 4 good batteries and 4 bad batteries. We need to take 2 good batteries for our device to work properly. How to calculate what is the smallest number of steps in which we are sure, that we have 2 good batteries? What is the best approach to take I we want to be left with two good batteries in our hand? Only way we can check if a pair is good or bad is to put it in the device. It either works (2 good batteries) or doesn’t work (1 good 1 bad or 2 bad)  EDIT: I've managed so far to find a solution, that we can do this with only 7 checks (where a check is putting two batteries to the device).   Divide 8 batteries into 4 pairs Check each pair (4 checks total) If none worked, all pairs are of type (0,1) or (1,0) Take any two pairs, cross-check them (we already know the result of one possibility, so we're left with 3 other possibilities to check, i.e. 3 checks, 7 checks total)   But I am still wondering, If this can be done with 6 checks only? Can we apply graph theory here somehow?


Can some one help me point in the right direction or point to some resources that will help me prove that sum of two jointly distributed Gaussian r.v. with a given correlation coefficient is also a Gaussian r.v. Thanks


I have an entry in cron.d:  31 17 * * * root /home/some_user/.bash_profile; /home/some_user/bin/some_script   The profile sets a specific path, and I echo the current path in the profile to ensure its correct. But, when the script executes, a command in it fails because it's not in PATH and, when I display the current PATH within the script - it's not what was set in the profile.  Why doesn't the PATH set in the profile survive into the script's execution?


How to provide power to a rotating circuit?

I want to build something with my unused fan. I am planning to put a lighting circuit using LEDs and a microcontroller (ATmega, Arduino Nano, or something), thus creating some kind of image from the rotating LEDs. However, I have no idea about how to power the circuit. It would be nice if I can power it through 220V from the fan + regulator + cable to circuit (I prefer not to use a battery), but the cable used to power the circuit in this case will always be twisted. Any idea?


I have an expression x = $a^b$ [mod N]. Knowing the values of x, a and N, will it be possible for me to find b?


How to profile a request in a production environment?

I want to get get memory usage info for each called method/function during a request. I'm working on a cloud service, for past years. When PHP 7.0 released, we noticed that we had about 30% more memory usage with same codes.  On 7.1, we noticed that 10% more memory usage was common for each request.  At the time we faced a trade-off between speed and memory (also cool new features), and we chose to upgrade our environment.  But now, PHP 7.2 has almost the same speed as 7.1 while we noticed that again, about 10% more memory is used by our codes on 7.2.    I want to know how to test our codes and see how much memory each method is using during a request. I tried a few things like memory_get_usage() or  but I'm looking for a way to automatically generate a report for all methods/functions that are called during a request. It's really impossible to check 2000+ methods/function by hand.