I am trying to make a matrix with all the distances from 4000 objects to 1000 other objects. I used the Generate Near Table and deselected "find closest option only". The output is table with 4 million rows. However I need it in excel in a 4000x1000 matrix.   Does anyone have an option to do this quick? Without creating 4 different excel tabs (maximum number of rows is 1 million) and using something like a INDEX MATCH function (this takes 24 hours to calculate per tab).  If you only need the closest feature, you can simply join the table. However, that doesn't work in this case.  Can anyone help me?  I have ArcGIS 10.1 and 10.2 and the object sets are both point polygons. I have spatial analyst.

I would like to shift data found in a column to a row by Key field. I have a table, within a geodatabase, set up similar to what's below.  KEY_    Value 123     Yellow 123     Blue 456     Red 456     Yellow 789     Green 246     Green 246     Orange   I want to create a table that moves the data in the Value field to rows based on the KEY_ field. The result will look like what's below.  KEY_    Value001    Value002 123     Yellow      Blue 456     Red         Yellow 789     Green 246     Green       Orange   Does anyone have an idea of how this can be done? I tried using the Transpose tool Esri offers but it didn't produce the result I'm looking for. I have basic understanding of Python.


I would like to know what combination of ingredients resulted in the formation of Proto-Adamantium?

Captain America is able to throw his circular shield and have it return it to him like a boomerang.  Is this even possible according to physics (especially considering the ranges at which he uses the shield)?


I am solving a series of ODE, such that each DE is equal to some degree of term that I'm expanding to. For instance, one DE is this:  $\xi^r\partial_r g_{rr}+2g_{tt}\partial_t\xi^t=\mathcal{O}(r)$  $g_{ii}$ are given, from metric, but that's not important. I need to assume that the solution (since I'm looking for components of $\xi^\mu$, which is a vector with components $\xi^t,\xi^r,\xi^\phi$) is given with power series of the form:  $\xi^\mu=\sum\limits_{n}\xi^\mu_n(t,\phi)r^n$, and this is to be seen as expansion around $1/r$ (expansion around $r=\infty$).  Now when I plug this in the ODE I get this  $\frac{2}{l^2}\sum_n\xi^r_nr^{n+1}+2\sum_n\xi^t_{n,t} r^n+\frac{2}{l^2}\sum_n\xi^t_{n,t}r^{n+2}=\mathcal{O}(r)$, where   $\xi^\mu_{n,i}$   is the derivative with the respect to i-th component.   What troubles me is, how to expand this? Do I set n=0,-1,-2,... until my $\mathcal{O}(r)$ terms cancel each other out? Or?  I'm kinda stuck :\

Since on Mathematics stackexchange I didn't get an answer, I'll try it here, since people here are more familiar with this topic (general relativity related).  I am reading a dissertation of Porfyriadis "Boundary Conditions, Effective Action, and Virasoro Algebra for $AdS_3$", and I am trying to solve a system of DE to get the appropriate diffeomorfism (page 31 onward).  I am trying to solve a system of ODE, such that each DE is equal to some degree of term that I'm expanding to. For instance, one DE is this:  $\xi^r\partial_r g_{rr}+2g_{tt}\partial_t\xi^t=\mathcal{O}(r)$  which you get by taking a Lie derivative of background metric and setting it equal to certain $\mathcal{O}(r^n)$ terms.  $g_{ij}$ are given, from metric ofc. I need to assume that the solution (since I'm looking for components of $\xi^\mu$( which is a vector with components $\xi^t, \xi^r, \xi^\phi$) is given with power series of the form:  $\xi^\mu=\sum\limits_{n}\xi^\mu_n(t,\phi)r^n$,  and this is to be seen as expansion around 1/r (expansion around $r=\infty$).  Now when I plug this in the ODE I get this  $\frac{2}{l^2}\sum_n\xi^r_nr^{n+1}+2\sum_n\xi^t_{n,t} r^n+\frac{2}{l^2}\sum_n\xi^t_{n,t}r^{n+2}=\mathcal{O}(r)$, where  $\xi^\mu_{n,i}$  is the derivative with the respect to i-th component.  What troubles me is, how to expand this? Do I set n=0,-1,-2,... until my O(r) terms cancel each other out? Or?  I'm kinda stuck, at this seemingly easy point.  In the thesis he gets 6 equations with coefficients, first one should be:  $\xi^r_{n-1}+l^2\xi^t_{n,t}+\xi^t_{n-2,t}=0,\ n\ge 2$,  But I am not getting this. What am I doing wrong?    EDIT: For further clarity: The metric is that of $AdS_3$ given with line element:  $ds^2=-\left(1+\frac{r^2}{l^2}\right)dt^2+\left(1+\frac{r^2}{l^2}\right)^{-1}dr^2+r^2 d\phi^2$,  and the differential equations in question are given by solving $\mathcal{L}_\xi g_{\mu\nu}=\mathcal{O}(r^n)$, where $\mathcal{O}(r^n)$ are the fall off conditions. In the dissertation, he took the deviation of nonzero components of the metric to be subleading, that is:  $\mathcal{L}_\xi g_{tt}=\mathcal{O}(r)$ $\mathcal{L}_\xi g_{rr}=\mathcal{O}(r^{-3})$ $\mathcal{L}_\xi g_{\phi\phi}=\mathcal{O}(r)$, while others are $\mathcal{O}(1)$.  Solving Lie derivative gives me 6 equations, which I should solve by plugging in the above ansatz ($\xi^\mu=\sum\limits_{n}\xi^\mu_n(t,\phi)r^n$), but this is the part I get stuck.  ADDENDUM:  I was looking at other components, and have noticed that I have $g_{rr}$ factor with some of them. That term in metric is:  $g_{rr}=\left(1+\frac{r^2}{l^2}\right)^{-1}$  Now, is it legitimate thing to expand this around $r=\infty$ so that I can put $r$ terms inside the sums (assumed solution)?


I am looking for a "local Dropbox" to sync files between local and server. For complex reason I couldn't install Dropbox on the server. I thought about  but it doesn't work bi-directionally.  After researching a bit, my current solution is: having Dropbox running on local machine, and  with some  deployed on the server. This is the best "local Dropbox" I could build without spending huge effort.  It works but with a bit high maintenance plus it crushes sometimes, so I'm looking for a simple and stable solution to sync file between local and server, bi-directionally. Consider speed and efficiency not a problem, 10X sync time compared with dropbox is acceptable (in LAN environment).  note: git is not an option as I would sync git repository and sometime media files between machines.

I am trying to setup bi-direction or two way sync with rsync. In my case I only need to delete the files when syncing from B to A. So, I was thinking of running rsync twice as follow :  rsync -rtuv ./A/ ./B/ rsync -rtuv --delete ./B/ ./A/   This problem with this solution is that when I run rsync (B->A) which would be right after running the rsync (A-B), Any new file that get created in between the sync will also get removed.  Is there a way I can specify a time stamp as condition that it only delete the file if it created before this date/time.  Updated:  I understand there is a unison solution but the problem with unison is required to install on both ends. I am syncing with a remote server and I can not install unison on the remote end.


How can I insert .tiff figures in a Latex document(PDf latex document). I have tried everyting I found in web but nothing.  Please

There several types of graphics files. In no particular order .jpeg .eps .pdf .png .tif .jif (and no doubt others). Some work with latex, dvips and some work with pdflatex. How am I supposed to know which?  Just to confuse matters, metapost produces .eps but I can use these with pdflatex as long as I put in a four line incantation.  Can anyone explain this?


I'm working with population data. I want to divide the population value (labeled in the orange square)in the polygons inside it (blue polygons).  Any ideas?

So, I have a polygon that contains the population number. Another polygon is a zone polygon. I need to approximate population from the first polygon to zones polygon, but based on intersection percent.  Here is an example. Purple polygon contains population data. Now, how to split for example population of 64 to other polygons based on the percent of their intersection. I tried to use ratio policy on a polygon with population data, then clip it with other polygon, but with no luck.


I'm starting now to modelling in blender, I was trying to create an hexagon, as everyone do, I searched on YouTube and here I understood that you need to do 3 simple steps:  Add a cylinder Click on the menu in the left bottom part of the screen Reduce the number of vertices  And the magic is done, but for some reason my add menu doesn't work properly, as you can see in the photo it seems impossible to change the properties and the first time i click on it, it disapears!

When adding a UV Sphere mesh in Blender 2.8, the creation parameters menu on the bottom left of the attached image for this UV Sphere seems to be greyed out. Any idea why this might be? Thanks.


It seems like certain links from SE sites to certain other sites get implicitly converted -- or used to be -- to links of the format http://rads.stackoverflow.com/site_name/click/token_number_thingy.  An example is . It links to , which, after making SE a hundred-thousandth of a cent, redirects me to .  What are these, and where can I find more information about them? Are the posters making a profit by using them?

We have officially discontinued the Amazon book affiliate remnant ads, since despite our best efforts they don't perform well for our audience and cannot be made to perform well.  We've often wondered,   I'm thinking this isn't a problem; it has gotten lots of support historically. So we're going to go ahead and do it, so the company Amazon account is still getting some use, and we benefit a little.   To be clear: from this point on, all Amazon links posted on all sites will automatically be rewritten to add our affiliate link. We have a clever affiliate redirect that geolocates the IP address and redirects to the appropriate regional Amazon store (amazon.uk, amazon.ca, et cetera).  If you have any feedback on this, or suggestions, as they say … speak now or forever hold your peace!


let's say I have an ADC with a full scale input from 0V to 2.1V. I want to protect the input of the ADC from voltages > 2.1V. I thought about using 3 diodes like shown below. Each diode has a breakdown voltage of 0.7V: When I use this circuit the ADC should be protected from voltages > 2.1V, right? Is their maybe a better way to protect the ADC inputs?

Say you were wanting to measure a signal with a higher voltage than the ADC could handle. Is there some best practice or commonly used circuitry that goes beyond a simple voltage divider to protect the ADC?   Or is it common for professional designs to simply rely on a voltage divider?


Well till now I don't think that there is any clear cut distinction between thermodynamic work and mechanical work. If there is any difference between these two terms please give some answer  So the thing is for thermodynamic work can I use this equation which says  W = -∆U where W= Work and ∆U=Change in Potenial Energy.  So can I use it or not to use it?  If the equation do not stands for thermodynamic work then please give a described reason(not compulsory just want to know is the equation good or not)  Thanx

What is the difference between  in thermodynamics and  in mechanics?


I have been trying for a long time to get this basic bit of code to work in a shell script, but to no avail, the code doesn't work!  read dec if [ dec="Y"]||[dec="Y"]||[dec="y" ]; then let repeat=1; else let repeat=0; fi done

I wrote that script but if I run it I get this output:  ./autotex: line 7: syntax error near unexpected token `then' ./autotex: line 7: `            then'   The script is:  #!/bin/bash  while [ $key = "q"]; do          dateTex = grep $1.tex| cut -b 43 - 54         datePdf = grep $1.pdf| cut -b 43 - 54         if[$dateTex !eq $datePdf]         then                 pdflatex $1.tex         fi          read -t 1 -n 1 key  done


I need soup help. I am unable to make a homemade soup with pasta. If I make chicken noodle I have to add cooked noodles just before we eat it. Otherwise all my soups turn out like a goulash. The pasta absorbs all the water .   Today I cooked a very tasty, successful, tomato based, beef macaroni soup with zuchini.... o.m.g. yum! It did look like soup at one point. And I'm so glad I snuck a bowl while it was soup cuz I turned the burner off to let it cool, came back to goulash. No more soup. Ugh!  I've also failed at freezing left over homemade chicken noodle soup. The pasta turns to mush.  It sure tastes good. But not what I wanted Help!? Thanks guys!

Is there any way to add pasta to soup without the pasta doubling in size and getting mushy in the fridge later.I've even tried putting uncooked pasta in with the same result.


I'm trying to install a driver for my graphics card in Ubuntu 16.04, and the instructions caution me that first I should set a runlevel that prevents X from starting. That's proving difficult.  The generic Linux instructions say that one sets the runlevel by editing /etc/inittab, but my Ubuntu system has no such file. I looked for Ubuntu instructions and learned that to display the runlevel I can enter runlevel, and to change it I can either enter sudo init  or edit the line in /etc/init/rc-sysinit.conf that begins "env DEFAULT_RUNLEVEL..."  I entered runlevel and got '5', which made sense. I then entered sudo init 3. Ubuntu blanked the screen, displayed a couple of lines of text, and stopped. I hit reset and it came back in X, just as before.  I then opened the conf file to change "env DEFAULT_RUNLEVEL" from 5 to 3, and found that it is set to 2.  This is craziness. I'm wandering farther and farther from the straight path to my goal, and none of the promised helpers are waiting where I've been told to look for them. How do I get past this point?

Is it possible to disable X at boot time? I'm setting up a server so it would be nice if it wouldn't load the graphical interface every time I boot.


I have seen discussion both ways: for example, for an Exeggutor, it is Grass/Psychic type, so, will the STAB make it 25% more powerful or just 12.5% more powerful, since Solar Beam is a Grass type move but Exeggutor is both Grass and Psychic type?  For example, , when Exeggutor is only half Grass type.  I also have heard that if the Pokemon is dual-type, then the effect is divided by two.  On the other hand, what if it is a Psychic attack done towards this Exeggutor, and it is "not very effective"? Is it not effective just as if the attack is done to a pure Psychic Pokemon (like Hypno), or is it just half not-effective?  (please back up your answer with facts, reference, or experiences).

Various cases here:   Bulbasaur is of type Grass and Poison, but Flying attack is only Super Effective against Grass type pokemon. What is an attack bonus in this case? 25%? 12.5% (average of two types)? Bulbasaur is of type Grass and Poison, but Ground attack is Super Effective against Poison type pokemon AND Not Very Effective against Grass type pokemon. What is an attack bonus in this case? 25%? 0% (they cancel-out)? Charizard is of type Fire and Flying, but Rock attack is both Super Effective against Fire and Flying type pokemon. What is an attack bonus in this case? 25%? 50% (they add up)?


I have a Galaxy Nexus phone.   I want to install JellyBean manually, but I don't know which one of  I should download. How do I know if my phone is maguro, toro or toroplus?

There have been some Jelly Bean updates for Galaxy Nexus, but most of these are specific to a certain variant of the Nexus. How can I easily find out which variant I have?


Let $a,b,c\in \mathbb{R}$. We want to find $x,y,z,w$ in the following equations(according to $a,b,c$):  $$\begin{align} x^{2}+y^{2}+z^{2}+w^{2}&=1 \tag{1}\\ x^{2}+y^{2}-z^{2}-w^{2}&=a \tag{2}\\ xw+yz&=2b \tag{3}\\ yw-xz&=2c.\tag{4} \end{align}$$  (In my other , that problem had a condition. But in this post, there is not.)


I would like to know if there is any way possible to organize Desktop Icons in Ubuntu 20.04. For example, if I delete certain icons from the desktop which were initially organized, there is no one-click way of aligning them back again.  Back in Ubuntu 17 I could do that following this method:  But after the upgrade, I could use a pointer as to how to achieve this. Thank you!

the option in Ubuntu 18.04 is "Organize Desktop by name"    But there is no option available in Ubuntu 19.10


What's the value of $$i^{i^{i^{...}}}$$?  I tried to take log on both sides.    $x=i^x$  $\implies \log x=x \log i$  After this how can I solve this... I am sorry, that I don't know the methods you are explaining... And more over that the question is in school level only..

If $w = z^{z^{z^{...}}}$ converges, we can determine its value by solving $w = z^{w}$, which leads to $w = -W(-\log z))/\log z$.  To be specific here, let's use $u^v = \exp(v \log u)$ for complex $u$ and $v$.  Two questions:   How do we determine analytically if the tower converges?  (I have seen the interval of convergence for real towers.) Both the logarithm and Lambert W functions are multivalued.  How do we know which branch to use?   In particular $i^{i^{i^{...}}}$ numerically seems to converge to one value of $i2W(-i\pi/2)/\pi$.  How do we establish this convergence analytically?  (Yes, I have searched the 'net, including the tetration forum.  I haven't been able to locate the answer to this readily.)


