Let $M$ be a maximal ideal in a ring $R$. Prove that any prime ideal of $R[x]$ properly containing $M[x]$ is a maximal ideal of $R[x]$.   Help me some hints

I want to prove the following result:      Let $R$ be a ring and $M$ a maximal ideal in $R$. If $P$ is a prime ideal in $R[x]$ that (strictly) contains $M[x]$, then $P$ is a maximal ideal in $R[x]$.    I have an idea how to prove that, but I'm not quite sure if the argument is totally valid; maybe someone has a cleaner proof. My argument is like that:   $R[x]/M[x]$ is isomorphic to $(R/M)[x]$, that is a PID (since $R/M$ is a field). So, any prime ideal in this ring is maximal; If $P$ contains $M[x]$, then $P$ corresponds to a (prime??) ideal in $R[x]/M[x]$ (this needs more clarification); The prime ideal (that corresponds to $P$) in $R[x]/M[x]$ is then maximal, and this guarantees that $P$ is maximal in $R[x]$.   I'll appreciate any comment.


How many ways are there to put two black rooks on a 8x8 chessboard so that they don't attack each other? There are several ways that these two could be placed, and I am wondering how many amount of positions there are. Thank you for any contribution.

In how many different ways can we place $8$ identical rooks on a chess board so that no two of them attack each other?  I tried to draw diagrams onto a $8\times8$ square but I'm only getting $16$ ways.  Does that sound right?  Thanks for the help!


My early 2015 macbook pro battery has had the "service battery" warning for over a year now. I hit the 900 cycle mark before last summer, and now I'm at about 1000. The battery lasts for < 1 hour, but I rarely use it without plugging it in to the power nowadays. I'm going to get the battery changed sometime in the next couple of months -- it's difficult for me to be without my mac for an extended period of time at the moment. With that said, I've noticed that my macbook performance isn't as great as before. It seems slower and hotter even though I'm using it while plugged in to the power outlet. Does a deteriorated battery affect performance of the mac when it is plugged in to a power supply?

I have old MacBook Pro that has a dead battery.  It is not charging, and displays always 0% battery charge. OS X is downgrading performance when battery level is close to something about 5% or 10%. Is that possible to turn off this feature, to be able to use its 100% performance without exchanging battery to new?


My system is taking way too long to boot up since I installed ubuntu. I have a dual boot with windows 10 on a reasonably fast notebook. After selecting the OS on the grub menu, it goes to a purple screen and stays on it for a long time.  So I did what was suggested  and enabled messaging to see what the system was doing. But the messages take way too long to show up as well.  Here's the output of my systemd-analyze blame:       51.299s dev-sda7.device      32.721s systemd-journal-flush.service      28.578s dev-loop1.device      28.171s dev-loop3.device      27.975s dev-loop0.device      27.944s dev-loop2.device      27.911s dev-loop4.device      20.064s systemd-sysctl.service      18.802s dev-loop5.device      18.610s systemd-udevd.service      18.514s dev-loop6.device      18.023s dev-loop7.device      15.873s snap-gnome\x2dcalculator-180.mount      15.196s user@1000.service      14.727s snap-core-4917.mount      13.695s snap-gnome\x2dsystem\x2dmonitor-51.mount      13.433s NetworkManager-wait-online.service      12.623s snap-gnome\x2dlogs-37.mount      11.263s snap-gtk\x2dcommon\x2dthemes-319.mount      11.219s snap-gnome\x2d3\x2d26\x2d1604-70.mount      11.208s snap-core-5145.mount       9.864s ModemManager.service       7.825s snapd.service   And here is the output of systemd-analyze time  Startup finished in 49.498s (firmware) + 5min 14.605s (loader) + 5.855s (kernel) + 1min 21.736s (userspace) = 7min 31.696s   So i guess my problem is with the loader. Any ideas?

After booting I ran systemd-analyze blame and here are the results:       21.596s systemd-journal-flush.service      18.658s dev-sda8.device      15.099s dev-loop33.device      15.034s dev-loop19.device      15.012s dev-loop34.device      14.989s dev-loop21.device      14.877s dev-loop15.device      14.866s dev-loop26.device      14.773s dev-loop27.device      14.684s dev-loop30.device      14.677s dev-loop32.device      14.649s dev-loop35.device      14.590s dev-loop25.device      14.267s dev-loop23.device      14.192s dev-loop24.device      14.156s dev-loop29.device      14.133s dev-loop16.device      14.065s dev-loop31.device      14.059s dev-loop28.device      13.821s dev-loop20.device      13.531s dev-loop22.device      13.495s dev-loop14.device      13.364s dev-loop18.device   What are these dev-loopxx.device (xx denotes numbers) services and why are they taking so much time? Are they related to the mounting of snaps? Can I reduce the boot time by disabling them? I'm running Ubuntu 18.04 alongside Windows 10.


I have been using my MacBook Pro for nearly 2 years. I have no problem using iMessages both on my iPhone and Mac. However, today, I can't seem to be able to send any messages out from my Mac. There is no problem on my phone. Also, I cannot use FaceTime on my Mac.  I reviewed through the internet for some solutions, but nothing seems to work, such as deleting files, changing setting on the Flash Player.  How can I resolve this issue?

On my OSX laptop (10.8.5) I've recently been unable to sign into iMessage. By recently I mean approximately a week. I've not done any updates that I recall lately.  Coworkers are able to send me messages and my phone gets the messages directly over iMessage, so my account is working on this network (wifi and wired go through the same set of equipment out to the internet, so it's not a port blocking issue, and we're a small network of about 50 users) and my account is working in general.  I can login to  just fine from my computer. I'm logging into the computer and my phone with the same gmail address and password in both places.  Next steps?  One solution on the internet was "do you have a serial number in "About This Mac" and I do.


