I know that if the function is bijective we can define the inverse function. But how do we know that this inverse function is bijective as well? Should we proof it?

We have a function $\varphi:G\rightarrow H$ is an isomorphism, show its inverse $\varphi^{-1}:H\rightarrow G$ is also an isomorphism  I am fine with showing it to be a homomorphism and surjective, this is my attempt at showing injectivity, I'm unsure if they would be sufficient  Assume: $\forall h\in H, \exists g\in G$ s.t. $\varphi(g)=h$ and $\forall g_1, g_2\in G, \varphi(g_1)=\varphi(g_2)\Rightarrow g_1=g_2$  Injectivity - Need to show $\varphi^{-1}(g_1)=\varphi^{-1}(g_2)\Rightarrow g_1=g_2$  $\varphi^{-1}(g_1)=\varphi^{-1}(g_2)\Rightarrow g_1=\varphi(\varphi^{-1}(g_2))$ from our surjectivity assumption on $\varphi$ we know there exists such a $\varphi^{-1}(g_2)\in H$ and from our injectivity assumption on $\varphi$ we know that this solution is unique.   [Sufficient? What more could be added? How could I do this clearer?]


Shouldn't it be 36.74? Can someone explain what goes on behind the scenes & why does it make sense (if any) for such calculations?    console.log(96.74 - 60)

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


I want to give access domain admins group to sudoers access.  I have come across with many commands but nun of works for me.  fname.lname ALL=(ALL) ALL   With this command i can give access to a particular user, But i want to give access to all the members of the domain admin group.  %DOMAINNAME\\domain\ admins ALL=(ALL) ALL %DOMAINNAME\\domain\ admins ALL=(ALL) ALL %DOM.DOMAINNAME.COM\\domain\ admins ALL=(ALL) ALL DOMAINNAME\\domain\ admins ALL=(ALL) ALL DOMAINNAME\\domain\ admins ALL=(ALL) ALL DOM.DOMAINNAME.COM\\domain\ admins ALL=(ALL) ALL %DOMAINNAME\\domain_admins ALL=(ALL) ALL   Like many commands i have tried but non out of these working.  My domain Group have two words i.e      domain admins  Complete domain name is like:      DOM.DOMAINNAME.COM  And short name is      DOMAINNAME  Tell me how can i give access to sudoers for a group.   I am working on python scripting where it asks for sudo run but the user doesn't have sudo access or everytime no any domain user is entertain to enter credentials.

I am on CentOS 6.7 and want to add two domain admins to the sudo group.   I have tried adding both users individully and both together see below:   someuser ALL=(ALL) ALL #THIS Works, but is not a domain account   %domain\ admins ALL=(ALL) ALL #this does not work  CS\domainUser ALL=(ALL) ALL #this does not work either  cs\domainUser ALL=(ALL) ALL #this does not work either  anotherdomainUser ALL=(ALL) ALL #this does not work either   When I su into each doamin user then run the sudo command I type my password as prompted and I get a wrong password error.   What am I doing wrong?


I would like to ride with a 11-32 cassette but I have a short caged Ultegra 6870 derailleur. Can I just swap the cage? Or are there other differences between the derailleurs?  Cheers

Is it possible to convert a short cage rear derailleur (for example the Huret Svelto) to a long cage derailleur by just taking the lower cage and replacing it by a longer one?


I am considering getting a tablet to use on the go. But I also would like to use it in conjunction with my Laptop and Desktop PC, both running Ubuntu. Specifically, I am imagining using it as an input device for graphics programmes, virtual blackboards and the like. After a cursory search, this seems to be feasible in principle, but is there anything I should be aware before buying any tablet? Are different operating systems on the tablet better suited for this? Thanks in advance for any answers!

I read some articles, and seen some videos about a github project that do a sort of thing, but it's a little bit outdated things.I wanna see if this thing is possible to do, nowadays. Thanks


I need to open a browser and access my server with the ip address 1.2.3.4. First I ping my server and if the ping did not fail I launch the home page in a browser. For this I have written a bash file as follows:  # add ip / hostname separated by white space myHost=1.2.3.4  # no ping request COUNT=1  count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }') if [ $count -eq 0 ]; then # 100% failed echo "Host : $myHost is down (ping failed) at $(date)" else     firefox $myHost fi   But I am getting an error message  Error: no display specified. Firefox is not launching. What am I doing wrong.   This file is getting called every 5 minutes using a cronjob. The cronjob seems to be  working fine.

I need to run a Java applet from a Firefox. The problem is, I need to run this Firefox from a cron. If I run from the command line and its work fine, but when put the command in the cron it failed:  */1 * * * * firefox http://domain.com/iqms/packetloss/iqmspacket2.html


So what I'm trying to do is to add an array of strings to my Arraylist BDDvars. The issue I seem to be facing is that after adding 'temp' (which is an array of strings) to the BDDvars list, when I instantly print -- I get values. However, after reinitializing temp, somehow the values that were present in my arraylist are also reset. Would appreciate some help on why this is happening. Thanks!   Code is here:       List<String[]> BDDvars =new ArrayList<String[]>();      BDDvars.add(temp);     System.out.println(BDDvars.get(0)[0]); // this gives value of temp     for(int n =0;n<11;n++)       temp[n] = "";     System.out.println(BDDvars.get(0)[0]); // this gives empty string - why?

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


I personally work cross platform with Windows and Linux and sometimes I edit .sh files with Notepad++. It is hence problematic for me to keep all my files' tab indents as Unix-like so my solution was to use space-based indenting.  Yet, I encounter problem when indenting herdocs inside heredocs. For example, here is an external heredoc, holding an internal cat heredoc:  bash /dev/fd/10 10<<-'EOT'     Some command.     cat << EMW >> /etc/apache2/apache2.conf     EMW     Some other command. EOT   As I recalled I ran this successfully with Unix-like tabbing in bash, but not with Windows-like tabbing as then the script broke and the same goes for using spaces.  My question:  My question can actually be comprised of these questions and I ask it not only for me but for other curious people to find this:   Why can't we use spaces for indenting commands and heredocs inside other heredocs? If I'm wrong and there is a workaround to allow space indenting for commands and heredocs inside other heredocs, than what is it?

The following codepiece is a script used to install Apache. I run this script in-place when executing it from the heredoc block that wraps it (APACHE).   Note that inside this APACHE heredoc, I have an internal heredoc (MOD_REWRITE), which I can refer to as a "secondary" or "internal" heredoc.  Please also note that all the code inside APACHE is indented (tabulated), besides the code of the internal heredoc.   bash /dev/fd/10 10<<'APACHE'      # Setup basics:      apt-get update -y && apt-get upgrade -y     apt-get install tree zip unzip     a2enmod mcrypt && a2enmod mbstring      # Setup LAMP environment with enabled mod rewrite:      echo -e "\07" && echo -e "\077" # Insert password.     apt-get install lamp-server^ -y     a2enmod rewrite  cat <<MOD_REWRITE >> /etc/apache2/apache2.conf  <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> MOD_REWRITE      systemctl restart apache2.service      # Setup maldet:      cd /usr/local/src     wget http://www.rfxn.com/downloads/maldetect-current.tar.gz && tar -xzf maldetect-current.tar.gz     cd maldetect-* && bash ./install.sh  APACHE   If I indent it with commands with spaces instead of tabulations, I can run the script just fine (as long as it doesn't have the MOD_REWRITE inside it). If I add the MOD_REWRITE, the script brakes when executed; The same happens if I remove all space-indents whatsoever and totally replace them with tabulations, but AFAIK, the last time I tried to execute the script with tabulations, it also broke (even when I added an hyphen between bash /dev/fd/10 10<< and 'APACHE'.  My question:  What is the right way to indent the MOD_REWRITE heredoc inside the APACHE heredoc, so the script would be more unified and would execute without breakage?  Notes:   The reason I want to indent internal heredocs as well, just as I would do with any other command, is from aesthetic reasons --- It makes it easier for me to read and organize my scripts. This question is not the same as "" because it asks about the correct way of indenting internal heredocs inside external heredocs, and not about indenting external heredocs themselves.


Why direction of dipole is from negative charge to positive charge?

An  is defined as $p = q\times d$ (for two point charges $\pm q$ separated by a distance $d$).    What is the physical meaning of this quantity?  Why does the direction of the electric dipole moment go from the negative charge to the positive charge? Another way of saying this, why electric dipole moment is a vector quantity?


I just bought a new computer with a 2TB hard drive that has only a single partition. I would like to divide this into at least 4 partitions, but when I try to shrink the current partition, it says the total size is 1888171 MB and that the size of available shrink space is only 939075 MB. The used disk space is at 40gb right now - why can't shrink it to somewhere around that?   I read here:  that this is because of unmovable system files. I doubt this is the only problem though.   I would like to get this partition down to 500GB. How can I do this?  edit: So I've learned that 4 partitions is the max allowed on MBR. I realize this makes it sound silly that I said I wanted "at least 4". Time to learn how to use GPT :/

I have just bought an HP laptop with Windows 7 (64 bit). It has a 500 GB HDD with three partitions: a small hidden system partition, a 12 GiB HP recovery partition, and a 450 GiB C: boot partition.  I would like to split this large C: partition into two partitions, leaving only 100 GiB for the system, and giving the rest to a new data partition.  Although the Windows built-in Disk Management utility has an option to shrink the bootable partition, it only allows me to shrink it roughly by half, even though only 20 GiB on the partition is used. As far as I understand, system unmovable files lie in the middle of the partition, preventing Disk Management utility to do what I want.    And since new HP laptops don't come with OS installation disks (they only allow you to create recovery disks yourself), I can't just repartition HDD and then reinstall OS.  So, is there a way to shrink the C: bootable partition and preserve Windows 7 working?  P.S.: I have tried to use the third-party  utility, and after shrinking the partition, Windows 7 stopped booting, with a . System recovery didn't work, and I had to do factory recover. Since this is a long process, I would like to avoid doing it again :) So, please, suggest only proven solutions.


