Can a shapefile store several geometry types? Yes or no? Why or why not?

Following , can I have a mixture of two kinds of geometry in a shapefile of type point. Just like I have about shapefiles of type polygon or I should always create a shapefile of type multipoint in order to support multipoints in my layer?    My problem is as you see at , I can't use ogrinfo in order to understand that the geometry type of a multipoint shapefile will be known as wkbMultipoint or wkbPointwhen I use this line of code:    OGRwkbGeometryType GeometryType = poLayer ->GetGeomType();     for a layer of type multipoint before programming.     Will OGR know a layer of type multipoint as wkbpoint or wkbmultipoint?   When we create a shapefile in ArcCatalog, we have point and multipoint, but not multipolyline or multipolygon for polyline and polygon.Why?


Let$ G = \{x ∈ R | x  \neq -1\} $and * a link to ¨G with $x * y: = x + y + xy.$ Show that $(G, *)$ is a group.  To determine if $ G$ is a group I have to make the associative proof:  Associative?  $(x * y) * z = (x + y +xy)+z -(x + y +xy)*z$  $= x + y + z + xy - xz - yz - xzy$  $= x + y + z + xy -z (x + y + xy)$  $= x + (y + z + xy) -z (x + y + xy)$  I kinda stop here, because I think I made a mistake

So basically this proof centers around proving that (S,*) is a group, as it's quite easy to see that it's abelian as both addition and multiplication are commutative. My issue is finding an identity element, other than 0. Because if 0 is the identity element, then this group won't have inverses.  The set explicitly excludes -1, which I found to be its identity element, which makes going about proving that this is a group mighty difficult.


I was looking at  (10k only), and noticed some comments on it. Not one to let an opportunity for experimentation slip by, I hovered over it:    I tried to upvote it, but that didn't work. Got a big red nasty box.  Looky there! A flag link!  I bet it doesn't work... Wait, the dialog box came up... Hmm, might as well try it, I bet I get a red box when I hit flag...    Sorry, mods :).  So apparently I can flag comments on a deleted posts - is it ? Or is it a ?

When trying to upvote a comment made on a locked post (ordinary lock, not historical lock which remove the vote arrows and flag altoghether) we are greeted with such error message:        Or in words:     This comment is not eligible for voting or flagging   Being the curious type, I went straight away and tried to flag, fully expecting the same message... just to see the flag dialog open up just fine:        I was able to flag as well.  Can the error message please be changed to just "This comment is not eligible for voting"? Or of course, if it's not the intended behavior really disable the option to flag?  The original post on which I experimented is now deleted, but  you can play with.


Running a logistic regression, I have a dependent variable   Loyal Customer can be 0 or 1   and an independent variable   Return.rate is a continuous percent value from 0 to 1   If my odds ratio for Return.rate is 5, how do I interpret the result in words?   What is a unit? 1 which is 100%? Or 0.01 which is 1%?

I've been having a hard time trying to understand the use of logistic regression in a paper. The paper available  uses logistic regression to predict probability of complications during cataract surgery.   What is confusing me is that the paper presents a model that assigns odds ratio of 1 to baseline described as follows:     A patient whose risk profile was in the reference group for all risk indicators (ie adjusted OR=1.00 for all in Table 1) may be regarded as having a ‘baseline risk profile’, and the logistic regression model indicates a ‘baseline predicted probability’ for PCR or VL or both=0.736%.   So the probability of 0.00736 is presented with odds ratio of 1. Based on the transformation from probabilities to odds ratios: $o=\frac{p}{1-p}$, this can't be equal to 1:  $0.00741=\frac{0.00736}{1-0.00736}$.  It gets even more confusing. The composite odds ratios that represents multiple covariates having values different than the baseline is used to calculate predicted risk.      ...the composite OR from Table 1 would be 1.28 X 1.58 X 2.99 X 2.46 X   1.45 X 1.60 = 34.5, and from the graph in Figure 1, we see that this OR corresponds with a predicted probability of PCR or VL or both of around 20%   The only way to arrive at the values the paper is giving as examples is to multiply the baseline probability with composite odds like this: $0.2025=\frac{(34.50\ \times\ 0.00736)}{1\ +\ (34.50\ \times\ 0.00736)}$.  So what is going on here? What is the logic for assigning odds ratio 1 to a baseline probability that is not 0.5? The update formula I've came up with above comes up with the right probabilities for examples in the paper but this is not the direct multiplication of odds ratio I'd expect. What is it then?


I have two questions about a prove that I have to do for my mathematic study. I'm now thinking about it the whole day, but can't find the prove. Let $a,b \in \mathbb Z_{>0}$.  (a) Prove: $\gcd(2^a - 1, 2^b - 1) = 2^{\gcd(a,b)} - 1$ (b) Is this also true when you replace $2$ with a number $c > 2, c \in \mathbb Z$?  For (b), I think it's true, but I can't explain why. Thanks in advance!

Somewhere on Stack Exchange I saw the equation     $$\gcd(2^m-1,2^n-1)=2^{\gcd(m,n)}-1.$$   I had never seen this before, so I started trying to prove it. Without success...  Can anyone explain me (so actually prove) why this equation is true?  And can we say the same when replacing the '$2$' by any integer number '$a$'?


How do we know that the observed location of a electron (or any quantum object) is purely random (there is no way to predict it) within the probability-function instead of normal randomness (we don't know how to predict it)?  As an analogy if someone would only be able to measure the amount of people (amount of electrons) and their individual IQ (location) he would see a perfect distribution (obviously only if he has enough samples) within a specific range (probability) and each individual measurement seems purely random (QM-randomness). He would then assume that their IQ is purely random as he has just not enough knowledge to prove otherwise (he hasn't spoken to any of them, hasn't analysed any in respect to education nor has he analysed their DNA).  Could the same be happening when we observe electrons or have we proven that their location is purely random?

I was looking at a website that claims to generate random numbers from observation of quantum effects. This lead me to question how we know that the numbers are truly random.  When we observe a probability wave and it collapses in one place into a particle, how do we know that the location of the particle is really random?  Do we have any evidence of the randomness, or is it just that no one can predict the location right now?


**def colour_generator(lst):     for i in lst:         yield i  print()  colours=['red','green','blue']  print(colour_generator(colours))**   here the funtion colour_generetor returns the object address but if in the same code we replace 'yield' with 'return' then it  returns the first element in the list(lst).. Is 'yield' completely different from 'return' statement ?  Moreover **is it really possible to create object of a function?**As the output when 'return' statement is used instead of 'yield' statement in the above code is :"" or it is something else ?

What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


I removed my cassette, cleaned it and put a new chain on my mountain bike. All seemed to go well and went back together nicely. However when I took it out for a ride the free hub seems to be slipping with a sort of judder. It's like it engages, but then slips almost like the chain is slipping.  I'm fairly confident it's not the chain slipping though as it's doing it an every gear (more so in lower gears where there is more tension) and the derailleur doesn't seem to bounce/move at all when it slips.  I pulled the cassette back off to check it all looked like it's assembled correctly, but I see nothing wrong.   Thanks!  Update 1 I've inspected the cassette fairly thoroughly and am fairly convinced it's not warn. There is no angling on the teeth and no visible sign of the chain not sitting properly. Watching it carefully and it looks like the cassette is spinning with it when it slips, not the chain slipping over it.   The old chain wasn't massively overused, it'd been on the bike maybe 8 months and done maybe 1000km. It was replaced due to a link failing, not because it'd warn out.  It's slipping a lot almost to the point it's completely unrideable. I'll stick the old chain on later and see if it stops, but I can't see such a massive difference being likely?  Update2 Thanks for all the answers trying to help. I've added some photos of the cassette.

I just installed a new chain on my 2002 Trek 2200 Road Bike.  The old chain was a Shimano 9 speed that I installed 18 months and about 5000 miles ago.  It had stretched modestly and was full of winter cruft/grime.  The new chain is a SRAM 9 speed, my first time using the gold snap ring system.  I followed instructions and made sure I have the same link count as the chain that came off the bike.  The cassette was new with the old chain, so it has about 5000 miles on it and doesn't appear to have significant wear.  After installation and a clean/wipe/lube/wipe, I took it for a 15 mile easy ride at about 15-16 mph.  It shifts perfectly and I didn't have to make any adjustments to either derailleur.  Three times, however, when putting it under stain (once on a modest hill climb, once starting from a stop sign in a fairly big gear, and once on an acceleration coming out of a sharp turn) it skipped several teeth and caused my foot to slam down hard.  On the hill, it actually hurt as I had my weight off the saddle (not really standing) and I came down hard on the inside of my thigh.  I think all three were on the right side (power train side) pedal stroke, and I don't think they were all in the same gear.  I'm pretty sure it was the rear cassette that skipped, not the front chainring, but it did happen really fast each time.  I will also say that it's not like these were the only three times I put substantial pressure on the pedals in the ride - I wasn't going hard, but I wasn't being tentative or anything.  Also, in case it's relevant, it was cold, about 40 degrees F or about 4 degrees Centigrade.    My question:  Is this going to get me hurt, or will the new chain 'settle in' over a few rides?  I searched here and pretty much got confirmation of what I had previously thought, that you always get a new chain when you get a new cassette, but you should be able to get a few chains out of each cassette.  Thanks!


I want to show that the limit below is zero. $$\lim_{R\to\infty}\int_0^\pi e^{-R\sin\theta}d\theta$$ Wolframalpha and my intuition say that the limit is truly zero but I cannot approach.  Any hints will be appreciated. Thanks.

I would like to show $\lim\limits_{r\to\infty}\int_{0}^{\pi/2}e^{-r\sin \theta}\text d\theta=0$.  Now, of course, the integrand does not converge uniformly to $0$ on $\theta\in [0, \pi/2]$, since it has value $1$ at $\theta =0$ for all $r\in \mathbb{R}$.   If $F(r) = \int_{0}^{\pi/2}e^{-r\sin \theta}\text d\theta$, we can find the $j$th derivative $F^{(j)}(r) = (-1)^j\int_{0}^{\pi/2}\sin^{j}(\theta)e^{-r\sin\theta}\text d\theta$, but I don't see how this is helping.  The function is strictly decreasing on $[0,\pi/2]$, since $\partial_{\theta}(e^{-r\sin\theta})=-r\cos\theta e^{-r\sin \theta}$, which is strictly negative on $(0,\pi/2)$.  Any ideas?


When I attempt to use Drush 8.0.3 on a clean Drupal 8.1.1 install, I receive the following error:     Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.   This is on a Digital Ocean server running Ubuntu and nginx.  Drush status:  root@*********:/var/www/html/drupal/sites/default# drush status  Drupal version         :  8.1.1                                        Site URI               :  http://default                               Database driver        :  mysql                                        Database hostname      :  localhost                                    Database port          :                                               Database username      :  drupal                                       Database name          :  drupal                                       PHP configuration      :  /etc/php5/cli/php.ini                        PHP OS                 :  Linux                                        Drush script           :  /usr/local/bin/drush                         Drush version          :  8.0.3                                        Drush temp directory   :  /tmp                                         Drush configuration    :                                               Drush alias files      :                                               Drupal root            :  /var/www/html/drupal                         Drupal Settings File   :  sites/default/settings.php                   Site path              :  sites/default                                Sync config path       :  sites/default/files/config_JYMyTTYRsOD-Wxu0fI7lfugHI6rk2DbhO5g-jrfjsPyy46mmesB1aTpSuq2RAUIOUC4N2q_IkQ/sync                                                                    Oddly (to me, at least) I can clear caches:  root@***************:/var/www/html/drupal/sites/default# drush cr Cache rebuild complete.

Do you have any idea on what might be causing this error when I execute:  drush si geoslate --db-url='mysql://root:root@localhost/geoslate' --site-name=Geoslate      Command site-install needs a higher bootstrap level to run - you will need to invoke  from a more functional Drupal environment to run this command.   The drush command 'si vimn_geoslate' could not be executed.   A Drupal installation directory could not be found   ?


I have a equation $y = \sqrt{5x^2+2x+1}$ and I'm trying to generate integer solutions. I've tried Vieta jumping but it failed.   So I generated by brute force few solutions and find these: x=2, 15, 104, 714, 4895, 33552, 229970... and they get really quickly really big.  I need about 20 of these but I can't search about 10^20 numbers. Do you have any idea how to find exact solution, recurent solution or at least how to lower the search space? thanks ^^

My number theory is terrible so I don't know what "class" of problem this secretly is.  I'm looking for all positive integer solutions to the equation:     $M^2=5N^2+2N+1$   That is, I want positive integer $M$ and $N$ to make the above true.  I've got the obvious solution ($N=0$, $M=1$) but I don't know how to go about getting more solutions.  It has been suggested to me that there should be infinitely many solutions, and I would like to find them all.  I could transform it to look like Pell's equation by completing the square on the right, but it won't have integer coefficients (or you could multiply it through by the denominators, but then it wouldn't look like Pell's equation), so I don't think that helps much.  I don't know enough number theory to guess at other things, but I'm happy to read something on this topic.


Let $A=\{1,2,3,4\}$  Let $B= \{a,b\}$  Let $C= \{ \text{hiking, baseball, hockey} \}$  a)  How many onto functions from A to B $(1,a) (1,b) (2,a) (2,b) (3,a) (3,b) (4,a) (4,b)$ Thus 8.  b)  How many onto functions are there from A to C? This is where I am lost.  Would I just count the non-onto functions???

