In Star Trek: First Contact, when the Vulcans come to Earth and meet Dr. Cochrane, the one very clearly says "Live long, and prosper."  But how would the Vulcans know how to speak English? Up until this point they considered mankind to be 'too primitive' for first contact, and likely wouldn't have bothered to learn any of the languages from Earth. This was also about 90 years before the creation of the universal translator. So how was it that they were able to communicate with Dr. Cochrane and the other humans?

In the 23rd century, it was displayed that Zefram Cochrane didn't know about universal translator. That's why he was unfamiliar with and asked about its working principle to Kirk (Star Trek: The Original Series). It means, he never encountered universal translator in 21st century when he was on Earth. Data banks of USS Defiant revealed in mirror universe that Hoshi Sato invented universal translator in the prime universe (Star Trek: Enterprise). At the time of first contact, she wasn't even born.   Both points say that Vulcans (the only interstellar party) didn't have universal translator technology at the time of the first contact. When it comes to non-universal species/language specific translator, its possibility was null because that was the first contact.  How did humans and vulcans really communicate during the first contact?


I just proved that any finite extension of fields is an algebraic extension. That is, given fields $F,K$ such that $K \subseteq F$ is a subfield then if we can view $F$ as a vector space over $K$ with finite base, then any element of $F$ is the root of a polynomial with coefficients in $K$.   I was told that the converse is not true. Do you know any example where an extension is algebraic but not finite?

It is true that all finite field extensions are algebraic. It is not true however that all algebraic extensions are finite.   In lectures we were given the example of the field extension  $$\mathbb{A}=\{\alpha \in \mathbb{C}: \alpha \text{ is algebraic over } \mathbb{Q} \}$$  I want to prove to myself that this is indeed a non-finite algebraic extension.   I have shown that $\mathbb{A}$ is a subfield of $\mathbb{C}$. Now I consider roots of the equation $x^n-2$ for $n \geq 1$. Clearly such roots are in $\mathbb{A}$ by definition. I think that if I show that for a given $k$, the root of $x^k-2$ (say $\psi_k$) does not lie in $\mathbb{Q}(\psi_1,...,\psi_{k-1})$, then I have proven the extension is not finitie (since this will hold for all $n$).  Can someone please confirm this reasoning and suggest how the proof could be finished.