I would like to find the distance between two points location 1 and location 2. In 2D, location 1 is represented by a Gaussian distribution with mean $\mu_1$ and co-variance matrix $\Sigma_1$. Similarly location 2 is represented by a Gaussian distribution with mean $\mu_2$ and co-variance matrix $\Sigma_2$.  \begin{align} \mu_1 &= \begin{bmatrix} \mu_{x_1}  \\ \mu_{y_1}\end{bmatrix} &{\rm and} &\qquad \Sigma_1 = \begin{bmatrix} \sigma_{x1} &\sigma_{x_1, y_1}  \\ \sigma_{y1, x1} &\sigma_{y_1}\end{bmatrix}  \\[10pt] \mu_2 &= \begin{bmatrix} \mu_{x_2}  \\ \mu_{y_2}\end{bmatrix} &{\rm and} &\qquad \Sigma_2 = \begin{bmatrix}\sigma_{x_2} &\sigma_{x_2, y_2}  \\ \sigma_{y_2, x_2} &\sigma_{y_2}\end{bmatrix} \end{align}  By looking at other questions, I believe the distance between these two locations will be a Gaussian distribution as well. In that case, distance would be a Gaussian would be:    \begin{align} \mu &= \mu_1-\mu_2  \\[5pt] \Sigma &= \Sigma_1 + \Sigma_2 \end{align}  But I am skeptical about this since $\mu_{x_1}$ and $\mu_{x_2}$ are correlated ($\sigma_{x_1y_1}$ is not equal to zero).  But location 1 and location 2 distributions are not correlated. So do I have to worry about the correlation of $\mu_{x_1}$ and $\mu_{x_2}$?

Assume you are given two objects whose exact locations are unknown, but are distributed according to normal distributions with known parameters (e.g. $a \sim N(m, s)$ and $b \sim N(v, t))$. We can assume these are both bivariate normals, such that the positions are described by a distribution over $(x,y)$ coordinates (i.e. $m$ and $v$ are vectors containing the expected $(x,y)$ coordinates for $a$ and $b$ respectively). We will also assume the objects are independent.  Does anyone know if the distribution of the squared Euclidean distance between these two objects is a known parametric distribution? Or how to derive the PDF / CDF for this function analytically?


I would like to know how to pass a argument to a Bash function which would consequently serve as a pattern to awk. I have read several Q/As which tend to answer the same question, however, I am missing something.  I use the following one-liner to find a package, which in this example is vivaldi, using Arch Linux packman:   pacman -Sl | awk '$2~ /^vivaldi/{print $2, $3, $4, "[" $1 "]"}' | sort   I've written the following function but executing it outputs no result:  function pacname() {     #pattern="$1"     pacman -Sl | awk -v pattern="$1" '$2~ /^"pattern"/{print $2, $3, $4, "[" $1 "]"}' | sort }

Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l >> "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l >> "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally.


I have a NEC server. Model Express5800/T120d [N8100-1957F] Chipset Intel C602 This server has very loud fans: I hear them at the next floor, all doors closed. I can read cooling fans speed, but I found no way to change it. Nothing into the BIOS to change fan speed, Linux detect nothing valuable into /sys/class/hwmon/ (no pwm entries), lmsensors find nothing, no Windows driver, and no Windows utility found anything. The fans are PWM. I tested them into another computer and I can do whatever I want with the speed. For example using echo  50  > /sys/class/hwmon/hwmon2/device/pwm1 The NEC motherboard has the ability to change fans speed because the speed change during different phases of boot. I hope I can drive the fans using IPMI. IPMI allow to get fans informations: ipmitool sdr and ipmitool sensor: [...] FAN1             | 8210.18 RPM       | ok FAN2             | 933.71 RPM        | nc FAN3             | 933.71 RPM        | nc FAN4             | no reading        | ns [...]  ipmitool sdr get FAN1 and ipmitool sensor get FAN1: Sensor ID              : FAN1 (0x50) Entity ID             : 7.1 (System Board) Sensor Type (Threshold)  : Fan (0x04) Sensor Reading        : 8210.181 (+/- inf) RPM Status                : ok Nominal Reading       : 2532.928 Normal Minimum        : 2976.190 Normal Maximum        : 1392.370 Upper non-critical    : 960.061 Positive Hysteresis   : 238095.238 Negative Hysteresis   : Unspecified Minimum sensor range  : 238095.238 Maximum sensor range  : Unspecified Event Message Control : Entire Sensor Only Readable Thresholds   : unc Settable Thresholds   : unc Threshold Read Mask   : unc Assertion Events      : Assertions Enabled    : unc+ Deassertions Enabled  : unc+  Reading is ok, but I don't know how to use IPMI to change fans speed. I found some people doing it with a Dell server: # manual fan control ipmitool raw "0x30 0x30 0x01 0x00" # set fan level ipmitool raw "0x30 0x30 0x02 0xff " + hex(fan_level)  But I don't know how to find the correct values for my NEC server. --> the question is: how can I modify cooling fans speed using IPMI for my NEC server?

I have an old NEC Express5800/T120d server. It was operating under Windows at reasonable fan speed. I now want to use it at home with Debian, but the fans are always at full speed.  The power supply fan is at full speed. With Windows it was quiet. There is a data cable between the motherboard and the power supply. The 1 x rear + 3 x front fans are also at full speed. With Windows they were relatively quiet. Nothing into the BIOS and IPMI console about fan control. Only the current speed is displayed.     I installed lm-sensors and fancontrol without success:  $ sensors-detect ... with YES answer everywhere ... Driver "coretemp":   * Chip `Intel digital thermal sensor' (confidence: 9) Driver "to-be-written":    * ISA bus, address 0xca2     Chip `IPMI BMC KCS' (confidence: 8)   So sensors-detect only see unusable devices.     Nothing more with pwmconfig:  $ pwmconfig /usr/sbin/pwmconfig: There are no pwm-capable sensor modules installed      I installed freeipmi / freeipmi-tools:  $ ipmi-sensors ... 29 | PSU1 Temp        | Temperature                         | 24.00      | C           | 'OK' ... 32 | FAN1             | Fan                                 | 7936.51    | RPM         | 'OK' 33 | FAN2             | Fan                                 | 933.71     | RPM         | 'At or Above (>=) Upper Non-Critical Threshold' 34 | FAN3             | Fan                                 | 933.71     | RPM         | 'At or Above (>=) Upper Non-Critical Threshold' 35 | FAN4             | Fan                                 | N/A        | RPM         | N/A 36 | AIRVOL1          | OEM Reserved                        | 1.31       | unspecified | 'OK' 37 | AIRVOL2          | OEM Reserved                        | 1.31       | unspecified | 'OK' ...   But I don't know how to do more than just looking at the fan speed. Most IPMI programs included into freeipmi asks for a hostname and user/password but I can not manage to understand what to enter.     I also tried upmiutil and ipmitool packages without better success. They all give me the fan status but I do not understand how to configure them.


When I use the command \usepackage{xcolor} I get an error saying xcolor.sty was not found. Even though other commands like \usepackage{amsmath} have worked. I am very new to LaTeX and am not sure why this is happening, and help would be greatly appreciated.

I'm new to LaTeX, investigating using it for some work projects.  I'm using MiKTeX on Windows.  My employer's locked-down network blocks the application's automatic installation function.  I can take my laptop home and successfully install from there, but if I need a package in the middle of the day I'm stuck.  I am able to access the CTAN website and download the package files (.dtx or .ins?), but I don't know what do do with them.  How can I do a manual package installation?


What is the origin of the "-o-rama" suffix (such as in "app-o-rama"  by the Wall Street Journal), and how can this suffix be clearly defined?

Suffixing by -rama, -orama or -arama — how did this begin? I mean words like futurama, foodarama, etc.


Is there a way to disable KPTI (for meltdown mitigation) once the system is already up and running?  If the system is not yet booted, is it correct that passing kernel command line argument "nopti" will disable the page tables isolation?

Because of the current Intel CPU security hole issue, there is a patch expected which slows down the system performance.  How can I make sure that this patch will not be installed on my Ubuntu system?


Anecdotally, I've heard that it's easier to get tenure in UK/Canada than in the US. I've also heard that some departments have a reputation for denying tenure. Are there statistics about this? (related question: ) How can a job seeker determine how difficult it will be to get tenure when weighing offers from multiple departments? EtA:  For instance, are there polite/coy ways of asking about this?  Would students or post-docs know and be in a more honest position than the profs?  Are reputations widely known and so just asking some senior people would likely give you a good sense? Another aspect of this question: are there regional differences, as I alluded to?

Is there a way or website to find the tenure and tenure denial rates by universities and departments? I heard from some faculty that the tenure rate at X university is Y%, so I wonder if there is a way to find the statistics for all universities.


Community♦ raises auto-flags for disputed reviews, like this:    Note the report of "more delete votes than 'looks good'".  I was curious about the details, so I looked at the review and found this:    One "Looks ok", one "Delete".  How is that "more delete votes than 'looks good'"?  (Also, side issue, but shouldn't that be 'looks ok' now?)

Looking at the flags in the moderator queue, I noticed the following automatic flag.    Clicking on the "review task" link I see the following.    The votes are actually one for deletion and one for "looks good." Such situation should not be reported as "more delete votes than 'looks good'"; either the text should be fixed to not indicate "more" reviews, or a flag should not be raised in this case.


I'm trying to prove that if $N_1\mod(a) = n_1$ and $N_2\mod(a) = n_2$ then $(N_1+N_2)\mod(a) = (n_1+n_2)\mod(a)$  By our assumption $N_1 = am_1 + n_1$ and $N_2 = am_2 + n_2$  So $N_1+N_2 = a(m_1+m_2) + n_1 + n_2$  So $(N_1+N_2)\mod(a) = (a(m_1+m_2) + n_1 + n_2)\mod(a)$  Now my justification was long and considered the case where $n_1+n_2 < a$ and $= a$ and $>$ then a however the solutions I am using to check simply said both $n_1$ and $n_2$ are between $0$ and $a-1$ and so the expression is true. It feels like their reasoning is missing a few steps because I'm not sure how they can go from $n_1$ and $n_2$ between $0$ and $a-1$ to the identity is true. Am I missing something?

modular arithmetic  How Can I prove (a+b) mod m = (a mod m) + (b mod m)) mod m ?


A friend got his SD card wiped by his phone (galaxy S5).  I'm trying to recover his data for him. I need to mount the SD card either on windows or Mac Yosemite. Hope you guys can help me :)  Android: Says SD card is empty and needs to be formatted. Clicked format and it formats, checks for errors, completed. Android keeps saying it needs to be formatted.  Windows: Sometimes it randomly shows in explorer, but can't click it and it won't load.  It shows up in device manager but it never shows up in disk management.  Mac: can't get it to show in disk manager..  What do I do next?