I've got two tables conatining geometry: 1 containing big polygon's (regions, srid=4326) and another containing smaller polygon's (pand, srid=28992, containg ~9.9milion rows)  By using one of the big polygons, I want to find all the smaller polygons withing the bigger polygon. In the end I want the result set to be grouped by a column. But now I just want to count the number of rows (=number of objects within the big region)  This is the query I use at the moment:  WITH regio AS (  SELECT ST_Transform(the_geom,28992) as the_geom                   FROM public.regions WHERE gid = 622               ) SELECT    count(*) AS count FROM public.smaller AS p WHERE     ST_Within ( p.geovlak,                  (SELECT the_geom FROM regio)               )   But somehow this query takes ages to complete. This is the Queryplan:  Aggregate  (cost=3018553.41..3018553.42 rows=1 width=0)   CTE regio     ->  Index Scan using regions_prim_key_gid2 on regions  (cost=0.28..8.29 rows=1 width=1458)           Index Cond: (gid = 622)   InitPlan 2 (returns $1)     ->  CTE Scan on regio  (cost=0.00..0.02 rows=1 width=32)     ->  Seq Scan on smaller p  (cost=0.00..3010265.32 rows=3311910 width=0)         Filter: st_within(geovlak, $1)   I'm no expert in reading these queryplans; but the second to last row says there are ~3.3 rows instead of the ~9.9. So there is already some filtering in place. But 1 - what filtering is this? And 2 - I can't figure out where the problem in this query lies.  When changing the count(*) to a * and limit the result to 10; the query takes 99seconds to run, so that's also not fast enough. I can understand it takes some time, but it is still running :(  Spatial indexes:     CREATE INDEX smaller_geom_idx   ON smaller   USING gist   (geovlak);

I imported the data from openstreetmap using osm2pgsql and copied it another table structure. If I made a query for containing rows using st_intersects, st_contain or someone else, postgis don't use the gist-INDEX. Always a seq-scan will be made. If I filter the rows first using the &&-operator (bbox of geometries), postgis uses the gist-index for the postgis functions. I don't understand why, where is the problem and how can I change this.  Here I've created a simplified table of the original (you can also use a planet_osm_polygon for queries):  CREATE TABLE osm_addr2 (osm_id bigint, geometry geometry); CREATE INDEX osm_addr2_geom ON osm_addr2 USING gist (geometry);   Here I created a very simple example query:  EXPLAIN ANALYSE SELECT * FROM osm_addr2 AS addr  WHERE -- addr.geometry && (SELECT geometry FROM osm_addr2 WHERE osm_id=-332537) AND    st_intersects(addr.geometry, (SELECT geometry FROM osm_addr2 WHERE osm_id=-332537));   Using st_intersects only, I have the following result (first line only):  Seq Scan on osm_addr2 addr  (cost=24.50..336.10 rows=387 width=40) (actual time=0.001..0.001 rows=0 loops=1)  If I uncomment the &&-operator the index will be used  (first line only):  Index Scan using osm_addr2_geom on osm_addr2 addr  (cost=49.15..57.41 rows=1 width=40) (actual time=0.031..0.031 rows=0 loops=1)  I'm using postgresql 9.3 with postgis 2.1, see postgis_full_version():  POSTGIS="2.1.4 r12966" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.8.0" LIBJSON="UNKNOWN" RASTER  I can reproduce this on Ubuntu 14.04 and Debian 7. I hope anyone can help because using the intersection operator will inflate my queries.


I have a table with 100 entries for example. Now, as soon as the user clicks on a button, all table-entries (tr-tag) should hide and only 20. to 29. tr should be shown.  How can I do that?  What I found out: $('table tbody tr').eq(20).show();  This jQuery snippet finds me the 20th element of the table, but how can I tell jQuery, show 20-29? I don't want to hardcode it.

      ...      ...      ...      ...      ...      ...
   If you wanted to select the 2nd, 3rd and 4th a tags in the above example, how would you do that? The only thing I can think of is:  $("#myDiv a:eq(1), #myDiv a:eq(2), #myDiv a:eq(3)")   But that doesn't look to be very efficient or pretty. I guess you could also select ALL the as and then do run .each over them, but that could get very inefficient if there were a lot more as.


Construct a bijection between $[1,2]$ and $[3,5)$.  So what I usually do if I pair the two outer number together to each other so like $3=1m+b$ and $5=2m+b$ and just solve for m and b but since 5 is not included, I am not sure how to construct it that makes it still a bijection. Thanks for any help!  Edit: this is not from $(0,1] \rightarrow (0,1)$ and also the brackets are different.

How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &= m(-1)+b \\ 4 = f(2) &= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective.


Assuming their existence, how would I find all instances in which user X answered Y's question? I tried: user:X user:Y but this fails.

I am searching for the questions posted by me (user:139150) that were answered by another user.    His ID is: 55159    There does not seem to be any way to search for posts where both the users are involved.


I have a Dell Precision Tower 5810, and I was trying to install Ubuntu 18.04 on it. I created a bootable usb with Roofus 3.1 in Windows 10 ().  Then tried to follow Dell's guide , but I could not find the file SHIMx64.EFI...  Still I made sure the Secure Boot was enabled, the Legacy Option ROMs was not enabled, and the Boot Option was set to UEFI, pushed my usb stick to the top in the Boot Sequence, and exited.  It booted with no problem to my usb stick, showing the options "Try Ubuntu", "Install Ubuntu", etc. But whichever option I used, led me to a blank screen...  Eventually, thanks to , I added the nomodeset option and I could access the "Try Ubuntu" option... I installed Ubuntu and the installation went through with no problem at all.  Now Ubuntu boots, but the instant the login screen shows up, the screen goes blank (without even letting me type my credentials). I tried pressing the Right Shift key like specified , but to no avail. I checked all the "Similar Questions" suggested, but none of them work.  Note that the first time I booted after the fresh install, I saw a "Perform MOK management" screen with the following options, but I just selected "Continue to boot".  Any clue anyone? I really need this computer working (with Ubuntu 18.04 if possible) asap! Many many thanks.

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


I am writing some code on a minor project for the fourier transform, and I've noticed that this inequality is true, I've also ran across this in textbooks, like Big Rudin, when describing the differentiation property of the fourier transform. However, I can't seem to prove it algebraically even though it makes perfect sense geometrically!  In other words, drawing the circle $e^{ixs}$ and the triangle that is described by the modulus of a complex number, the real and the imaginary lines, this inequality makes sense. But it is proving a bit tricky to show formally.  Of course, all I really need is $|e^{-ixs}-1|\leq |xs|$.  Since then I would have $|\frac{e^{-ixs}-1}{s}|\leq \frac{|xs|}{|s|}=|x|$,  but I don't see it. Any help is appreciated, I'm really curious about this one.

We have been using this result without proof in my class, but I don't know how to prove it. Could someone point me in the right direction?  $$|1-e^{i\theta}|\le|\theta|$$  I believe this is true for all $\theta\in\mathbb{R}$. It is easy to show that the left side is bounded by 2 (triangle inequality), but I'm stuck otherwise.


How can we decide which of the following elliptic curves over $\mathbb{Q}$ are isomorphic over $\mathbb{Q}$? $$E_1:y^2=x^3+1$$ $$E_2:y^2=x^3+2$$ $$E_3:y^2=x^3+x+1$$

If two elliptic curves share the same j-invariant then they may not be isomorphic to each other over $\mathbb{Q}$.  Example:     $E_1: y^2 = x^3 + x$      j-inavriat: $1728$      Torsion points: $[(0 : 0 : 1), (0 : 1 : 0)]$      Rank $0$.   $ $     $E_2: y^2 = x^3 + 3 x$      j-inavriat: $1728$      Torsion points: $[(0 : 0 : 1), (0 : 1 : 0)]$      Rank $1$ - generator point $[(1 : 2 : 1)]$   Is there some other invariant or can we define a new type of invariant that if two elliptic curves share the same such invariant then they are isomorphic over $\mathbb{Q}$?  (they can be birationally transformed to each other over $\mathbb{Q}$)


If $n=p_1^{2a_1}p_2^{2a_2}...p_n^{2a_n}$  Number of divisors of $n$:  $(2a_1+1)(2a_2+1)...(2a_n+1)$  I saw an other similar question, but it is complicated. There should be an more easy answer.

Is this proof that $m$ is a perfect square iff $m$ has an odd number of divisors correct?  $\Rightarrow)$ If $m$ is a perfect square there is an $x$ such that $x = m/x$.   The rest of the divisors come in pairs $d, m/d$, so $m$ has an odd number of divisors. $\Leftarrow)$ Again, divisors come in pairs $m, m/d$   If there are an odd number of divisors, then necessarily $m/d = d$ for some divisor $d$, so $m$ is a square.


Is there a word that describes a saying which states one thing in order to make the point (clearly known by all) that the opposite is true? For example, my brother is sitting in front of a once-full-now-empty plate, and I say, "You weren't hungry, were you?!"

Basically, when someone says something along the lines of      "I know he's not the smartest person in the world, but he should at least pass first grade math."     It's peculiar because they are using a form of hyperbole to say they are not the smartest person in the world, but what they are really implying is that they are not smart at all.  Edit This post was flagged a possible duplicate, I just wanted to clarify that what I am asking is not the nuance or meaning of the phrase, but the term for the idiom itself.  I do not believe this specific question has been asked.  Thanks.


I'm new to Linux. I'm running Ubuntu 18.04 LTS and I want to find additional open source free software packages available for installation.  I tried to add other software sources to the Ubuntu Software applications but after a lengthy process of updating the available applications by downloading updates, the new software repositories don't show and I have the exact same packages available as I always had. I used a repository list generator website to find the URL for the repositories to add.  Obviously I'm doing something stupid? I don't think I yet fully understand how repositories work despite much reading about it. Is it like having multiple Windows Stores? Or multiple Android Google Plays???  Thanks in advance for any help at all which would be greatly appreciated.  johnnym

I keep reading about  ('PPAs') and people answer questions with a link to a PPA. What's the best way to use these?     There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience, an index of each is below.


I recovered a different system's $MFT file to my desktop for data recovery analysis, but the software named it "$MFT" - a reserved system name. Windows refuses to show it in a directory listing (even if I use \\?\ or \\.\ to prefix the path) so I can't rename it or delete it.  The file does exist on my desktop; I can see it in data forensics programs.  How can I rename the file from the CLI or some other way?

I have a song that Windows can't play because there is a question mark in the name of the file.  "Where Have All the Cowboys Gone?.ogg" // as an example   So I try to rename it and Windows complains whether I try it in Explorer or from command prompt.  Error I get when trying to copy, rename, or move is:     The Filename, directory name, or volume label syntax is incorrect   Is there a Windows way to force a rename in this case?   Update  I'll keep an eye on this question, but after 13 answers and many attempts (aside form 3rd party solutions) it seems that Windows can't do this (or at least my windows can't, no short names). So I'm accepting the answer which was my original solution anyway of using Linux. It would be nice to see Windows handle this somehow, so don't stop just because I've accepted this answer, the question still stands!


I will be apply for a short term study visa but my fathers bank statement which I will be using doesn’t show any activity in the past 6 months other than a deposit of 3,000 USD which he got out of an investment. The balance is 21,000 . Is it fine if the bank account isn’t very active ?

I have applied recently for a general visitor visa to the UK to spend 10 days during Christmas with my British unmarried partner and it has been turned down.   The Entry Clearance Officer stated on his refusal notice the following:     I note that you have never previously travelled to the UK or any country with similar immigration requirements and you therefore do not have a history of travel and compliance to consider.      You have submitted an employment letter to confirm your occupation in KSA but I am required to also assess your personal, domestic and economic circumstances in determining whether you are genuine visitor travelling to the UK for the period and purpose you state.      You claim an income of SAR ........ per month which equal ........ GBP and from the evidence submitted this appears to be your sole source of income.   I note that this monthly income is reflected on your bank statements. However, the bank statement you have presented show a recent large deposit that are in excess of your stated income and inconsistent with the account history. You haven't provided evidence toward the origin of this recent deposit and in the absence of reasonable evidence I am not satisfied that these bank statements accurately reflect your personal circumstances.      In view of the above, I am not satisfied you have demonstrated that your circumstances are as you claim and therefore I am not satisfied that you're travelling to the UK for the period and purpose you stated. 41(i)and(ii).   Its true that I have deposited that sum of money right before I apply and it was a commission I received from work earlier this month.   So, could you please give me your advice on the above as I am planning to apply again soon. and how to avoid my application being refused again?


I know that the size of your radio room improves the chance of attracting a new dweller, and Charisma shortens the interval between checks, but does Luck have an effect? Since it helps with caps and rushing production in other rooms, it doesn't sound completely unlikely.

Besides its workplace uses, like Charisma in Living Quarters, Strength in Power Generators, Agility in Diners.   Do we know if Endurance increases HP in the Dwellers, or that strength helps in melee damage / survivability in the wastelands? And Perception?


I'm doing a presentation with a long title, with code like the following  \documentclass{beamer} \usetheme{CambridgeUS} \title{...} \begin{document} ... \end{document}   and it doesn't fit in the middle section of the footnote at the bottom of each slide where titles are included. Is there a way to modify the size of the font within just this part of the footnote or use an abbreviated form of the title without modifying how it appears on my title page?

In a beamer presentation the title is long but ok for the first slide. The problem is that when the title appears below on each slide it is very long and I would like to use here some sort of running or shorter title, how can this be done?


I play a Goliath Valor Bard in a 5e D&D campaign. After a bit of Google searching about valor bards I came across the word of a role called a "Grappler", which Goliaths and bards are apparently good at.  I want to ask you if this combo works:   First round, you try to grapple your enemy Second round, you try to shove your enemy   So now they are grappled and prone   You "order" or ask your melee teammates to position themself on the other side of the enemy Third round you drag your grappled-, prone enemy, so all your teammmates get attack of opportunity   If this works, it means that every teammate other than the grappler (me) gets to attack twice per round.  Would this work, mechanically?