I try to construct a breath first search relationship(BFS) by using a txt file. It works perfectly when the BFS size is small(eg. 7nodes), but NullPointerException appears when the BFS size is big(eg. 20000nodes). I've already read some posts about NullPointerException, but I still have no idea on how to solve it.    The exception message:  Exception in thread "main" java.lang.NullPointerException         at GraphAdjacentList.setEdge(GraphAdjacentList.java:16)             at GraphAdjacentListDemo.main(GraphAdjacentDemo.java:52)   There are 7 nodes, then each line shows the relationship of two nodes. The format of the txt file:  7 1 2 1 3 1 4 4 5 4 6 5 7   My code:  import java.util.*; import java.io.*;  public class GraphAdjacentListDemo{ /* to build an adjacentList */ final private Map<Integer, List<Integer>> Adjacent_List; public GraphAdjacentListDemo(int numberOfVertices){     Adjacent_List = new HashMap<Integer,List<Integer>>();     for(int i=1;i<=numberOfVertices;i++){         Adjacent_List.put(i,new LinkedList<Integer>());     } }  public void setEdge(int source,int destination){     List<Integer> sList = Adjacent_List.get(source);     sList.add(destination);     List<Integer> dList = Adjacent_List.get(destination);     dList.add(source); }  public List<Integer> getEdge(int source){     return Adjacent_List.get(source); }  public static void main(String args[]) throws Exception{     /* to import a node source file */     File f = new File("/Users/apple/Desktop/Graph_Sample.txt");     List<Integer> source = new ArrayList<Integer>();     int count=0;     Scanner sc = new Scanner(f);       while(sc.hasNextInt()){         int i=0;         i = sc.nextInt();            source.add(i);         count++;         }         sc.close();      /* to store nodes into source_array and destination_array */     int time=(count-1)/2;     List<Integer> sourceList = new ArrayList<Integer>();     List<Integer> destinationList = new ArrayList<Integer>();     for(int i=1;i<=time;i++){         sourceList.add(source.get(1+2*(i-1)));         destinationList.add(source.get(2+2*(i-1)));     }      GraphAdjacentList adjacentList = new GraphAdjacentList(source.get(0));     for(int i=0;i<sourceList.size();i++){         adjacentList.setEdge(sourceList.get(i),destinationList.get(i));                  }      System.out.println("The graph is:\n");     try{     for(int i=1;i<=source.get(0);i++){         System.out.print(i+"-->");         List<Integer> edgeList = adjacentList.getEdge(i);         for(int j=1;;j++){             if(j != edgeList.size()){                 System.out.print(edgeList.get(j-1)+"-->");             }else{                 System.out.print(edgeList.get(j-1));                 break;             }         }         System.out.println();         }     }catch(InputMismatchException inputMismatch){}   }  }

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 don't quite understand what does equal mean for morphisms in category theory. Since object of a category is not necessarily a collection of some elements, then how to decide whether two morphisms are the same or not? Is it allowed that for some category $C$, there exist two different morphisms $f,g$, but for any possible  h which is not a identity morphism, $f\circ h = g\circ h$ and $h\circ f = h\circ g$ (so that there does not exist any monic or epi morphisms in this category, and any objects $a$ of this category do not have any structure such as $x \in a$)? Or we can never know it?

I am learning basics of the category theory (CT).  I do understand that CT is a modern powerful framework to describe various branches of mathematics in a unified way.  I do admit that category's definition tells a lot about the whole thing and focuses on the most important properties, shadowing unnecessary details. However, the more I go forward, the more it feels like it should explicitly require a notion of morphisms equality (like it does with morphism composition). It feels so because equality or inequality of morphisms arises everywhere, since the very beginning: any commutative diagram eventually reduces to an equality of two different paths and many other things involve equality as well. Even composition is defined grounding upon an (implicit) equality!  I'll try to give an example of my concern. Consider $\mathbb{SET}$. Its objects are sets and morphisms are functions. Now, let's recall that functions are sets as well - to be more precise, a function $f : A \mapsto B$ is a subset of a $A \times B$ obeying certain properties, which I omit. Thus, one could argue that $f$ is both a morphism between objects $A, B \in Obj(\mathbb{SET})$ and an object defined as a set of pairs $\{ (a_1 \in A, b_1 \in B), ..., (a_n \in A, b_n \in B) \}$ and those are equal because both are essentially exactly the same thing.  I hope my concern is clear and I need some kind of "conceptual insight" from knowledgeable people to move forward. Please give me the right perspective.