I have a 2 GB Kingston  card which is about three years old. I put it in a reader today in my Windows Vista computer, wrote a 32 MB file onto it, safely removed it, and then tried to read it elsewhere. Nothing. Putting it back in the Windows Vista computer it now says:     You need to format the disk in drive F: before you can use it.   What should I do? I have access to many computers and OSes if your recommendations need that. I would be very sad if I lost all the contents of the card. Most of the data is backed up, but there are a few things that aren't. :(  Doing a   # dd if=/dev/sdg of=~/tmp/sd.bin   gives me a 2 GB file, and  the file it seems like lots of my data is still there. How can I put it back together?


What is it that quarks are actually made of? Will they decay into this substance?  As the up and down quarks are the lightest type of quark do they not decay? I was thinking that if this could happen, there must be lighter quarks?    In response to the comment:  I know that they don't exist on their own but a quark must surely decay at some point into what makes them up?  So I wanted to know: if they decay what do they decay into, and if they do not what are quarks made of?

So atoms are formed from protons and neutrons, which are formed from quarks.  But where do these quarks come from? What makes them?


Would it not be useful to show, or at least link to, the StackStatus Twitter feed on the read-only homepage, to indicate to people why the site is in read-only mode and how long it might be before it's back up?

When the site is in read-only mode, I get a message like this:     This site is currently in read-only mode.   Would it be possible to update that message to provide links to these resources on SE's status:   : Official SE tweets on SE's status. : Official blog posts on SE's status.


Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


Hey I would like to find out a formula on calculating the maximum possible combinations of brackets order.  First of all there a few rules:  - Brackets have to be valid (Every bracket has a closing bracket)  - n % 2 == 0 (n = Brackets, only pairs)  - The order is sensitive, e.g.: a,b and b,a equals 2 combinations  What is a valid combination ?  Lets say n is our variable for the brackets count:  n = 2: () - Only 1 combination possible  n = 4 () (), (()) - Only 2 combinations possible  n = 6 ((())), () () (), (()()), (())(), ()(()) - 5 possible combinations  Now any ideas how to calculate the combinations number when I only have n = ?  Greetings

