We are implementing a toggle to switch between two different ways of showing data in a table. I created a mockup for the toggle but shortly afterward realized that people are very divided in how they interpret toggle buttons. There seem to be two camps:  Toggle as depressed button. The darker side in this case indicates the current selection as it replicates the model of a pushed button or side of a switch. For example:   (source: )  Toggle as a slider. The lighter side in this case indicates the current selection as it replicates the model of a slider being moved to one side to indicate preference. For example,    Obviously, these two methods contradict one another. Currently we are using method 1 but before we get any further along in development I wanted to confirm with a larger audience, which of these do you think is a more universal way of understanding/interpreting a toggle button's state? Or is this just a nebulous issue and it might be better to avoid toggles for this altogether?

I have a quick question about buttons that toggle between two states. (Think Play/Pause, or Shuffle/Regular Play.) As the title says, should the toggle show it's current state or the state to which it will transition?  I think people are used to the Play/Pause convention. But the Shuffle/Regular play might be more confusing if you show the transition state instead of current. For example, the built-in music player on the Xbox 360 does it this way: when it's in shuffle mode, it shows the icon for direct play and vice versa and it always confuses me (am I in shuffle mode or straight play).  I see it this way: Play/Pause is more like action as in begin playing or pause playing. Yes behind the scenes it is a state transition but to the user, there is an action. Whereas Shuffle/Straight Play is an option and it's best to show the current state (and possibly have only one icon and change button to show that the option is enabled/disabled). Thoughts?


I bought this with cash    I bought this by cash   The first one sounds idiomatic. But second one doesn't sound bad though

Which one of the following is correct?        You can pay by credit card or by cash.   You can pay by credit card or cash.


I'm dreaming of a Bash script that opens applications and places them in certain workspaces.   For example, I'd like to run a script that:   In Workspace 1 opens firefox WS2 - opens term and maximizes it WS3 - opens Sublime Text2 and maximizes it WS4 - opens Pidgin, gpodder, and banshee   Is such a script possible in Ubuntu 13.04 running Cinnamon?

How do tell an application to open in a specific workspace?    More info:  I like to have my C++ IDE in workspace 2, my Java IDE in workspace 3, and my email, browser and miscellaneous in workspace four. I also use a shell script that executes upon log in:  #!/bin/bash gnome-terminal & # WS 1 netbeans-6-9-1 & # WS2 qtcreator-2-0-1 & # WS 3 firefox & # WS 4 thunderbird & # WS 4   Of course currently it all opens in the current workspace... Is there a way for me to specify which workspace each command should start in?  Thanks in advance!


When people say how does it look, I want to answer "with its eyes."  I prefer a perfectly good "What does it look like?"though I hear and read the other version all the time! Which is correct?....I have even seen and heard "How does it look like?

Formally, in my English education, I have learned to ask for the outward appearance of something using the expression:     "What does it look like?"   Since my mother tongue is German and we say "Wie sieht es aus?", I frequently catch myself saying:     "How does it look?"   which would be the direct translation from German.  Since I think the translation does not sound wrong (I am certainly biased though) I would like to ask you if this is correct English in at least some cases or just a mistake of mine?  Thanks!


In a game of heads and tails with a fair coin - you win $\$1$ if heads; lose $\$1$ if tails - what is the probability of being $\$5$ up after $25$ tosses?

Suppose that $X_1,X_2,\ldots,X_n$ is a random sample from a distribution with probability function:  $$p_X(x)=\begin{cases} 1/2 &x=-1,1 \\ 0 & \text{otherwise} \end{cases}$$  Now if we define the average   $\bar{X}= \frac{1}{n} \sum X_i$, I need to show that that for an odd $n$ the probability function for $\bar{X}$ is:  $$p_{\bar{X}} (x)= \frac{\binom{n}{\frac{n}{2} (x+1)}}{2^n}$$ for $x=\pm 1/n,\pm 3/n,\ldots,\pm 1$, $0$ otherwise.    Since $P[\sum X_i=k] =P [\bar{X}=k/n ]$, I thought it would be easier to first derive the probability function for the sum. Since they are still $2^n$ n-tuples and each one is equilikely, I need to count the ones whose sum is $k$ for:  $k=\pm 1,\pm 3,\ldots \pm n-2,\pm n$ (since even numbers are not a feasible combination)  The problem here though is that I do not immediately recognize how I could count all these tuples. Could you please help me with this? If it is easier to proceed another way, I am of course all ears.


I have been working with Professor 1 for a semester. He has been very helpful and we have spent some time together this semester discussing problems. I enjoyed working with him and also find his research interesting.  However, there is also this other Professor 2, whose work I find interesting and he works in related areas. So, I want to work with Professor 2 for a semester before deciding whom to stick with.   Meanwhile, I want to continue the work that I have initiated with Professor 1. I want to convey this message to Professor 1 in a manner that will leave the possibility of working with him after next semester open. So, how should I tell Professor 1 that I want to do a small project with Professor 2 to try out things, without sounding rude?

When needing to ask a professor about something important and potentially delicate, what is an appropriate way to phrase the question or write the email?  Examples include:   Requesting a recommendation letter Asking for exceptions to policy (e.g., ignoring a course prerequisite, rescheduling an exam) Asking if you can do research with them, join a group, get into a program Scheduling a meeting, exam, or defense Letting them know about a change of plans Letting them know about a life event affecting your work or studies (e.g., wedding, funeral, sickness, vacation)


I'm trying to write a backup script that can be deployed on many different linux servers, some of which mount network drives as described in /etc/fstab. I want my script to be able to see if any network drives have come unmounted before a backup to ensure that they don't go unsaved. Is there any way to reliably check for this in a bash script?

Running Cronjob @reboot returns that file on nfs share does not exist.  Example  @reboot python /abs/path/to/script.py   mail from crontab on startup reads "more or less"  /usr/bin/python can't open file "/abs/path/to/script.py": [Error No. 2] No such file or folder.   Script can be run from the command line with no trouble.. Theory is that the cronjob is running before mount has been run. The questions.   Is this theory correct? Is there a way to force the job to wail until the drive has been mounted? .... Other than just putting in a sleep 60 into the command. ;) I tried that already, but it's hit and miss and I need the script to run 100% of the time quickly.


I have no difficulty in normal cases knowing whether to say "you and I"or "You and me." But this situation confuses me. On one hand, I can justify I by saying there is an implied "are" at the end:     He is no different than you and I are   On the other hand, this is a comparative, and if I were to change the sentence up just a bit, it feels like it would be correct to say "me":     He is the same as me

In high school we learned to say "than I" and "as I" because you could potentially add an "am" to the end of the sentence.  Examples:  "She is smarter than I."  (Think: "...than I am.") "He is as tall as I."  (Think "...as I am.")  So analogously, shouldn't it be "like I" as well:  "He is sincere, just like I."  (Think: "... like I am.")  But universally, it seems that we use "like me".  Where does this reasoning break down?  Is there history here?


I'm new to Tkinter and I'm working on a text editor. I want to implement a find text feature in my code and I recently came across a line of code that I don't quite understand. I would like to understand what that line of code does. This is the line of code:  '{}+{}c'.format(start_pos, len(needle))

I want to do something like String.Format("[{0}, {1}, {2}]", 1, 2, 3) which returns:  [1, 2, 3]   How do I do this in Python?


Right now I have a .blend file for a little interface project I am working on in the game engine and also a .exe    Is there a way I can play my project in a web browser so I can show it to some friends?

The diagram is of a river bank with a formula that can be adjusted with sliders to calculate the river's area, steepness, vegetation population, etc.  The question is, is it possible to do this in blender somehow, either with the game engine or drivers, so that sliders could change not only numerals but also the look of the river diagram?  I have pretty much zero experience with the game engine (but years with anything else to do with Blender) and before trying anything out I wanted to know if it was possible to do something like this.  I have also seen this recent link to the game engine working on browsers and was wondering if this could work for this too?


Trying to run a simple javascript to parse single digit ints in a string as follows:  var s = "22123222222213123212322123213222"; var a = s.split(""); var b = a.map(parseInt); console.log(b); [2, NaN, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 2, 2, 1, 2, 3, 2, 1, 3, 2, 2, 2]   Why is there a NaN for element with index 1?  Fiddle in the console here:   EDIT  After getting the correct answer below I felt I had to lookup this "map(Number)" business. Turns out Mozilla has a "gotcha" clause concerning this specific case.

From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]


I need to upgrade my skype version using terminal. Right now I have the Skype version 8.11.0.4 and the notification icon I am getting the text, i.e.   A new update is available. Install latest version via your package manager, then restart skype.   So I need to upgrade the latest version using terminal. I need the steps to upgrade this.

I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me?