What are the number of onto functions from a set $\Bbb A $ containing m elements to a set $\Bbb B$ containing n elements.  I found that if m = 4 and n = 2 the number of onto functions is 14.  But is there a way to generalise this using a formula? If yes, what is this formula and how is it derived?  reference  I referred to this question but my doubt was not cleared:   If not, Then what is the standard way of doing it?   If you explain this to me with an example please explain with the example of m = 5 and n = 3.


Is $$\lim_{n\rightarrow\infty}\sum_{k=1}^{n}\frac{1}{\sqrt{n^2+k}}$$      konvergent or divergent?   I'm trying to use the squeeze theorem here but I can't find a suiting lower bound. For the upper bound I have that  $$\sum_{k=1}^{n}\frac{1}{\sqrt{n^2+k}}\leq n\cdot \frac{1}{n}=1.$$  Is $\frac{n}{\sqrt{n^2+n}}$ suitable for a lower bound? If so, please explain how. I can't see that this will always be less than or equal to my sum.

Direct way leads to nowhere.  $$\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} } = \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{n \sqrt {1 +\frac{i}{n^2}} } = $$  $$ = \lim_{n\rightarrow \infty} \frac{1}{n} \cdot \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {1 +\frac{i}{n^2}} } = 0 \cdot \sum^{n}_{i=1} 1 = 0 \cdot n $$  So, I tried to apply squeeze theorem:  $$\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} } \leq \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{n}  = 1$$  Could you help me to figure out the lower bound?


I have a zip file which is size of 1gb. I have to split this zip file into smaller chunks with the zip format of size 600mb. Tried below command: split -n 600m source.zip  But output file is not in zip format. I want output file in same zip format. How i can achive this?

Is there a command to create multiple ZIP files based on file size? So that in a folder of 600 files, totalling 1 GB, the command will create 4 zips roughly equal to 250mb.  There's a similar command . But it ZIPs files according to a file number limit.  I also don't want the resulting zip files to be connected with each other, so that I can open them individually and won't need to open all of them at the same time.


Need Help!! I downloaded the ubuntu ISO file from  for 32bit.  I have try 64 bit as well - Same problem.  Install in VMware Using Typical (Recommended) When I created the new virtual machine, in the page of choice the installer from disc image file (ISO). An error sign shows up:     Could not detect which operating system is in the disc image. You will   need to specify which operating system later.   I continue to click next and on the next page I choice the Guest operating system type for Linux and for Version type i choice Ubuntu. After finish the setup, I start the virtual machine. It show Operating system not found in the VM.

I am using Windows 8 and want to install Ubuntu in virtual environment. How do I install Ubuntu in VMware?


I'm relatively new to CSS and I'm having a weird issue:    Why is my "Forgot Password" span floating higher than "Remember Me"?  Here's the React component DOM:

Welcome

Login

         <form onSubmit={login}>              Username:                 <input id="username" type="text" className="loginBox" ref = {node => user = node}/>                           Password:                 <input id="password" type="password" className="loginBox" ref = {node => pass = node}/>

                                      <input type="checkbox" id="rememberMe"/>                     Remember Me                                  Forgot Password?
             <input id="loginSubmit" type="submit" value="Sign In" />           </form>

   And my CSS:  body {   padding: 0;   font-family: sans-serif; }     #loginTitle {   margin: auto;   text-align: center; }     #loginTitle h1 {   color: #4971b2; }     #loginForm {   margin: auto;   width: 200px;   font-size: 10px; }     #loginSubmit {   width: 100%;   display: block;   background-color: #4971b2;   color: white; }     .loginBox {   width: 100%;   display: block; }     #forgotPass {   float: right; } #loginCheck {   float: left; }   How can I make the Forgot Password span align with the span next to it?

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


As , I wonder what happens if the Death Star comes out of hyperspace in the middle of an asteroid field... Or in the middle of a space fleet? Would it be destroyed?  Edit: My main question purpose was originally to know what kind of hyperspace travel the Death Star performs, but since this was edited out, I created a . This secondary question is not a duplicate of the , it is in fact the opposite of it. So in order to clarify it better I will add this:  When the Death Star comes out of the hyperspace, if its entire mass occupies, for instance a group of ships spread around part or the entirity of its area, would they just be pushed out by it, or would they still remain in that area and probably overlapsed by the Death Star mass?

In the Star Wars saga, one of the most iconic weapons of the Empire was the Death Star: a self sustained weapons platform the size of a moon, with the capacity to destroy a planet. in A New Hope, we see the first Death Star in close proximity to the planet Alderaan, holding the planet hostage as the Empire tries to deduce the location of the Rebel Alliance's headquarters. In Return of the Jedi, we see the second Death Star in "dry dock" over the forest moon of Endor as it is being constructed.  My question is: How did the Death Star move? I imagine a spherical space station the size of a moon would be utterly massive, requiring a massive amount of thrust to move it. If it was constructed in low orbit of an inhabited planet/moon, the gravitational field would be immense, consisting of the planet/moon's gravity, and the Death Star's own considerable gravity. Breaking that gravitational field would be a massive task, yet we see no thrusters or engines on either Death Star. Were they hidden, stored under the station's surface while not in use? Was the station towed by another vessel?


if I'm in the python console and I want to see how a particular module works, is there an easy way to dump the source?

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


Having a simple model like: Y = a + bX + u where u represent the error term, if I know that the observation of X and Y are i.i.d, also the error term is i.i.d?

In a problem that I'm solving I find that:  "Let data (yi,xi) be sampled randomly from a two-dimensional distribution such that y|x is N(ɑ,x^2σ^2)".  Are y and x i.i.d? maybe just identically distributed but not independent?  Finally, if my model is: y = ɑ - u (where u is the error term and ɑ is a constant), and I also know that the distribution of x does not depend on either a or σ (I don't know it this assumption is needed for answer at the following question), is u independent from x?  My question is due to the fact that I thought that if the data are sampled randomly this mean that the r.v. are independent, but how is possible that the conditional distribution (his variance) depend then on x?


Typing in ' and then " results in LyX automatically converting these into ' and ”. The code changes into '{}'' so that the output is right single quote and then right double quote ’ ”. Without the {}, just as ''', the output would be right double quote and then right single quote ” ’. The same is true for ``{}`.  This is supposed to become left single quote and then left double quote ‘ “ and not left double quote and then left single quote “ ‘.  This works fine as expected in pdflatex.  However, LuaTex ignores the {} and treats the sequence as ''' or ```.  The fix one side is simple, if the user types ' and then ", change the code from '{}'' to '{}\textdblquoteright. As a matter of fact, change ALL cases of typed " to \textdblquoteright.  This is a problem in typical sentences like the following sentence I would type:  Brian said, ``Alice turned to me and yelled,Stop!'"`  Lyx displays:  Brian said, “Alice turned to me and yelled, ‘Stop!’”  Lyx's code:  Brian said, ``Alice turned to me and yelled, `Stop!'{}''  pdflatex output:  Brian said, “Alice turned to me and yelled, ‘Stop!’”  LuaTex output (incorrect):  Brian said, “Alice turned to me and yelled, ‘Stop!”’  Solving the left quote problem is very hard. If you have three quotations as in the following, there is no easy way out other than manually coding \textdblquoteleft. The following is fine, because double quotes come first:  Lucy said, “‘Sting’ is Gordon's stage name.”  The following requires typing out \textdblquoteleft to display correctly in LuaTex:  Alice said, “Lucy said, ‘“Sting” is Gordon's stage name.’”  As it is, LuaTex would display this as:  Alice said, “Lucy said, “‘Sting” is Gordon's stage name.”’