What provokes an opportunity attack?  In 3.X moving out of a threatened square, standing up from prone, casting a spell (unless cast defensively), or making a ranged attack provoked, while in 4e moving out of a threatened square or making a ranged/area attack provoked.


I want to simulate mass distribution code for 10^10 particle of unit mass.   But this code works only if number of particle is 10^8.  long par = 85000000; float p[85000000][2];   and this shows error if size goes to 10^9 or 10^10   "Relocation truncated to fit"   that is  long par = 85000000; float p[85000000][2];   how to find the maximum possible indexing range of float array?  #include <stdio.h> #include <stdlib.h> #include <math.h> #include <sys/time.h>  long double net[4096][4096]; int max = 4000; long par = 85000000; float p[85000000][2];  int main(int argc, char *argv[]) {     int i;     for( i = 0; i < par/1000; i++) {         p[i][0]= ((long double)rand()/(long double)(RAND_MAX) * (long double)max);         p[i][1]= ((long double)rand()/(long double)(RAND_MAX) * (long double)max);     }      clock_t begin = clock();      for ( i = 0; i < par/1000; i++) {         double x = p[i][0];         double y = p[i][1];          int left = (int)floor(x);         int right = left + 1;          if ( left >= 4095)             printf("out of bound left is %d/n", left);          int bottom = (int)floor(y);         int top = bottom +1;          double fL = x - left;         double fR = 1 - fL;          double fB = y - bottom;         double fT = 1 - fB;          net[left][bottom]   =   net[left][bottom]   +( fT * fR ) ;         net[right][bottom]  =   net[right][bottom]  +( fT * fL ) ;         net[left][top]      =   net[left][top]      +( fB * fR ) ;         net[right][top]     =   net[right][top]     +( fB * fL ) ;     }      clock_t close = clock();      FILE *f = fopen("file.txt", "a");     if (!f) {             printf("Error opening file!\n");             exit(1);     }      fprintf (f,"Computation time for grid size %d X %d and %ld particle is "         "%4.6lf ,\n",max, max,par,(double)(close-begin) );      fclose(f); }

The following code is generating a stack overflow error for me  int main(int argc, char* argv[]) {     int sieve[2000000];     return 0; }   How do I get around this? I am using Turbo C++ but would like to keep my code in C  EDIT:  Thanks for the advice.  The code above was only for example, I actually declare the array in a function and not in sub main.  Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes.  Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable.


Is there any difference between the two regexes?    isFunctionKey(funKey) {   return /^('funKey')|([01][1-9]|2[0-4])$/.test(funKey);   }   and    isFunctionKey(funKey) {     return /^(funKey)|([01][1-9]|2[0-4])$/.test(funKey);   }   HINT: Look into return statement funkey; one is in quotes and the other is not.

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


i'm not sure about something and that's why asking i want a process to run every 19th of the month in 2am   i don't want the cron to run after that time or before and only when the date is 19th - in every month and in every year  is that the right code?  2 0 19  * * /usr/local/ss/script.sh 2>&1 > /dev/null &   i just want to make sure

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I would like to prove the following.     Let $\mathfrak{a}$ be an ideal in a commutative ring, $R$, with the property that $\mathfrak{a}$ is not finitely generated but every ideal properly containing $\mathfrak{a}$ is finitely generated then in fact $\mathfrak{a}$ is a prime ideal.   My idea is to try contradiction.   So suppose there are $a,b\in R$ with $ab\in \mathfrak{a}$ but $a, b\notin \mathfrak{a}$. Then $(a)+\mathfrak{a}$ and $(b)+\mathfrak{a}$ are ideals that properly contain $\mathfrak{a}$ and so they are finitely generated. However, at this point I'm not really sure what I should do next.  Thanks for any help!

I've been doing some old exam problems and I've come across a problem that I've answered, but my gut is telling me that there's something I'm glossing over.     Let $R$ be a commutative ring with identity and let $U$ be an ideal that is maximal among non-finitely generated ideals of $R$. I wish to show that $U$ is a prime ideal.   Assume that $U$ is not prime. Let $x, y\not\in U$ be such that $xy\in U$. $U$ is contained in a maximal ideal $M$ and $xy\in M$, so either $x$ or $y$ is in $M$; assume $x\in M$. The condition $U\subset M$ then implies that there is a ring homomorphism $$\varphi: R/M\to R/U$$  Since $R/M$ is a field, $\varphi$ is injective. Hence, $\varphi(x)\in U$. This is a contradiction, so $U$ must be prime.  The thing that worries me is that I never explicitly used the hypothesis that $U$ was not finitely generated or the result that $M$ must be finitely generated.


I am writing an article for the first time with Latex, I am using Overleaf as an online editor. I want to avoid unecessary spaces in my article which are the result of figures and adjustment. For example:  We can see how there are many vertical space between the figure and the text, for the next page is the output also in this way:  Solution that I've tried:  Reduce the size of the image: not optimal because it won't be readable Change the float position of the figure from [H] to [h]: it didn't fix the problem, spaces still persist The code used for the first figure and text is :      \begin{figure}[H]     \begin{center}     \setlength{\belowcaptionskip}{0pt}     \includegraphics[scale=0.8]{images/comparison2.png}     \centering     \caption{ORKG Interface for comparison between contribution}     \vspace{-1.5em}     \label{fig18}     \end{center}     \end{figure}      \noindent{ORKG allows users to specify the structure of type's composition to describe research contributions. Templates are used to facilitate the organization of data by adding, editing or deleting attributes and their allocated information. For example, \autoref{fig19} highlights the specification of the features of describing a dataset:}

I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:  \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure}   to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left?


I'm trying to upgrade to the 10.3 version of ArgGIS (currently, I have Advanced Desktop 10.2). When I go to the download page in my ESRI account, I'm given the option to download ArcGIS for Desktop or ArcGIS Pro    Which one should I download? What's the difference between these two?  I use ArcGIS Advanced Desktop 10.2 to do the following:   network analysis using the Network Analyst tool spatial statistics using Spatial Analyst Lots of tasks processing raster data Extensive python scripting using the arcpy module in python 2.7   Basically I want the one that is the fastest and can do the most while also allowing me to do all the things I currently do in 10.2

After looking through all the stuff that was released or talked about at the Esri UC 2013  I am still genuinely confused by what  is. I will admit that it looks pretty cool, and has , but I just do not know how it is different from ArcMap or ArcGIS Online.  Does anybody have any clearer answers beyond the flashy video and homepage?


Suppose $G$ is the set of functions of the form $f(x) = ax+b$, where $a$ and $b$ are real numbers and $a \ne 0$. Let $*$ denote the operation of composition of functions, $(f * g)(x) = f(g(x))$.  For this question I know have to prove associativity, closure and whatnot. However what I am confused about is what is $g(x)$ in this case. I havent had to prove composition of functions before.

I am tasked to show that the set of affine transformations of ,    Where S is an invertible linear transformation and b is a vector, forms a group under the composition of maps.   It was easy to show that   Now I need to show that there is an identity element, and that all elements are invertible such that   Im a little unsure what to do at this point....Can anyone help me on this? Thanks!