I am using an Ubuntu 13.10 image on my android and I cant seem to install the Ubuntu gnome desktop.  Device information:  - Sony Xperia S (LT26I  - Arm-V7  - Snapdragon S3 1.83ghz  - Adreno 220 GPU  - four Armhf cpus  Ubuntu Information:  - Linux 3.40 Kernel  - version 13.10  envi@ubuntu:~$ adb shell * daemon not running. starting it now on port 5037 * * daemon started successfully * shell@android:/ $ su root@android:/ # linux shell Starting Shell as root@localhost root@localhost:/# sudo apt-get install gnome-shell ubuntu-gnome-desktop Reading package lists... Done Building dependency tree        Reading state information... Done gnome-shell is already the newesshell startingt version. ubuntu-gnome-desktop is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. Need to get 0 B/300 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: error processing modemmanager (--configure):  Package is in a very bad inconsistent state - you should  reinstall it before attempting configuration. Setting up whoopsie (0.2.24.1) ... invoke-rc.d: unknown initscript, /etc/init.d/whoopsie not found. dpkg: error processing whoopsie (--configure):  subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing:  modemmanager  whoopsie E: Sub-process /usr/bin/dpkg returned an error code (1)

I can't update my system because it freezes while installing a third-party update (zramswap-enabler)! Sometimes I get the following message in Update manager:  Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message: E:The package zramswap-enabler needs to be reinstalled, but I can't find an archive for it.  I tried to remove the zramswap-enabler, but it's impossible because I get the following message: dpkg: error processing zramswap-enabler (--remove):  Package is in a very bad inconsistent state - you should  reinstall it before attempting a removal. Errors were encountered while processing:  zramswap-enabler E: Sub-process /usr/bin/dpkg returned an error code (1)  Actually I would really reinstall that package, but it is unable to do it! If I remove this third-party PPA then the system is warning me about a very very serious problem. So why can I not install/reinstall/remove/update this package and why freezes the updater if I try to update?


Can a creature (a PC or an NPC) attack another creature's shield or weapon?

I want to hit enemy's axe to break it. How this is properly played in D&D 5e? And what about shield or armor? Can I attack these items to break it?


How do you install mods for 1.5.2 since you don't have a bin folder. I've tried duplicating the 1.5.2.jar and all that, but it still doesn't work. The mod that I want to install is the "Fossils and Archaeology Revival Mod". I have a Macbook by the way.

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


Currently, I am a graduate student specializing in algebraic geometry. On the other hand, I have also become extremely interested in the mathematical physics. However, I am not sure what steps I should take to get to the modern frontiers of mathematical physics research. My mathematical knowledge covers basic graduate analysis, algebra and topology with an emphasis in algebraic geometry, and as for physics, I know up to basic quantum field theory at the level of P&S and basic general relativity at the level of Wald.  However, unlike those fields that I have studied so far, I am not sure what to learn in order to learn the basics to get to the research level, i.e., able to fully comprehend and dissect research papers in the mathematical physics journals. Most mathematical physics books that I have seen so far are only mathematical methods used in physics. To re-emphasize, I don't simply want references of mathematics used in physics, I wish to know the fundamentals that mathematical physics have to master and concrete examples of modern topics in the field. However, if it is essential, I would like to know what the main relevant mathematical topics are.  I suppose one of the main things I'm confused about is, before one does any actual research, what exactly is the difference between the training/preparation for a mathematical physicist and a pure mathematician? It seems that mathematical physicists basically just learns mathematics, except it's not focused in a particular field and has some physical applications.Do mathematical physicists often get insights behind the way a physicist thinks about problems as well?  Thus, for my main question: What specific books/papers should I start reading to understand the fundamentals of mathematical physics at this point and in what order should I read/study them?  As for side questions: I do not really understand the basic knowledge that a mathematical physicist should have. Do they specialize in a particular area of mathematics or is it mostly topology and geometry or must they know other applicable areas such as functional analysis as well and to what depth?  Would me continuing to self-study algebraic geometry be compatible with learning mathematical physics at the same time? What main fields are there now and what advanced books/papers could I read regarding them after learning the fundamentals as addressed in my previous question? What are the most relevant mathematical topics? Off the top of my head, I can think of mostly functional analysis and topology and geometry.

What are the best textbooks to read for the mathematical background you need for modern physics, such as, string theory?  Some subjects off the top of my head that probably need covering:   Differential geometry, Manifolds, etc. Lie groups, Lie algebras and their representation theory. Algebraic topology.


We have a famous partiton identity which states "the number of partitions of $n$ into odd parts equals the number of partitions of $n$ into distinct parts". This is a famous result of Euler on partitions.. I know the proof using generating functions. But how can we prove the number of partitions of $n$ into odd parts equals the number of partitions of $n$ into distinct parts using Ferrers graph

This seems to be a common result. I've been trying to follow the bijective proof of it, which can be found easily online, but the explanations go over my head. It would be wonderful if you could give me an understandable explanation of the proof and let me know how I'd go about finding such a bijection.


As a citizen of Argentina, I, in principle, need a visa to go to Canada, but not to most countries in Europe.   I am offered a ticket to Europe with a short layover in Canada (e.g. Vancouver).    Do I need a Canadian visa to be able to use that ticket? I live in the US and have a greencard. Does it make any difference?

I am a US Green Card holder. Do I need a visa to travel to and from Canada? Also, my friends are US citizens. Can they use birth certificates to enter and depart from Canada?


Why P value of a 2 tailed test is multiplied by 2 [=2 X P(Z>tcal)? I am looking for a answer which may explain the underlying reason except the answer 'because it is a two tailed test'. Why we also consider the opposite signed value of test statistic in two tailed test to calculate P value?

I am looking for various ways of explaining to my students (in an elementary statistics course) what is a two tailed test, and how its P value is calculated.  How do you explain to your students the two- vs one- tailed test?


Let $R$ a left artinian ring. Show that if $a \in R$ is not a right zero divisor, then $a$ is a unit in $R$.  Comments: I am tryed to do so: See the R-module $_{R}R$ and consider the function $f: _{R}R \longrightarrow _{R}R$ defined by $f(r)= ra$. As $R$ is artinian then $_{R}R$ has a composition series. I do not know if it's out there the way.

How to prove the following?  $R$ is an associative ring with identity. $R$ contains element $r$. The element is not invertible on the right and is not a left divisor of zero. Then the ring $R$ cannot be Artinian on the right.


I was reading through the key derivation for RSA. Here are the steps per wiki -    Select strong primes $p$ and $q$ such that $pq = n$ $\phi(n)$ = $(p-1)(q-1)$ select $e$ such that $e$ and $\phi(n)$ are coprime. Select $d$ such that $ed mod(\phi(n)) = 1$   I do not understand why the $\phi(n)$ is even needed. Why can't we just skip the step and say -- select $e$ such that $e$ and $n$ are coprime.  Would it not work? Is the math somehow dependent on that? If so what is it?   Also why should $e$ be coprime to $\phi(n)$?  To clarify my main question was about why e needs to be relatively prime to phi(n). Would it not work if its relatively prime to n?  After following poncho's answer -- Lets say I want to pick e relatively prime to n. In his example N = 77. Lets say e = 4 then d = 19. So $edmod(N) = 1$. Of course e is not a prime number here, but the spec does not say e should be prime.  It would appear that the $\phi(n)$ is chosen so that its smaller than N giving an opportunity to find the $e$ and $d$. So why choose $(p-1)(q-1)$? Why can't it be some other operation to make the result smaller than n?  I know I am missing something here and its not clicking. Hope some one explains it.

While calculating RSA encryption key we take modulo $\varphi(n)$ rather than modulo $n$. I can’t understand why it’s done this way.


which one of the following sentences is correct and why?   Her face was intentionally blurred in the photo to not to reveal her identity? Her face was intentionally blurred in the photo not to reveal her identity?   Thanks in advance!

This is one thing that keeps bugging me, and maybe there's a direct answer. Grammatically, which one is more correct of these two?  Does it make a difference?  I tried not to do that. I tried to not do that.


Let $f\colon[0,1]\to\mathbb{R}$ be continuously differentiable on   $[0,1]$ and satisfy $f(1)=0$. Show that $$\int_0^1|f(x)|^2dx\leq4\int_0^1 x^2|f'(x)|^2dx.$$   Since $f$ is differentiable on $[0,1]$, I can use mean value theorem -- there exists  $\xi$ such that $$f'(\xi)=\frac{f(1)-f(0)}{1-0} = -f(0).$$  Unfortunately, I can't proceed further with the solution and have no clue how to use continuity of derivative. Any hints?

let $f:[0,1]\longrightarrow R$ be a differentiable function with continuous derivative such that $f(1)=0$,show that:     $$4\int_{0}^{1}x^2|f'(x)|^2dx\ge\int_{0}^{1}|f(x)|^2+\left(\int_{0}^{1}|f(x)|dx\right)^2$$   I think it can be use Cauchy-schwarz inequality     $$\int_{a}^{b}f^2(x)dx\int_{a}^{b}g^2(x)dx\ge\int_{a}^{b}(f(x)g(x))^2dx$$


I can ssh to multiple servers but once I've reached one of them, I can't ssh to the next I have to go back to my local machine and then ssh to the next server. I would like to set up a script that lives on each these servers that can exit and then ssh to the next arbitrary server. I've tried setting up an alias for this.  like so: alias host2="exit; ssh host2;"  that didn't get me anywhere, Then I spent a long time looking into the localcommand config for ssh and I don't think that can help me either. Most recently I've been looking into writing a script that suspends the ssh instance and drops you local again, but I can't seem to get the formatting right for echoing  ~ ^Z. Even if I could I'm not sure it would help. Now my only thought is that maybe the remote server could scp the host name to a shared location and once back I could check that file if it has anything I use that as my next server. But I'm guessing there is a way easier way.  Anyways any ideas or insights would be much appreciated thank you!

I have a network topology like this:  Laptop -> Bastion -> Destination   Bastion and Destination are EC2 instances using the same SSH key for SSH access. However, Destination cannot be accessed from the Internet. Its IP address is visible only to Bastion.  I am able to connect to the Bastion and use agent forwarding to pass the SSH key over and then connect separately from the Bastion to the Destination server. However, I'd like to configure my .ssh/config file in such a way that I can SSH to the Destination server using one command from the laptop. My current .ssh/config file looks like this:  Host Bastion   Hostname <redacted>   IdentityFile ~/.ssh/mykey.pem  Host Destination   Hostname <redacted>   User ubuntu   ProxyCommand ssh -A bastion-dev -W %h:%p   But when I run  ssh -A ubuntu@Destination   SSH responds with:  Permission denied (publickey). ssh_exchange_identification: Connection closed by remote host   How do I correctly pass the SSH key from my local to the Bastion server without having to store it on the server? Can I configure all this via .ssh/config file so that I can log into the Destination server with a single command?


I want to backup all 200+ databases on a MySQL server to all-dbs.sql.  I want to exclude the mysql schema.   How can I do that?

We have 40 databases in our server.   We want to take 36 databases backup using mysqldump. How can i ignore remaining 4 databases in mysqldump command? Is there any option for mysqldump to ignore databases for backup in MySQL?  I know the general mysqldump command but it is very lengthy. I want to ignore only 4 databases and need to take remaining dbs backup.


exception                                                                     2020-06-06 16:59:42.186 21574-21574/elit.express.elit E/AndroidRuntime: FATAL EXCEPTION: main         Process: elit.express.elit, PID: 21574         java.lang.RuntimeException: Unable to start activity ComponentInfo{elit.express.elit/elit.express.elit.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null object reference  MainActivity.java  package elit.express.elit;  import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View;  import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar;  public class MainActivity extends AppCompatActivity {     private Toolbar toolbar;     private View toEditName;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setReservationActivity();         //setIconsVisibility(true);         toEditName= findViewById(R.id.toEditName);     }      @Override     public boolean onCreateOptionsMenu(Menu menu) {         getMenuInflater().inflate(R.menu.menu_reservation, menu);         return super.onCreateOptionsMenu(menu);     }      @Override     public boolean onOptionsItemSelected(MenuItem item) {         switch (item.getItemId()) {             case R.id.toEditName:                 setRegistrationActivity();                 break;             case R.id.toHistory:                 break;             default:                 break;         }          return super.onOptionsItemSelected(item);     }       ////////////////////Set activities     private void setActivityToolbar() {         toolbar = findViewById(R.id.toolbar);         setSupportActionBar(toolbar);     }      protected void setRegistrationActivity() {         setContentView(R.layout.activity_registration);// set layout         setActivityToolbar();         getSupportActionBar().setTitle(R.string.toolbar_name);      }      protected void setReservationActivity() {         setContentView(R.layout.activity_reservation);         setActivityToolbar();         getSupportActionBar().setTitle(R.string.reservation);         toEditName.setVisibility(View.VISIBLE);     }      void setIconsVisibility(boolean visibility){         if(visibility){             findViewById(R.id.toEditName).setVisibility(View.VISIBLE);             findViewById(R.id.toHistory).setVisibility(View.VISIBLE);         }         else{             findViewById(R.id.toEditName).setVisibility(View.GONE);             findViewById(R.id.toHistory).setVisibility(View.GONE);         }     }      ////////////////Buttons     public void onClickRegistration(View view) {         setReservationActivity();     }  }   menu_reservation.xml  <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     xmlns:app="http://schemas.android.com/apk/res-auto">     <item         android:id="@+id/toEditName"         android:title="@string/buttonEditName"         app:showAsAction="ifRoom"         android:icon="@drawable/ic_edit_name"         android:visible="false"/>     <item         android:id="@+id/toHistory"         android:title="@string/buttonHistory"         app:showAsAction="ifRoom"         android:icon="@drawable/ic_history"         android:visible="false"/> </menu>

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I've got a Node<T> with an equals() method:  public boolean equals(Node<T> other) {     if (this == other)         return true;     if (other == null)         return false;     if (!obj.getClass().equals(other.getObject().getClass()))         return false;      return obj.equals(other.getObject()); }   I only care if the object held in my node is equal to the object held in the other node (because two equal objects can be held in different positions in my list).   The object I'm holding is a Token. The Token.equals() method works while my Node.equals() method does not:  public class TokenEqualityTest {     public static void main(String[] args) {         Token t = new Token(0);         Token q = new Token(0);         System.out.println("t.equals(q): " + t.equals(q));          Node<Token> tnode = new Node<Token>(null, null, t);         Node<Token> qnode = new Node<Token>(null, null, q);         System.out.println("tnode.equals(qnode): " + tnode.equals(qnode));     } }   which prints:  t.equals(q): true tnode.equals(qnode): false   If I put a breakpoint at Token.equals() and run the eclipse debugger, my code stops once (at t.equals(q)). This indicates that Node<Token>.equals() does not call Token.equals, and I have verified that the debugger does step through the line return obj.equals(other.getObject());.   Why doesn't my Node.equals ever call Token.equals when I've declared a Node<Token>?

I ran into an interesting (and very frustrating) issue with the equals() method today which caused what I thought to be a well tested class to crash and cause a bug that took me a very long time to track down.   Just for completeness, I wasn't using an IDE or debugger - just good old fashioned text editor and System.out's. Time was very limited and it was a school project.  Anyhow -   I was developing a basic shopping cart which could contain an ArrayList of Book objects. In order to implement the addBook(), removeBook(), and hasBook() methods of the Cart, I wanted to check if the Book already existed in the Cart. So off I go -  public boolean equals(Book b) {     ... // More code here - null checks     if (b.getID() == this.getID()) return true;     else return false; }   All works fine in testing. I create 6 objects and fill them with data. Do many adds, removes, has() operations on the Cart and everything works fine. I read that you can either have equals(TYPE var) or equals(Object o) { (CAST) var } but assumed that since it was working, it didn't matter too much.  Then I ran into a problem - I needed to create a Book object with only the ID in it from within the Book class. No other data would be entered into it. Basically the following:  public boolean hasBook(int i) {     Book b = new Book(i);     return hasBook(b); }  public boolean hasBook(Book b) {     // .. more code here     return this.books.contains(b); }   All of a sudden, the equals(Book b) method no longer works. This took a VERY long time to track down without a good debugger and assuming the Cart class was properly tested and correct. After swaapping the equals() method to the following:  public boolean equals(Object o) {     Book b = (Book) o;     ... // The rest goes here    }   Everything began to work again. Is there a reason the method decided not to take the Book parameter even though it clearly  was  a Book object? The only difference seemed to be it was instantiated from within the same class, and only filled with one data member. I'm very very confused. Please, shed some light?


I have a code segment that looks like this:  53    Debug.Log("Palette Count: " + palette.Count); 54    Debug.Log("Selection: " + selection); 55    palette[selection].isOn = false;   For reference:  palette is a List<Toggle>  selection is an int  The code works perfectly, except when I add the following to the Start function:  20    for (int i = 0; i < palette.Count; i++) { 21        palette[i].onValueChanged.AddListener(delegate { setSelect(i); }); 22    }   For reference:  194    private void setSelect(int index) { 195        Toggle toggle = palette[index]; 196        if (toggle.isOn) { 197            selection = index; 198        } 199    }   Once these segments are included, I receive the two Debug.Log() outputs and a runtime error:  Palette Count: 9 UnityEngine.Debug:Log(Object) UIManagerW:Update() (at Assets/Scripts/World/UIManagerW.cs:53)   Selection: 0 UnityEngine.Debug:Log(Object) UIManagerW:Update() (at Assets/Scripts/World/UIManagerW.cs:54)   ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <437ba245d8404784b9fbab9b439ac908>:0) System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <437ba245d8404784b9fbab9b439ac908>:0) System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <437ba245d8404784b9fbab9b439ac908>:0) UIManagerW.setSelect (System.Int32 index) (at Assets/Scripts/World/UIManagerW.cs:195) UIManagerW+<>c__DisplayClass11_0.<Start>b__0 (System.Boolean <p0>) (at Assets/Scripts/World/UIManagerW.cs:21) UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <d815b7efac424eeb8e053965cccb1f98>:0) UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <d815b7efac424eeb8e053965cccb1f98>:0) UnityEngine.UI.Toggle.Set (System.Boolean value, System.Boolean sendCallback) (at C:/Program Files/2019.3.6f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Toggle.cs:280) UnityEngine.UI.Toggle.set_isOn (System.Boolean value) (at C:/Program Files/2019.3.6f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Toggle.cs:243) UIManagerW.Update () (at Assets/Scripts/World/UIManagerW.cs:55)   I'm not really sure how this is possible. I can restore the functionality by commenting out the lines within setSelect, so it would seem that Line 195 is the culprit. I just haven't a clue what to go off of here.  Thanks in advance for any help you can provide!

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