I have a Schengen visa valid for 30 days with 14 days stay. This was as per itinerary planned by me. In my return trip I will be traveling from Frankfurt to Bangalore via Paris.  Suddenly my connecting flight from Paris to Bangalore has been cancelled and I have been accommodated by airline in next day's flight. But my visa is not valid for that additional day and it will be 15th day in Schengen area.  Please advise.

My daughter applied at the Italian Consulate in Philadelphia, and they gave her two entries for 20 days (we thought it was for 20 days each entry). She was in Italy 12 days, then went to England for 1 week and flew to Venice to take a 10-day cruise. She couldn't make it because they said she has only 8 remaining days, but she still has a land tour already paid this week.  What can she do? Can she extend the Schengen visa for 12 more days? Right now, she is in Madrid, but next week she has to fly from Barcelona to Paris to start with the tour. What would happen if she decides to take the tour with the expired visa? She is a US permanent resident.


The value of array elements are getting changed while calling a static method with the parameter passing the same array as argument but primitive value does not get changed Is it work differently in the case of while we pass data structure as method argument ? Want to know why array element get changed after the method call with the array .. I was expecting value 0 in the last syso statement instead of 999 public class TestStatic {          public static int square (int x)     {         x = x + 1;         return x * x;            }      public static int[] changeArr(int a[])     {         a[0] = 999;         return a;     }          public static void main(String[] args)     {         int a = 10;          System.out.println((square(a)));         System.out.println(a);          int arr[] = {0,0};         changeArr(arr);         System.out.println(arr[0]);     } }  Actual Output: 121 10 999   I was expecting 121 10 0

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


in text documents clustering when k-means using as base algorithm, and VSM is a matrix for doc-term weighted by tf-idf, what is the best metric can be used for select an optimal initialization points (seed points ) where clustering procedure starting from these points ?

If I have a certain dataset, how smart would it be to initialize cluster centers using means of random samples of that dataset?  For example, suppose I want 5 clusters. I take 5 random samples of say, size=20% of the original dataset. Could I then take the mean of each of these 5 random samples and use those means as my 5 initial cluster centers? I don't know where I read this but I wanted to know what you guys think about the idea.    UPDATE: Please see this thread  for the general discussion about the various initialization methods.


Let $f$ be an analytic function on $D(0, 1)$ and continuous on $\overline{D(0, 1)}$.    We assume that $f \equiv 0$ on the $arc$ defined by {$e^{i\theta},  0\le \theta_1 \lt \theta \lt \theta_2 \le 2\pi$}. $\quad$ prove that $f= 0$ on $D(0, 1)$.

How I can solve this problem:  Let $f: D \to D$ be an analytic function where $D$ is the unit open disc in $\mathbb C$. Suppose there is a positive number $\delta > 0$ such that ,  $$\lim_{z \to e^{iθ}} f(z)= 0; \qquad \forall \ |\theta| < \delta.$$   Show that $f \equiv 0$ on $D$.   Thanks  Note: An easier version of this  is an exercise problem from Stein and Shakarchi's Complex Analysis textbook which additionally assumes the holomorphic function converges uniformly to $0$ on the portion of the arc. See , , . The absence of this 'uniform' non-tangential limit on the portion of the arc makes it a slightly more difficult problem.


I received a text message from someone who I have never texted/talked with previously (not on phone, social media, email, anything). For some reason, their name shows up in Messages yet when I try to access the contact info page, there is no number (or any other info for that matter) provided.   How can the phone detect a person's name (still in my messages) but not have the number? Especially since I have never had any contact with this person before?   EDIT: After some research, it appears that this is a fairly common scam. The scammer sends a text message that includes an e-mail in attempt to pull more information out of you.   Still, how is it possible for them to send an undetectable message to me? And why does my iPhone give them a name (which can potentially put them on "friendly" terms)?

I am receiving an SMS from Info on an iPhone running iOS 13. There is no contact Info in my address book. Does this perhaps mean that the sender suppresses her address/telephone number? Or what else can cause this?  UPDATE I should clarify that the exact scenario is as follows: I'm sending an SMS to a phone number; for what I know there is a person at the other end. A few minutes later the response arrives from Info (e.g. hence the iOS Messages app shows it in a new thread, which is somewhat inconvenient.)


In bash  echo {{a,b}.{c,d}}  expands to  {a.c} {a.d} {b.c} {b.d}  Though nothing is mentioned for brace expansion in bash manual for the type of input I have made   My question is why the output is not like this a.c  a.d  b.c  b.d

I was trying to concatenate text files in sub-folders and tried:  cat ./{mainfolder1,mainfolder2,mainfolder3}/{subfolder1}/book.txt > out$var   However this did not return anything. So, tried adding a non existing 'subfolder2'  cat ./{mainfolder1,mainfolder2,mainfolder3}/{subfolder1,subfolder2}/book.txt > out$var   And this time it did work out, concatenating the files successfully. Why does this happens?


I have this line:  Directory.Delete(outputfiles, true);   If I set it to true then it should also delete subdirectories and files. Now I checked that the directory is empty so it will be deleted next time. But before the exception in this directory I had another 4 subdirectories and in one of them I had a zip file of about 7 Mb size.  System.IO.IOException was unhandled   HResult=-2147024751   Message=The directory is not empty.    Source=mscorlib   StackTrace:        at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)        at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)        at Diagnostic_Tool_Blue_Screen.CreateDirectories.CreateDirectoriesAtConstructor() in d:\C-Sharp\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\CreateDirectories.cs:line 35        at Diagnostic_Tool_Blue_Screen.Form1..ctor() in d:\C-Sharp\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\Form1.cs:line 125        at Diagnostic_Tool_Blue_Screen.Program.Main() in d:\C-Sharp\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\Diagnostic Tool Blue Screen\Program.cs:line 19        at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)        at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()        at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)        at System.Threading.ThreadHelper.ThreadStart()   InnerException:

I'm using .NET 3.5, trying to recursively delete a directory using:  Directory.Delete(myPath, true);   My understanding is that this should throw if files are in use or there is a permissions problem, but otherwise it should delete the directory and all of its contents.  However, I occasionally get this:  System.IO.IOException: The directory is not empty.     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)     at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)     at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)     ...   I'm not surprised that the method sometimes throws, but I'm surprised to get this particular message when recursive is true.  (I know the directory is not empty.)  Is there a reason I'd see this instead of AccessViolationException?


I defined an objective-C method which expect an arbitrary set of parameters  - (void)logString:(NSString *)format, ... {     __block va_list argList;     va_start (argList, format);     NSString *formattedString = [[NSString alloc] initWithFormat:format arguments:argList];     va_end(argList);     NSLog(@"[ProCheck] %@", formattedString); }   If I call directly this method everything works fine. Now I need to call this method from a method which take the same set of parameters:  - (void)doSomethingAndLogString:(NSString *)format, ... {     <my code doing something>     __block va_list argList;     va_start (argList, format);     [self logString:format, argsList];     va_end(argList); }   But it result in a runtime exception EXC_BAD_ACCESS .  I think I might be wrong with object retain cycle, any clue?

Say I have a C function which takes a variable number of arguments: How can I call another function which expects a variable number of arguments from inside of it, passing all the arguments that got into the first function?  Example:  void format_string(char *fmt, ...);  void debug_print(int dbg_lvl, char *fmt, ...) {     format_string(fmt, /* how do I pass all the arguments from '...'? */);     fprintf(stdout, fmt);  }


Trying to update my Manjaro system, I get "error: failed to commit transaction (conflicting files)" This is pacman's output: ~> sudo pacman -Syu  Total Download Size:    4269.83 MiB Total Installed Size:  17929.01 MiB Net Upgrade Size:       1517.05 MiB  :: Proceed with installation? [Y/n]  :: Retrieving packages...  iana-etc-20200720-1-any                         390.3 KiB  3.81 MiB/s 00:00 [############################################] 100%  filesystem-2020.05-1-x86_64                      21.1 KiB  3.44 MiB/s 00:00 [############################################] 100%  glibc-2.31-5-x86_64                               9.8 MiB  5.13 MiB/s 00:02 [############################################] 100% ...  lib32-libva-mesa-driver-20.1.4-1-x86_64           2.6 MiB  3.50 MiB/s 00:01 [############################################] 100%  lib32-mesa-demos-8.4.0-2-x86_64                 107.8 KiB  2.85 MiB/s 00:00 [############################################] 100% (1363/1363) checking keys in keyring                                         [############################################] 100% (1363/1363) checking package integrity                                       [############################################] 100% (1363/1363) loading package files                                            [############################################] 100% (1363/1363) checking for file conflicts                                      [############################################] 100% error: failed to commit transaction (conflicting files) cmake: /usr/share/bash-completion/completions/cmake exists in filesystem cmake: /usr/share/bash-completion/completions/cpack exists in filesystem cmake: /usr/share/bash-completion/completions/ctest exists in filesystem Errors occurred, no packages were upgraded.  During the process, when asked whether to swap a package with another one, I always picked the default action. What do those errors about cmake at the end mean? How can I update my system?

When installing a package with pacman, I am seeing:  error: failed to commit transaction (conflicting files) station: /usr/bin/station exists in filesystem   How do I tell pacman to install the package anyway, overwriting the existing file(s)?