[Please correct me if my statements are wrong]  TL;DR: pdftex, xetex and luatex exhibit different behaviour. What are these differences and why are they present.    I know of three engines, which implement TeX and support native PDF output: pdftex, xetex and luatex. Unfortunately they are not completely compatible.  pdftex is an ɛ-TeX engine, which is downward compatible to Knuth-TeX, i.e. there will be not difference in the typeset output of pdftex and tex (breakpoints, pagebreaks, ligatures, dimensions, etc. are exactly the same).  Example of an Incompatibility  This is not true for xetex and luatex. I just know of one obvious incompatibility which I will support by a MWE in a moment. To prevent a ligature, Knuth suggest several alternatives in the TeXbook in exercise 5.1     {shelf}ful or shelf{}ful, etc.; or even shelf\/ful, which yields a shelfful (w/ ligature) instead of a shelfful (w/o ligature). In fact, the latter idea—to insert an italic correction—is preferable because TeX will reinsert the ff ligature by itself after hyphenating shelf{}ful. (Appendix H points out that ligatures are put into a hyphenated word that contains no “explicit kerns,” and an italic correction is an explicit kern.) But the italic correction may be too much (especially in an italic font); shelf{\kern0pt}ful is often best.   Thus having the following plainTeX document should always result in the ff ligature being disabled  shelf{}ful \bye   pdftex  The output of tex and pdftex is as expected    luatex  But for luatex I obtain    xetex  For xetex I get the same as for pdftex    but as soon as I load an OpenType font as in  \font\test="CMU Serif" \test shelf{}ful \bye   the ligature reappears    Another example (which turned out to be a bug)  The code  ${}\limits$ \bye   will typeset without any complaint under luatex whereas it will throw the error  ! Limit controls must follow a math operator.   with pdftex or xetex.  This example will also throw the appropriate error for luatexversions > beta-0.79.1.  Summary  In the end my question boils down to several points:   What are the incompatibilities of xetex and luatex with pdftex? Why did the designers choose to break compatibility with Knuth? Can I restore compatibility by making specific design choices (i.e. breaking ligatures with \kern0pt instead of {})?     N.B.: Please don't get too caught up by the example. I'm not asking for a solution to this specific problem. If you are searching for a solution to it, visit those links         List of known incompatibilities  Here I collect links to questions/answers which point out some of the incompatibilities.  It is intended for users contemplating to switch engines, but want to known what to watch out for.


When should a capital letter be used for the word city?  E.g  spark innovation in the city.... The city has an opportunity.... The city is growing...  Would I use a capital in any of the above sentences? I've been told that if you are talking about "the City" then it should be capitalised?  Thanks

When referring to an entity like a government body, should it be capitalized if referring to is by classification(?).  E.g., if I write:     The City of New York requires us to get a building permit.   Certainly "city" should be capitalized.  However, if I'm communicating in a context where everyone should know what city I'm referring to (the one we are in), when I write:     The city requires us to get a building permit.   Should "city" still be capitalized?


Stack Overflow currently shows two featured posts in the sidebar under Featured on Meta:   MSE: A proposed philosophy of question migration MSO: Documentation Update, September 29th   Meta Stack Overflow only shows one featured post:   MSO: Documentation Update, September 29th   Can you make it list MSE posts as well? I'm tagging this as a bug, but not sure whether it's intentionally missing.

The Featured on Meta section of the Community Bulletin on a per-site Meta only lists its own featured posts, while the section on a main site also lists the featured MSE posts. Is it by-design? Any specific reason for this? I think it should be displayed.  Community Bulletin on a Main site:    Community Bulletin on a Meta site:


I wanted to upgrade from Ubuntu 16.04 to 17.04.  I created a bootable usb stick in Ubuntu 16.04 using Startup Disk Creator selecting the downloaded 17.04 iso.  I'm using a Kingston 8GB usb stick.  I can select the stick in the BIOS and boot menu, but the system keeps starting up as usual via the main start up disk. Ignoring the usb stick.  I'm reading similar posts about the matter, but I don't find a suitable answer.

What are the different ways I can use to upgrade Ubuntu from one release to another?


Is the following Proof Correct? In particular please comment on the correctness of the given formulas.  Theorem. Given that $x$ is a real number, $x\neq 0$, and $x + \frac{1}{x}$ is an integer. For all $n\ge 1$, $x^n+\frac{1}{x^n}$ is an integer.  Proof. We construct the proof by recourse to Strong-Induction.  Assume for an arbitrary $n\in\mathbf{Z^+}$ that $x^k+\frac{1}{x^k}$ is an integer for any positive integer $k$ strictly less than $n$. Now Consider the following cases.  Case-1: If $n$ is even then for some $l\in\mathbf{Z^+}$, $n = 2l$ thus the Binomial-Theorem implies that $$(x+\frac{1}{x})^n - \sum_{j=1}^{l-1}\binom{n}{2j}\left(x^{2j}+\frac{1}{x^{2j}}\right)-\binom{n}{l} = x^n+\frac{1}{x^n}$$ from the inductive hypothesis we know that $x+\frac{1}{x}\in\mathbf{Z}$ which implies that $(x+\frac{1}{x})^n \in\mathbf{Z}$ in addition it also follows from the inductive hypothesis that $x^{2j}+\frac{1}{x^{2j}}\in\mathbf{Z}$ for $j\in\{1,2,3,...,l-1\}$ moreover we also that $\binom{n}{r}\in\mathbf{Z^+}$ is always a positive integer implying that $x^n+\frac{1}{x^n}$ is an integer.  Case-2: If $n$ is odd then for some $l\in\mathbf{Z^+}$, $n = 2l+1$ thus the Binomial-Theorem implies that $$(x+\frac{1}{x})^n - \sum_{j=1}^{l}\binom{n}{2j-1}\left(x^{2j-1}+\frac{1}{x^{2j-1}}\right) = x^n+\frac{1}{x^n}$$ and by using the same reasoning as in the previous case we can deduce that $x^n+\frac{1}{x^n}$ is an integer.

Suppose that $0\neq x\in\mathbb{R}$ and $x + \frac1x\in\mathbb{Z}$. Prove that, for all  $n\ge1$, $x^n + \frac1{x^n}\in\mathbb{Z}$.  I can't figure out and understand the question. Can you give me some hints ?


How can I create an image link using the Markdown format? I want an output like . I can't seem to find the answer in .

What's the recommended syntax for an image with a hyperlink? I tried doing it with the markdown toolbar buttons and the image and link buttons conflict with each other, so I had to resort to HTML. For example, to do this:  These work properly: ![alt text][1] [1]: https://www.gravatar.com/avatar/dd5a7ef1476fb01998a215b1642dfd07         [][2] [2]: https://meta.stackoverflow.com/users/44330/jason-s  This does not: ![alt text][1]  (single quotes not allowed?) Is there a way to do the same thing in Markdown without having to resort to HTML?


I believe it was a trilogy. It was set in a universe where dragons are pitted in fights against each other for humans' benefit, and the main character was a stableboy who helped to take care of dragons. I remember early on in the first book he gets injured by a dragon, and a woman who is taking care of his wounds comments on how otherwise unscarred his back is, which embarrasses him.   At some point he discovers that he has an empathic connection with dragons (!?) and everything goes down south when a dragon he'd been helping his mentor figure prepare gets injured ("hamstrung") and has to be put down. As the mentor administers a mercy killing to the dragon, the main character was visualizing a candle being snuffed out.   One of the novels ended with the main character and his female traveling companion both developing an empathic/psychic bond with their dragons and with each other; when their dragons communicate with them, they hear/see/feel it in rainbows.  I remember discovering it in a middle school library; I believe it's young adult. It wouldn't have been published any later than 2005

I'm trying to remember the name of a series of books about a boy who works with dragons.  Dragon's blood (or maybe it was slobber?) is acidic, and the children who wrangle these dragons often end up with deep pock marks.  On this world, days are like ours but nights get very cold, requiring anyone stuck outside to find a shelter until dawn (not the false dawn)  The other thing I remember is that in one of the books by slicing open a dragon and spending the night, the character emerged with special dragon powers.


A maester can be recognized by the chain he wears around his neck. The links of the chain can be made of every metal known to man. Each metal is related to a subject - silver for medicine, iron for warcraft, etc. Can a maester's chain include multiple links of the same metal?

How many links are needed to forge a chain? Are more links prestigious than others? How long does it typically take to earn a full chain?


I'm not asking how matrix multiplication is done. I know how to multiply matrices and can look at two matrices and say whether or not they can be multiplied. I just want to know what matrix multiplication reveals to us.

Multiplication of matrices — taking the dot product of the $i$th row of the first matrix and the $j$th column of the second to yield the $ij$th entry of the product — is not a very intuitive operation: if you were to ask someone how to mutliply two matrices, he probably would not think of that method. Of course, it turns out to be very useful: matrix multiplication is precisely the operation that represents composition of transformations. But it's not intuitive. So my question is where it came from. Who thought of multiplying matrices in that way, and why? (Was it perhaps multiplication of a matrix and a vector first? If so, who thought of multiplying them in that way, and why?) My question is intact no matter whether matrix multiplication was done this way only after it was used as representation of composition of transformations, or whether, on the contrary, matrix multiplication came first. (Again, I'm not asking about the utility of multiplying matrices as we do: this is clear to me. I'm asking a question about history.)


I want to travel from Istanbul to Canada using Turkish Airlines. I have an Iranian passport and student visa for Canada. From what I've heard, I don't need a transit visa for my layovers but it seems Turkish Airlines might check for one. Will they?

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