Is it possible to block/eliminate particular noise sounds with artificially generated sound waves or any other ways?

I saw youtube videos that claimed to do this, although I'm quite certain the videos just excluded sound and lied.  However, I am wondering if the physics of this is actually possible - to create a completely negative sound wave that cancels the sound out to a flat line i.e. complete silence.  p.s. I am not referring to white noise, which prevents the sound from being heard by overriding it with a different sound (white noise). Rather, I am referring to making a sound be completely silent by generating the inverse, opposite, or "negative" sound wave.


I am trying to place an object to coordinates on textfile using blender python. How do I do this?

I would like to know how I can save selected object names, location and rotation using Python in Blender 2.8 in a CSV.  And then using the same CSV apply this information to another blend file with the same objects in different locations in a new frame.  (it's not about bones it's about normal meshes).  Beeing new to Blender Python scripting, I hope for some coding hints here.  so far i got this (works in console but not in script file)  import bpy import os ob_active = bpy.context.selected_objects for obj in ob_active:     print(obj.name,obj.location,obj.rotation_euler)


So this is killing me...  I read the book some years ago.   My premise was that I do not read enough different authors, so I started picking books at random going down the alphabet.  This book was pretty far down the shelf of my library at the time, close to "Zhan".  The premise of the book was that medicine is bad, in prolonging life unnecessarily. So all medicine was banned.  Our young protagonist finds a medic bag in an old ambulance, and starts saving people. Leading to some unfortunate consequences.  It was called Dark Wing, or Night Wing, or some such.  Please help.