This isn't really a big problem because I know I can just use a for loop but basically I have a folder with 20 images all named "Image1", "Image2", etc...  Then I wanted to add them as an attachment to an email in order using this code...  foreach (var Image in ImageFilePaths) {     Message.Attachments.Add(new Attachment(Image));     Console.WriteLine(Image); }   pretty simple, it adds them all but in the order of 1, 10-19, 2, 20, 3-9. I get why as its kind of going from smallest to biggest in a weird way, but I wanted straight up 1-20. I'm just looking for a quick fix as I know if it comes to it I can just use:  int imagecounter = 1; for (int i = 0; i >= 20; i++) {     //add image path + imagecounter + jpg;     imagecounter++ }

Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts.


Let $z_1$ and $z_2$ $\in \Bbb C$. Prove that $z_1z_2$ = $z_2z_1$.  Proof : For two complex numbers to be equal, they must have the same real and imaginary parts. First let's define $z_1$ and $z_2$ $$z_1= a+bi$$$$z_2= x+yi$$ Where a,b,x,y $\in \Bbb R$ $$z_1z_2=(a+bi)(x+yi)$$ $$ax+ayi+bxi-by$$ Thus $Re(z_1z_2)=ax-by$ and $Im(z_1z_2)=(ay+bx)$. $$z_2z_1$$ $$(x+yi)(a+bi)$$ $$ax+bxi+ayi+byi^2$$ $$ax+(bx+ay)i-by$$ $$ax-by+(bx+ay)i$$ Now $Re(z_2z_1)=ax-by$ and $Im(z_2z_1)=(ay+bx)$. This shows that the complex numbers, i.e the products are equal. Correct?

I have just started self-studying Linear Algebra after a 3 year hiatus from mathematics (in an extended neuroscience foray), and I want to ensure that I am sufficiently verifying commutativity of complex numbers by using the properties of real numbers.  My attempts...  (1) Commutativity of Addition:   Verify that $w + z = z + w$ for all $w, z \in \mathbb{C}$.  $$w + z = (a + bi) + (c + di) \hspace{10mm}\text{by definition of }\mathbb{C}$$ $$\hspace{13mm} = a + (bi + c) + di \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{17mm} = a + (c + bi) + di \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{16mm} = (a + c) + (bi + di) \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{19mm} = (c + a) + (di + bi) \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{13mm} = c + (a + di) + bi \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{17mm} = c + (di + a) + bi \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{17mm} = (c + di) + (a + bi) \hspace{11mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{13mm} = z + w \hspace{34mm}\text{by definition of }\mathbb{C}$$  $$\blacksquare$$  This seems a bit verbose to me - is it acceptable to combine steps? For example, rather than:  $$w + z = (a + bi) + (c + di) \hspace{10mm}\text{by definition of }\mathbb{C}$$ $$\hspace{13mm} = a + (bi + c) + di \hspace{10mm}\text{by associativity in }\mathbb{R}$$ $$\hspace{17mm} = a + (c + bi) + di \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ can I instead write: $$w + z = (a + bi) + (c + di) \hspace{10mm}\text{by definition of }\mathbb{C}$$ $$\hspace{48mm} = a + (c + bi) + di \hspace{10mm}\text{by associativity and commutativity in }\mathbb{R}$$?  (2) Commutativity of Multiplication:  Verify that $wz = zw$ for all $w, z \in \mathbb{C}$.  $$\hspace{-14mm}wz = (a + bi)(c + di) \hspace{24mm}\text{by definition of }\mathbb{C}$$ $$\hspace{4mm} = a \cdot c + a \cdot di + bi \cdot c + bi \cdot di \hspace{10mm}\text{by distribution in }\mathbb{R}$$ $$\hspace{9mm} = a \cdot c + bi \cdot c + a \cdot di + bi \cdot di \hspace{10mm}\text{by commutativity in }\mathbb{R}$$ $$\hspace{35mm} = c \cdot a + c \cdot bi + di \cdot a + di \cdot bi \hspace{10mm}\text{by multiplicative commutativity in }\mathbb{R}$$ $$\hspace{1mm} = c(a + bi) + di(a + bi) \hspace{20mm}\text{by distribution in }\mathbb{R}$$ $$\hspace{5mm} = (c + di)(a + bi)\hspace{34mm}\text{by distribution in }\mathbb{R}$$ $$\hspace{4mm} = zw \hspace{55mm}\text{by distribution in }\mathbb{R}$$ $$\blacksquare$$  This also seems a bit wonky to me. Any and all suggestions on clearing up my verification, reasoning, etc. would be greatly appreciated!


I've got a class defined as:  template<class T, class J, const int X, const int Y> class Example { public:     Example(); }   And in my main.cpp file, I try to create a new instance of Example on the heap:  Example<classA, classB, 5, 5>* tmp = new Example<classA, classB, 5, 5>();        which compiles, but I get a linker error:   "Example<classA, classB, 5, 5>::Example()", referenced from:       _main in main.o      Is this an issue with how I use the template parameters in main.cpp?   edit: Here's the constructor definition in Example.cpp:  template<class T, class J, const int X, const int Y> Example<T,J,X,Y>::Example() { }

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.)


I'm trying to upgrade my Ubuntu 18.04 LTS to Ubuntu 20.04 LTS. However, when I type in sudo apt update in the terminal, I get: Hit:1 https://repo.skype.com/deb stable InRelease Hit:2 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu bionic InRelease Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease                    Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease                         Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                      Hit:6 http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu bionic InRelease Hit:7 http://security.ubuntu.com/ubuntu bionic-security InRelease               Hit:8 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                 Hit:9 http://archive.ubuntu.com/ubuntu bionic-backports InRelease               Ign:10 http://ppa.launchpad.net/vikoadi/ppa/ubuntu bionic InRelease       Err:11 http://ppa.launchpad.net/vikoadi/ppa/ubuntu bionic Release                404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done                       E: The repository 'http://ppa.launchpad.net/vikoadi/ppa/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  Is there any workaround for this?

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


If I hold a Chinese passport, but I have a green card USA and I am landing in Zurich and staying at the airport for my connecting flight to Beijing, do I need a visa?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


There is user input in textarea like "somefoo foo". I want to change foo word color to blue.Code below doesnt work!
<textarea rows="4" cols="50">somefoo foo</textarea>

Is it possible to highlight text inside of a textarea using javascript? Either changing the background of just a portion of the text area or making a portion of the text selected?


To communicate with a serial-type device over a telnet socket, I need to type the null character (ASCII 0) and all other non-printable ASCII characters.  On Windows, you hold ALT and type the ASCII code.  How do I do this on Mac OS X?

How can I write a null character on a Macbook Pro? I'd prefer to use just the keyboard or something that I can reach everywhere, without using a third-party program.


I have created a superclass Airplanes and a subclass Gliders  public class Airplanes { public String hasWings; public int numberWheels; public int numberPassengers;      public Airplanes(String hasWings, int numberWheels, int numberPassengers)     {     // initialise instance variables     this.hasWings=hasWings;     this.numberWheels=numberWheels;     this.numberPassengers=numberPassengers;     } }   and  public class Gliders extends Airplanes { private String hasEngine;  public Gliders(String hasWings,int numberWheels,int numberPassengers,String hasEngine) {     super(hasWings,numberWheels,numberPassengers);     this.hasEngine=hasEngine; }  public void getSpec() {     System.out.println("Glider With wings: " + super.hasWings);     System.out.println("Glider Wheels: " + super.numberWheels);     System.out.println("Glider Number of passenger: " + super.numberPassengers);     System.out.println("Glider has engine: " + hasEngine); } }   A new class test has to initialise Gliders and is written like this:  public class Test {    public Test()    {     Airplanes alfa = new Gliders("Yes",2,2,"Np");     Gliders.getSpec();    } }   When i try to run Gliders.getSpec() it prints an error saying that i'm trying to reference a non static method from a static context.  I'm just wondering if what i'm trying to do is legal or not, and if it is how can i fix it?

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


I've been collecting information about the best investment practices, however I'm have very little financial knowledge and was hoping someone here could point me in the right direction. I feel like I don't even know the correct questions to ask. I guess my question is where do people normally start? At the very least is there a simple way for me to start earning interest?  Edit  I live in the United States and have planned some money planned ahead in case of an emergency. I'm 22, Single and living out of an apartment. My work doesn't offer any savings programs like a 401(K). My goals would be that eventually I could live entirely on investments/interest.

I am young, just started my career, and looking to begin investing so I can make my money work for me. I'm still living like I did in college (occasional purchase on myself, but most of it goes into savings) and I would like to take the extra money and invest it.   What would you suggest are the best options for me to begin? I was considering getting a personal investor [a financial advisor] for perhaps a year or so, but I've heard that they really are not worth the money. I wanted to get the input of the great minds here.


I've been taught that the densities of air inside and outside the pipe differ slightly. Why should this happen. And let the densities vary, then during reflection from the ends, the reflected wave must have a slightly lesser amplitude than the incident wave and nodes won't be produced on superposition. But,we know standing waves form.Why?

We know that standing waves are created when any wave traveling along the medium will reflect back when they reach the end. But in an open organ pipe, there is nothing to oppose the wave and reflect it back. So then how are standing waves created in such a case? In standing waves where is the pressure greater, at nodes or anti-nodes?


I have a very short question: Let $\Omega\subseteq \mathbb R^d$ and $p\in[1,\infty[$.  Assuming $f_n\rightarrow f$ in $L^p(\Omega)$ as $n\to\infty$.  Can I then follow that $f_n \to f$ almost everywhere ?

If I know $\| f_n - f \|_{L^p(\mathbb{R})} \to 0$ as $n \to \infty$, do I know that $\lim_{n \to \infty}f_n(x) = f(x)$ for almost every $x$?


I am planning to start using a light meter for portrait photography with an Olympus OMD EM5, off camera flash and an old Canon 135mm f2 manual lens. However having read about it, I think that I will need to adjust the meter reading to the micro four thirds equivalent values.  So, if the equivalent f value is double on the micro 4/3, does it mean that I need to use the exposure time shown but divide the f value from the light meter by 2?  For example if the light meter shows 250 / f4, I would use 250 exposure, but set my lens to f2 (instead of f4).   Can someone confirm whether my logic is correct?

Let's say I have a micro-4/3rd camera and a full frame camera, both set to 1/60 at f/2.8, taking a picture of the same scene in the same lighting. Will the exposure be the same across both cameras despite the different sensor sizes?  The reason why I'm asking is because of the difference in depth of field between micro-4/3 and full frame sensors. I'm finding that, in order to take a picture of certain scenes with the full frame camera at the same depth of field as the micro-4/3rd camera, I have to increase the aperture, which in turn forces me to crank up the ISO.


I don't understand something very fundamental about Logistic Regression.  For Linear Regression and for Naive Bayes there is a closed form for calculating parameters.  For some reason, logit regression doesn't have such a form. Do you know why?

Take $x \in \{0,1\}^d$ and $y \in \{0,1\}$ and suppose we model the task of predicting y given x using logistic regression. When can logistic regression coefficients be written in closed form?  One example is when we use a saturated model.  That is, define $P(y|x) \propto \exp(\sum_i w_i f_i(x_i))$, where $i$ indexes sets in the power-set of $\{x_1,\ldots,x_d\}$, and $f_i$ returns 1 if all variables in the $i$'th set are 1, and 0 otherwise. Then you can express each $w_i$ in this logistic regression model as a logarithm of a rational function of statistics of the data.   Are there other interesting examples when closed form exists?


There are a lot of blatantly off-topic posts put here on Meta. These are apparently people who somehow got to this site without realizing their questions about things like programming aren't supposed to be here.  I think we should have something like the  on Stack Overflow that new users are forced into that tells them what this site is for and sends them away based on a few choices. For example:      I want to ask a question about the software that powers the Stack Exchange Network   going to the normal asking interface.    I want to ask a question about programming   going to Stack Overflow or a submenu with a list of applicable sites.    I have a question that doesn't fit into these categories   going to the full list of sites.

tl;dr  Due to the special nature of Meta and the high rate of "lost souls", should we try out the Ask a Question Wizard here on Meta Stack Exchange too?  General idea  In case anyone doesn't know yet, . It guides new users towards writing better questions.  I think that such a question wizard would be useful on Meta Stack Exchange too, for three main reasons:   . There are four types of questions on Meta, each represented by the different required tags: , ,  and . Especially bug reports can often be split into a certain structure (what's wrong, how to reproduce, why I think it's wrong, examples). The same holds true for feature requests. Such a structure is ideal for a question wizard. Quite a few users  and . While the Meta community is well prepared to deal with these posts quickly, they lead to an less-than-ideal first impression by the new users and they distract the community from more important issues. Site-specific questions are often off-topic. This  since nowhere is it hinted at in the help pages (and there are a lot of old, not-yet-closed SO-specific questions from a prior era of this site) and can lead to unnecessary drama. If we add an honeypot into the wizard to catch this case (and ideally redirect them to the proper meta site), we could prevent this.   As Sonic said, there's an  new users need to read and confirm. However this doesn't really prove effective right now and we might need to try stronger tools (e.g. question wizard).  Therefore I think that we should test the Ask Question Wizard here on Meta too.  Implementation details (help welcome)  I think the wizard should have six main entry points:   I want to discuss a specific post or action from any Stack Exchange site. (-> honeypot, redirects to the appropriate per-site meta) I have a question regarding the use of Stack Exchange sites (-> support mode) I think I found a bug while using the Stack Exchange sites  (-> bug mode) I have an idea for improving the Stack Exchange sites  (-> feature request mode) I have a discussion I want to start about Stack Exchange communities or their rules  (-> discussion mode) I have some other (e.g. programming) question  (-> honeypot, redirects to )   Coming from these choices, the user would either be redirected to a landing page explaining, why this is not the right community and offering some alternative choices or they would follow the guided assistant.  For 1. the user might be asked on which site the post/action is. Maybe the system could show the three sites where the user was recently active/has the highest reputation on.  support mode would ask the user for these details:   what do you want to achieve? what have you tried? what is your current problem?   bug mode would ask the user for these details:   bug description how to reproduce the problem why do you think that this is wrong? (possibly) examples   feature request mode would ask the user for these details:   what is your goal? how do you think could this be achieved? why will the community benefit from this change? (possibly) details   discussion mode would ask the user for these details:   which rule do you want to propose/clarify (optionally) examples/why is this rule required?   Note: the above implementation details probably require some revision. Feel free to edit/suggest improvements for both wording and details.


I don't mean like glass either just as simple as it sounds a mesh through a mesh basically ignoring physics.

Summary  I want to be able to look through an outer sphere - BlueSphere, and see another sphere inside - RedSphere  This is the target goal I'm trying to get to:    Issues  Here is what I have tried, and the problems I'm having:  1)  If I set the spheres transparency alpha values to 0.75    - then the inner RedSphere does not take on its "true" colour and shows as blue instead of red.    2)  If I set the spheres transparency alpha to lower values of 0.5   the spheres lose their crispness which I don't want and the inner RedSphere still does not take on its "true" colour   { can't paste a 3rd sample - need more reputation points }   Background  I am animating two spheres, one inside the other, superimposed about a common origin.   At the start:   the outer BlueSphere is at full radius the inner RedSphere is at zero radius  As time progresses:   the outer BlueSphere shrinks the inner RedSphere expands    So what happens is the expanding inner RedSphere "bursts through" the contracting outer BlueSphere.  So the effect I am looking for is to see the RedSphere appearing as Red as it expands inside the BlueSphere.  Thinking/Logic  So I figure that transparency is not the way to go.  The transparency settings are behaving correctly - as one would expect, in a "real world" situation - the inner sphere (Red) takes on the colour of the outer sphere (Blue) seeing as we are looking through a (transparent) Blue material.  Any ideas on what approach to take ?  It's almost as if I should be "removing" the part of the BlueSphere that the RedSphere "occupies" so that we see the RedSphere directly without any BlueSphere between us and the RedSphere.  Some sort of masking ??  Advice, comments, suggestions welcome. Thanks.  [requested edit]  Using internal render.  [ My End Solution - Thanks for the guidance ]  Right, so here is the way I got to my final result:  1) I created python drivers for each sphere   I used the frame_current scene property for input Passed that to a scripted expression which used sin() as the scaling factor Used some if / elif conditionals against frame_current to make the spheres visible only when I needed them   2) I created 3 layers   On Layer-1 - background   I put RedSphere AND BlueSphere with drivers driver_Outer_RedSphere() & driver_Outer_BlueSphere() limiting the display of each sphere to show only where each radius > halfway  On Layer-2 - foreground-1   I put RedSphere ONLY with driver driver_Inner_RedSphere() limiting the display of RedSphere to show only where its radius <= halfway  On Layer-3 - foreground-2   I put BlueSphere ONLY with driver driver_Inner_BlueSphere() limiting the display of BlueSphere to show only where its radius <= halfway    3) I rendered each layer to .PNG sequence [RGBA] (alpha channel for transparency)   Render Layer-1 - background   background : [sky]  Render Layer-2 - foreground-1   background : [transparent]  Render Layer-3 - foreground-2   background : [transparent]    4) I brought all 3 sequences into the Video Sequence Editor   Strip-1 - background   blend [cross] opacity [1.00]  Strip-2 - foreground-1   blend [alpha-over] opacity [0.50]  Strip-3 - foreground-2   blend [alpha-over] opacity [0.50]    5) Rendered the 3 layer final sequence to H.264  So the "aha moment" struck me right at the end when I was in the Video Sequence Editor:   "Don't try to make the Outer Spheres transparent, and see through to the Inner Spheres" "Instead overlay the Inner Spheres over the Outer Spheres, and limit the opacity of the Inner Sphere overlay"     So now I see my Inner Spheres in their true colours, but the colours are muted due to the .75 opacity - and hence it gives the visual impression that the Inner Spheres are in fact inside the Outer Spheres.  Thanks all for the input - it got me going in the right direction.


Please note: I don't believe this question is a dupe. There is , which has some excellent answers, but they are suggestions that don't apply to my situation because I have ruined my cast iron oven differently than the user who asked that question.    So last month I got a massive . I seasoned it by cooking it in a campfire for a few hours (w/ lid on), letting it cool, and then rubbing a little bit of olive oil into it. Last week I took it for a test drive and cooked some peach cobbler on it (again over campfire), and it was perfect. I cleaned it by boiling water in it for an hour, scraping off the crust with a wooden spoon, and then reapplying the olive oil to it.  Last night I decided to cook a pork shoulder roast inside of it. The instructions said to let it cook at 325°F for 3 hours. Since I'm still so new to campfire dutch oven cooking, I got a roaring fire going, and unloaded like 30 charcoal brickets into it and let them heat up. Definitely was blazing too hot, but I didn't know any better. (Subsequently since last night I discovered that there are actually formulas that correlate specific numbers of brickets and their locations with specific temperatures. In hindsight I think my oven was soewhere around 450°F.)  I put the oven on the fire (with the pork inside of it, and about 1/4" of apple cider vinegar resting underneath it). 90 minutes later I went to check on it and the pork was totally charred black and overcooked. So it was pizza for dinner! But, to my horror, the apple cider vinegar-herb-seasoning liquid had now turned into black carbonic rock in the bottom of the oven:    Under the lid was a buildup of a super thick tarry sludge that has the consistency of superglue.  I tried washing both the oven and lid with salt water (course grained). Very little came off. I tried boiling the oven over the same campfire for a few hours, and again, practically nothing came off. I went to the Google gods, and the best idea I was able to find was to soak both the lid and the oven in a 50/50 mixture of water + vinegar overnight. So I did that.  The oven remains unchanged, even after soaking in a vinegar solution for nearly 10 hours:    As for the lid, all of the surficial tar/sludge came off, but it is still super sticky to the touch, unlike it was before. And now there is almost a 'metal vapor' that its giving off.  What the heck happened here? Did I just cook at too high a temperature? Are you not supposed to cook apple cider vinegar in a dutch oven over the campfire? Much, much more importantly, how can I fix this and restore the oven to its full glory again?

I have this cast iron pot that my friend completely burnt. I was wondering what might be done to save this pot. I realize that this question seems similar to  but in that one his skillet is not burnt and it is seasoned.   Thanks for your help.


For example, if we have some mockups and we want to test it, using a lab test, to check if they are ok to implement we should:   Do only a formative test to identify issues? Or we can also do a summative with the mockups to verify errros, eficiency and effectiveness? Or this summative test should only be after implement? Also it seems that its ok to test with just 5 users to identify problems, that is to make formative tests, but for summative (to measure errors, efficiency and so on) tests, with just 5 users can be enough also? Note, but if we should only do a formative test with the mockups, a formative test should include what? What can we test to identify problems? We can use summative metrics in the formative test?

I bumped into  and it suggests the use of (a)  and (b)  Usability Testing.  To be honest, is the first time that I bumped into this kind of terminology, and I while reading about it, it's not quite clear to me how can I use these tools to assess usability.  Can anyone give me an example of each?


There are over 1m+ cache files in one directory on a server. I would need to remove them, but of course rm first lists file and then starts to remove them. That cause a high spike in a server CPU load and can cause whole server to break down. Any ideas how to safely remove them without causing any harm?

I have a folder with 266778 subfolders. How can I delete it?  I have tried  cd ~/.local/share/Trash/ sudo rm -rf *   but it takes much time. After 1 minute 25 seconds real time and 0.072 seconds user time it only deleted 2500 folders. This way, it will take over two hours to delete this folder.  Is there a faster way to delete this folder? Why is there such a big difference between user time and real time?  real    1m25.474s user    0m0.072s sys     0m28.142s   I use Linux 2.6.32 (Ubuntu 10.04.4 LTS).


I am not really sure if I have asked the question correctly.   The problem is i have Page 1 that calls Page 2 with jQuery ajax.  Then Page 1 puts the returned data into a div with using .html(data).  This part works perfect however when  want to create a .click function to a element in loaded div code it does not perform any action. my code looks like this.  Page 1:

     Page 2 Code

Test 1

Test 2

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Complete beginner to Blender here so here goes an amateur question. I am a bit confused by the syntax of Blender and why you can't just create an instance of a mesh class and assign it a name. Anyway, I'm trying to create a human skeleton here what would I need to change in order to generate points into the scene to verify the locations. Currently, nothing appears on the scene which I assume is because I haven't selected a default mesh. How would I make these circles meshes?     for index, landmark in enumerate(body_locs):         mesh = bpy.data.meshes.new("{}_mesh".format(landmark))         new_obj = bpy.data.objects.new('{}'.format(landmark), mesh)                  new_obj.location = (multiplier*x_pos.iloc[0,index + 1],multiplier*y_pos.iloc[0,index + 1],multiplier*z_pos.iloc[0,index + 1])          print(new_obj.location)         bpy.context.collection.objects.link(new_obj)         ```

I would like to create a mesh, then interactively add vertices (afterwards, possibly through a loop) to it through python.  Is that possible?  I can't find enough info from other answers to really get this going - either I find out how to create a mesh, or how to add a vertex, but can't seem to put them together in to a script.


For example:   a, b, c, x, y, and z. a, b, c, x, y or z.   Are there any circumstances where it would be acceptable to omit "and" or "or" and simply write: "a, b, c, x, y, z"?

He called her, emailed her, texted her, tweeted her—all to no use.   Strictly speaking, I would need to write texted her and tweeted her, but I'm omitting and to convey a rhythm and sense of urgency. What do you call this kind of construction, and is it accepted grammar (at least for creative writing, if not in an academic context)?


The entire topbar should be fixed so that it scrolls down with the page.  Why is this not a duplicate of : I am asking we should have this functionality, I'm not looking for workarounds. This is both, a discussion and a feature-request.  People complain that it can be noisy. I disagree. For example, check this image. I just added two styles (position: fixed and width: 100%) and it doesn't look any noisy, but better. It's around 35px and has just six icons: not much noise, and just think what the fixed search bar can do! It can be really helpful.     When scrolling down, you can "warp back" by pressing the Home button, but there's a reason why a lot of websites use this functionality. It will help when reading long texts, especially when you're being active on multiple SE websites and/or questions. It'll notify you of comments, answers, rep changes, etc. in real time when you're focussing on multiple SE websites and/or questions. As of now, you have to finish one page and then scroll all up to find any comments or answers on other questions.   We might skip this for mobile versions and smartphone apps of StackExchange.

In Excel, the window can be frozen in place in such a way that you can always see the name of the column even though you go way down below the 'fold' of the screen.  On SE, when you scroll, the whole page goes up (or down). This means the top navigation bar is scrolled off screen. I'm not sure if it would be a good idea or not to fix the top navigation to the top of the screen and let the rest of the content scroll.  What do you think about this, in terms of pros and cons?  [Update]  With the new Top navigation bar, kudos to the design team, I think this question becomes relevant again. I'm aware of the busload of downvotes, but still.  The top navigation bar doesn't occupy much space and has two notification areas:   Inbox Achievements   Having these two notifications visible at all times would be nice, IMO.  [Update]  I've just noticed that I haven't used the word "optional" in this discussion... My bad. In Excel, the Freeze function is controlled by the user. You can optionally Freeze part of the interface, and you can eliminate the Freeze at will.


I downloaded Lubuntu 18.04 iso file into my flash drive and make the flash drive into a bootable device.  I inserted the flash drive into a laptop and booted into Lubuntu without actually installing it.  If I need some program not already in the Lubuntu 18.04 iso file, do I need to actually install Lubuntu on the laptop? Is it possible to install some programs like google chrome browser without actually installing Lubuntu on the laptop?  Thanks.  Which one below is the limit on the total sizes of the programs that I can install?  $ df -h Filesystem      Size  Used Avail Use% Mounted on udev            1.7G     0  1.7G   0% /dev tmpfs           340M  1.4M  338M   1% /run /dev/sdb        1.1G  1.1G     0 100% /cdrom /dev/loop0      968M  968M     0 100% /rofs /cow            1.7G  367M  1.3G  22% / tmpfs           1.7G   32M  1.7G   2% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           1.7G     0  1.7G   0% /sys/fs/cgroup tmpfs           1.7G  4.0K  1.7G   1% /tmp tmpfs           340M   20K  340M   1% /run/user/999

I am running a live CD with Ubuntu 16.04 and I am trying to create a persistent image on a usb.  I have tried everything, but nothing is working.  I am on a Toshiba satellite c-50 b.   Please help, it is important.


I have a class with two different properties that map to the same value:   class MyClass {     public int Number { get; set; }     public string NumberString {         get { return Number.ToString(); }         set { Number = int.Parse( value ); }     } }   The second property (here NumberString) simply gets or sets the first property (here Number) using a different type. The code is rather trivial, but results in a lot of boilerplate code when I have many of these "buddy" properties.  Is it possible to do the conversion using a custom property? I would prefer if I could write the second property something like this:  [MapsTo(nameof(Number))] public string NumberString { get; set; }   The attribute should then be able to do the conversion for me (maybe based on some rules I make depending on type).  I have the impression that this could be done with something like PostSharp, but is it possible with custom attributes?

I would like to know if there is any way to add custom behaviour to the auto property get/set methods.  An obvious case I can think of is wanting every set property method to call on any PropertyChanged event handlers as part of a System.ComponentModel.INotifyPropertyChanged implementation.  This would allow a class to have numerous properties that can be observed, where each property is defined using auto property syntax.  Basically I'm wondering if there is anything similar to either a get/set template or post get/set hook with class scope.  (I know the same end functionality can easily be achieved in slightly more verbose ways - I just hate duplication of a pattern)


I'm writing a LaTeX document and want to include several listings for source code examples.  Is there a way to disable the selection of line-numbers when selecting the source code?  My prof just wants to copy/paste the source code from the final pdf-file without manually removing all the line numbers afterwards. Does anyone know how to fix this problem?

A PDF output is obtained by compiling the following code. \documentclass{article} \usepackage{xcolor} \usepackage{listings}  \lstset {     language={[LaTeX]TeX},         numbers=left,         numbersep=1em,         numberstyle=\tiny,     frame=single,     framesep=\fboxsep,     framerule=\fboxrule,     rulecolor=\color{red},     xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,     xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,     breaklines=true,     basicstyle=\small\tt,     keywordstyle=\color{blue},     commentstyle=\color[rgb]{0.13,0.54,0.13},     backgroundcolor=\color{yellow!10},     tabsize=2,     columns=flexible,     morekeywords={maketitle}, }  \begin{document}  \begin{lstlisting} \documentclass{article} \usepackage{listings} \title{Sample Document} \author{John Smith} \date{\today} \begin{document} \maketitle Hello World! % This is a comment. \end{document} \end{lstlisting}  \end{document}  I attempted to copy the code only inside Acrobat Reader. Unfortunately, the line numbers also got copied as shown on the following screen shot.  The line numbers are useful, but readers want not to copy them. Is there a LaTeX trick to prevent a PDF viewer from copying the line number?


Hello I'm trying to find the closure of $$M=\{(x,\sin(1/x)|x\in(0,1]\}$$ I think the closure is $$K=\{(0,\sin(1/x))|-1\le \sin(1/x)\le 1\}$$ but I've no idea how to proof it. Can someone help me?

On $\mathbb R^2$ I consider the following set $G:=\{(x,\sin(\frac{1}{x}))| x\in (0,1]\}$   Well this set is pathwise connected (as a graph of a contionous function on an interval). The function is also oscillating on the left hand side so it makes sense to write the closure as $\bar{G}=G\cup(\{0\}\times[-1,1])$ but how can this be proved formally?  The next thing which is not clear to me is why $\bar{G}$ is connected but not pathwise connected, so there is no contin. way $c:[0,1]\rightarrow \bar{G}$ with starting point $c(0)=x$ and $c(1)=y$


Guy actually i am trying to install Ubuntu 14.04 using a USB but while installation the option along side Windows is missing. I heard that if we have a dynamic Disk, Ubuntu will not give the option along side windows.  So please help me out in installing Ubuntu 14.04 on my system.  My system configuration:  OS: Windows 7, Intel i3 processor, 4 GB RAM, 1TB Hard Disk.  Thanks in Advance :)

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


Does Dual Nature mean that any wave will have a particle counterpart? electrons have electron waves and light waves are made up of photons. Does this mean all kinds of waves have its particle counterpart?

I can't seem to understand the dual nature of matter completely.   If electrons have a wave nature, then if two electrons were to collide, wouldn't they undergo interference and form an electron wave of larger or smaller amplitude? Does that mean the electrons merge and turn into a "bigger" electron?  Then again, this would mean that the electrons would have a phase difference, so what determines the phase of matter?  Also, if we were to consider two photons colliding, would they also undergo interference and form a "bigger" photon?  Why don't normal everyday objects undergo interference? Just because the wavelength (according to the de Broglie equation) of something is small doesn't mean that it doesn't undergo interference (take for example gamma rays which have a very small wavelength but are the most powerful form of radiation).


Let $(\Omega, \mathcal{F},\mathbb{P})$ be a probability space and let $W_t$ be standard Wiener process and  $$T_{a,b}=\inf\{t:W_t=a+bt\}$$ where $a$ and $b$ are costant.I want to get expectation of $T_{a,b}$ but I can not extract $f_{T_{a,b}}$.  Thanks

I came across the following question:     Let $T_{a,b}$ denote the first hitting time of the line $a + bs$ by a standard Brownian   motion, where $a > 0$ and $−\infty &lt b &lt \infty$ and let $T_a = T_{a,0}$ represent the first hitting time of the level $a$.      1) For $\theta > 0$, by using the fact that $\mathbb{E}e^{-\theta T_a}=e^{-a\sqrt{2\theta}}$, or otherwise, derive an expression for $Ee^{-\theta T_{a,b}}$, for each $b$, $−\infty &lt b &lt \infty$.       2) Hence, or otherwise, show that, for $t > 0$,    $$\mathbb{P}[T_{a,b}\leq t] = e^{-2ab}\phi\left(\frac{bt-a}{\sqrt{t}}\right)+1-\phi\left(\frac{a+bt}{\sqrt{t}}\right).$$   For the first part, I ended up, by changing measure, with the (unverified) expression  $$\mathbb{E}e^{-\theta T_{a,b}}=\exp\left(-a\left[b+\sqrt{2\left(\theta+\frac{b^2}{2}\right)}\right]\right).$$  What's the cleanest way to do the second part? It seems I could either do some kind of inverse transform on the moment generating function, or calculate the moment generating function of the given distribution. Both of these seem difficult. Am I missing something, or do I just need to persevere?  Thank you.