I'm retrieve a list of paths stored in a json file, I'm not having trouble receiving the path but I get the error undefined reference to `objectFactory::objList[abi:cxx11]' When i try to add the path to a static vector of the same class. I tried changing the types of both to see if maybe it was an issue where it was looking for a variable with the same name but a different type, but alas the issue remained. I also tried to set the vector to be another vector of the finalized list but that didn't solve the issue. objectFactory.h:  #ifndef PROJECT2DTD_OBJECTFACTORY_H #define PROJECT2DTD_OBJECTFACTORY_H #include <vector> #include <string> #include <fstream> #include <nlohmann/json.hpp>  class objectFactory { public:     static void genObjList(); private:     static std::vector<std::string> objList; };  #endif //PROJECT2DTD_OBJECTFACTORY_H  objectFactory.cpp #include <iostream> #include "objectFactory.h" using json = nlohmann::json;  void objectFactory::genObjList() {     auto file = json::parse(std::fstream("assets/objects/objectList.json"))["objects"];//[0]["path"]     for(auto i = 0; i != file.size(); ++i) {         auto path = file[i]["path"].get<std::string>();         objList.emplace_back(path);     } }  Does anyone know what I might be doing wrong?

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I have mapped my main domain to a different hosting using NS record.  but I want to map a subdomain on the same hosting. What DNS setting do I need to configure?  Example:  abc.com is mapped to ns1.xyz.com and ns2.xyz.com  but I want subdomain.abc.com to be mapped to same hosting i.e. ns1.abc.com and ns2.abc.com  how do I achieve this scenario?

I have servers hosted at a hosting provider and they also host the DNS records for my domain names. Now I want to add subdomains that are resolved by my own DNS service. So for example:   the hosting provider's name server knows the IP address for econemon.com one of my servers knows the IP address for ftp.econemon.com   Also,   unknown or undefined subdomains should be routed to the same IP as the parent domain on failure of my DNS service, it would be great if the requests all go to the IP address that is associated with econemon.com, but I'm not sure how that should work.   Now, I've read through the Wikipedia articles on DNS to dust off my knowledge, but the part that leaves me confused is: how does a client know which server to ask for the IP address for ftp.econemon.com? Does it get that information from the hoster? If so, do I have to register the subdomain there (and what would I need my name server for then)?


I installed Ubuntu 12.10 on my computer and decided to go to Windows XP. I inserted the reinstall CD and it just says:     BOOTMGR Missing, click CTRL+ALT+DEL to restart.   The same thing happens with Windows 7. I'm assuming that the BOOTMGR needs to be restored/repaired but I don't know how to do that in Ubuntu. I've read many articles that say to insert the install CD and use the command prompt but seeing as I can't even load the CD that is a problem. So basically my question is, how do I replace/reinstall the BOOTMGR through Ubuntu?

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


I found a pretty old example but it's almost doing exactly what i need to do:   However instead of the current format xxx-xxx-xxxx i'd like to do (xxx) xxx-xxxx  Can someone give me a hand with the script below with this??  $('.telnumber').keyup(function() {     this.value = this.value         .match(/\d*/g).join('')         .match(/(\d{0,3})(\d{0,3})(\d{0,4})/).slice(1).join('-')         .replace(/-*$/g, '');      console.log("this value", this.value); });

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


It's a problem from a high school math book that I've been unable to solve:     Prove using definite integrals that,  $${n \choose 1}-\frac{1}{2}{n \choose 2}+\frac{1}{3}{n \choose 3}-...+(-1)^{n-1}\frac{1}{n}{n \choose n}=1+\frac{1}{2}+\frac{1}{3}+...+\frac{1}{n}$$   I've tried using binomial expansions but to no avail. I cannot see any other approach to it using definite integrals. Although I am not sure if this is true. So, if one cannot prove it, can you please at least give me some numerical evidence of its correctness. A proof will be much better though.

How can I prove $$\sum_{i=1}^{n}(-1)^{i-1}\dbinom{n}{i}\frac{1}{i}=\frac{1}{1}+\frac{1}{2}+....+\frac{1}{n}\quad ?$$ I have tried induction, but it doesn't work.


Sometimes my Mac ends up with a runaway process; a process that's hogging all the CPU. Often it's Firefox, but I've had a few others recently. Normally I don't spot this for a while until I notice my fan is running like crazy. This can kill battery life. Is there any way to effectively be proactively be notified about these processes?    Bonus points if the solution doesn't involve paid-for software. Extra bonus points if I can use an inbuilt facility of OS X.  Note: I'm not looking for how to locate and kill runaway processes; I already know how to to do that with top once I suspect there may be one. I would like to be pro-actively notified that a process has been chewing more than X% cpu for Ys time.

The other day, I was sitting in a coffee shop working, when I looked down to find that 25% of my battery was left.   I looked at my Activity Monitor and saw that the time machine process was going at 90% for a while (as long as I was watching it).   Are there any apps that can notify me if a process is at a certain level for a certain amount of time?


Is there any way to declare a list object of anonymous type. I mean  List<var> someVariable = new List<var>(); someVariable.Add(              new{Name="Krishna",                   Phones = new[] {"555-555-5555", "666-666-6666"}}                 );   This is because I need to create a collection at runtime.

In C# 3.0 you can create anonymous class with the following syntax  var o = new { Id = 1, Name = "Foo" };   Is there a way to add these anonymous class to a generic list?  Example:  var o = new { Id = 1, Name = "Foo" }; var o1 = new { Id = 2, Name = "Bar" };  List<var> list = new List<var>(); list.Add(o); list.Add(o1);   Another Example:  List<var> list = new List<var>();  while (....) {     ....     list.Add(new {Id = x, Name = y});     .... }


It is not a good idea to break mathematical insertions in text.  It happens in this example:  \documentclass{report} \begin{document} dfasfsd asdfsdafds asdfsdfds gdsds sfsdd ssfsd  wwer sfdsf ggfh dh dgfdd $r=0.1$ sdfsd sdfdsf asgg sdfsdf a a sfsdf. \end{document}     How to do our best to preserve mathematical insertions on one line? Is there anything more handy than manually wrapping the troubled place in mbox?

I hope this question was not asked before. At least I haven't found it. I have an inline math equation and LaTeX is breaking it into two parts. In this case I'd prefer to have the whole and short equation in one line. Is there any way I can do that? I already tried to put it into a \mbox but that destroyed the whole layout. Here is an example:  \documentclass{minimal} \usepackage{siunitx} \begin{document} A text with an inline equation which is broken in to two parts but is not wanted right here $v_{initial} = \SI{1000}{m/s}$. \end{document}   Here the result would be:  A text with an inline equation which is broken in to two parts but is not wanted right here v_{initial} = 1000m/s.


I want to add some data from a postgresql table to a text file. But already some data is present in the file. I do not want to delete that data. Is it possible? The questions asked earlier were the one in which the table name was dynamic. But in mine, it is not. All I am asking for is to append data. Also, the answer given is for Unix, not windows.

I am executing copy command from a function  execute 'copy (select * from tableName) to ''/tmp/result.txt'''   It works fine. But, tableName is dynamic and will be having more tables (iterating in a loop). result.txt is having only the last iteration (table) data.   I could do, if I had to, via the command line with \o or >> by appending to a file. But, I have to use the function.  I read .  It suggests a solution using temporary tables. Can I do something similar, but without temp tables? (I must avoid archive logs).  Will creating a temp table create archive logs?  Is there any way to do appending with copy command in a function?


Someone , but it's not possible to click their name to view their profile. Why is that?  I've seen this sort of thing when a user has been deleted. But I looked at this answer literally one minute after it was posted. Could the user have been deleted within that one minute? It seems unlikely.

Occasionally I will see a post with the author displayed like this:    The username is not clickable, but I don't know of any way to make a profile "private."  So is this just an anonymous user who only entered a name when asking the question (can you do that)?


I am a beginner to java. I developed a Java code to compare whether two user input Strings contain similar characters at equal frequencies and print them to the screen. But it shows a run time error ( ArrayOutOfBoundException ) during the compilation process. Help me to find the error.  import java.util.Scanner;  public class Checker {          public static void main(String[] args) {          Scanner scan = new Scanner(System.in);         String x = scan.next();         String y = scan.next();          boolean anws = similarCharctr(x, y);           System.out.println( (anws) ? "Similar" : "Dissimilar" );     }              static boolean similarCharctr(String x, String y) {         boolean status = false;          if(x.length() == y.length()){            status =  false;         }                         String e = x.toUpperCase();             String f = y.toUpperCase();             char c []  = new char[e.length()];            char d []  = new char[f.length()];             for(int i = 0; i<c.length; i++){                c[i] = e.charAt(i);                d[i] = f.charAt(i);            }                for(int j = 0; j< (c.length - 1); j++){                  for(int i = 0; i< c.length; i++){                      if( c[j] >c[i+1])                     {                         char temp;                            temp =   c[j];                        c[j] = c[i+1];                        c[i+1] = temp;                          char temp1;                            temp1 =   d[j];                        d[j] = d[i+1];                        d[i+1] = temp1;                        }            }            }                for(int i = 0; i< c.length; i++){                  if(c[i] == d[i]){                       status = true;                 }                     else{                      status = false;                 }                }             return status;                  }         }

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?


I am going to travel alone to the UK for holidays and am a student. My sponsors are my FATHER and my COUSIN. I have a doubt regarding what option in the application form to select for this question:    Who will pay towards your trip?     And there is only one option to be selected. My FATHER will be buying air tickets and take responsibility of all expenses till I reach UK and My COUSIN will pay for everything while I am in the UK.    So what option should I select: Father or Cousin?

On the "Employment and Income" section of the visa application, the following questions are listed:   What is the cost to you personally of your trip in GBP(£)? The total amount of money you have for this trip How much will they [the person paying for my trip] be paying towards your trip (in GBP £)? What is the total amount in GBP(£)?   My Father will be paying for the whole trip for me, so I assume No 3. will be how much he will be paying me - £1,500 I don't need much money because I will be hosted by the friend I am visiting, so I just need money for the flight (£533) and some extra to spend on various non-essential things. Food and accommodation will be free for me).  Also, I assume the total amount (No 4.) will be £1,500 too, because that's the amount of money I'll be spending overall.   However, is it OK for me to answer No 1 and 2 with £0?


I expect true return value that match condition below :   Only binary number (0 or 1) Length not more than 8   I'm new to regex, i have googling and read JS RegExp from  but still i don't get it.  I've tried  /[0-1]$/   but still didn't match the condition above  I expect boolean return from regex test if there is contain no other number except 0 or 1 and length not more than 8.  data: {   binRegExp: /[0-1]$/,   isBinary: false,   binNum: '', // get value from user input }, computed: {   inputCheck(){     return this.isBinary = this.binRegExp.test(this.binNum)   } }   code above is vue js  If there is solution, please answer below. Thank you

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


Can I use a strong alcoholic drink (containing mostly water and 40 % of ethyl alcohol) to disinfect the frequently touched surfaces indoors or even packed food items I buy in the supermarket)?   Vodka is still available at the shop, and the proper disinfecting fluid is not. I talked about external usage, I do not even think to drink it. Would it work at least in some degree?

I have ethanol , Reagent Grade 99.8% v/v  can i use this to make hand sanitizer ? is it safe for hand skin ?  I will be  << have a look at that link.  I am planning to dilute the Ethanol with water to get a 65% concentration .  Can i proceed with making the sanitizer ?  Look at the Ethanol specs on the picture below


Is $a_n = \frac{1}{n}+\frac{1}{n+1}+...+\frac{1}{2n}$ convergent? If so find its limit.  Heres what ive tried:  $... < \frac{1}{n}+\frac{1}{n+1}+...+\frac{1}{2n} < \frac{n}{n} = 1$  What should I put on the left side of the inequality? I tried $\frac{n}{2n}$ but that tends to a half and I cant think of solving this in any other way except the squeeze rule.

What is the sum of the 'second half' of the harmonic series?  $$\lim_{k\to\infty}\sum\limits_{n=k+1}^{2k}{\frac{1}{n}} =~ ?$$  More precisely, what is the limit of the above sequence of partial sums?


I am studying linear regression lately and I notice this adjusted r-squared formula in a youtube video: $$adj. R^2 = \frac{\frac{SSE}{n-k}}{\frac{SSTO}{n-1}}$$ While the formula that I know is this: $$adj. R^2 = \frac{\frac{SSE}{n-k-1}}{\frac{SSTO}{n-1}}$$ I was about to comment in the yt vid that something is wrong but some people agree with it.  How come that both formula seems to be applicable? Why does the other one has a n-k degrees of freedom while the other has $n-k-1$?  I'm so confused. I don't think of a way that you can equate the other formula to another formula.

I am studying linear regression lately and I notice this adjusted r-squared formula in a youtube video: $$adj. R^2 = \frac{\frac{SSE}{n-k}}{\frac{SSTO}{n-1}}$$ While the formula that I know is this: $$adj. R^2 = \frac{\frac{SSE}{n-k-1}}{\frac{SSTO}{n-1}}$$ I was about to comment in the yt vid that something is wrong but some people agree with it.  How come that both formula seems to be applicable? Why does the other one has a n-k degrees of freedom while the other has n-k-1?  I'm so confused. I don't think of a way that you can equate the other formula to another formula.


n factorial is product of all numbers between n and 1.  0 factorial is (0 * 1 = 0).  Why is 0 factorial 1?  How can I proof this in mathematical way?

How can I prove  from first principles that $0!$ is equal to $1$?


I want to dual boot windows 8 and linux so, i need to create a separate partition for linux. All i wanted on the new partition is 15gbs. My computer wont let me "shrink volume" to create the partition. I didn't even get a suggested amount to shrink the volume. I can put in my suggested amount but the "Shrink" button is greyed out. According to what i read on a few post it's because i already have 4 partitions? My question is can i delete any of the existing partitions without screwing up windows 8 boot system.   The site won't let be post any images since i'm new.  Anyways, the four partitions showing up in the disk management log are:   Healthy (Recovery Partition)    400mb capacity, 400mb free space. Healthy (EFI System Partition)  100mb capacity, 100mb free space. Healthy (Recovery Partition)    11.72gb capacity, 11.72gb free space.  ACER C/ (Healthy (Boot,Page File,Crash dump etc) 106.91gb capacity, 41.22gb free space.   Any suggestion is appreciated.. Thanks

I would like to install Ubuntu alongside Windows 7 on a HP G62 Notebook. Although I have installed  Ubuntu in a dual-boot many times before, I found out that this model has already four partitions.    Partitions:   SYSTEM (NTFS, 199MB, used 66.59MB) Partition without any tag: NTFS (579GM, used 129GB)  RECOVERY (NTFS 16.74 GB, used 2.42GB)  HP_TOOLS (FAT32, 103.34 MB, used 13.23MB)   Since I am not an expert with partitions I would like to get advice on how to do this.  My first idea is this one:   Free some space from /dev/sda2 (I don't know if could also free some other space) delete the HP_Tools partition (I have already created a backup) create an extended partition with the free space in #1 containing three parititions: swap (1gb); / (EXT4, 30GB);  /home (EXT4, 120GB)   Another option is to use wubi instead.  What do you think? Is there any other way to achieve this?  PS: I really think this HP policy of using 4 partitions is not a coincidence  PS: I tried using gparted from the live CD and I got a warning message saying that if I freed some space from /dev/sda2 I could create serious issues in the system


I'm trying to design a pretty simple simulation civilization game for school. Right now I'm trying to make it so when you click this button on the control bar you make a new hut instance. I will put error report below and code where the error occurs.  Error Report:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at controls.Sidebar.clickBuildHut(Sidebar.java:102) at screen_window.Game_Window.mouseClicked(Game_Window.java:248) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Window.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)   Code where error occurs:  public void newHut() {         numOfHuts++;         hut[numOfHuts] = new Hut(mouseX, mouseY, 0, numOfHuts); }   Hut declaration at top of class:  Hut[] hut = new Hut[9999]; int numOfHuts;   Sidebar.clickBuildHut method:  public boolean clickBuildHut(int mouseX, int mouseY){     if (viewConstruction){         int topLeftX = x + 2;         int topLeftY = y + 50 - 14;         int selectionWidth = width - 10;         int selectionHeight = 17;         for (int i = 0; i <= width; i++) {             for (int h = 0; h <= height; h++) {                 if (mouseX == topLeftX + i && mouseY == topLeftY + h) {                     first_map.setEditMode(true);                     game_window.newHut();                     return true;                 }             }         }     }     return false; }   first_map.setEditMode:  public void setEditMode(boolean editMode) {     this.editMode = editMode; }   Although I don't think that this is the problem because when this is switched to true I see the picture change correctly. If you want me to give you more information on this I can but, I don't think that it would be of any use since it isn't where the problem lies.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I just saw an ad on Twitter that says: "Communicate clearer by drawing and talking over your images".  It seems to me they aren't communicating very clearly and it would be better to phrase their sentence like this: "Communicate more clearly by drawing and talking over your images".  Can you tell me if I am correct and why I am correct or wrong/mistaken please?

Which one of these adjectives is correct? I can see that both of them are being used, I'm just not sure which one is grammatically correct. Are there any general rules to follow as to the use of one against the use of the other?


I have dictionaliy for variables of function. x = {"reverberance":20,"hf_damping":10}  Now I want to give the contents of x to this funciton. def reverb(self,        reverberance=50,        hf_damping=50,        room_scale=100,        stereo_depth=100,        pre_delay=20,        wet_gain=0,        wet_only=False):  What I made for now is, but it doesn't work, because maybe x[key] have to be converted to str? (but if not i can concatenate ) x = {"reverberance":20,"hf_damping":10} arr = [] for key in x:     arr.append(key + "=" + str(x[key]))   reverb(",".join(arr))

I'd like to call a function in python using a dictionary.  Here is some code:  d = dict(param='test')  def f(param):     print(param)  f(d)   This prints {'param': 'test'} but I'd like it to just print test.  I'd like it to work similarly for more parameters:  d = dict(p1=1, p2=2) def f2(p1, p2):     print(p1, p2) f2(d)   Is this possible?


Not sure why this is getting a NullPointerException.  According to error log, NullPointerException is thrown while executing this statement.  "file[i] = loadSaveFile.nextLine()" towards the end of the script.  public class SaveGame { static String[] file; static String loadSaveFile; static String gameDir; static int numLines = 0;  public static void main(String[] args) throws FileNotFoundException {     File saveFile = new File(gameDir + "\\savefile.txt");     Scanner loadSaveFile = new Scanner(saveFile);     Scanner findNumLines = new Scanner(saveFile);     while(findNumLines.hasNext() != false){         findNumLines.nextLine();         numLines++;     }     for (int i = 0; i < numLines; i++) {         file[i] = loadSaveFile.nextLine();         if(loadSaveFile.hasNextLine() == false){             break;         }     } } }


I recently installed Ubuntu 16 alongside windows 10. Now i want to uninstall Ubuntu and without touching windows 10

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


Hello I wanted to build this serial to usb converter with ft323R, but I don't understand the small marked part on the left bottom. I found the same thing in other schematics too. I know where to connect gnd, but why is the line longer than it should be? And I don't know the Vcc part too. Thanks.

What is a decoupling capacitor (or smoothing capacitor as referred to in the link below)?  How do I know if I need one and if so, what size and where it needs to go?    mentions many chips needing one between VCC and GND; how do I know if a specific chip is one?   Would an  4-bit parallel access shift register used with an Arduino need one? (To use my current project as an example) Why or why not?  I feel like I'm starting to understand the basics of resistors and some places they're used, what values should be used in said places, etc, and I'd like to understand capacitors at the basic level as well.


I've river polygon data representing the water quality. This polygon data were derived from polyline dataset according to a buffer distance in the attribute table. Unfortunately I don't have this line dataset. So my "possibly naive" question is - is it possible to "re-buffer" the polygon data set to have polyline data again? Maybe there is a way to draw the centerline of each polygon? I prefer to work with qgis 2.6 but also have ArcGIS 2.2 available.

I was wondering if there is a way to create centre lines from polygons in QGIS? I have a polygon layer, but ideally need the centrelines as a separate file.


I have a list of a class I made called MonitoringItem.  public class MonitoringItem     {         public int URLID { get; set; }         public string URL { get; set; }         public List<String> RequestHeaders { get; set; }         public string RegexMatchString { get; set; }         public string CheckType { get; set; }         public string ExpectedResponseCode {get; set;}     }   When I try to consume this on the client side, using a service reference I get:  Error   1   Cannot implicitly convert type 'WebMonitor.GetURLsToMonitor.MonitoringItem[]' to 'System.Collections.Generic.List<WebMonitor.GetURLsToMonitor.MonitoringItem>'  \\home\d\Source\Projects\WebMonitor\WebMonitor\WebMonitorProgram.cs 44  17  WebMonitor   This is my client code:  List<GetURLsToMonitor.MonitoringItem> m = new List<GetURLsToMonitor.MonitoringItem>();  GetURLsToMonitor.ws_GetURLsToMonitorSoapClient g = new GetURLsToMonitor.ws_GetURLsToMonitorSoapClient();  m = g.GetURLsToMonitor(); <--This is where it is giving me the error   .   I'm not returning an array so not sure why it's saying this.

I am returning a List from my WCF method.  In my client code, it's return type shows as MyObject[].  I have to either use MyObject[], or IList, or IEnumerable...   WCFClient myClient = new WCFClient();      MyObject[] list = myClient.GetMyStuff(); or     IList<MyObject> list = myClient.GetMyStuff(); or     IEnumerable<MyObject> list = myClient.GetMyStuff();   All I am doing is taking this collection and binding it to a grid.  What is the best object to assign my returned collection?


Which one of $* or $@ is better to use (in array syntax,command line parameters, etc.) to avoid any bugs/problems in code? Or it does not make any difference?

Consider the following code:  foo () {     echo $* }  bar () {     echo $@ }  foo 1 2 3 4 bar 1 2 3 4   It outputs:     1 2 3 4       1 2 3 4   I am using Ksh88, but I am interested in other common shells as well. If you happen to know any particularity for specific shells, please do mention them.  I found the follwing in the Ksh man page on Solaris:     The meaning of $* and  $@  is   identical  when  not  quoted  or  when  used  as a parameter   assignment value or as a file name. However, when used as  a   command argument, $* is equivalent to ``$1d$2d...'', where d   is the first character of the IFS variable,  whereas  $@  is   equivalent  to  $1 $2 ....   I tried modifying the IFS variable, but it doesn't modify the output. Maybe I'm doing something wrong?


If $K$ is a field is $K[X^2,X^3]$ a UFD when considered as a subring of $K[X]$?   I know that $K[X]$ is a $PID$ but nothing else ,these ring theory question just dont seem to occur to me..please help...someone told me it is not a $UFD$ and only just a Domain...but i dont know the reason..how should one go about proving these results?..this ring theory course is getting to hard for my understanding..

Show that $X^2$ and $X^3$ are irreducible but not prime in $K[X^2,X^3]$.   My reasoning is as follows:  Since the only ways $X^2$ and $X^3$ can be factored in $K[X^2,X^3]$ are $X^2 = X^2 * 1$ and $X^3=X^3*1$ it follows that $X^2$ and $X^3$ are irreducible.  To show that they are not prime in $K[X^2,X^3]$ I argue that $X^2\mid X^3*X^3$ but $X^2\nmid X^3$ and $X^3\mid X^4*X^2$ but $X^3\nmid X^4$ or $X^3\nmid X^2$.  Is that correct?


I got asked to show that $[0,1]\times[0,1)$ is homeomorphic to $[0,1)\times[0,1)$ with the product topology, but I'm having trouble understanding why that's not false. $[0,1]$ is obviously compact while $[0,1)$ is not. What am I not getting here?

Show that $[0, 1)\times[0, 1)$ is homeomorphic to $[0, 1]\times[0, 1)$ but not to $[0, 1]\times[0, 1]$. When I sketch these spaces it this statement makes sense intuitively because $[0, 1]\times[0, 1]$ is closed and $[0, 1)\times[0, 1)$ and $[0, 1]\times[0, 1)$ are each "missing" part of their boundary which would make them closed. I also know, $[0, 1]\times[0, 1]$ is compact and compact spaces are not homeomorphic to non-compact spaces.   I am having trouble saying this explicitly, as is pretty obvious in the clumsiness of the wording above.


So I was looking into infinite decimals that have patterns and trying to practice turning them into ratios (for example 0.1111...=1/9) and then I thought of this number 0.23571113... with all the primes into infinity I think this number has a name probably related to Euler, if so I would like to know it. my question is this number rational or irrational or hasn't been figured out yet? if so please provide simple proof.

How can I prove that the number formed by concatenating the primes in order i.e. $0.235711131719...$ is irrational.  I know I have to demonstrate that it has no period, but I'll be so thankful if someone can explain very clear, including all cases.


Is the function h onto and one to one? Prove this.  Online bonus question on a recent proofs quiz on the topic of one-to-one and onto functions. Gave me a bit of grief (the mapping stuff). Also consider this is a proofs class, much help would be appreciated.  I believe the answer would have to include something to do with x+y or x-y not being natural numbers? I could (most probably) be wrong though.  Please help.

Determine if $g$ is    injective; surjective;  bijective.   Question on a recent test regarding one-to-one and onto functions. Was very difficult for me, could not even begin to answer either. This is a proofs class, much help would be appreciated.


Are these sentences correct?  I have found this in a website.  Bananas plus water results in faster weight loss.  Laying off exercise and allowing afternoon sweets reduces stress.  Appreciate the help.

I was surfing the internet the other day when I found this phrase: Instead your precious time and attention is wasted. To my ears, it sounds wrong. But I'm not a native English speaker, so I consulted with a number of them, and some of them said that it was "is" because the adjective modifies only the noun "time" and not "attention". Others said it "is" because that's just how it is. But I still believe it should be "are". Any help is appreciated.


I have strange problem with reading double data in my c++ program, why is c++ adding nines and how can i make him not to?  When i gave him 8.62400e+02 he save it as 862.39999999999997726 not 862.4    Thank you for any help!

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


How can I start a perl script from within a perl script but without being part of the same thread of execution. Like forking and letting the original script continue execution? I think system does not do that as I see in the same console the output of the other script

I've got a Perl script that needs to execute another Perl script. This second script can be executed directly on the command line, but I need to execute it from within my first program. I'll need to pass it a few parameters that would normally be passed in when it's run standalone (the first script runs periodically, and executes the second script under a certain set of system conditions).  Preliminary Google searches suggest using backticks or a system() call. Are there any other ways to run it? (I'm guessing yes, since it's Perl we're talking about :P ) Which method is preferred if I need to capture output from the invoked program (and, if possible, pipe that output as it executes to stdout as though the second program were invoked directly)?  (Edit: oh, now SO suggests some related questions.  is close, but not exactly the same as what I'm asking. The second program will likely take an hour or more to run (lots of I/O), so I'm not sure a one-off invocation is the right fit for this.)


I am trying to solve this problem. But I do not have any perfect proof of that.

Prove: $$ (a+b)^\frac{1}{n} \le a^\frac{1}{n} + b^\frac{1}{n}, \qquad \forall n \in \mathbb{N} $$ I have have tried using the triangle inequlity $ |a + b| \le |a| + |b| $,  without any success.


So I am using the siunitx package and it is throwing up an error at me when I use it on my computer. I know that the error isn't in my code as it has run with no problems on another computer.  The error that it gives me is as follows:  ("C:\Program Files\MiKTeX 2.9\tex\latex\siunitx\siunitx.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\expl3.sty" ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\expl3-code.tex") ("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\l3pdfmode.def") ! Missing = inserted for \ifnum. <to be read again>                 - l.283   }  ?    I suspect that there is an error with how my computer is reading \l3kernel as this seems to be where it runs into the issue, however I have tried deleting and redownloading the file and it still throws up this same error.

I'm trying to get siunitx working. For some reason I keep getting this error:  ! Missing = inserted for \ifnum. <to be read again>                     - l.3 \begin           {document}^^M   I have tried a minimal document to make sure it is not some kind of compatibility issue. And I get that same error in the most minimal document possible.  I'm using pdfLaTeX to compile, and have tried both from TeXWorks and from bash. I'm using TeXLive, if that matters. I have also tried reinstalling siunitx, l3packages, and l3kernel. There was an issue with l3kernel before this, due to an apparently old version. But all three packages are now up to date. I've also reinstalled expl3 while trying to debug the original issue.  My minimal document is:  \documentclass{article} \usepackage{siunitx} \begin{document} \end{document}   The output I get is:  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./untitled-2.tex LaTeX2e <2016/02/01> Babel <3.9q> and hyphenation patterns for 81 language(s) loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/home/<name>/texmf/tex/latex/siunitx/siunitx.sty (/home/<name>/texmf/tex/latex/l3kernel/expl3.sty (/home/<name>/texmf/tex/latex/l3kernel/expl3-code.tex) (/home/<name>/texmf/tex/latex/l3kernel/l3pdfmode.def)) (/home/<name>/texmf/tex/latex/l3packages/xparse/xparse.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty) (/home/<name>/texmf/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator-language- mappings.tex))) ! Missing = inserted for \ifnum. <to be read again>                    - l.3 \begin          {document}^^M ?   Does anyone have any idea what might be going wrong here?


Current theories about Universe dimensions and age put them - respectively - at about 90 G light-years wide and 13.8 G years old. To avoid implying that matter travelled faster than light, theories state that - sometime after 'time 0' - space wildy expanded "by itself", so that matter ended up enormously scattered in spite of having moved very little in comparison.  This - possibly as many other concepts in modern physics which work perfectly but remain un-imaginable - SEEMS to me to imply that:   1) No matter how big the Universe is, and what tools we will have available, it will never be possible to "see" anything coming from farther than 13.8 G light years  (nothing travels faster than light); if this happened, the age of the Universe would be updated;  2) Looking very far away in one particular direction, we might be actually looking at ... ourselves, i.e. to the matter now composing our galaxy when it was still there, before being "shooted" where it is now by the expansion of space, and be reached by its own light !  3) The expansion of space creates/created enormous "gaps" amongst matter, where absolutely nothing is/was present, until waves of all sorts (gravitational & electromagnetic) reach and start moving through it;  4) The fact that we are now receiving light 13.5 G years old  from far-away galaxies scattered in every direction, means that we now are at least 13.5 light years from the current "borders" of the universe. Provided - of course -  that a "centrifugal" expansion of  the Universe still makes any sense, with theories which no longer have anything in common with ... common sense.   Most of them seem very odd conclusions. Am I wrong on all the line ?

The observable universe is approximately 13.7 billion years old. But yet it is 80 billion light years across. Isn't this a contradiction?


I have learnt that the electric field that is responsible for current flow is generated inside a conductor as soon as the two ends of the conductor are connected or brought in contact with the two terminals of the battery. I have also learnt about the hydraulic analogy according to which the electric field is established across the conductor in the same way as hydrostatic pressure is transmitted across a fluid.  But I'm not convinced with this analogy neither can I see any mechanism by which the electric field is established across the conductor.  I reflected that the electric field may be established by some induction, i.e. maybe the electrons in the vicinity of the electrodes are drifted towards or away from the charged electrodes and this drift of charge carriers and the subsequent development of a non - zero charge in that region  induces the electrons in a farther region to respectively drift towards or away from the nearer electrode. Am I correct in my thinking?

On a systems level, I understand that as electrons are pushed into a wire, there is a net field and a net electron velocity.  And I've read that the net electron drift is slow.  But electricity travels through the wire, essentially at c, and I want to understand that mechanism.  My apologies if my question is poorly stated, I know bare bones undergraduate quantum theory circa 1990s but it doesn't explain the motion of electricity in detail.  Here's my conception, I'm hoping someone will fill in the holes, ha ha.  An electron moves into the wire.  It's got a kinetic energy.  After travelling a short distance, it spontaneously emits a photon, which hits another electron in a valence shell.  That electron then presumably does the same.  If this conception is simply wrong, please enlighten me.  The questions that arise:   Presumably at this level, electrons are acting more like waves and less like particles, but is there any classical component in the picture, ie are electrons coming in imparting other electrons with kinetic energy through repulsion, or does it not work that way? If electrons momentarily have energy, then pass it on by a photon, what determines when that photon is emitted, and what frequency it will be?  I assume that electrons in this cloud are not limited by any kind of exclusion principal, and that any frequencies are possible? Why should a photon emitted by an electron be in the direction of travel?  Conservation of momentum tells me that if an electron is moving, the photon should be emitted in that direction, slowing the electron, but could an electron emit a photon in the opposite direction?  If it did, I assume it would somehow have had to absorb energy from elsewhere? That sounds possible by analogy with quantum tunneling. What is the mechanism by which electrons propagating increase the temperature of the material?  Are they transmitting energy to the electrons in the valence shell, which tug at the nucleus, do some photons hit the nuclei directly, or is there some other way?  Presumably, electricity travels slower than light, because there is some time in each exchange, and some time when electrons are moving at sublight speeds before emitting a photon.  By how much is this slower than light, and what is the speed of each interaction?


I am confused on if I need a visa to get to Bishkek if I am travelling through Moscow to get there. Will I need a transit visa to go through Moscow, Russia to get to Bishkek? I read somewhere that I would need a transit visa to get to Kazakhstan or Belarus, but don't know if it applies to Kyrgyzstan.

I am a Swedish citizen traveling to Kyrgyzstan via Russia. Do I need a transit visa while waiting for my flight iin 24 hours?


I have the same city map (BH city) for two different shapefiles with different locations. The first one is the "shared management", this one have bigger polygons, as we can see  shared_management <- read_sf(dsn = 'TGC_POP_DENGUE_00_11_12_TAXA.shp') plot(st_geometry(shared_management))     And I have the smallers ones ("sectors")  sectors <- read_sf(dsn = 'SETOR_CENSITARIO_2010.shp') plot(st_geometry(sectors))     Then I need a list of polygons of "sectors" which is inside of each polygon of "shared_management".  I know the number of polygons of "sectors" inside of which polygon of "shared_management". This number is given by  geo.int <- st_intersection(sector, shared_management) geo.agg <- aggregate( ID_CS_2010~ID_TGC, data = geo.int, FUN = length) geo.agg1 <- aggregate( ID_CS_2010~IDENT_TERR, data = geo.int, FUN = length) head(geo.agg1) IDENT_TERR ID_CS_2010 1          B1        112 2          B2         98 3          B3         85 4          B4        123 5          B5        127   Any idea of how can I obtain which polygons of "sectors" are inside of each polygon of "shared_management"?

I am trying to spatially subset in R:   the forest stand data (many small polygons) by the  watershed data (one polygon)     My datasets are both in SpatialPolygonDataFrame format. I don't want to intersect or clip the data, because this creates small polygons on the border. Instead, I would like to select polygons completely within or within, such Select Layer By Location tool in ArcGIS. The output, unlike in ArcGIS, should be a new shapefile.   Here is how it is looks like:  forest stands = green,  watershed: blue border,  selected stands completely within: yellow.    However, I cannot find, how to make this in R?  Using sp::over(x = watershed, y = forest) the output is a a data.frame, not a spatial feature. The tools sf::st_within(x, y, sparse = TRUE, prepared = TRUE) seems promissing, but they operates on sf objects, not on spatialPolygonDataFrame.  Is there any quick spatial subset in R solution that I have overlooked?


I've installed the LAMP stack on my Ubuntu 14.04 laptop using the command:  sudo apt-get install apache2   I went to localhost and it shows the typical tree (Index of ...  in my case the tree is empty).  So I type at the command line sudo service apache2 start  After that I create a hello world php file, called example.php  And then I put that file inside var/www folder (to getto that folder I go to files and then to system, and then to var folder, and then to www folder).  And finally I open my browser and type localhost/example.php  The file appears as not found.  Note: From the console I've done this also: sudo chmod -R 755 var/www  I've also checked www folder perms and anybody has access files and I have "create and delete files" permission.  What should I do? The files are there but localhost show an empty list and Any file is "not found" when I try to acess it from the browser.

I recently installed Ubuntu 14.04, then I installed lamp-server and placed my webpages in /var/www directory, but when I opened localhost in the browser there was nothing. I think that happened because Zend updated Apache.  Whatever the reason may be, I want to know where to keep my php files so that I can access them from my browser.


I am going to be traveling overseas and bringing my Nintendo 3DS which the adapter outputs DC 4.6V 900mA.  I found an unofficial USB cable to charge it and I was curious if the minor variance in the voltage would cause any issue. Say if I use an iPad 5.2V charger or the iPhone 5V one, being I have them and they support 240V input.  Thank you!

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


I would like to know where this color aberration comes from in my pictures, so that I can avoid it wherever possible.  Here is a picture I took in the sunny afternoon with my 50mm 1.4G (nikkor) wide open at 100iso:     If this comes from the lens, how the professional photographers do to avoid it? (I assume my lens is quite good :-) but I may be wrong).  And here is a close up of the color aberration that I'm talking about :

What is Chromatic Aberration? Is it a physical part of the lens, or just an optical illusion?


Following is my system configuration    Intel Dual Core processor 1 GB RAM 160 GB hard disk   Which version of UBUNTU will be suitable for me. I tried with Ubuntu 14.10 which completely slow in my system.  Sorry am not sure about the tags either. Please correct me if am wrong

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?


why str1==str2 is returning false while str2 == str3 returns true in below code? As per my understanding, str1==str2 should also return true.  public static void main(String[] args) throws Exception {         String str = "me";         String str1 = str + "test";         String str2 = "metest";         String str3 = "me" + "test";         System.out.println(str1==str2); // O/P false         System.out.println(str2==str3); // O/P true      }

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?


In SSH server, I want to get the connected client IP address.  I use  $ who or $ w can get logged information(include client's IP address)  I just want client's IP address (one thing), use in shell script

If I am logged into a Solaris server from my Windows laptop via putty using ssh, how, on the server, can I determine my Windows laptop IP or hostname?


consider the following code snippet (simplified from a more complex code): #include <typeinfo> #include <iostream>  struct A{     template<int S>     void print(){ std::cout << S << std::endl; } };  struct B{};  template <class T> A foo(int);  template<> A foo<B>(int){ return A{}; }  template<class T> int bar(int){   auto res = foo<T>(0);   std::cout << typeid(res).name() << std::endl;   res.print<5>();       // This line gives an error   return 0; }  int main() {   bar<B>(0);   return 0; }   If I try to compile it (either with gcc or clang) it results in the following error: main.cpp:21:16: error: expected primary-expression before ')' token    21 |   res.print<5>();  and I have to either:  explicitly declare res as a A_int object call the method print() using the template keyword (res.template print<5>();)  in order to make this code compile. I'm not really good in interpreting the Standard language, but as far as I understood the template keyword in a function call is needed when invoking a template member function on an object which type explicitly depends on a template parameter (see for instance ). In this case, I didn't expect the keyword template to be needed since res should be an object of type A, which is not explicitly dependent on a template parameter (even if it's the result of a template function call). Could someone help me understanding where I'm wrong, and when the template keyword is actually needed? Thanks in advance, and apologise if this is a duplicate question, but I could not find anything specific for similar issues.

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I'm trying to install LMDE (Linux Mint Debian Edition) 3 on a Windows 10 host. I'm having some trouble with the graphics adapters and resolution settings. I read , and specifically Mokubai's answer, which helped me. However, I'm running into some issues that neither the VirtualBox user manual nor Mokubai's answer resolves. I'm still at the stage of running the LMDE Live CD and then trying to run the graphical installer.  So, I initially tried using the VMSVGA adapter because as the  seems to indicate, this is the default adapter for Linux guests and (by inference) should be the one to use. However, when using it I could only get a max resolution of 800 x 600, even with trying to use Hint in Global Settings > Display. I did have 3D Acceleration checked and that seemed fine. The problem with the low resolution was that when I ran the installer, on the first screen alone I couldn't see the whole window and no amount of moving or resizing the window helped. As a result, I just couldn't see enough to click on the Next button.  I finally tried using VBoxSVGA and it did let me use a max resolution of 1024 x 768. This resolution let me see the full installer window, allowing me to click on Next. However, when LMDE Live CD starts, I get a message once I get to the desktop screen that "Cinnamon is currently running without hardware acceleration" and instead "running in software rendering mode".  Any ideas on why this might be? Is VBoxSVGA only supposed to be used for Windows 7+ guests, while even modern Linux guests are supposed to use VMSVGA? If so, then how can I get my resolution higher? And if VBoxSVGA can be used for Linux guests, then how do I get hardware acceleration to be enabled?  Thanks in advance!  Edit: This question is NOT a duplicate of a previous question. My question is not simply about differences between VBoxSVA and VMSVGA but specifically resolution issues I'm having with those two graphics adapters on a Linux guest. In my question, I even reference the other question that Mokubai thought mine was a duplicate of. I edited my question title to hopefully show the difference.

VirtualBox 6.0 provides a new setting called Graphics Controller. There are four options to choose from:   None VBoxVGA VMSVGA VBoxSVGA   In the user manual I have found this information:     Graphics Controller: Specifies the graphics adapter type used by the guest VM. Note that you must install the Guest Additions on the guest VM to specify the VBoxSVGA or VMSVGA graphics controller. The following options are available:   – VBoxSVGA: The default graphics controller for new VMs that use Linux or Windows 7 or later. This graphics controller improves performance and 3D support when compared to the legacy VBoxVGA option.– VBoxVGA: Use this graphics controller for legacy guest OSes. This is the default graphics controller for Windows versions before Windows 7.   – VMSVGA: Use this graphics controller to emulate a VMware SVGA graphics device.   – None: Does not emulate a graphics adapter type.   But still it does not describe which of them and why should I prefer. When should I choose None? Is VMSVGA better than VBoxSVGA? What is wrong with VBoxVGA?  I have tested booting of archlinux-2019.02.01-x86_64.iso with virtualbox 6.0.4 in efi and legacy modes:  ┌──────────┬─────────────────────────────────┬─────────────┐ │ Adapter  │            EFI mode             │ Legacy mode │ ├──────────┼─────────────────────────────────┼─────────────┤ │ VBoxVGA  │ ok                              │ ok          │ │ VMSVGA   │ ok in systemd-boot menu,        │ ok          │ │          │ then black screen for some time │             │ │          │ when booting, then becomes ok   │             │ │ VBoxSVGA │ black screen                    │ ok          │ └──────────┴─────────────────────────────────┴─────────────┘   Also I have noticed that with VMSVGA and VBoxSVGA passing video=XRESxYRES parameter is ignored:  +----------+----------------+--------------+ | Adapter  |    EFI mode    | Legacy mode  | +----------+----------------+--------------+ | VBoxVGA  | works          | works        | | VMSVGA   | doesn't work   | doesn't work | | VBoxSVGA | could not test | doesn't work | +----------+----------------+--------------+   But it is still possible to set some of that ignored resolutions after boot with fbset.


For example the graph $f(x) = 1/x$ approaches $\infty$ at $x=0$ but we would not say this is an infinite discontinuity, just an asymptote, correct? Unless we specifically said the domain of the function included $x=0$? Or must domains by definition exclude discontinuities and undefined points?  Do discontinuities only exist if we can "split" the domain into two new non-empty intervals that each exclude the discontinuity?

Is function $f:\mathbb C-\{0\}\rightarrow\mathbb C$ prescribed by  $z\rightarrow \large{\frac{1}{z}}$ by definition discontinuous at $0$?  Personally I would say: "no". In my view a function can only be (dis)continuous at $z$ if $z$ belongs to its domain.  But I have heard other sounds, that made me curious.   This question was inspired by comments/answers on  question.


I am working with a dataset that consists of transcripts and summaries. I want to compare sentences to assign labels to them. The summaries are literally some sentences of the transcript, but there is no space after a sentence. This prevents me from using a sentence tokenizer or doing a .split() operation. One example summary:  TimeWarner said fourth quarter sales rose 2% to $11.1bn from $10.9bn.For the full-year, TimeWarner posted a profit of $3.36bn, up 27% from its 2003 performance, while revenues grew 6.4% to $42.09bn.Quarterly profits at US media giant TimeWarner jumped 76% to $1.13bn (Â£600m) for the three months to December, from $639m year-earlier.However, the company said AOL's underlying profit before exceptional items rose 8% on the back of stronger internet advertising revenues.Its profits were buoyed by one-off gains which offset a profit dip at Warner Bros, and less users for AOL.For 2005, TimeWarner is projecting operating earnings growth of around 5%, and also expects higher revenue and wider profit margins.It lost 464,000 subscribers in the fourth quarter profits were lower than in the preceding three quarters.Time Warner's fourth quarter profits were slightly better than analysts' expectations.   import re summary = article_df.iloc[0,3] print(summary) summary = re.sub(r'([A-Z].)', r' \1', summary) summary   Resulted in:    Time Warner said fourth quarter sales rose 2% to $11.1bn from $10.9bn. For the full-year,  Time Warner posted a profit of $3.36bn, up 27% from its 2003 performance, while revenues grew 6.4% to $42.09bn. Quarterly profits at  US media giant  Time Warner jumped 76% to $1.13bn (Â£600m) for the three months to  December, from $639m year-earlier. However, the company said  AO L's underlying profit before exceptional items rose 8% on the back of stronger internet advertising revenues. Its profits were buoyed by one-off gains which offset a profit dip at  Warner  Bros, and less users for  AO L. For 2005,  Time Warner is projecting operating earnings growth of around 5%, and also expects higher revenue and wider profit margins. It lost 464,000 subscribers in the fourth quarter profits were lower than in the preceding three quarters. Time  Warner's fourth quarter profits were slightly better than analysts' expectations.   It results in extra spaces after some capital letters. However, it does not take decimal points into account, which is what I want. How can I make sure that it only adds a space between a dot and an uppercase letter?

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


How I can keep following characters in my paragraphs and stop them being converted or replaced by ' ' empty one or ? marks. I am trying to save following paragraph: "Nā Tā Tīmoti Kāretū a He Muka i tīmata hei pānui reo Māori anake mā te marea. Pānuihia āna kōrero mō te take i whakaterea te pānui toru tekau tau ki muri."  it's Maori language and I wanted to keep it into my database table without converting them to following. "N T Tmoti Kret a He Muka i tmata hei pnui reo Mori anake m te marea. Pnuihia na krero m te take i whakaterea te pnui�toru tekau tau ki muri."  I am using following code to detect if the paragraph have this type of special maori keywords or not.  $keywords = 'āēīōūĀĒĪŌŪ';             $keywords_array = array('ā','ē','ī','ō','ū','Ā','Ē','Ī','Ō','Ū');              for($i=0;$i<count($keywords_array);$i++) {                 if(strpos(str_replace(" ","",$_POST['editor1']), $keywords_array[$i]) !== false) {                     $found = true;                 }             }             if($found) {                 //found one possiblities....keep as it is the paragraph but storing into database like other paragraph:(                 $output = $_POST['editor1'];                     }   Can anyone tell me how I can stop converting special characters when storing in php mysql database.  Please let me know any solution as now it's quite long that I couldn't find simple solution. thanks

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I need to parse a file, and I'm looking to print a segment of data between two specific lines. From a "range start" to "range end" but only if the "range end" is present.  If the source file is:  [This is the start] of some data  this is information this is more information This is does not contain the ending required  [This is the start] of some other data this is info I want this is info I want [This is the ending I was looking for]   It should print:  [This is the start] of some other data this is info I want this is info I want [This is the ending I was looking for]   Using grep I've been able to find the data I need and print upwards, but only by a fix number of lines.   Given that the number of lines of data is not constant, is there a way I can use grep or sed, to work up from the end line to find the next occurrence of a given string and capture the specific range I want?   The "range start" of the data segment should be printed along with any data between the "range start" and "range end" point, and the "range end" match is what determines if the whole range of lines should be printed at all. If a range (data segment) does not have the specified end, it should not be printed. If multiple segments have an end point, then all segments containing an end should be printed. No case exists where the input file will have an end without a start, or multiple ends to a single start.   does not solve my problem, as it starts printing on the first line matched and keeps printing until the the first end segment is found. I need to print only the segments that contain the specified end statement.

I want to start grepping from the lines that has CK at the end of line and stop grepping when the line has D at the end. I tried grep "$CK" "$D" file..txt, but it didn't work.  Input:  kkkkkkkkkkk    jjjjjjjjjjjjjjjjjj   gggggggggggg/CK   JHGHHHHHHHH    HJKHKKLKLLL    JNBHBHJKJJLKKL   JLKKKLLKJLKJ/D   GGGGGGGGGGGGGG   GGGGGGGGGGGGGG   The desired output:  gggggggggggg/CK   JHGHHHHHHHH    HJKHKKLKLLL    JNBHBHJKJJLKKL   JLKKKLLKJLKJ/D


I am new to this www-data concept, please do explain in simple words. I have a directory in the path /var/www/orbitcode. I want orbitcode to have www-data write permission. How to do this? I am probably doing this because of White screen Of Death, as my index.php is showing blank

I recently installed Ubuntu 14.04, then I installed lamp-server and placed my webpages in /var/www directory, but when I opened localhost in the browser there was nothing. I think that happened because Zend updated Apache.  Whatever the reason may be, I want to know where to keep my php files so that I can access them from my browser.


In Fallout Shelter why do some Dwellers return from the wasteland by themselves?

I have a strange thing happening - dwellers I send to explore wasteland are automatically returning to vault after finding a little amount of items (4 or 5).   The exploration log says: "That's as much as I can carry. I better head back and show the Overseer what I found".  Before today they successfully carried up to 30 items and never returned to vault on their own.  I don't know is it relevant or not, but I have a lot of free storage space available.  What caused this change? What can I do to prevent this?


In my project a user can comment on posts and images, but when a user comments emojis, it turns to '?' (question mark). Can someone help me with this issue .  'mysql' => [             'driver' => 'mysql',             'host' => env('DB_HOST', '127.0.0.1'),             'port' => env('DB_PORT', '3306'),             'database' => env('DB_DATABASE', 'forge'),             'username' => env('DB_USERNAME', 'forge'),             'password' => env('DB_PASSWORD', ''),             'unix_socket' => env('DB_SOCKET', ''),             'charset' => 'utf8mb4',             'collation' => 'utf8mb4_unicode_ci',             'prefix' => '',             'prefix_indexes' => true,             // 'strict' => true,             'strict' => false,             'engine' => null,             'options' => extension_loaded('pdo_mysql') ? array_filter([                 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),             ]) : [],         ],


I am an old fart that has a tough time keeping an eye on my MOUSE pointer.  In Windows you can go to control panel, click on "mouse" and change the pointer style,  how fast my cursor goes across the screen, etc.  I found only a symbolic mouse app in Ubuntu that that does nothing that I can tell.  Logitech does not support Linux, so I don't know  where to go for these controls.  Is there anything out there?

I have difficulties seeing, so I tried to change my cursor using the instructions from Ubuntu 11, 12 but nothing worked. I have found no one on this Internet with my problem. I run Ubuntu 14.04 and gnome 3.9, I have dconf-editer, compiz-config and they don't do anything to my computer.