Set in the future, when all medicine is illegal, but technology has advanced to star-trek levels - most people live in free government provided acconmodations, and eat free food from public replicators, although it is only free as long as they agree to not have children.  A kid finds a crashed ambulance containing a laptop with a medical library and AI diagnostic software, so he starts teaching himself medicine, and then runs around curing people. Literally runs, in a few scenes. His interest in ill people is noticed, and he gets recruited to some sort of government team, whose purpose is to bring people comfort as they are dying and incidentally enforce the ban on medicine.  Eventually I think it ends badly - I vaguely remember him being executed at the end, although I might be mixing that up with another story.  There is an additional sub-plot about another kid whose parents were martian diplomats, who came to earth to negotiate something, but were killed in an "accident". He's trying to save enough money to pay for a flight back to mars. I remember a scene, of him selling some rare martian things at the side of the road, which is where the protagonist found him.  I also sort of remember the book having a green/blue cover, and the title "dark wings", but that is probably totally off as I've tried googling for variations on the name, and nothing came up, so it's probably called something completely different.  Any idea what book this was?


Which one is correct and why?     I can speak (a language).      I know to speak (a language).

I was reading a website where common English sentence errors are written -     INCORRECT - He doesn't know to swim.      CORRECT - He doesn't know how to swim.   I know He doesn't know how to swim is a correct sentence. But why is the other one wrong, is my question?  I know that know is a transitive verb. So, the following are correct -   i) He knows swimming.  Swimming is a gerund. We can also use the infinitive form here - to swim  ii) He knows to swim.


What is the difference between the 2 calls:  Set<Record> instances = new HashSet<Record>();  -  on one hand  HashSet<Record> instances = new HashSet<Record>();  - on other hand

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I'm currently facing a problem when trying to edit the text of a TextView in the OnCreate method of an Activity. As I understand, setContentView must be called before trying to change the text, however I am still having trouble with this.  Here is the code in question :   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_dash_board);      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);     ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(             this, drawer, R.string.navigation_drawer_open, R.string.navigation_drawer_close);     drawer.addDrawerListener(toggle);     toggle.syncState();      NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);     navigationView.setNavigationItemSelectedListener(this);      userEmailtext = (TextView) findViewById(R.id.emailText);     mAuth = FirebaseAuth.getInstance();     mUser = mAuth.getCurrentUser();     userEmailtext.setText("This Does Not Work"); }   This Activity includes the Android Studio default sliding menu. The aim of this setText is to change the email address text of the sliding menu. I believe the problem may lie in the fact that the sliding menu is part of a different layout file, meaning there is no "emailText" textview leading to the null pointer exception, however I am still not sure how this would be rectified.  Any help is appreciated.


Prove that any finite group of order $n$ is isomorphic to a subgroup of $\mathbb{O}(n)$, the group of $n\times n$ orthogonal real matrices.  Attempt:  Let $G$ be a group of order $n$. Then $G$ is isomorphic to a subgroup of the symmetric group $S_n$.  But how to go further?

For every finite group $G$  , does there exist $n \in \mathbb Z^+$ such that $G$ can be embedded in $SO_n(\mathbb R)$ ? Can every finite group be embedded in $SL_n(\mathbb R)$ for some $n$ ?


I'm sitting with the proof in front of me, but I do not understand it.  $$A = \{n \in Z^{++} \mid (1^3 + 2^3 + 3^3+\cdots+n^3) = (1 + 2 + \cdots + n)^2\}$$  The first step of proof by induction is simple enough,to prove that $1 \in A$  $1^3 = 1^2$  The next step is where I get tripped up. So I add $n + 1$ to the right hand side  $$(1 + 2 + \cdots + n + (n + 1))^2 = (1 + 2 + \cdots + n)^2 + 2(1 + 2 + \cdots + n)(n + 1) + (n + 1)^2$$  My algebra is failing me here, because I do not understand how the equation was expanded.

How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks


I recently came across a question on Quora:     What are future plans for Gtk?   Is there plan for smartphone or tablet? Gnome focus on touch devices but Gtk software can not run on it?   On Quora, why Gtk topic only have 538 follower (Qt have 4k)?   I really worry about it :(     This is an interesting question, and I considered answering it. Unfortunately I have no idea why this is so...  So: Why did Canonical choose to use the Qt toolkit for Ubuntu Touch and not Gtk?  And why is it much less popular as a GUI toolkit?

So much has been written that I'm kind of confused, but if I'm not mistaken Canonical is building the next generation of Unity for mobile devices with Qt, and in the near future the desktop will also be migrated to qt.  I just wanted to know the technical and/or political reasons driving this decision, and what consequences could it mean for the currently existing Ubuntu desktop applications.


I saw someone said "Had you anyone specific in mind" in an old English drama. How am I supposed to understand this sentence?

Is the following sentence correct English?      Have you the address?   The address in question is obvious to the person being asked.  It's normal to ask such a question as "Do you have the address?" or even "Have you got the address?" But is it acceptable to use just the verb have without do or got?


Quite often, comments on a question ask for the original poster to add details.  For example:  What architecture are you compiling for? What version of XYZ are you using?  I think it would be helpful for these comments to be visible while editing the original question.  That way, we won't have to keep going back and forth or open a new tab.

We have inline comment editing, inline editing of questions on Area 51, and inline re-tagging.  Can we please have inline Question and Answer editing on the Stack Exchange sites?  This has been implemented using a GreaseMonkey Script.  Try it out yourself.  It's old, so I'm not sure if it will still work:


I am digitizing my video collection and want to put it on an external hard drive. It is a 1TB Western Digital HD. The files are all over 5GB as I am ripping the files with Handbrake and at a very high quality. I use the copy/paste method of transferring them to the HD and when it hits a certain size, it errors and stops the transfer telling me that the file is too big. There is plenty of space on the HD.  Any suggestions would be appreciated!  Thanks.  I am running Ubuntu 12.04 on a Dell Latitude E6400 32bit.

I am trying to copy a 6GB file to a USB flash drive but it won't copy.


I want that when i change the window size, that my content in it will be places as in the default size only should it resize itself  <Window =Height="500" Width="800" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">     <TextBlock           HorizontalAlignment="Stretch" VerticalAlignment="Stretch"         Name="consoleOutput"          Margin="170,10,10,140"           Background="Aqua"/>     <TextBlock           HorizontalAlignment="Stretch" VerticalAlignment="Stretch"         Name="menuOutput"          Margin="10,10,630,245"          Background="Gray"/>     <TextBlock           HorizontalAlignment="Stretch" VerticalAlignment="Stretch"         Name="menuOutput2"          Margin="10,245,630,10"          Background="Green"/>     <TextBox           HorizontalAlignment="Stretch" VerticalAlignment="Stretch"         Name="consoleInput"          Margin="170,340,10,10"           Background="Red"         AcceptsReturn="True"/> </Grid> </Window>

Some WPF controls (like the Button) seem to happily consume all the available space in its' container if you don't specify the height it is to have.  And some, like the ones I need to use right now, the (multiline) TextBox and the ListBox seem more worried about just taking the space necessary to fit their contents, and no more.   If you put these guys in a cell in a UniformGrid, they will expand to fit the available space. However, UniformGrid instances are not right for all situations. What if you have a grid with some rows set to a * height to divide the height between itself and other * rows? What if you have a StackPanel and you have a Label, a List and a Button, how can you get the list to take up all the space not eaten by the label and the button?  I would think this would really be a basic layout requirement, but I can't figure out how to get them to fill the space that they could (putting them in a DockPanel and setting it to fill also doesn't work, it seems, since the DockPanel only takes up the space needed by its' subcontrols).  A resizable GUI would be quite horrible if you had to play with Height, Width, MinHeight, MinWidth etc.   Can you bind your Height and Width properties to the grid cell you occupy? Or is there another way to do this?


This was a short story I read sometime before 2000, most likely sometime between 1981 and 1995. It was collected in a paperback with other stories, which I believe (but am not sure) were by separate authors. I also believe (but am not sure) that the cover of the paperback was pink. I may have checked out the book from the public library, which means the book itself could have been arbitrarily old.  On a planet with a hostile atmosphere, there are humans living within a dome or some other artificial environment. Each generation genetically engineers the next generation to be closer to being able to live outside the dome. At the end of the story (and perhaps also the beginning of the story—I'm not sure how much time elapses during the narrative) the final generation is almost ready to be released into the wild, but they are strong (with a low, dense, non-humanoid body shape) and out of control, and they risk damaging (or actually do damage) the dome and therefore the lives of the older generations. The young ones will survive and thrive on the planet, the older ones think to themselves with pride, even if the rest of us must parish.  The subtext of the story is that while the youngsters may technically be human (in the sense of DNA), they are no longer human from any meaningful point of view. The reader is left questioning the wisdom of their plan.  Maybe the first generation engineers all the subsequent generations, instead of each engineering the next. That's not how I remember it, but if each generation engineered the next, then the penultimate generation would be not human enough to convey the subtext. Also, the final generation is wild, presumably lacking any kind of education or technical know-how, so presumably the penultimate generation would be close enough to wild that they wouldn't be able to genetically engineer anything. This IMHO would make it hard for the author to pull off each-generation-engineers-the-next, but maybe she or he was able to.

I am looking for a short story and anthology / anthologies containing it: A multi generation ship has landed on a planet with very hostile inhabitants on it. The aliens are chipping away at the hull of the ship with primitive instruments.   The leaders of the space ship decide to breed aggressive children to counter the aliens. They know that this is suicidal as the children will be so aggressive that they will kill the parental generation.   I think I read this in an anthology in early 80's / late 70's. Most likely published in 70's.


I just upgraded my Ubuntu to 14.04, after I got a notification about it. All the installation went well but after restart now, when I go to the Ubuntu option from grub, it shows only a purple screen and nothing happens after that. I also have Windows 8 installed in my laptop, but hope that should not be a problem, as it worked well with ubuntu 13.10.   Please help me to fix this problem, or at least to get back to my previous ubuntu I had.  Thanks.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Wolfram Alpha says:  $$\lim_{x\to0}\left(\frac{\tan x}{x}\right)^{1/x^2} = e^{1/3}$$  What are the steps leading to this result?  Only with the Hospital rule, I have as a result infinity.

Can someone help me with this limit? I'm working on it for hours and cant figure it out.  $$ \lim_{x\to 0} \left(\frac {\tan x }{x} \right)^{\frac{1}{x^2}}$$  I started transforming to the form $ \lim_{x\to 0} e^{  {\frac{\ln \left(\frac {\tan x}{x} \right)}{x^2}}  }$ and applied the l'Hopital rule (since indeterminated $\frac00$), getting:  $$ \lim_{x\to 0} \left( \frac{2x-\sin 2x }{2x^2\sin 2x} \right)$$  From here, I try continue with various forms of trigonometric substitutions, appling the l'Hopital rule again and again, but no luck for me. Can someone help me?


Does the baking/cooking process change the nutritional value of food? I don't know the science behind that.   I want to calculate more than just calories -fat, carbs, sugars, protein, etc... Is it just as simple (albeit, time consuming) as adding up those values on the ingredients? Or is there more to it than that?

I like to cook from scratch, and I'm currently trying to loose a few pounds. I know that cooked food is generally more calorific than raw food, so if I add up the calories of the ingredients I know it won't give an accurate result.  So my questions are two-fold:  How much difference is there between a raw food item and a cooked food item?  Is there a method to deduce the calorie content of cooked food (given the know values of its raw form) ?


I've been so curious about whether the adverb 'quickly' can be inserted between the verb 'turn out' and its direct object 'the light'.  For example, is it grammatically correct?      He turns out quickly the light   I have been learning that in terms of syntax an adverb cannot interrupt the close bond between the head and its complement.

I've come across the phrase "Listen carefully to what I say" and I'm really not sure why carefully has gone in between listen and to. It doesn't happen with other verbs; you don't "switch carefully on the light", for example.  When can an adverb follow a verb, and when can it not?


How do I find out if a PHP array was built like this:  array('First', 'Second', 'Third');   Or like this:  array('first' => 'First', 'second' => 'Second', 'third' => 'Third');   ???

PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array contains only numeric keys? Basically, I want to be able to differentiate between this: $sequentialArray = [     'apple', 'orange', 'tomato', 'carrot' ];  and this: $assocArray = [     'fruit1' => 'apple',     'fruit2' => 'orange',     'veg1' => 'tomato',     'veg2' => 'carrot' ];


i bought an expensive desk lamp from the US called , i lost the power adapter, so my questions are as you are electrical engineers: 1) can i use it in israel  ? does it lose its peak because the countries difference? 2) what power adapter should i seek for when buying?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