Hello I have installed maas,juju and openstack-dashboard. When I try to log in the horizon dashboard I get this error:  cannot import name base Request Method: GET Request URL:    https://htk6y.master/horizon/ Django Version:   1.5.4 Exception Type:   ImportError Exception Value:     cannot import name base Exception Location:   /usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/__init__.py in <module>, line 36 Python Executable: /usr/bin/python Python Version:    2.7.3 Python Path:   ['/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../..',  '/usr/lib/python2.7',  '/usr/lib/python2.7/plat-linux2',  '/usr/lib/python2.7/lib-tk',  '/usr/lib/python2.7/lib-old',  '/usr/lib/python2.7/lib-dynload',  '/usr/local/lib/python2.7/dist-packages',  '/usr/lib/python2.7/dist-packages',  '/usr/share/openstack-dashboard/',  '/usr/share/openstack-dashboard/openstack_dashboard']   Can you please give me information what am I doing wrong? Thanks

I've deployed Openstack using juju, and everything looks normal except that I cannot browse to openstack-dashboard. I get error 500 Internal Server Error.  I looked through apache2 logs at that node and found  repeated every couple of minutes.  I tried to destroy the service and deploy it on other nodes; co-located with keystone node, then glance node, then by it self. Yet I get the same errors.  It looks like it needs deep python debugging which is weird since this is the typical charm deployment on a normal server. And someone must had tried to deploy this and succeeded!  I'm deploying openstack Essex version 2012.1.4-dev , Ubuntu server version 13.10 , django version is: (1, 5, 4, 'final', 0) And   Please help me :)