When writing long equations using amstex split, is there a way to match delimiter sizes from one line to the next? Since we're "forced" to close them before the line breaks (using \right.), I'm not sure I understand how LaTeX would know from one line to the next which size to use (hence the difference in sizes).  In other words, in this equation:  \begin{equation} \begin{split} E_z = \frac{1}{4 \pi \epsilon _0} \int _{-h_-} ^{h_+} \left[ \frac{2 \left( z - z' \right) ^2 - r^2}{R^5} \int _{-\infty} ^t  I \left( z' , \dfrac{\tau - R}{c} \right) {\rm d} \tau \right. \\ \left. \frac{2 \left( z - z' \right) ^2 - r^2}{cR^4} I \left( z' , \dfrac{\tau - R}{c} \right) - \frac{r^2}{c^2R^3} \frac{\partial I I \left( z' , \dfrac{\tau - R}{c} \right)}{\partial t} \right] {\rm d} z' \end{split} \end{equation}   the square brackets on the first line are considerably smaller than the square brackets on the second line.

For mathematics, is it ever disadvantageous to use \left(  and \right)  in equations?  I can't see any way that doing this would hinder the typesetting, so why isn't () just converted into \left( \right) automatically? This would save a lot of typing.  Cheers!


0: phy0: Wireless LAN Soft blocked: no Hard blocked: yes 1: asus-wlan: Wireless LAN Soft blocked: no Hard blocked: no 2: asus-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 3: hci0: Bluetooth Soft blocked: no Hard blocked: no   above is list of rfkill list.. when i unblock hard block of wireless LAN..my connection is established but within 2 seconds it disconnect automatically..what should i do?

It worked with the pre-installed Ubuntu, but after re-installing Ubuntu dual-boot with Windows 8.1, the WiFi is not working.  Is there a driver for this adapter that will work on Ubuntu 12.04?


I'm new to C++ so I'm having trouble figuring out how to best remove an object from a vector while still iterating through it.  Basically, I need to iterate through two vectors. For every item, if the ID's match, I can remove them.  //For every person, check to see if the available bags match:         for(std::vector<Person>::iterator pit = waitingPeopleVector.begin(); pit != waitingPeopleVector.end(); ++pit) {             for(std::vector<Bag>::iterator bit = waitingBagsVector.begin(); bit != waitingBagsVector.end(); ++bit) {                 int pId = pit->getId();                 int bId = bit->getId();                 if(pId == bId){                     //a match occurs, remove the bag and person                 }             }         }   Working with iterators is a bit confusing, I know I can use the .erase() function on my vectors, but I can't really pass pit or bit. Any help appreciated. Thanks

I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need to clear all of them. My code is something like this:  void erase(std::vector<int>& myNumbers_in, int number_in) {     std::vector<int>::iterator iter = myNumbers_in.begin();     std::vector<int>::iterator endIter = myNumbers_in.end();     for(; iter != endIter; ++iter)     {         if(*iter == number_in)         {             myNumbers_in.erase(iter);         }     } }  int main(int argc, char* argv[]) {     std::vector<int> myNmbers;     for(int i = 0; i < 2; ++i)     {         myNmbers.push_back(i);         myNmbers.push_back(i);     }      erase(myNmbers, 1);      return 0; }   This code obviously crashes because I am changing the end of the vector while iterating through it. What is the best way to achieve this? I.e. is there any way to do this without iterating through the vector multiple times or creating one more copy of the vector?


A classical brain teaser is :     You have twelve balls identical in size and appearance but one ball is an odd weight (could be either light or heavy). You have a set of balance scales. How many steps are necessary to identify the odd ball and to say whether it is light or heavy?   The answer is $3$ steps, and the the solution is easily found on the web. But what if twelve is replaced by any number $N > 2$? Is there a general way to find the optimal number of steps?

Say we have $N$ spheres indexed as $1,2,3,\dotsc, N$ such that all of them have identical weight apart from one, and we don't know if that one is heavier or lighter. We have to determine which sphere has the odd weight using just a balance scale.  We could solve this problem by weighing repeatedly, but I am interested in a solution involving weighing as few times as possible, so my question is what is the optimal algorithm for this task?


I was wondering if it is possible to automatically generate a schematic from some higher-level description (CPU ==> RAM, etc) of a circuit? And whether there are tools that can do that?

I am looking for a language that can declare a circuit board, and then draw it in schematic form or whatever. Can you tell me if such a thing even exists?  The common "language" people use to design circuit boards is some graphical tool like Eagle, KiCad, Altium or any of the plethora EDA packages . I am looking to create a text file instead, that will be processed and generate as output one of the EDA file formats.  Detailed explanation:  For example in the world of computer cloud infrastructure, there are several declarative languages that are used to define resources and create them. HashiCorp Terraform, AWS CloudFormation, OpenStack HOT, Azure ARM Templates, and more.  For example, if I need to create a circuit that has a battery, IR receiver, IR transmitted and an Arduino. Using this language I would just define which pin of each device needs to be connected to which other pin - and the output of the language can be a graphical representation of the circuit. As-if I designed it in KiCad or some other EDA.  One example for automatic dependency resolving is Graphviz. For example using Graphviz I can create a text file where each component is listed, along with all the dependencies and it creates a graphical representation from this in some graphics format (svg, png, ...).  Example Graphviz dot notation file   When rendered it looks like this


Looking at the images (still or moving) of a bright source of light (similar to the sun or a launching spaceship) I often observe an even (?) number of rays, which seem to be related to the properties of the lens system being used during the image capture. See  or .  What is the explanation of this phenomenon?

Very often when viewing pictures of the cosmos taken by telescopes, one can observe that larger/brighter stars do not appear precisely as points/circles on the image. Indeed, the brighter the light from star, the more we see this effect of four perpendicular rays "shooting" out from the star.    (Taken from .)   My question is: what are the optics responsible for this effect? I would suppose that both the hazy glow around the stars and the rays shooting outwards are optical effects created by the camera/imaging device, but really can't surmise any more than that. (The fact that the rays are all aligned supports this, for one.) A proper justification, in terms of (geometrical?) optics for both the glow and the rays would be much appreciated.  Here are a few other examples of such images:


Please help: whoever or whomever?   And this is the sentence, it cannot be changed!  I think whomever is correct—because isn't the answer to the he/him test him? As in Who are we free to pretend to be? Is the answer he or him? It is him, right? We are free to pretend to be him... not he...  Each of us is freer than ever to believe whatever and pretend to be whoever/whomever we wish.  Thank you!!!  <3

Should the following say whoever or whomever. And why?      Each of us is free to pretend to be whoever/whomever we wish to be.   This sentence needs an object, right?


I have an executable file in my home directory (/home/user/filename/filename.sh). I am a non-root user. How do I make this script launch by typing the name in terminal? Not using the cd command, chmod command, and ./. I also want to launch the script by clicking just the application icon.

How can I make a bash script executable by double clicking just like .exe files in Windows? I tried , but there are two consequences:   the terminal twinkles, disappears, and nothing is done. you must specify to run in terminal in order to work.   I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.  Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?


I am creating a custom map in Minecraft, but when I try to set a block, I get the error, "Cannot place block outside of the world." I do believe that this is due to chunks not loading. Is there any kind of Vanilla Chunk Loader that I can use to keep many chunks loaded at the same time? I would prefer if there was no clutter.  I have heard about the Hopper system (I don;t know if it stills works, but then again, it creates too much clutter.

I have built an iron farm somewhere far away from my actual spawn chunks in my single player world. In hindsight, this was a dumb idea, but I can't exactly change it anymore. I'd like to keep the thing running all the time, so I'm looking for a way to keep the chunks loaded.  I'm running minecraft 1.12.1, is it possible at the moment? I have looked at some chunk loader mods, but chicken chunk loader hasn't been updated yet, and the others simply didn't work.  I have tried moving the spawn chunks, but that hasn't done anything either.  Edit: I have worked this out with IronAnvil, and it ended up being a render setting in optifine which didn't load them correctly somehow. It has been working fine after I reset my optifine settings to default.


I ask this because many years ago I heard such a thing. I have a 900GB hard drive and I am lingering around 40GB free space. Is this bad, will it harm the drive's health, or will it hurt my system's performance at all?

I have heard many claim that it doesn't matter how full a drive is until it starts cutting into temp and virtual memory space.  This doesn't make sense to me, given the nature of how the data is transacted on a hard drive. The inside of the platter presents less data per revolution than the outside of the drive does, by significant factors. The inside 40% of the radius of full size hard drive is used for the spindle, so only the outside 60% is used for data storage, but that still means that the inside track of a hard drive presents data 60% slower than the outside track.  By my calculation, a Hard drive that is only 10% full should perform about 2.25 times faster than a hard drive that is 90% full, assuming that the flow is constrained by other factors.  Am I wildly off base here? For all the drives I know, even the top speeds of the first 1% of the drive would be well within the bandwidth provided by a SATA 2 connection.


While reading through a bash style guide I found the following guideline:  Math / Integer Manipulation Use ((...)) and $((...)).  a=5 b=4  # wrong if [[ $a -gt $b ]]; then     ... fi  # right if ((a > b)); then     ... fi  When I inquired about the reasoning I was told that the [[ test could potentially choke trying to compare numbers with leading zeros.  In my testing I have not been able to recreate this issue. My Question  Is there actually a functional difference between ((a > b)) and [[ "$a" -gt "$b" ]]?

In Bash, two integers can be compared using conditional expression     arg1 OP arg2      OP is one of -eq, -ne, -lt, -le, -gt, or -ge. These   arithmetic binary operators return true if arg1 is equal to, not equal   to, less than, less than or equal to, greater than, or greater than or   equal to arg2, respectively. Arg1 and arg2 may be positive or negative   integers.   or arithmetic expression:     <= >= < > comparison      == != equality and inequality   Why do we have two different ways for comparing two integers? When to use which?  For example, [[ 3 -lt 2 ]] uses conditional expression, and (( 3 < 2 )) uses arithmetic expression. Both returns 0 when the comparison is true  When comparing two integers, can these two methods always be used interchangeably? If yes, why does Bash have two methods rather than one?


Suppose my site - example.com had a subdomain - subdomain.example.com which I have deleted.   How do I redirect the not found error in PHP or the mod_rewrite (.htaccess)?

I need to forward existing subdomain links to the root domain as the subdomain no longer exists. I have tried so many different lines of code in my .htaccess file and can not get the redirect to work.  The links to the subdomain look like: http://sub.example.com/dir/y99bb4  Can anyone suggest any code for me?


I was trying to connect to a new server that i saw that other people are capable of connecting to but im unable to connect to it and it keeps saying "io.netty.channel.ConnectTimeoutException: connection timed out: (server IP)"   For some reason it's not letting me join and its said that on another server ive been playing on and said this on another server "java.net.ConnectException: Connection refused: /(server IP)  Ive tried methods for fixing problems for this but when i try terminal the commands dont work and the other 2 servers used to work for me but suddenly stopped working a few days ago.

I have Minecraft on PC and I have donated to this really awesome server that I love but the problem is every time I try to join the server it says "Internet Timed Out."  I have full bars for the connection between me and the server and my internet connection is full. Why can't I connect to the server?


I have two files   file A  >TCONS_00000075 gene=XLOC_000030 CCGCCGGCTGCTGCGCGCACCGACTTGTCACCACCCCAGCACGTCCTCCACGTATACAAGCGCTACGGTC CACCGCGGCAGCGTCGACGTCCTTGTCCGCAAACATGGTGGTGGCAGCTTCCTCATCGAGCAGCAGCAAC TCATCCTCGAGGGGAAGGGCCCAGAGCTTCTAATCCTACACGGCAACAACACTTTATACTTGTGTATAAT >TCONS_00013830 gene=XLOC_006942 AAACACGGTTAGCTTGATATCACTGATGATCGATGGGATAGAGTCAGAGAACATCTTGTTCCTTAATTAT CTCAATTCGTGAGATGTTGGACGATATCTCGATAGGGAGAGAAGGCGTTGTTCTGGATCATCACCGTGCT CAGGGGTCAATTTTACACTGAGCAGGGGCAAAGACGTAAATTTTTACTTCCTTACTTGAGTAAGAGCAAG TTTAATACTACAACCAACTACTACAAACTCCAATTCATTTATAACCAATCTAATAACTTATTCATACAAT AGTTACCTATAAGCATATACTACACACACAACGTATTGGAATCCTCCGTGCTGCTGCTGGCTACAGATCT   file B  XLOC_000030 XLOC_000059 XLOC_000210   FileA is a FASTA sequence file. Each line starting with > is a sequence name and the lines beneath it are the sequence. I want to extract the sequences of those IDs mentioned in FileB. In this case:  file C  >TCONS_00000075 gene=XLOC_000030 CCGCCGGCTGCTGCGCGCACCGACTTGTCACCACCCCAGCACGTCCTCCACGTATACAAGCGCTACGGTC CACCGCGGCAGCGTCGACGTCCTTGTCCGCAAACATGGTGGTGGCAGCTTCCTCATCGAGCAGCAGCAAC TCATCCTCGAGGGGAAGGGCCCAGAGCTTCTAATCCTACACGGCAACAACACTTTATACTTGTGTATAAT   I tried this command:  perl -pe 's/\n//; s/>(.*)/\n>$1\t/' A |grep -f <(awk '{print $1}' B) |sed 's/\t/\n/' | fold -w 60 > C   but it's not working.

I have 2 files. The first, fileA looks like  TCONS_00000066  XLOC_000030     -       u       q1:XLOC_000030|TCONS_00000066|0|0.000000|0.000000|0.000000|0.000000|- TCONS_00000130  XLOC_000057     -       u       q1:XLOC_000057|TCONS_00000130|0|0.000000|0.000000|0.000000|0.000000|- TCONS_00000395  XLOC_000206     -       u       q1:XLOC_000204|TCONS_00000393|0|0.000000|0.000000|0.000000|0.000000|-   FileB looks like:  >TCONS_00000001 gene=XLOC_000001 AGATGAGCTGGTGGGGATGCTCTAAGAGAACGAGAGAAGCACAGAGCAGATAAACCACACCCACAGGCAC CACCGTCCTTGTTGGTAATGAAGAAGACGAGACGACGACTTCCCCACTAGGAAACACGACGGAGGCGGAG ATGATCGACGGCGGAGAGAGCTACAGAAACATCGATGCCTCCTGTCCAATCCCCCCATCCCATTCGGTAG TTGGATTGAAGACTACCGAATAAGAGAAGCAGGCAGGCAGACAAACCCTTGAACCAAGGAGTCCTCGCTG AGGAAGCTTTGGATCCACGACGCAGCTATGGCCTCCCCGCCCACCAGGCCGCCAGCCACAACCAGCTGAC TAGGTCGCATGCATCATCAGATTTCAATCTCCCTTCGTTCCCTGTCCCTAATCCAATACCAATAGGGAGC AATCAGCTGCTCCTCGACGGCGAGGGAGATGTCGTCGGCCGCGGGCCAAGACAACGGAGATACCGCTGGG GACTACATCAAGTGGATGTGCGGCGCCGGTGGCCGTGCGGGCGGCGCCATGGCCAACCTCCAGCGCGGCG TTGGCTCCCTCGTCCGTGACATTGGCGACCCCTGCCTCAACCCATCCCCCGTTAAGGGGAGCAAAATGCT CAAACCGGAAAAATGGCACACATGTTTTGATAATGATGGAAAGGTCATAGGTTTCCGTAAAGCCCTAAAA TTCATTGTCTTAGGGGGTGTGGATCCCACTATTCGAGCTGAAGTTTGGGAATTTCTTCTTGGCTGCTATG CCTTGAGTAGTACCTCAGAGTATAGGAGGAAACTAAGAGCTGTTAGAAGGGAAAAATATCAAATTTTAGT TAGACAGTGCCAGAGCATGCACCCAAGCATTGGTACAGGTGAGCTTGCTTACGCTGTTGGATCAAAGCTA   Now, fileA contains selected transcript numbers in the first column and fileB contains sequences of all transcripts. I want to scan fileB for the first column of fileA and print the trailing sequences of matching transcripts along with the transcript number.


How can I do mathematical operations with Date using just vanilla JS ? something like : today + 2 days const today = new Date(27/3/2020); const DayToAdd = 2;   return today + DaytoAdd //expected 29/3/2020

How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?


This is my input file:  PA43171-7,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,12:01:16.086.660, Valid Sensor Reading,Date = 08-19-2014 , Time = 12:01:16 Voltage Sensor=11 , V$ $=11 , Voltage Sensor Value=9.927417 , Min=9.450000 , Max=11.550000    I need to compare the Voltage Sensor Value, Min and Max value. (Min greater than Voltage Sensor Value greater than Max)  I'm expecting the below output from my input file:   PA43171-7 Date = 08-19-2014 , Time = 12:01:16 Voltage Sensor Value=9.927417 , Min=9.450000 , Max=11.550000


As we write 1st, 2nd, 3rd, 4th what we should write in roman for the same way?

Assume I have to use a Roman numeral to denote an ordinal number. Is it more correct to affix “-th” to it or not? That is, should I write “XIX century” or “XIXth century” to mean “nineteenth century”?


I am trying to show that if $x$ is irrational, then so is $\sqrt[n]{x}$ via contrapositive; that is, I want to assume that if $\sqrt[n]{x}$ is rational, then so is $x$ and this is how I proceeded with my attempt: if $\sqrt[n]{x}$ is rational, then we write $\sqrt[n]{x}=\frac{u}{v}$ with $u\in\mathbb{Z^{+}}$ and $v\in\mathbb{Z}$ and $\gcd(u,v)=1$. We then have $x=\frac{u^{n}}{v^{n}}$ which implies that $u^{n}=xv^{n}$. From this point, how can I continue, or should I abandon this method?

It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational?


How can we evaluate this series  $$\sum_{n=1}^\infty \frac{n^a}{b^n}?$$  Here $a$ and $b$ are positive integers. If $b=1$ then series will be diverging, in other cases, it will be converging, but how to find this sum?  Isn't there a simple solution which doesn't involve Stirling numbers?


Do you stop earning reputation points for editing at a certain point?  Today I finally made it to 2000 points on StackOverflow, enough to review suggested edits.  Shortly afterwards, I edited a post, which was approved, but didn't receive the usual 2 points.

After reaching 2k rep , I'm not receiving  +2 rep per edit. Why?


I have 3 drives currently set up in RAID 5 via mdadm. I just realized that I goofed and forgot to format them with LVM- is it possible to do this after RAID array creation without losing data?

I've read a bit about lvm and decided that I want to switch to using it. It seems like actually setting up lvm can be done from the debian installer, so I suppose that'll be easiest. What I'm not sure about is how to copy all of my files to the new system.   I would like to copy my whole system, not just my home directory or just my packages, I've messed around with a lot of stuff, to the point where I have no idea exactly where all of my config files live. The guides I've found on the internet seem to glaze over this step, just mentioning tools that can do it, not how to use them, i.e. use rsync. Instinct tells me I can't just rsync the root of my backup to the root of my lvm system, I'll copy over something important, like the lvm config files, but I'm not sure what exactly I need to exclude, while being sure not to exclude anything I might have changed. Any tips?  My planned steps, for clarity: I have a 1tb hdd and a 250gb ssd. I want to shrink the partition I have on the hdd, use the free space (I have enough) to make two new partitions, and dd my ssd and hdd partitions to those partitions as a backup. Then I want to wipe the ssd partition and hdd partition I'm currently using, and set up lvm on them (ideally with the debian installer for simplicity's sake, but maybe manually). And then I want to copy everything from the backup partitions to the new lvm partitions, somehow. And then wipe the backup partitions and either resize the existing lvm partitions to include the remaining space, or just make the remaining space another physical volume on lvm and add it that way.


My wireless connection is extremely slow.  I am using Ubuntu 13.10, but has been persistent with previous releases as well.

I recently installed Ubuntu 14.04 on my Dell XPS 15 9530.  Now, everything except the wireless connection works fine. I've googled, and found  solution, but it didn't change anything for me (i.e. I added "options iwlwifi 11n_disable=1" to "/etc/modprobe.d/iwlwifi.conf").  I'm not sure what next steps I should take to solve this problem. I've read somewhere that updating the kernel might help I ran the command "uname -r" and got "3.13.0-24-generic" back, which implies i have the kernel version 3.13 and not the newest 3.18 according to .  If anyone has an idea what to try next or can point me somewhere, that would be awesome.


I am trying to enhance the contrast in the images I get after scanning a surface using Thermography (Principal Component Thermography ~Rajic, which is basically an application of Principal Component Analysis) to see the defects clearly.   But my question here is to understand the difference between empirical orthogonal functions and Principal Components as shown below:  SVD is used to decompose matrix A into U, R, and V.  In my case, I have 20 images. And after doing a raster like operation to unroll an image in a column, I get my matrix A which has 20 columns and each of them represents one image.   Any intuitive explanation will be really appreciated.

Suppose $u$ is the vector that maximizes the variance of the projection of the data with design matrix $X$.   Now, I have seen materials that refer $u$ as the (first) principal component of the data, which is also the eigenvector with largest eigenvalue.   However, I have also seen that the principal component of the data is $X u$.   Obviously, $u$ and and $Xu$ are different things. Can anyone help me out here and tell me what is the difference between these two definitions of principal components?


I am using a X and Y data no standarize ($X_{196\times 20}$ and $Y_{196\times 1}$) and I get diferente coefficientes when I use the following formula:  a<-lm.ridge(Y~X, lambda = 0) b<-lm(Y~X) as.matrix(b$coefficients)[-1]-as.matrix(a$coef)   why?  When lambda = 0 ridge regression should be the same as OLS.  the lm.ridge formula needs first to standarize the inputs?

Hey guys I found one or two papers which use ridge regression (for basketball data). I was always told to standardize my variables if I ran a ridge regression, but I was simply told to do this because ridge was scale variant (ridge regression wasn't really part of our course, so our lecturer skimmed through it).  These papers I read didn't standardize their variables, which I found a bit surprising. They also ended up with large values of lambda (around the 2000-4000 level) via cross-validation, and I was told that this is due to not standardizing the variables.  How exactly does leaving the variable(s) unstandardised lead to high lambda values and also, what are the consequences of not standardizing the variables in general? Is it really such a big deal?  Any help is much appreciated.


$$-4^3 = -64$$ so the third root of $-64$ should be $-4$ than. $$\sqrt[3]{-64} = -4$$ But if you calculate the third root of -64  with WolframAlpha(  )  you get a complex number with an imaginary part of  $$3.4641016151 i$$ and a real part of $$2$$  so if the third root of $4-64$ equals $-4$ AND $2 + 3.46410162 i$ (which i know is a bit foolish) than you could actually reform it like this $$ \sqrt[3]{-64} \approx 2 + 3.46410162 i | -2$$ $$ \sqrt[3]{-64} -2 \approx -6 \approx 3.46410162 i     |/3.46410162$$ $$ \frac{\sqrt[3]{-64} -2}{3.46410162} ≈ \frac{-6}{3.46410162} ≈ i$$  and this have to be totally wrong, so my question is, where exactly is the mistake?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


Other domains give damage types that are not commonly resisted. Stat blocks list fire, cold, and other resistances separately from the "bludgeoning, piercing, and slashing damage from nonmagical weapons/attacks" that many powerful creatures have. That caveat is also never used for non-weapon types of damage (b/p/s), to my knowledge.   This means that even with a mundane weapon, a cleric with divine strike usually has a way to deal consistent, unresisted damage. They deal a different damage type, that might not be resisted. But war clerics deal the same damage as their weapon attack, and that should make it bludgeoning, piercing, or slashing from a nonmagical weapon.   Now, the flavor text says " you gain the ability to infuse your weapon strikes with divine energy." But unlike, say, monk's ki-empowered strikes, it never says "[this attack] counts as magical for the purpose of overcoming resistance and immunity to nonmagical attacks and damage" under divine strike, so it should still count as mundane damage.   That makes it sound like war clerics' divine strike ends up being a little rough compared to some of the others (though trickery domain probably has it worse). Have I interpreted this correctly?

Often confusion arises when the  spell is used, an  is worn, or the 's anti-magic ray is employed, whether a given character's ability will still function.   The spell does give you some guidelines on how to adjudicate the effects of the loss of magic but says very little about how to determine what is affected.  In short, how do I tell if an ability is magical?


Every development board I have ever used that includes a 32.786Khz crystal has always had its can soldered directly to board.  What is the reason for this ? Is this to minimize radiated energy from the crystal during its operation (assuming that the pad its soldered to is ground) ?  If the can was not soldered to the board, what would be the effect ?  Added  If you look at this image, the crystal has 3 solder points. Two for the legs, and one for the case/shell/can (green arrow).   My question is about the reason for soldering the case/shell/can to the board.

Pictures shown below is a typical 32.768kHz crystal, commonly use in Real Time Clock circuit (e.g: DS1307 & DS1337)    Referring to , it is a good practice that ground planes should be beneath the crystal. But is it compulsory that we should ground the crystal's body/case too (like what they did in these pictures)? And if yes, what happens if we didn't grounded the case?


I bought this Minecraft  (v0.7.6) And since then i've been struggling with getting multiplayer to work in any way. My first attempt was to create a server from here:  which not only suffers from bad program design, but also doesn't seem to do anything with my Minecraft on the phone.  I have disabled firewall completely, made sure that computer(server) and client(phone) is on the same network.  At this point i decided to ditch the host a server thing, and we tried doing a regular network play between 2 phones with no success. Nothing appears in the lobby!  Do they have a support section cause i can't seem to find it...  My phone: Sumsung Galaxy Note 3 (my very first smartphone. Not more than a week old)  Other phone: Sumsung Galaxy S3  My comp: Win7...  Another thing I'd mention is that my friend (the SGS3 owner) claims to have been able to play LAN games with other friends. I have not seen this, and there's probably more to it, but if its true then there's probably something wrong with my device. (A default restrictive policy or something...)

I can't find how to join games with the latest 0.7 Pocket Edition update with an iPad and iPod over wifi. I see the realm options but I get the message "there are no more open server slots right now". Local server multiplayer is switched on for both devices.


When trying to make a secure encryption system for some secret keys, I wanted to see if we can encrypt the file containing the key in VBScript using AES  Looking at other posts, I found that:  '----------------------------------------------------- Dim obj,arr,i,r,str,enc,asc dim bytes,bytesd,s,sc,sd set obj=WScript.CreateObject("System.Security.Cryptography.RijndaelManaged") Set asc = CreateObject("System.Text.UTF8Encoding") s="This is a private message" bytes=asc.GetBytes_4(s) obj.GenerateKey() obj.GenerateIV() set enc=obj.CreateEncryptor() set dec=obj.CreateDecryptor()  bytec=enc.TransformFinalBlock((bytes),0,lenb(bytes)) sc=asc.GetString((bytec)) msgbox sc  byted=dec.TransformFinalBlock((bytec),0,lenb(bytec)) sd=asc.GetString((byted)) msgbox sd '-----------------------------------------------------   This is useful to encrypt a string, but, it will be possible to set a default key and IV to the AES encryption, because I want to encrypt a and decrypt file, so I need to have already a key and IV to decrypt.  Is there any way to encrypt a file in VBScript using AES?

I am looking to encrypt some data using  in  using a specific key and  value. Are there any good function libraries or COM components that would be good to use?  I looked at ; it allows a passphrase only, and won't allow setting specific key and IV values.


I have downloaded  Ubuntu 12.04.3 but how do I install it? I have attempted to open the download but nothing happens. I am currently running Fedora.

I would like to see a full how-to guide on how to install Ubuntu.


I went to Ubuntu and went to the download page, chose 32 bit, for an older machine, made a CD.  When everything was said and done, I have Linux Mint 16 on the machine....how did that happen?  I'm new to Linux, but I can't find anywhere that it says this is what I was downloading.  Is it because I chose 32 bit?  Is it a screw up in the mirror?  Any help is appreciated.


I f $$A_{(n+1)\times(n+1)}= \begin{pmatrix}x_{1}^{n}& x_{1}^{n-1} &\ldots& x_{1}& 1 \\  x_{2}^{n}& x_{2}^{n-1} &\ldots& x_{2}& 1\\ \vdots & \vdots & &\vdots &\vdots \\ x_{n}^{n}& x_{n}^{n-1} &\ldots& x_{n}& 1 \\ 1&1&\ldots&1&1\end{pmatrix}$$ be a matrix, i like to calculate the $det (A)$. I think that this matrix is rather than like vandrmonde matrix, what is your idea?

For $n$ variables $x_1,\ldots,x_n$, the determinant $$  \det\left((x_i^{j-1})_{i,j=1}^n\right) =   \left|\begin{matrix}      1&x_1&x_1^2&\cdots & x_1^{n-1}\\      1&x_2&x_2^2&\cdots & x_2^{n-1} \\      \vdots&\vdots&\vdots&\ddots&\vdots\\      1&x_{n-1}&x_{n-1}^2&\cdots&x_{n-1}^{n-1}\\      1 &x_n&x_n^2&\cdots&x_n^{n-1}   \end{matrix}\right| $$ can be computed by induction; the image below says it shows that. I have done this before, if I submit this will I get marks?   MORE IMPORTANTLY how do I do it by induction? The "hint" is to get the first row to $(1,0,0,...,0)$.  I think there are the grounds of induction in there, but I'm not sure how (I'm not very confident with induction when the structure isn't shown for $n=k$, assume for $n=r$, show if $n=r$ then $n=r+1$ is true.  By the way the question is to show the determinant at the start equals the product $$\prod_{1\leq i<j\leq n}(x_j-x_i)$$ (but again, explicitly by induction)


Lately I have been listening to a local morning show, the sports analyst for this show, when referring to "Runs Batted In", always says (Rs - B - I) instead of (R - B - Is). I shudder every time I hear this because it just doesn't sound correct. What is the proper way to say this and why?

For example, if I wanted to write the equivalent of  There are many automated teller machines in this city.  Would it be  There are many ATMs in this city.  or  There are many ATM's in this city. (could get confused with possessive form or contraction).  or just  There are many ATM in this city. (assuming the final s is included in Machines represented by M).  Maybe something else?


Would too much sensor cleaning (wiping) impact the sharpness, dynamic range, and color depth?

I've discovered spots on the image sensor of my DSLR camera that cannot be cleaned using a blower bulb, so I would like to know the risk of problems, such as further image deterioration or damage to the sensor or low-pass filter, associated with wet cleaning the image sensor.  Just how high (or low) is the risk?  Is this a difficult task to perform?  The products I expect to use are as follows:       In my research, I have also found the following products, for which there is a greater degree of trust because the manufacturer  when used properly:       Additionally, the reviews are generally positive, so is it worth it?  My biggest concern at this point is further staining or residue from the cleaning process.  How likely is this going to affect image quality, and would it be worse compared to the dust or other contaminants?


Find the value of the following integral  $$ \int_{-\pi/2}^{\pi/2} \frac{\cos^3 x}{e^x+1} dx $$  I tried to use the twin integral with sin and get some result but nothing obvious came out. Also, Mathematica gives a very bizarre result! Any ideas how to solve analytically?

Let $[-a, a] \subset \mathbb{R}$ be an interval. Let $f: [-a, a] \rightarrow \mathbb{R}$ be a Riemann-integrable function such that $f(x) = f(-x)$ for all $x \in [-a, a]$. Let $b \in \mathbb{R}_+$.  Question: Is there a "good" way to simplify the integral $\int_{-a}^a \frac{f(x) + 1}{b^x+1} \,\mathrm dx$?


My objects just don't get any light in render. And they look like empty png in render. It happened one day, I was working in Blender 2.8. Than I installed 2.9 and the problem was gone for some time. Now it happen again. I`m not very experienced user, maybe I just pressed the wrong button somewhere.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


Let $z$ and $w$ be complex numbers satisfying $|z| = 5, |w| = 2,$ and $z\overline{w} = 6+8i.$ Then enter in the numbers $$\left[|z+w|^2, |zw|^2, |z-w|^2, \left| \dfrac{z}{w} \right|^2 \right]$$ below, in the order listed above. If any of these cannot be uniquely determined from the information given, enter in a question mark. By plugging in numbers ($z=5$ and $w=2$), I got the following: I got 49 for the first one, 100 for the second one, 9 for the 3rd one, and 6.25 for the 4th one. But it was wrong, so I don't know how to do this question.

Question 1: Let $z$ and $w$ be complex numbers satisfying $|z| = 4$ and $|w| = 2$. Then enter in the numbers $$ |z+w|^2, |zw|^2, |z-w|^2, \left| \dfrac{z}{w} \right|^2 $$ below, in the order listed above. If any of these cannot be uniquely determined from the information given, enter in a question mark.  I plugged in $4$ and $2$ to each equation and got $36$, $64$, $4$, $4$, for question one. It was wrong.  Question 2: Let $z$ and $w$ be complex numbers satisfying $|z| = 5, |w| = 2,$ and $z\overline{w} = 6+8i.$ Then enter in the numbers $$ |z+w|^2, |zw|^2, |z-w|^2, \left| \dfrac{z}{w} \right|^2 $$ below, in the order listed above. If any of these cannot be uniquely determined from the information given, enter in a question mark.  I don't know how to even start on question 2 because of the $z\overline{w}$.


As it currently works. The endusers have to go the URL:     and that works  but i want the users just to go to:   to access the page.  I now have in my httpd.conf on RedHat 6:  <Virtualhost *.80> DocumenRoot /var/www/html/owno ServerName olaf-owno.europe.eu ServerAlias owno.olaf.europe.eu </VirtualHost>   What do i have to add/modify to put this in practice ?  Johans

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


From Wikipedia I read that the IV is used to randomise the mapping of cleartext to cipher text and that the IV is usually stored (in cleartext) together with the encrypted record. ()  However if I look at a specific implementation in C# when deriving the key using Rfc2898DeriveBytes, a salt value is required and I understand the need of the salt. But obviously I will need the salt later on the regenerate the key from my secret passphrase. Does that imply that the salt itself is not a secret and can be stored together with the encrypted record in cleartext, just like the IV?  string passphrase = "Hello World, I'm the secret!"; string salt = "13245678";  var deriveBytes = new Rfc2898DeriveBytes(passphrase, Encoding.UTF8.GetBytes(salt), 50000);  using (var rijndael = new RijndaelManaged()) {     rijndael.KeySize = 256;     rijndael.Key = deriveBytes.GetBytes ( rijndael.KeySize / 8 );     rijndael.IV = deriveBytes.GetBytes ( rijndael.BlockSize / 8 );   ... }

I'm a beginner to cryptography and looking to understand in very simple terms what a cryptographic "salt" is, when I might need to use it, and why I should or should not use it. Can I get a very simple and clear (beginner level) explanation? If you know of any references on the topic, those would also be useful.


Would you please guide me how can I protect my under review or under revision papers from theft. It is possible that my papers have been stolen and they will be submitted to another journal. maybe a person want to disturb me and submit my papers as I have submitted them. Is it possible to save my papers in a site that demonstrate they are my own papers and I haven't submitted them to another journal simultaneously?

Suppose some author provides his original research article to a journal for publication. In this way, he is disclosing or revealing his confidential research work to that journal. Now, consider the case that his article gets rejected. So, is it not possible that whoever reviews that article can publish that kind of work and say that it's theirs? Since the original author's work has not been published and he is disclosing his confidential work to somebody, how could the author get assurance that if his article is rejected, his work will not be leaked by the journal staff in any form? What happens if this kind of thing happens?


I have a electronic device that says it should be powered at 10 - 24 V 300mA max  I have a power plug witch outputs 12 V 1.1 A  Can I connect the plug to the device ?  Somebody told me I can if is true :  Why is that ?

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


I use a macbook pro 3.1 with Ubuntu 10.04 as single boot; I have also added the ppa:pmcenery/ppa  to have the last updated library to use ipod and co., and upgraded the whole system.   I have some trouble trying to mount my iPod Touch because Nautilus does not auto-mount it. I tried to manually mount it using ifuse:  r@mbp:~$ sudo mkdir /media/ipod r@mbp:~$ sudo ifuse /media/ipod/   When I tried to open the ipod icon on the desktop I have: Access was denied!  So, to browse the ipod I have to use:  r@mbp:~$ gksudo nautilus   Doing this I can not oped ipod in Rhythmbox. I also tried to change the permission of the mounting point:  r@mbp:~$ sudo chmod 777 /media/ipod   but nothing changes. I also tried to use ifuse without sudo but I have this error:  r@mbp:~$ ifuse /media/ipod GNUTLS ERROR: A TLS packet with unexpected length was received.   Do you have any further suggestion??

Look at the video; the iPhone is supposed to appear as a photo collection of some sort but nothing happens with my iPhone! I have installed and upgraded all of the libimobiledevice versions.  I have tried to mount the iPhone with ifuse /mnt/iphone/ but the result of that operation is:  GNUTLS ERROR: A TLS packet with unexpected length was received.   Hi, how do I connect my iPhone to my laptop (Ubuntu 10.04) so that I can sync music and be able to look at it as a USB stick? (This is what I am expecting to happen.)  When I connect it to my laptop, nothing happens - it doesn't show up as an icon or as a mass storage device.  My iPhone runs iOS v4.2.1 and it's an iPhone 3G. It's not jailbroken for the moment; would that be a problem? My laptop is an Asus 1201n with Ubuntu 10.04 (64-bit).  Bus 002 Device 005: ID 05ac:1292 Apple, Inc. iPhone 3G   I connected my Ipod Video (30 gb) and that one doesn't appear as well So I'm kind of stuck now. The problem probably lies in the system, because the usb port is working.    Bus 002 Device 006: ID 05ac:1209 Apple, Inc. iPod Video   I have added , I have done all of the sudo update and upgrade. but my computer doesn't realize that my iPhone is connected, whish isn't related to libimobiledevice.  The port is working fine, it's simply that my computer doesn't recognize that I have my iPhone plugged-in! The phone itself is working (I tested it on my Mac).  I have the latest versions of these programs: hipo, ipod, gtkpod, ifuse, libusmuxd1 and usbmxd.  I connected my iPhone in Windows 7 and it worked, albeit annoyingly. I tried to mount my iPhone with fuse but I got this error:  alvar@alvars-laptop:~$ ifuse /mnt/iphone/ ERROR: the mount point specified does not exist   I have tried the  link, but I got an error while mounting it.  GNUTLS ERROR: A TLS packet with unexpected length was received.   Which one? (I have Lucid not Maverick.)


Let $z_1,z_2  \dots dots z_n \in \mathbb{C} $ be such that the real and imaginary parts of each z_i are non-negative. Show that  $\Big|\sum_{i=1}^{n} z_i\Big| \geq\frac{1}{\sqrt{2}}\sum_{i=1}^{n} |z_i|$  I couldn't start this problem. I tried to get a geometric view of this but that didn't help

$\mathbf {The \ Problem \ is}:$ Let, $z_1,z_2 \cdots z_n$ be such that the real and imaginary parts of each $z_i$ are non-negative . Show that $$\bigg|\sum_{i=1}^n z_i\bigg| \geq \frac{1}{\sqrt2} \sum_{i=1}^n |z_i|.$$  $\mathbf {My \ approach} :$ Actually, at a very first glance, it seems that it can be proved using induction ,but I tried by using the triangular in-equality, though it didn't work .  I think there are some tricks related to it, a small hint is warmly appreciated .


So, I started out as an Information Technology major and now decided to pursue Psychology. I wanted to also pursue a minor in Computer Science instead because I am 1 class away from a minor. I am undecided what exactly I want to do after I graduate, but I do know I want to go to some sort of graduate school. So far, most of my grades have been at least a "C", most of them being A's. This semester I am taking 3 computer science classes and a calculus class. I have been struggling this semester and I don't count on having high grades (I realized I am not as interested in this field and have trouble understanding the subject matter). I think a few of my grades will end up being D's, but my GPA should still be over a 3.0. Once I start my psychology classes, I think I can bring my GPA back up.   So, I was wondering if graduate schools would worry about the low grades I may receive this semester even though they are not included in my psychology major. I also do not plan on retaking any classes.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


The suggested answers (a typo in fstab; _netdev) have no effect. However when I mount them with sudo mount -a there are no issues and they are mounted.   Here's the first entry. The other two are nearly identical, just a different path on each side of the connection.   # added line break for readability  //192.168.1.9/video/cartoons /media/saturn-cartoons  cifs credentials=/home/media/.smbcredentials,_netdev, iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

I have the following instruction written in /etc/fstab used to mount a samba shared NAS at boot of my Ubuntu server  //192.168.100.104/creativelab /home/pec/CreativeLab cifs credentials=/home/pec/.creativelabcredentials,vers=1.0,sec=ntlm,_netdev,iocharset=utf8,users 0 0   It used to be working with Ubuntu 16.04, but when I upgraded my server to 18.04 stopped working.  I tried changing several options like vers=2.0, vers=3.0, sec=ntlmv2, sec=ntlmssp removing _netdev, removing users and infinite combinations of them, but none solved the problem.  If I digit sudo mount -a once logged in I get the device mounted, while I get an error if I try to change vers parameter in /etc/fstab, but I cannot connect the share on boot.  dmesg returns the following lines about cifs  [   24.637155] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount. [   25.894015] e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None [   25.894054] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready [   26.713777] CIFS VFS: Dialect not supported by server. Consider specifying vers=1.0 or vers=2.0 on mount for accessing older servers [   26.713791] CIFS VFS: cifs_mount failed w/return code = -95   It seems like instruction vers=1.0 in /etc/fstab is ignored.


I want to calculate error propagation of the non-linear $A\times B$ function, where $A=a+\sigma_A$ and $B=b+\sigma_B$ are two correlated random variables, using toy MC. I am lost as to how one finds the desired covariance matrix, assuming that $A$ and $B$ are 100% correlated, to provide it to e.g. numpy's numpy.random.multivariate_normal(mean=[An, Bn], cov=[...], size=1)  in order to sample a pair of values, and calculate a value for a product, and repeating to get the standard variation of the sample of the product values. Is this line of thinking correct, and also is it the same as sampling from two independent Gaussians and then using the covariance matrix to correlate a pair of sampled numbers?

I am trying to figure out how to convert a correlation matrix (R) to a covariance matrix (S) for input into a random number generator that only accepts S (rmvnorm("mvtnorm") in R)   library("mvtnorm")   TRUTH= 0.8 # target correlation value between X1 and X2 R <- as.matrix(data.frame(c(1, TRUTH), c(TRUTH, 1))) V <- diag(c(sqrt(1), sqrt(1))) # diagonal matrix of sqrt(variances) S <- V %*% R %*% V cor(rmvnorm(100, sigma=S) )  # repeat this to get an idea of the variance around Pearson's estimator   Instance where variances are not equal to 1  V <- diag(c(sqrt(3), sqrt(2)))  S <- V %*% R %*% V cor(rmvnorm(100, sigma=S) )   This seems to be correct, but I would like expert criticism.


Can someone explain how the below code works without any exceptions. I am thinking when new instance is created for SUNDAY it creates a new instance for MONDAY (inside SUNDAY) too and then SUNDAY again (inside MONDAY) and so on... Something like recursive as they both are part of the class Week. But my understanding is wrong because the below code is working fine.  public class Week {     public static final Week SUNDAY = new Week("SUNDAY",0);     public static final Week MONDAY = new Week("MONDAY",1);      private String name;     private int val;      private Week(String name, int val) {         this.name = name;         this.val = val;     }      public int getIndex() {         return this.val;     }      @Override     public String toString() {         return this.name;     } }   I got this doubt when I was reading about java enums.

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


My client suspects the imklaunchagent damages his computer. I did some research but found two explanations. One is Apple's system file and the other is virus. Which one is true? Apple System File? claim 1  man imklaunchagent" in Terminal.app says: imklaunchagent is automatically invoked to launch input methods that are selected via direct user inter- action. It is not intended to be invoked via other means and must not be terminated. imklaunchagent monitors abnormal behavior and will disallow an input method from launching if it repeatedly terminates unexpect- edly within a short timespan.  (Reference: ) claim 2  Do you happen to write in, say, Chinese or Japanese? I think the process you are mentioning is part of Apple's Input Method Kit framework ( ), which is used to support languages that use complex scripts. The program itself is located in: /System/Library/Frameworks/InputMethodKit.framework/Versions/A/Resources/imklaun chagent (Reference: )  claim 3 (see answer, not the question)  It's a standard macOS process. If you ever google a process name & all you get are 'malware removal sites trying to sell you something'… think twice about why. If the threat was real, the make-a-quick-buck sites would be far far down the list, well below real issues faced by real people. The process is inside a protected area, in the System folder on the System partition. You'd have to try very, very hard to overwrite it with a malicious component - including rebooting to Recovery & manually disabling SIP. macOS simply will not let a random process anywhere near that area, even with admin permission.  (Reference: ) Virus? (Reference: )

I have a MacBook Pro (macOS Mojave) laptop and have recently noticed a suspicious process in Activity Monitor with this name : imklaunchagent    I checked this folder: /System/Library/Frameworks/InputMethodKit.framework/Versions/A/Resources/imklaunchagent and it seems imklaunchagent and its related files cannot be removed. I tried to remove it via Terminal and this message showed up: "Operation not permitted". However, in "Security and Privacy" of "System Preferences", I chose Terminal to have full disk access, still can't delete the file and the same message appears.  I installed the free version of Combo Cleaner and it detected other viruses, none of which are imklaunchagent. Is imklaunchagent a malware? How can it be deleted?


I use Ubuntu 18.04 LTS with Xfce4. I have a very low-end computer and the storage size is very low, only 60GB. I almost stay at a few 100MB from the limit. But now, my computer lagged so I forced to reboot, then I got the endless login loop thing. I pressed CTRL+ALT+F3 and I ran the command df -h I got as result that my disk was full at 100% and I got no byte left. Then I tried to remove things, I am pretty sure I removed over than 300MB but it still says that I got 0 byte left. I tried it with different users but nothing works. I tried to change the permissions of .Xauthority .ICEauthority and /tmp but these perms are correct. Then I tried to install "lxdm" but I couldn't because I don't have the space left. Please help me, I don't know what to do I cannot use my computer. : / Thanks in advance.

I'm using Ubuntu 11.04 and I want to free up some space in my root directory, which is overloaded. I especially want to change the path used for installing applications (they are getting installed directly to the root drive).  Another consideration is that I'm working on a MySQL database server. The server is installed in the root directory itself, so I don't want to  risk losing any data.  Please give me some tips to help sort out this problem.


I'm using Xubuntu 20.04 LTS live USB (non-persistent) and from it I want to create another Xubuntu 20.04 LTS live USB on another USB. So far I've tried Mkusb and UNetbootin and both are not booting. Mkusb just boots into the system OS and UNetbootin shows that initial blue screen with "default" as the first option and the countdown, but loops there, counting down to 1 and going back to 10.  is the screen I see. Notice there should be more options. I've tried both methods several times with same results. Any pointers? EDIT (UPDATE): Turned out the .iso file was corrupt. Redownloaded another one and it worked out. Thanks all.

This question is asked often in Ask Ubuntu, sometimes with few hints about the situation.   Please provide a list of possible reasons to help troubleshoot the problem.


I'm using this code: (?i)(?<!\d)Item.*?1A.*?Risk.*?Factors.*?\n*(.+?)\n*Item.*?1B to grab the following text:  ITEM 1A.    RISK FACTORS  In addition to other information in this Form 10-K, the following risk factors should be carefully considered in evaluating us and our business because these factors currently have a significant impact or   In addition to other information in this Form 10-K, the following risk factors should be carefully considered in evaluating us and our business because these factors currently have a significant impact or    ITEM 1B.   But it would not grab anything in the capturing group, unless it's one paragraph like this:  ITEM 1A.    RISK FACTORS  In addition to other information in this Form 10-K, the following risk factors should be carefully considered in evaluating us and our business because these factors currently have a significant impact or   ITEM 1B.

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


I want to find the path to a file, and save that output to a variable in a shell script. Specifically, in the bash shell, if I write   GCC_VERSION="find *-gcc"   Then   echo ${GCC_VERSION}   Prints   find some-gcc   How do I get the variable GCC_VERSION to just hold the output of find?  That is how do I save the output of the find *-gcc command into the variable GCC_VERSION so that   echo ${GCC_VERSION}   prints   some-gcc

Is there a way to assign a value to a variable, that value which we get in terminal by writing any command?  Example command: sensors  From that we get CPU temperature. How can I assign this value to a temp_cpu variable?


Suppose I have H(M|K) and that H is not weakly collision resistant. If I have a message mac pair (M,MAC), how is it possible to find another message mac pair (M2,MAC2)? My thinking for this problem is that if the hash isn't weakly collision resistant, then I can find another message M2 such that H(M|K)=H(M2|K) and thus, I have a new pair (M2,MAC2). Is this a sufficient explanation for explaining why H(M|K) is insecure if the underlying hash function is weak?

Consider a common practically-collision-resistant hash function $\mathcal{H}$ (e.g. , , , ), perhaps based on the  as are the first three. We define a  $\mathcal{C}$ $$(k,m) \mapsto \mathcal{C}(k,m)=\mathcal{H}(m\mathbin\|k)$$ where $\mathbin\|$ denotes concatenation, $k$ is a secret key (constant, or at least of fixed size), and $m$ is a message (possibly of variable length). Assume that an adversary can (iteratively) submit queries with $m_j$ and obtain $C(k,m_j)$, and wants to obtain $k$ or otherwise compute $C(k,m)$ for some $m\ne m_j$.  That MAC $\mathcal{C}$ is not trivially bad. In particular, if $\mathcal{H}$ was indistinguishable from a random function in the , $\mathcal{C}$ would be secure. And even though $\mathcal{H}$ may have the , it does not turn into a devastating attack on $\mathcal{C}$.  The less impractical generic attack that I see is that if a collision was known for $\mathcal{H}$ with the colliding messages of moderate identical length, it could be deduced countless collisions for $\mathcal{C}$. Hence security is demonstrably not better than collision-resistance of $\mathcal{H}$ (for identical-length messages). We could assume that $k$ is half the size of the result of $\mathcal{H}$, and hope that the security is about  or  or , 280, 2128, 2256 hash rounds for SHA-1, RIPEMD-160, SHA-256, SHA-512.   What are the known attacks against $\mathcal{C}$ (better than the above), and their cost, for each of these common hashes?  Is there hope for an argument that an attack against $\mathcal{C}$ would turn into an attack of similar cost against $\mathcal{H}$, or hint of the contrary?  Update: this  is of interest, but I fail to find that it really answers the present question.  Update 2: I am aware that the construction considered is weaker than , and in particular is vulnerable to collision on $\mathcal H$; I stated that, and that it is thus pointless to have the key wider hopeless to target security against some attacks better than half the hash's size. I'm asking exactly what cryptanalytic attack better than finding a collision on $\mathcal H$ there are. There is room for such an attack only by exploiting a weakness in the structure or/and the round function of a concrete $\mathcal H$.


If a Fighter 3 (Eldritch Knight) levels up as a Warlock for the rest of the way to 20, making him an 18th level caster according to the multiclass spell slot table provided, would he in turn be able to learn 9th level spell? Meeting only the requirements listed for Warlock upon leveling, being 1 spell on it's list for which it has spell slots available for.  (Note: I would put up quotes and annotations providing source material but I'm running on limited time and my question sounds convoluted and simple to solve to the point where it's just me being dumb.)

Say I play a Cleric 14/Paladin 6. I have the spell slots of a lvl 17 spellcaster, but can I cast the 9th level spells of the Cleric, or am I limited to 7th? Would this also work with other classes like Sorcerer or Wizard?


I have a formula field. The field should display a certain value depending on the local time of the day. For example, if it is between 9:00 and 12:00 - morning, 12:00 and 3:00 - afternoon, and so on.  Is there a way in Salesforce to get the local time or time offset in the formula field. The user could be any where in the world.

I'm attempting to set up an email template based on the time of day to begin an email with either a "Good Morning" or a "Good Afternoon" greeting based on the time of day that the email was sent.  I see that the {!Now()} function provides me with the current date and time. However, I'm rather new to Salesforce, and haven't been able to figure out how to capture just the time for a comparison in a conditional statement something like Good {!if {!Now()} < "12:00 AM", "Morning", "Afternoon"}.   I've done quite a bit of searching, and haven't yet been able to find an answer to this question. Any help or reference material would be most appreciated. I've already scoured the Salesforce help pages (including the  page), and browsed the internet for a solution.


I suggested an edit where all that I did was put code into a code tag.  I did not actually change the code itself.   is the edit that I made.  I thought that it seemed reasonable since all it did was improve the readablity of the question.  Indeed, it was approved by another person, however it was rejected by Community.  After Community rejected it, another person made  that I did and that one was applied.  Since I am new, I figure I missed something trivial that would make the bot reject my edit.  I have seen similar questions, but none of the ones I have read explain how why a bot might reject one edit over another almost identical one.

The  corrected formatting issues in the code posted by the OP. In the  you can see line breaks in the code posted.   Most of the time when someone rejects a suggested edit, a proper reason is given, like This edit is too minor; suggested edits should be substantive improvements addressing multiple issues in the post.. Shouldn't  also provide some reason while rejecting suggested edits?  Update Another similar . A reviewer  approves and  rejects (ofcourse without sharing any reasons) !


I ask the owners of all the servers I go to, and none of them tell me how to de-spawn mobs. I'm the only admin in my server, and there are a lot of magma cubes. I want to know how to get rid of them.

So, my friend just implemented a bunch of new mods into his SMP server, which meant a host of new commands to play with.  I thought I'd give the /mobspawn command a few goes, and see what I could achieve.  So I headed off to the server's jail (I forget why this particular location compelled me), and gave it a few spins.    I seem to have made a bit of an error in judgement.     What can I do to get rid of this mess?  Is there a command or some other technique I can use to clear out any mobs in my immediate vicinity?


I noticed a suspicious ad every now and then in my SO sidebar (in the usual place):    Is this by design, or do I have a rogue browser extension?

The banner ads are in the wrong format for the right-hand ad slot:    These kinds of ads are not useful (because most of it is cropped) and should be excluded from being shown in that spot.


Just as the title asks. Even if I'm standing on carpet, after the charges of the balloon cause my hair to stick up, my hair slowly goes back down as it loses its charge. Are the extra electrons in my hair slowly moving into the air?

Objects (like combs) can be charged by rubbing as charged particles, particularly electrons, are transferred from one object to other. This can be seen as the object (comb) attracts small bits of paper. After some time, the charge on the body seems to disappear. How does this charge disappear without any external influence?


I am teaching basic programming skills to a group of 8 students in High School. It is becoming increasingly irritating to have to constantly write down syntax in a white board rather than just show the students on my laptop screen.   Other than using a projector, is there a (inexpensive) way I can show the students what's happening on my screen without using internet. The students sit close to me, so using cables is a possibility.

I want to share my computer screen over LAN, without an internet connection. How can I do it?  There is different software like:   LogMeIn Team Viewer etc.    But these require an internet connection.


I am trying to match everything between     /* and */   And also include the in between characters.  I currently managed to create a pattern that kind of does this  \/\*(.+?)\*\/     But it doesn't match multi line quotes and only matches once.    How can I improve this pattern to match everything that starts with /* and ends with */ ?

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


If I have a string that contains a human height in the US form (feet, inches) e.g. I've been 5'10" since I was 18 how can I use regex to extract the 5'10" as a tuple? e.g. (5, 10)  So far I tried:  s = "I've been 5'10\" since I was 18" re.findall(r'\d\'\d+\"', s)   Hoping to grab the first digit, which should be a single digit \d and then the next two digits with \d+, but this doesn't work very cleanly, returning ['5\'10"'] and requiring more splitting etc. Ideally there is a way to do this all with regex.

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


I'm a mother of 2, ages 3 and 10. I am worried that my youngest child is spending as much time, sometimes more time, on the iPad than my eldest.  The iPad seems ideal when I am busy and the kids are content when using it, however I don't want to over do their computer time especially for my youngest.  Am I right to be concerned? I'm wondering what time periods parents are seeing their kids using iPads for?

I recently bought an iPad primarily for my 3-year-old daughter. I put nothing on it but educational apps and children's books. No YouTube, no Internet, no (non-educational) games. I've decided to let her use it as much as she wants, for now, and see how it goes. That was a few weeks ago.  So far she's been using the iPad maybe 2 to 5 hours each day. She still enjoys other activities -- playing outside, playing with dolls and blocks, interacting with friends, being read to, etc. And I think she might be learning a thing or two from the apps. Still, several hours a day seems like a lot. How do I know if it's too much?  I've searched the web, and there's lots of info on limiting TV time and video games, but I can't find any recommendations on limiting use if it's only educational games.  Relevant:


I am using blender cycles render and only started recently. I am trying to make a rubix cube type thing with Mario textured tiles. In the preview mode for rendering under the viewport shading menu looking at the cube is perfectly fine. However, when I attempt to render my cube none of the textured objects show up. I have no idea whats happening and have done some googling but have come up empty, please help.  Please note that the textures are handled using different materials for each face (as seen in the properties panel) and UV mapping to control orientation, the materials in question are controlled using nodes [Texture Coordinate->Image Texture->Diffuse BSDF->Mix Shader->Material Output]  Also there is actually a big solid cube there in the center of the 26 other cubes wich you can see is being rendered (and a little in the 3D view). It has only a basic diffuse BSDF surface and is working perfectly fine in the final render.    Please help. ;(

I have a model of a building with a sidewalk around it.  Both show up when I switch to rendering mode in both Blender Render and Cycles Render mode.  But:  when I hit F12 for a final proper render, the building shows up -- but the sidewalk doesn't.    I've checked the normals and I thought the normals seemed pointed in the right direction.  I've set the Clipping on the Camera to a high number.  I removed all the materials from the sidewalk and added a new material-- the problem persists.  I've exported the blend as an FBX file and the Sidewalk shows up fine in Unity.  Just in final renders, it doesn't show up.    Here is a blend file: .  I tried to destroy everything unrelated to the issue and label things in a clear way.    Thanks.


What is the difference between the following interrogative structures?   What train are you going on/by?  Which train are you going on/by?    And which of the prepositions, given at the end of both structures, would be appropriate?

Most of the time one or the other feels better, but every so often, "which" vs. "what" trips me up.   So, what's the exact difference and when should you use one or the other?


Prove that for any given positive integer $n$,there exists a Fibonacci  number divisible by $10^n$.   Another application of pigeon hole principle,and the main problem is finding the holes and pigeons.If we consider $10^n+1$ consecutive Fibonacci numbers,we can NOT  claim that one of them is certainly divisible by $10^n$,but of course two of them have equal remainders mod $10^n$. I DO KNOW this question has an elementary solution using pigeon hole principle,although  the older question asked for $n=2014$ has received many advanced solutions.

This problem is giving me the hardest time:     Prove or disprove that there is a Fibonacci number that ends with 2014 zeros.   I tried mathematical induction (for stronger statement that claims that there is a Fibonacci number that ends in any number of zeroes), but no luck so far.    Related question:


After reading many posts, I am still confused about the differences between these two.  Let me know if my understanding is correct:  MAC is encrypted string that is generated using a secret key and a message, and it's used to check no-repudiation.  HMAC is a MAC that is generated using a hash function and it's used to the check the integrity of the message.  Some questions below:   Is HMAC an extra security layer over MAC? Should HMAC be always used instead MAC? In which scenario are both used? on TLS?

In reference to , what are the "stronger security properties" that HMAC provides over MAC. I got that MAC requires an IV whereas HMAC doesn't. I also understood that MAC may reveal information about plaintext in contrast to HMAC. Is my understanding right?  What are other security properties of MAC and HMAC?


Which is the most lightweight torrent client which works on Lubuntu-Core (Lubuntu Minimal Install)?   I would be interested to be as slim as possible, with as few options as possible...  Thank you.

What GUI Based Torrent managers exist in Ubuntu and features they offer in terms of:     Speed to start downloading (Search Speed, Seed, Leech)   Speed while downloading   Compatibility   Stability   Data check   Other attributes


I will be visiting Stockholm, Sweden and Copenhagen, Denmark for holidays in a couple weeks. I live in the US and have a Bank of America bank account and debit card.   I will be spending money in Stockholm and Copenhagen for basic expenses like food, local travel, etc. I believe my debit card will incur an international fee on every purchase which I’d rather not pay.  It seems as though Sweden and Denmark have their own currencies, Swedish krona and Danish krone, each with different exchange rates to the USD.  What’s the best and easiest way to spend money when traveling in these countries? I’d prefer not to carry a bunch of cash. Is there some kind of a prepaid card that I can load up and spend in both countries? What do most people do?  Thanks for any advice!

Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective?


I'm trying to print out elements of a vector that is made up of structures. Here is the definition of the vector and its contents:  struct H_Data{     double count[2];     double min, max;     list <double> Ref_Data; };  struct Histogram  {     std::vector<H_Data> H; }Hist[MAX_DIM];   Now I created a vector H and I want to print out all of its contents. I tried doing this with a for loop:  for (int i=0; i<H.size();i++){     cout << H[i] << endl; }   But I get a type error here.  ./CD.h:155:14: error: invalid operands to binary expression ('ostream' (aka   'basic_ostream<char>') and 'value_type' (aka 'H_Data'))     cout << H[i] << endl;   Any help on how to print the contents?

I am writing a small matrix library in C++ for matrix operations. However my compiler complains, where before it did not. This code was left on a shelf for 6 months and in between I upgraded my computer from debian etch to lenny (g++ (Debian 4.3.2-1.1) 4.3.2 ) however I have the same problem on a Ubuntu system with the same g++.  Here is the relevant part of my matrix class:  namespace Math {     class Matrix     {     public:          [...]          friend std::ostream& operator<< (std::ostream& stream, const Matrix& matrix);     } }   And the "implementation":  using namespace Math;  std::ostream& Matrix::operator <<(std::ostream& stream, const Matrix& matrix) {      [...]  }   This is the error given by the compiler:     matrix.cpp:459: error: 'std::ostream&   Math::Matrix::operator<<(std::ostream&,   const Math::Matrix&)' must take   exactly one argument   I'm a bit confused by this error, but then again my C++ has gotten a bit rusty after doing lots of Java those 6 months. :-)


Been working on it for a couple of hours with no success. My intuition tells me that it has to do something about $\gcd(n,x) = 1$ I have managed to prove that if $\gcd(x,n) = 1$ the claim holds, now I try to prove the other way around. Any hint or a solution will help. thanks!

The problem statement is: for $a,b$ coprime, prove that there exists positive integers $x,y$ such that $ax-by=1$.  The question is form Arthur Egnels' problem solving text, and from the chapter on the pigeonhole principle.    My question: His proof begins by generating a list $a,\ldots,a(b-1)$, where he then points out that each element in this list(which proceeds sequentially) doesn't have remainder $0\pmod{b}$.  He then shows that we arrive at a contradiction if we assume that we also don't get remainder $1$ in this list $\bmod b$.  To show the contradiction in this last statement, he first states that we would have positive integers $p,q $ where $ 0<p<q<b$ so that $pa\equiv qa \pmod{b}$.  He then goes on to point out that since we $a$ and $b$ are coprime, we then have that $b| q-p$.  I understand the last part here, but don't see why we get $pa\equiv qa \pmod{b}$.  Thanks in advance


On another stackexchange site, I used the following phrasing:     I want to do X.  It seems I can only do so when Y.   Someone edited the second sentence:     It seems that I can only do so when Y.   This made me realise that the edited form is perhaps more common -- but is my original phrasing grammatically incorrect?  What role does "that" play in the second variation?

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


I'm confused with the terminology that is seen in the : "Specified 3-A Output Current". Does this mean that it will always drive 3A output current or does this mean that it is capable of driving a 3A load where I don't necessarily use 3A (my application only requires about 100mA max)?

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


Can we prove that the following sequence is always positive for EVEN $n$ and for positive real $x$. The sequence is very similar to Taylor expansion of $e^x$, but negative signs for odd exponents: $$\sum_{i=0}^n \frac{x^i(-1)^i}{i!}=1-\frac{x^1}{1!}+\frac{x^2}{2!}-\frac{x^3}{3!}+\frac{x^4}{4!} ... $$ for small $n$, it is easy to show, but I need proof for every EVEN $n$. I tried Induction, but I cannot finish. If somebody knows how to prove by Induction or by any other method, please explain it to me. Thanks for Everyone! This is my first post, sorry for any inconvenience

Is it true that  $$P_n(x):=1+ \sum_{m=1}^n\dfrac{x^m}{m!}$$ has no real root for even $n$ and exactly one real root for odd $n$? I can only prove that the polynomial cannot have any multiple roots. Am stuck , Please Help.


Question is what exactly title says that have we ever seen an atom through any means (microscopes/equipments.etc)? If not, how do we know they exists?

I was wondering how far in imaging physics had gotten. Do we hold the technology to actually take a picture of, say, an alpha particle, or even a single atom?  I realise we aren't talking about camera pictures, so what kind of imaging techniques have taken images/is most likely to be the technique to take an image of a single atom?


15 Coupons are numbered from 1......15, 7 Coupons are selected Randomly One at a time With Replacement. The Probability That largest number appearing on selected coupons is 9 is?  How to approach this one?   I know in sample space there will be 15^7 because it is replacement but How can i select that event?

15 coupons are numbered 1,2,3...15. 7 coupons are selected at random one at a time with replacement. Find probability that 9 is the largest number appearing on the coupon. I am having a problem finding $N(a)$ for this problem.  My working:  $N(s)= 15^7$ (since you have 15 choices for each time you pick up a coupon)  $N(a)= 9^7$  (since you have 9 permissible choices for each time you pickup a  coupon)  But according to my textbook $N(a)= 9^7 -8^7$  but no further explanation is given.  So i would really appreciate it if someone could point out where i am going wrong. Thanks in advance :)


I'm having trouble finding the ISO for my Ubuntu download. Where should I go to obtain it?

I would like to see a full how-to guide on how to install Ubuntu.


Show that  $$ \sum_{n=1}^\infty \left( \frac{1}{n(n+1)} \right) = \frac{1}{2}+\frac{1}{6}+\frac{1}{12}+ \;... $$  converges and find its sum.  My solution so far:  I am thinking about finding the partial sum first and show that the series converges since its finite partial sum converges.  Now  $$ S_N=\sum_{n=1}^N \left( \frac{1}{n(n+1)} \right)=\sum_{n=1}^N \left( \frac{1}{n}-\frac{1}{n+1} \right)=\frac{1}{2}+\frac{1}{6}+\frac{1}{12}+\;...= \left( \frac{1}{1}-\frac{1}{2} \right)+\left( \frac{1}{2}-\frac{1}{3} \right) + \;...+ \left( \frac{1}{N}-\frac{1}{N+1} \right)$$  but I don't know how to go on with this. Now $ \lim_{N \to\infty} \left( \frac{1}{N}-\frac{1}{N+1} \right)=0$ but the right answer should be $1$.

I'm a bit confused as to this problem:  Consider the infinite series:  $$\left(1 - \frac 12\right) + \left(\frac 12 - \frac 13\right) + \left(\frac 13 - \frac 14\right) \cdots$$  a) Find the sum $S_n$ of the first $n$ terms.  b) Find the sum of this infinite series.  I can't get past part a) - or rather I should say I'm not sure how to do it anymore.  Because the problem asks for a sum of the infinite series, I'm assuming the series must be Geometric, so I tried to find the common ratio based on the formula  $$r = S_n / S_{n-1} = \frac{\frac 12 - \frac 13}{1 - \frac 12} = \frac 13$$  Which is fine, but when I check the ratio of the 3rd and the 2nd terms:  $$r = \frac{\frac 13 - \frac 14}{\frac 12 - \frac 13} =\frac 12$$  So the ratio isn't constant... I tried finding a common difference instead, but the difference between 2 consecutive terms wasn't constant either.  I feel like I must be doing something wrong or otherwise missing something, because looking at the problem, I notice that the terms given have a pattern:  $$\left(1 - \frac 12\right) + \left(\frac 12 - \frac 13\right) + \left(\frac 13 - \frac 14\right) + \cdots + \left(\frac 1n - \frac{1}{n+1}\right)$$  Which is reminiscent of the textbook's proof of the equation that yields the sum of the first $n$ terms of a geometric sequence, where every term besides $a_1$ and $a_n$ cancel out and yield  $$a_1 \times \frac{1 - r^n}{1 - r}.$$  But I don't know really know how to proceed at this point, since I can't find a common ratio or difference.


I am new to Mathematics, reading books in my free time. I have recently learned about proving Mathematical propositions by induction. I am having a bit of trouble understanding the process and why it is logical.  I have learned that if you have a statement $A$, and you assume $A_{n}$ is true, then you can prove $A$ is true for all numbers greater than $n$ by showing that $A_{n+1}$. I don't understand this because from my point of view it looks like you only proved $A$ is true for $n$ and $n + 1$.  Maybe I am missing something, or maybe I need a formal introduction to logic. I never read anything about philosophy or logic before learning Mathematics, but if reading about logic would help me understand proofs better I would be glad to.

I just realized something interesting. At schools and universities you get taught mathematical induction. Usually you jump right into using it to prove something like   $$1+2+3+\cdots+n = \frac{n(n+1)}{2}$$  However.  I just realized that at no point is mathematical induction proved itself? What's the mathematical induction's proof? Is mathematical induction proved using mathematical induction itself? (That would be mind blowing.)


This is the formatting I want. I enter text in this way   but it shows in this way   The first line of my text was indented in four spaces, so it was show as a line of code, how to set it to normal text? And the spaces between numbers are collapsed, how to solve it?

I want to format an SQL table the right way in a Stack Overflow question.  ID Name  1 Tom  I know the example above is not the right way. I even tried an HTML table approach, but it's still wrong. Please help, because I need to include SQL tables later...


Given $x_1 = 2,$ and $$x_{n+1} = \frac{1}{2}\bigg(x_n + \frac{2}{x_n} \bigg),$$ show that for all $n \in \mathbb{N},$ $x_n \geq \sqrt{2}.$  I tried the following. Suppose, for contradiction, that $x_{n+1} < \sqrt{2}.$ Then, $$\frac{1}{2}\bigg(x_n + \frac{2}{x_n} \bigg) < \sqrt{2},$$ and $$x_n + \frac{2}{x_n} < 2\sqrt{2}.$$ Given that $x_n \geq \sqrt{2},$ it follows that $$\sqrt{2} + \frac{2}{x_n} \leq x_n + \frac{2}{x_n} < 2\sqrt{2},$$ and $$\sqrt{2} + \frac{2}{x_n} < 2\sqrt{2}.$$ So, $$\frac{2}{x_n} < \sqrt{2},$$ and $$\sqrt{2} < x_n.$$ No contradiction. I've tried proving it directly, by squaring both sides and by leaving the expression as is, and I consistently find that the $x_n$ and the $x_n^{-1}$ are together problematic.  I also tried something that allowed me to arrive at the following: $$x_{n+1}x_n \geq 2.$$ But, I don't think that's helpful.  Help?:)

$$a_1 = 1$$  $$a_{n+1}=\frac{1}{2} \left(a_n+\frac{2}{a_n}\right) \ge \sqrt{a_n \cdot\frac{2}{a_n}} = \sqrt{2}$$  I don't understand what happens at the $\ge$ step. Are there any middle steps which can help me understand why is that so?


When trying to place the rep widget on the homescreen, it initially says you need to login.   But I'm already logged in.  So I reopened the app, tried to place the widget and then I got an illegalStateException.  The launcher I'm using is Google Now launcher.   App Version: 1.0.89 Device Manufacturer: LGE Device Model: Nexus 5X OS Version: 7.0 (3239497)

I have an issue with crashing reputation widget when it's added to the home screen. When I add it for the first time, it says "Please login before using this widget" (even though the app itself is logged in already). So I open the app, go back to the home screen, add the widget again and it crashes (and it's not added to the home screen). When I'll try to add it again, it says "Please login before using this widget" again. And then it just repeats - "Please login...", execute the app, crash, "Please login...", etc.  Restart of the device didn't make any change.  I have found .  My set up:  Stack Exchange app version: 1.0.89 Android version: 5.0.1 Device: Samsung Galaxy S4


What is the number of solutions of $x^2 \equiv x \pmod m$ for any positive integer $m$?

Let $R$ be a ring. An element $x$ in $R$ is said to be idempotent if $x^2=x$. For a specific $n\in{\bf Z}_+$ which is not very large, say, $n=20$, one can calculate one by one to find that there are four idempotent elements: $x=0,1,5,16$. So here is my question:     Is there a general result which tells the number of the idempotent elements of ${\bf Z}_n$?


I am surprised to see this python behavior, but couldn't understand why? I am not able to search 0.3 in a python list.  >> import numpy as np >> Lambdas = np.arange(0.0, 1.05, 0.05) >> print(Lambdas) [0.   0.05 0.1  0.15 0.2  0.25 0.3  0.35 0.4  0.45 0.5  0.55 0.6  0.65  0.7  0.75 0.8  0.85 0.9  0.95 1.  ] >> print(0.3 in Lambdas) False >> print(0.30 in Lambdas) False >> print(0.1 in Lambdas) True >> print(0.4 in Lambdas) True >> print(1 in Lambdas) True >> print(1.0 in Lambdas) True >> print(0.1 in Lambdas) True >>

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Somewhere I found the following inequality (see below), named as an alternative form of . I could not find it in wikipedia or other math books. Is this inequality always true? Provided that both 1 and 2 hold simultaneously  $x_n > -1$  all $x_n$ have same sign The below is true:   $$ (1+x_1)(1+x_2)(1+x_3)...(1+x_n) \ge 1 + x_1+x_2+x_3+...+x_n $$

Let $n \in \mathbb N^+$. Show that if $x_1, x_2, ... , x_n$ are $n$ real numbers such that $-1 \le x_i \le 0$ for each $1 \le i \le n$, then $$(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + x_1 + x_2 + ... + x_n$$  I am using a proof by induction, but I am unable to complete it. I would appreciate any tips on how I could finish the proof.   Incomplete Proof Let $P(n)$ be the proposition that $(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + \sum_{i = 1} ^ n x_i$. When $n = 1$, LHS = RHS = $1 + x_i$. Clearly $1 + x_i \ge 1 + x_i$ and so $P(1)$ is true. Assume that $P(k)$ is true, i.e. $(1 + x_1)(1 + x_2)...(1 + x_k) \ge 1 + \sum_{i=1}^k x_i$. Case 1 Suppose $x_{k + 1}  = -1$. Then $1 + x_{k + 1} = 0$, hence LHS = $(1 + x_1)(1 + x_2)...(1 + x_k)(1 + x_{k+1}) = 0$. RHS = $1 + x_1 + x_2 + ... + x_k - 1 = x_1 + x_2 + ... + x_k$ which is always nonpositive since each $x_i$ is nonpositive. Hence RHS $\le 0$ and so LHS $\ge$ RHS. Case 2 Suppose $x_{k+1} = 0$. Then $1 + x_{k+1} = 1$, hence multiplying it to LHS does not change anything. Also, adding $x_{k+1}$ to RHS does not change anything. Therefore, LHS $\ge$ RHS still holds. Case 3 Suppose $-1 < x_{k+1} < 0$. Then $0 < 1 + x_{k+1} < 1$. Adding $x_{k+1}$ to RHS makes the RHS smaller since $x_{k+1}$ is negative. If LHS $= 0$, then multiplying $1 + x_{k+1}$ to LHS does not change anything, and so LHS $\ge$ RHS holds. If LHS > $0$, then multiplying $1 + x_{k+1}$ to LHS makes the LHS smaller since $0 < 1 + x_{k+1} < 1$. In this case LHS $\ge$ RHS does not necessarily hold? ...


I just got a macbook pro 15' late 2015 from my work. I have an issue where my ipad and iphone cant be charge or connected to the macbook, it keeps disconnecting and it charge for one second and then disconnect and keep doing that.  I tried to run sudo killall -STOP usbd , the transfer/connection with my ipad works but it wont charge. I know most people will say 'dont charge your ipad with your mac because it wont work or slow', but I got my own macbook pro 13' late 2015 and i got no issue at all to charge my ipad and share screen using my ipad  I am just wondering if there is an issue with the hardware of my macbook or is there something else ?  p/s : In the system info, it says 'extra operating current : 0 '

When I charge my iPhone 4 on my laptop, it starts charging but then it keeps going on and off charging even though it's not touched. It charges fine with a plug charger or with any computers I use at college.  What things prevent a Mac from charging a connected iPhone so that charging can be resumed?


What are the invertible elements of the $K[X]$ ring where $K$ is  a field?  I know that in a field all the elements are invertible but I'm having trouble linking $K$ and $K[X]$

If $R$ is a field, what are the units of $R[X]$?   My attempt: Let $f,g \in R[X]$ and $f(X)g(X)=1$. Then the only solution for the equation is both $f,g \in {R}$. So $U(R[X])=R$, exclude zero elements of $R$.  Is this correct ?


I use tabular legends for my graphs in pgfplots. At least three posts give ways to do that: ,   and . I like the syntax where a \label is given to the curves, called in a \matrix after \end{axis}.  However, I often need to define the legend entries "by hand" with \addlegendimage, which is then labeled and reference to. Here's an example:  \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \usetikzlibrary{     matrix, } \pgfplotsset{     compat=newest,     every axis plot post/.append style={         every mark/.append style={solid},        % avoid dashed markers     } }  \begin{document} \begin{tikzpicture} \begin{axis}[ title={$y=a \cdot x + b$},     xlabel=$x$,     ylabel=$y$,     ] \addplot+[domain=-1:2, samples=10, mark=o, dashed] {1*x+1}; \addplot+[domain=-1:2, samples=10, mark=o, solid] {1*x+2}; \addplot+[domain=-1:2, samples=10, mark=square, dashed] {2*x+1}; \addplot+[domain=-1:2, samples=10, mark=square, solid] {2*x+2};  \addlegendimage{dashed}  % define by hand a legend image \label{plot:dashed}      % label it \addlegendimage{solid} \label{plot:solid} \addlegendimage{only marks, mark=o} \label{plot:o} \addlegendimage{only marks, mark=square} \label{plot:square} \coordinate (legend) at (axis description cs:1.03,1); \end{axis}  \matrix[     draw,     matrix of nodes,     anchor=north west, ] at (legend) {     Slope                   & $a$ & $1/a$   \\     \ref{plot:o}            & 2   & 0.5     \\     \ref{plot:square}       & 1   & 1       \\     Origin                  & $b$ & $1/b$   \\     \ref{plot:solid}        & 2   & 0.5     \\     % call the image. It would better to create it by hand here, no?      \ref{plot:dashed}       & 1   & 1       \\ };  \end{tikzpicture} \end{document}     It sounds strange to define "by-hand" a \addlegendimage with a \label and then call it in the matrix with \ref. As we're still in the tikzpicture, is there a command to directly generate the legend images within the matrix?

I want to use markers form \usetikzlibrary{plotmarks}, like: pentagon*, diamond*, square* and triangle* in the title of the plot. They work as markers in the plot but i get an error when in want to include them in the title (instead of the "x" in \mathbf{})    This is my code:  \begin{filecontents*}{data.txt} b d c 1 a 2    2 b 4    3 c 6    4 d 8    5 e 10   6 f 12   7 g 14   8 x 16   9 x 18   \end{filecontents*} \documentclass[paper=a4,ngerman,xcolor=dvipsnames]{article} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage{pgfplots} \pgfplotsset{compat=1.14} \usepackage{siunitx} \usepackage{caption} \usepackage{graphicx} \usepackage{lipsum}  \pgfplotscreateplotcyclelist{mycolorlist}{ blue!01!green,every mark/.append style={fill=blue!10!black},mark=+\\ }  \begin{document} \begin{figure}   \begin{tikzpicture}     \begin{axis}[         grid=both,         width=12cm,          height=9cm,         xtick pos=left,         ytick pos=left,         title style={draw,fill=none,name=legend},         title={%             ${\color{red}\mathbf{x}}=\SI{100}{\kilo\Hz}$,             ${\color{red}\mathbf{x}}=\SI{10}{\kilo\Hz}$,             ${\color{red}\mathbf{x}}=\SI{1}{\kilo\Hz}$,             ${\color{red}\mathbf{x}}=\SI{100}{\Hz}$,             ${\color{red}\mathbf{x}}=\SI{10}{\Hz}$,             ${\color{red}\mathbf{x}}=\SI{1}{\Hz}$},         xlabel={R}, ylabel={Z},          legend style={at={(0.02,0.98)},anchor=north west,cells={anchor=west}},         legend style={font=\footnotesize},         cycle list name=mycolorlist,         scatter,         point meta=explicit symbolic,         scatter/classes={           x={},% empty argument means: use the default style                  g={mark=o,red!10!black},           f={mark=square*,red!20!black},           e={mark=diamond*,red!30!black},           d={mark=triangle*,red!40!black},           c={mark=pentagon*,red!50!black},           b={mark=*,red!60!black},           a={mark=oplus,red!70!black},           z={mark=*,red!80!black}           },         ]         \addplot table [x=b,y=c, meta=d]{data.txt};          \legend{Z}    \end{axis}   \end{tikzpicture} \end{figure} \end{document}   \pgfuseplotmark{square*} works but it also changes the title.   . . . title style={draw,fill=none,name=legend},         title={%             ${\color{red}\pgfuseplotmark{o}}=\SI{100}{\kilo\Hz}$,             ${\color{red}\pgfuseplotmark{square*}}=\SI{10}{\kilo\Hz}$,             ${\color{red}\pgfuseplotmark{diamond*}}=\SI{1}{\kilo\Hz}$,             ${\color{red}\pgfuseplotmark{triangle*}}=\SI{100}{\Hz}$,             ${\color{red}\pgfuseplotmark{pentagon*}}=\SI{10}{\Hz}$,             ${\color{red}\pgfuseplotmark{*}}=\SI{1}{\Hz}$,             ${\color{red}\pgfuseplotmark{oplus}}=\SI{20}{\mHz}$},   It looks like this:    After using \def\showmark#1{\tikz[baseline]\node[red]{\pgfuseplotmark{#1}};} the problem with the y-alignment is fixed, but the title is not centered anymore.    Using \showmark{square*}=$\SI{100}{\kilo\Hz}$ instead of \showmark{x}=$\SI{100}{\kilo\Hz}$ leads to:


A null set is always considered to be zero dimensional,but a set containing zero vector only is taken to be non-empty set.If something is present there,then why it does'nt make a contribution in part of dimension.

According to C.H. Edwards' Advanced Calculus of Several Variables: The dimension of the subspace $V$ is defined to be the minimal number of vectors required to generate $V$ (pp. 4).  Then why does $\{\mathbf{0}\}$ have dimension zero instead of one? Shouldn't it be true that only the empty set has dimension zero?


I need a regular expression to accept a max value of 99999.99  I have tried this:  currencyPattern: /^(\d{0,5})(?:.\d{2})$/  but it accepts 123456 and 1234567 also.

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?