Android NullPointerException on a Button

EDIT: I don't know why this was marked as a duplicate. I know nullpointerexception questions must be common, but in this case the object was initialised and defined properly. The question you linked to doesn't solve my problem at all.  I'm getting an error and I can't understand why. The class was working a few days ago and I'm sure I haven't changed anything. It's a null pointer exception for a button, but I've done it the same way for all my buttons and the rest work. What am I missing here?  This is the error:     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference   Here is the code:  public class Login extends AppCompatActivity implements View.OnClickListener {  Button bLogin; EditText etUsername, etPassword;  UserLocalStore userLocalStore;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_login);      etUsername = (EditText) findViewById(R.id.etUsername);     etPassword = (EditText) findViewById(R.id.etPassword);      bLogin = (Button) findViewById(R.id.bLogin);     bLogin.setOnClickListener(this);     //This is the line the exception points to }  @Override public void onClick(View v) {     switch(v.getId()){         case R.id.bLogin:             String username = etUsername.getText().toString();             String password = etPassword.getText().toString();              User user = new User(username, password);              authenticate(user);             break;     } }  private void authenticate(User user){     ServerRequests serverRequests = new ServerRequests(this);     serverRequests.fetchUserDataInBackground(user, new GetUserCallback() {         @Override         public void done(User returnedUser) {             if(returnedUser == null){                 showErrorMessage();             }else{                 logUserIn(returnedUser);             }         }     }); }  private void showErrorMessage(){     AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(Login.this);     dialogBuilder.setMessage("Incorrect user details");     dialogBuilder.setPositiveButton("Ok", null);     dialogBuilder.show(); }  private void logUserIn(User returnedUser){     userLocalStore.storeUserData(returnedUser);     userLocalStore.setUserLoggedIn(true); } }   And the XML, just in case:  <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="match_parent" android:layout_width="match_parent" android:padding="10dp">  <EditText     android:id="@+id/etUsername"     android:hint="Username"     android:layout_height="wrap_content"     android:layout_width="match_parent"     android:layout_marginTop="50dp"     android:layout_marginBottom="10dp" />  <EditText     android:id="@+id/etPassword"     android:hint="Password"     android:inputType="textPassword"     android:layout_height="wrap_content"     android:layout_width="match_parent"     android:layout_marginBottom="10dp" />  <Button     android:id="@+id/bLogin"     android:text="Login"     android:layout_width="match_parent"     android:layout_height="wrap_content" />  </LinearLayout>   Any help is appreciated, thanks.


Is a "split plot" ANOVA with two factors the same as two-way ANOVA with repeated measures in one factor?

Is a "split plot" ANOVA with two factors identical to two-way ANOVA with repeated measures in one factor? if not, what is the distinction?


I asked a question about Currying and closures were mentioned. What is a closure? How does it relate to currying?


I have another problem with this alignation. I dont know how to align the p function between G and Aut(V_K).   Thanks again for all your support.  \begin{alignat*}{2} \theta:\mathcal{E}(K|k)&\longrightarrow& H^{1}(G,\Aut(V_{K})) \\ (V',x')&\longmapsto&p:G &\longrightarrow\Aut(V_{K}) \\ &&s&\longmapsto p_s=f^{-1}\circ s(f)=f^{-1}\circ s\circ f\circ s^{-1}. \end{alignat*}


My canon XTi has the following metering modes; Evaluative, Partial, and Center-Weighted Average.  What is the diference between these and what situations would you them in?


Let AB and CD be two intersecting chords of a circle. How can I find the coordinates of the intersection point knowing only the euclidean coordinates of the endpoints A,B,C,D and the circle center point?  This can of course be solved with a segment-segment intersection algorithm (thanks for marking this question as duplicate, everyone), but I am asking if there is a simpler or more efficient algorithm that exploits the fact that the two line segments are chords of the same circle.


Tax Firm's excellence and location, combined with my own skills and experience, make the Firm an ideal place to continue my career back home in Connecticut. or Tax Firm's excellence and location, combined with my own skills and experience, makes the Firm an ideal place to continue my career back home in Connecticut.


Can a Google Apps admin see searches made by accounts?

Is it possible for the owners or admins of a Google Apps account to see the searches made by user accounts when those user accounts are logged in?  My company switched its email system to Google. My address is the same, for example jondoe@example.com, but I must sign through google.com. I log on and check my email from my home PC often.  From home I've often searched for many things using Google. Most are normal searches like 'Where to get pizza', but some are private.   If I am logged on using my email, can my employer see my searches?


\renewcommand\tablename{name} does not work

I am completely noobie in LaTeX. I need to change table name in all captions. But when I write \renewcommand\tablename{newname} at the beginning of document, it doesn't do anything. It's still "Table" My code looks like this:  ... \renewcommand\tablename{new} ... \begin{table}[b] \centering \begin{tabular}{|l|} ... your table ... \end{tabular} \caption{This table shows some data} \end{table} ...   What am I doing wrong?


Concatenate Column A depending on Value of Column B - SQL Server

I have a table that looks like the following   COLUMN_A|| COLUMN_B || ====================== NAME1   ||    1     || NAME2   ||    1     || NAME3   ||    1     ||   NAME4   ||    2     ||   NAME5   ||    2     ||   NAME6   ||    3     || NAME7   ||    3     ||     I want to concatenate COLUMN_A depending on COLUMN_B. If values of COLUMN_B are same, then COLUMN_A should be concatenated seperated by a comma.  Expected result  NAME1, NAME2, NAME3 NAME4, NAME5 NAME6, NAME7


Harvard reference list (problem with authors names order and language package)