I've checked sys.path variable and one of its values is /app, so that's ok. I've run os.listdir() to verify the directory tree is as I'm assuming, and it is like that: Directory tree: -app:    -dirA:       -subdirA:          -subsubdirA:             -fileA.py    -dirB:       -subdirB:          -fileB.py I want to import fileA from fileB. I've tried adding _ init _.py file in all directories, and doing import dirA.subdirA.subsubdirA.fileA as fileA, but it doesn't work. I've also tried adding fileAs path to sys.path like sys.path.insert(0, "/app/dirA/subdirA/subsubdirA"), and then doing import fileA from fileB.

How do I import a Python module given its relative path?  For example, if dirFoo contains Foo.py and dirBar, and dirBar contains Bar.py, how do I import Bar.py into Foo.py?  Here's a visual representation:  dirFoo\     Foo.py     dirBar\         Bar.py   Foo wishes to include Bar, but restructuring the folder hierarchy is not an option.


I viewed in this post  a solution to my question, but...    Are there any easier way (or alternative) to do this using colors?  Thank you. ------------------ edited after showed than it´s duplicate ------------- I think that there are many sols, but for example this is easy using a normal table without pgf...     I´m trying to adapt to similar colors to apply to the table probabilitiess

I wanted to do some shading in a table according to its values. For example, if you see the table below:    a  b   c   d  a 90 10  0   0 b 0  80  10  10 c 0  0   95  5 d 0  10  5   85   I want to shade automatically each numeric cell with a mixture of black and white according to its value. That is, (a,a) = 90 should be something like black!90, and (c,d) = 5 should be black!5. Also, if you can parametrized the shading operation so one can define the color and if we use the value or the complement that would be great.  I was thinking in something like , but I cannot see how can one achieve that in a table.   Can you give me some advice on how to achieve such automatic styling?


Would you mind me opening the window?      Would you mind my opening the window?   Who uses which form, and why? Is this a difference in dialect? A difference between formal and informal grammar?

I assume that the following sentences are grammatically correct:   He resents your being more popular than he is. Most of the members paid their dues without my asking them. They objected to the youngest girl's being given the command position. What do you think about his buying such an expensive car? We were all sorry about Jane's losing her parents like that.   I'm still getting used to this possessive gerund structure. It sounded so weird to me at first. Is the structure used in both formal and informal contexts? Are there any alternative structures that result in the same meaning and are more frequently used? (Examples taken from )


Unable to mount DVN   Error mounting /dev/sdc1 at /media/leon/DVN:   Command-line Output:  mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdc1" "/media/leon/DVN"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'

In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.  So my question is how do I enable exfat support?


Typically, a prime is defined as follows: $p$ is prime iff $(p \mid xy \implies p \mid x$ or $p \mid y)$ and $p$ is not a unit or zero. But for ideals, we say the zero ideal is prime.  There is a strong correspondence between statements about primes and statements about prime ideals:   "A non-unit is prime if $p \mid ab \implies p \mid a$ or $p \mid b$" vs. "A proper ideal is prime if $P \ni ab \implies P \ni a$ or $P \ni b$" "All non-zero primes are irreducible" vs. "all non-zero prime ideals are maximal" "Primes are only divisible by themselves and units" vs. "prime ideals are only contained by themselves and the whole ring (generated by a unit)" "Zero is divisible in every ring element vs. "the zero ideal is contained in every ideal" "In a UFD, non-zero elements can be uniquely factored into primes" vs. "in a Dedekind ring, non-zero ideals can be uniquely factored into prime ideals"   So, I feel that zero should be prime iff the zero ideal is a prime ideal. Why is there this discrepancy? I lean towards "zero is not a prime", but what are the consequences of rejecting the zero ideal as prime as well?

I know that $1$ is not a prime number because $1\cdot\mathbb Z=\mathbb Z$ is, by convention, not a prime ideal in the ring $\mathbb Z$.  However, since $\mathbb Z$ is a domain, $0\cdot\mathbb Z=0$ is a prime ideal in $\mathbb Z$. Isn't $(p)$ being a prime ideal the very definition of $p$ being a prime element?  (I know that this would violate the .)    Edit: Apparently the answer is that a prime element in a ring is, by convention a non-zero non-unit (see ).  This is strange because a prime ideal of a ring is, by convention, a proper ideal but not necessarily non-zero (see ).  So, my question is now: Why do we make this awkward convention?


How do I get the quarried stone for my house in Skyrim? I've found the mines for it, but after I mine I don't receive any of the stones.

I can't find anywhere to get quarried stone to build my house on the hearthfire expansion so I would like to know lots of places to get it.


Prove that the above integral is equal to $\frac{\sqrt{2\pi}}{2}$   I have already tried expanding using $\cos$ identity and also taking Laplace for it. I am getting nowhere with this.

I have seen the Fresnel integral  $$\int_0^\infty \sin x^2\, dx = \sqrt{\frac{\pi}{8}}$$  evaluated by contour integration and other complex analysis methods, and I have found these methods to be the standard way to evaluate this integral.  I was wondering, however, does anyone know a real analysis method to evaluate this integral?


I'm stumped by the use of 'figsize' to change the size of a plot.   Perhaps I don't fully understand how matplotlib works.  The code below is from an earlier question from me regarding plotting series with different scales in one graph, using two axis.    Prin_Balances is a dataframe consisting of floating numbers, the column names should be self explanatory and correspond to features.     fig, ax = plt.subplots() # plt.figure(figsize=(9,6))  plt.xticks(rotation=45) plt.plot(Prin_Balances['UPB'], '--r', label='UPB') plt.legend() ax.tick_params('Bal', colors='r')   # Get second axis ax2 = ax.twinx() plt.plot(Prin_Balances['1 Mos'],  label='1 Mos', color = 'blue') plt.plot(Prin_Balances['2 Mos'],  label='2 Mos', color = 'green') plt.plot(Prin_Balances['3 Mos'],  label='3 Mos', color = 'yellow') plt.plot(Prin_Balances['> 3 Mos'],  label='>3 Mos', color = 'purple') plt.legend()  ax.tick_params('vals', colors='b')   Now when I run this code, I get a nice, but small graph:     How can I change the size of this graph?   The point in the code at which I invoke the second line ('plt.figure') seems to have an effect on the output, in some instances drawing an empty box above a new plot with different labels.   (I have not included a shot of this, as I am using Juypter notebook and the two graphs are can only be viewed by scrolling down the output window.

How do you change the size of figure drawn with Matplotlib?


I attacked with 4/4 creature with first strike and life link.   My hubby blocked with his only card, a 2/2 with “when this creature is dealt damage, it deals 5 damage to target creature an opponent controls”. He chose to deal that damage to my attacking creature.   Can I then play an instant to give my creature +2/+2, so his damage does not kill my creature? (My attacking creature is 4/4).