Recently, I finished gravitation. I wonder why the shapes of planets or any body revolving around any star are not cubical or ellipsoidal. In our solar system all the planets are spherical in shape. Why isn't a body of any other shape found revolving around the gravitational field of any star?

Why are stars, planets and larger moons (approximately) spherical in shape (like, the Sun, the Moon, the Earth, and other planets)?


I'm trying to figure out how to prove that if $p$ and $p^2+2$ are prime numbers then $p^3+2$ is a prime number too. Can someone help me please?

Suppose $p$  and $p^2+2$ are prime numbers, prove that $p^3+2$ is also a prime number. Actually I do not know what is the relationship among square numbers, cube numbers and prime numbers


(I also asked this on Blender Artists)  I’m trying to run:  bpy.ops.poselib.apply_pose(pose_index=index)   For some reason I can’t seem to be able to find way to set active pose action to be able to run this.   I’ve found how to get access to current action (I think):  context.object.animation_data.action = bpy.data.actions.get(sel)   But it isn’t the same thing. Doing this does work for selecting action, it sets current action in Dope sheet BUT it doesn’t set it in Properties window’s Pose panel… rendering it useless.  I would need to be able to set the actual Properties window Pose Library panel selection.   If I run ops code with incorrect Pose Window selection, it just fails …but if I change target pose library manually, it works.  One would think that if ops exists, there has to be a way to also select which one of Pose Libraries to target.  Any help appreciated!

I want to make a button that changes the active poselib to another one from the list, a specific one. I look in the console and can't see any operator. any ideas?


Which one would be correct?   I wish it weren't raining today. I wish it wasn't raining today. I wish it were raining today. I wish it was raining today.

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


I did something and now the mouse pointer moves when I press the arrow keys. This is very inconvenient, for example, when editing text. In the operating system settings, keyboard pointer management is disabled. Perhaps this is due to the laptop model. How to disable it?  OS: Windows 10. Notebook: MSI GL72M 7REX

I'm encountering a strange problem on my W10 computer, for a few days my arrow keys have been "driving" my mouse pointer. Pressing the left arrow key will move the pointer a few pixels left, etc.  The first thing that came to my mind was "oh well, I must have enabled Mouse Keys inadvertently". But Mouse Keys use the numpad and even then, it's not enabled. Rebooting doesn't help, but I've noticed it doesn't happen if the current window is ran as another user (Administrator) or if it's the Task Manager, which suggests the event filter that's catching the key press events is only active on my UID.  I've tried killing various processes but I'm running out of ideas. I'm fairly sure it's a dumb issue but it's been driving me nuts.


I'm trying to do some Minecraft animation, so I get some textures and rigs and did this.     But when I import that object I´ve got this    I'm little bit newbie and I want to join to Blender community.

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


I use Ubuntu 14.04 Desktop Edition. Now I see Software Updater's message that it must be updated. Then I get a message  requires installation of untrusted packages from unauthenticated sources   What's going on here? How can I solve it?

Any install that I'm trying through the Software Center is telling me:  Requires installation of untrusted packages: The action would require the installation of packages from not authenticated sources.  I did an apt-get update from the command line, then removed the software sources that the keys were bad from (PPAs I added myself), and unchecked them in the software sources for software center, but to no avail.  I can't install anything from software center anymore - only> from the command line with apt-get. Is uninstalling/installing the only option?  I don't want to break other PPAs that I have. Additional information: Here's a paste from apt-get update: Reading package lists... Done W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B725097B3ACC3965 W: GPG error: http://us.archive.ubuntu.com oneiric Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>  I've tried apt-key update, and there was no effect (two keys unchanged). The output of apt-get update and apt-get upgrade, and the contents of /etc/apt/sources.list, can be found in .


i installed nginx server in ubuntu instance. then i copy my data into /var/www/html folder. then i access site through public ip. its working fine. Then i create A record with public ip address. so i can access with domain name.  After few hours i am not accessing the site. I checked in server nginx service is running. but i can't access the website. ports are open in security group for that instances. curl localhost curl privateip curl publicdns are working. but curl  with public ip is not working. could you please help me this issue.

I am new to AWS and I have a question. I want to host a website on two EC2 instances. From what I read, if I stop the EC2 instance the public IP will change. In my case, Route 53 should route traffic to load balancer.  How can I configure my load balancer to route the traffic to EC2 instances without changing the IP if I change one of them? In other words, is there a way to have a fixed public IP to my two EC2 instances when they are switched off such that my load balancer routes the traffic to them?  Thanks.


I want to implement day/night functionality on world map i.e there will be   dark layer showing countires having night now.  This world map could be creaeted through ESRI or SVG map.I want to understand what is the   logic of showing behind implementing this.Any known algorithms/formulas.  I have posted this question in stackoverlfow ().  But thought this is better forum.

I have a daytime raster of my study area. I have 20+ counters in the study area that count "stuff" with a timestamp. Using  I determined the type of ambient light for each collected data point.   What I'd like to do:   Add a grey/semi transparent overlay to reflect the ambient light (Dusk, Sunrise, day, sunset, and dark). The end goal: produce a time-based visualization of the data collection that highlights the time of the day. Or be able to produce a snapshot at a certain time with the proper shaded overlay. Think of this as this the image:


I am new to photography any i am not sure what is the correct settings when shooting long distance landscapes.  The photo that I took is pretty blurry/hazy. Is there any specific settings or equipment to reduce this blur/haze when shooting long-distance landscapes?  Here is an example of a photo that I took.

Distant landscapes often appear hazy, washed-out and blue due to .  What can be done to maximise the contrast range of the exposure when photographing such scenes?  For example:   Would any sort of hardware, camera settings, or type of "film" (including digital) produce better results? Are there reliable ways to predict when haze will be lowest?