I'm trying to insert a Harvard reference list to my report. I'm using the Swedish language package and biblatex. However, I am having some problems with the reference list:  (1) I would like the references to be written like this:  Author1lastname, author1first name, Author2lastname, author2firstname, Author3lastname, author3firstname (year)...  However, the second and third authors names show up firstname-lastname (please see picture).  (2) I would like my references to be sorted by author last name. However, the list starts with an author whose last name starts with the letter W :(  If I add some more references, they get sorted by author last name, so I think the problem might have to do with the Swedish language package? How can I solve this problem, so that the W comes after V?  Example tex file:  \documentclass[a4paper,11pt,twoside]{article} \usepackage[T1]{fontenc} \usepackage[swedish]{babel} \usepackage[utf8]{inputenc} \usepackage{algorithmic} \usepackage[style=authoryear,backend=biber,maxbibnames=99]{biblatex} \addbibresource{reference.bib}  \begin{document}  \title{My title} \author{My name}  \maketitle  \section{I have multiple sections}  I write references like this (\cite{key1}). This shows up first in the referencelist (\cite{key2}).  \newpage  \printbibliography  \end{document}   Example bib file:  @inproceedings{key1,     author = {Author1lastname, Author1firstname and Author2lastname, Author2firstname and Author3lastname, Author3firstname},     title = {Title},     booktitle = {Booktitle},     series = {Series},     year = {Year},     isbn = {ISBN},     location = {Location},     pages = {Pages},     numpages = {Numpages},     url = {URL},     doi = {DOI},     publisher = {Publisher}, }  @inproceedings{key2,     author = {WAuthor1lastname, Author1firstname and Author2lastname, Author2firstname and Author3lastname, Author3firstname},     title = {Title},     booktitle = {Booktitle},     series = {Series},     year = {Year},     isbn = {ISBN},     location = {Location},     pages = {Pages},     numpages = {Numpages},     url = {URL},     doi = {DOI},     publisher = {Publisher}, }   I'm new to LaTex and would be very thankful for help :)


log4net - where do I find XML DTDs or Schema references for things like log4net.Appender.FileAppender configuration?

Where do I find XML DTDs or Schema references for things like log4net.Appender.FileAppender configuration?


How to read over 4k input without new lines on a terminal?

So I have a lot of data WITHOUT NEW LINES on the clipboard (it's a large SVG file on one line). I went  $ cat >file.svg   then tried to paste (in Gnome Terminal), but only the first 4kB characters were accepted.  I assume this is a readline feature/limitation.  Is there a way to read from STDIN that would avoid this problem?  EDIT  Test case: Create a demo file. This one will have ~4k "=" symbols followed by "foo bar".  { printf '=%.0s' {1..4095} ; echo "foo bar" ; } > test.in   Copy that into your clipboard  xclip test.in   (if you want to middle-click to insert) or  xclip -selection clipboard test.in   (if you want to use Ctrl-Shift-Insert to past it in)  Then cat >test.out, paste (whichever way). Press Ctrl-D to end the stream. cat test.out - do you see "foo bar"?  On my set-up (Ubuntu 12.04, Gnome Terminal, zsh) when I paste I only see the = and I don't see foo bar. Same when I inspect test.out.


I want to play mobile games on my Mac. How do I do that? I have been seeing a lot of iPhones controlling Macs. Where is the Mac controlling the iPhone?


position:absolute for footer not working as expecting

I have googled it but couldn't find any working solution; As a below example  the position:absolute does not set the footer at the bottom of page    .footer {   position: absolute;   left: 0;   bottom: 0;   width: 100%;   background-color: red;   color: white;   text-align: center; } <!DOCTYPE html>      <meta name="viewport" content="width=device-width, initial-scale=1">
Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Fixed/Sticky Footer Example

The footer is placed at the bottom of the page.

Footer

         If I scroll it, I will get:    I want the footer get pinned at the bottom of the page, who can I do this?


Brand new to c++ and im having difficulty splitting on a string. I have seen some examples of this on stack overflow, but I could not get the samples to work when looping in the for loop.  Essentially I have an array of strings that looks like.       const string userData[] =    {"A1,John,Smith,smithJ@mail.com,42",    "B2,Jane,Doe,jd@gmailcom,121,2",    "C3,Mickey,Mouse,mouseman@mail.com,20"    };      Below is the closest I have gotten to a solution myself   string s;  vector<istringstream> streamV;  vector<string> stringV;  for(const auto& str : userData)  {       istringstream nasa { str };       getline(nasa, s, ',');       stringV.push_back(s);   }  cout << stringV[0] << endl;  cout << stringV[1] << endl;   Output  A1 B1   Desired goal: I want to have each comma separated value added to a vector. Then, call out class constructors doing some inline typecasting for the last value from a string to an int.  Edit1  I understand my question is similar to  The main difference was that the solutions provided did not work well with a comma separated list, and as well iterating through an array/vector.


What Canon lens would one use for Sartorialist-like street photography?

You probably know Scott Schuman and his blog (). What kind of lens (that is not expensive) would you recommend for Canon 550D to achieve similar effect (in terms of DoF etc.)? I'm a newbie so I'm not sure how to properly interpret those photos' EXIF info. My guess is, that a similar effect can be achieved using .   PS:   Update: Thank you guys for all the answers, it's much more clear for me right now. I think I'll try the Canon 50mm f/1.4 lens.


Adjusting extents so that same-CRS shapefiles overlap in QGIS?

I have two files with identical projections/CRS. Using both OTF on & off I cannot get them to overlap: one shapefile contains coastal polygons of Massachusetts, and the other shapefile contains coastal lines for MA.   +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs   +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs    however the extents are   xMin,yMin 2321544.64,258328.06 : xMax,yMax 2333464.74,277553.12   vs.   xMin,yMin -176.685,17.9108 : xMax,yMax -65.2246,71.3413   I've followed the steps in  , tried with OTF turned on & off: the layers still do not overlap.  EDIT:  I've saved the MA coast line SHP ( Layer > save as ) using each of the Layer CRS, Project CRS and Selected CRS options: the extent remains the same. As far as I can tell, the chosen projection (EPSG:2163) is a PCS, not a GCS.


Object Array with String Representation (Java)

If I create an array of objects and I want to print the array is possible to give him a String value as representation in the array?  Example:  If I create a 2D array [7][7] and I put an object called Car in position [1][5] when I print the array is possible to give a String value of "Toyota" in the array? I want that the object appear in the array as a Toyota


Java NullPointerException after reading from database

This code throws me a NullPointerException   int StrtYr = getYear(timeToDate(0)); int YrDiff = 0; int Pyr = 0; List <Tuple> FP_entry = selectFrom(dummy_prices).list(); for (Tuple row : FP_entry){     Pyr = row.get(dummy_prices.year);     YrDiff = Pyr - StrtYr;     if (YrDiff >= 0) {         create_FPrice_tm(YrDiff, row.get(dummy_prices.price));         }     }   "dummy_prices" is a database table that contains two fields (int year, double price)  "FPrice_tm" is an instance of a dynamic event. it's defined for the simulation model.


How can I select rows from a hierarchical query with the lowest level?

I have a hierarchical query in Oracle 11gR2 that returns something like this:   Parent (Level 1)  Child (Level 2)  Grandchild (Level 3)  Child (Level 2)  Grandchild (Level 3) Grandchild (Level 3)  Child (Level 2)    The query I would like to write should get all the rows matching some predicate, for the minimum level; i.e. nearest the parent. For example, if one of the child rows matches the predicate, it should return just that row, irrespective of whether any grandchild rows match. If multiple child rows match, it should return all of them, again irrespective of grandchild rows. If no child rows match, it should return any grandchild rows that match, etc. (In the real system I have a lot more than three levels, and lots more rows per level.)  I assume this is possible with analytic functions, but I'm not sure which one to use, or how to integrate it into my query. I've seen similar problems solved using min (level) keep (dense_rank last order by level), but that doesn't seem to do quite what I want.


If $\gcd(a,b)=1$, $\gcd(a,y)=1$ and $\gcd(b,x)=1$ then prove that $ax+by$ is prime to $ab$.  I tried assuming Diophantine Equations for all the relations and representing everything in terms of $a$, but that didn't lead me anywhere. There must be an intuitive and elegant approach right?


Explosive AR(MA) processes are stationary?

According to Theorem 8.8 in Time Series A.W. van der Vaart an ARMA process $$\phi (L)X_t=\theta(L)\epsilon_t$$ has a  unique stationary solution $X_t=\psi(L)\epsilon_t$ with $\psi=\theta/\phi$ if $\phi$ has no roots on the complex unit circle. This would imply that the explosive process, with $\rho>1$, is a stationary process $$X_t=\rho X_{t-1}+\epsilon_t$$ with stationary solution $X_t=\sum_{i=1}^\infty \rho^{-i}\epsilon_{t+i}$.  Now indeed $\sum_{i=1}^{\infty} \rho^{-i} < \infty$ so that weak stationarity can be proved by using this representation.   However, here on stackexchange I see a lot of question/answers that suggest that the process above is not stationary (see for example , ). In particular, the accepted answer of the latter question claims that the process is non-stationary by simulating a series and showing it displays explosive trending behaviour.  I think the only way to reconcile the theorem I mention above and the plots in the accepted answer of () is the following: the explosive process is indeed stationary but non-ergodic, that is, we cannot find the statistical properties of $X_t$ such as $\mathbb{E}(X_t)=\mu$ by observing a single infinitely long sample path of the explosive process, mathematically: $$\lim_{t \to \infty}\frac{1}{t}\sum_{t=1}X_t \neq\mathbb{E}X_t$$  Is this reading correct?


Can my daughter visit Germany on her Type D Schengen visa issued by France?

I know this has been asked a few times, I'm just trying to confirm that my understanding is correct. According to , she should be able to travel to Germany for a short holiday on her multiple entry, type-D Schengen visa, even though the visa states:  Valid for: FRANCE (+1 TRANSIT SCHENGEN)  Edit: If I wasn't clear, I'm asking about the fact that the visa specifically states that it is valid for France, and if that somehow trumps the general type-D travel allowance. I didn't find a clear answer to that part. Possibly just because I don't understand the EU rules.


Difference between move to trash and rm on the terminal?

I am using watchdog, a python package to monitor changes in the file system. The code works fine on Mac but it seems that the delete event is not monitored correctly in ubuntu. If I do a rm instead of move the file to trash, watchdog is able to detect the change. I am wondering whether there is a difference between moving to trash and rm command on the terminal in ubuntu that might lead to this behavior.  Thank you very much!


How to use private key with Hash algorithims for storing passwords

UPDATE Found an answer here:   After reading  and doing some research I wrote some code that does the following:   Generate 128 bit Salt using Cryptographically secure pseudorandom number generator Give Password and Salt to PBKDF2 implementation Store the 32 Byte hash as the password   I would also like to include a private key as part of the process, but I'm not sure where it fits.  I've used HMAC (SHA 256) in the past to authenticate a message so I was thinking either:   Append the private key to the salt and pass the 256 bit result through the algorithm of choice ( PBKDF2 , bCrypt , Argon2) Apply a HMAC (SHA 256) password then pass that to the algorithm of choice ( PBKDF2 , bCrypt , Argon2) Something else??   I want to make sure I am using the private key properly in the context of password hashing.  Any suggestions or comments are greatly appreciated.  Thank you


Reverse triangle inequality in a normed linear space

I need to prove the following equation  $$\lvert\lVert x\rVert-\lVert y\rVert\rvert \le \lVert x-y\rVert$$  How can I prove that? I used triangle inequality. But, get stuck.


Is it possible to make custom commands in minecraft 1.12?

I have been working on a server and want to add warps as can be typed in the chat without using /tp, somebody knows how?


Prove $1^3 + 2^3 + \cdots + n^3 = (1 + 2 + \cdots + n)^2$ using Induction  My proof so far:  Let $P(n)$ be $1^3 + 2^3 + \cdots + n^3 = (1 + 2 + \cdots + n)^2$    Base Case  $P(1):$  LHS = $1^3 = 1$  RHS = $(1)^2 = 1$  Since LHS = RHS, therefore base case holds    Induction Hypothesis  Let $n \in \mathbb{N}$  be arbitrary  Assume $P(n)$ holds    Induction Step  Prove $P(n+1)$ holds:  $$ \begin{align} & 1^3 + 2^3 + \cdots + \;n^3 + (n+1)^3 \\ = {} & (1 + 2 + \cdots + \; n)^2 + (n+1)^3 \text{ (by Induction Hypothesis)} \\ = {} & (1 + 2 + \cdots + \; n)^2 + (n^3 + 3n^2 + 3n + 1) \end{align} $$    This is where I get stuck. I don't know how to prove that my last step is equivalent to:  $$(1 + 2 + \cdots + \;n + (n+1))^2$$


zadsfad@ubuntu   How can I change the username (zadsfad)? If I change the host name, the 'ubuntu' section is changed.  Should I reinstall Ubuntu?


What level of French education is generally considered to be equivalent to a U.S. Bachelor's degree: 3rd year of Licence or 1st year of Master?

In France there are three levels (these are the same for most countries in Europe I think):   Licence (3 years) Master (2 years) Doctorat (about 3 years)   In the U.S. I believe there are three levels:   Undergraduate (4 years) after which we earn a "Bachelor's degree" Graduate (about 2-3 years I think) after which we earn a "Master's degree" maybe (I'm not sure at all) Doctorate (or maybe this is included in the "Graduate" part? I don't know)   I'm a French student and I'm planning to arrive in the U.S. for the beginning of the Graduate part (I'm going to study astronomy).  I know I should begin the application process at least 7-8 months before leaving France, but should I be leaving right after I finish the 3rd year of Licence or right after I finish the 1st year of Master?  In other words... Which one is generally considered to be equivalent to a U.S. Bachelor's degree: the 3rd year of Licence or the 1st year of Master?  Does it depends on the quality of the universities? Maybe second-rate universities accept students who have the 3rd year of Licence to their Graduate programs ; while first-rate universities only accept students who have the 1st year of Master to their Graduate programs?


Connect to a device with WiFi, but use 4G for Internet

As the title states, is there a way to connect to a WiFi device (my drone), yet use another app on 4G? Right now when I'm connected to my drone using WiFi, I can't use 4G, but is there a work around?


Is there a possibility to skip the finally block and continue with the rest code

I tried with System.exit(0) but that neither executes the finally block nor rest code.  Also tried return that will execute finally block but not the rest code  private static void testMethod() {     try {         System.out.println("try Block");         // Skip Finally Block.         //return;          // System.exit(0);     } catch (Exception e) {         System.out.println("catch Block");     } finally {         System.out.println("Finally Block");     }     System.out.println("After Finally Block."); }   Output should be  try Block After Finally Block.   OR  try Block catch Block After Finally Block.


How can I filter which entities are available in the admin form for an Entity Reference Field?

I've got a Field which is called "Primary Article" which is an Entity Reference Field. I've configured this field setting the "Reference Type" to be "article", so that only articles show up in the Form when editing this field.  I would want to add two customizations to the current autocomplete field: ) 1) only return some articles based on some logic ( like I only want to return articles which are not selected as primary articles for another taxonomy ) 2) change the text of the autocomplete field, so in this case, instead of "Primary Article" I would want to return "Primary article - XYZ" where XYZ is a custom field


how to set parameters when pipe bash script to bash

How to execute bash script with parameters:  ./foo.sh a b c   When it's compressed (e.g. using xz).   xzcat foo.sh | bash <<how_to_supply_here_parameters?>>   Specific usecase:  I produced very big rmlint.sh file and store it compressed:  time rmlint -o sh:stdout -c sh:hardlink|tee >( xz > rmlint.sh.xz )   Therefore I would normally execute   ./rmlint.sh -d -x -p   However, file is too big to be uncompressed. Therefore I would love to do same by pipe-ing it to bash:  xzcat rmlint.sh.xz | bash ...


If I know that a certain key has been pressed (eg Key.D3), and that the Shift key is also down (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift)), how can I find out what character that refers to (eg, # on US keyboard, UK pound sign on UK keyboard, etc)?  Put another way, how can I find out, programatically, that Shift + 3 produces # (it wouldn't on a non-US keyboard).


How to ask a person how long he has been working in an office?

Context : Let say, I have just joined to a company and I want to ask my new friend how long he has been working here.  Using Present perfect:     How long have you worked here ?   Or   using Present perfect continuous tense ?     How long have you been working here ?   According to the image below:    Image credit:   So my answer is using present perfect continuous because I think he started in the past and he's still working at that office now. Am I right ?  Please include the reason on your answer as well.


I'm learning how to create shell scripts on UNIX for a college class. The textbook says I should just be able to type the filename in my terminal and it should run, but so far I haven't been able to get that to work. But it works fine when I type in ./myscript. Currently, I am typing the scripts out on my Mac terminal, but I had FreeBSD loaded onto a virtual box and it was doing the same thing to me.  I think maybe I need to change my environment path? I remember I had to do that when I started writing python files.


Onclick not working in lightning components in Edge

We have a community built with custom lightning components and the locker service update is active. The onclick event has been defined on several components. The onclicks are working fine in Chrome, Firefox and IE11.   Save   There seem to be some issues in MS Edge though. When we click on an element with an onclick defined, we get the following error:     This page has an error. You might just need to refresh it. Error in $A.getCallback() [Unable to get property 'apply' of undefined or null reference] Failing descriptor: {markup://aura:html}    We have been testing on 5 different laptops. 3 of them have the error, while the other 2 don't have the issue in Edge. This was all tested in a Spring 17 sandbox. We also tested on a Winter 17 org with one of the laptops that has the issue and then everything seems to work fine.  Another test we did, was to remove all of the logic within the controller method and just have a console.log in it, but it never reached that point of the code since we didn't get the log. We also replaced the expression for the onclick with an alert, but that also doesn't work.  Does anyone have an idea how we can resolve this?


how pass-by-reference and pass-by-value works in python

I thought I understood python's pass-by-reference and pass-by-value processing... can anyone explain what is the difference between pass-by-reference and pass-by-value in python


I see often websites which can start a application installed on the clients PC. How is this been done? Is it a Html page, or only done via a URL? And is there a way to get this running with my c# application?  Thanks  Edit  As always I found a solution minutes after creating this post.


After updating my system as usual from the terminal it goes on fetching updates but at last it shows the following messages. What does it mean and how do I fix the red icon. Actually to fix the red icon I updated but it isn't fixed.  The message:  W: GPG error: http://ppa.launchpad.net trusty  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1DB8ADC1CFCA9579 W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/Translation-en  Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead.   And also I could not update recommended Updates, every time I hit Install off course after authentication a message pops up. How do I fix this annoying message. I want to run my system with anomaly(s). Who wouldn't?


Comma Usage (is this a dependent clause?)

Is the comma usage in the second sentence correct?      An alaunt with short grey fur emerged from the darkness baring its teeth. Shortly after, its master followed.   I understand that a comma should follow a dependent clause. I'm unsure if, "shortly after" is a dependent clause.   I would like the sentence to communicate that the dog's owner appeared after the dog. (Is the comma necessary?)


Should I take advantage of "interest-free" credit when buying something?

If I buy something like a smartphone or a new PC, when you have these choice:   Pay all the cost at the moment. Pay it in 6/12/18 months (with loan but without any interest rate and any extra cost).    What is the best option and why?   I know that the problem depends on the money that you have but for normal people (not poor, not rich), normal salary, and normal expenses:  What is the best way?


How to use the wire service to get field from child Object?

This seems to be pretty simple but I kinda lost right now. I want to create a LWC based on two custom objects which has a master-detail relationship.  I have a 'master' object Product__c   Name Id etc   and the 'detail' object Product_Version__c   Name Id Product__c (Master-Detail (Product)) Pre_Version__c (Lookup(Product Version)) etc   I need to get field 'Id' and 'Pre_Version__c' from Product_Version__c based on the Product__c.Id  I know the SOQL command to get them:  SELECT (SELECT Id, Name, Pre_Version__c From Product_Versions__r),Name FROM Product__c WHERE Id = 'abcde'   I also know how to use wire to get fields from an object, but not from the child/detail object.  How do I get fields from the child/detail object (Product_Version__c) based only on Product__c.Id?  lwc.js  import { LightningElement,api,wire} from 'lwc'; import { getRecord, getRecordUi } from 'lightning/uiRecordApi'; import productVersion from '@salesforce/schema/Product_Version__c';  const fields = [     'Product__c.Name',     'Product__c.Id' ];  const productVersionFields = [      'Product_Version__c.Name',      'Product_Version__c.Id',      'Product_Version__c.Pre_Version__c', ]  export default class ProductVersion extends LightningElement { @api recordId; recordId= 'abcde'; @wire(getRecord, { recordId: '$recordId', fields }) product;  get name() {     return this.product.data ? this.product.data.fields.Name.value : ""; }  get id() {     return this.product.data ? this.product.data.fields.Id.value : ""; }   @wire(getRecordUi, { recordIds: '$recordId', childRelationships: "Product.Product_Versions" })     productVersion;      //Product Version object     get preVersion() {         return this.productVersion.data ? this.productVersion.data.fields.Pre_Version__c .value : "";     }      get childId() {         return this.productVersion.data ? this.productVersion.data.fields.Id.value : "";     } }


Msg 15404, Level 16, State 10, Procedure xp_logininfo - missing permissions

I have a server based in the USA, where I am not a domain admin, and my permissions are limited to sql server only - where I am sysadmin.  after a migration of a few databases to a new server, I noticed that I needed to go back to the old server to get one of my logins and permissions related.  when I run the following command:  EXEC xp_logininfo 'gplondon';     I get:     Msg 15404, Level 16, State 10, Procedure xp_logininfo, Line 62 [Batch   Start Line 6] Could not obtain information about Windows NT group/user   'gplondon', error code 0xffff0002.   I understand I have all the    But what other permissions are missing that have disabled me (or the sql server service on that server) to interrogate the active directory?  in other words, everything was working fine before, what permissions are missing now?


Is there a name for when the same word is used at the beginning and end of different phrases/sentences?

Is there a name for when one phrase ends with a word that starts the next phrase. For instance:     life is a peach and cream   Or     sunscreen in the eye for detail   Or (from Dave Eggers' Heartbreaking Work of Staggering Genius)     JFKFC


I am trying to see the status of the dd command with this option "status=progress" but it says that it's an invalid status flag.    dd if=example.img of=/dev/sdb bs=512 conv=noerror,sync status=progress    is their commit from 2014 and I do have the latest version of coreutils in Debian Jessie.  Thanks.


I have just read an  regarding User-Defined resultset ordering.     Some applications, such as todo lists, need to maintain a user-defined   order of items. The challenge is that the order is arbitrary and can   change when the user rearranges items   An example table could be like so:  create table items (   itemid int primary key,   itemdata varchar(200),   ...   ...   userorder ???  );   With a possible retrieval query of:  select * from items order by userorder asc;   Are there any approaches that I should consider given I'd like to keep updates to a minimum, updates atomic, and retrieval queries as simple and "performant" as possible?   My initial thought was to use an extra TIMESTAMP column, and only update userorder and the timestamp values for a single row (with the retrieval query using ORDERing by userorder asc, usertimestamp desc), but that fails when you need to move a row in between two other rows that have the same value.   No specific database in mind, as i use a broad spectrum myself.


Combinatorics- Dividing students into teams

A class of 37 is to be divided into teams, and each student in the class must be a member of exactly one team. However, each student dislikes three of their classmates. The dislike between students need not be mutual. How many teams must be created so that no student is the teammate of someone they dislike?    My attempt: Considering the extreme case when the dislike is never mutual, label the students $a_1, a_2, \cdots a_{37}$ such that $a_i$ dislikes $a_{i+1}, a_{i+2}, a_{i+3}$ for $i = 1,2\cdots 34, a_{35}$ dislikes $a_{36}, a_{37}$ and $a_{1}, a_{36}$ dislikes $a_{37}, a_{1}$ and $a_{2}$ and $a_{37}$ dislikes $a_{1}, a_{2}$ and $a_{3}.$ Thus, each student can be in a team with at most $30$ other students. So, the students can be divided into $4$ teams as follows:  Team $1: \{a_1, a_5, a_9,\cdots a_{33}\}$  Team $2: \{a_2, a_6, a_{10},\cdots a_{34}\}$  Team $3: \{a_3, a_7, a_{11},\cdots a_{35}\}$  Team $4: \{a_4, a_8, a_{12},\cdots a_{36}, a_{37}\}$  Thus, my answer is $4.$ However, the given answer is $7.$ Can someone point out where I am going wrong?


I just learned about the Monty Hall problem and found it quite amazing. So I thought about extending the problem a bit to understand more about it. In this modification of the Monty Hall Problem, instead of three doors, we have four (or maybe $n$) doors, one with a car and the other three (or $n-1$) with a goat each (I want the car).  We need to choose any one of the doors. After we have chosen the door, Monty deliberately reveals one of the doors that has a goat and asks us if we wish to change our choice.  So should we switch the door we have chosen, or does it not matter if we switch or stay with our choice?  It would be even better if we knew the probability of winning upon switching given that Monty opens $k$ doors.


Is it true if we say that every open set can be expressed as a union of disjoint open intervals


I want to solve this problem, but I have no idea how I can start:     If $K$ is a field, $(a_1,...,a_n) \in K^n,$ and $I$ the ideal $I=\langle x_1-a_1,...,x_n-a_n\rangle$, then how can we prove that $I$ is a maximal ideal?   One example: Is $\langle x^2+1 \rangle$ a maximal ideal of $ \mathbb{R}[x]$?


Why is object's state change allowed after acquiting lock on object

I am trying to understand these of monitor in C# and tried out the following program.  Basically, this is all it tries to do:   Thread 1 acquires lock on an object (done in method m) Thread 2 invokes another method which changes the state of locked object when the lock is still held by Thread 1. (Main thread does this by calling anotherMethod)   Ideally, one would expect that when a lock is held on an object, no other thread can alter its state during the lifetime of the lock. But that doesn't seem to be happening.   class Program {     private int x = 0;      void Method()     {         lock (this)         {             Thread.Sleep(5000);         }     }      void AnotherMethod()     {         x++;         Console.WriteLine("entered");     }      static void Main(string[] args)     {         Program p = new Program();         Thread t = new Thread(() => p.Method());         t.Start();         p.AnotherMethod();     } }   What good is a lock if it doesn't freeze the state of object when it is in force?  Also, please help me understand this : if the sole purpose of lock statement is to mark some code as critical section, whats the significance of acquiring lock against an object?


I have Ubuntu 14.04 LTS installed on a Win 7 64-bit machine via VirtualBox 5.0.14. Now I want to install a Ubuntu-based software suite called Archivematica. The instructions begin this way:  Add the archivematica/release PPA to your list of trusted repositories (if add-apt-repositories is not available you must install python-software- properties first):  sudo apt-get update sudo apt-get install python-software-properties sudo add-apt-repository ppa:archivematica/1.4   Firstly, I could not figure out how to add a trusted repository and don't know how to tell whether add-apt-repositories is available.  Secondly, when I enter the first sudo command and try to enter a password when prompted in the terminal window, no characters appear as I type.  Can anyone offer insight into these issues? Many thanks in advance.


Are the review queues planned for the iOS app?

I enjoy reviewing on SO, is it currently possible to review on the iOS app? If not, is it planned to be implemented?


Partitions created in Windows are not showing in Ubuntu

I want to install Ubuntu 12.10 64 bit alongside Windows 8, so I created some free space in Windows 8.  When I try to install Ubuntu using a Live USB, the free space created is not visible and the partitions shown are completely different.  But when I click the option "Try Ubuntu", I am able to use my Windows partitions.


Does StackExchange monitor content scraping?

Just got a notification that someone from a Wordpress site linked to an old article of mine. Upon investigation, I realized it was because a content scraper ripped off my StackOverflow question from here:   and put it up here:   Although I know content scraping questions have been asked before (i.e.: ), is the team actually monitoring this? TechForumNetwork.com obviously has failed the "attribution required" test. I do feel uncomfortable that my questions are being reposted with my username across the net without knowing the implications.


Why don't lightsaber users turn off their lightsaber midfight to pass through their enemy's defense?

Theoretically if two lightsabers clashed, couldn't one of them quickly switch off and on to "phase" through the other lightsaber and insta-kill the opponent?


How to effectively ask a professor for supervision/collaboration (PhD Program)

Probably the first step towards applying for a PhD program is to find a professor who has enough interest/resource(s)/willing for the supervision. I know some of the  (including attaching CV and research interests plus recommendation letters) for a letter to professors but is there any specific information that should be included in the letter to make it more efficient?  In other word, how to write an email to persuade the professor to accept my application?


I'm looking for some books on abstract algebra which go into a lot of depth and still ensure I gain a lot of intuition.  Any suggestions?


What is the IPv6 equivalent to IPv4 RFC1918 addresses?

Having a hard time wrapping my head around IPv6 here.  A lot of the lingo seems targeted at enterprise-level IPv6 deployments, discussing link-local, site-local, global unicast, scopes, etc.  Not a lot of solid information on really small networks, like home networks.  I want to check my thinking and make sure I am getting the correct translations from IPv4-speak to IPv6-speak.  The first question is, what's the equivalent of RFC1918 for IPv6?  Initial searches suggested there was no equivalent.  Then I stumbled upon Unique Local Addresses (RFC4193), and that states that all ULA's should be assigned the prefix fc00, followed by a 40-bit random number in the routing prefix.  This random number is to "prevent collisions when two IPv6 networks are interconnected" -- again, another reference to an enterprise-level function.  If I have a small local LAN at home, numbered using 192.168.4.0/24, what's my equivalent in IPv6's ULA scope?  Assuming I will never, ever, tie that IPv6 address into the real internet (a router will NAT & firewall it), can I ignore the RFC to an extent and go with fc00::4:0/120?  It also seems that any address in fc00::/7 are to be globally routable.  Does this mean I'll need extra protections so my router would not automatically start advertising these private IPv6 addresses to the world?  Second question, what's this link-local thing?  Reading suggests a default-assigned address in the fe80::/10 range that has the last 64bits of the address comprised of the interface's MAC address.  Seems to be required, too, but I'm annoyed by the constant discussion of it in relation to enterprise networks.  Third question, what is scope id for?  Seems to be yet another term tossed around in relation to enterprise networks, especially when interconnecting them, but almost no explanation on the smaller home network level.  Can I see a scope ID AND CIDR notation used together?  I.e., fc00::4:0/120%6, or are scope IDs only supposed to be applied to a single /128 IPv6 address?


Devel issue - "Rebuild the theme registry on every page load" won't work

I use D7. My site is being hosted on a "Shared" Server at Siteground.com. My site doesn't have any CSS/JS aggregation what so ever (see attachment), and I'm sick and tired of clearing the cache after the smallest of the CSS changes.  Many people told me that installing Devel and enabling "Rebuild the theme registry on every page load" should solve the problem, and will let me see the CSS changes after a refresh (F5/ctrl+r/ctrl+f5), but the fact is that even after I did that and enabled the Theme registry rebuilding option, I still have to clear caches to see the CSS changes, so I'm still stuck with this, and it's indeed frustrating!.  So, why would "Rebuild the theme registry on every page load" won't work? Why do I still need to flush all caches to see the CSS changes?


How to implement Enum like functionality in PHP?

How can Enum-like functionality (as provided in Java and other high level languages) be used in PHP? I know PHP doesn't allow you to create enums currently, but what's the closest one could get?


Blender Cycles 2.78a Scene/Image renders out with grainy pixels everywhere

I am a somewhat new user to blender and I have recently dived headfirst into cycles. I have watched a lot of tutorials on how to fix this but none of them have brought me the answer I need. I am using blender 2.78a and am trying to make a cool scene of a room but no matter what I do I cant seem to get rid of all the grain that is in the picture. There Is grain behind the couch and grain all around my picture. if you need to know I have a sun in the scene as well. Also most of the texture I have made are glass but have been roughed out and the IQR set to around 3. I have tried to use the clamp stuff under the sampling tap but don't really know how to use it properly. For my lighting I have used cubes and circles but I heard that doing that can cause problems. I also have the multiple importance turned off on everything.  THIS IS NOT A DUPLICATE because I have done every single thing in the post that was linked to me and it didn't change a thing.


35mm DX prime lense on dx crop sensor(nikon d3300)

I have Nikon D3300 DSLR. I'm confused with 35mm and 50mm prime lenses on FX and DX cameras. Somewhere I read that if a 35mm prime lens is used on a FX camera the focal length is equivalent to around 50mm because of the Nikon crop factor of 1.5.   What would happen if I use a 35mm prime lens on a D3300 DX sensor? What would happen if I use a 50mm prime lens on a D3300 DX sensor?    Will there be any focal length difference?


Say there are $p_{1}$ red balls and $p_{2}$ green balls. We put all the balls in a circle with $p_{1}+p_{2}$ places in total. It is forbidden that a ball (red or green) is placed between two red balls.    Show that this is impossible if $p_{1}>p_{2}$.   Further on, say $p_{1}=p_{2}=p\geq10$. For which values of $p$ the ordination is possible?  Can somebody help me? Thanx in advance!


Which is correct English? "The girl who(m) they say is a singer"

The girl who they say is a singer, met me last night.   or     The girl whom they say is a singer, met me last night.   Note: We Follow British English.


How to make my Avid Elixir 1 hydraulic brakes more firm?

I have a Specialized Carve Comp 2013, and the front brake is very squishy. The brake system is Avid Elixir 1 hydraulic disc brakes. I wanted to inquire if I need to buy a specific kit to firm up the brake lever, or if there is a simpler, less expensive solution. Please advise, thank you.


I want to make my Linux PC part of my existing digital world, which includes current documents that I share between Windows 10 and iOS devices using MicroSoft OneDrive.  Can I access my OneDrive from Ubuntu Linux?


How can I view the camera through an object as a material in Cycles?

Kind of like a TV, CCTV, or the portal for Portal and Portal 2, so I can see what the camera is seeing on an object. I don't care whether its a material or a modifier, or something like that, even if someone will make a script that is a node or whatever as long as it works, nothing specific as in how I would go about it.


How can I prevent Firefox from updating to a newer version

Since when going after the road-map, firefox 57 will be released on 14.11.207.   Now my problem is that I use a whole lot of legacy add-ons I want to keep working with.   So how can I prevent firefox from updating via the repositories?


Best practice to change 403 page depending which page 403?

In D7 I would like to display some cause for the 403 and that changes by path (and other factors but those are easy). I can think of a few tricks like using request_uri() to see which page we were on, originally but I wonder if there is a good practice already established for this?


$.9999\dots = 1 $ What's wrong with this Algebra?

This just feels wrong.  My professor is claiming that .999... = 1 with the following proof:  $x = .999\dots$  $10x = 9.999\dots$  $9x = 10x - x = 9.999\dots = 9$  $x = 1$  Is this actually correct and I'm just going crazy?


Will the Rotation games stay forever even after new rotation?

Let's say I download Uncharted 3 because it is on this month's rotation, when the month ends and a new rotation begins, will I still be able to play uncharted?  Can I keep a "free rotation" game forever by being a Playstation Plus member?


What happened to the Grid at the end of Tron Legacy?

At the end of the movie, Sam Flynn      does a download of the data on the server to an SD card and hangs it around his neck. Presumably in remembrance of his father.   He then seems to      turn off the mainframe which was running the Grid all these years.   Does this mean the Grid is      shutdown and gone?


I have recently installed Ubuntu  on my machine and everything has been working fine, except I don't see the Dropbox indicator. I have installed and re-installed Dropbox multiple times and can confirm that it's running in the background (with ps -e | grep dropbox).  Does anyone know how to get it back?


Fundamental Theorem of Calculus says  Let $f$ be an integrable function on $[a,b].$ For $x$ in $[a,b],$  let $F(x)=\int_{a}^{x}f(t)dt.$ Then $F$ is continuous on $[a,b].$ If $f$ is continuous at $x_{0}$ in $(a,b),$ then $F$ is differentiable at $x_{0}$ and $F^{'}(x_{0})=f(x_{0}).$  Now my question is why we are saying that this is "Fundamental Theorem of whole Calculus".  It is clear that it connects intergal and differential calculus. But i am not getting the exact concept, why this is so important as its name is fundamental theorem of calculus. Why we says that it is fundamental theorem of calculus?  Please suggest me. Thanks in advance.


How does one say in English, “to make a stroke” (when counting objects)? The classic example is when you “make a stroke” for each year you've spent in prison. (I think that's called “fences”?)  Thanks!


How to diagnose computer lockups and freezes?

I built a desktop computer a couple years back with the following specs:  CPU: Intel  Yorkfield 2.5GHz 6 MB L2 Cache LGA 775 95W Quad-Core Processor BX80580Q9300 Motherboard:  LGA 775 NVIDIA nForce 680i SLI ATX Intel Motherboard Video Card: Two  GeForce 8600GT SCC 256 MB 128-bit GDDR3 PCI Express x16 SLI Supported Video Card PSU: SeaSonic S12 Energy Plus  ATX12V V2.3 / EPS12V V2.91 SLI Certified CrossFire Ready 80 PLUS Certified Active PFC Power Supply Memory: Two G.SKILL 4 GB (2 x 2 GB) 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Dual Channel Kit Desktop Memory   Since its inception, the machine has periodically locked up, the regularity having varied over the years from once a day to once a month. Typically, lockups happen once every few days. By "lockup" I mean my computer just freezes. The screen locks up, I can't move the mouse. Hitting keys on my keyboard that normally turn LEDs on or off on the keyboard (such as Caps Lock) no longer turn the LEDs on or off. If there was music playing at the time of the lockup, noise keeps coming out of the speakers, but it's just the current frequency/note that plays indefinitely. There is no BSOD. When such a lockup occurs I have to do a hard reboot by either turning off the computer or hitting the reset button. I have the most recent version of the NVIDIA hardware drivers, and update them semi-regularly, but that hasn't seemed to help. I am currently using Windows 7 x64, but was previously using Windows Server 2003 x64 and having the same lockup issues. My guess is that it's somehow video driver or motherboard related, but I don't know how to go about diagnosing this problem to narrow down which of the two is the culprit.  Additional information re: cooling Regarding cooling... I've not installed any after-market cooling systems aside from two regular fans I scavenged from an older computer. The fan atop the CPU is the one that shipped with it. One of the two scavenged fans I added it located at the bottom tower of the corner, in an attempt to create some airflow from front to back. The second fan is pointed directly at the two video cards.  SpeedFan installation and readings Per studiohack's suggestion, I installed , which provided the following temperature readings:  GPU: 63C GPU: 65C System: 76C CPU: 64C AUX: 36C Core 0: 78C Core 1: 76C Core 2: 79C Core 3: 79C   Update #3: Another Lockup :-( Well, I had another lockup last night. :-( SpeedFan reported the CPU temp at 38 C when it happened, and there was no spike in temperature leading up to the freeze. One thing I notice is that the freeze seems more likely to happen if I am watching a video. In fact, of the last 5 freezes over the past month, 4 of them have been while watching a video on Flickr. Not necessarily the same video, but a video nevertheless. I don't know if this is just coincidence or if it means anything. (As an aside, each night before bedtime my 2 year old daughter sits on my lap and watches some home videos on Flickr and, in the last month, has learned the phrase, "Uh oh, computer broke.")  Update #4: MemTest86 and 3DMark06 Test Results: Per suggestions in the comments, I ran the MemTest86 overnight and it cycled through the 8 GB of memory 5 times without error. I also ran the 3DMark06 test without a problem (see my scores at ). So... what now? :-) Any further suggestions on what to check? Is there some way to get a stack trace or something when the computer locks like that? Resolution I have never did figure out the particular problems, but based on the suggestions here and elsewhere, I'm presuming it was a motherboard issue. In any event, I recently upgraded my system, buying a new motherbeard, PSU, CPU, and RAM, and that new rig has been working splendidly the past several weeks. I am using the same graphic cards as in the old setup, so I think it's safe to reason that they weren't the cause of the problem.


I have two sites with DNS pointing at a single IP and two corresponding xxx.conf files in Apache2. When I enter either host's domain name from an external browser Apache always returns the first domain's site. When checking the HTTP Request header using WireShark the host entry is always shown as my IP address, rather than the corresponding domain that I had entered in the external browser. I am using a port 80 to 8080 redirect through a managed DNS service. When my IP is shown as the host in the HTTP header it has :8080 attached but no domain to show Apache which site to serve. Anyone?  Thanks, Elwood


I've read (in the Elements of Style) that, while genitives of names ending in ‘s’ may have an additional ‘s’, as in "Ross’s", this oughtn't to be done with :     Exceptions are the possessives of ancient proper names in -es and -is, the possessive Jesus', and such forms as for conscience' sake, for righteousness' sake. But such forms as Achilles' heel, Moses' laws, Isis' temple are commonly replaced by      the heel of Achilles      the laws of Moses      the temple of Isis   What is known about the origin of and reasoning behind this distinction?


I want my script to cut geometry faces with knife tool. I read about bpy.ops.mesh.knife_tool() but there's no parameter for specifying the cut path. Is there an example or reference on how to use knife tool through python script?


How do I add a user group in the latest edition of Windows 10 Home?

The newest version of Windows 10 Home (version 1511) brings with it a whole slew of new stuff. It also brings with it its own handful of problems.  One of these is the apparent inability to create user groups. The  that Microsoft documents works for systems running 7 and a number past that; it worked on my Windows 8, 8.1 and previous versions of 10.  However, in the current version of 10, the lusrmgr.msc Microsoft Management Console snap-in is unavailable. This is the way adding a group would normally be done.  Lacking this function, how can I add a security (user) group in the latest edition of Windows 10 Home?


How to force specific Chrome behavior through a shorcut

I tried making a shortcut to Chrome and making it launch Minimized and go to a specific webpage. If I don't have Chrome already open, this shortcut works exactly as intended. If I do have Chrome already open, it just opens in a new tab in the existing window.  Additionally, if I use this shortcut then use my "regular" Chrome shortcut (that doesn't specify a website or anything), it opens future Chrome windows in a non-maximized window which is also really annoying.  Is this possible?


What about quantum entanglement is suprising, and what makes it a strictly quantum effect?.  Suppose we have an particle of spin 0 which decays into two other particles, each with either spin up or down. Supposedly the particles are "entangled". The angular momentum of the system is conserved, so measuring one particle's spin as up would mean if we measure the other particle's spin, it must be down, and vice versa. Why is this suprising, and what does this have to do with entanglement or information about the measurement performed passing from one particle to the other.  As far as I can see, it's just momentum conservation. And I don't see what's quantum about this either, as we could do the same thing with classical particles (say an object which breaks into two parts) and the momentum measurements would be anti-correlated.


Terminology of the sequences of promoters in relation to DNA strands

I'm studying molecular biology and I'm trying to understand an experiment which shows the importance of promoters in the relative transcription level (RT). The image below comes from Rolf Knippers' book "Molekulare Genetik" (8th edition).    The legend says (among other things):     Die erste Zeile gibt die normale "Wildtyp"-Sequenz der 5'-flankierenden Region wieder.   Which, in english, means something like:     The first line repeats the normal wild-type sequence of the 5' flanking region.   The column on the right gives the relative transcription (RT) level, 1.0 being the highest possible level of transcription. As we can see, the lines where some parts of the "5' region" have been deleted give quite low RT levels, since some regions of the promoter are missing.  My questions are the following:  1) According to  and , I understand that RNA polymerase reads and uses both coding and non-coding strands in order to synthesize RNA. Therefore, how did they manage to use the sequences strands regions had been deleted to make a polymerase "read them" and perform transcription?  2) If the polymerase reads the template strand in the 3' -> 5' sense, shouldn't we talk of "ATAT box" or "TAAC box" instead of "TATA" or "CAAT" boxes? Does it mean that the "promoter" regions they are using on the graphic above are actually on the coding strand?  Thanks a lot for your help.


Why do people downvote my working answer?

Someone asks a question along the lines of "my query is not working". I suggest him a solution, and then some people downvote the answer because of a risk of SQL injections.  I did mention "assuming that OP implements SQL injection protection" in my answer.  Why do people forget about the solution and downvote my answer for this? Can they just downvote me for a security risk?


For me at least,  has answers that are not sorted by score:    Is this normal?  I've tried refreshing the page a few times, but the order doesn't change...


I've been playing a pacifist route in Undertale, and I've noticed that Papyrus's shed seems to be permanently locked with no way to enter it.    I assume that there may be some way to enter it in a Genocide run, but is there any way to enter the shed if I'm playing pacifist?


How do you know what to test when writing unit tests?

Using C#, I need a class called User that has a username, password, active flag, first name, last name, full name, etc.    There should be methods to authenticate and save a user.  Do I just write a test for the methods? And do I even need to worry about testing the properties since they are .Net's getter and setters?


Where is the force of gravity fueled from?

So one thing I don't understand, gravity moves 2 masses closer together. But to move something/to exert force on something you need to expend energy. But gravity has been moving stuff and keeping it closer together for like 14 billion years now....where does that "energy" come from which enables gravity to continually keep stuff together? Well..I know gravity is itself a force..but what is it fueled from?


GNOME propagate key event after handling them

I run Ubuntu 20.04 with GNOME 3.36.2. I have set switching keyboard layout to Shift+Left Alt:  gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"   However, Slack uses Shift+Alt+arrow up/arrow down to go to next unread channel. Apparently, GNOME intercepts these keys first, changes keyboard layout and does not let Slack handle them as well.  Is it possible to make GNOME propagate these keys further to other applications?  I want to keep the shortcut the same for both things. It worked well on Unity with Ubuntu 16.04.


Is anyone here experience problems in SharePoint after installing the latest JAN 2016 on 13th Jan 2016 (Western Australian Time) updates for SharePoint 2013. I am guessing it could be KB3114503 update giving me problems.  I am getting the same problem on other machines after running the same updates too.  The problem I am receiving is, on every list view I get this error message below:  TypeError: Unable to get property 'replace' of undefined or null reference   TypeError: Unable to get property 'replace' of undefined or null referenceSys.ArgumentNullException: Sys.ArgumentNullException: Value cannot be null. Parameter name: element


shows a large unknown something of 26gb!   I have a Samsung 128gb microsd in win10 oct update. I cannot see it in explorer. So I tried to run Ubuntu (from win store) and .  $ sudo mkdir /mnt/d $ sudo mount -t drvfs D: /mnt/d   But ls -al does not list it. Windows says I have 5.8gb free space left. Windirstat confirms that. If I add up all the dir sizes I do get 119.7gb just like Win10 says. However there seems to be something of 26 gb and I want that space back... Have no clue anymore. I found this  and tried TreeSize Free, but it does not even list the 26 gb "file"   p.s. '<Onbekend>' is Dutch for '<Unknown>'  p.p.s. the filesystem is exfat  Just tried to run docker system df  and everything is 0. even when I have a MobyLinuxVM.vhdx of 2gb on my C:/    I think that I have found it. There is a huge difference between the size and allocated size for my code folder. which has archives and git repo's. that difference is shown in windirstat as some unknown thing, when treesizefree just has these two columns with size and allocated size.


I want to install Ubuntu 14.04.4 in UEFI mode alongside windows 8, which is already in UEFI mode.   My partition scheme is GPT. Ubuntu is on /dev/sda5. Legacy bootloader on /dev/sda. Windows on /dev/sda4.   UEFI bootloader in EFI partition  How would I go about doing this?


Is this the definition of conditional probability of 2 continuous random variables conditioned on 1 continuous random variable? Please provide a reference. (I forgot if any 2 continuous random variables necessarily have a well-defined joint pdf.) Instead of the usual $$P(z_1 < Z < z_2 | B=b) := \int_{z_1}^{z_2} f_{Z|B=b}(z) dz,$$ with $f_{Z|B=b}(z):=\frac{f_{Z,B}(z,b)}{f_B(b)},$ it looks like we'll have like $$P(z_1 < Z < z_2, u_1 < U < u_2 | B=b) := \int_{u_1}^{u_2} \int_{z_1}^{z_2} f_{(Z,U)|B=b}(z,u) dz du,$$ with $f_{(Z,U)|B=b}(z,u) := $, I think, $\frac{f_{Z,U,B}(z,b,u)}{f_B(b)}$  Note: if any of the definitions ':=' are in fact not definitions, then you'll have to explain conditioning on an event of probability zero to me please.   just says for 'conditional cumulative distribution function' or conditional CDF of $X$ and $Y$ on $Z=z$ is $F_{(X,Y)|Z=z}(x,y):=P(X \le x, Y \le y|Z=z)$, but it doesn't quite define $P(X \le x, Y \le y|Z=z)$.  For just 1 continuous random variable conditioned on 1 continuous random variable, it's $P(X \le x, |Z=z) := \int_{-\infty}^{x} f_{X|Z=z}(t) dt$, where $f_{X|Z=z}(t) := \frac{f_{(X,Z)}(x,z)}{f_{Z}(z)}$.  For 2 continuous random variables conditioned on 1 continuous random variable, I think it's $P(X \le x, Y \le y|Z=z) := \int_{-\infty}^{x} \int_{-\infty}^{y} f_{(X,Y)|Z=z}(t,u) du dt$, but then...  What's $f_{(X,Y)|Z=z}(t,u)$? (I guess we do the elementary probability way of thinking: define the pdf before the cdf...) According to  (see problems 1 and 16), it's $f_{(X,Y)|Z=z}(t,u): = \frac{f_{(X,Y,Z)}(t,u,z)}{f_Z(z)}$. So, I guess I'm right about joint cdf/pdf stuff. I'm just hoping for a reference please.


SQL update from one Table to another based on a ID match

I have a database with account numbers and card numbers. I match these to a file to update any card numbers to the account number, so that I am only working with account numbers.   I created a view linking the table to the account/card database to return the Table ID and the related account number, and now I need to update those records where the ID matches with the Account Number.  This is the Sales_Import table, where the account number field needs to be updated:  LeadID  AccountNumber 147         5807811235 150         5807811326 185         7006100100007267039   And this is the RetrieveAccountNumber table, where I need to update from:  LeadID  AccountNumber 147         7006100100007266957 150         7006100100007267039   I tried the below, but no luck so far:  UPDATE [Sales_Lead].[dbo].[Sales_Import]  SET    [AccountNumber] = (SELECT RetrieveAccountNumber.AccountNumber                            FROM   RetrieveAccountNumber                            WHERE  [Sales_Lead].[dbo].[Sales_Import]. LeadID =                                                  RetrieveAccountNumber.LeadID)    It updates the card numbers to account numbers, but the account numbers gets replaced by NULL


Ubuntu opens to tty, apt-get is not working

So I was trying to install some packages, but they were sort of broken so an answer recommended that I use "apt-get remove" to remove the corrupted versions and re-install them. While doing that I got a warning that said "this could be harmful" then I thought meh and wrote "Yes, do as I say!". Next thing I know, most of my windows were closing and icons disappearing so I had to forcefully close the terminal. I tried opening a new one to re-install everything but it wouldn't open, so I restarted my laptop. When Ubuntu opened again, it showed me the black and white terminal (I believe it is called tty) and when I tried to use apt-get to maybe fix things and install everything I removed (and perhaps a desktop), it said the "apt-get" package was not found. So yeah, I kind of messed up my OS but I want to know if there's a way to fix this without reinstalling Ubuntu because there's a lot of software that I would rather not go through installing them again..


Existence of non-convergent sequence with first differences converging to zero

Does there exist a sequence $x_n$ such that $|x_n - x_{n+1}| \rightarrow 0$ but $x_n$ isn't convergent?  I was looking for such a sequence, but I can't find one. Maybe if $|x_n - x_{n+1}| \rightarrow 0$, then $x_n$ is Cauchy sequence?


I have a question how can I fix the block with likes,comments,author,inside another block,cause if I make less text it will go up    .post {   display: block;   height: 200px;   width: 800px;   background-color: rgba(63, 63, 63, 0.11);   margin: 20px 20px; }  .title-block {   font-family: Calibri;   font-weight: 100;   font-size: 40px;   background-color: rgba(63, 63, 63, 0.09); }  .title {   margin-left: 5px; }  .post-categorie-block {   margin-top: 10px;   font-family: Calibri; }  .postcat {   font-weight: 600; }  .text-block {   font-family: Calibri;   padding: 10px 10px 10px 10px;   font-size: 28px; }  .bottom-post-panel {   font-family: Calibri;   background-color: #cccccc;   width: 800px;   text-align: left;   margin-top: 10px; }  .misc {   margin-left: 10px;   margin-right: 10px;   font-size: 20px; }

         Lorem Ipsum

         Категория:         Lorem Ipsum

         Lorem ipsum dolor sit ametamet, ornare sed tellus. Quisque vel elementum dolor, non eleifend nulla. Donec ut volutpat dui, porttitor pellentesque magna.

         Likes: 50         Comments: 10         Author: Lorem

    If I make position fixed, it will fix that block on whole page, I know that it is calculating margin from text block, but how do I make another way to fix it inside post block


Proving $\arctan(\mathrm{e}^{-v}) = \text{arccot}(\mathrm{e}^v)$

Is this a correct way to prove that  $$ \arctan(\mathrm{e}^{-v}) = \text{arccot}(\mathrm{e}^v) $$  $$\tan x = \frac{1}{\mathrm{e}^v} $$  Turn $\tan x$ into $\sin x$ and $\cos x$ $$\frac{\sin x}{\cos x} =  \frac{1}{\mathrm{e}^v}$$ Multiply $\cos x$ $$ \sin x = \frac{\cos x}{\mathrm{e}^v} $$ $$ \mathrm{e}^v \sin x = \cos x$$ $$ \mathrm{e}^v = \frac{\cos x}{\sin x}$$ Multiply by $\mathrm{e}^v$ and divide by $\sin x$ $$ \mathrm{e}^v = \cot x$$ $$\text{arccot}(\mathrm{e}^v) = x$$


Are carbohydrates an essential component of human diet?

Are people able to satisfy all the needs of a healthy diet without consuming carbohydrates?  My question includes the assumption that a person has no health condition that would prevent them from meeting their caloric needs with only fat and protein.  I'm also not asking about the practicality of eliminating all carbohydrates.  If a person could consume no carbohydrates whatsoever, this other question would clearly matter a lot, but I'm not asking it.  If there are essential dietary components that happen to be carbohydrates, but are not converted into glucose, I'll say up front that it wouldn't satisfy what I"m asking.  However, it would be interesting footnote on an otherwise correct answer.


Dimension of null space of a given problem

For any $n\in \mathbb{N}$, let $P_{n}$ denote the vector space of all polynomials with real coefficients and of degree at most $n$. Define linear transformation $T \colon P_n \rightarrow P_{n+1}$ by $T(p)(x) = p'(x)-\int _0^xp(t)dt$. How to find out the dimension of the null space of $T$, where $p'(x)$ is the derivative of $p(x)$?


Experts agree that the stuff within the universe is moving farther apart from all the other stuff in the universe--much like the dots marked on the outside of a balloon that is being inflated.  We know however that a balloon expands into the space around it.  If we think of our universe as a balloon, then, into what is it expanding?  Is it possible to know the answer to that question for certain?


YA fantasy about boy expelled from magic school

I remember a series of 7(?) YA books I read in the mid 90's about a boy who started to attend magic school.  At the end of the first book he was expelled for doing something dangerous related to a summoned demon, but was promoted to journeyman wizard.  The rest of the series is him traveling around and training his magic, I distinctly remember the second book he went to learn healing magic.  He was friends with an acrobatic non-magic girl who I want to say was named Lyre or Lyra.  In the final 7th book there's a fairly big war and the main character is magically outclassed by the enemy wizard, but the acrobat friend saves him.


How to upgrade MAAS Rack controller from 2.4.2 to 2.8.1

On Ubuntu 18.04.5 I've got three machines. One Region Controller fresh installed manually - 2.8.1 Two Rack controllers fresh installed manually - 2.4.2 Now I've got two warnings for the rack controllers, that they are running an older version of MAAS. Now: How could I upgrade the rack controller. An "apt update" or s.e. doesn't work.


What exactly is the word "there" in an existential construction? And related questions

Consider the example below:     "There was a cat under the table."   There have been numerous questions asked that have involved the topic of existential constructions and the word "there" that is used in them. I would like to see some grammatical rationales that will explain what that word "there" actually is -- or is not -- in an existential construction in today's standard English.  These are some of the things that I've heard, with respect to that "there" and/or the existential construction:   "There" is the grammatical subject of the clause. "There" is a dummy pronoun.  The subject is an external complement. (optional)  An existential construction has no clausal object. (optional)  There is no such thing as a passive existential construction. (optional)   What syntactical arguments can be made for or against those above statements? And how well accepted are those above statements?  Please provide some vetted grammatical sources in your answers.


Forest with ~500 nodes runs out of TeX memory

When using Forest package to chart an organizational structure, I have to limit it to 4-5 hierarchy levels, as both pdflatex or lualatex throw an error ! TeX capacity exceeded, sorry [save size=50000].  The forest that fails contains approximately 500-600 nodes. There is only one forest per file.  I already tried to increase MikTex 2.9 (updated to the current) main memory by running  initexmf --edit-config-file=pdflatex initexmf --dump=pdflatex    but the error is still there and the number 50,000 in the error message is still the same. Is there a similar INI file for lualatex?  Q: Are there any other methods that would allow to increase memory utilization allowed for pdflatex or lualatex? When they run, they do not exceed 43 MB and 75 MB respectively before they exit with the error.  I am not providing an MWE yet as 1) I would have to scramble data and it would become hard to read, and 2) it is unlikely anyone here is prepared to spend time sifting thru 500 nodes anyhow. Open to suggestions!  One of the answers here suggested a workaround of including  \tikzset{external/system call= {pdflatex -save-size=800000                                 -pool-size=10000000                                 -extra-mem-top=50000000                                 -extra-mem-bot=10000000                                 -main-memory=90000000                                 \tikzexternalcheckshellescape                                 -halt-on-error                                 -interaction=batchmode                                -jobname "\image" "\texsource"}}    but the error is still there.  Also tried to use command line option --extra-mem-top=2000000 with no success.


If we know $$x+y+z=1$$$$x^2+y^2+z^2=2$$$$x^3+y^3+z^3=3$$ Is it possible to calculate the general solution for $a_n=x^n+y^n+z^n$? I know $a_5=6$ but the way to get it is more an algorithm than an actual solution.


About the scope in javascript,why the following not output 21 but 22?

function t() {     var x = 1;     if(true)     {         var x = 2;         alert(x);     }     alert(x); } t();   Anyone knows the reason?


Refining my knowledge of the imaginary number

So I am about halfway through complex analysis (using Churchill amd Brown's book) right now.  I began thinking some more about the nature and behavior of $i$ and ran into some confusion.  I have seen the definition of $i$ in two different forms; $i = \sqrt{-1} $ and $i^2 = -1$.  Now I know that these two statements are not equivalent, so I am confused as to which is the 'correct' definition.  I see quite frequently that the first form is a common mistake, but then again Wolfram Math World says otherwise.  So my questions are:   What is the 'correct' definition of $i$ and why?  Or are both definitions correct and you can view the first one as a principal branch? It seems that if we are treating $i$ as the number with the property $i^2 = -1$, it is implied that we are treating $i$ as a concept and not necessarily as a "quantity"? If we are indeed treating $i$ as a concept rather than a "quantity", how would things such as $i^i$ and other equations/expressions involving $i$ be viewed?  How would such an equation have value if we treat $i$ like a concept?   I've checked around on the various imaginary number posts on this site, so please don't mark this as a duplicate.  My questions are different than those that have already been asked.


This is the PATH variable without sudo:  $ echo 'echo $PATH' | sh  /opt/local/ruby/bin:/usr/bin:/bin   This is the PATH variable with sudo:  $ echo 'echo $PATH' | sudo sh /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin   As far as I can tell, sudo is supposed to leave PATH untouched. What's going on? How do I change this? (This is on Ubuntu 8.04).  UPDATE: as far as I can see, none of the scripts started as root change PATH in any way.  From man sudo:      To prevent command spoofing, sudo   checks ``.'' and ``'' (both denoting   current directory) last when searching   for a command in the user's PATH (if   one or both are in the PATH). Note,   however, that the actual PATH   environment variable is not modified   and is passed unchanged to the program   that sudo executes.


Triangular Numbers Modulo $k$ - Hit All Values?

The sequence of triangular numbers is well known. Consider now the triangular numbers modulo some positive natural number $k$. That is, let $T_{n,k}$ be the remainder of dividing $T_n$ by $k$. For the regular sequence of triangular numbers, we can take as convention $T_n = T_{n, \infty}$.  Question: For all values of $k, i < k$, does there exists some $n$ such that $T_{n, k} = i$


how to wire up potentiometer to subwoofer

I have a Audio-Taper Potentiometer that I bought from RadioShack and would like to hook it up in-line to my sub woofer so my 5.1 surround sound's bass is not so loud.  However, the connections from the sub to the main receiver are proprietary plug on the back of receiver so I can't tell which is positive or negative.  Does this matter for hooking up a Potentiometer?  Where can I find a wiring diagram?


Me and a friend will be travelling to the USA, Since we have a short layover in JFK airport, I was wondering if we have to use the non-US passport line, or if we can use the US passport line. (just looking for the shortest line)  I have a US Passport and my friend has a German passport. I also live in Europe right now.


I have a problem with saving data to SharePrefernce when I forget about my memory card SharePrefernce and error.  my log    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.novum.smrtkarta.SharedPreference.saveCardToSharedPreference(android.content.Context, java.util.ArrayList)' on a null object reference                                                                      at com.xxx.smrtkarta.activity.ScanQrCodeActivity$3$1.run(ScanQrCodeActivity.java:285)                                                                      at android.os.Handler.handleCallback(Handler.java:739)                                                                      at android.os.Handler.dispatchMessage(Handler.java:95)                                                                      at android.os.Looper.loop(Looper.java:148)                                                                      at android.app.ActivityThread.main(ActivityThread.java:5417)                                                                      at java.lang.reflect.Method.invoke(Native Method)                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)   class save data Card to SharePrefernce   ScanQrCodeActivity.java  Default app = (Default) getApplicationContext();  cardList = app.getListCard();  Card card = new Card(numberCard, path3, base32, OTP, nameCard, intervalTotp, getDate(), expirationDate);    if (containsCard(cardList, numberCard, expirationDate)) {                showAlterDialog("Błąd tworzenia karty", "Podana karta  istnieje w telefonie.");        } else {                        cardList.add(card);                        app.setListCard(cardList);                        cardList = new ArrayList<Card>();                        cardList = app.getListCard();                          //   Toast.makeText(getApplicationContext(),"Rozmair listy"+cardList.size(),Toast.LENGTH_SHORT).show();                         sharedPreference.saveCardToSharedPreference(mContext,cardList); //Here comes the error message   SharedPreference.java   public class SharedPreference {      public static final String PREFS_NAME = "LIST_CARD";     public static final String CARD = "CARD";      public SharedPreference() {     }      public void saveCardToSharedPreference(Context context, ArrayList<Card> cardList) {          SharedPreferences settings;         SharedPreferences.Editor editor;          settings = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);         editor = settings.edit();         Gson gson = new Gson();         String jsonString = gson.toJson(cardList);         editor.putString(CARD, jsonString);         editor.commit();     } }   Default.java  public class Default extends Application {      public ArrayList<Card> listCard = new ArrayList<Card>();      public String uuidString;       public String getUuidString() {         return uuidString;     }      public void setUuidString(String uuidString) {         this.uuidString = uuidString;     }      public ArrayList<Card> getListCard() {         return listCard;     }      public void setListCard(ArrayList<Card> listCard) {         this.listCard = listCard;     }      @Override      public void onCreate() {         super.onCreate();          uk.co.chrisjenx.calligraphy.CalligraphyConfig.initDefault(new uk.co.chrisjenx.calligraphy.CalligraphyConfig.Builder()                 .setDefaultFontPath("fonts/OpenSans-Regular.ttf")                 .setFontAttrId(R.attr.fontPath)                 .build()         );      } }


Connecting AC and DC Voltage Sources in Parallel

I am still having trouble understanding how voltage sources combine when they are connected in parallel. Consider the following circuit below:  If we assume that the wires connecting the resistor to the two voltage sources are perfect (zero resistance), then we get what appears to be a paradox since the voltage at node 1 needs to be both 1V and 2V at the same time. In reality, this situation is resolved by the finite resistance that real wires possess. My misunderstandings occur when one of the voltage sources is an AC source such as below. In this case, is the voltage at node 1 really just a sum of the AC and DC sources? In this scenario, does this mean that the DC source outputs an AC current in order to maintain a constant voltage? Would this AC current coming from the DC source be in-phase with the current from the AC source in order to cancel out the AC source's effects on the DC source? Also, for real world applications, does this type of connection lead to any negative effects that would damage the AC or DC source? I've seen suggestions that using a capacitor or transformer would be better to add AC and DC voltages rather than connecting them directly.


I have just seen some answers here to the effect that     Ten percent of the pie is mine   is correct.  This seems rather odd to me.  Ten percent is a plural subject, so why should it have a singular verb.  Note that, grammatically, of the pie is subordinate to percent and should be inessential; that is, it should be possible to remove it without affecting the grammaticality of the sentence.  My question is not whether the example sentence is correct (that is the question of which this is alledgedly a duplicate) but why it is considered correct -- given my grammatical objection -- and for how long it has been.  I would guess that this is a relatively new phenomenon and that in the good old days, there was no special rule for this case, such that the verb would have had to be are.  References please.    Please do not mark this question as a duplicate without reading it. How is it possible to mistake a question asking why something is considered correct and for how long with one asking what is correct?


What Pokemon can you hatch from the gift eggs?

With the recent addition of friends and giving items, also a new egg has been introduced: a 7km egg hatching new Pokemon (). Who are these Pokemon exactly?


Let $A$ be a square matrix such that $AA^T = I$. If $\det{A} < 0$, find $\det{A}$ and $\det{(I + A)}$.  I managed to get $\det{A} = -1$ but had difficulties when trying to calculate $\det{(I + A)}$.


Why Couldn't Hagrid Have a Functional Wand?

I'm wondering why Hagrid isn't allowed to carry a wand or do magic.  We know that Hagrid carries a pink umbrella with the suspected remnants of his broken wand secreted inside (CoS chapter 7), and that Hagrid does do magic here and there even though he's not supposed to (SS chapters 4 and 5).   We learn in Chamber of Secrets that Hagrid was expelled from Hogwarts (CoS chapters 7 and 13), and that his wand was snapped in half. However, canon also states that witches and wizards are not required to attend Hogwarts; they can attend a different school, such as Beauxbatons or Durmstrang, or be homeschooled (DH chapter 11). To me, this suggests that a witch or wizard doesn't necessarily need to attend a school in order to become fully-qualified. While it doesn't expressly say so in canon, I note that the Weasley twins still use magic routinely after they quit Hogwarts (OOTP chapter 29). Why would expulsion from Hogwarts preclude Hagrid from learning and using magic?  Why can't Hagrid have a functional wand and be allowed to perform magic?


Show that if a curve $C ⊂ S$ is both a line of curvature and a geodesic, then $C$ is a plane curve.  Give an example of a line of curvature which is a plane curve and not a geodesic. (My thoughts: Take a sphere for $S$ and let the curve $C$ be any of the latitudes of $C$ that are not the equator or the poles.  Then $C$ will be a plane curve.  Additionally, since the curvature is constant on the whole of $S$, every direction is a principle direction (of sorts; this might be the flaw in my argument), so any curve is a line of curvature.  But, $C$ is not a segment of a great circle on $S$, so it is not a geodesic.)  Prove that a curve $C ⊂ S$ is both an asymptotic curve and a geodesic if and only if $C$ is a (segment of a) straight line.    Can I have some hints?  I am not very good at covariant derivatives yet, so hand-holding with detailed examples there would be nice.


which ubuntu version is suitable for my laptop?

I'm using an older laptop. My laptop Configuration is as follows,   Intel Celeron processor 2.00 GHz 2 GB of RAM 80 GB of Hard Disk


Pagination on custom post type is not working when clicking on next link

Trying to paginate custom post types of specific taxonomy but next link of pagination is not working and getting 404 page. any help   Here is my code:   <?php         $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;             $args = array(             'post_type'=>'my_product',             'taxonomy'=>$taxonomy->name,             'posts_per_page'=> 1,             'term'=>$term->slug,             'paged'=>$paged                 );     $query = new WP_Query($args);     if ($query->have_posts()) {         while ($query->have_posts()): $query->the_post(); ?>
         <?php if (has_post_thumbnail()) {             the_post_thumbnail('featured');                 } ?>

<?php the_title(); ?>

&nbsp;&nbsp; تاریخ: <?php the_date(); ?>

 <?php the_excerpt(); ?>

             &nbsp;&nbsp;&nbsp;قیمت:                 <?php if (the_field('price') == '') {                     } else {                     the_field('price');                             } ?>

                     <?php endwhile;                 }                 else {                     echo '
هیچ موردی درین بخش یافت نشد.
';                 }                 ?>                                  <?php wp_reset_postdata();                  $big = 999999999; // need an unlikely integer         echo paginate_links( array(     'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),     'format' => '?paged=%#%',  // if using pretty permalink     'current' => max( 1, get_query_var('paged') ), 'total' => $query->max_num_pages ) );  $posts_per_page                 ?>


Live USB for installation does not boot, black error screen followed by visual artifacts on a purple screen

I'm trying to install Ubuntu 18.04 desktop with Rufus on a computer with the following specs:  CPU: AMD Ryzen 5 2600 MOBO: ASUS Prime B450M-A/CSM RAM: G-Skill Ripjaws DDR4 F4-2400C15D-16GVB GPU: Nvidia GeForce GTX750 PSU: Apexgaming AG-650M SSHD: Seagate Firecuda Compute mATX: Rosewill SCM-01  Basically it boots from the USB (FAT32) and brings up a black error screen with words and numbers. Then it transitions to the purple splash screen with "ubuntu" and 5 dots, however the screen shows various visual glitches depending on which USB port I plug into. When trying to boot the computer, it boots to a black screen with the following error message: ACPI Error: Needed [Integer/String/Buffer], found [Region]    that shows what I mean.


My options to link large image into AI file

My .psd file has a resolution of 6m x 3m @ 150 DPI. This makes it 35433px x 5906px in size. Photoshop CS6 saves the file as .tiff or .psb only. When I first import into Illustrator I get an error that the file is not readable but I have tried many options. Last one is not supported by AI.  So I'm puzzled... is there a way to link large images into Illustrator?


$f: [0, 1] \to \mathbb{R}$ is continuous. Prove existence of $c \in (0, 1)$ where $\int_{0}^{1} f(x) x^2 dx = \frac{f(c)}{3}$

My approach with partial integration: $$\int_{0}^{1} f(x) x^2 dx = \frac{f(1)}{3} - \int_{0}^{1} f'(x) x^2 dx = \frac{f(c)}{3}$$ By mean value theorems, there exists $d \in [0, 1]$ such that: $$\int_{0}^{1} f'(x) x^2 dx = f'(d) \cdot d^2$$ Hence: $$\frac{f(1)}{3} - f'(d) \cdot d^2 = \frac{f(c)}{3}$$ This is where I can not go further. If $d$ is a maximal or a minimal of $f$ in $(0, 1)$, then $f(1) = f(c)$ but $c$ can not be equal $0$ or $1$.


sudo apt update doesn't work, says "Problem opening" and "The package lists or status file could not be parsed or opened"

Reading package lists... Error! E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory) E: Could not open file  - open (2: No such file or directory) E: Problem opening  E: The package lists or status file could not be parsed or opened.   I use Ubuntu 19.10


Can't launch applications installed from Software Center like VLC and Handbrake in Ubuntu 18.04

The applications that I install from Software Center like VLC and Handbrake do not open when I click their icons. Pre-installed applications like firefox, LibreOffice, Disks, Thunderbird etc work fine. only the applications I install don't open.  When I type vlc in terminal I get these messages:


error while trying to sudo apt-get update GPG, no sign repository

I didn't quite understand how to fix these stuff from other posts. Can someone help me?  W: GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 818A435C5FCBF54A E: The repository 'https://dl.winehq.org/wine-builds/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


A striclty monotonic function is defined from real postive to real postive, such that $f((x^2)/ f(x)) = x$. Find all such functions. I tried substituting x by $x^2/f(x), $ such that some equation forma and i am able to use one one , but then i am not able to proceed further.


Twin Paradox Explanation via Spacetime diagrams

Can someone explain to me the twin paradox with the help of spacetime diagrams? (No algebra and calculus)


Why can I not see the complete date of posting?  The year part is not shown.  I prefer date/time to look like the ISO standard:  2013-07-04 21:15:33.1234   Is it a setup function that I have missed?


I have very long source text.  I want to create two outputs:    All text Only small pieces of this source text, selected by condition command   MWE (precisely: not working)  \documentclass{article} \usepackage{lipsum} \begin{document} \newif\ifPIECES \PIECEStrue \section{Lorem ipsum dolor} \lipsum[1]  \ifPIECES This is first small piece. I want this piece in two outputs.  When PIECES is folse, I want all source text. \else\fi  \lipsum[2]  \ifPIECES This is second small piece.  \else\fi  \lipsum[3]   \ifPIECES This is third small piece.  \else\fi  \lipsum[4]  \end{document}   How I should define LaTeX command? I am nowbe in programming, as you see.


I've just read the next sentences:     'I wanted to see her again', John said.      'And you did, you did see her again', Jennifer said.    Why not say "you saw her again"?


Adobe Flash Player not detected on Chromium for Ubuntu

I am using Chromium for Ubuntu and it's telling me I need to install Adobe Flash Player (AFP) when I go to play a certain video by directing me to Adobe's website. I have AFP installed via Ubuntu Software Center, however that seems to be not good enough.  How can I get it working?  I have done some research before posting this and I'm being told (from Adobe's website) to download the tar ball, extract, then cp the files into certain directories, namely libflashplayer.so into Chromium's "browser plug-in directory" and a /usr folder into "the flash player local settings configuration."   I presume this process will work given that it's in Adobe's readme file; I have a few questions about the instructions. How do I find the browser plugin in directory, generally speaking; I'd like an answer that applies to any OS as well as browser if possible.  If there is a better way to go about solving this problem, please address it.


Is there an easier way to break out of nested loops than throwing an exception? (In Perl, you can give labels to each loop and at least continue an outer loop.)    for x in range(10):     for y in range(10):         print x*y         if x*y > 50:             "break both loops"   I.e., is there a nicer way than:  class BreakIt(Exception): pass  try:     for x in range(10):         for y in range(10):             print x*y             if x*y > 50:                 raise BreakIt except BreakIt:     pass


How to read a Mac or Linux hard drive on Windows?

I have a Hard Drive. But I don't remember what is there. I think is Linux File System or MacOS File System. How I can see what is on that Hard Drive using Windows or some LiveCD ?


How do you change the value of a lightning-input-field in javascript?

I have a simple component that creates a record using lightning-record-edit-form. After the record is created, I want to clear the values of the lightning-input-field components. I have tried a few different ways, and none seem to work. The same code applied to a lightning-input does work.   example template  <template>     <lightning-card title="bug sample">         <lightning-record-edit-form id="form" object-api-name="Account" onsubmit={handleSubmit} onsuccess={handleSuccess}>             <lightning-messages></lightning-messages>             <lightning-input-field value={name} field-name="Name"></lightning-input-field>             <lightning-input value={name}></lightning-input>             <lightning-button type="submit" label="Save" class="slds-m-top_medium">             </lightning-button>         </lightning-record-edit-form>     </lightning-card> </template>   example .js  import {     LightningElement,     track } from 'lwc';  export default class ToDoApp extends LightningElement {     @track name;      handleSubmit(event) {         event.preventDefault();         const fields = event.detail.fields;         this.template.querySelector('lightning-record-edit-form').submit(fields);     }      handleSuccess() {         // attempt 1         this.name = '';         // attempt 2         this.template.querySelectorAll('lightning-input-field').forEach(each => {             each.value = '';         });     } }   on success, the lightning-input clears, but the lightning-input-field remains unchanged.   Any ideas?


How to prove the following identity: $$(\forall x\in\mathbb{R}): \quad \arctan(\sqrt{x^2+1}-x)=\dfrac{\pi}{4}-\dfrac{1}{2}\arctan(x)$$  The knowing method is to prove that both sides are in $]-\frac{\pi}{2}, \frac{\pi}{2}[$ and they have the same value tooked by the function $\tan$; but this looked to be out of reach, because there is no general identity giving $\tan(\frac{\alpha}{2})$ in words of $\tan(\alpha)$


I have problems with my Tilgin Vood Router. As I try to start my router by turning the power on (captain obvious), it generally doesn't work the first 3-4 times. This is getting very annoying.  Five minutes after turning the power on the router's signal LEDs don't blink in the way they should do in a connected state. I can connect to my routers web configuration interface through my PC connected to it via LAN though I can't access the internet.  It usually takes the router five minutes to get to the point where it should be connected to the internet but as it doesn't work the first times.  So I turn on my router 3-5 times, let him work 5 minutes and then suddenly, after turning the power off and on again it all works.  The problem is regarding startup only, when I get it to work everything runs as smooth as a 1980-s text-based C++ game on a 3ghz machine.  I also have to restart my PC too in order for everything to work.   How can I solve this problem? Just leave the router turned on all time? I prefer a daily IP switch, though. May the problem have something to do with my PC? There is another one connected to the router too and it doesn't work there either.


How to perform SVD to impute missing values, a concrete example

I have read the great comments regarding how to deal with missing values before applying SVD, but I would like to know how it works with a simple example:          Movie1 Movie2 Movie3 User1     5             4 User2     2      5      5 User3            3      4 User4     1             5 User5     5      1      5   Given the matrix above, if I remove the NA values, I will end up having only User2 and User5. This means that my U will be 2 × k. But if I predict the missing values, U should be 5 × k, which I can multiply with singular values and V.  Would anyone of you fill in the missing values in the matrix above by first removing users with missing values and then applying SVD? Please provide a very simple explanation of the procedure you applied and make your answer practical (i.e. number multiplied with another number gives an answer) rather than using too much math symbols.  I've read the following links:


How do I convert between big-endian and little-endian values in C++? I'm using VC++ 6.0.when I used _byteswap_ulong() function it requires the header file intrin.h. When I include the header it reports an error saying incompatible compiler and that intrin.h is for the gcc compiler. So is there any other functions to convert between big-endian and little-endian values in VC++ other than this function?