I'm creating a lib on vectors in typescript. My very first test failed:).  It's related to object equality in TypeScript/JavaScript but I can't find a way to make the test green. No object equality is mentioned in typescript's official doc .  Could someone please give me a hand ?  This is the source code.  class Vector {     x: number;     y: number;      constructor(x: number, y: number) {         this.x = x;         this.y = y;     }      add(that: Vector) {         return new Vector(this.x + that.x, this.y + that.y);     } }  export = Vector;   Then I have a unit test on this class as follows    var Vector = require("../lib/vector")   describe("vector", function () {   it("should add another vector", function () {     var v1 = new Vector(1, 1);     var v2 = new Vector(2, 3);     expect(v1.add(v2)).toEqual(new Vector(3, 4));   }); });   When executed obtains the following error  Failures:  1) vector should add another vector 1.1) Expected Vector({ x: 3, y: 4 }) to be Vector({ x: 3, y: 4 }).

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


I want to see lines only when Avail is more than or equal to 75% for the data shown below. Please help me here. vscoder@vscoder-VirtualBox:~$ df -kh Filesystem      Size  Used Avail Use% Mounted on udev            965M     0  965M   0% /dev tmpfs           199M  1.4M  198M   1% /run /dev/sda5       9.3G  7.3G  1.6G  83% / tmpfs           994M     0  994M   0% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           994M     0  994M   0% /sys/fs/cgroup /dev/loop1      219M  219M     0 100% /snap/gnome-3-34-1804/66 /dev/loop0       56M   56M     0 100% /snap/core18/1988 /dev/loop2       65M   65M     0 100% /snap/gtk-common-themes/1514 /dev/loop4       56M   56M     0 100% /snap/core18/2066 /dev/loop3      219M  219M     0 100% /snap/gnome-3-34-1804/72 /dev/loop5       66M   66M     0 100% /snap/gtk-common-themes/1515 /dev/loop6       51M   51M     0 100% /snap/snap-store/542 /dev/loop8       32M   32M     0 100% /snap/snapd/11036 /dev/loop9       33M   33M     0 100% /snap/snapd/12057 /dev/loop7       52M   52M     0 100% /snap/snap-store/518 /dev/sda1       511M  4.0K  511M   1% /boot/efi tmpfs           199M   24K  199M   1% /run/user/1000 /dev/sr0         58M   58M     0 100% /media/vscoder/VBox_GAs_6.1.10 vscoder@vscoder-VirtualBox:~$