When I try to install Chrome through the Ubuntu Software Center, I get the message     Dependency Is not satisfiable : libstdc++6 (>=4.8.0)   How can I fix this?  I am running Ubuntu 12.04.

I am trying to install google-chrome-stable on a fresh ubuntu 12.04 installation. I run the following commands  wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg -i google-chrome*.deb   I get the following errors  dpkg: dependency problems prevent configuration of google-chrome-stable:  google-chrome-stable depends on libstdc++6 (>= 4.8.0); however: Version of libstdc++6 on system is 4.6.3-1ubuntu5.  google-chrome-stable depends on lsb-base (>= 4.1); however: Version of lsb-base on system is 4.0-0ubuntu20.3. dpkg: error processing google-chrome-stable (--install):  dependency problems - leaving unconfigured Processing triggers for man-db ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Errors were encountered while processing:  google-chrome-stable   When I run sudo apt-get install -f I just have google-chrome-stable removed:  The following packages will be REMOVED   google-chrome-stable   If I look for the required versions, e.g. I try sudo apt-get install libstdc++6=4.8.0 I cannot find the version:  E: Version ‘4.8.0’ for ‘libstdc++6’ was not found   How do I fix that?  I know there is no longer support for 32bit version of Ubuntu 12.04. I am running 64bit Ubuntu version.


How to put a number greater than 9 to regexp character set?  For example, I can do ^[01236]$, but what if I want to put 100 as an option to the set?   How do I solve this problem?

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I have received so many different answers and I'm hoping to get one from someone who knows about this specific issue.   My MacBook Pro was stolen last week, but it is still showing on my devices on find my iPhone as "offline." If the thief wiped the laptop, would it still show as offline or would it be completely removed? I read something about it being possibly stored in the NVRAM so it could still show up like it is but I want to be certain.  Thank you so much for your answers

Possible Duplicate:          My MacBook was stolen last week, and I have just realized that I had set up iCloud and "find my iPhone".  It is currently showing up as off-line. I do not know whether it will connect if the thief has already wiped the system. I've set up to get an email alert if it connects.  If my MacBook has been wiped by a thief will the "find my iPhone" app still work to locate that hardware?


I want to add a description field to my menu and and use it in front.  I managed to have a text_format field for my description (in /admin/structure/menu/manage/main) but when I click on save, that field is empty.  function HOOK_form_alter(&$form, $form_state, $form_id) {   if ($form_id != 'menu_edit_form') {     return false;   }   $form['field_menu_content'] = array(    '#type' => 'text_format',    '#title' => t('Description'),    '#format' => 'full_html',   ); }

I need to build a main menu that is a subset of the regular menu. The design team thinks it would be better for user to have only the most important links in the main menu and not have everything. Some links are top level menu and some are sub menus. For this I was hoping to be able to add a field to the menu link item form as a drop down. When creating a link the user could use this dropdown to "promoteToMainMenuAsBigLink" or "promoteToMainMenuAsSmallLink" or leave none to not show the item on the main menu.  I'm looking for a similar solution as this  but for Drupal 8.   I was hoping to be able to add a column in the table menu_link_content_data beside 'expanded'. I was hoping not to have to record this information in an other table like shown in the d7 solution.  I was able to add a field to the link form in a custom module I build, just for test purpose I only added a text field to start with:  custom_menu.module:  function custom_menu_form_alter(&$form, FormStateInterface $form_state, $form_id) {   if($form_id == 'menu_link_content_menu_link_content_form') {     $form['promoteToMainMenu'] = array(       '#type' => 'textfield',       '#title' => t('Promote to main menu'),       '#description' => t('Promote link menu to main menu.'),       '#default_value' => '',       '#weight' => -9     );   } }   The field is indeed shown in the link form but it is never recorded.  Can someone help me with this?


I coded a java file in a folder which is on my desktop.I copied windows terminal to this folder to execute and compile this file.When I compiled the file there was no problem.But when I tried to run the file,the same file it did found when I was compiling,it didnt found the file(like what?). Screenshots   What I've tried so far I tried including a class path in my terminal code but it didnt change anything. Where am I making a mistake please help me solving the problem.

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I have tried many times to install Ubuntu 14.10 on my Notebook of FUJITSU LIFEBOOK UH55/M.But it's always turned out something to be wrong, and it's just the Boot questions.  I installed Ubuntu 14.10 with UEFI, and with BOOT SECURE ON,because I want my pre-installed Win8 works between Ubuntu.  Now I doubt that Ubuntu 14.10 version is support UEFI or not,I followed many ways that INSTALL Ubuntu with SECURE BOOT ON. It seems not support my computer,by the way, if I have to try the Version 12.10?  OS           Windows 8.1 64 Bit. CPU          INTEL® Core™ i5-4200U PROCESS (1.60-2.60GHz) MEMORY       4GB(4GB×1)(DDR3L PC3L-12800) HDD          500GB HDD (HDD＋NAND FLASH MEMORY) DRIVE        NONE DISPLAY     13.3 HD フルフラットファインパネル（TOUCH）[1366×768] GRAPYICS    Intel® HD Graphics 4400 CAMERA  HD Webカメラ内蔵（有効画素数 約92万画素） INTERNET    LANなし, ワイヤレスLAN(IEEE 802.11a/b/g/n準拠) Bluetooth   Bluetooth® ワイヤレステクノロジー Ver.4.0+HS準拠 KEYBOARD    STANDARD KEBOARD（91KEY） POINTING DEBASE     フラットポイント内蔵

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


In AC systems the two wires of a circuit alternate polarity many times per second. So positive and negative switch, half of the time a wire is positive the other it is negative.   So why is it important to connect plug sockets to the correct coloured wire? What is the difference between the live and neutral wires?

In domestic electrical circuits, there are 3 wires - live, earth and neutral. What is the difference between the live and neutral wires?  As there is AC supply, it means that there are no fixed positive and negative terminals. Current rapidly switches direction. Does that not mean that both the live and neutral wires carry the same amount of current, alternatively? Why is the neutral wire called 'neutral'?


I'm going to do some old school value investing, holding  around ten stocks.  Other than investing say 2k every month, I also have around 100k in savings. I'm contemplating investing these alongside my 2k, say over the next 3 to 5 years.   I don't want to take too much risk in regard to market timings. Any thoughts on the period for investing the additional sum?

I currently have a large pile of cash savings ($240,000) which I really should have been investing all this time, but the past is past and no point dwelling on it.  I am currently 38 years old (2 kids. Wife who is also a high earner - $100,000), with a high salary ($150,000). I have read "The Intelligent Investor" and am really sold on dollar cost averaging as a strategy, using the index funds offered by Vanguard.  My current dilemma is what to do with the cash I already have. My current plan is to still follow the dollar cost averaging and slowly move it into vanguard over a period of 4 years (~$5000 per month). While leaving the remaining parts of the cash in term deposits. So $50,000 in a 3 year term deposit at 3%, $50,000 in a 2 year term deposit at 2.8% etc.  But in someways it feels overly conservative. Should I just move all the money now? Or perhaps in a shorter time frame (3 years? 2 years? 1 year?).  There are a few other questions on the site similar to mine, but they are from 2013/2014 etc. Given that currently the stock market is at a high and there is a lot of economic uncertainty on the horizon, putting everything in the stock/bond market at once now seems like a risky move. And it seems to violate the principle of dollar cost averaging. Or am I violating dollar cost averaging by trying to "time the market" by looking at it's current value?  Reading this section  seems to indicate that I should just invest everything now. But the first paragraph also seems to suggest giving more weight to that advice if the market was trending upwards (Which I am not certain the current market is/will be for long).  PS: My current investment horizon is long. Basically retirement, about 20 years from now.


I need to calculate multiple ring-buffers, but every time I try, arcgis produces a failure:  Executing (Multiple Ring Buffer): MultipleRingBuffer Y:\GIS\RDY\clip\sn_clip.shp Y:\GIS\RDY\sn_clip_ring.shp 100;250;500;750;1000;1250;1500;1750;2000;2250;2500;2750;3000;3250;3500;3750;4000;4250;4500;4750;5000;5250;5500;5750;6000;6250;6500;6750;7000;7250;7500;7750;8000;8250;8500;8750;9000;9250;9500;9750;10000;10250;10500;10750;1100 Meters distance ALL FULL Start Time: Fri Feb 15 12:03:02 2013 Running script MultipleRingBuffer... ERROR 999999: Error executing function. The table was not found. The table was not found. [union] The table was not found. The table was not found. [union] Invalid Topology [Topoengine error.] Failed to execute (Union).  Completed script MultipleRingBuffer... Failed to execute (Multiple Ring Buffer). Failed at Fri Feb 15 13:58:58 2013 (Elapsed Time: 1 hours 55 minutes 56 seconds)  I don't get it. Can anyone help me with this? Note that I'm not used to python.

Using ArcGIS 10.1 for Desktop, I'm trying to run the Identity function on two large data sets but it fails every time. I don't think it is a lack of hardware as I can run other processes on the same data sets.   I've already updated software, and added the 64 bit geoprocessing add-in, checked and repaired geometry, and done the fix in  (set ARCTMPDIR env variable to a writable local folder).   Executing: Identity DudleyStamp OA2011 "D:\Case Studies\National2\National.gdb\DudleyStampOA11" ALL "1 Meters" NO_RELATIONSHIPS  Start Time: Wed May 08 21:11:43 2013 Reading Features... Processing Tiles... Assembling Tile Features... ERROR 999999: Error executing function. The table was not found. The table was not found. [DudleyStampOA11] The table was not found.   The table was not found. [DudleyStampOA11]   Invalid Topology [Topoengine error.] Failed to execute (Identity). Failed at Wed May 08 21:45:41 2013 (Elapsed Time: 33 minutes 58 seconds)   Based on comments so far I tried copying data to new file geodatabase, and running the tool from ArcCatalog still get exactly the same error.  I have ordered 16GB of the fastest RAM my computer can take (I current have 4GB). I also have a 6 Core AMD Phenom II X6 1090T, SSD, and AMD Radeon HD 6970 Graphics Card. So I'm not sure what more hardware I can add.  I've also tried increasing the size of the page file which was a suggestion I found on Google with no effect.


