I encounter many tasks in which I need to filter python (2.7) list to keep only ordered unique values. My usual approach is by using odereddict from collections:  from collections import OrderedDict  ls = [1,2,3,4,1,23,4,12,3,41]  ls = OrderedDict(zip(ls,['']*len(ls))).keys()  print ls   the output is:     [1, 2, 3, 4, 23, 12, 41]   is there any other state of the art method to do it in Python?   Note - the input and the output should be given as list   edit - a comparison of the methods can be found here:   the best solution meanwhile is:  def get_unique(seq):     seen = set()     seen_add = seen.add     return [x for x in seq if not (x in seen or seen_add(x))]

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


I think that if the sequence $f_n$ converges pointwise to $f$ (and not uniformly), $f$ is not always holomorphic. Then I searched concrete examples of $f_n$ such that $f$ is not holomorphic, but I couldn't find such a $f_n$. As a side note, I thought of $U$ as a unit disk $D\colon=\{z\in\mathbb{C}\mid |z|<1\}$ when I searched that. Is there the concrete example? I would appreciate it if you propose that example!

I'm looking for an example of a sequence of functions $f_n$ which are holomorphic in the open unit disk $D(0,1)$ and converge pointwise for every $z \in D(0,1)$, but are not almost uniformly convergent on $D(0,1)$ (i.e., do not converge uniformly on compact subsets). Note that such a family cannot be bounded, as then it is easy to prove that almost uniform convergence holds.


