I assumed that if we quotient $Z$ by the ideal generated by 4, it will be the same as the field $F4$. It turns out not to be the case because $Z/(4)$ is not a field.  In general, when is $Z/(n) = Fn$?
Let $n \in ℕ$. Show that the ring $ℤ/nℤ$ is a field if and only if $n$   is prime.   Let $n$ prime. I need to show that if $\bar{a} \neq 0$ then $∃\bar b: \bar{a} \cdot \bar{b} = \bar{1}$. Any hints for this ?  Suppose $ℤ/nℤ$ is a field. Therefore: for every $\bar{a} \neq 0$ $∃\bar b: \bar{a}\cdot \bar{b}=1$. How can I show that $n$ must be prime ?
Is there a way to format a UTC time into any arbitrary string format I want in java?  Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me.  Is there a way to do this? File issues after importing Drupal site I recently tried to move my Drupal site to a new server using this page: . But now the style doesn't seem be loaded and more importantly I get this error on every page in the site (even on the frontpage):  Warning: file_put_contents(temporary://filef76T9k): failed to open stream: &quot;DrupalTemporaryStreamWrapper::stream_open&quot; call failed in file_unmanaged_save_data() (line 1900 of /Library/Server/Web/Data/Sites/Default/drupal/includes/file.inc). The file could not be created.  Any ideas what this could be about? Round a double to x significant figures Projecting a point onto a convex set decreases its distance from each point of that set For a convex set $K$, $x\in \mathbb{R}^d$ and $y=\Pi_K(x) $ (the projection of $x$ onto $K$), we want to show that for any $z\in K$ it holds that: $\|x-z\| \ge \|y-z\|$.  $$ $$  I'm not sure if the following proof is valid:  $$ y=\Pi_K(x) = \arg \min_{y\in K} ||y-x||  \Rightarrow \forall z\in K \langle y-x,y-z\rangle =0 $$ $$ ||y-x||^2_2+||y-z||^2_2=||x-z||^2_2  \quad (Pythagoras)$$  $$ \Rightarrow ||y-z||^2_2 \le ||x-z||^2_2 $$ $$ \Rightarrow||y-z|| \le ||x-z|| $$ Below is the text in the file:  Pseudo name=Apple Code=42B state=fault  Pseudo name=Prance Code=43B state=good   I need to grep for "42B" and get the output from the above text like:   Pseudo name=Apple Code=42B state=fault   Does anyone have idea on how to achieve this using grep/awk/sed? Javascript file uploads How can I display just a portion of an image in HTML/CSS? SELinux preventing Apache from writing to a file SELinux is preventing the apache user from writing to a log file which it owns. When I do setenforce 0 it works. Otherwise it shows this error  IOError: [Errno 13] Permission denied: '/var/www/webapp/k/site/k.log'   The security context of the file:  $ ll -Z k.log  -rw-r--r--. apache apache system_u:object_r:httpd_sys_content_t:s0 k.log   The file was created when the SELinux mode was set to permissive.  How to set the security context so the apache user can write in that directory? I did set that directory security context using chcon but I can't find a suitable file type.  From audit.log:  type=AVC msg=audit(1409945481.163:1561): avc:  denied  { append } for  pid=16862 comm="httpd" name="k.log" dev="dm-1" ino=201614333 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_sys_content_t:s0 tclass=file type=SYSCALL msg=audit(1409945481.163:1561): arch=c000003e syscall=2 success=no exit=-13 a0=7fa8080847a0 a1=441 a2=1b6 a3=3 items=0 ppid=15256 pid=16862 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) Copying protected files between servers in one line? I'd like to copy squid.conf from one server to another.   The servers don't talk to each other. I'd like to go through my workstation. Both servers have the file, so it will be overwritten on the target. The files have 600 permission and are owned by root. root login via ssh is disabled (PermitRootLogin no). I'd like to do it in one line, if possible, since it will be a part of a setup guide.   I know to do  ssh source 'tar czpf - -C /etc/squid/ squid.conf' | \     ssh target 'tar xzpf - -C /etc/squid/'   to copy files between servers and preserve permissions. However, in this case I will get "Permission denied".  I also know I can do this:  ssh -t source 'sudo cat /etc/squid/squid.conf'   This way the -t allows sudo to ask for the admin password before outputing the content of the file.  The problem is, I don't know how to combine those techniques into something that will ask for the sudo password on each server, and transfer the file to its destination. Is this possible?  UPDATE: Here's the best I could come up with:  ssh -t source 'sudo tar czf /tmp/squid.tgz -C /etc/squid squid.conf' &amp;&amp; \ ssh source 'cat /tmp/squid.tgz' | \     ssh target 'cat &gt;/tmp/squid.tgz' &amp;&amp; \ ssh -t source 'sudo rm /tmp/squid.tgz' &amp;&amp; \ ssh -t target \     'sudo tar xzf /tmp/squid.tgz -C /etc/squid &amp;&amp; sudo rm /tmp/squid.tgz'   Calling this a one-liner seems like a stretch. I think I'll just break it down to separate steps in the setup guide. If in a UFD every maximal ideal is principal then it is a PID How to build a dmg Mac OS X file (on a non-Mac platform)? Is it possible to build a .dmg file (for distributing apps) from a non-Mac platform? And if yes, how? Does the derivative of a continuous function goes to zero if the function converges to it? Importing only certain rows between spreadsheet documents Document 1 has many rows of data.  How do I import into document 2 only those rows that have a certain value in column C? Why does the Euclidean algorithm work for polynomials? What is the proof? Suppose I know that I can find the $\gcd$ of two integers with the Euclidean algorithm. What is the 'extension' so I can use this method also for polynomials?  Edit: I found an easy answer with less rigor which is approachable without knowledge of matrices:    also the first 3 subchapters of Generating Random Passwords When a user on our site loses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "needed" strong password rules, all I want to do is give them a password that they can change later.  The application is a Web application written in C#. so I was thinking of being mean and going for the easy route of using part of a Guid. i.e.  Guid.NewGuid().ToString("d").Substring(1,8)   Suggesstions? thoughts? I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling? Function always continuous in a Sobolev Space? Hy everybody got a quick question. I know that all function F in a Sobolev Space has a continuous representative called U such as U=F almost everywhere.  Lets take for example: The Sobolev space on ]-1,1[    the function F(x)=0 on x&lt;0 and F(x)=1 x>0  we can't find a continuous representative because it would be on a larger interval let say ]-eps ,eps[ so not in a Sobolev space the function F(x)=x on x&lt;0 and x>0 and F(0)=1 where we could find the representative U=x   My question is: if F isn't continuous is it sure that it isn't an element of a Sobolev Space? It was given was given as a necessary condition in my course.  Thanks for the help. SqlException from Entity Framework - New transaction is not allowed because there are other threads running in the session When is logistic regression solved in closed form? We know  speedup brute-force attacks two times faster in block ciphers (e.g brute-forcing 128-bit keys take $2^{64}$ operations, not $2^{128}$). That explains why we are using 256-bit keys to encrypt top secrets. But  on AES shows brute-forcing AES-256 take $2^{100}$ operations. Does this attack work with Grover's search to make AES cipher quantum unresistant?