As you can see by the screen shot my label has transparency that's instead showing up white when I uvwrap the label on the bottle. I know it has to be something simple but there's no option to make it recognize transparency (like when bringing in an image to the modeling window I can select alpha transparency).

I am trying to put a label over the transparent plastic bottle, but i was unable to do so, because when i build the bottle material(plastic) and mix it with the diffuse shader(using the label texture), the label gets faded. So the solution i found was to duplicate the bottle and scale a little bit and apply the label material on it. So it looks its the same material, but in reality its one material over the other. How can I make my plastic material be under my label material(image)? Here's how it looks:   Here's my material setting for the plastic bottle:   Thanks in advance.


So I should prove $\frac{x}{1+x^2} < \arctan x < x ,\quad x> 0$  I presume easiest way would be to:  $$f(x)=\arctan x -\frac{x}{1+x^2}, \quad g(x)= x - \arctan x$$  then:  $f(x)>0$, $g(x)>0$  But now I'm not really sure what I should utilize to prove those statements

How to prove for $x>0$, $\dfrac{x}{1+x^2}<\arctan x<x$?   I started with saying $0<\arctan x<\frac{\pi}{2}$  when $x>0$  I'm just not sure how to proceed with this proof, it works when I take random  values but I cant see how to prove that it works for any $x$.


I'm making a bed wars map and the command blocks are VERY boring, is there a way to copy a command block so that when you place it down again it has the same command. I'm on Xbox by the way

Are you looking for how to use /setblock with blocks with data? See .  How do I get a block with data in my inventory so I can place it myself? In Java Edition, these commands work: give @s chest{BlockEntityTag:{Items:[{id:"diamond",count:10b}]}} give @s sign{BlockEntityTag:{Text1:"{\"text\":\"foo\",\"bold\":true}"}}  How can I do this in Bedrock Edition, where there is no access to NBT tags from commands?


It's well-known that there exists some real numbers that cannot be defined in a string of finite length (Berry's paradox). However, why can the set of all real numbers be defined?  My gut feelings are  $1$. the definition has some nonconstructive descriptions, like the supremum and infimum principle;  $2$. or we are just talking about computable numbers?  I'm not familiar with real analysis & mathematical logic so there might be something I overlooked.

Loosely, a number is describable if it can be unambiguously defined by a finite string over a finite alphabet. Numbers such as $\frac{1}{3}$, $\sum_{n=0}^\infty \frac{1}{n!}$, and "the ratio of circumference to diameter of a circle" are all describable numbers. One can  show that the set of all such numbers is countable.  Let $U$ be the set of indescribable real numbers. I "claim" $U$ is empty, and so every real number is describable. Suppose to the contrary. Place a well-order on $U$ (this can be done assuming the Axiom of Choice). The least element $u$ of $U$ admits the description "the least element of $U$ according to the specified well-order", contradicting the indescribability of $u$.  Obviously, something has gone awry here. I suspect it is some combination of my loose definition of describability and my self-referential "description" of $u$. My (slightly open-ended) question is "What's wrong here?".  P.S. There is a  addressing something rather like my question. As I understand it, the author's response is "the given description isn't really a description". If so, I'd enjoy some elaboration.


I have only one user and my grub boot menu also won't load so I don't know any other way to change password