root@SERVER ~$ df Filesystem  512-blocks  Free    %Used   Iused   %Iused  Mounted on /dev/YXCV   655360      365632  45% 6322    13% / /dev/ASDF   3801088     670648  83% 41759   32% /usr /dev/ASR    1048576     500496  53% 5555    9%  /var   How can I pipe the df command's output to only display lines that have more usage than 80%?  e.g.: it would only display:  /dev/ASDF   3801088     670648  83% 41759   32% /usr


what is the name of this parts of speech? Adjective + preposition and how can we use "availabvle of"

How can one determine what an adjectival complement is in an English sentence? Are there are any subcategories to this classification? I'd love concrete examples, to help me better understand this aspect of grammar.


How can I insulate conductors independently one off the other, where they pass through a magnetic field? Are there a techniques or alloys? There is a issue how to insulate copper wire where current flows and that copper wire - wire's are in strong magnetic field. Additionally, insulators must isolate every wire independently. That's coil with 100 or more turns.

I was wondering if there is any way to stop the magnetic field, without having the insulator turned into magnet. Let me present this as a simple case, there is a magnet to the left and a piece of iron to the right, is there anything that I can put in between to stop the magnet from attracting the iron piece, provided that the insulator won't turn into a magnet as well?  I am open to all possibilities, any materials, electric fields or anything that can stop the magnet field without harming the magnet or the iron piece are welcome.


I've asked a question, which has a number of answers. One of them has 16 upvotes, big answer, very complete, and is probably going to be the most useful for other visitors in the future. On the other hand, there is another answer, 0 upvotes, just one little paragraph that provides me with exactly what I need.  Should I accept the small answer that perfectly solves my problem, or should I accept the broader answer, and that is going to benefit the greatest number of future visitors with similar problems?

I was recently in a bit of a quandary over which answer to accept to .  Of the answers I got, two were the clear leaders and, of course, I up-voted both. Choosing a 'winner' was more difficult though as their approaches were quite different.  Answer A addressed my question and provided a clear and well thought out response. I'd anticipate that this answer would be of most use to a user who found my question via a search. Selecting this would probably be the more community-focused way to go.  Answer B took a more lateral approach and made some guesses at the business logic behind my request, suggesting that I might be asking the wrong question. Their solution was based on this assumption - and they were spot on. Answer B formed the basis of my fix for the problem.  So... Best answer to the question or best solution to the problem - they may not always be the same thing.   I took the selfish approach and went with B. I'm not losing sleep over it, but I do wonder if I did the right thing?


I've been struggling for a while doing that and can not find the right way to do it. I have a HEX   8a:01   which is the unsigned INT16   394   How can I do that in python 3.X ?  Thanks in advance

How do I convert a hex string to an int in Python?   I may have it as "0xffff" or just "ffff".


I'm trying to upgrade deluge-common but keep getting this error, i try to google but cannot find the answer.  The following packages have unmet dependencies:  deluge-common : Depends: python3-rencode but it is not installable                  Depends: python3-setproctitle but it is not installable E: Unable to correct problems, you have held broken packages.   I'm running ubuntu 16.04 and want upgrade to 18.04 but stuck at this error.  Thanks

How do I get to the Universe Repository in supported versions of Ubuntu?


I have a SSD drive and Windows 8 installed.  Where can I find if my drive has trim activated?

I recently upgraded the firmware on my SSD to support TRIM and upgraded to Windows 7.  How can I tell whether Windows is recognizing the drive as SSD and using TRIM correctly?


When answering a question, is it appropriate to copy large amounts of content (from somewhere other than SO) and present that as your answer?  For example, yesterday a poster asked for clarification about a lengthy blog entry.  Someone else answered by copying a couple of paragraphs from the blog entry.  No mention was made that content was not his.  This answer immediately received multiple down-votes until it was removed.  I then looked at this user's history and found other cases where he had copied large chunks of code from online documentation.  In each case he again did not indicate the origin of the code.  Something feels wrong about this behavior.  I would think that you should at least state up front that code came from elsewhere, and to provide a link.

How should I act if I discover a user plagiarizing fellow users' posts? What if I find someone plagiarizing external resources without attribution?  See also:


For $z \in \mathbb{C}$, how can I find all roots of the equation $$ z^4 + 1 = 0 $$ Obviously, this equation implies $$ z^4 = -1 = e^{i \pi} $$ and thus, one of our roots must be $$ z_1 = e^{\frac{i \pi}{4}} $$  However, I am aware that this is not the only root. How can I find all other roots of this equation?

I can't seem to find the  solutions to  $z^4+1=0 $. $z$ is in the complex plane.   The solutions show four roots; however, how do I find them once $z^4 = -1$?


Another user told me this is the more correct way to structure the functions: A program which displays user info (name, age and address).  def details(user_age, user_name, user_address):     print(f"{user_name} is {user_age} and lives at {user_address}.")   def main():     user_age, user_name, user_address = int(input("Enter age: ")), input("Enter name: "), input("Address: ")      details(user_age, user_name, user_address)   if __name__ == '__main__':     main()  Compared to: def details():     print(f"{user_name} is {user_age} and lives at {user_address}.")   user_age, user_name, user_address = int(input("Enter age: ")), input("Enter name: "), input("Address: ")  details()  Is code dynamic? Are there structure changes on a per project basis? Or is the above code simply the general layout/template for functions?

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


Why does the below code not generate an error and print the value stored in arr then followed by a junk value ?  int main() {     int arr[1]={10};     printf("%d %d\n",0[arr], 1[arr] );     return 0; }

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


Testing with the linux command line and pipe I tried to do echo {1..3} | touch and it doesn't work. I achieved the results with touch $(echo {1..3}). Why I can't pass the list generated by echo to touch using the pipe as in the first example?