I need help breaking this down.  Here is the original code:    function hasTreat(treat) {   const treatsArr = ['cookie', 'cake', 'muffin', 'pie', 'ice cream'];   if (treatsArr.indexOf(treat) === true) {     return true;   }   return false; } if (hasTreat("cookie")) { // You should have a cookie.    console.log("You have a cookie!"); } else {   console.log("You have no cookie."); // This is wrong. You should have a cookie.  }     I've modified it to this:    function hasTreat(treat) {   const treatsArr = ['cookie', 'cake', 'muffin', 'pie', 'ice cream'];   if (treatsArr.indexOf('cookie') === true) {     return true;   } else {     return false;   } } if (hasTreat('cookie')) { // You should have a cookie.    console.log("You have a cookie!"); } else {   console.log("You have no cookie."); // This is wrong. You should have a cookie.  }     What in the world am I not understanding here?  It bugs me so much to think that something makes sense and to find out it doesn't "work".  Help, please.  Thanks, guys.

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I can't remember the author's name nor the title (guess it is obvious, otherwise I wouldn't be here). I do not remember much of the story either. It was about a guy that buys from a dealer (or a smuggler; guess the "creatures" were considered dangerous) some small, "crab-like" animals that divided in tribes, or something like that. There's where two tribes which fight against each other from time to time. They were put in a terrarium of some sort. There were also a rule a "never do" thing the "owners" or caretakers of such animals should pay attention to; a rule that, again, I cannot remember. The creatures of one other the tribes start to make a "statue" of him (the owner) at some point, after he did not follow the instruction mentioned above... then things go wrong. It is a short story. I don't remember when I read it, but it was ages ago... along with so many others... It was maybe one of the stories in a selection of a Hugo prize of some year...

I am trying to recall the name of a story I read when I was fairly young (maybe 20 years ago, but not sure how old the story is).    What I remember: A man acquires a set of creatures that he keeps in his house, I think in an aquarium.  They evolve over time, quickly, and think of him as their benevolent god. They build statues in his likeness.   Then, I believe some sort of accident happens, and the statues they build become a little less benevolent, which bothers him.  This pattern continues on with his cruelty increasing and their depiction of him becoming more cruel.


Had this issue while working with inline bash command and this thing got me really confused. So, say I declare a shell variable temp and give it a value: > temp='hello' and now to echo this result in UPPER CASE using inline commands I write  bash -c "echo ${temp^^}"  HELLO  which is totally fine and I'm okay with it. Now while studying this topic I came across this line, "Whenever we put code in a string (such as in the case of passing it in as an argument), the code should be single-quoted." And this line is helpful as it solves the ambiguity can be caused by multiple double quotes. So, following this I wrote the code as follows: bash -c 'echo "${temp^^}"'   Which gave me no output. I tried to do a verbose command on this one which gave me this: bash -cv 'echo "${temp^^}"' echo "${temp^^}"   Can somebody explain why the result is not getting displayed as HELLO, would really appreciate it.

I run the following script: VAR="Test" sh -c 'echo "Hello $VAR"'  But I get: # ./test.sh Hello  How can I send the variable VAR of my script to the shell created with sh -c '...'?


How do I prove that counting measure is subadditive?  Particularly, I'm confused about, what cases do I need to explore?  $$\mu^* \bigg(\bigcup_{i=1}^{\infty} E_i \bigg)$$  then since each $E_i$ is either some finite natural number or $\infty$, then do I need to induct or something?  Or perhaps one considers:   all $E_i$ are finite at least one $E_i$ is infinite

Can somebody tell me why the counting measure (so, if $S=P(X)$, then $\mu(A)$=infinity if $A$ isn't finite and $\mu(A)=$#$A$ if $A$ is finite) is a measure? (The second property of a measure isn't clear for me).


How do I evaluate the sum: $$\sum_{k = 0}^{n}2^k {{n}\choose {k}}$$ I know that $2^k = {n \choose 0} + {n \choose 1} + {n \choose 2} + {n \choose 3}... {n \choose k}$, but I don't know how to proceed from this.

I have to prove the identity using a combinatorial proof:  $\displaystyle\sum\limits_{k=0}^n 2^k \binom{n}{k} = 3^n$  I think this should be my combinatorial proof:  We want to form a committee of $k$ people from a total of $n$ people. There are two ways of counting this committee.  1) Go through each member from the $n$ total people, and decide if they should be added to the committee or not, until we have reached $k$ people. This gives us the LHS.  ...For the RHS, however, I am not sure how to form it. I think it should be something like forming subsets of $3$ people and choosing from that, but I'm not sure how that will form the same committee as the LHS.   EDIT: Okay, I also had the idea of forming a ternary string, and I could get the RHS this way. But I was not sure about the LHS. But the first answer gave me the right idea. Thanks a lot.


I would print the cpu usage with this simple python script. I would write the result, erase that row and re-write on the same line as like as windows shell does with some commands. Is it possible?  import psutil                                     #import tsutil import time  def printit():     while(1):         print(psutil.cpu_percent())         time.sleep(3) printit()   This print line per line. I would the result always change on the same line

I am new to python and am writing some scripts to automate downloading files from FTP servers, etc. I want to show the progress of the download, but I want it to stay in the same position, such as:  output:     Downloading File FooFile.txt [47%]   I'm trying to avoid something like this:       Downloading File FooFile.txt [47%]      Downloading File FooFile.txt [48%]      Downloading File FooFile.txt [49%]   How should I go about doing this?    Duplicate:


The Project Management SE is well populated and considered useful to those of us that frequent it but the moderation is sparse and we have had examples recently of  and threads from lack of Moderator oversight.   How can we increase the amount of Mods and force an election to supplement the current moderators on the site since many of the power users from the past hardly frequent the site any more.  I don't want to be a Mod myself particularly but I can think of several who would be well suited to do so.

Per , it seems like the beta phase of sites is continuing much longer than previously. Currently, pro-temp moderators are nominated when a site is only a few weeks old, when the site is still very new and unshaped. They continue until they are unable to moderate, or the site graduates to a full site. The problem that I'm seeing is that there are now sites that have been in beta for over a year, which is a time period sufficient that many changes can be made in a persons life, that the community has started to take ownership already, and as a whole, seems to be ready to start taking at least some ownership.  So, the question is, should we allow elections for beta sites that have crossed over some considerable amount of time, perhaps 6 months or something around that mark?


Here, "myriad" is a noun, and I suppose "myriad of emotions" is a prepositional phrase, so presumably the verb must agree with "myriad"?

Formally, is it correct to write:     A number of questions has been asked here.   or:     A number of questions have been asked here.   As a non-native speaker of English, I would prefer the former: the subject seems to be "number", therefore the verb ought to be singular, I'd say. However, the latter seems more common, and therefore I believe that my gut feeling is just plain wrong — but I would really like to have a definite answer.  Moreover, is it the same for "a myriad of", "a plethora of", and so on?


Can anyone please tell me how to post code in this site? whenever i am trying to post code here I am getting some format error. It is saying like leave 4 lines or something like that.I am not getting it. Please help me. I am having some code problem which I want to post.

While trying to ask a question, I got the error message     This question body does not meet our quality standards. Please make sure that it completely describes your problem - including what you have already tried - and is written using proper grammar.    Why am I getting this message? What can I do to get the system to accept my question? Can you be more specific? What are good resources on how to ask high-quality questions?      For more information, see  in the .


Me and my brother are making a game and using blender and Unity. I create the models in blender and export them to his unity. We love the look and lighting of of the model in Blender's Preview lighting, Is there a way to achieve that same lighting and feel in in unity? We spent half an hour playing around with all lighting and materials, we couldn't get it right.

I want to export my objects to unity, but in blender I`m using Eevee engine. However the light in rendered more and material preview mode is completely different, which impacts the colors of objects. Which one can i trust to see the true final colors of the objects so that they will be the same when i export them to unity?


Should I say     Your or someone else's   Or     Yours or someone else's   When I am referring to an item that may either belong to the person I am addressing, or someone else?  Example context:     Check your/s or someone else's current balance.

What is the best way to say this?     Because of yours and the John Wichel Foundation’s grant we are able to continue our mission to serve all Texans with diabetes.   Should it be      Because of your and John Wichel Foundation's grant, we are able . . .    OR   Because of yours and the John Wichel Foundation's grant, we are able . . .   It's a double possessive with the word your.  No matter how I write it, it doesn't sound right.


I am running a logistic regression in Stata to try to determine which independent variables potentially cause a response in a binary dependent variable.  When I run certain independent variables against the dependent variable I get very high significances around $p=.005$. However, when I add all of my variables together into one logistic regression equation all of the significances spike to $.1$ or higher, and many go from $.05$ to $.5$ or higher. It seems that the more variables added, the lower the significance goes, even if the variables are all significant by themselves against the dependent binary variable.

When I analyze my variables in two separate (univariate) logistic regression models, I get the following:  Predictor 1:    B= 1.049,    SE=.352,    Exp(B)=2.85,    95% CI=(1.43, 5.69),    p=.003    Constant:    B=-0.434,    SE=.217,    Exp(B)=0.65,                            p=.046  Predictor 2:    B= 1.379,    SE=.386,    Exp(B)=3.97,    95% CI=(1.86, 8.47),    p<.001    Constant:    B=-0.447,    SE=.205,    Exp(B)=0.64,                            p=.029   but when I enter them into a single multiple logistic regression model, I get:  Predictor 1:    B= 0.556,    SE=.406,    Exp(B)=1.74,    95% CI=(0.79, 3.86),    p=.171 Predictor 2:    B= 1.094,    SE=.436,    Exp(B)=2.99,    95% CI=(1.27, 7.02),    p=.012    Constant:    B=-0.574,    SE=.227,    Exp(B)=0.56,                            p=.012   Both predictors are dichotomous (categorical). I have checked for multicollinearity.  I am not sure if I have given enough info, but I cannot understand why predictor 1 has gone from being significant to non-significant and why the odds ratios are so different in the multiple regression model. Can anyone provide a basic explanation of what is going on?


I need to ensure that when I download from Ubuntu Software Centre, I do so on a self-made partition, and not in the HOME folder.   This applies only to applications and games.  Is this possible?   [This may be a basic issue, but I found no easily accessible answer for the same.]

I'd like to install software packages, similar to apt-get install <foo> but:   Without sudo, and Into a local directory   The purpose of this exercise is to isolate independent builds in my  server.  I don't mind compiling from source, if that's what it takes, but obviously I'd prefer the simplest approach possible. I tried apt-get source --compile <foo> as mentioned  but I can't get it working for packages like autoconf. I get the following error:  dpkg-checkbuilddeps: Unmet build dependencies: help2man  I've got help2man compiled in a local directory, but I don't know how to inform apt-get of that. Any ideas?  UPDATE: I found an answer that almost works at . The problem with chroot is that it requires sudo. The problem with apt-get source is that I don't know how to resolve dependencies. I must say, chroot looks very appealing. Is there an equivalent command that doesn't require sudo?


I'm new to Blender, I have the object shown on the first image (the one that is NOT selected) and I would like to create on it some holes using the boolean modifier. So I created the eight cylinders shown in yellow always on the first image to subtract them from my object.    Now if I select the object, add to it the boolean modifier and make the difference with those cylinders the surface of my object is not correctly modified. See the image below and compare it with the previous one.   Is it a problem of Blender or am I applying the boolean modifier in a wrong manner? What is the correct way to use the boolean difference between two objects? Thanks in advance.

I tried to manipulate a cube with the Boolean modifier. I tried to cut out an edge of the cube with a cylinder. Also, the shading result looks awful in FLAT SHADING mode, so I turned on SMOOTH SHADING.   Has anyone an idea how to achieve a better result. (I also cut out a Sphere first, this made the result less awful).   I used Blender Internal and rendered with smooth shading for smoothness.  Using flat shading looks okay, except the "round" cutouts :/  Face normals are okay.  First image is smooth shading.    EDIT: User Pisurquatre suggested the EdgeSplit modifier, works perfect to me (Maybe a little tweaking here and there):


I am developing X64 C++ project using MSVS 2015. I want to link a library that I pulled and compiled myself using the same version and configuration(X64).  This library uses something like inside its headers:  #ifndef WIN32 #include <sys/time.h> #endif   And yes as you guessed, it does not compile since there is no <sys/time.h> in Windows and in the same time the WIN32 is not defined since I am on X64.  Is it safe to define WIN32 by myself inside X64 project?  Note: I tried it and it is working. I am just afraid of future problems (if any).

I know that WIN32 denotes win32 compilation but what is _WIN32 used for?


Please any body say How to install windows 7 on ubuntu 14.04 dual boot would be a Big help if explained in Step by step !!

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


Is there a way I can upload a picture to your service instead of Imgur? Or possibly use a gravatar link or from a webpage like Google?

Where does the image come from? How do I change my profile picture, or avatar? How do I change my profile picture on all SE sites at once? How can I use different avatars on different SE sites? How do avatars work? How do the SE sites know when I changed my Gravatar? Why do SE sites show a different Gravatar identicon than other sites where I use the same email address? How can I use a Gravatar image after logging in to facebook.stackoverflow.com? I changed my picture but am still seeing the old one    See also:


Could you please let me know why do we need switch-case statement in java if we already have if-else if-else statements.  Is there any performance advantage for switch-case statements?

Switch statements are typically faster than equivalent if-else-if statements (as e.g. descibed in this ) due to compiler optimizations.  How does this optimization actually work? Does anyone have a good explanation?


MySQL column:  phone = '(999)-666-333'   String to search '999666333'  Is there a way I could search by transforming the value '(999)-666-333' within WHERE command? I want to strip all non-digits and leave only digits. something like: select * from users where regex(phone, '[0-9]') = '999666333';

I'm looking to find records in a table that match a specific number that the user enters.  So, the user may enter 12345, but this could be 123zz4-5 in the database. I imagine something like this would work, if PHP functions worked in MySQL. SELECT * FROM foo WHERE preg_replace("/[^0-9]/","",bar) = '12345'  What's the equivalent function or way to do this with just MySQL? Speed is not important.


After reaching level 9 on the Diablo III demo for PS3 I installed the full version. However, my character from the demo does not appear on the full version. Do I need to have an online membership to transfer my demo character?

The demo appears to have a save and make progress. Can this save be imported into the full version? What about vice versa (can I play a save from the full version within the demo)?


I'm using Ubuntu 18.04.  When computer inactive or lock it manually screen becomes black with mouse pointer on it. Actually it looks like is still turned on.  I would like to get it turned off for energy saving.  I have installed:  NVIDIA X Server NVIDIA Driver Version: 390.77 Monitor Dell P2717H Video Card: GeForce GTX 1050 Ti

When my computer blanks the screen after the timeout (10 minutes) or after I turn off the monitors and turn them back on some time later, I only see a black screen with the mouse pointer. I can move the mouse pointer, but nothing else happens.  I am able to switch to the console with Ctrl + Alt + F3 and then switching back to the display with Ctrl + Alt + F1 gives me the login screen. But after logging in, I get the same problem.  Restarting gdm3 from the console does not seem to help. It gets stuck initializing and then I have to hard shutdown. The only thing that works is to restart the machine from the console, but that is annoying.  Has anyone else experienced this problem or have any ideas on how to fix this?  My machine is Ubuntu 18.04 with the 4.15.0-32-generic kernel.


I have a list that contains 16 unique numbers:  list = [1, 2, 3, 4, 5, 6, 7,...,16]   I want to iterate over all possible combinations of 4 of the numbers, eg:  iterate1 = [1, 2, 3, 4] iterate2 = [1, 2, 3, 5] iterate3 = [1, 2, 3, 6] . . .   Numbers in the list cannot repeat.

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


How do I delete my question from Stack Overflow?  I have posted a question as an unregistered user by mistake, but now I would like to delete it.

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


I would like to read data from a csv and then do some calculations. The problem here is the comma as a decimal separator. With a point as decimal seperator in my csv data everything woks but with a comma it does not. Are there any solutions available to solve my problem?   \documentclass{article} \usepackage{pgfplotstable} \pgfplotsset{compat=newest}  \pagestyle{empty} \begin{document}  \begin{tikzpicture} \begin{axis}[xlabel=$x$,ylabel=$y$] \addplot [             color=red,             only marks,             mark=*,             mark size=1.5pt,           ]          table          [ col sep=semicolon,            /pgf/number format/read comma as period,             x=x,             y expr=\thisrow{y}*2            ] {test.csv};  \end{axis} \end{tikzpicture}  \end{document}   The Data:  x;y 1;1 2;1 3;1 4;8,5 5;2 6;2

I am trying to plot data from data files which are using the comma as decimal separator instead of a point (as is normal in SI style (French version):  ). However, even after excessive search I cannot find an option that would actually tell pgfplots to read the table with the comma as decimal separator. Minimal (not) working sample:  \documentclass[paper=a4,12pt,version=last,landscape]{scrartcl} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \centering \begin{tikzpicture}     \begin{axis}[             width=0.9\textwidth,             height=0.5\textheight,             xlabel={Standardweg~[mm]},             ylabel={Standardkraft~[N]},             grid=major,             ]         \addplot table[x=Standardweg, y=Standardkraft] {Messwerte.TRA};     \end{axis} \end{tikzpicture} \end{document}   Messwerte.TRA:  Standardweg  Standardkraft 0,000000000000e+000  1,960904836655e+000 -2,349615044750e-004     3,081407308578e+000 -2,349615044750e-004     4,164415359497e+000 -2,349615044750e-004     5,441759109497e+000 -2,349615044750e-004     6,443712234497e+000 -2,349615044750e-004     7,598009109497e+000 -2,349615044750e-004     8,951524734497e+000 -6,029571522959e-001     1,002574348450e+001 -2,349615044750e-004     1,122496223450e+001 -2,349615044750e-004     1,252183723450e+001   On compilation, I get the error: ! Package PGF Math Error: Could not parse input '-2,349615044750e-004' as a floating point number, sorry. The unreadable part was near ',349615044750e-004'.. for every single number in the .TRA-file.  I know that I could find and replace every , with a . in the files, but that is not an option considering the amount of files I have to evaluate.  Also, I tried stuff like /pgf/number format/use comma, set decimal separator={{,}}, \pgfkeys{/pgf/number format/.cd,fixed,precision=2,use period} and use comma, but none of that helped and I am pretty much running out of options. The documentation for pgfplots did not give any other ideas, either.  So: How do I convince pgfplots to actually read the comma as decimal separator and to not search for the point?


The upgrade from 18 to 20.04 LTS finished with some issues. After restarting the laptop, I got this frozen screen:

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


Migrating kornshell scripts from solaris 10 to RHEL 7.5  /bin/sh is used to execute shell scripts in RHEL 7.5  $ ls -l /bin/sh lrwxrwxrwx. 1 root root 4 Jul 16 12:10 /bin/sh -> bash   So, we would like to first parse the complete code to verify their syntax  but not execute it,   For example:  sleep 20 echo test cd /a/b/c connect # instead of ./connect   should just parse the code but not execute it  What is the approach to just parse the code? to verify syntax without executing it.

Is it possible to check a bash script syntax without executing it?  Using Perl, I can run perl -c 'script name'. Is there any equivalent command for bash scripts?


So I want to install Lubuntu to a 16GB USB Flash Drive and I have a question about the install process: how should I partition the device? I have an Asus X550LB notebook and the specs are: 4GB RAM, I7 4500U and Nvidia 740M GPU. The MOBO uses legacy bios.

I’m trying to install Ubuntu 16.04 alongside with Windows 7. My HDD supports only 4 partitions. Three of the partitions are taken up by windows. The fourth one is labelled as free space.   Now, how do I make root, swap and home partitions? Should I format my free space as primary with EXT4 first (if so, what should be the mount point?) and then create logical partitions for root/Home/swap? How do I go about this?  Edit: I tried to use the automatic installation option for dual boot. However I got the error ubi partman exit code 141. Probably because it tried to create two separate partitions for root and swap.   $ sudo parted -l Model: ATA ST1000DM003-1CH1 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Disk Flags:   Number  Start   End    Size   Type     File system  Flags  1      1049kB  106MB  105MB  primary  ntfs         boot  2      106MB   277GB  277GB  primary  ntfs  3      277GB   903GB  627GB  primary  ntfs


I got this equation by predicting grassland biomass growth from precipitation and soilnutrient.  How can I convert it into original power function and how to interpret scientifically.   logNDVI <- 0.36 + 64.8*log(precipitation) + 0.9*(soilNutrient)  P <- 0.01; R2= 0.72 and residual standard error=0.45   Thank you!

Is it necessary to exponentiate the predicted values in a log-log regression model?  For example my model is:  $\log(y) = \log(x)$  $\log(y) = -0.5141 + 0.5377 \log(x)$  if I wanted to make a prediction from this model do I need to exponentiate the result or log the x value? What is the correct way of evaluating the equation?  if $x = 100$ then y=   $y = -0.5141 + 0.5377 \times 100 = 53.2559$ $y = -0.5141 + 0.5377 \times \log(100) = 1.9621$ $y = -0.5141 + 0.5377 \times \log(100) = 1.9621 = \exp(1.9621) = 7.114251$


I have the following sequence:  $$a_{n+1}^2=a_na_{n-1}, \forall n \ge 1$$  With $a_0=2$ and $a_1 = 16$. I am also told that the sequence has positive terms. I have to find the limit of the sequence $(a_n)_{n \ge 0}$.  I am not that great at limits/sequences so I'm not sure how should I approach this.

How do I find the lim for a series that has the following recurrence relation  $$ a_{0}=2 $$ $$a_1=16 $$ and $$a_{n+1}^2=a_na_{n-1} $$ .I applied $\ln$ and I substituted $$ b_n=\ln (a_n) $$ and so I found the following recurrence relation $$2b_{n+1}=b_n+b_{n-1}$$ .What do I do next? Can someone explain this limit in recurrence relation method because I'm not very familiar with it. I understood that it can only be applied if the given series converges?


(Relation between two sets) If $X$ and $Y$ are sets, a relation between $X$ and $Y$ is a subset $R \subset X \times Y.$ For a relation $R \subset X\times Y$ and $a \in X$ and $b \in Y$ if $(x,y) \in R,$ we write $xRy$ and if $(x,y)\notin R,$ we write $x/R/y.$ (let /R/ be a slash across the R similar to what I have with $\notin$.)  My question:  Prove that $X \times Y$ is an equivalence relation. We have that there is a relation $R$ on $X$ and another relation $R'$ on $Y$ and that both are equivalence relations. The goal is to prove that $R \times R'$ is an equivalence relation.   My thoughts: I am trying to teach this to myself. Some friend of mine was talking about this and I did not know too much about these types of question. I decided to learn this by myself and saw this question.  How would we do this? Can someone please help me with this? I would like to see how this proof is done.  This is what Hugh Denoncourt was saying in his comment.

If $X,Y$ are reflexive, symmetric, and transitive, then $X \times Y$ is an equivalence relation where ${(a,b):a\in X, b\in Y}$.    I am trying to self learn these topics. I do know what an equivalence relation is. I wanted to know how would someone prove that $X\times Y$ be an equivalence relation?


It's all too easy to blame Help Vampires for problems in Stack Overflow.  But it's not them, it's us. The people who feed them.  If the question is an exact duplicate, let them know it's an exact duplicate.  If the question is a trivial question about something from the standard library, don't forget to link to the standard library documentation while answering the question.  If someone asks "Why doesn't this code work?", and the debugging is trivial, don't just do the trivial debugging for them. Show them how they can debug it themselves (for example, tell them about warning flags).  Unfortunately, reputation goes to those who feed the help vampires, not those who help cure them. These feeders don't just get reputation from the vampire. They also get reputation from the rest of the community. (For example, 11 upvotes on an )  I'm not meaning to be ill-intentioned towards the help vampires. Some of them haven't been taught properly how to program or how to problem-solve, and I suspect some of them are so stressed out they aren't thinking straight. Asking a question is more effort than googling, so it's not a case of laziness. But so long as the feeders deliberately don't teach the vampires how to fish as opposed to merely giving them a fish, they're going to continue to be worse off.

What is the best long-term solution for the  problem? Adapted from the above article:  Identifying Help Vampires can be tricky, because they look like any ordinary person (or Internet user, whichever is lesser). But by closely observing an individual's behavior using this handy checklist, you too can identify Help Vampires in the field:  Do they ask the same, tired questions others ask (at a rate of once or more per minute)? Do they clearly lack the ability or inclination to ask the almighty Google? Do they refuse to take the time to ask coherent, specific questions? Do they think helping them must be the high point of your day? Do they get offensive, as if you needed to prove them why they should use Ruby on Rails? Are they obviously just waiting for some poor, well-intentioned person to do all their thinking for them? Can you tell they really aren't interested in having their question answered, so much as getting someone else to do their work?


I have a repeated measures design with two factors (A,B).  For each subject, variable C is measured 7 to 10 times in each combination of A and B.  What I usually did was do first calculate the mean across for each combination of A and B for each participants and calculated my model with:   lmer(C~A+B+(1|Subject) # I assume A and B to not interact with each other    However, one reviewer asked me to use individual trials instead of the mean for each subject and combination of A and B.  But I don't know how to create such a model. Is it the same as the one written above but without calculating the mean first? Or do I have to specify the trials as some kind of random factor?  I do not assume that there is a trend over time in my trials for each combination of A and B. So at best their variation (I am not sure if the assumption can be made, that they are normally distributed, but might be the case) should somehow be included for each subject and each combination of A and B.

I am currently arguing with someoe on how to correctly treat data with multiple measurements for each subject. In this case data was gathered for each subject within a short time for different conditions within each subject. All measurements gather exactely the same variable, just multiple.  One option now is to just group the data by conditions and not care that multiple data points come from one subject. However the data points from each subject are probably not completely independent.  The other alternative is, to first take the mean of all measurements for each condition from each subject and then compare the means. However this will probably impact the significance, since in the final analysis it is not taken into account, that the means have less error.  How can you correctly analyse such data? Is this somehow taken care of in SPSS? In principle it should be possible to calculate the error margin when calculating a mean and than considering this in the final analysis, but I do not guess that SPSS is somehow doing this calculation behind my back.


I'm using moderncv and I'm having an issue adding birthdate  This is the code I'm using  \documentclass[10pt,a4paper,sans]{moderncv} \moderncvstyle[right]{classic} \moderncvcolor{burgundy} \usepackage[utf8]{inputenc} \usepackage[scale=0.8]{geometry} \usepackage{setspace} \usepackage{multicol} \setlength{\hintscolumnwidth}{2.8cm} \renewcommand*{\namefont}{\fontsize{24}{0}\bfseries\upshape} \firstname{\vspace{2mm}John\vspace{2mm}} \lastname{Doe} \dateofbirth{1987-02-13} \address{24 Groove Street, LA, USA} \phone[mobile]{+123456789} \email{john.doe@gmail.com} \photo[50pt][1pt]{photo}  \begin{document}  \makecvtitle  \end{document}   The date is displayed on top of the image, as \dateofbirth is not recognized by moderncv.    I want to put the birthdate excactly before the address but I don't know how.

I'm doing my cv with the moderncv package and I'm using the classic style. I would like to add a date of birth line directly above the adress. Does anyone know how to do this? I've tried various solutions but they all seem to be broken.


Let $V$ be a a Euclidean or unitary vector space and $f,g$ be linear endomorphisms from $V$ such that $\langle f(x),x\rangle=\langle g(x),x\rangle,\,\forall x\in V$ holds. Does $f=g$ hold? Does it hold if $V$ is finite-dimensional?  I thought that this looked like a good application of the polarisation identities since the terms in there look similar to the above terms but I haven't been able to show the validity of the claim above with this or anything else so far (nor have I been able to disprove it).

Let $T$ be a linear operator on an inner product vector space $V$. I'd like to prove that if $$(Tx|x)=0 \quad \forall x \in V$$ then $T$ is the null operator. I can't figure out this proof using contradiction, do I have to choose an appropriate vector?


My computer running El Capitan (10.11.6) keeps resetting the apps used to open particular file extensions. For instance, it randomly sets PDFs to open with Acrobat Reader instead of Preview no matter how many times I've used the 'Open with' menu to set the app I want. Strangely, when I right-click and go expand the 'Open with' menu, Preview doesn't even show up in the list – I have to choose other and browse for it.  Possibly related: I've long used the Terminal to launch apps, using open -a 'name of app'. That's also stopped working for certain apps. If I for instance try to open -a 'ia writer classic' it tells me Unable to find application named 'ia writer classic'. If I then launch IA Writer from the Launchpad, close it, and try the command in the Terminal again, it works. At least for a while...  Any clues as to what might be going on would be very helpful!

I've been having a problem on my El Capitan installation for a few months. At unpredictable times, the system "unlearns" the programs associated with certain file types.  For example, I double click a PDF in Finder, and it tries to open it with Microsoft Word (which of course complains it is unable to open it). To fix, I have to [right-click -> "Open With" -> "Other..." ] a PDF file, go find Preview (which by the way is not even in the "Recommended Applications") and select "Always Open With", and then the problem goes away for some time.  For a while I thought this problem was limited to PDFs, and was somehow a bug caused by Microsoft Office.  However, just now I had the same problem, but the system defaulted to iTerm for opening hyperlinks! So when I clicked on a link inside an email, it caused an empty iTerm to be opened... To fix I had to create a shortcut to a webpage, then [right-click -> "Open With" -> "Other..." ] and select Firefox.  Would be glad for any help to restore sanity, or at least to understand what is going on!


If I perform the logical OR on two items, what am I doing? Ie. what's the verb for the logical sum?

I'm writing a scientific/technical text which involves describing some low level code.  I need to complete the following sentence:     When two values are combined, their tags are _ _ _ _ _ _ together   Where the dashed line should be filled with a word specifying the tags have been combined using a bitwise OR operation (or AND operation).  I also need the word for the present tense.


Say you threw an object 10 AU from a planet at a certain speed, would this object stay orbiting around the planet or would it shoot off into space? And does it depend of the speed the object when it was thrown? What about the mass of the object?

If two bodies are close, both will get attracted to each other and collide. Under what conditions will the two bodies start revolving around their common center of mass? I understand that such bodies represent the gravitional two-body problem, but I want to know what are the initial conditions that allow it so settle into such a configuration (without going into the maths)


On Stack Overflow I have a , but on all other Stack Exchange sites, my photo has been replaced with an automatically generated avatar. I tried going to  and clicking "save and copy changes to all public communities", but it doesn't seem to have any effect. I have no idea when this happened as I don't visit this site very often and it's not something I would necessarily notice, but I am pretty sure it didn't always used to be this way.

I have had the same network-wide profile avatar for many years; it's a custom image which I installed nework-wide soon after I registered for Stack Overflow back in 2011. I still see that image e.g. on  and  but not, for instance, on this site, or e.g. on   (The example originally linked to my Unix & Linux profile instead of Super User but I experimentally changed my profile back to the gravatar one there.)  I routinely update my profile presentation text every few months, and did so again a few days ago. Comments below seem to indicate that others who recently edited their profile are experiencing the same problem.  My preferred avatar is a Gravatar which is connected to my email address, which has always been the same (MD5 091f411d57db5be8298e057a32e5ad72). The replacement seems to be a generic identicon with a different MD5. I don't recall seeing this identicon as an option in my profile before:    You'll notice that the gravatar is still visible as an option, but I can find no way to replace it on all sites in one go. I switched back to the gravatar one on Unix & Linux and noticed that the help next to the "Save" button says     Your profile will be updated on all public communities.   but alas, that did not in fact happen. Do I really have to go over 170+ member sites and manually select my gravatar on each?


The way I have seen a solution is very lengthy  to find the value  of x. Is there any easy way to get the value of x? I have tried   different formula and didn't get any shortcut  solution.

How to find  angle x without using calculator?  By using the trigonometric ratio formula, we can evaluate x but  in this case calculator is necessary.


Sup Guys,  Need help which is confusing. I have this calculator made using some methods. I would like to know if what I have done is a good way of writing it or is there any other better ways to do it. 2nd question is if you see the SWITCH CASE 5, if the user is prompted for Y/N the user can input various characters not sticking only to Y and N....how can I Limit the user to use only Y and N.  ****THIS IS MY MAINCALC JAVA FILE******  package calculator;  import java.util.Scanner;  public class MainCalc {  public  static  void    main    (String args []) {      Scanner scan = new Scanner(System.in);      Calcmethod calc = new Calcmethod();      char choice;       do {     System.out.println("<*-*-*-*-*-*>");     System.out.println("1. Add ");     System.out.println("2. Sub ");     System.out.println("3. Mul ");     System.out.println("4. Div ");     System.out.println("5. Exit");     System.out.println("<*-*-*-*-*-*>\n");      choice = scan.next().charAt(0);           switch (choice){      case '1': System.out.println("The CalcVal is:  " + "" + calc.calcAdd());     break;      case '2': System.out.println("The CalcVal is:  " + "" + calc.calcSub());     break;      case '3': System.out.println("The CalcVal is:  " + "" + calc.calcMul());     break;      case '4': System.out.println("The CalcVal is:  " + "" + calc.calcDiv());     break;      case '5': System.out.println("Are You Sure y/n??");                 choice = scan.next().charAt(0);                      if (choice !='n') {                 System.out.println("Thanks for using Calc!!!");                 System.exit(0);                 }                 break;     default: System.out.println("Wrong Choice of Selection - Please Select between 1-5 only");     break;          }//switch     }while (choice != '5');     scan.close(); } }     ****THIS IS MY CALCMETHOD JAVA FILE******  package calculator;  import java.util.Scanner;  public class Calcmethod {  Scanner scan = new Scanner(System.in);     public double calcAdd(){     System.out.println("Enter 1st Val:  ");     double x = scan.nextDouble();      System.out.println("Enter 2nd Val:  ");     double y = scan.nextDouble();      double res = (x+y);     return res; }  public double calcSub(){     System.out.println("Enter 1st Val:  ");     double x = scan.nextDouble();      System.out.println("Enter 2nd Val:  ");     double y = scan.nextDouble();      double res = (x-y);     return res; }  public double calcMul(){     System.out.println("Enter 1st Val:  ");     double x = scan.nextDouble();      System.out.println("Enter 2nd Val:  ");     double y = scan.nextDouble();      double res = (x*y);     return res; }  public double calcDiv(){     System.out.println("Enter 1st Val:  ");     double x = scan.nextDouble();      System.out.println("Enter 2nd Val:  ");     double y = scan.nextDouble();      double res = (x/y);     return res; }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Okay so I have $n$ black ball and $m$ white balls. How many bracelets can I make using all the balls? At first I thought there are $(n+m-1)!$ if all the balls were different. So we can divide into groups of $n!\cdot m!$ that look the same if you permute the black balls between them and also for the white balls.  However if I had $6$ white balls and $2$ black this would yield $3.5$ so clearly this can't be correct. How can I count this?  Is there a generalized version form for $k$ colors?

Given n distinct objects, there are $n!$ permutations of the objects and $n!/n$ "circular permutations" of the objects (orientation of the circle matters, but there is no starting point, so $1234$ and $2341$ are the same, but $4321$ is different).  Given $n$ objects of $k$ types (where the objects within each type are indistinguishable), $r_i$ of the $i^{th}$ type, there are   \begin{equation*} \frac{n!}{r_1!r_2!\cdots r_k!} \end{equation*}  permutations.  How many circular permutations are there of such a set?


I'm trying to put a stroke across an equation inside the cases mode. I tried both ulem and soul packages but I don't understand how they work in the cases environment.  This is what I got with ulem:    while if I use $ in \sout I got an error.  And here is the code:  \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{mathtools} \usepackage[normalem]{ulem}  \begin{document}  \[\begin{cases} \sout{f(x) \geq 0} \\ g(x) \geq 0 \\ \end{cases}\]  % \[\begin{cases} % \sout{$f(x) \geq 0$} \\ % g(x) \geq 0 \\ % \end{cases}\]  \end{document}

I would like to find a way to cross out a term in a mathematical expression with a diagonal arrow pointing from lower left to upper right and with a little "zero" next to the pointy end of the arrow.


I am using the IRF540N. Its gate to source threshold voltage is 2v - 4V (VGS = VDS, ID = 250µA.)  Does "gate to source threshold" mean I need to apply voltage above 4V to the gate?  How is Id = 250uA related to the threshold voltage?  There is one more drain current in datasheet given a 33A.  In what situation do we need to use this?

This is a screenshot of IRF9640 MOSFET datasheet. Will you please tell me, what is meant by max and min value of Vgs threshold voltage. Also what they mean by test condition.  Whether the max and min values are only applicable for specified test condition? What will be the threshold voltage for a switching circuit and how the range varies?  My doubt is, for p channel mosfet to turn on Vgs < Vgs(th). For IRF9640 in what volt it will turn on -3 or -5? When i used in my application Vs is 6v and Vg is 3v hence Vgs=-3v but it won't turned on, Why? It turned on when Vgs=-3.3v.  If we consider -2v as threshold, it should turn on when Vgs=-3v. Why they given a range for threshold voltage. Whether we have to test each mosfet to know their threshold. What i am pointing is that, if we have two IRF9640, will Vgs(th) is differ from each other?


There are many sites on StackExchange. Way too many. You have a problem with your code, you don't know if you have to go to StackOverflow, CodeReview, Unix or any else website.  This is both confusing and frustrating.  People write questions on StackOverflow and they're told they have to open a new account (even if it's easy once the first is made, the thought of it can disturb most) on another website they've never heard of to ask their question. There is no indication that those websites exist. They have no indication that their question should be posted on another website.  I now even see SE sites on Arduino or Drupal development. What is wrong with merging those into a more general website? They have so much less questions than SO questions over Javascript or C. Why aren't there specific sites on Javascript or C, then? It makes absolutely no sense.  That's for the confusing part.  But SE sites are also frustrating because you're focused on your own problem which is to solve an answer and then what happens? People are nitpicking about which website your question should be posted on. This is just ridiculous: people take the time to nitpick about this nonsense and they don't help you because your question is not bad for this site but would be better on that one. It's just frustrating.  What should be done?   Merge the websites meaningfully. Use tags. Tags are useful and help everyone filter what they want and in search engines, they can scope the question. Focus on giving a better experience to users rather than pushing on the nitpicking and dividing the community.

have already been created through .  have already completed their beta stage and are waiting for launch.  are in public beta stage.  are in commitment phase in   proposals are listed in   Now it is really confusing to find a suitable site to ask a question. As an example - I host a blog using . Now I have a question about this hosting. I want to post it in a . Where will I post? I have 2 options available now.     Are developers trying anything to solve this confusing matter?


In the pom.xml, I always specify the <version> of the dependency or plugin I am using.  Is there a way to tell Maven I always want the latest version downloaded without explicitly updating the version number every time?

In Maven, dependencies are usually set up like this:  <dependency>   <groupId>wonderful-inc</groupId>   <artifactId>dream-library</artifactId>   <version>1.2.3</version> </dependency>   Now, if you are working with libraries that have frequent releases, constantly updating the <version> tag can be somewhat annoying. Is there any way to tell Maven to always use the latest available version (from the repository)?


I don't know why the tests fail even if the lists are the same [13] [, abc, Abjh45, ch1, 5662, ch2, ch3, ch4, ch5], abc ✘ expected: listes.PureListString@5b94b04d<[, abc, Abjh45, ch1, 5662, ch2, ch3, ch4, ch5, abc]> but was: listes.PureListString@8c3b9d<[, abc, Abjh45, ch1, 5662, ch2, ch3, ch4, ch5, abc]>  Here is my code of addLast() method     public PureListString addLast(String elt) {         PureListString newCell = new PureListString(elt);         PureListString head = new PureListString(this.first);         PureListString tmp = this;         if (tmp == EMPTY_LIST)         {             return newCell;         }         newCell = tmp.tail.addLast(elt);         head.tail = newCell;         head.size = tmp.size + 1;         return head;     }   and this is the constructor      public PureListString(String elt) {         this.first = elt;         this.tail = EMPTY_LIST;         this.size = 1;     }   this is my equals method     @Override     public boolean equals(Object obj) {         if (!(obj instanceof PureListString)) {             return false;         }         PureListString p = (PureListString) obj;         if (size() != p.size()) {             return false;         }         if (!isEmpty() && !p.isEmpty()){             if (getFirst() != p.getFirst())             {                 return false;             }             return removeFirst() == p.removeFirst();         }         for (int i = 0; i < size(); i++) {             if (get(i) != p.get(i))             {                 return false;             }         }         return true;     }  The test method     public final void testAddLast(PureListString self, String elt) {         assumeTrue(self != null);         // Invariant         assertInvariant(self);          // préconditions         assumeTrue(elt != null);          // Purity         saveState(self);          // Exécution         PureListString result = self.addLast(elt);          // Post conditions         assertNotNull(result);         assertNotSame(result, self);         assertEquals(result.getLast(), elt);         assertTrue(result.size() == (self.size() + 1));         for (int i = 0; i < self.size(); i++) {             assertEquals(self.get(i), result.get(i));         }         if (self.isEmpty()) {             assertEquals(result.getFirst(), elt);             assertTrue(result.removeFirst().isEmpty());         } else {             assertEquals(result.getFirst(), self.getFirst());             assertEquals(result, self.removeFirst().addLast(elt).addFirst(self.getFirst()));         }          // Purity         assertPurity(self);          // Invariant         assertInvariant(self);     }  Please Note that I cannot change the test methods.


If beautiful is full of beauty then why is awful a negative and not a positive? If it fills one with awe, should that not be a positive? (Awesome and awful seem to be the same)

How did the English language come to this?       The play was awful.     Is the complete opposite of     The play was awesome.   But if you break it down to awe followed by ful or some, it doesn't make sense at all. Can someone shed a light on this?  Is there a rule to this, or is it one of those things you need to just memorize?


I started to flick through Needham's Visual Complex Analysis and pretty much fell on my face in the first exercise.  On page ix, he shows a proof that $dT/d\Theta = 1 + T^2$ if $T = tan(\Theta)$.  He does so by comparing the black triangle with the initial triangle (grey). What I don't understand is why the length of the one segment is $L*d\Theta$. I'm sure I'm lacking some basic math here.....   Shouldn't the length be $L*tan(d\Theta)$ (which obviously would be less helpful)?

I was reading Needham's Visual Complex Analysis, and could not figure out how we get length $Ld\theta$ here:


I'm working in matlab and I need to get a very precise time measurement. The accuracy I need is at least 1ms (and preferably much better than that). It needs to be a timestamp and not just a duration measurement, because I need it for clock synchronization. Answers for python can also help.  For clarification - I know how to get the current time. My problem is with the accuracy. As far as I know, the "clock" function is not accurate enough.

What is the module/method used to get the current time?


There was an update around the 17th or 18th. Now, I see that all of the sites have been updated as of the 25th. I know that there was a time when a weekly or every-two-week update cycle was planned, but I couldn't find any confirmation of this having been implemented. The  still says monthly, but there had been a delay of a few months at one point, so I'm not entirely sure that the FAQ is trustworthy on all points. Every other post that I've found about the Data Explorer is at least a few months old, and this appears to be a recent change.

promised that data.SE would "soon" get live data:     I realize it's a long weekend, but given that data.SE is now over 2 months out of date, it would be nice if this was finally rolled out.


I have a object contains some companies name. when I am doing changes in var m which is copy of var j then var j is also updating. How can we prevent that  var j= {'a':'tata','b':'suzuki'} var m= j m.a='bmw' console.log(m) console.log(j)

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


Standard model shows zero mass for neutrino and seesaw model explains why the neutrino mass is so small. But to show that the neutrino mass is small, the mass should be originated by some mechanism. If this mechanism is not higgs mechanism then what is it? Kindly please provide the mathematical calculations associated with it.

I was reading the CernCourier, my favorite source of message on Higgs and friends. I was rather shocked, when I saw this:     "The mechanism by which neutrino mass is generated is not known."   What? Not known?  says: In Higgs-based theories, the property of 'mass' is a manifestation of potential energy transferred to particles when they interact ("couple") with the Higgs field, which had contained that mass in the form of energy.  Does this mean that neutrinos don't couple to the Higgs field?


How can I display only date while using getdate() function?  When I am using   select getdate() as Today's Date   It is giving me:  2016-05-18 08:32:07.100   But I only need:   2016-05-18   How to get this?

SELECT GETDATE()   Returns: 2008-09-22 15:24:13.790  I want that date part without the time part: 2008-09-22 00:00:00.000  How can I get that?


I'm trying to learn some python and ran into some trouble with the random function combined with a for loop. The full code to run:  global_n = 3 import random class InputNeuron:      connections = list(range(global_n))     connection_state = list(range(global_n))      def __init__(self, n):         self.n = n  my_inputs = list(range(global_n))  for i in range(0,global_n):     my_inputs[i] = InputNeuron(global_n)  for i in range(0,3):     for j in range(0,3):         my_inputs[i].connections[j] = random.uniform(-1.0,1.0)         my_inputs[i].connection_state[j] = random.uniform(-1.0,1.0)  for i in range(0, global_n):     for j in range (0,global_n):         print("Neuron", i, "connection", j, "is", my_inputs[i].connections[j], "and", my_inputs[i].connection_state[j])   I realise this code has many flaws, what I however cannot seem to grasp is why my random function is not working correctly. Specifically, as can be seen in the output when you run this, each "neuron" has the same output for the respective "connections" 0, 1 and 2. As far as I can tell this part of my code:  for i in range(0,3):     for j in range(0,3):         my_inputs[i].connections[j] = random.uniform(-1.0,1.0)         my_inputs[i].connection_state[j] = random.uniform(-1.0,1.0)   Should assign random values to each of these values so that neuron 0, connection 0 and neuron 1, connection 0 should have different values.  I'm probably overlooking something obvious so apologies in advance, but after trying for literally hours now to fix this I'm very close to giving up on trying to figure out what is wrong.

Is there any meaningful distinction between:  class A(object):     foo = 5   # some default value   vs.  class B(object):     def __init__(self, foo=5):         self.foo = foo   If you're creating a lot of instances, is there any difference in performance or space requirements for the two styles? When you read the code, do you consider the meaning of the two styles to be significantly different?


I have a CAD file to convert into shapefile. Unfortunately, I don't have access to AutoCAD, MapInfo or ArcGIS atm. All I have access to is QGIS.  I'll need to convert this CAD file to shapefile to be used in a specialised software which can use/edit shapefile.  I tried couple of online tools without any success. Any help? BTW the size of the CAD file is less than 2MB.

I have a lot of DWG files like basemap, and water and wastewater network.  How do I import these files into my QGIS project?


I would like to ensure that a bunch of classes all have this particular static function with the same name to be called on.  The best way to do so is to have every class implement my interface.  But alas, interface don't do static, is there anyway to get around this?

Why was C# designed this way?  As I understand it, an interface only describes behaviour, and serves the purpose of describing a contractual obligation for classes implementing the interface that certain behaviour is implemented.  If classes wish to implement that behavour in a shared method, why shouldn't they?  Here is an example of what I have in mind:  // These items will be displayed in a list on the screen. public interface IListItem {   string ScreenName();   ... }  public class Animal: IListItem {     // All animals will be called "Animal".     public static string ScreenName() {         return "Animal";     } .... }  public class Person: IListItem {      private string name;      // All persons will be called by their individual names.     public string ScreenName() {         return name;     }      ....   }


EDIT: I appreciate people who answered below. But it does not answer the question, so I will clarify my questions:  -It seems like everyone is saying that time passing is actualized by physical process happening. But wouldn't that mean that photon can never change, as no physical process could happen to it? Then how could photon be absorbed, and whatever other thing that could happen to it.  -We start with this spacetime. At the present moment, I am at a point in spacetime. Which other part of this spacetime constitute "universe at present time"? And if I perceive something happen (say an explosion on a star), what allow me to determine whether it happens at the present, or X amount of time ago?  ==========  Original question: I was just starting to have a look of general relativity, which have an assumption that basically say that time itself is relative. As I was reading this article:   I saw the sentences "So here is one natural notion of the universe: all of three-dimensional space at the present time. Call it the nowverse." Now this strucks me as odd. We knew for a long time that there are no absolute space: it makes no sense to say that an object stay at the "same place". Then what does that means to say "present time". In a more general term, what does it mean for time to pass for an object? Specifically, if an object perceive event A followed by event B, what does it means to say X amount of time elapsed between the 2 events? Since there are no global time coordinate, we can't just take the time coordinates of these 2 events and find the differences. And I am looking for an answer that tie the concept of time pass to actual physical phenomenon, so "length of the object's world line" won't work, since the metric tensor is an even more abstract object.  (the "How can time be relative?" question is about discrepancy between intuition and physics, while this question already assume the physics is correct; in particular, that question does not explain how can people say "the universe at present time")

I don't understand how time can be relative to different observers, and I think my confusion is around how I understand what time is.  I have always been told (and thought) that time is basically a measurement we use to keep track of long it has been since an objects inception.  If that is even somewhat true, how can time be relative? If I have a rate of decay of X and you are somehow able to observe that (such as watching me age) how could I age at a different rate to 2 observers?  If time slows down the faster you go, does that mean you age slower? Or do you age at the same rate, only it seems like it takes longer? If a second is currently defined as the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium-133 atom at 0K, how can that change at higher speeds? Assuming the temperature stays the same, shouldn't the measurement be the same?  Moving faster surely can't cause cells to decay slower, or atoms to radiate slower...can it?  Can someone explain, in the simplest of terms, how time can be relative?


In order to use strings I need to include the string header, so that its implementation becomes available. But if that is so, why do I still need to add the line using std::string?  Why doesn't it already know about the string data type?  #include <string>  using std::string;  int main() {     string s1; }

Why do we need both using namespace and include directives in C++ programs?  For example,   #include <iostream>  using namespace std;  int main() {  cout << "Hello world"; }   Why is it not enough to just have #include <iostream> or just have using namespace std and get rid of the other?  (I am thinking of an analogy with Java, where import java.net.* will import everything from java.net, you don't need to do anything else.)


Im setting up postfix SMTP relay, that will be placed right after Exchange server.   Details: 1) postfix server name mail.server.com 2) we have several domains: a-domain.com, b-domain.com and etc..  I need to rewrite somehow emails headers. So recipient will not receive email like:  Received: from mail.server.com ([XX.XX.XX.X])  But will receive it from mail.a-domain.com ([XX.XX.XX.X]) if sender is user@a-domain.com OR from mail.b-domain.com ([XX.XX.XX.X]) if sender is user@b-domain.com  is this possible anyhow?

I've a single host with CentOS 6.3. I manage that host via SSH. The server itself is uname -n: servername.foo.com. On this host I've multiple, unrelated httpd vhosts.  The problm is: when one vhost sends a mail with PHP mail(), the sent mail header contains multiple servername.foo.com traces (Message ID is xyx@servername.foo.com, Received by is servername.foo.com and so on).  The mail are sent by postfix. No other mail services are used on this server.  The question is: how can I sent e-mail from each vhost pretending to be thatVhost.com instead of leaving traces of servername.foo.com in the mail headers?


I'm in troubles with postfix, hostname and google spam.  I have a virtual server, that hosts a few domains. Each domain has mail, lets, say info@thatdomain.com. One of those domains, lets say special.com, has MX record with mail.special.com and roundcube is set up to use this mail.special.com smtp.  When I send mail from each mailbox (via roundcube) it's ok, all the mail will be delivered, but google marks them as spam and put them into Spam folder.  I've tried to look aroud a bit and I've found that it may be caused by wrong /etc/hosts or machine hostname or myhostname in postfix main.cf  Info I can provide:  Current machine hostname  vps   Current myhostname in main.cf  vps   Part from recieved mail that is in spam folder (interesting)  Received-SPF: neutral (google.com: SERVER_IP_ADDRESS is neither permitted nor denied by best guess record for domain of info@thatdomain.com) client-ip=SERVER_IP_ADDRESS; Authentication-Results: mx.google.com;    spf=neutral (google.com: SERVER_IP_ADDRESS is neither permitted nor denied by best guess record for domain of info@thatdomain.com) smtp.mail=info@thatdomain.com Received: from vps (vps [SERVER_IP_ADDRESS]) by vps (Postfix) with ESMTP id 26E2D122371C for <myemail@gmail.com>; Wed, 10 Jul 2013 17:00:57 +0200 (CEST)   thatdomain.com (not special.com) SPF record value  "v=spf1 include:_spf.google.com ~all"   I think there is something really wrong, but I dont know what is that.  Can u guys please help me out?  Thanks in advance.

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


The Night King destroyed the wall and Castle black in Game of Thrones season 7. However, in the ending scenes of season 8 we see that the wall is Intact?

At the end of Game of Thrones season 7, we saw the Night King's army destroy (at least part of) the Wall. At the end of S08E06, we see Jon go      north of the Wall.   In those final shots, the Wall seems to be intact. Has it been repaired? Why is there no visible damage?


How do I install Ubuntu into a separate pre-created partition in windows 10 and is a 30GB partition sufficient?  This is in relation to

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


Lets say we have $\Bbb{R}^3$ and a three dimensional subspace of $\Bbb{R^4}$, call it $E$. Why is it that these spaces are not the same vector space? Does it have something to do with bases?

I cannot understand why $\mathbb{R}^2$ is not a subspace of $\mathbb{R}^3$.   My reasoning is as follows: Choose any elements $v_1$ and $v_2$ from $\mathbb{R}^2$, add them together you get an element of $\mathbb{R}^2$ and same for scalar multiplication and $0$ vector is an element of $\mathbb{R}^2$. So where did I go wrong?


If there is a spaceship hovering above a black hole so that it can get away, what would happen if the spaceship connected a rope to itself and dropped the rope in? Could you pull the rope out?

No long explanation is needed,  What would happen if I were to allow one end of a rope to fall past the event horizon of a black hole while I held the other end?  Would I be able to pull it out? Would the rope feel extremely (infinitely?) heavy?


public static void main(String args[]) throws IOException     {         String s1="abc";         String s2="xyz";         String s3="abcxyz";          String s4=s1.concat(s2);         System.out.println(s4);         @SuppressWarnings("unused")         String s5=s1+s2;          if(s3==s4)         {             System.out.println("true");         }         else             System.out.println("false");     }   Why the o/p is coming as false? According to me it should be true. Can someone please explain

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


How to prove that $\Bbb Q(\sqrt 2)$ and $\Bbb Q(\sqrt 3)$ are not isomorphic. I thought that they are but I got this problem in Dummit Foote Section 14.1. Question no 4. As they extension over $\Bbb Q$ by the polynomials $x^2-2$ and $x^2-3$ resp.

I'd like to show that for $p,q$ distinct primes, the extensions $\mathbb Q(\sqrt p),\mathbb Q(\sqrt q)$ are not isomorphic. I don't really have knowledge of the "high-level language" of algebraic number theory, so my approach is going to be very bit-wise, if you will.  Here's my try:  If there were such an isomorphism, call it $\varphi$. I know that we must have: $$\left\{\begin{align}&\varphi\mid_{\mathbb Q} = \text{id} \\ &\varphi(\sqrt p) =\pm\sqrt p \end{align}\right.$$  So essentially the existence of $\varphi$ means that for any $a+b'\sqrt p$ there exist $c,d$ such that $\varphi(a+b'\sqrt p) = a+b\sqrt p = c+d\sqrt q$ (where $b$ might be a sign change of $b'$). Take, to simplify $a=0, b=1$. Let $\alpha = \sqrt p - d\sqrt q = c$, from above. We can rearrange to obtain $$\begin{align}&(\alpha-\sqrt p)^2 = d^2q \Rightarrow \\ \Rightarrow& \ \alpha^2 - 2\alpha\sqrt p + p - d^2q = 0 \\ \Rightarrow& \ \sqrt p -\frac{c^2+p-d^2q}{2c} = \sqrt p - \lambda = 0\end{align}$$  But then it has to be that $(x^2-p) \mid (x-\lambda)$, which cannot be.  This proof however doesn't satisfy me for two reasons. First of all, I'd like to have stopped at the polynomial I found in $\alpha$,  shown that it was irreducible in $\mathbb Q(\sqrt2)$, and argued in terms of extension degrees. However I don't know how to show that. The second reason is that I'm not using the primality of $p,q$ other than having it imply the irreducibility of $x^2-p$. It seems to me from the way the exercise is worded that if they were compound and $x^2-p,x^2-q$ were still irreducible, we might have a homomorphism.  Can someone clarify?


In my program, I have 2 spinners: one shows a list of 3 numbers (as strings: one, two, and three), and another shows a list of countries: USA, Canada, Mexico, and Brazil. I also have a button that when tapped, goes to another activity/screen in android studio.   My question is, how should I use the variables returned from a spinner to go to another activity in android studio?   Here are the things I know:  The variables from the spinner 'exist' and can be used; I tried displaying them, and the TextView displays them. Here is the code that initializes the spinners:   //INIT SPINNER 1 Spinner spinner = findViewById(R.id.spinner); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.numbers, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); spinner.setOnItemSelectedListener(this);  // INIT SPINNER 2 Spinner countries = findViewById(R.id.spinner2); ArrayAdapter<CharSequence> adapter2 = ArrayAdapter.createFromResource(this, R.array.countries, android.R.layout.simple_spinner_item); adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); countries.setAdapter(adapter2); countries.setOnItemSelectedListener(this);   and here's the code that displays the two variables in one TextView:   TextView display = findViewById(R.id.display_spinner); String text1 = spinner.getSelectedItem().toString(); String text2 = countries.getSelectedItem().toString(); display.setText(text1+text2);   The button, when used without any conditional statements relating to the spinners' variables, it opens a new activity. This is code for just opening a new activity by default:  //BUTTON INIT button = (Button) findViewById(R.id.open_india); button.setOnClickListener(new View.OnClickListener() {     @Override     public void onClick(View view) {         openIndia();     } });   Also, when using a simple conditional such as   if(4-3 == 1){    startActivity(intent); }   the code works perfectly, and when I click the button on the emulator, I go to another activity/screen.   My question is, how do I use the variables returned from a spinner to determine whether or not to go to another activity/screen? I have the code for it, but for some reason, the button just decides not to go to the next activity.  The variables are set VARIABLE.toString(), so I know that the variable is a string, so it makes sense that it can be compared to another string.   String text2 = countries.getSelectedItem().toString(); if(text2 == "India"){     startActivity(intent); }    Could anyone shed some light on this issue?


A sugar daddy messaged me on Instagram. I was having a hard time so I responded, and he said he would send me money and didn’t expect anything in return.  He then he asked for my bank account info which I stupidly gave him, because I had no money in my account. He deposited 200$ and said I had to withdraw it. I tried a couple times and it didn’t work. Then I got locked out of my account. I blocked the guy because I found out he had transferred the money to some random person. I went to my bank to get my account unlocked. I was embarrassed and acted like I had no idea why I was locked out. They said I had to call fraud, so I did and they said I had to go to my bank and tell them what happened.  I’m terrified to tell them in person, but I have to to get my account back. Also I am 16. Will I get in trouble for accepting money from someone over age? Will they need my parents to come in?

I met a guy on a sugar daddy dating site and we talked, I told him my situation and he said he would help.   He asked for my bank account information and I told him you can use cash app or PayPal to go through. He said his account manager deals with his finances. So I set up an account with a bank that I don’t use so that my primary account isn’t used.  Eventually he was in the process of sending me money and we had agreed on a amount that wasn't crazy. But then he asked for my address and I asked why and he said just wondering. Then said he wanted to send me a surprise for being his baby. Which I didn’t give.  Then later on he sent the money and said he sent me a bonus and that I was supposed to use that to pay his mothers caregiver, which he didn’t mention until after.  I kept questioning him and he was saying that he works in construction and he’s trusting me to carry out the errand. Then he said don’t let him down and I asked him if he was threatening me and he kept saying I need this done but didn’t really answer my question.  Am I being scammed? I’m about to change my password but is this a scam?


Usually when we think about paying off mortgage it always seems a good idea as this is one of the biggest debt for most people. I was curious if there are any disadvantages of paying off mortgage excluding reasons:   You should pay off high interest debt first such as Credit Card debt, other debt. You should invest first if your investment rate of return is higher than your mortgage interest.   I'm looking for more information on item listed below and other disadvantages:   Tax treatment / capital gain when you sell your house. Anything else...

I have been in USA for 10 years and most people I know have 30 years mortgage which they do not prefer to pay-off even though they have cash hoping to make money in stock market.  Now, say mortgage rate is 5% and s&p 500 returns 9%(which has been a historical average for last 100 years.).At this rate, some one decides to invest the extra cash that they have in stock instead of paying off the mortgage is basically saying I am going to make those (9-5 =4%) in stock market.   That does not make sense considering that when you use that money to pay-off mortgage then you are making a guaranteed return of 5%(by not letting bank make that money from you). When you invest in stock market instead of paying-off your mortgage you are only making 4-5%(remember its not 9% its 9-5= 4%). Also, that is ONLY IF you make money. Stock market can be volatile(Remember 2008?). Also, you pay 15% long-term capital gain tax on it if you make money on that investment.  OK. so I am from India where people normally buy properties for cash and I have aslo heard rumors about some Chinesse real-estate investors buying american properties for 100% cash.  Which means there are significant number of people in the world who do believe that paying interest to the bank for 30 years may not be best of the ideas.     Why do people choose a may-be 5% as oppose to a guaranteed 5% when   they choose to invest instead of paying off mortgage?


Can $n!$ be the product of $k$ consecutive integers for $k > 1$? (Not including the degenerate cases such as when $k = 2$, then $1\cdot2 = 2!$ and $2\cdot 3 = 3!$, and so on.)  I am asking not for $n!$ to be divisible by $n$ consecutive integers, I am asking for $n!$ to equal the product of $k$ consecutive integers, implying that $n$ is not necessarily equal to $k$ (And when $n = k$, then clearly there exists an answer, namely $n! = (1)(2)(3)...(k)$)

I was playing around with hypergeometric probabilities when I wound myself calculating the binomial coefficient $\binom{10}{3}$. I used the definition, and calculating in my head, I simplified to this expression before actually calculating anything $$ \frac {8\cdot9\cdot10}{2\cdot3} = 120 $$ And then it hit me that $8\cdot9\cdot10 = 6!$ and I started thinking about something I feel like calling generalized factorials, which is just the product of a number of successive naturals, like this $$ a!b = \prod_{n=b}^an = \frac{a!}{(b-1)!},\quad a, b \in \mathbb{Z}^+, \quad a\ge b $$ so that $a! = a!1$ (the notation was invented just now, and inspired by the $nCr$-notation for binomial coefficients). Now, apart from the trivial examples $(n!)!(n!) = n!$ and $a!1 = a!2 = a!$, when is the generalized factorial a factorial number? When is it the product of two (non-trivial) factorial numbers? As seen above, $10!8$ is both.


Replacing a word with a phrase, but not in the case of a euphemism. Example: replacing "United Nations" with "Headquarters of Peace" so the sentence would be, "It would cause war in the headquarters of peace."

I know there's a word to describe the use of the words "City Hall" in the common phrase "you can't fight City Hall", where "City Hall" = "the office of the mayor of the city", but I can't remember what it is. I don't think it's anthropomorphism but the proper term has been on the tip of my tongue all day and I just can't bring it to mind.


I have a very large batch of images that I need to resize. I am new to Photoshop (have used Elements for years) and I am unsure how to do this.  Basically, all the images are currently 2000 x 2000. They are product silhouettes so the item is in the middle, surrounded by white space. I need to resize them to 1768 x 2160 and keep an aspect ratio of 140 x 171.    Is there any way to do this. If so, step by step directions would be amazing! I don't want to make any errors.

I have hundreds of product image layers and I am trying to resize them all to the same height (ignoring the width) and retaining their individual aspect ratio's.  Is there a script available that does this? Or a feature I am unaware of?  Thanks!


I am trying to figure out how if there is an easy way in Blender Cycles to UV Project an image and nave it so it only appears once across the mesh.  I have attached a screen shot of the bottom corner of a rectangular plane where I want to project the image, but only have it appear on the front face.   As you can see the image is currently repeating and tiling onto the sides and back of the mesh. I want to eventually have the material appear as glass and be semi transparent. having the image tile across the back will become problematic.  Any suggestions would be greatly appreciated!

Update  As of 2.76 there is a .    In Blender Internal there was an option to turn this off (called )  Is there a way to do this with Cycles? I know you can just scale your textures up with a transparent background, but you end up with textures much bigger than they need to be.  Is there a way to this, and if not, why not?


I'm learning python and have written a small script that pulls data from a webpage and displays it on the screen.  It assigns a variable to each item it pulls from the webpage. I have a variable that has two out comes.  ham_lic = Active  or  ham_lice = Expired  It then prints that value to the screen.  print "License: ("+ham_lic+")"+"\n"  I'm trying to figure out how to print the license status red when the value is 'expired' and green when the value is 'active'.  Even just reference material would be greatly appreciated.

How can I output colored text to the terminal in Python?


How do you size the camera to fit the size needed on the youtube channel art? It says it's too small when I upload the image. I need to make the camera at least 2048 x 1152 pixels. It would be nice to have it at 2560 x 1440 pixels though. I tried the other questions, but it didn't make it any wider than it was before. The Y and X values under Resolution in Dimensions Under Render Settings just made the camera taller.

I want to render an image that is, for example, 170 px by 180 px. How can this be done in blender? I'm using the cycles render. Is the process any different for an animation?


Which is correct expression using comma or not in front of last object when listing several objects?  ... A, B, C and D. ... A, B, C, and D.

I have seen many sentences like this:     "Capitalism, Socialism, and Anarchism"   and this:     "She was happy, and cheerful"   Do we have to use a comma before "and", or is it incorrect?  If it is not, then why?


I know that when you substitute X for Y it means that you replace Y with X. According to this rule, I need to make sure whether the following pairs mean the same or not. If not, then why?     1.a. Yesterday l, I argued with the Boss and I think he's going to replace me with Sam. (The boss is going to fire me from the company and bring "Sam" as a permanent replacement for me.)     1.b. Yesterday l, I argued with the Boss and I think he's going to substitute Sam for me.    And:     2.a. While I'm away on vacation, another teacher will substitute for me.    2.b. While I'm away on vacation, I will be replaced with another teacher

I have a question about the words order and their effect on the meaning of a sentence when it comes to use the verbs "replace" and "substitute"!  As far as I know, "to replace someone / something with someone / something else" means "to substitute someone / something for someone / something else".  Additionally, as far as I am concerned, if you are replacing A with B, then you are substituting B for A.  But problem is that if changing the words' places in each structure makes any difference in meaning?  For instance, does it make any difference if I say:         Yesterday, I had a terrible quarrel with the company's directing manager and they are going to replace me with Sam Or substitute Sam for me.           Yesterday, I had a terrible quarrel with the company's directing manager and they are going to replace Sam with me Or substitute me for Sam.       Let me simplify it! The inly thing that is important in the meaning of the two is that:  (Replace X with Y = Substitute Y for X)  But I need to know if replacing X and Y has a specific connotation in English? For example, in:      1.a. They  are going to replace Sam with me.    1.b. They  are going to substitute me for Sam.     ..........................      2.a. They  are going to replace me with Sam.    2.b. They  are going to substitute Sam for me.     I was wondering which set implies that I was the first employee and Sam is taking my place?  Also which set implies that I as a new employee am taking Sam's place?  I hope I could make myself understood.   Thank you.


I know that $0^0$ is one of the seven common indeterminate forms of limits, and I found on wikipedia two very simple examples in which one limit equates to 1, and the other to 0. I also saw here:   that you can define $0^0$ as 1 if you'd like.  Even so, I was curious, so I did some work and seemingly demonstrated that $0^0$ always equals 1.  My Work:  $$y=\lim_{x\rightarrow0^+}{(x^x)}$$  $$\ln{y} = \lim_{x\rightarrow0^+}{(x\ln{x})} $$  $$\ln{y}= \lim_{x\rightarrow0^+}{\frac{\ln{x}}{x^{-1}}} = -\frac{∞}{∞} $$  $\implies$ Use L'Hôpital's Rule  $$\ln{y}=\lim_{x\rightarrow0^+}\frac{x^{-1}}{-x^{-2}} $$ $$\ln{y}=\lim_{x\rightarrow0^+} -x = 0$$ $$y = e^{0} = 1$$  What is wrong with this work? Does it have something to do with using $x^x$ rather than $f(x)^{g(x)}$? Or does it have something to do with using operations inside limits? If not, why is $0^0$ considered indeterminate at all?

Could someone provide me with a good explanation of why $0^0=1$?  My train of thought:  $x>0$  $0^x=0^{x-0}=0^x/0^0$, so  $0^0=0^x/0^x=\,?$  Possible answers:   $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined   PS. I've read the  on mathforum.org, but it isn't clear to me.


Are there any software to batch-align copies of a picture so that they are in same position ? These picture were clicked with a handheld camera.  They are all landscape shots taken at different parts of the season from the same location.  This is a sample of one of the images.

Do you know any open source tool to automatically align images, similar to the auto align feature in Photoshop?


When cooking a curry using meat that has been marinaded in yoghurt tikka masala for instance, I have noticed that it often curdles/splits/gets grainy when cooked. I use 3.5% fat yoghurt, Balkan style - but this tends to happen with any yoghurt. Is there a way to prevent that from happening?   Any advice at all on this subject would be helpful!

A lot of my favorite curry recipes have a yogurt based sauce in them, but on a pretty regular basis when I make them, the yogurt ends up splitting into basically curds and whey. What causes that, and how can I prevent it?  As an illustrative example, last night I made a simple tofu curry as follows:   warm evoo in a pan add chopped onion, saute briefly add curry seasonings, allow to warm/season the oil add cubed tofu, toss to coat cook for a while, tossing periodically to lightly brown the cubes turn heat off add plain greek yogurt stir to combine   In the few minutes it took to finish the rest of the meal and start plating, the yogurt had separated so I had a clumpy, lumpy, yogurt soup instead of a smooth creamy sauce.


I hit a button, I'm not sure which one, and everything except the 3D view window disappeared completely. I assume they're just hidden, but outside of the HOTKEY I DON'T KNOW, there's no way to get the menus back and I'm kind of freaking out right now so please, if you know a fix, can you post it? There's NO menu bar, there's NO timeline, what you see in the screenshot is everything I can access outside of the tools and transform menus with the n and t hotkeys.

My friend who has only recently downloaded blender has come across a workspace issue. He said he accidentally pressed a button and it has entirely changed his user interface/ Workspace. He can't open, save or do anything with the change.    This is a full window image!


I started this  on quantum computing (Nielsen and Chuang). I have gone through the first chapter but I need to really understand the concepts; what should I do? Should I cover some background topics or move to some other book. By the way, I have done Bachelors in Computer Science; I never studied quantum before but I started this book so I can start research on quantum algorithms.

I am from a computer science background and I find it difficult to decide on the resources I should focus on while learning quantum computing, since there is so much to read/watch. My ultimate goal is to make a programming language acting as an interface between quantum computers and the person similar to 1972 when C was made. As a realistic intermediate stage, I would like to get to the point of writing programs on IBM's QISKit.  For that, I would need a schematic study guide in order to acquire the necessary background in Physics and the related fields required to dive into the field of quantum computing. Does this already exist: an ordered list of indispensable concepts and abilities to master, which if possible also mentions adequate material to acquire each of them?  Assume a high school level physics knowledge. Provide a study guide i.e. from beginner to expert kind of guide. Try to list video/book resources that one should follow in a chronological order so as to become an expert in the field of quantum computing to the level I can write my own quantum computing language (assuming already have other CS skills to write the language).


I upgraded to Windows 10 from 7. I have 2 monitors with the same resolution arranged horizontally.  If I move the mouse cursor to the top or bottom of one monitor, then try to move it to the other monitor, the mouse cursor catches in the corner and won't go to the other monitor. I need to move it slightly down or up to get to the other monitor. This is infuriating.  How do I fix the mouse corner issue?  I found , which sounds similar, but it seems the settings have changed since Windows 8 as the solutions do not work for Windows 10.

It seems Microsoft has tried to solve this problem .  In Windows 7, there is no boundary between monitors and the mouse can move freely across the top of the screen between my 3 monitors, provided I had set their heights equal in display settings. Windows 8 introduced sticky corners. See .  Windows 10 got sticky corners as well. There are a few pixels at the top corners of each display where the mouse cannot cross over onto the other display. One must move the cursor down to avoid this region in order to get to the next display.  The image shows roughly the region where mouse movement is not permitted in Windows 10, but is allowed in Windows 7.    Personally, I had no problem with unrestricted mouse movement across the top of my screens - I got used to "aiming" for the x, and the convenience of unrestricted cursor movement. Like all the people who wanted to disable it in W8, I'm wondering if there is a way to disable it in W10.  Edit to address possible duplicate:  Although the problem is identical to the one in , solutions to solve the problem in W8 involving editing the registry key MouseCornerClipLength do not work in W10, since that registry key is not present in W10. Also adding that key and setting the value doesn't work. I searched the entire registry and couldn't find it in another location. No other W10 keys in the node referenced in the W8 solution are obvious replacements.  Edit to address possible solutions in comments  harrymc's  and  that worked for for Windows 8.1 do not work in Windows 10.


I logged on to my Twitter on my dad's computer once and forgot to log off. He now constantly checks my Twitter to see if there is any activity because he does not know I have an iPod.  And he knows something is up because there are tweets in the morning and he thinks I'm using his computer.  How do I log him out of my Twitter without having to go on to his computer?

I just changed my password, but one time I used my friend's mobile phone to access my account using the add account feature. Sometimes she uses my account to write or read something, and she still accesses my account from her phone.   Can I log myself out of all instances of the account?


How do I use update_option to give me a new option name each time a form is submitted? The code I'm using now overwrites the database value. Instead I need to have a new address saved each time.  The code:                      // assign addrss to var                     $address = esc_html( $_POST['address'] );                      //assign JSON object to var using geocodeing function('address') input                      $address_results = boj_gmap_geocode($address);                      // transfer data to options array                     $options['py_name'] = $py_username;                     $options['address'] = $address;                     $options['coords']  = $address_results;                      // create and name the option_name and set fields with $options array                     update_option( 'py_menu_item', $options );

I have a form on my front-page. It sends the entered address to Google API and returns the JSON to wp_options. That works fine. I am using update_option to do that, so it rewrites the meta_key each time. How would I go about having each address entered remain?    $address = esc_html( $_POST['address'] );    //assign JSON object to var using  geocodeing function('address') input    $address_results = gmap_geocode($address);    // transfer data to options array   $options['py_name'] = $py_username;   $options['address'] = $address;   $options['coords']  = $address_results;    // create and name the option_name and set fields with $options array   update_option( 'row_name', $options );


I am installing a server; I am preparing it for SSH traffic. I would like a script to be run (a dialog with the freshly connected user) every time a user from a certain group connects. How do I do this (kind of like in the SSH hook post)?  I want a certain a group, which i will just call users, who just want to launch a game server or something like that, to be able to do so with minimal headache. And my idea is to make a script, which launches everytime they connect, that takes their hand and allows them to execute different actions, all centered around that game server thing. I don't want admins to be bothered every time by that script.

Is there a way to run a script/command every time a user connects using ssh? Can it be configured globally (i.e run the script when any user login)?  I came across this question on Identica, but there is no answer yet and would like to know it anyway.


Will a shutterstock image work for this or do I need a better quality image?  This is shutterstock info: Large  |  10297 px x 3433 px  |  87.2cm x 29.1cm @ 300 dpi  Is my calculation correct: DPI will be 34? Is that too low if people will be standing 1m from artwork?

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?


I have setup a dual boot system in my home computer with XP and Ubuntu in that order. I want to know how to remove the linux partition without screwing up the bootloader?  I want to know this because I had this kind of setup before and to remove the linux partition I had formatted the linux partition from Windows (Disk Manager) and was not able to boot back into XP, since the MBR was screwed up. I had to use an XP install CD to fix the MBR and etc. I know what I have done was stupid and I am eager to learn the correct way.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


There are several answers to what Python's splat operator does (unpack lists or tuples into separate args inside the called function) but I can't find anything about the interesting side effect of how the splat operator coerces lists to tuples (effectively rendering passing a list with splat as being passed by value, not reference).   So, is it true that Python's splat operator coerces lists into tuples:  def test(*arg):     print(type(arg))     for a in arg:         print(a)  lst = ['roger', 'colleen'] print(type(lst)) test(*lst)           tpl = ('roger', 'colleen') print(type(tpl)) test(*tpl)   It seems to. The code above produces this output:  <class 'list'> <class 'tuple'> roger colleen <class 'tuple'> <class 'tuple'> roger colleen   I'm trying to solidify my knowledge of lists and tuples. I read  that      The differences between tuples and lists are,  the tuples cannot be   changed unlike lists and tuples use  parentheses, whereas lists use   square brackets.   I was at first surprised that calling test() with a list didn't let test() change the list (they aren't immutable). But they are when passed with the splat operator to function because they get coerced to a tuple. Right? I think!   Update: rkersh's comments said something that adds a lot of clarity:  test(*arg) isn't being called with a list, it's being called with the items in the list)--and those items are seen by *arg as a tuple.

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):