I'm a relatively new player to Magic: the Gathering. I was reading  to try to understand exactly when it's okay to cast instants (e.g. ) and use some abilities (e.g.  should be tappable sometime during other peoples' turns), but I don't seem to be making much progress: as I come to understand some things, others make less sense.  My confusion is boundless  For instance: to cast  one needs priority. Spells go on the stack, and priority gets passed at some points (I have no idea when), and effects on the stack are resolved when both players have passed priority. But when is that? I can't find any mention of when the other player gets the priority to cast an instant, except on their own turn. Furthermore,  states that during the Main Phase:     505.4. Second, the active player gets priority. Players may cast spells and activate abilities. The active player may play a land.   So players (plural) may cast spells, but only the active player has priority, so only the active player can cast an instant. The turn rules, and the rules on , never mention any point at which the other player gets priority, so when can they possibly Cancel?  In addition, you can only cast a spell when the stack is empty, so the entire stack must be able to be resolved in your turn at some point.  I need an explanation!  I could go on a bit more. There is also  which can be overloaded to "Counter each spell you don't control", which seems like it could only possibly work with an understanding of the stack.  Could someone explain, in simple English:   When can Instants be cast? When can tap abilities be used? What do Instants and abilities have to do with the Stack and Priority?


Let $R$ be a PID. How can one show that for all non zero $a,b \in R$ we have $R/(a) \oplus R/(b) \cong R/\gcd(a,b) \oplus R/\operatorname{lcm}(a,b) $.  I have no idea how to define such an isomorphism. What I tried is to define $f([x],[y])=([\gcd(x,y)], [\operatorname{lcm}(x,y)])$. I didn't get anywhere with that my map is probably not even well defined I got lost in the calculations. So does anyone know how to find the desired isomorphism. Thanks in advance

How would one go about proving that $\mathbb{Z}_m\oplus \mathbb{Z}_n \cong \mathbb{Z}_d\oplus \mathbb{Z}_l $ as groups, where  $l=\mathrm{lcm}(m,n)$ and $d=\gcd(m,n)$?    I am attempting to use the fundamental theorem of finitely generated abelian groups but am struggling. In the interest of honesty, this is a past exam question that I am attempting for which the solutions are not available. EDIT: As the question was asked in the paper, the Chinese Remainder Theorem would not be permitted since this is only proved in the follow-up course.


Due to an upcoming exam I came across the following past exam question which at first seemed easy. The question is as follows.   Let $f(y_i) = (\frac{k}{y_i})^2$ be the density function of the (random) income of agent A where $k$ denotes the minimum amount. As such the income follows a pareto distribution with support $[k, \infty)$. Determine the expected income.   At first, my thoughts were pretty routine: Apply the definition $\mathbb{E}[y_i] = \int\limits_{k}^{\infty} f(y_i)y_i dy_i$ and integrate. The result is the expected income. But after doing that I got the integral $\int\limits_{k}^{\infty} \frac{1}{y_i} dy_i$ which of course does not converge. Hence, the expected income would be infinite which is not sensible - not economically nor in the exam situation. But what do I miss here?

Many PDFs range from minus to positive infinity, yet some means are defined and some are not. What common trait makes some computable?


Currently i am using an instance on Google cloud platform and in Ubuntu 16.04 I am able to install p7zip to extract .7z files, but on Ubuntu 18.04 I get the following error:  Package p7zip-full is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'p7zip-full' has no installation candidate   Bearing in mind that I do not have a GUI, do I have any other option to extract .7z archives in Ubuntu 18.04?  I tried to install it using this command   sudo apt-get install p7zip-full   But it does not work for 18.04.

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


im trying to do my first practices in JSP. I need instanciate a Java Bean using standard actions. I have the next bean:  package bean;  public class Cotizacion implements java.io.Serializable {      private static final long serialVersionUID = 1L;     // Some properties ...      public Cotizacion(){         // Nothing ...     }     // Accessors & toString ... }   So, in my JSP:  <%@ page import="bean.Cotizacion" %> <%@ page session="true" %>  // HTML <jsp:useBean id="bean" type="bean.Cotizacion" scope="session"></jsp:useBean>   When i load the page, an exception is catched:      javax.servlet.ServletException: java.lang.InstantiationException: bean   bean not found within scope   Whats wrong with my code ?  EDIT: Sory, i found the solution in this , i need to use the "class" attribute instead "type" for first time.

I'm getting this error:  javax.servlet.ServletException: bean not found within scope   on a page with this at the top.  <jsp:useBean id="bean" type="com.example.Bean" scope="request" />   The class exists in the classpath, it worked this morning, and I don't get what not found within scope means.  How is this caused and how can I solve it?


I want to replace an old Windows XP OS with Ubuntu, but I really don't know which version would suit my needs. I require only media center type functionality from the Ubuntu replacement.   The older XP computer has a 1.8 GHz processor speed, but the media center demo clearly states that I require a 2.0 GHz processor or better. I want to use my Windows 10 desktop for downloading the .iso file and making the Ubuntu replacement installation media.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


Is there a simple way of drawing matrices with shadowed blocks like the ones in the picture?     I've tried something like :  %% with these packages loaded %% \usepackage{tikz} %% \usetikzlibrary{matrix} \begin{frame}   \frametitle{Other matrix groups}   \begin{itemize}   \item Upper triangular $UT(p,q)$:      \begin{tikzpicture}[every node/.style={anchor=base,text depth=.5ex,text height=2ex,text width=1em}]       \matrix [matrix of nodes,nodes in empty cells]               {                 |[fill=black]| a  & |[fill=black]| b \\                 |[fill=white]| 0  & |[fill=black]| c \\               };     \end{tikzpicture}   \end{itemize} \end{frame}   However, I get an error     ! Undefined control sequence.       \pgf@matrix@last@nextcell@options       l.307 \end{frame}   nonstop compilation yields        Any suggestions?

my problem is interconnected to my two previous posts ( and) and i've tried to incorporate answers into solution but without success.   My task is this matrix multiplication with added description:   and my so far code follows:  \documentclass{article} \usepackage{tikz,amsmath}  \begin{document} \begin{tikzpicture} \node[minimum height=0cm,minimum width=2cm] (m) {}; \path[shade,draw] (0,2) -- (0,5) -- (3,5) -- (3,0); \draw (0,0) --(0,5); \draw (3,0) --(0,2); \draw (3,0) --(3,5); \node (r11) at ([xshift=0.6cm,yshift=4cm]m.south) {$S_{11}$}; \node (r11) at ([xshift=2.5cm,yshift=4cm]m.south) {$S_{12}$}; \node (r11) at ([xshift=2.5cm,yshift=2.15cm]m.south) {$S_{22}$}; \node (r11) at ([xshift=0.6cm,yshift=2.15cm]m.south) {$S_{21}$}; \node (r11) at ([xshift=0.6cm,yshift=2.6cm]m.south) {$--------------$}; \node (r11) at ([xshift=0.6cm,yshift=1.5cm]m.south) {$--------------$}; \end{tikzpicture} \[ \begin{bmatrix} \begin{equation}        wn_{1}           \\[0.3em]        wn_{2}       \end{bmatrix}  \]  \end{document}       with following output:      I am not able to add vertical line and nodes and incorporate the matrix into document (vector that follows behind the matrix is not centered). Problem with nodes and incorporation is the same as in .


I'm a bit worried because my paper have been more than 2 months "with editor" status. It's a computer science journal , from a famous editorial.  Normally we have the option to send an e-mail to the assigned editor, but in this case there is only "view your submission".  In this case, what should I do within the following choices? 1. Withdraw 2. Make direct contact to the editor 3. Just wait 4. Other  Also, if I should contact the editor directly, How can I know which editor to contact and how can I found his contact address ? Thanks in advance

I have submitted a paper to a journal 2 and a half months ago. Its status remains "With editor". From your experience, is this normal? If not, how should I deal with that?


On my SO profile (this is the new, recently released one), in the Web Presence section, it says that there's no Careers profile for this account, and to click the link (Discover StackOverflow Careers) to find out more.  I have a StackOverflow Careers account, and when I click the link it logs me straight in to my account.  Have I messed things up somehow - perhaps they are somehow two different accounts, and I'm logged in to both of them? If so, how can I associate my SO Careers account with my SO account?

It seems like it should now be possible for my Stack Overflow profile to link to Stack Overflow Careers, but somehow it doesn't show my profile (even though clicking the link next to it does get me to my Careers profile). Any clues?     (is 404, maybe this is related?)


Suppose I have logged in through sshto a given Linux machine, knowing nothing about it.  How can I quickly check what virtual environment (VMWare, VirtualBox, LXC, etc., if any) is currently running on this machine?

I have command line access to a Linux machine which may or may not be virtualized. I want to determine what kind of virtualization technology it runs on, if any (VMWare, VirtualBox, KVM, OpenVZ, Xen, ). This isn't a hostile environment: I'm not trying to work against a VM that is trying to disguise itself, I'm diagnosing a flaky server that I know little about.  More precisely, I'm helping someone diagnose the issue, I'm not sitting at the helm. So I have to convey instructions like “copy-paste this command” and not “poke around /proc somewhere”. Ideally, it would be something like lshw: an easily-installable (if not preinstalled) command that does the poking around and prints out relevant information.  What's the easiest way of determining what virtualization technology this system may be a guest of? I'd appreciate if proposals mentioned which technologies (including bare hardware) can be conclusively detected and which can be conclusively eliminated. I'm mostly interested in Linux, but if it also works for other unices that's nice.


I have a Google spreadsheet that contains recipient's names, emails, and a message that anonymous people have sent this Valentine's Day.  I am aware of applications such as the various Mail Merges that allow one to send personalized messages. All of which that I have found, however, send in plaintext  (at least in their free versions).  In the Mail Merge add-ons I have used, I can't seem to include images either.  I am also aware of scripts that can send HTML emails, but none that can send personalized emails automatically to a large number of people. An example message I am looking for may just be something like a simple banner image, greeting (with variable name), and variable message, perhaps with everything centered. The easiest way I can think of to achieve this is by sending an HTML email, so I'm looking for a way to retrieve spreadsheet values for a template HTML document to send the personalized messages.

Here's an example of a Google Docs Spreadsheet script that sends emails using Google spreadsheets. I want the email Sent in HTML not plain text. Can someone help me out?  function sendEmails() {   var sheet = SpreadsheetApp.getActiveSheet();   var startRow = 2;  // First row of data to process   var numRows = 2;   // Number of rows to process   // Fetch the range of cells A2:B3   var dataRange = sheet.getRange(startRow, 1, numRows, 2)   // Fetch values for each row in the Range.   var data = dataRange.getValues();   for (i in data) {     var row = data[i];     var emailAddress = row[0];  // First column     var message = row[1];       // Second column     var subject = "Sending emails from a Spreadsheet";     MailApp.sendEmail(emailAddress, subject, message);   } }


export function calculateDiff(first, second){    const firstNum = Number(first);   const secondNum = Number(second);    return isNaN(firstNum) || isNaN(secondNum) || firstNum === 0 ? '' : firstNum - secondNum }  // In spec test file  it('calculateDiff', () =>{     expect(calculateDiff('',1.2)).toBe('') //PASSES as expected     expect(calculateDiff(100.2399, 99.2455)).toBe(0.9944); //FAILS -result is 0.9943999999999988     expect(calculateDiff(100.2399, 99.2455)).toBe(0.9943999999999988); //PASSES  });      How can I prevent it from making this conversion? I like Number rather than parsefloat function because of the way it does Nan and handles others values.

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


I use the email feature to send email from a case in Salesforce. Unfortunately, the BCC email address is every time filled by my email address when I open the widget. Is there a way to delete the BCC email addresss in the setup? Thanks

Currently, when our Portal users send any emails from Salesforce, they are automatically BCC on each email. While they are able to delete their email address out of the BCC field, we would like to turn the automatic BCC off for all of our Portal users (but not org-wide; so we don't want to go with the option of enabling the Compliance BCC Email). We just want to change this setting for Portal users. Is there a way to do that?      trigger UserTrigger on User (before insert) { //This trigger is used to disable autobcc on email for portal users.     if(trigger.isBefore && trigger.isInsert) {         List<User> lstUsers = new List<User>();         Set<Id> setUserLicenceId = new Set<Id>();         List<Profile> lstPortalUserLicense = [SELECT Id,Name FROM Profile WHERE Name = 'Partner Community User Custom'];         System.debug('Debug Log for lstPortalUserLicense'+lstPortalUserLicense.size());         if(lstPortalUserLicense.size() >0){             for(Profile profile : lstPortalUserLicense) {                 setUserLicenceId.add(profile.ID);             }             for(User u : trigger.new){                 System.debug('Debug Log for userLicence '+u.ProfileID);                 System.debug('Debug Log for email bcc preference'+u.EmailPreferencesAutoBcc);                if(setUserLicenceId.contains(u.ProfileID)) {                    u.EmailPreferencesAutoBcc = false;                      lstUsers.add(u);                 }             }         }         System.debug('lstUsers size'+lstUsers.size());      } }


My question is somewhat different from the traditional ones. I expect to receive a desktop that has preinstalled Windows but I am not interested even in booting them, so the question is: Do I have to do anything before plugging a usb stick with Ubuntu? Do I have to, at least once, boot in Windows and then install Ubuntu? Or could I from the first boot of the desktop, just boot the usb stick and install Ubuntu?

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


For $V_n$ where $x=(x_1, x_2, \ldots, x_n)$ and $y=(y_1,y_2,\ldots,y_n)$, the dot product is defined by $x_1y_1+x_2y_2+ \cdots+x_ny_n$.  In Apostol's calculs vol 2   It says that if $x=(x_1,x_2)$ and $y=(y_1,y_2)$ are any two vectors in $V_2$, define $(x \cdot y)$ by the formula   $(x \cdot y)= 2x_1y_1+x_1y_2+x_2y_1+x_2y_2$   Why is that?    Is there difference between dot and inner product?   I thought that following the dot product, $(x \cdot y)$ should be $x_1y_1+x_2y_2$.

I was wondering if a dot product is technically a term used when discussing the product of $2$ vectors is equal to $0$.  And would anyone agree that an inner product is a term used when discussing the integral of the product of $2$ functions is equal to $0$?  Or is there no difference at all between a dot product and an inner product?


I have a shell script in one server. I want to run it in another server from this server. Both servers have ubuntu 18.04. I can ssh into the other machine. Do I need to upload my script on another server.

I have to run a local shell script (windows/Linux) on a remote machine. I have SSH configured on both machine A and B. My script is on machine A which will run some of my code on a remote machine, machine B. The local and remote computers can be either Windows or Unix based system. Is there a way to run do this using plink/ssh?


I'm struggling with this question? How can I find next birthday Date from my list of date ?  I got  const myArray = [           {             name: 'Joe Blow',             date: 'Wednesday, November 25, 1992'           },           {             name: 'Sam lol',             date: 'Thursday, April 16, 1992'           },           {             name: 'Eva lol',             date: 'Thursday, February 26, 1991'           }         ];         myArray.sort(function compare(a, b) {           const dateA = new Date(a.date);           const dateB = new Date(b.date);           return dateA.getUTCDate() - dateB.getUTCDate();         });         // console.log(this.usersBirthdayDate);         console.log(myArray);   but I got Sam first cause he got 1992.. But I would like to display Thursday, February 26, 1991 first  Updated my solution :      sortByDateNoYear(adate, bdate) {         let results;         const lhdate = moment(adate.birthdayDate);         const rhdate = moment(bdate.birthdayDate);         results =           lhdate.month() > rhdate.month()             ? 1             : lhdate.month() < rhdate.month()             ? -1             : 0;         if (results === 0) {           results =             lhdate.date() > rhdate.date()               ? 1               : lhdate.date() < rhdate.date()               ? -1               : 0;         }         return results;       }  [array].sort(this.sortByDateNoYear);

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


I have a dual boot 12.04 LTS and windows 7, now i want to update from 12.04 LTS to 14.04 LTS, how to do this in terminal? and also how many MB of data it takes approximately?   If any disturbance is occured while upadting (i mean disconnection in WiFi) will it starts downloads from beginning? or it continues from where it stops?

What are the different ways I can use to upgrade Ubuntu from one release to another?


Even though I do a quick edit in camera to remove unwanted shots as I shoot, I still end up with a huge number of shots. I keep and back up in the cloud the ones I am working on for a project and catalog them into projects and locations.   But what about all the rest, do you keep them all and put into a 'random' folder? Get rid?   It frustrates me having a load of photographic clutter just sitting there but MAYBE, I'll use them one day?   What do you do?

Each time I upgrade my camera, the bigger file sizes (especially shooting RAW), my bigger memory cards and happier trigger finger mean that my new photos are consuming way more space.  I even have a 3TB primary drive and a 2TB backup drive - and they are getting fuller every day.  But going through photos and deleting bad ones can be a tedious process.  I've slowly been going through old photos and pressing delete if they are obviously out of focus or have too much motion blur.  But it still leaves a lot of photos that just seem uninspiring, or where I have a lot of photos that are very similar, taking up space.  Deleting them is actually a lot of work because for every string of 20 photos of something, there'll be a range that are of acceptable sharpness, some with good facial expressions or good framing, and so on, so it's never clear whether I'm actually keeping the best one - if not careful, I worry I'll delete one that was actually decent.   What is a good process for choosing what to delete and what to keep? At what stage of the process do think it's best to do it?


Can anyone explain why the MWE below is bad? When I compile it, there is no footline on the first page!?!  I use the <+> and <+-> in order to not having to explicitly having to specify the various overlays.  \documentclass{beamer} \usepackage[T1]{fontenc} \usepackage{fix-cm} \usetheme{Copenhagen} \author{Author} \institute{Department} \title{Title} \begin{document} \begin{frame}   \frametitle{Frame title}    \begin{onlyenv}<+>     Overlay 1, just one   \end{onlyenv}    \begin{onlyenv}<+->     Overlay 2      \onslide<+->      more text   \end{onlyenv} \end{frame} \end{document}

I've discovered that you can \pause within a tikzpicture, which works well until I switched the theme to one with a footline.  I've created a "test case" that illustrates the problem.  \documentclass{beamer} \providecommand\thispdfpagelabel[1]{} % Not sure what this does but our installation requires it. \usepackage{tikz} \usetheme{Madrid} % Has a footline.  \begin{document}   \begin{frame}     \frametitle{test}     \begin{tikzpicture}       \node at (0, 1) {Hello};       \pause       \node at (0, 0) {World};     \end{tikzpicture}   \end{frame} \end{document}   This creates two slides, but the footline is only drawn on the second (the headline/title appears on both). Is there anything I can do about this?


I just tried GNOME for the first time and noticed that alt+tab does not cycle through individual windows, but rather by application. In addition, it cycles through all open applications instead of just the applications in the scope of my current workspace.  How can I get alt+tab behavior that is similar to XFCE, where alt+tab cycles through all the individual windows, limited to the scope of the current workspace?  I noticed that if I press the super, I sort of get this behavior, where all the windows of the current workspace are presented to me. But after pressing the super, inexplicably I have to press ↓ before I can cycle through the windows, which is  really weird.

I am looking for a clean and fast method to force GNOME in Ubuntu 14.04 to switch between active apps only on the current workspace when pressing the shortcut alt + tab.


I have a JSON file members.json as below.  {    "took": 670,    "timed_out": false,    "_shards": {       "total": 8,       "successful": 8,       "failed": 0    },    "hits": {       "total": 74,       "max_score": 1,       "hits": [          {             "_index": "2000_270_0",             "_type": "Medical",             "_id": "02:17447847049147026174478:174159",             "_score": 1,             "_source": {                "memberId": "0x7b93910446f91928e23e1043dfdf5bcf",                "memberFirstName": "Uri",                "memberMiddleName": "Prayag",                "memberLastName": "Dubofsky"             }          },           {             "_index": "2000_270_0",             "_type": "Medical",             "_id": "02:17447847049147026174478:174159",             "_score": 1,             "_source": {                "memberId": "0x7b93910446f91928e23e1043dfdf5bcG",                "memberFirstName": "Uri",                "memberMiddleName": "Prayag",                "memberLastName": "Dubofsky"             }          }       ]    } }   I want to parse it using bash script get only the list of field memberId.   The expected output is:  memberIds -----------  0x7b93910446f91928e23e1043dfdf5bcf 0x7b93910446f91928e23e1043dfdf5bcG   I tried adding following bash+python code to .bashrc:  function getJsonVal() {    if [ \( $# -ne 1 \) -o \( -t 0 \) ]; then        echo "Usage: getJsonVal 'key' < /tmp/file";        echo "   -- or -- ";        echo " cat /tmp/input | getJsonVal 'key'";        return;    fi;    cat | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["'$1'"]'; }   And then called:  $ cat members.json | getJsonVal "memberId"   But it throws:  Traceback (most recent call last):   File "<string>", line 1, in <module> KeyError: 'memberId'   Reference


I came across this article. The first sentence is  One Direction plan on celebrating their 10th anniversary on July 23rd with a trove of new content for their passionate fans.  and the whole article can be seen in this  My question is, Why the verb should've taken a bare infinitive form instead of normal forms like "plans" or "planed"?

The Beatles were an English rock band, formed in Liverpool in 1960.     The Beatles were? Aren't/isn't The Beatles a proper noun and it refers to one group? I don't understand why WikiPedia and other sources use The Beatles were instead of The Beatles was. Is it because of the s? Somebody please explain me about this, it goes against all the rules I've learnt and it is not even in my grammar books.


Twelve months ago, Mr David Cameron — the British Prime Minister in government alliance with a smaller party — won a surprise outright victory in a general election. This put him in a position of considerable power. However he subsequently called a referendum on British Membership of the EU, campaigned for remaining in the EU, lost, and resigned. Is there an expression to describe squandering a position of such strength. “Shooting oneself in the foot” conveys the self-inflicted nature of his fall but does not convey the idea of squandering a strong position.  N.B. This is not a political question nor intended to invoke political discussion. There must be similar historical examples of this. I have stated what happened. I am looking for an expression to describe it.

Specifically I'm wondering if there's a word that describes the phenomenon where some party takes some action to remedy a situation and the result of that action makes the original situation worse.  Recent examples that made me think about this:   The NFL suspended a journalist for editorializing a podcast in a way against the party line - the suspension brought the podcast into much more popular light and greatly increased public sympathy for the journalist. On Sunday, the protests in Hong Kong were apparently quite civilized, but the police crackdown/pepper spray movement dramatically increased public support for the protestors and the protests have only swelled in size & support (to my understanding).   I'm wondering if there is a very succinct word for this phenomenon that has so far eluded me. I'm not even sure shooting yourself in the foot is a good saying to describe it.


I found a domain name (2 words) that is not available.  Then I found almost the same domain name with a slight difference, the last letter of the first word is the same of the first letter of the second word. Ex : jamessecret.com (not available)      jamesecret.com (available)  In terms of SEO, is it seen as the same to Google? Would search engines interpret them the same?

I am going to choose a domain name for my business. For that I am going to use joined words in my domain name.  For example, let's say my keywords are "painting" and "goa" and also that paintinggoa.com is not available to register.  In this case if I choose paintingoa.com is it good? Is it good for SEO purposes?  How will Google treat this domain name?


Here is code to start the question  function myfunction(){     global $wpdb;      $search_string = urldecode($_REQUEST['s']);      var_dump(get_term_by('name',$search_string , 'gift_tag' )); //This fine the Query by name just fine.       $args =array('post_type' => 'gift',                 'posts_per_page'=> 14,                 'post_status' => 'publish',                 'paged'=>$p,                 'orderby' => 'meta_value_num',                 'meta_key'=>'popularity',                 'order' => (isset($_REQUEST['order'])?$_REQUEST['order']:'ASC')         );     $args['tax_query'][] = array(                 'taxonomy' => 'gift_tag',                 'field'    => 'name',                 'terms'    => $search_string             );      $q= new WP_Query($args);     var_dump($q->request);  //This returns no Results, as it include 0=1 in place of tax query.  }   the above function expect Query String parameter s in Hebrew gift_tag name and when I use that in get_term_by function it found the Terms just fine, but when use same name in tax query it doesn't find the said taxonomy and hence adding 1=0 wordpress' famous way of ignoring all results.   The behavior is restricted to terms that include ' Hebrew characters for any word that doesn't contain that single quote mark in hebrew or english returns results perfectly.   too me, it looks like that it is some sort of bug in Wordpress that is failing to properly filter character in WP_Query.   Any idea what else might be wrong in above code.

Here's my issue. I have a custom post type that I'm attaching a custom taxonomy to. This taxonomy will allow the admin to provide search suggestions that will ensure the post is found when a user searches. This taxonomy is also used on the front-end to autocomplete the search field with these suggestions.  The system works fine, except when the term contains a forward slash, a space or other "special" characters.  <?php $keyword = 'Ski-in%2FSki-out';//Submitted via $_GET $keyword = urldecode($keyword); // (string)'Ski-in/Ski-out'  $taxQuery = new WP_Query(array(     'post_type' => 'ml_properties',     'tax_query' => array(         'relation' => 'OR',         array(             'taxonomy' => 'mc_tax_lifestyle',             'field' => 'name',             'terms' => array($keyword),             'operator' => 'IN'         )     ) )); ?>   I've looked into using the escaping features provided by WordPress, but haven't had any luck there. I thought this would be a simple problem, but either my Google-fu is not strong, or I'm just not having any luck.  I've also verified that that Ski-in/Ski-out is the exact string stored in MySQL. I've looked into using esc_attr(), $wpdb->esc_like() and esc_sql() but none have an effect.  Perhaps I'm missing something obvious?


I would like to modify the "pages" section of WordPress dashboard to add this custom column "views" to tell how many times one page was viewed. Is there a way to do this?

Hey all i am trying to find the section within the edit.php page where it populates the table with all my current pages. What i want to do is add another colum to the table in order to launch a side page for changing a picture.    Could anyone point me to the code that populates the table?  Thanks!  David


I have a model which has a bytearray as a property,  public byte[] bytearraytest{ get; set; }   when I get this model via javascript GET request it is a string.  tgwBAQ==   How can i decode it now ?

I have a PHP script that can encode a PNG image to a Base64 string.  I'd like to do the same thing using JavaScript. I know how to open files, but I'm not sure how to do the encoding. I'm not used to working with binary data.


When I go on meta.stackexchange.com and sort by , there is often an item count for the number of featured questions.    Ad then when hovering over the featured tab, the hovering action  produces a slight jump of content, because the red border bottom of the  hover action is shoving content down by 2px.    Perhaps this can be seen more clearly in this screenshot, where it is more  obvious that the border underneath the featured tab has been shoved down and is not vertically aligned with the red border bottom of the "newest" tab.    That being said, I am not able to reproduce this bug on any computer and OS,  but I can say this is happening on my 64-bit Windows 7 machine in Chrome Version 38.0.2125.122 m.  Are others ever having this issue?    There is one way to fix this.  If I change the CSS for the .bounty-indicator-tab by adding a margin-bottom: -1px, the problem goes away.

When I hover over featured tab, both on the front page and in questions, the questions move down by one pixel. Here's a small screen capture demonstrating the issue:        I see it in Chrome 34 and Opera 20, but I don't see it on IE11 or Firefox 28.


I'm a first year engineering student who is new to physics, so I apologize if my question is stupid. But in our statics course we are using the book "Engineering mechanics: statics" by R.C. Hibbeler and it contains the following image:       The astronaut is weightless, for all practical purposes, since she is far removed from the gravitational field of the earth.   Now this conflicts with my previous understanding of weightlessness. I always assumed it was because astronauts are orbiting the earth. But if it's because they are far away from the earth, why would spacecraft spend so much energy to accelerate to such large speeds if it's not really necessary to "stay afloat"?

Well, this question has been puzzling me for kinda long time, many people believe that orbiting astronauts feel weightless because they are "beyond the pull of Earth's gravity"...How far from the Earth would a spacecraft have to travel to be truly beyond the Earth's gravitational influence? If a spacecraft were really unaffected by Earth's gravity would it remain n orbit? If so, what is the real reason for weightlessness in orbit?


I have learnt about BufferedReader as well as BufferedWriter, so I decided to create a small text processor for the command line (meaning without interface, just in cmd/terminal). It asks a user for document name (Which will then create a file) and then user can type sentences. Each time user presses "enter" button, text is entered into the file and new line is created and then allowing user to type more. At the end, it will display a message saying file is created. NOW, I have encountered a problem where user would not be able to stop the process of entering data and creating file, because the program kept creating new lines despite entering nothing or quit keyword(which i stated in the code in order to quit the program.) Here is my original code:  import java.io.*; class TextProcessor { public static void main(String[] args) {     try     {     System.out.println("Please enter name of the file");     BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //User input     String file = in.readLine();     BufferedWriter writer = new BufferedWriter(new FileWriter(file)); //Creating file as well as instance for inputting text to the file.       System.out.println("Enter text");     String line = "";      do     {         line = ins.readLine();         System.out.println(line);         writer.write(line);         System.out.println("Second " + line);         writer.newLine();     }     while(line != "quit()");     //while(line != null);       in.close();     writer.close();       System.out.println("Text is created with entered text");     }     catch(IOException e)     {         System.out.println("Error occured");     } }   }  However, I found a solution to this, which is replacing do-while block with while one:  int counter = 0;     while(counter != 1)     {         line = in.readLine();         writer.write(line);         if(line.equals("quit()"))         {             ++counter;         }         else {writer.newLine();}     }   I have a question about this now, why can't I use do-while statement instead of while, even if it seems logical that the program would work? Thank you for reading this!!!!  P.S. I also wonder if I can bring small improvements to this or any other way creating this type of program. Thanks if you give feedback!

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


For example, I have a variable:  env_name="GOPATH"   Now I want to get the environment variable GOPATH as if like this:  echo $GOPATH   How can I get $GOPATH by $env_name?

I need to indirectly reference a variable in the bash shell.  I basically want to what you can do in make by writing $($(var)).  I have tried using ${$var} which would be the most straight forward solution in bash but then I get this error:  bash: ${$var}: bad substitution   Is there a way to do this?  What I am trying to do is to iterate over all the arguments ($1, $2, $3, ...) to a program using an iteration variable and I cannot do this without indirection.


Currently there is an incentive to post a question in a specific minute of the hour (the first, for the record).  In order to do, I posted,  which was around 15 seconds past the top of the hour (which was 7pm in New York) according to my nptd synchronised PC.  After waiting patiently for a day my reaction to the gamification on SE had still not earned it's reward - and I'm as Mad as a Hatter (and not a "Hero of Time") but not so Mad I cannot wait until 7pm in Tokyo...  Question: just how accurate is the Stack Exchange time-keeping?

Timezones... are complicated. We have full hour offsets, half hour offsets...  And time keeping isn't always accurate. So does the Hero Of Time hat assume full or half hour offsets (or literally any timezone) and how close to 7:00 at somewhere do I have to post for my hat?


Here is my question: perf stat will show some info for program running. Below is my program running on a Linux system with Intel 32 cores, my program have 32 threads. Performance counter stats for './mul8_t32_lock/dfc_main':       2,527,620.62 msec task-clock                #   27.051 CPUs utilized         5,382,455      context-switches          #    0.002 M/sec           322,153      cpu-migrations            #    0.127 K/sec         6,728,473      page-faults               #    0.003 M/sec 5,773,817,446,711      cycles                    #    2.284 GHz 8,504,327,916,051      instructions              #    1.47  insn per cycle   358,700,135,637      branches                  #  141.912 M/sec       952,042,974      branch-misses             #    0.27% of all branches       93.438474548 seconds time elapsed     2482.333923000 seconds user      66.839344000 seconds sys  So, why is the seconds user + seconds sys do not equal seconds time elapsed? And, I want to know the real meaning of the seconds user and seconds sys.

$ time foo real        0m0.003s user        0m0.000s sys         0m0.004s $   What do 'real', 'user' and 'sys' mean in the output of time?  Which one is meaningful when benchmarking my app?


What encryption is used in a default Ubuntu full hard drive encryption and is it possible to specify another?

I previously had been using TrueCrypt, but recently re-installed Ubuntu and used 12.10's full disk encryption option (re-installed for other reasons). I never got any choice in how it did that. I don't know what cipher is used or the key size, or anything besides the passphrase really. Where can I find details about this sda5_crypt?  Edit: Seeing this mistake is humorous, but for those curious, sda5 refers to the hard drive and partition, not the encryption system.


When this  was asked in 2012, specifically mentioning the "command line" requirement, an  suggested  (a "legacy" product). Running all three, Temperature Monitor along with  and , side-by-side shows the problem. I don't want this level of perpetual distraction.    I suspect the following answer: It is not possible to see the CPU&GPU temperatures from the command line. I suspect this because both iStat and Temperature Monitor install additional drivers. If that's the case, it would be nice to record that answer.   and  are nice utilities to make you keep an eye on the temperature of your CPU. The former shows only the CPU temperature, and both are too distracting (the latter's precursor, iStat Nano, could sit silently in the Dashboard until one needed it, plus iStat Menu seems rather sticky: I haven't figured out how to delete it yet—just removing the program from /Applications is insufficient.)  It was nice to find that  will reveal the Maximum Capacity of a battery (in contrast to the static Design Capacity, the Maximum Capacity signals the health of the battery). Using a program (such as ) is not necessary.  A  (still using ioreg) will reveal the battery temperature     AppleSmartBattery Temperature:    30 °C   62.0 °F   and so I'm hoping for a renewed answer in 2017 to the following question.  How can I view the CPU temperature from the command line? It would especially be nice to also see the GPU temperature. OS X just crashed and rebooted on its own, and the Console logs ("Event: GPU Reset" and "GPU HangState 0x00000000") suggest that the GPU might be the culprit. I'm trying to determine if it's time to reapply the thermal paste and reattach the heatsinks (never done this before; not even sure it's within my ability).

Is there a command I can run from the command line in OS X to get the current CPU temperature and/or the fan speed(s)?  To be more specific, I'd like to be able to get the same info available in the  under the Fans and Temps tabs on the command line.   I'd like to be able to find these values at the command line so it could be scripted and plugged into a monitoring setup on my Mac - I have a data-nerd desire to collect and graph these values (and other stats) on my Macbook over time.  On Linux, it seems like this would be possible by reading a pseudo-file under the /proc directory, but I'm not sure how to do the equivalent on OS X (if it exists).


There is a statement.  Let $R$ be an integral domain and let $M$ be a free $R$-module of rank $n<\infty$. Then any $n+1$ elements of $M$ are $R$-linearly dependent. (This is extracted from the book 'Abstract Algebra' written by David S. Dummit and Richard M. Foote.)  Let's make the condition weaker as we assume $R$ is commutative ring with unity. Then, what is an example that the number of linearly independent element of $M$ exceeds the rank?

Let $R$ be a commutative ring and $M$ be a free $R$-module. Since $R$ is commutative, $R$ has the IBN property, hence the rank of $M$ is uniquely well-defined. So set $n:=\mathrm{rank}(M)$.      Let $A$ be an $R$-linearly independent subset of $M$. What is an example of $A$ such that $|A|>n$?   If $R$ is a division ring, it must be $|A|≦n$, but if $R$ is commutative, I think it is possible that $|A|>n$.


I'm trying to understand memory management in CPython but I don't fully understand the following terms: runtime stack, stack memory space, and stack data structure. I have a basic idea in what these terms mean but I don't fully understand their relationship. I mean, is the runtime stack a stack data structure, which lives on the stack memory space? Or are all three terms mutually exclusive?   I've read that all objects go on the heap space, but the VM is "stack-based". Does this mean that "something" lives on the memory stack space?

Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?


can any one help me out with this two in methods javaScript a is resulting as [0,NaN,0,0,0] and b is resulting as [0,0,0,0,0] why a is having NaN in a array?    var a =new Array(5).fill('0').map(parseInt); console.log(a); var b =new Array(5).fill('0').map(parseFloat); console.log(b);

From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]


Some places I've read flat out say light actually slows down in a medium, some say the speed decresae is just apparent but not real and that the photons still travel at the constant speed of light.  I'm kinda confused.

So light travels slower in glass (for example) than in a vacuum. What causes light to slow down? Or: How does it slow down? If light passes through the medium, is it not essentially traveling in the "vacuum" between the atoms?


The question states the following: Prove that the system $x \equiv a \bmod m, x \equiv b \bmod n$ has solution iff $\gcd(m,n) \vert a-b.$ The first implication is immediate since $x-a = km,x-b=qn$, hence subtracting both expressions we get that $a-b = qn - km$, $a-b \in (m,n)$, $\gcd(m,n) \mid (a-b)$. However, I don't know how to prove the reciprocal. Any suggestions?

We want to find the solution $x$ to the congruence system  $$\begin{align} x &\equiv r_1 \!\!\!\pmod{\!m_1}\\ x &\equiv r_2 \!\!\!\pmod{\!m_2}\end{align},\ \ {\rm where}\ \  \gcd(m_1, m_2) = 1$$  These can be rewritten as  $$\begin{align} x &= r_1 + m_1 j\\ x &= r_2 - m_2k\end{align}$$  for unknown integers $j, k$. So we set those two equations as equal and rearrange them to  $$m_1j + m_2k = r_2 - r_1$$  Now assume we perform $\text{egcd}(m_1, m_2)$, which gives us the solution to  $$m_1u + m_2v = \gcd(m_1, m_2)$$  Let the integer $\,h\,$ make $\,h \gcd(m_1, m_2) = r_2 - r_1$.  Then $\qquad hm_1u + hm_2v = h\gcd(m_1, m_2) =  r_2 - r_1 = m_1j + m_2k$  At this point I am lost because I don't think we can just assume  $hm_1u = m_1j$ and extract $j = hu$.   How do I get the values of $j$ or $k$ so I can get the value of $x$?


What is the difference between the  .bbl  file produced by Biber versus Bibtex?   The problem is that arXiv.org doesn't work with the  .bbl  file produced by Biber but it does work with the Bibtex output. Is there any way around this issue?

I am a LaTeX really entusiastic newbie. Thus I am writing all my reports and articles using this wonderful tool. Unfortunately the editors of scientific review do not all have the same entusiasm concerning LaTeX. I plan to submit my future paper in the ICES Journal of Science which (fortunately or not) has a kind of LaTeX template available online () and guidelines available here ().   My main problem is concerning bibliography. In all my writing I use biblatex with in the preamble:  \usepackage[style=authoryear, firstinits=true, uniquename=false, uniquelist=false, maxcitenames=2, maxbibnames=7, backend=biber]{biblatex}.   In the text I call citation using \autocite, \textcite, \citeauthor and \citeyear.   As requested by the journal I tried to convert my bibliography into a \bibitem list. I went to check the .bbl file as advised online but the structure seemed really complicated and nowhere \bibitem was mentionned. I found online some method that I managed to make work in my case by creating a dummy .tex file:  \documentclass{article} \begin{document} \nocite{*} sdryfj \bibliography{BIB.testbib.bib} \bibliographystyle{plain} \cite{NumR} \end{document}   I run some compilation and got a .bbl file with \bibitems list. I thought I was seeing the end of it and paste this list in thebibliography environment at the end of my document.   Unfortunately all my citations references (\autocite etc..) seems to not be compatible with this different way of bibliography input. In addition, all the references are printed cited or not....  I was wondering if there is a way to reach the same results directly from biber biblatex so I would not have to modify my document too much...  Thank you for your help,  Xochitl C.  PS: I also tried to redefine commands like this but it did not work:  \renewcommand{\autocite}{\cite}  \renewcommand{\citeauthor}{\cite}  \renewcommand{\citeyear}{\cite}  \renewcommand{\textcite}{\cite}


In the Chrome Javascript Console I type the following:  3.1 * 3.68   And the result returned is:  11.408000000000001   Why is the result not:  11.408

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


Recently Japanese scientist won Nobel Prize in Medicine for "Autophagy".  Can someone explain what autophagy is?

What is autophagy? How and under which circumstances is it used by the cell? I believe The reason for autophagy is some kind of recycling, am I right? But why does it occur in infections?


I have tried to remove and install texlive on my PC with Ubuntu 14 (64 bit). But the version that is installed is 2013. Can anybody tell me why?

The TeX live installation bundled with TeXmaker in ubuntu (Xubuntu 11.10) is ancient and was breaking the acronym package (and who knows what else) so I though I'd update by installing using tl-install direct from CTAN.  But after removing TeXmaker through ubuntu software centre and installing the new copy, I still have a whole Tex live install under /usr/bin, and the new install under /usr/local/texlive/2013/bin/x86_64-linux.  Although I've added the latter location to my path (as prompted by tl-install), which pdflatex still tells me it's using the copy in /usr/bin.  I need a way of forcing the new version to be used.  It took 3 hours maxing out my bandwidth to install, so removing all packages with tex in the name (or similar) and reinstalling isn't really an option.  I don't have to uninstall all the old stuff - I'm not short of disk space.    The easiest way is presumably to delete all the tex-related binaries in /usr/bin - but how do I find them all?


"I just want to confirm that I could be included in the committee although I am no longer affiliated with the university"   Is the sentence above correct or should I use "can" instead of "could"?

When should I use can? When should I use could? What is right under what context?


In my Dispose method I am disposing everything a Dataset has as below:  foreach (DataTable myTable in this.Tables) {     myTable.Dispose(); }   Here this.Tables is public DataTableCollection Tables { get; }  I am having around 56 tables in this.Tables when it comes near to this call.  It works fine for few tables but suddenly it throws:     System.InvalidOperationException:    Collection modified error   I am not sure why is this happening.  I tried to search for this exception a lot but i could not fine why it is breaking in my application.  May be because of threading? or I need to convert it to a list?

I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur.  Collection was modified; enumeration operation may not execute  Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers() is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows Forms client subscribes, the subscriber ID is added to the subscribers dictionary, and when the client unsubscribes, it is deleted from the dictionary. The error happens when (or after) a client unsubscribes. It appears that the next time the NotifySubscribers() method is called, the foreach() loop fails with the error in the subject line. The method writes the error into the application log as shown in the code below. When a debugger is attached and a client unsubscribes, the code executes fine. Do you see a problem with this code? Do I need to make the dictionary thread-safe? [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class SubscriptionServer : ISubscriptionServer {     private static IDictionary<Guid, Subscriber> subscribers;      public SubscriptionServer()     {                     subscribers = new Dictionary<Guid, Subscriber>();     }      public void NotifySubscribers(DataRecord sr)     {         foreach(Subscriber s in subscribers.Values)         {             try             {                 s.Callback.SignalData(sr);             }             catch (Exception e)             {                 DCS.WriteToApplicationLog(e.Message,                    System.Diagnostics.EventLogEntryType.Error);                  UnsubscribeEvent(s.ClientId);             }         }     }          public Guid SubscribeEvent(string clientDescription)     {         Subscriber subscriber = new Subscriber();         subscriber.Callback = OperationContext.Current.                 GetCallbackChannel<IDCSCallback>();          subscribers.Add(subscriber.ClientId, subscriber);                  return subscriber.ClientId;     }      public void UnsubscribeEvent(Guid clientId)     {         try         {             subscribers.Remove(clientId);         }         catch(Exception e)         {             System.Diagnostics.Debug.WriteLine("Unsubscribe Error " +                      e.Message);         }     } }


Under the frequentist framework, one can use power analysis to determine sample size for a given effect size, significance level, and power. How are similar questions answered under Bayesian framework?

I am currently doing Bayesian Inference by using the BayesAB R library. I've observed that that sample size has a big impact on the posterior distribution.  When doing Frequentist Hypothesis Testing it seems that everyone agrees on how to determine the minimum sample size required to observe a certain effect based on the power of the experiment.  However, is this a valid approach when using Bayesian Inference? If not, is there something equivalent for Bayesian Hypothesis testing?