I can draw $n$ circles on a straight line $OX$. I can either draw two circles some distance from each other (can't touch each other), or I can draw a circle inside another circle. Two arrangements of circles are the same iff there exists a bijection $f$ such that for given circles $C_1',...,C_n'$ and $C_1,...,C_n$:  1.If $C_i$ is inside $C_j$, then $C_i'$ is inside $C_j'$.   2.If $C_i$ is before $C_j$ (meaning it's center has smaller coordinate x then $C_j$), then $C_i'$ is before $C_j'$.  For example:    $1$ and $2$ are the same, but $3$ and $4$ are not.  Here's my solution:  We can clearly create a bijection between the arrangements of circles and strings of $0$ and $1$ of length n.  Given an arrangement of the circles we go from left to right an when we meet an outline of a circle we put $0$ when it's not inside another circle and $1$ when it is. Meaning $1$ and $2$ in the above picture is $010$, $3$ is $000$ and $4$ is $011$. We can create an arrangements of circles from the string similarly.   Therefore the number of different arrangements of $n$ circles is $2^{n-1}$ (since the first circle is outside, so it's $0$ by default.   Correct?


When Thor opened the Iris of Nidavellir's forge, he got 3rd degree burns. The heat he was exposed to was able to melt Uru. And, yet, his clothes survived.  How? Thor definitely doesn't have aura kind of protection like silver age Superman as observed from Thor: Ragnarok movie. What material Thor's clothes are made of?

I'm only familiar with the movies, don't know any comics canon, but either will be appreciated in an answer. In Thor, after he was banished by Odin to earth and stripped of his powers, he eventually is deemed worthy again.  He consequently is able to wield Mjolnir, and it is shown that his scale armor is 'placed back' (over his arms).     Is this 'armor' anything more than cosmetic (as it is never shown to actually benefit him) ? Does it come with his demi-god like powers, or is it tied to Mjolnir ? What is it made of ?


It seems that many classes (e.g. HashSet) assume that the hashCode of an object will not change. The  is clear about what the relationship between equals and hashCode should be.   But is it poor design to implement a hashCode that changes across an object's life-time?

What issues / pitfalls must be considered when overriding equals and hashCode?


Let $\{X_{n}\}_{n}$ be a sequence of i.i.d. random variables of uniform distribution on $(0,1)$. Find $E\tau$ if $$\tau=\inf{\{n\mid X_{1}+\dots+X_{n}\ge1\}}$$  Should I compute probability of $\tau$ being equal to $n$ for all $n$'s?

Choose a random number between $0$ and $1$ and record its value. Do this again and add the second number to the first number. Keep doing this until the sum of the numbers exceeds $1$. What's the expected value of the number of random numbers needed to accomplish this?


How to round off double to have max n number of digits including digits before and after decimal point.  Format : Numeric (10,8) [a maximum of 10 numeric digits, with up to 8 digits after the decimal place.   Example:  2233.64344206d  should round to 2233.643442d.  2233.64344206d has 4 digits before decimal point, 8 after, total 12 digits, and there should be a maximum of 10 total digits. So 2233.643442d is the correct rounding result, because it has 4 digits before decimal point, 6 after, for a total of 10 digits.  java.text.DecimalFormat works to round of number after decimal point. eg if i want to round off number to have max 4 digits after decimal point then i can use DecimalFormat("#0.####")

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


Let $e_\lambda$ be an approximate unit of $I$. Say $e_\lambda$ is quasicentral if for every $a\in A$, $e_\lambda a-ae_\lambda\to 0$. I have shown that when $A$ is separable, $I$ has sequential quasicentral approximate unit $\{e_n\}$ with $e_ne_{n+1}=e_n$. Here is the proof: Let $e_\lambda$ be an arbitary approximate unit of $I$. for $\lambda$ and $\mathcal F\subseteq_{finite}A$ , define $H_\lambda$ to be the convex hull of $\{e_\eta:\eta\geq \lambda\}$ and define $S_{\lambda,\mathcal F}=\{\bigoplus_{a\in\mathcal F} (ha-ah):h\in H_\lambda\}$. Then the norm closure $\overline{S_{\lambda,\mathcal F}}$ contains $0$. Therefore there is an element $h\in H_\lambda$ such that $\left\|\bigoplus_{a\in\mathcal F}(ha-ah)\right\|<1/n$, where $n=|\mathcal F|$. Denote by $h_{\mathcal F,\lambda}$ such $h$. Assume $h_{\mathcal F,\lambda}=\sum \alpha_ie_{\eta(i)}$ ,write $r(h_{\mathcal F,\lambda})=\max_i\eta(i)$, and define : $$(\mathcal F,\lambda)\leq (\mathcal G,\eta)\Leftrightarrow \mathcal F\subseteq \mathcal G\text{ and } r(h_{\mathcal F,\lambda})\leq \eta $$ Then $h_{\mathcal F,\lambda}$ is a quasicentral approximate unit. When $A$(or $I$) is separable, $e_\lambda$ can be chosen to satisfy that $\lambda\in\mathbb N$ and $e_ne_{n+1}=e_n$. Then $h_{\mathcal F,\lambda}h_{\mathcal G,\eta}=h_{\mathcal F,\lambda}$ when $(\mathcal F,\lambda)\leq (\mathcal G,\eta)$.Again since $A$ is seqarable, there are $\mathcal F(n),\lambda(n)$ such that $h_n=h_{\mathcal F(n),\lambda(n)}$ forms a sequential quasicentral approximate unit. However, if $I$ is separable while $A$ is not, I don't know how I can modify the proof to get a sequential quasicentral approximate unit with $e_ne_{n+1}=e_n$.

Here is a lemma about quasicentral-approximate-unit:  Lemma 7.3.1Let $J\triangleleft A$ be a separable ideal. Then there exists a quasi-central approximate unit $\{e_{j}\}\subset J$ such that $e_{j+1}e_{j}=e_{j}$ for all $j\in \mathbb{N}$. Proof. Since $J$ is separable, it contains a strictly positive element $h$ (i.e., $\phi(h)>0$ for all states $\phi$ on $J$-let $h=\sum\frac{1}{2^{j}}e_{j}$ where $\{e_{j}\}$ is any approximate unit). For each $n$ let $f_{n}\in C_{0}(0, 1]$ be the function which is zero on the intercal (0, $\frac{1}{2^{n}}]$, one on the intercal [$\frac{1}{2^{n-1}}$, 1] and linear in between. Evidently we have $f_{n+1}(h)f_{n}(h)=f_{n}(h)$, for all $n$, and it is also readily seen that $\phi(f_{n}(h))\rightarrow 1$ for all states $\phi$ on $J$. The usual Habh-Banach convexity argument allows us to extract a quasicentral approximate unit from  the convex hull of $\{f_{n}(h)\}$, so we leave the remaining details to you.  My question is In the end of the proof, how to usethe Hahn-Banach convexity argument to find a quasicentral approximate unit?


I am a Pakistani national who is migrating to Australia in December 2016 on State sponsored business visa through the government of Australia. I intend to visit the USA in April 2017 and return to Australia.    Can I apply for a US visa from Australia, or do I need to apply from Pakistan?

I'm currently residing in a country other than my own, and am planning a business trip to the USA for a week. Being a Bulgarian citizen, I do not qualify for the ESTA visa waiver program, unlike other EU countries.  The US embassy in Sofia lists a  which they inexplicably describe as "really quite easy". Unfortunately, some of the steps involved would be a major inconvenience for me, as I'm not residing in the country currently, particularly the interview and the visa/passport delivery.  I was hoping it could be possible to apply for a visa from the country of current residence rather than my own, but I wasn't able to find any information on the US embassy's webpages concerning this.


const char* arr[3];  arr[0] = "Hello"; arr[1] = "C++"; arr[2] = "World"; for (int i = 0; i < 3; i++) {     cout << arr[i]; } int* pInt[3]; for (int i = 0; i < 3; i++) {     pInt[i] = &i;     cout << pInt[i] << endl; }  I saved char address into the array(arr) and the output was HelloC++World. The second time I saved int address into the array(pInt) and the Output was Address. Why is it different?

I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers.  int main() {         int arr[10] = {1,2,3};         char arr2[10] = {'c','i','a','o','\0'};     cout << arr << endl;     cout << arr2 << endl; }   However when I run this, arr outputs the address of the first element of the array of ints (as expected) but arr2 doesn't output the address of the first element of the array of chars; it actually prints "ciao".  What is it that I'm missing or that I haven't learned yet about this?


I have a Acer V5 122P, only WIFI, without Ethernet port and I can't connect to WiFi,   I have this information:  $ ifconfig lo        Link encap:Bucle local             Direc. inet:127.0.0.1  Másc:255.0.0.0           Dirección inet6: ::1/128 Alcance:Anfitrión           ACTIVO BUCLE FUNCIONANDO  MTU:65536  Métrica:1           Paquetes RX:289 errores:0 perdidos:0 overruns:0 frame:0           Paquetes TX:289 errores:0 perdidos:0 overruns:0 carrier:0           colisiones:0 long.colaTX:0            Bytes RX:21633 (21.6 KB)  TX bytes:21633 (21.6 KB)   $ lspci | grep Network 01:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)  $ lspci -vvnn | grep -A 9 Network 01:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Foxconn International, Inc. Device [105b:e078]     Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-     Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-     Latency: 0, Cache Line Size: 64 bytes     Interrupt: pin A routed to IRQ 32     Region 0: Memory at f0800000 (64-bit, non-prefetchable) [size=32K]     Capabilities: <access denied>     Kernel driver in use: bcma-pci-bridge   I found these broadcom drivers on internet:    but I don't know how install them, I only know basic commands.  Information for chili555:

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have below code ,but not able to understand how i can avoid second for loop inside account please suggest     public static void getOpenCaseOnAccount() {     Map<id,user> userIds = new map<id,user>([select id from user]);          map<id,account> accountMap = new map<id,account>( [select id,createdbyid from account where createdbyid in :userIds.keyset()]);          list<case> caseList =[select id,CaseNumber,accountid,Status from case where accountid in:accountMap.keyset()];          map<id,case>caseMap = new map<id,case>();     string caseNumbers='';     for(account acc:accountMap.values()) {         for(case c:caseList) {             if(c.AccountId == acc.Id && c.status!='Closed' ){                     caseNumbers += c.CaseNumber +'\n';             }         }     }     system.debug('caseNumber***'+caseNumbers); }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I have a collection of records, like a List<sObject> or the Trigger.new context variable. I need to query other records that are related to these records either directly or indirectly, and I want to use the related data to make further updates. When I write a query in a loop, like for (Account a : Trigger.new) {     Account parent = [SELECT Name FROM Account WHERE Id = :a.ParentId];     // ... }  I keep hitting Salesforce query limits, and I know this is not best practice. What can I do to avoid this problem and bulkify my code?


What I like about pretty much all versions of Internet Explorer is that it knows to save images in your Mt Pictures folder all other file types in Downloads.  I'd like Firefox to behave the same way as, right now, it saves every download in Downloads.  Is there a way to configure Firefox to do this?

98% of what I download is music, so I set the download location to my music folder. However, the other 2% has no place there, so every time I download .doc files or PDF files I have to remove them. Is there a way to make Firefox change the download folder based on file extension? I'll settle for all non-MP3 files getting saved to the desktop.  I know I can right click, choose Save Link As and pick the download location myself, but it seems like there should be a better way.


Anybody knows how I can remove the spacing before my itemized list?  \begin{document}     {\bf main text }\hfill{year}\\     {title}\\     \renewcommand\labelitemii{$\square$}      \begin{itemize}     \setlength{\itemsep}{0.05em}     \item[$\square$] item 1     \item[$\square$] item 2     \item[$\square$] item 3     \item[$\square$] item 4\\     \end{itemize} \end{document}

I'm somewhat of a LaTeX noob, and this is driving me completely nuts.  When I type  \documentclass{article} \usepackage{enumitem}  \begin{document}     Some text     \begin{itemize}[noitemsep]         \item Item 1         \item Item 2         \item Item 3     \end{itemize} \end{document}   I don't want the space which appears in between the text "Some text" and the itemization to be there:    When I search around on Google all I see is tons of long, complicated advice on this site, StackOverflow, forums, etc. on how to not fix the problem ("parskip is evil", etc.), or tons of vague/confusing answers on what package to look at, with no actual example for me to learn from.  So while this question is already asked many times, I have never found a single concrete answer to this question.    The question couldn't be simpler: How do I "properly" get rid of this extra space?


Can a EU citizen visit the US on a passport that expires the same month they are visiting?  Visiting: 26th of oct - 9th of Nov  Visa is valid until: 12th of November  Passport is valid until: 22th of November  I realize there is information about this here:  and that this question is a duplicate of .  However the answer given & information on this page states something about US citizens visiting EU, not the other way around. Do EU citizens visiting the US also need to have a passport that has a validation longer than 6 months?  I checked all Dutch documentation I could find on this, they have great lists of what countries require 3 or 6 months validity, but the US is in none of them. Does this mean there is no validity requirement?   claims I can travel as long as I leave the country before my passport expires. But it is no official source.  Also, the answer quotes this part:     However, the US has signed agreements with a number of countries to waive this requirement.   And the given link goes to a 404 page. How do I find out what countries are waived? I will be visiting from The Netherlands.  The reason why I am asking by the way is because if I do need a new passport, I also need a new ESTA. And this means no returning esta line access, extra costs and extra time.

My visa will be expired December 12, 2017.  However my passport will expire on January 17, 2016.  I wish to reach the USA border on July 15, 2015 to stay in the USA for 25 days. At that date my passport will be expired after 6 months and 2 days from July 15, 2015.   Is there any problem to get permission to enter USA for 25 days from the Immigration authority?


Sometimes I see in many websites' tutorials the use of sudo -H + command for example sudo -H gedit /etc/apt/sources.list. However I know that sudo gedit /etc/apt/sources.list can do the work. So anyone please can tell me what is the difference between sudo -H and sudo?

I've read  and am interested in this line:     You should never use normal sudo to start graphical applications as Root.   Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user.


I am a US citizen and I came to Spain for 90 days’ vacation but it will be the 91st day when I arrive at the airport to leave the country. Will I have any issues getting out of Spain or entering USA?   I don’t know what type of visa I have. When I bought the tickets, there were 91 days between arrival and departure.

I was in Germany last September, my visa said I had 14 days to stay in the Schengen area.  When I was leaving back for Egypt the passport control officer noticed that I was leaving on the 15th day. I didn't even realise that as I had written previously in my visa application that I was staying for 15 days and the embassy in Cairo had my complete airline ticket with specific dates.  Anyway the officer just filed a report on the incident but didn't stamp my passport with my exit date from the Schengen area.  Do any of you guys know if that would make it harder for me to be granted a visa in the future?


I have used variable importance method of random forest to find predictors of mortality in a dataset with (946, 30) dimension. Now I want to perform neural network to find important variabels, but as i searched in google there is no variable importance method in neural network,  Just in one github repostiory there was a function for variable importance. Is variable importance is possible for artificial neural network?

In terms of neural network lingo (y = Weight * x + bias) how would I know which variables are more important than others?  I have a neural network with 10 inputs, 1 hidden layer with 20 nodes, and 1 output layer which has 1 node. I'm not sure how to know which input variables are more influential than other variables. What I'm thinking is that if an input is important then it will have a highly weighted connection to the first layer, but the weight might be positive or negative. So what I might do is take the absolute value of the input's weights and sum them. The more important inputs would have higher sums.  So for example, if hair length is one of the inputs, then it should have 1 connection to each of the nodes in the next layer, so 20 connections (and therefore 20 weights). Can I just take the absolute value of each weight and sum them together?


I'm wondering if there is a difference between accessing private properties in C# through the automatic set and get properties and manually written GetSomeValue() methods.  Eg:  private int someValue { get; set; };   Vs.   public int GetSomeValue() {     return someValue; }

In C#, what makes a field different from a property, and when should a field be used instead of a property?


We know that the series $\sum_{k=1}^{\infty}\frac{1}{k}$ diverges.     The series   $\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\dots+\frac{1}{8}+\frac{1}{10}+\frac{1}{11}+\dots+\frac{1}{18}+\frac{1}{20}+\frac{1}{21}+\dots+\frac{1}{88}+\frac{1}{100}+\frac{1}{101}+\dots$   converges slowly to approximately $22.92$. What is the exact value of the series?   The given series is the same as $\sum_{k=1}^{\infty}\frac{1}{k}$, but excluding all terms which involve the digit $9$.

I know that the harmonic series $1 + \frac12 + \frac13 + \frac14 + \cdots$ diverges. I also know that the sum of the inverse of prime numbers $\frac12 + \frac13 + \frac15 + \frac17 + \frac1{11} + \cdots$ diverges too, even if really slowly since it's $O(\log \log n)$.  But I think I read that if we consider the numbers whose decimal representation does not have a certain digit (say, 7) and sum the inverse of these numbers, the sum is finite (usually between 19 and 20, it depends from the missing digit). Does anybody know the result, and some way to prove that the sum is finite?


I have played around with this question for a bit, but my answer doesn't feel right. I'm not happy with how I converted the binomial. it feels a bit hand-wavy. Is there any way I can make this proof better?  Let's say that we have two teams that are both size $n$. Let's call one team the Blue team and the other team Red. We are going to send a mixture of Blue and Red players to an event (they can also send no one). There are $\binom{2n}{a}$ ways we can select players, but if we want to only send an even sum of players then $a$ must be even. Lets rewrite it as $\binom{2n}{2k}$. Considering all possible $k$-values tells us that the total ways to send an even sum of randomly composed Blue and Red players is $$\sum_{k=0}^n \binom{2n}{2k}$$ Since both teams have $n$ players, we know that there are $2^{2n}$ subgroups that could be sent. But again we only want to consider even groups so we divide by 2 to get rid of all odd groups. Thus we have $$2^{2n}/2 = 2^{2n-1}$$ Both methods give the same result.

I'm repeating material for test and I came across the example that I can not do. How to calculate this sum: $\displaystyle\sum_{k=0}^{n}{2n\choose 2k}$?


I am having trouble seeing why Cantor set has uncountably many elements. A cantor set $C$ is closed. So $[0,1] - C = \bigcup\limits_{n=1}^{\infty} I_n$ is open and is countable union of disjoint open intervals. I can further assume that I can order the $\{I_n\}$ by their left endpoints since there are only countably many of them. So between $I_n=(a_n,b_n)$ and $I_{n+1} = (a_{n+1},b_{n+1})$, we must have $a_n < b_n \leq a_{n+1} < b_{n+1}$. If $b_n < a_{n+1}$, then the Cantor set $C$ consists of an interval, which is a contradiction, so $b_n = a_{n+1}$ for all $n$, and thus Cantor set can have at most countably many points.

Let $G$ be the Cantor set. It is well known that:   $G$ is perfect and hence closed. $G$ has the cardinality of the continuum. $G$ has measure zero. For any set $S \subset \mathbb{R}$ (I will not keep writing that we are in $\mathbb{R}$) we have $S \text{ is closed} \Leftrightarrow S^c \text{ is open}$. Any open set $O$ can be written as a --- in fact unique --- countable union of disjoint open intervals.   $G^c$ can thus be written as a countable union of disjoint open intervals. We now imagine this union as being superposed on the real line graphically as follows:  R: <<<----(....)---(..)--(.)---------(...)--->>>   where the (...) represents the open disjoint intervals (of differing size) composing $G^c$, and the ---  represents the remaining non-covered real numbers (that is those in $G$). Now we can cover $\mathbb{R}$ in its entirety by "collecting" the --- into disjoint closed intervals. Any one of these closed intervals might of course consist of only a single element. We now obtain:  R: <<<[--](....)[-](..)[](.)[-------](...)[-]>>>   Take the union of these disjoint closed intervals. This must be $(G^c)^c = G$. Now it is not hard to imagine a mapping from the (...)'s to the [...]'s. Just take the next (...) in line for each [...] (and do some trivial fixing at the ends). Therefore we have written $G$ as a countable union of disjoint closed sets. However, $G$ has measure zero and therefore cannot contain any closed sets other than the single element type. Hence $G$ is countable. Contradiction.  Where do I go wrong?


[edit: this is about how to store tags in the files and how to use tags and date to create a useful directory tree]  I have more than ten years of digital pictures on my drives. Some of them are family souvenirs, some are travel pictures, some are personal hobbies (shots of decrepit walls, industrial landscapes, etc). I have a python script handling them, which will dedupe, rename, create thumbnails, hard-rotate, etc. Currently I use a directory tree with years (YYYY) as top level, and (YYYYMM or YYYYMMDD or even YYYYMMDD_description) as leaf folder.  But this lead to issues. For example, if I have pics of a new year's eve, it will speparate pictures taken at 20151231-2355 and at 20160101-0010, which should be in the same 20151231_and_20160101_new_year_eve leaf folder.  Another issue: let's say I'm travelling with my family in Vietnam, and I shoot a nice old factory, between the kids playing in water and rice paddies. Should these three pics stay in the same 201304_Vietnam_trip leaf folder, for continuity, or should I separate them according to their theme? Or maybe I could be using the genre field in exif header? But then how to retrive these genres? Or maybe symlinks?  I'm sure there's no ideal solution but I'm interested in hearing advices from other having similar issues.  I'm not a professional photographer, and would be interested to know if there is a kind of standard way in this profession.  I need it to be scriptable, local, and not tied to any service or software. I would prefer no database, if possible. I won't upload everything to Google photo or Flickr, just to realise that their "magical face recognition" is lost as soon as I want to change service. Also, I'm on linux.

I'm in the situation now that i have to bring some order in my folder structure. Up to now I had a single folder for each shoot, made up by the date and a short description for the shoot. For example: 20151015 Mountain shoot with fuffy  This quickly became a mess, and i need to begin with a new and better structure.  What would be a good folder structure that lets find pictures quickly depending on model, subject, year, stock/assignment/private life, etc.?  Is it Worth spending time keywording and cataloguing all pictures in lightroom for each shoot? In what way can this simplify searching the pictures? I would like to find a good workflow that covers folderstructure, download process, cataloguing, editing (seen as step, not going into the details.. I would rather like to see something like "open in lightroom, base editing, and then menu/edit in Photoshop" or something like that), searching for files.   I expect the answer to be sort of a tutorial for beginners.


How could I add a pointer at the middle of the screen, where my mouse is fixed there? Something like this:

I would like the mouse to have a custom look like most games and not just the default white.  Is there a way I can make an object as the mouse?


I created a lv 6 Ranger in Dnd 5e with the Two Weapon Fighting style. At lv 5 I got Extra Attack as an action. I was wondering if I entered initiate with a dagger in each hand; would I be able to throw a dagger with an action, use a bonus action to throw another dagger in my off hand using TWF, then free action to pull out another dagger, and use my extra attack from taking the attack action to throw that dagger as well?

You can do it to move:     If you take an action that includes more than one weapon attack, you can break up your movement even further by moving between those attacks. For example, a fighter who can make two attacks with the Extra Attack feature and who has a speed of 25 feet could move 10 feet, make an attack, move 15 feet, and then attack again. (PHB 190)   It would be necessary for the Great Weapon Master feat:     On your turn, when you score a critical hit with a melee weapon or reduce a creature to 0 hit points with one, you can make one melee weapon attack as a bonus action   As a level 17 Fighter, if I can not place a bonus action between attacks, there are two possibilities:   I have to wait until I finished all 4 attacks of the action, to make another attack as a bonus action the bonus action attack is wasted unless the kill or crit happens on the 4th attack   So can I take a bonus action in the middle of the attacks of an action?


This is exercise $10.E.4$ from Pinter:     Let $a$ and $b$ be elements of a group $G$.      Let ord($a$) = $m$ and ord($b$) = $n$.      Prove:      Let $a$ and $b$ commute.      If $m$ and $n$ are relatively prime, then ord($ab$) = $mn$.      (HINT: Use $10.E.2$.)   Here is $10.E.2$, which Pinter suggests that we use:     If $m$ and $n$ are relatively prime, then no power of $a$ can be equal to any power of $b$ (except for $e$).   I'm also going to use $10.E.1$:     If $a$ and $b$ commute, then ord($ab$) is a divisor of lcm($m$,$n$).   As well as $B.T6.i$ (Theorem $6.i$ from Appendix $B$. A fact from basic number theory.):     If   gcd($m$,$n$) = 1   then   lcm($m$,$n$) = $mn$   Let's begin.  We are given that $m$ and $n$ are relatively prime which means that:  $$\text{gcd}(m,n) = 1$$  By $B.T6.i$:  $$  \text{lcm}(m,n) = mn \tag{1}  $$  By $10.E.1$:  $$ \text{ord}(ab)\ |\ \text{lcm}(m,n) $$  Substituting $(1)$:  $$ \text{ord}(ab)\ |\ mn $$  Which means that there is an integer $x$ such that:  $$ \text{ord}(ab) x = mn $$  This is so close! For the theorem to be true, we'd have to show that $x = 1$.  However, the original exercise statement says to use $10.E.2$.   Is that helpful in showing that $x = 1$? Or is there some other completely different approach whereby $10.E.2$ is used?     UPDATE: Some comments regarding the  below.  The proof uses the following fact:     If $a|c$ and $b|c$ then $lcm(a,b)|c$.   For this exercise, I wanted to only use theorems that had been presented in the book up to that point. And, I didn't seem to recall seeing this theorem. (If anyone spots this in Pinter, please comment below with the location.)  However, I did notice that the following similar fact is in Appendix B (REVIEW OF THE INTEGERS) as exercise B.9:     If $a|c$ and $b|c$ and $gcd(a,b) = 1$ then $ab|c$.   So yeah, it looks like the approach shown below is definitely a valid way to go if you want to stick to what's presented in the book.

Let u and v be elements of a commutative group, and suppose that their   orders are r and s, respectively. Show that if r and s are distinct   primes then the order of uv is rs.   I will use the follwing theorem to proof this.  Theorem: Let x be an element of order m in a finite group G. Then $$x^s=1$$ in G if and only if s i a multiple of m.    My attempt  We can here see that $$(uv)^{rs}=[commutative]=u^{rs}v^{rs}=1^s1^r=1$$ By the theorem, this tells us that this is true only if only rs is a multiple of the order of $uv$. Let the order be $ord(uv)=k$. We know that every positive integer can be written as $$a=bm+l, 0<=l<b$$ and since $r$ and $s$ is primes (positive integers), $rs$ can be written as $$rs=km+l, 0<=l<k$$ This gives ut that $$1=(uv)^{rs}=(uv)^{km+l}=1^muv^l=(uv)^l$$ If l>0 then the equation $(uv)^l=1$ contradicts that the positive integer k is the least positive integer for which $(uv)^k=1$. Therefore l=0 and $rs=km$ . We can here see that $rs$ is a multiple of k (and this proof also the theorem).  $$rs=km => k | rs => k|r     ORk|s$$ But we know that $r$ and $s$ are distinct primes, so k must be equal to one of the primes.  $$k=r => (uv)^k=(uv)^r=1v^r=v^r=1$$ And since we know that $ord(v)=s$ the theorem tells us that $r$ must be a multiple of $s$. But since both of them is primes, we get that $r=s$ but this is a contradiction (r and s are distincts as the exercise tells us).   Now, we try with $k=s$. Same as above, we get that $s=r$ which is a contradiction. Neither k=r nor k=s is right since by the theorem we get that $k=r=s$ and we have that $r$ and $s$ are distincts. This tells us that k cannot be equal to r nor s, since this gives us that $r=s$. And since we know (and as i did proof)that  $$rs=km$$, this tells us, as i wrote before, that $$k|rs$$ Since k is neither equal to $r$ or $s$, this tells us that k must be equal to $rs$. Therefore $$ord(uv)=k=rs$$.  Edit: i know that this can be prooved by l.c.m(x,y) but we have not used it so far. That's why i did not proof it with l.c.m(x,y)


I have the same behavior in 2 SQL Servers where Stolen Server Memory and Database Cache Memory counters are decreasing (Db Cache) and increasing (Stolen Memory) in a linear way. The amount of memory decreased from Db Cache Memory is almost the same amount of memory increased in Stolen Memory. Has anyone seeing this behavior before? Is it an expected behavior?   Both server's configuration:   SQL Server 2012 ENTERPRISE with SP3 32GB memory   Thanks for the attention

I get error from System Center Operations Manager (SCOM).  How to solve this error?      SQL DB 2012 Engine Stolen Server Memory is too high.   I run query and get this counters:  ╔═══════════════════════════════╦═════════════╗ ║ Stolen Server Memory (MB)     ║ 7354.773437 ║ ║ Lock Memory (MB)              ║ 106.195312  ║ ║ Free Memory (MB)              ║ 64.632812   ║ ║ Connection Memory (MB)        ║ 24.203125   ║ ║ Log Pool Memory (MB)          ║ 14.085937   ║ ║ Optimizer Memory (MB)         ║ 2.351562    ║ ║ Granted Workspace Memory (MB) ║ 1.296875    ║ ║ Cursor memory usage           ║ 0.000000    ║ ║ Cursor memory usage           ║ 0.000000    ║ ║ Cursor memory usage           ║ 0.000000    ║ ╚═══════════════════════════════╩═════════════╝


I'm currently running a Windows 7 Desktop PC, a MacBook Pro and an iPhone. In my homenetwork I am allowed to backup my MacBook to the MacMini Server, which also works as media server. However my father is not comfortable with me backing up my Windows machine on that server. Now I'm facing the question: Should I get myself an external storage to backup my windows on it or should I introduce my own backup system (a synology disk for example) to the homenetwork. The synology disk has multiple advantages:   Integrated Media Server to stream on the MacBook, the PC and the iPhone Backup of all the listed devices User interface to easy configure I could manage a shared git on the server   My only fear now is that if I catch some kind of ransomware on one of these devices, the next sync / backup will also encrypt the data on the synology disk. If one disk would be backup and the other media there would still be affected both.  Is there a possibility to prevent network attached storages / backup services from beeing affected by things like ransomware / realtime encryption? And in the worst case: would my NAS be affected if any of the other devices in the network would catch one of these viruses if they had plex permissions to stream from my server?

I bought a NAS to share files and as backup solution.  Recently my netbook got infected by a ransomware. All files on the netbook and most of the file on the NAS were destroyed (the virus shuffles the first bits of the files). Fortunately my main PC was not attacked and since I do manual backups on portable HDD I lost anything.  But still, it frightened me since I think I could lost lots of data if it appeared on my main PC. Indeed if a backup is running when the files are being corrupted then I would backup corrupted data on the NAS!  So my question: is there a virusproof backup strategy?  Thank you for your help.    So after I read your answers, I now understand I need two solutions:   Sync my data in a location that CAN be accessed by the clients so that I can share data between computers (I would call it the synced area) Then backup this synced area in a location that CAN'T be accessed by the clients   Finally my questions:   Are those 2 assertions above enough to be safe? How to setup this solution with computers on windows and a Synology NAS?     Daniel Beck asked for more detail on my environment:  I have 2 PCs:   The main desktop PC with which I do most of the stuff (sorting photos, accounting, etc.) It has HDDs big enough to contain all data I need to share and backup. The second one is a netbook. It has a small HDD, so it doesn't contain all data (for example no photos). But it is often used to edit some documents from the shared area. Sometimes I will create new data that I will manually save in the shared area.   At the moment, I do all copies on the NAS manually (I have no backup software).  My NAS is Synology DS211j, it hosts the shared data.  So I would like to:   give access to the netbook to all data that is on the desktop PC even if it is shut down down Have a solution to protect my data from viruses. Set up an automated solution for all of that.     Thanks to the latest comment of Liori, here is what I would like to try:   Reset my NAS set up from RAID with 2 HDDs to 2 separated volumes. Set up a synchro of data on volume 1 that will be seen by user. Use the Synology NAS  software, to backup shared volume 1 on backup volume 2. Volume 2 will NOT be seen by users.   If it is safe, I see a lot of advantages:   Even if it is not so good, I keep access to my data thru Internet. The backup of data would be scheduled on the NAS, I don't need to let my computer on for backups. I would have my data on 3 locations: main desktop PC + shared volume + backup volume (4 in fact with the manual backup on USB HDD). So I lost useless RAID, and I get secured backups on dedicated HDD.   Do you think it would work?  Thanks again!


if gravity is just bending of spacetime according to general relativity why are we still considering it as one of the 4 fundamental forces.  this link provides that gravity is not force but just bending of spacetime so why it is the way it was?

Firstly I think shades of this question have appeared elsewhere (like , or ).  Hopefully mine is a slightly different take on it.  If I'm just being thick please correct me.  We always hear about the force of gravity being the odd-one-out of the four forces.  And this argument, whenever it's presented in popular science at least, always hinges on the relative strength of the forces.  Or for a more in depth picture .  But, having had a single, brief semester studying general relativity, I'm struggling to see how it is viewed as a force at all.  A force, as I understand it, involves the interaction of matter particles with each other via a field.  An energy quantisation of the field is the force carrying particle of the field.  In the case of gravity though, particles don't interact with one another in this way.  General relativity describes how space-time is distorted by energy.  So what looked to everyone before Einstein like two orbiting celestial bodies, bound by some long distance force was actually two lumps of energy distorting space-time enough to make their paths through 3D space elliptical.   Yet theorists are still very concerned with "uniting the 4 forces".  Even though that pesky 4th force has been well described by distortions in space time.  Is there a reason for this that is understandable to a recent physics graduate like myself?     My main points of confusion:   Why is gravity still viewed as a force? Is the interaction of particles with space time the force-like interaction? Is space-time the force field? If particles not experiencing EM/weak/strong forces merely follow straight lines in higher-dimensional space (what I understand geodesics to be) then how can there be a 4th force acting on them?     Thanks to anyone who can help shed some light on this for me!


I have created bootable usb drive following , specifically following the instructions under  Windows 10 bootable USB using WoeUSB  I have disabled secure boot in bios and boot type is set to UEFI, when i boot from the usb the system restarts after 3 seconds and when the second time the system starts it goes straight to Ubuntu. I have no idea how to successfully boot into usb drive and install windows 10.

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


I want to erase elementary OS completely and install Ubuntu 19.04  The installer offers me with 2 choices:   Install alongside (which I don't want). Something else (I want to keep windows and install Ubuntu replacing elementary).   What next steps should I do? Which partitions should I remove/modify?  Here are my partitions:

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


I do not know hoe to type this sigma symbol  in latex. Anyone has idea?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I am trying to implement a iDisposable class and I saw a code like that  public class Foo: IDisposable  {      public void Dispose()     {         // Does Something.     }      ~Foo()     {      } }   what does ~Foo()?

I am looking at some code and it has this statement:    ~ConnectionManager() {     Dispose(false); }   The class implements the IDisposable interface, but I do not know if that is part of that the tilde(~) is used for.


I was going through and cleaning up my network profiles. I removed the link from a couple of them and then noticed the link was not there after the third or fourth.  Is there a time limit on how many you can delete a profile from in a given period? It's been several minutes and I still can't remove them at all.

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


I installed Ubuntu LTS 20.04 beside windows 10 from usb and when I’m trying to run it ,I have a black screen and keyboard is not working. It was approximately 6 attempt to install it. I tried mint and Debian and Manjaro(in that case even live mode wasn’t working) , but I had the same problem. I have a laptop with:     AMD CPU and GPU:     A8-4500M AMD Radeon HD 7640G + HD 8570M Dual Graphics     Please help!

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


a = ("ADD")  s = ("SUBTRACT")  m = ("MULTI")  def function (c1, c2, *c3):     if a in c3 :         print(c1 + c2)     if s in c3:         print(c1 - c2)     if m in c3:         print(c1 * c2)     else:         print("wrong value")  I want to make it accept capital and small and mix characters function(86, 44, "Add")

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


Find Fourier Series of the function $f(x)= \sin x \cos(2x) $ in the range $ -\pi \leq x \leq \pi $  any help much appreciated   I need find out   $a_0$ and $a_1$ and $b_1$  I can find $a_0$ which is simply integrating something with respect to the limits I can get as far as  $$\frac{1}{2} \int_{-\pi}^\pi \ \frac12 (\sin (3x)-\sin(x)) dx$$   How would I integrate the above expression ?  secondly how would I calculate $a_1$ and $b_1$ but despite knowing the   to find the fourier series Im having trouble applying them to this question

odd half range extension of  $$f(x) = \sin x \cos(2x)\text{ with limits $0$ to $\pi$}$$


In PostgreSQL 9.4 I have a table:  id         p_id PK        integer ----------------- 1           1 2           1 ............. 123122       2233   Is there a way to count all distinct p_id values in the table with only one query (without using subqueries). I'm free to use any window-function.

I can select all the distinct values in a column in the following ways:   SELECT DISTINCT column_name FROM table_name; SELECT column_name FROM table_name GROUP BY column_name;   But how do I get the row count from that query? Is a subquery required?


I have to exit the screensaver by clicking with the mouse or trackpad and dragging up in order to get to the login screen. How can I exit the screensaver by hitting the enter key on the keyboard? (I used to be able to do it that way.) I am using 19.04.

I need to remove the annoying new "locking" screen that shows a giant clock: I can't remove it with just moving the mouse (as with any other desktop environment), the animation is slow, and it isn't asking me for a password!  I managed to disable it, just to discover that now I can't lock my screen on purpose, so I can't go away from the computer.  Just to clarify, I want to:   After some time the screen could go black, but if I move the mouse or press any key then I can use it directly (like a normal screensaver). If I press super-L then it is locked, and I must type the password to unlock (like a normal lock screen).   I found several "solutions", but none seems to work:


I have an .EXE file installed on c:\windows\system32 (Win7) which is not visible for other programs except by Windows applications (Explorer, cmd, etc)  I can run it from any cmd terminal. However, other programs cannot open this file. They can't even list it on their OpenFileDialogs. I also tried running this program from Python os.system() and got a "File not found".    I can normally see and run other programs that are located at the same directory (e.g.: PING.exe)  I'm really sure the file is there. This problem happened on 3 different computers, all running Windows 7.  The file, in this case, is TFTP.exe, made by Microsoft.   The following images show this condition: 1 - Windows Explorer showing the file exists on c:\windows\system32 2 - Open file dialog, from depends.exe, can't see the file on the same directory

I am running Windows 8 Enterprise x64. I logged on using an account from the Administrators group. When I open Windows Explorer or a command prompt, then I can see the file cdd.dll:      C:\Windows\system32>dir cdd.dll  Volume in drive C has no label.  Volume Serial Number is ▨▨▨▨-▨▨▨▨   Directory of C:\Windows\system32  07/25/2012  09:49 PM           199,680 cdd.dll   But if I open an Open File dialog from Chrome browser, Visual Studio or some other applications (they are all 32-bit apps) and navigate to C:\Windows\system32 then there is no such file (the filter is set to show All Files). And if I invoke the "Open command window here" context menu item using Shift+RightClick in the Open File dialog and type dir it confirms that there is no such file:      C:\Windows\System32>dir cdd.dll  Volume in drive C has no label.  Volume Serial Number is ▨▨▨▨-▨▨▨▨   Directory of C:\Windows\System32  File Not Found   This effect is not specific to cdd.dll, many other files differ as well. I've been told that this is an effect of the  file system virtualization, that I know very little about.   Could you please explain or give me a reference that explains how this actually works? Are there actually several different instances of the System32 folder. What is their physical location on the disk? Is it possible to access from a 32-bit process files in a different System32 folder than one shown to 32-bit processes by default.


If I have a member function that looks like this:  const T& temp const( const T& t) const{     //some code     return t; }   What do each of the const do, in the order left to right? Is this right or wrong?    return const object can't change any of the member fields that are not mutable can only pass in const objects of type T this is a const member function, can only be called with a const object

As a novice C++ programmer there are some constructs that look still very obscure to me, one of these is const. You can use it in so many places and with so many different effects that is nearly impossible for a beginner to come out alive. Will some C++ guru explain once forever the various uses and whether and/or why not to use them?


I'd like to print the last update of a counter before it is updated.  For example:  \newcounter{num} \newcommand{\step}{\stepcounter{num}Step \thenum}  There are \thenum steps:  \step \step \step   Here the counter "num" is 3, however it is not updated at the beginning.  Is there a way to do this correctly?  Thank you!

I'd like to use a counter in the text which however is only set at a later point. Like so:  \newcounter{howmany} There are \thehowmany items in this list: \begin{enumerate}   \item one   \item two   \item three \setcounter{howmany}{\theenumi} \end{enumerate}   And it should say "There are 3 items in this list". But that doesn't work. Well, sure. I need to use \refstepcounter to get that save-functionality. But \refstepcounter only increments it by one, and there doesn't seem to be a \refsetcounter ;) Any suggestions? A loop after the enumerate over \refstepcounters? Redefining \item to include \refstepcounter? There gotta be a simpler way, no?  Thanks!


I have a environment variable called NAME   export NAME="xyz"   and inside a file test.txt , I have a line   name=$NAME   I read the file and assigned the line to a variable y  y=`cat test.txt`   Now I am printing the variable y   echo $y   How can I get an output of name=xyz instead name=$NAME?

Is there an easy way to substitute/evaluate environment variables in a file? Like let's say I have a file config.xml that contains:  <property>     <name>instanceId</name>     <value>$INSTANCE_ID</value> </property> <property>     <name>rootPath</name>     <value>/services/$SERVICE_NAME</value> </property>   ...etc. I want to replace $INSTANCE_ID in the file with the value of the INSTANCE_ID environment variable, $SERVICE_NAME with the value of the SERVICE_NAME env var. I won't know a priori which environment vars are needed (or rather, I don't want to have to update the script if someone adds a new environment variable to the config file). Thanks!


Now that , we need the Area 51 ads to be updated to the new size.   (source: )    Some appear to have the new size, but are not displaying correctly:   (source: )

The Area 51 ads shouldn't really look like that. It seems like the image is cropped, changing the sizes in the HTML code won't exactly fix it.  Even resizing doesn't work:


Is it Possible or impossible to do a 100% testing?   We had tested an application and solved all critical or major bugs, but after some time we found some functionality bugs in it.   So my question is, is it possible to deliver bug free applications?

For example when creating software for critical real time applications, like those used in aviation, how certain are you that it's going to run without problems? Are you 100% certain or are you >90% certain?  We see that bug fixes are continuously added in every software application. What if the bug bites back before there is a chance to fix it,especially in mission critical applications?  So is a fault free application really possible and is exception handling the solution to uncertainty? How far can exception handling go?


Often in the terminal I want to open a specific file (since I've already browsed to the right directory).   A few programs I have come with their own links ready, like subl index.html will open Sublime Text editor. Also I am aware of the open foo which will call the file to be opened in the default program associated with it.  How can I setup a more general way of opening a file from the terminal with a specific program, either by defining a per-program helper/shortcut, or better even, in a generic way?

Often when I work in the Terminal (the command line) I need to edit some text files. I prefer to edit text files using TextWrangler.  How can I open a text file with TextWrangler from the Terminal?  I tried with /Applications/TextWrangler.app/ my_text_file.txt but it doesn't work since TextWrangler.app/ is a directory.


Which one of the following is correct?        Allen is one of the few people who understands the importance of hard work.   Allen is one of the few people who understand the importance of hard work.      Does understand(s) refer to Allen or to the few people?

In the sentence      It's one of the best films that has/have ever been made   What should the verb agreement be?


In Short: On an Eee PC 1015, I am not able to update the newly installed Windows 7 system that came with that Netbook. Updates only worked in small increments, rebooting multiple times, and the SP1 does not download.  After getting a used Asus Eee PC 1015 PED (Windows 7 Starter, 250 GB harddisk), I did this F9 Recovery offered at the boot screen. This seems to overwrite the System partition with factory install. I would not exactly call this a fresh Win7 installation as ASUS did some modifications.   When I first connected the newly installed system and checked for updates, it said "Windows is up to date" - which is impossible. Is this suspicious? Have you ever heard of malware infecting the recovery system?   After rebooting, tens of updates were shown, but the download was stuck at "downloading .. 0 KB, 0% complete". After hours of waiting, I then shut the system dowd. The shutdown button actually promised to install updates before shutdown, and so it did.  This repeated about five times: Stuck while downloading, seems to have downloaded something, updates installed on reboot. Now all that is left is the "Windows 7 SP 1 (KB976932)" and 4 optional updates that I do not want either.   The best guess I can make is that the service pack takes very long - three hours, at least - to download (despite its size of allegedly 61 MB) and that the progress meter is broken. Where can I get more information about the downloading process? I am relatively new to Windows, but there have to be logfiles somewhere I guess?     I believe these are not culprits:   my connectivity. I can access the Web and have good bandwidth both with wired and wireless connection. I am on a reliable company network without restrictive firewall. ASUS Liveupdate. This wants me to install two bogus ASUS updates, I have not complied but can't believe they are necessary ("ASUSWebStorage" and "Vibe Fun Center")

I have Windows 7 64-bit and the  isn't working properly. What can I do?


I am creating a Stack<T> where I have the type of the Stack in a variable. After I have created the Stack<T>, I am wanting to push items to the Stack. How can I access the Push method? Here is my code: var itemType = GetIEnumerableItemType(type); var stackType = typeof(Stack<>); var constructedStackType = stackType.MakeGenericType(itemType); var instance = Activator.CreateInstance(constructedStackType);  EDIT Here is some code that I have tried that works with a List<T>: var itemType = GetIEnumerableItemType(type); var listType = typeof(List<>); var constructedListType = listType.MakeGenericType(itemType); var instance = (IList)Activator.CreateInstance(constructedListType); //instance.Add("example item");  Thank you

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


I'm currently designing a webpage using Bootstrap and I have two  buttons laid inline with each other inside of the

  Here's the HTML code:

Jason's Summer Vacation

There doesn't seem to be a description here!

             Copy Link             Create Drop

   And here's the CSS of the div wrapping the buttons and the buttons themselves:  .hub-btns {     display: inline-block;     margin: auto; }  .hub-btns .copy-link {     border-bottom-color: #EBEBEB; }  .hub-btns .create-drop:hover {     background-color: #03a9f4; }  .hub-btns .create-drop:focus {     background-color: #03a9f4;     border-bottom-color: #0398db; }  .hub-btns a {     margin: 0 10px; }   I'm still not great with CSS so I'm probably missing something obvious here. But, I simply want to take the div that is wrapping the two buttons and center that div within the jumbotron div.  Any help is greatly appreciated!

How can I horizontally center a
 within another
 using CSS?

Foo foo


Regex for multi line search that should select text "abc" which comes before the text "xyz" and should not select anything except "abc"  suppose if the text is as below,      aaaabbbb     abc      abc  lmn xyz   the regex should match only the text abc in 3rd line just above last line

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 am using Xampp v3.2.  I am trying to edit, delete and update fields in the database according to the user input. But I'm getting an error:  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Shezad, body = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecen' at line 128   My code has 47 lines only. Here is the main PHP part of the document:
     <?php         $id = $_GET['id'];         $sql = "SELECT * FROM `posts` WHERE id = ".$id;         $post = $mysqli->query($sql) or die($mysqli->error.__LINE__);          $msg = "Post edited";          if(isset($_POST['submit'])) {             $title = $_POST['title'];             $author = $_POST['author'];                          $body = $_POST['body'];              $sql = "UPDATE `posts` SET title =".$title.", author =".$author.", body =" . $body . "WHERE id = " .$id;             $update_rows = $mysqli->query($sql);              echo "
" .$msg. "
";         }     ?>     <?php if($post) : ?>         <?php while($row = $post->fetch_assoc()) : ?>             <form action="edit-post.php?id=<?php echo urlencode($id); ?>" method="POST">                 <input type="text" name="title" value="<?php echo $row['title']; ?>" placeholder="Edit title of post...">                 <input type="text" name="author" value="<?php echo $row['author']; ?>" placeholder="Edit author of post...">

                 <textarea type="text" name="body" placeholder="Edit body of post..."><?php echo $row['body']; ?></textarea>                 <input type="submit" name="submit" value="Edit Post...">             </form>         <?php endwhile; ?>     <?php endif; ?>
   Help me, please. Thank You!   Also recommend other code problems

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


My clients offer services that can be used by different types of organizations: schools, nonprofits, corporations, individuals, restaurants, etc. If I want to talk to all of their ____ simultaneously in a marketing comm., how could I address them?    What is the hypernym that encapsulates all these different types of organisations?

We're building a feature for a website and trying to think of a hypernym for clients, partners and members so that the feature remains generic enough for re-use later on other websites.


When I run sudo apt upgrade, I get the following:  Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages have been kept back:   wine-stable winehq-stable 0 to upgrade, 0 to newly install, 0 to remove and 2 not to upgrade.   If I try to sudo apt install wine-stable, it reports that there are broken dependencies:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies.  wine-stable : Depends: wine-stable-i386 (= 5.0.0~bionic)                Depends: wine-stable-amd64 (= 5.0.0~bionic) but 4.0.3~bionic is to be installed E: Unable to correct problems, you have held broken packages.   and despite "is to be installed", it transpires that version is already installed. I ran apt list -a wine-stable-amd64 and see:  Listing... Done wine-stable-amd64/bionic 5.0.0~bionic amd64 [upgradable from: 4.0.3~bionic] wine-stable-amd64/bionic 4.0.4~bionic amd64 wine-stable-amd64/bionic,now 4.0.3~bionic amd64 [installed,upgradable to: 5.0.0~bionic] wine-stable-amd64/bionic 4.0.2~bionic amd64 wine-stable-amd64/bionic 4.0.1~bionic amd64 wine-stable-amd64/bionic 4.0~bionic amd64 wine-stable-amd64/bionic 3.0.5~bionic amd64 wine-stable-amd64/bionic 3.0.4~bionic amd64 wine-stable-amd64/bionic 3.0.3~bionic amd64 wine-stable-amd64/bionic 3.0.2~bionic amd64 wine-stable-amd64/bionic 3.0.1~bionic amd64   Now to my mind wine-stable-amd64 ought to just have updated itself to 5.0.0~bionic, so presumably some package or other is insisting it be held at 4.0.3~bionic. How do I see what package that is? I tried apt rdepends wine-stable-amd64 but the only package listed and installed that depends on it is...wine-stable! So what on earth is going on?

I have followed all the instructions on .  In particular, I have run the following commands: sudo dpkg --add-architecture i386  wget -nc https://dl.winehq.org/wine-builds/winehq.key sudo apt-key add winehq.key sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'   The first three of the above seemed to work fine.  However, the last command gives me the following error: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  winehq-stable : Depends: wine-stable (= 5.0.0~bionic) E: Unable to correct problems, you have held broken packages.  I'm running Lubuntu 18.04.3 on a USB live stick.  (However, if I remember correctly, a couple days ago I got the exact same error on a normal hard disk Lubuntu 18.04.3 installation.) I've read that a lot of people get similar errors.  Unfortunately I haven't found any solutions online that worked. Any help would be much appreciated.  Thanks! EDIT:  Thanks for the comments and suggestions everyone.  I'll try them out later today. In the mean time, here's something I don't understand.  Ubuntu 18.04 has been around for almost two years now.  In all that time, surely somebody has successfully installed wine, right?  What did they do to get it working?


In 1.8.7 I tried every one command to stop creepers from destroying the blocks but they still do. I don't know what to do to remove it. How do I disable creepers from breaking blocks?

Please note that these are NOT acceptable solutions:   Completely disabling monsters (peaceful mode) Completely removing creepers Completely disabling explosions (TNT + Creepers) Disabling creeper explosions   More exactly, I want the creepers to be able to spawn and explode, but without doing their terrain damage (they should still be doing health damage to the players).  I'm fine with the use of mods but I'd prefer a built-in solution if possible.


Note: Inspriation comes from Robert Longson from his comment on this .  I am asking that the privilege to see less ads be removed from MSE only.  Why? Because there aren't any ads in MSE. With no ads here, you can't really see a negative amount of ads here or see any at all. Like the linked question said, the users who find out that the privilege is useless will be kinda sad. Privileges should be new and this isn't new or going to give users something new.  So can we remove the privilege to see less ads in Meta.SE only?

According to the Meta  regarding , I am as I write this about 98% of the way towards reaching this privilege. After discussing here a bit, I've also discovered that the  even says that this is a perk I'm soon to receive. However, I currently don't see any ads at all, and I do not use any ad-blocking utilities.   Don't get me wrong, I don't mind at all not seeing any advertising!   briefly mentions missing ads from Meta, but it is an older question, and this site specifically was not really addressed in the answer.   If so, then why have so much information regarding the reduction of ads in the new user information? The answer in the just-mentioned link doesn't really answer this question to my satisfaction.   Why don't we just remove the ad reduction piece entirely from FAQs of this and/or these other sites? Does everyone else disagree and think that we should keep this in place?


I am an undergraduate student from India, interested in applying for Ph.D. programs in Astronomy in US institutes. My institute evaluates the CGPA from a scale of 10. Since the cutoff for Astronomy is 3.0 on a scale of 4 for most US Institutes, my question is what would be the minimum on a scale of 10 in India, assuming I dont go by the conversion (3/4)*10=7.5

I study in India and in here we have 10 pointer system. I wanted to convert my CGPA to american based GPA system of 4. I googled and got this .  So does that mean I need only >8.5 to get a 4.  This may be a stupid question to some but please consider that I know nothing of american CGPA system.


When I press Ctrl-G, the manual says it creates a collection with the selected items.  The screenshot shows my experience: select some meshes, press Ctrl-G, and I get a dialog box at the lower left.... and no other obvious effect. I dug around in the raw blend file using python and found I appear to have been creating collections with these commands, but they don't appear in the outliner? How does one use the hotkey to create a  usable collection?

I create a collection with 'create new collection' command but the new collection did not appear in scene collection. And I found it in 'orphan data'. I tried to move the new collection(test) to scene collection but failed. I don't understand the way it works like that. How can I use the new 'test' collection?


I am stuck on this homework problem:     Let $R$ be a commutative ring. Suppose $M$ is a Noetherian $R$-module. Prove that $M$ is finitely generated and that $R / \textrm{Ann}_R (M)$ is Noetherian.    It is fairly trivial that $M$ is finitely generated; I am stuck on the second statement. The two characterisations of Noetherianity I am familiar with are      R is Noetherian if and only if all of its ideals are finitely generated   and the Ascending Chain Condition.  I tried to construct an ascending chain of ideals in $R / \textrm{Ann}_R (M)$ starting from an ascending chain of submodules in $M$ and then tried to write an element of the $(i+1)$-th ideal as a linear combination of the $(i)$-th ideal and tried to incorporate the fact that we divided by the annihilator, but this horribly failed and now my house is on fire, my dog is dead and my wife signed the divorce papers.   In particular, starting from a chain of submodules $$M_1 \subseteq M_2 \subseteq \cdots,$$ I defined the $i$-th ideal $I_i \subseteq R / Ann$ as the ideal which annihilates $M_i$, but then I get a descending chain...  I also went the other way, starting from a chain of ideals $$I_1 \subseteq I_2 \subseteq \ldots$$ and constructing $M_i := I_i(M)$.  Any help in the form of hints and pointers, not full answers would be appreciated! (I'd rather construct the full proof myself, but I've been stuck on this for a couple days now so I need some stepping stones)

Let $M$ be an $R$-module and $\text{Ann}(M)=\{r \in R: rm =0 , \forall m \in M\}.$ Suppose $M$ is Noetherian. Could anyone advise me on how to prove $R/\text{Ann}(M)$ is also Noetherian?   Hints will suffice. Thank you.


I would like to try and get some "perfect" games on Steam - games for which I have collected all the achievements.  Obviously, some games have much bigger lists of achievements than others and some achievements are much harder than others. Can't do much about finding out the latter without playing, but I thought it would be useful/interesting if I could sort and rank my game collection by the total number of achievements or, better yet, total achievements remaining.  I can't see any way to do this in the Steam UI. Is there one, or are there any third party tools that can do this?

I want to check which of my games need the least achievements to achieve a perfect status.   The only way to see the game stats that I know of is to go to the games list from a player profile but that's too tedious, especially with over 250 games with varying degrees of play-times and achievement completion.


Exercise 3.26 in Dummit and Foote reads:     Let $N = \langle S\rangle$ for some subset $S$ of $G$. Prove that $N \trianglelefteq G$ if $ gSg^{-1} \subseteq N$  for all $g \in G$.   If $S$ is a finite set, I presume the proof is straightforward. Suppose $ gSg^{-1} \subseteq N$  for all $g \in G$. Any element of $N$ can be written as a product of elements of $S$. The properties of conjugation therefore make that the conjugate of an element of $N$ is a product of conjugates of elements of $S$. Since the latter by the assumption are all in $N$, conjugation will be closed in $N$.  I have two questions, however. First, how to go about an infinite $S$? An element of $N$ could be a product with infinitely many factors, for which the properties of conjugation have not been proven.  Second, I would think that the question might have read:     "Prove that $N \trianglelefteq G$ if and only if $ gSg^{-1} \subseteq N$  for all $g \in G$."   Indeed, if $N \trianglelefteq G$, since $S \subseteq N$, $gSg^{-1} \subseteq N$  for all $g \in G$, proving the reverse implication.  Did I make a mistake here? (I am suspicious because it is my impression that it is not very like. D&F not to make the most comprehensive statements.)

Let H be a subgroup in a group $G$. If $G$ is generated by a set $S$, so $G=\langle S\rangle $, prove that $H$ is a normal subgroup in $G$ iff $sHs^{-1}$ $\subseteq H$ for all $s\in S$.    Note with the question: Results of this sort are useful because it is easier to check an algebraic property for a small set of generators than to prove it holds for all elements of G.  Hi, the forward direction is quite straightforward but I will be really grateful if somebody can help me with the reverse direction. Thanks!


I'm making a website so once your logged in it goes to your profile but once you log in it gives me this error. Unknown column 'tom' in 'where clause' Tom is the username. it don't tell me which line but im pretty sure its this one.  $result =  queryMysql("SELECT * FROM profiles WHERE user=`$user`");   quertyMysql is defined in another file.  function queryMysql($query) {     global $connection;     $result = $connection->query($query);     if (!$result) die($connection->error);     return $result; }   is this enough code for anyone to tell me whats doing wrong?

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


I would like to make it so that a function runs only when the user types any key from a-z. Would I need to use a different method other than onkeypress?

Is there a quick way to set an HTML text input (<input type=text />) to only allow numeric keystrokes (plus '.')?