I need to reset my password. I have followed these steps:    However, then I go to "root" or "netroot" recovery options, it tells me:  Give root password for maintenance (or type Control-D to continue)   Clearly, I do not know the root password. If I type CTRL+D, I return to the list of options. From  I read:  Under chapter 'The Other Way':  4. Highlight the line that begins kernel and press 'e' to edit`   But in the grub configuration file I have no line that starts with kernel. Only:  setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6....   Those are all lines in my GRUB. Which line should I edit? Or is there another way to reset my password?


I am working on a Debian 7 Wheezy system using Anaconda and working from Spyder.  I've had a hard time installing a version of GDAL that reads HDF4 drivers.  Could someone walk me through the installation process?

I'm running code that works with MODIS HDF4 datasets on a Debian Linux distribution.  I am also running this code on a Windows machine.  On both the Windows and the Linux machines, I have the most recent GDAL version (gdal 1.11.1, np19py27_1), however on the Linux machine, GDAL doesn't seem to recognize HDF4 Drivers... it won't load or process any of the HDF4 datasets that are easily processed on the Windows machine (unfortunately this machine doesn't have enough space to run the full code).  Has anyone else encountered this problem?  Do I need to install an additional module on the Linux system?


Even if there are certain locking spells can protect the lock against , can't a wizard just break through the walls on side? As one door is a part of a wall closing a room, can't a wizard blast through some nearby walls?

In the Harry Potter universe, there is a spell that unlocks things. In the books and movies, there are many occasions where the main characters use this spell to open doors in wizard buildings (such as the door leading to where the Philosopher's Stone is hidden, or a door in the Magical Congress Of USA headquarters). Hermione knows the spell in her first year, which seems to indicate it's pretty easy to learn/cast, especially for the average adult wizard.   What I'm wondering, then, is why do wizards lock their doors when it's so easy to unlock them? And if it's so easy to unlock locked doors, why aren't there more doors locked with enchantments?


I am proving a result of vector analysis here it is.  A vector field $F$ is continuous in a Domain $D$ is conservative $\iff$ the line integral of tangential component of $F$ along every regular curve in $D$ depends only on the end points of the curve. Moreover the line integral is simply the difference in potential of the end points  The definition I am using for Conservative field is :-  A vector field $F$ is said to be conservative if there exist a scalar field $\phi$ defined in the domain $D$ such that $F=$$\nabla$$\phi$  I know we have to use concepts of path connected and simply connected but I don't know where to start exactly . Hints or solution is really appreciated.

I’m trying to grasp the idea behind the line integral for conservative vector fields. If I have some vector valued function $F$ which can be represented as $\nabla f$ then I have a conservative field. Now what I’m not fully comprehending is that why the integral $$\int_C F \ dr$$ is path independent. I’ve looked several explanations for this and the analogy for FTC is quite clear so this makes sense in ”symbolic” form, but all the explanations I’ve seen usually explain this via some physical experiement such as traversing to the top of a mountain and since the gravitational field is conservative the work done to get to the top would be independent of the path I’m taking. I’m not a physicist and even this doesn’t quite make sense, I would assume that the work done from the gravitational field to me would be much greater if I start to go for example up sideways instead of directly walking up the mountain? If work is defined as $W=f \cdot d$ wouldn’t the $d$ be much greater if I’m taking a longer path and thus $W$ would get larger? Is there some other kind of intuition for this that wouldn’t rely so much on physical concepts such as the gravitational, electric or magnetic fields? Edit: Ah perhaps if I’m taking a path sideways the field vectors would be directed towards me at some angle and thus wouldn’t do as much work as if they would be directed right towards me?


I see an eye icon at the top of my screen, but without the phone around it, what does the eye icon mean, just the eye icon.

This icon appears seemingly at random, especially on my lock screen but not always. I can almost guarantee it pops up if I make a screenshot but I am not sure. I am on an LG Volt phone from Boost Mobile, and I was able to (finally) screenshot this icon after wondering about it for over a month.  A screenshot of the image is here:   Any guesses or preferably solid answers to what this could be are very much appreciated! It only appears for a brief moment (sometimes not even a second) before it disappears again.  I want to reiterate I see it most on my lock screen, but there could be other times it happens that I am not noticing.  Thank you in advance for your assistance in identifying what this is!


Being new to C++, I was wondering what the best practices are regarding generic functions. I'm trying to implement a global function that takes as arguments a vector of generic data points, a function that maps one such data point to a different generic type as well as a generic pointer to return the mapped data point:  template <class Parameter_T, class Data_T, class CalculateParameterF> void example(vector<Data_T> data,         CalculateParameterF calculateParameters,         Parameter_T& bestFittingParameters);   Now to my question: If I put the above declaration in a header file and its implementation in a .cpp file, the code won't compile. If I understand correctly, the compiler doesn't understand how it should compile the generic function exactly. In order to give it some hints, I can either leave the implementation body in the header file or add a second declaration filling in the specific types that I want to use it with.  However, both of these solutions seem to be a bit ugly. Are these really the only solutions or am I missing something? If no, what solution should I prefer and why?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


When I open Ubuntu Software, it shows me that there are some updates which have to be done. But after clicking them for several times, the installation process just doesn't work. I also tried to restart.    If I use the Software Updater it tells me this message:    If I click OK, the update ends. If I click settings all options are checked:    This whole update process was really not user friendly developed. Do you know what can be done else? I also tried the terminal sudo apt update sudo apt upgrade, there are still undone updates in the Software Center and the Software Updater!  The output of the terminal is:  W: GPG error: http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E: The repository 'http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04  Release' 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.   PS: Who has marked this as duplicate? The so called duplicate is about why is Ubuntu Software showing these updates? Should I install them? My question is about how to install them? I can't install them because it doesnt work!  SOLUTION: For me the terminal, the software-center etc failed, but Synaptic Package Manger worked! Even if it makes no sense at all, because all these apps do the same thing. I hope Ubuntu could explain this to me.

I'm using Ubuntu 16.04.3 LTS, on a 64-bit system.   There are two available updates in "Updates" section of the Ubuntu Software, named OS Updates and Software respectively:      I usually update through Software Updater utility, (and occasionally used sudo apt update and sudo apt upgrade as recommended by some software installation tutorials)- anything that I think is required. So why is Ubuntu Software showing these updates? Should I install them?  As far as I know, these types of updates, if you look at the list, aren't ever available in the Software Updater.


Short Story: Why and in what way is the list [2*[0]]*2 different from the list[[0, 0], [0, 0]]?  Long Story:  I was trying to do one of the Python Morsels exercises. Very simply: add all values of the same position in multiple lists of lists. The Example given in the question was:  matrix1 = [[1, -2], [-3, 4]] matrix2 = [[2, -1], [0, -1]] >>> add(matrix1, matrix2) [[3, -3], [-3, 3]]   So I gave it a shot and wrote the following code:  def addmorsel(*inputslists):     addlist = [len(inputslists[0][0])*[0]]*len(inputslists[0])     for listoflists in inputslists:         for i,onelist in enumerate(listoflists):             for j,value in enumerate(onelist):                 addlist[i][j] = addlist[i][j] + value     return addlist   But when I use this function on the example matrices it returns [[0, 0], [0, 0]] instead of the right answer. So I printed the returned addlist to see what happens and apparently the line addlist[i][j] = addlist[i][j] + value seems to add the value to every list within a list instead of only the list it is referencing to.   Replacing the addlist creation line addlist = [len(inputslists[0][0])*[0]]*len(inputslists[0]) by addlist = [[0,0],[0,0]] seems to do the job, but I do not understand why, because that is exactly the same as what addlist becomes by the previous line.   I thought: maybe it references the previous list or something, so I also tried addlist = [2*[0]]*2,so replacing the len() functions by their output, but somehow that also gives the wrong answer.   So my basic understanding of python lists is being shook here.  Why is [2*[0]]*2 different from [[0, 0], [0, 0]]?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I don't know what this situation is called when we end up in loss but intention was to save/protect. Example:  I am trying to improve something but made it worse I am trying to fix a thing and broken other

Example sentence - This problem is a _____ which gets complicated every time you try to solve it.   Is there such a word that represents a problem which will become worse if/when one tries to solve it?  Note - After seeing the comments and answers I'd like to add that this is not a can of worms or Pandora's box because it doesn't create a new problem but just worsens.   Example: Magic leaves protecting a fruit by enclosing it. Every time a leaf is touched, all the leaves close together further, that is more tight than before.


In the Android app I can find activity on my questions but I cannot find the questions I have asked either per site, or anywhere but "recent activity". Even if I go to a specific site and look at my profile, it only shows achievements (as far as I can see) not a list of Q&As.  Where do I access this?

The app doesn't have a way to show your own questions. It would be nice to get a quick handle to those.


I have a method with the following signature:      private string SerialiazeObj<T>(T obj)     {           // Do some work     }   Now, I have another method which accepts an object and calls the SerializeObj method, as shown below:      private void callSerializeObj(object obj)     {         Type objType = obj.GetType();         string s = SerialiazeObj<objType>((objType)obj));     }   The object passed to callSerializeObj can be of any type.  Unfortunately, the compiler is giving me this error in the (string s = SerializeObj...) part:  The type or namespace 'objType' could not be found (are you missing an assembly reference).   I don't know if I am calling SerializeObj the correct way.  What is the correct way of calling the method with an object which can be of any type?

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


To upload my skins, I go to the Skindex, click upload and change from minecraft.net. I've never had any trouble doing this until 3 days ago...  My skin changes perfectly fine when I join some servers, but when I join a mini-game, like in  or other servers with mini games, my skin changes back to default. It remains that way when I exit the mini-game too! On some servers, my skin won't change at all. It stays default. Why is this? I've tried downloading the skin and then uploading it to minecraft.net. But that doesn't help... I've tried different skins too. They all go back to steve. I can't wear any skins...

I made a skin by using Skincraft and I exported it to minecraft.net. I chose my skin and uploaded it. At the top it says,      "Your skin has been changed! Please wait a few seconds for it to   update."   I went to Minecraft, clicked singleplayer and chose a random world at the top. I looked at my character, but it's still default. Multiplayer won't load for some reason. I don't know what I've done wrong!


I'm currently saving request parameters of API calls into a MySQL table for logging purposes.  I'm using the following.   $log->info('Request', var_export($request->get_params(), true))   Also, one of the parameters is a JSON string.  Should I escape each parameter individually for security purposes before writing to the database?  Thanks,

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I'm looking to purchase a compact camera that has all the common features e.g. portrait, landscape, video etc. But can also allow me to take pictures of stars and city lights, and will allow close close up shots (e.g. single flower).   I relatively new to photography, so I'm not looking for the best out there, but I don't want a cheap one either. I'm looking for one in the middle in terms of the ratio of image quality to price.  Currently I am looking at the Canon s120, Canon G series (trying to figure out which one would be for me), Sony DX100 (but i'm not sure which one to buy as I see there are multiple versions, and the latest one isn't always the best one), but would love for some help on which cameras I should look into or opinions on the listed cameras.

I need a new camera! My Canon IXUS is now very old. What I want to be able to do is take photos of the night sky (stars, moon, planets) and the sun. Well, ideally! I have been looking at a bridge camera that sounds okay in theory but don't really want to have anything quite so big...so, is there a compact camera that would suit my needs. I gather I will need a tripod as well. I appreciate any help, so thank you:-) Oh, and it'd be great if I could take good photos of little things, too! e.g. jewellery.


In normal tickets, it would get all of your subsequent flights invalid once you miss a flight in the midst of the whole itinerary. How about the case on the RTW ticket?  Usually the RTW ticket doesn't allow you to change the route, but allows you to change the date of the flight. If you miss a flight, can you change the date of the (missed) flight after the departure date?  Or can I buy a separate ticket by myself to make up for the missed flight and resume the remaining part of the itinerary from the next city onward?  If the specific program is required, it is the Star Alliance award ticket redeemed on ANA mileage program. But I would like to get a generic answer, if possible.

I am considering using a RTW ticket but I wonder what happens if I get denied entry for a country in the midst of the whole itinerary.  Usually these programs set a rule such that once the itinerary is decided or once the trip started, you cannot change the route, yet you can change the date for free.  In this case, if you are denied an entry for a country, will you get deported to the departure country or to the next (or another) country by changing the date of the next flight at the border control? And is the subsequent itinerary still valid or does the one denial make all of the subsequent flights invalid?  If the specific program is required, it is the Star Alliance RTW redeemed on the ANA mileage program. But I would like to get a general answer, if possible.


Let $f : \mathbb{R} \to \mathbb{R}$ be a continuous and differentiable function. If $\lim_{x \to \infty} ((f'(x))^2 + f^3(x)) = 0$, prove that $\lim_{x \to \infty} f(x) = 0$.  Here is what I did so far:  $\lim_{x \to \infty} ((f'(x))^2 + f^3(x)) = (\lim_{x \to \infty} f'(x))^2 + (\lim_{x \to \infty} f(x))^2 \cdot \lim_{x \to \infty} f(x) = 0$  From this, we can conclude that $\lim_{x \to \infty} f(x) \leq 0$.  Now, I need to prove that $\lim_{x \to \infty} f(x)$ can't be negative, but I didn't figure out how to do this yet.  Thank you!

Question:     Let $f$ be differentiable on $[0,+\infty)$, such as$$\lim_{x\to+\infty}\left([f'(x)]^2+f^3(x)\right)=0$$show that $$\lim_{x\to\infty}f(x)=\lim_{x\to\infty}f'(x)=0$$   I think this problem is similar to  and (the  background)  For my problem I guess that if  $$\lim_{x\to+\infty}\left([f'(x)]^{2m}+f^{2n+1}(x)\right)=0,m,n\in N^{+},n,m>1$$ then we have $\lim_{x\to\infty}f(x)=\lim_{x\to\infty}f'(x)=0$.


From a pdf of n pages, how to reduce by half the number of pages by merging several pages on a single page? Each pair of pages from the old pdf should be found side by side on the new pdf.

Say I start off from a PDF document, say of 12 pages, viewed with evince.  To produce another PDF of 6 sheets, with a page setup of two pages per side,  I normally use the "Print to File" device listed in the ^P dialogue window. This works out pretty neatly.  I would like to translate this operation for the command line.    To my understanding, this is not an operation that pdftk can do. Please cross check. The  command lp, which would accept the option -o number-up=2, does not recognize any device called "Print to File", which indeed does not show up in lpstat -p -d. I am aware of the post . I have installed cups-pdf whereby a new printer named PDF is acknowledged. However, the print quality of a simple text file is way too raw (for example, no print margins to start with). Moreover, if I reprint an existing PDF file on this device, say lp -p PDF existing.pdf, evince can't even manage to open that copycatted output, while this is not the case with the "Print to File" way. I had a look at man evince. At the bottom, it touches upon a few print preview options and redirects to a . Admittedly I am not able to make sense and use of it.    Is there actually a way to combine the flexibility of the command line with the print quality that I obtain from that "Print to File" option in the GUI  evince?   My test case, again, would be to create from the command line a PDF out of a source document printed with two pages per sheet.  Thanks for thinking along.