I've a command that outputs data to stdout (command1 -p=aaa -v=bbb -i=4). The output line can have the following value:  rate (10%) - name: value - 10Kbps   I want to grep that output in order to store that 'rate' (I guess pipe will be useful here). And finally, I would like that rate to be a value of a parameter on a second command (let's say command2 -t=${rate})  It looks to be tricky on my side; I would like to know better how to use pipes, grep, sed and so on.  I've tried lots of combinations like that one but I'm getting confused of these:  $ command1 -p=aaa -v=bbb -i=4 | grep "rate" 2>&1 command2 -t="rate was "${rate}


Trying to install KDE on Ubuntu 16.04 with the following commands:  sudo add-apt-repository ppa:kubuntu-ppa/backports sudo apt-get update && sudo apt-get dist-upgrade sudo apt-get install kubuntu-desktop   I do not get to the selection of the display manager.  I have a list of errors like:  E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/r/ruby2.3/ruby2.3_2.3.1-2~16.04.5_amd64.deb  404  Not Found [IP: 91.189.88.149 80]   Going on the corresponding http page, I see this file with a slightly different version number:  ruby2.3_2.3.1-2~16.04.6_amd64.deb   How can I install KDE if there is no exact match between the packages' versions?    The answers to  do not seem to cover my case, i.e. with most packages correctly installed, but with some not found due to minor version mismatches.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


In Java, you can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. That being the case, can you use abstract classes instead of interfaces?

This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract class on the basis of their usage.   When would one want to use an interface and when would one want to use an abstract class?


I am a german student, graduating this spring. I did an exchange year in 11th grade in Tennessee, USA. Since I´m still in touch with my friends and host family, I got a chance to volunteer in the local hospital. In the ESTA program condition it says, I can ´attend a short-term training´. So my question is, is my volunteer work, where don't get paid in any source, considered as a short-term training?  I appreciate every help I can get.  Aaron

I am going to Santa Monica for 4 weeks to polish my English in July and would like to volunteer at the Planetary Society located in Pasadena.  I am a Swiss citizen and have a biometric passport. However, I don't have any special visa, as there is no visa needed for the school I am attending and using the Visa Waiver Program, I am allowed to stay up to 90 days in the US.  Am I allowed to do volunteer work during my stay?


origCodon = ([orig[i: i + groupSize] for i in range(len(orig) + 1 - groupSize)]) patCodon = ([pat[i: i + groupSize] for i in range(len(pat) + 1 - groupSize)]) print (patCodon) origCode = [] patCode = [] for p in patCodon:     for d in dna:          if d == p:               x = dna[p]               print (p)               patCode.append(x)   The code above takes two lists and splits them into groups of three, but when I go to check each individual element, it makes a new list of three, moving along one element each time.  i.e. this is one list made:  ['AAC', 'ACT', 'CTG', 'TGC', 'GCA', 'CAG', 'AGC', 'GCT', 'CTC', 'TCA']   But these are the elements it checks:  AAC ACT CTG TGC GCA CAG AGC GCT CTC TCA   How do I make it so that each group of three is checked and then it moves on to the next?  My list is split into groups of three (becoming items in the list), I want to check each of those items for their corresponding amino acid (in a dictionary), but the  program keeps making new lists, e.g. the user enters AAATTT, then the program checks:  AAA AAT ATT TTT   rather than just AAA and TTT

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I was given this example by my teacher: $f(x)=\begin{cases}        0 & (x,y) = 0 \\       \frac{x^2y^2}{x^4 + y^2} & (x,y)\neq (0,0)\    \end{cases} $ He proved diferentiablity for all $\mathbb{R}^2$. Then he went to prove wether the function was class $C^1$ or not. He used $y=x^2$ to prove it wasn't. And that's what put me in doubt. Doesn't diferentiability in $\mathbb{R}^2$ imply it's partial derivatives are continuous, therefore $C^1$. Am I missing something in this example?

is $$f(x) =\begin{cases} x^2\sin(\frac{1}{x}) \mbox{ for } x\neq 0 \\ 0  \mbox{ for } x= 0\end{cases}$$ a continuous function specially at point x=0?  And why being derivable its derivative is not continuous at x=0 since  $$f`(x) =\begin{cases} 2x\sin\frac{1}{x}-\cos\frac{1}{x} \mbox{ for } x\neq 0 \\ 0  \mbox{ for } x= 0\end{cases}$$?  I suspect this as to do with being derivable a function f $\mathbb{R}^n\rightarrow\mathbb{R}^m$ that don't imply its partial derivatives are continuous .this I don't get it so far.however partials derivatives if continuous is derivable.  Can you provide me a more general case than just one variable where f is derivable but its partials are not continuous?


Let $G$ be a group and $H$ be subgroup of $G$.  I already know that normalizer of H in G $N_G(H)$ is the largest subgroup of $G$ having H as a Normal subgroup.  So I showed that $N_G(N_G(H))=N_G(H)$. So I guess $N_G(H)$ is not necessarily normal of G.  Can you give me some example?

Let $G$ be a group, and $H$ a subgroup.  $H$'s normalizer is defined: $N(H):=\{g\in G| gHg^{-1}=H \}$.   Prove $N(H)$ is a normal subgroup of G, or give counterexample.  Intuitively it seems to me that this claim is wrong, however, I'm having trouble with finding a counterexample.  Thans in advance for any assistance!


In The Return of the King, the chapter "The Black Gate Opens" where Gandalf, the King of Gondor, and their allies make a final war against Sauron before the Morannon we are told:     ...the sun now climbing towards the south was veiled in the reeks of Mordor, and through a threatening haze it gleamed remote, a sullen red, as if it were the ending of the day...   But then, moments later (when the sun must be even higher in the sky, farther west, thus farther out of the "reeks of Mordor" and thus stronger), we learn:     ...there came striding a great company of hill-trolls out of Gorgoroth.   However, from The Hobbit we see three hill-trolls turned to stone at the first touch of dawn light. Because the sun above the battle before the gates of Mordor was as strong as "the ending of the day," it must also be at least as strong as the last moment of sunlight which we know is enough to literally petrify hill-trolls.  How to explain?

Did Sauron's Cave Trolls that roamed about under the shadows in and around Mordor turn to stone when shadows were lifted? Are all Trolls affected like Bert, Tom, and William in The Hobbit?


Please read question slowly, its strange, but true.  In windows command prompt, I want echo redirect to print \n as new line to output file, but takes as literal(\n) instead of new line.  echo  "A\nB\n\C\n" > temp.txt  If I open the temp.txt, I see output as     A\nB\n\C   rather then,  A B C   There is similar questions, like  and  on  Stack Overflow. However, none of answer serves my purpose.  I tried, various other options, but didn't work are:  echo  $'A\nB\nC' > temp.txt  echo  $'A\\nB\\nC' > temp.txt   etc.  So, my question, is there to achieve new line I want to achieve in redirect?

How can you you insert a newline from your batch file output?  I want to do something like:  echo hello\nworld   Which would output:  hello world


As far as I understand it, quantum mechanics only predicts the probabilities of finding a system in some state of some observable when we make a measurement.   So, what exactly constitutes a measurement that will make the system to collapse?

Fundamental notions of QM have to do with observation, a major example being The Uncertainty Principle.    What is the technical definition of an observation/?  If I look at a QM system, it will collapse. But how is that any different from a bunch of matter "looking" at the same system?  Can the system tell the difference between a person's eyes and the bunch of matter?  If not, how can the system remain QM?  Am I on the right track?


In (3+1) dimension Poincare group has three types of Symmetries :   a) Four space-time translations  b) Three spatial rotations and c) Three boosts    Among them, (a) implies "conservation of 4-momentum" ,  (b) implies "conservation of angular momentum" ,    But what "Physical" (if any) entity is conserved for boosts??

Noether's Theorem is used to relate the invariance of the action under certain continuous transformations to conserved currents. A common example is that translations in spacetime correspond to the conservation of four-momentum.  In the case of angular momentum, the tensor (in special relativity) has 3 independent components for the classical angular momentum, but 3 more independent components that, as far as I know, represent Lorentz boosts. So, what conservation law corresponds to invariance under Lorentz boosts?


I have come across the following comment in the lecture:  If for a prime $q$ holds $q \equiv 5 \pmod 8$, then $q-2$ has a prime factor $p$ with $p \equiv 3 \pmod 8$ or $p \equiv 5 \pmod 8$.  I do not see why this is true. I attempted to prove it by rewriting $q-2$ as $q-2 = 8k+3$ for some integer $k$ and tried to see what happens when I divide it by an arbitrary prime. However, this did not help. Could you please give me a hint?

I read the proof of, that there are infinitely many primes of form $4n+3$ and it goes :     Proof. In anticipation of a contradiction, let us assume that there exist only finitely many primes of the form $4n+3$; call them $q_1,q_2,\ldots ,q_s$. Consider the positive integer $$N=4q_1q_2\cdots q_s -1 = 4(q_1q_2\cdots q_s -1)+3$$ and let $N=r_1r_2\cdots r_t$ be its prime factorization. Because $N$ is an odd integer, we have $r_k\ne 2$ for all $k$, so that each $r_k$ is either of the form $4n+1$ or $4n+3$. By the lemma, the product of any number of primes of the form $4n+1$ is again an integer of this type. For $N$ to take the form $4n+3$, as it clearly does, $N$ must contain at least one prime factor $r_i$ of the form $4n+3$. But $r_i$ cannot be found among the listing $q_1,q_2,\ldots ,q_s$, for this would lead to the contradiction that $r_i \mid 1$. The only possible conclusion is that there are infinitely many primes of the form $4n+3$.   $q_1,q_2,\ldots ,q_s$ I need an explanation from last three line i.e. .   They said that:   $q_{1},q_{2}, \cdots ,q_{s}$ is of the form $4n+3$ (let). $r_{i}$ is of form $4n+3$ (at least one). $r_{i}$ cannot be found in listing $q_{1},q_{2}, \cdots ,q_{s}$   And lemma they used is:  The product of two or more integers of the form $4n+1$ is of the same form.  My problems:   If above two holds then why $r_{i}$ cannot be found in listing $q_{1},q_{2}, \cdots ,q_{s}$. And how $r_{i}|1$ If all this holds then why $q's$ are infinite.   Please give the most elementary explanation as you can, any help worth a lot to me, Thanks.  (I took this from David M. Burton book).