In my users table I need to calculate count of users by username length.  For example:   200  users has name 1 char length 500  users has name 2 chars length 1500 users has name 3 chars length ...   I created MSSQL query:  SELECT    TOP 1000   LEN(nick) as 'title',   Count(*) FROM [userstable] WITH(NOLOCK) GROUP BY title   After I run it I see next problem:     column 'userstable.Nick' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.   Could someone explain why?

I'm trying to perform a group by action on an aliased column (example below) but can't determine the proper syntax.  SELECT       LastName + ', ' + FirstName AS 'FullName' FROM         customers GROUP BY     'FullName'   What is the correct syntax?   EDIT  Extending the question further (I had not expected the answers I had received) would the solution still apply for a CASEed aliased column?  SELECT            CASE         WHEN LastName IS NULL THEN FirstName         WHEN LastName IS NOT NULL THEN LastName + ', ' + FirstName     END AS 'FullName' FROM         customers GROUP BY          LastName, FirstName   And the answer is yes it does still apply.


I want to prove by induction that $\sum_{i=1}^{n} = \frac{i(i+1)}{2}$  I'm getting stuck as to whether this can be done. My base case of 1 says no.

Can someone look at my proof. I am supposed to prove by induction. The question is to prove the following:  $$\sum _{i=0}^{n}{i} =\frac { n\left( n+1 \right)  }{ 2 } .$$  If $n=1$  Then  $$1=\sum_{i=1}^1{i}=\frac{1(1+1)}{2}=1$$  Now assume $n=k$.  Thus  $$\sum_{i=1}^k{i}=\frac{k(k+1)}{2}=1$$  If now $n=k+1$  $$\sum_{i=1}^{k+1}{i}=\sum_{i=1}^k{i}+(k+1)= \frac{(k+1)(k+2)}{2}$$  Is there anything more that I have to do, or is this it?


To solve the Dummit-Foote's exercise I've stuck here with this problem : (P-312)  Qn11. Show that  $p(x)=x^2+y^2-1$ is irreducible in $\mathbb{Q}[x,y]$.  This is a polynomial of degree 2. But I can not think of zeros of this polynomial.  My another approach is : $p(x)=x^2-1\in \mathbb{Q}[x,y]/\langle y\rangle$ and also $p(x)=y^2-1\in \mathbb{Q}[x,y]/\langle x\rangle$ and $\langle x\rangle$, $\langle y\rangle$ are proper ideal of $\mathbb{Q}[x,y]$. Also, $p(x)=x^2-1$ can be factored with $(x+1)(x-1)$ in $\mathbb{Q}[x,y]/\langle y\rangle$. Then how I go ahead?  I think my attempt is stupid. Can any one suggest any references to understand/solve this?  Thanks in advance.

I want to show that $p(x,y)=x^2+y^2-1$ is irreducible in $\mathbb{Q}[x,y]$. There is already a similar problem posted:    but this question uses the irreducibility of $p(x)$ to show that it is prime and therefore an integral domain. The part of the problem I am stuck on is showing that $x^2+y^2-1$ is irreducible over $\mathbb{Q}$ in the first place.  I have considered taking the approach used in the above link except for backwards, but I am unsure of whether or not the converses of the theorems used still apply.  Edit: I see that this question has been marked as a duplicate, but I think I have explained how I am asking a different question than the one that was posted previously.


What is the best wayto compare 2 'time' in 24 hour format in javascript?  I have converted the time to 24 hour format.   For eg:  t1, t2; //These are 2 time in 24 hour format of **string** type         //Like t1="19:32" and t2 = "02:09"  if(t1<t2){} // Will this directly work for all times?   Any leads are appreciated.

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


System.out.println("3.14 - 5 = " + (3.14 - 5));   This statement shows 3.14 - 5 = -1.8599999999999999 in console when the answer is -1.86.  How would I be able to fix this error and what is the reason for the wrong answer being printed in the first place?  Thanks for answering my question, even though it's probably very simple :/.

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


Can somebody give me a general idea how to define a vector bundle of rank $N$ if we have a sheaf, which is locally given by $N$ holomorphic functions?

Let $f: X \to Y$ a morphism of ringed spaces and $E$ a vector bundle over $Y$ for finite rank $r$.  My questions are:   Why $E$ can be interpreted as locally free sheaf of rank $r$, therefore for each $y \in Y$ there exist an open set $U$ that contains $y$ such that $E \vert _U \cong \mathcal{O}_Y ^{\otimes r}\vert _U$ Conversly, how can a locally free sheaf of rank $r$ turned to a vector bundle formally correct?   Background of my question: How to interpret $f^*E$? Problem:$f^*$ accepts as arguments only sheafs on $Y$...


ls -l *.txt | wc -l | tee count.txt ls -l *.txt | wc -l > tee count.txt   I am learning basic Unix commands. I thought those two commands mentioned would do the same thing, but they do not. Only the first command writes to count.txt. How come the output redirection used in the second command is not doing anything?

This question may sound a bit stupid, but I can not really see the difference between redirection and pipes.  Redirection is used to redirect the stdout/stdin/stderr, e.g. ls > log.txt.  Pipes are used to give the output of a command as input to another command, e.g. ls | grep file.txt.  But why are there two operators for the same thing?  Why not just write ls > grep to pass the output through, isn't this just a kind of redirection also? What I am missing?


I have family video clips stored in different files & would like to stitch them onto one video(mp4)file for continued viewing. Any recommended app? - preferred a simple one.  Thanks

What's the best & easiest GUI software that can join a video that I have downloaded in several parts?


I try understand what's going on here, why bar doesn't have default value for name property  #include <string>  struct Foo {     std::string name = "foo default value";     std::size_t number = 23; };  struct Bar : public Foo {       std::string name = "here i want other value"; };  int main(int argc, char * argv[]) {     Foo foo;     std::cout<<"name="<< foo.name << " number=" << foo.number << std::endl;     Foo * bar = &Bar();     std::cout<<"name="<< bar->name << " number=" << bar->number << std::endl;     return 0; }   output:  name=foo default value number=23 name= number=23 // why name is empty string?   I assume that's default generated constructos are involed in final result. But can't get it right in my mind. Can someone explain what sorcery compiler does here?

Someone mentioned it in the IRC as the slicing problem.


I remember watching in Cartoon Netwoorks years ago maybe around the 2000's a cartoon about diferent alien races living in diferent planets where each race was related with an element like rock people, ice, people, fire people and another. I also remember that the first episodes where about their star dying and converting in a supernova killing their planets and they end escaping to the space in ships.  I have been years trying to find what cartoon was?

I remember seeing this series back when I was in the early grades of primary school (prep to 3) so this would be between 1996 and 1999  from what I remember it was set in space and the cast was made up from people from these different worlds, one of the characters is from a fire attributed world and I get the impression he was small framed (I think).  at one point in the series this entity appears called the Beast Planet appears, the one scene I do remember is that this Beast Planet attacks the fire planet, the front of the beast planet opens up with this claw and grabs the fire planet from bellow and then the fire planet is slammed into the beast planet dooming the fire planet but I think the beast planet was unharmed.  I also seem to remember that the cast discover the other planets have engines which allows the remaining planets to escape from the Beast Planet rather than them being sitting ducks.  I remember that this beast planet, despite being called a beast is actually more machine. I began remembering this series after playing Galaxy Angel where I saw the  and it reminds me of this beast planet


I have a program here that calculated the median of a certain amount of elements entered by a user; however I want to display the sorted list at the end of the program. You can see that I have sorted the elements but I can't think of any ways to display the sorted array at the end. Thanks in advance.  public static void main(String[] args) {      Scanner sc = new Scanner(System.in);      System.out.println("How many numbers do you want a median of?");     int num = sc.nextInt();      System.out.println("Enter the numbers: ");     int [] array = new int [num];      for (int i = 0 ; i < array.length; i++ ) {       array[i] = sc.nextInt();     }      int median = median(array);     System.out.println(median+" is a median of entered numbers."); }   public static int median (int [] array) {    int n = array.length;   int temp;      for (int i=0; i < n-1; i++) {     for(int j=1; j < n-i; j++) {       if (array [j-1] > array [j]) {         temp = array [j-1];         array [j-1] = array [j];         array  [j] = temp;       }     }   }   int median;   if (n % 2 == 0) {     median = (array [n/2-1]);   }   else {     median = array [(n/2)];   }   return median;   } }

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


I can not update and upgrade my Ubuntu and I don't want to use another system. I want your sincere help. answers available to questions asked didn't work on my system. my version is of 11.04.  Any help would be appreciated  thanks. regards,  Khalid Khan Seemab

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


How can I show that sets $| \mathbb R-\mathbb Q |$ and $ | \mathbb R |$ have same cardinality.  My Solution: As long as for element in one set I can match it with unique element in another set they have same cardinality: After removing $\mathbb Q $ from $\mathbb  R$ I can shift elements of Irrational numbers to correspond to elements of two sets match like this: $ \begin{array}{c|c|c|c|c|c} \mathbb R&0&1&\cdots&n&\cdots\\\hline \mathbb R\setminus\mathbb Q & \sqrt{2} &\sqrt{5} &\cdots & \sqrt{n+1} &\cdots \end{array}  $ Note that I use n as Real number for simplicity.   Even if this solution is correct, I feel like Professor won't accept it on exam. How would formal solution look like?

Can someone point me to a proof that the set of irrational numbers is uncountable? I know how to show that the set $\mathbb{Q}$ of rational numbers is countable, but how would you show that the irrationals are uncountable?


I know $\sum_{k=0}^n{{n \choose k}=2^n}$ but I'm not sure how to solve this with the $2^{k}$ term.

Why is $\sum_{k=0}^n (_k^n) 2^k$ simplified as $3^n$ and not just $2^n$ ? The answer uses the binomial theorem as a solution: let $a=1$ and let $b=2$. So $1+2 = 3$. But since $1+2 = 3$ why do we not use $1+1 = 2$?


Let $(G, *)$ be a group. Let $\mathcal S(G)=\{f:G\to G\space|f\space is\space bijective\}$ be the symmetric group and $Inn(G)=\{\kappa_{a}\space|\space a\in G\}$ the inner automorphisms. Now I want to show:     $G$ is abelian $\Leftrightarrow$ $Inn(G)$ is a normal subgroup of $\mathcal S(G)$    Thank you in advance!

Let $(G,\cdot)$ be a group and  let $\mathfrak{S}(G)$ be the set of all bijective mappings from $G$ to $G$.   Show that: If $G$ is non-abelian, then $Inn(G):=\{\kappa_a  \vert a\in G\}$ is not a normal subgroup of $(\mathfrak{S}(G),\circ)$  First of all, this is not homework, but we had it in university as an exercise and didn't get a solution from our lecturer. So I am just looking for a correct proof, since we have easter holidays and it is not possible to ask him.  Thanks in advance!


I have two spatial rasters of different extent and different cell size and I want to do a conditional statement with them. I decided to use rasterio for that. I use this code:  with rasterio.open('A.tif') as src: A = src.read()  with rasterio.open('B.tif') as src: B = src.read()  C = np.where ((A == 2) & (B == 1), 1, 0)   This is the error message:      operands could not be broadcast together with shapes (1,982,1042)   (1,701,851)   What is the method to deal with this?

I'm trying to do raster algebra with two rasters, but when I transform the rasters to array I can't do the operation because the files do not have the same extent  example:  from osgeo import gdal import numpy as np  IMG1 = gdal.Open('C:/IMG1.TIF') IMG2 = gdal.Open('C:/IMG2.TIF')  img1 = IMG1.ReadAsArray() img2 = IMG2.ReadAsArray()  img1+img2 >>>>> ValueError: operands could not be broadcast together with shapes (5353,3352) (5548,3232)    So.. if I see the gt of every img show that img1 and img2 have the same size of the pixel (100) but different extent  g1 = IMG1.GetGeoTransform() gt1 >>>>> (482084.999999999, 100.0, 0.0, 5652715.00001374, 0.0, -100.0) g2 = IMG2.GetGeoTransform() gt2 >>>>> (475184.999999999, 100.0, 0.0, 5643715.00001535, 0.0, -100.0)   So.. I used this operation in order to get the intersect extent.. but I don't know how to apply  r1 = [gt1[0], gt1[3],gt1[0] + (gt1[1] * IMG1.RasterXSize), gt1[3] + (gt1[5] * IMG1.RasterYSize)] r2 = [gt2[0], gt2[3],gt2[0] + (gt2[1] * IMG2.RasterXSize), gt2[3] + (gt2[5] * IMG2.RasterYSize)] intersection = [max(r1[0], r2[0]), min(r1[1], r2[1]), min(r1[2], r2[2]), max(r1[3], r2[3])]


Is there any discussions site about good patterns and practices in programming (better in C#) among the Stack Exchange Q&A sites?  Code reviews not discussions about it?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I need to design a boost converter using this IC. From (7.5V to 16.5V) to 23V. Load current max is 255mA.  I am having some difficulty in understanding some of the design calculation.  How will I calculate the peak current, Ipk and the Vswce parameter? And moreover, how does the SWC and SWE pin work? Please explain.

I am stuck while calculating the peak current in the boost converter through the inductor.  Can you please check if I am right?  Ipeak=(Max Voltage/ R2) = 18/1000=0.018. So, my peak current through the inductor is just 18mA? Am I doing it correct. If this is correct, how will I account for the Vce drop inside the pin1 and pin2 of the IC. The darlington transistor inside the IC is just like a normal transistor. I have added two transistor outside the IC instead of using the darlington switch in the IC for thermal purposes.   Can you please help me with the calculation of Vswce and Ipeak. The calculation of Vswce is not mentioned in the datasheet. So, please help. And the calculation of Peak current is mentioned in the datasheet. But is my approach of calculating the peak current through the inductor right?


I'm creating an online questionnaire using microtask crowdsourcing service e.g. Amazon Mechanical Turk, but I'm stuck with the questionnaire design that best suits my analysis.  I appreciate if you have a SE site recommendation for this type of crowdsourcing task design question.  Edit: The questionnaire can be summarized as follows: Workers watch several short time animations and answer which one is best. I'm wondering the result would be different if all animations are aligned and presented at the same moment, or one by one.

I lead a team of 600 people in over 70 countries.  I often would like their input on one of my ideas and I don't want to use a survey because they tend to limit creativity by requiring a choice among predetermined answers.  Let's take a simple example.  I want to get the European team together next year.  I want the team to select the location of the meeting.  Could I use The Workplace exchange to ask the following question "Where should we meet in Europe next year?" and then invite my 100 team members to submit cities and/or vote on cities already submitted?  This doesn't seem to be in the spirit of Stack Exchange (I've only discovered this today), and I don't want to break etiquette.  If I can't use Stack Exchange for this purpose, is there another site out there that would allow people to submit ideas and/or vote on ideas submitted?


If you want to show an "identifying key" in your .bib file when you cite it, by using \usepackage{natbib}, you can add \defcitealias{the name of the identifying key}{the name of the identifying key}. And when you cite it, you \citealias{the name of identifying key}. That is all.

I tried to use natbib and other attempts but for vain. I would like to produce a cite key which is identical to the BibTeX entry. For example, if I have a BibTeX entry Bt98, then I want \cite{Bt98} to produce something like [Bt98].  Any ideas how can I accomplish this?


In 2D-space I have this simple line consisting of three vertices connected by two edges.  How can I give thickness to this line? The thickness should only be in 2D. So in orthogonal bottom, top, left or right view the line should be invisible. Also, the corner in the line should be hard, not smooth.  extra question: how can I shape the ends of the line (rounded, squared etc.)?

I'm trying to make a Game of Thrones-style map scene. The roads are defined by curve objects. I'm trying to extrude the roads in the x/y plane, but it seems to only go in Z:    Is it possible to control the extrusion plane for curves?


I have a problem with "sendmail". So if I type in:  echo "something" | sendmail -v "test mail" myemail@yahoo.com   I get the message:  Mail Delivery Status Report will be mailed to <root>.   But when I check the email there is nothing new. Can somebody help me, please?

For about 2 days I'm trying to configure Ubuntu so that I can send an email, but when I type in:  echo "Subject: sendmail test" | sendmail -v my@email.com   I'll get:  postdrop: warning: unable to look up public/pickup: No such file or directory Mail Delivery Status Report will be mailed to <andreigbr>.   Even if I change my@email with mine, the inbox will be empty. Can somebody help me, please? I watched about 5 tutorial about how to send an email fom the command line but still doesn't work.


What I am trying to do is get the id name of newly added item in the list on click. Here's my code.    $(document).ready(function() {    $('ul>li').on('click', function() {     var idName = $(this).attr('id');     alert(idName);   });    $('#add').click(function() {     var n = Math.floor((Math.random() * 100) + 1);     $('ul').prepend('
New Item
');   });  });

Old Item

Old Item

Old Item

 <button id="add">Add Item</button>

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


$ sudo apt-get install freeglut3-dev Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package freeglut3-dev

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


I will arrive at Terminal B at 12:30 PM via a Lufthansa flight from India after taking a stopover in Munich.And my next flight is from Terminal A at 16:59 to Indianapolis. Considering this is my first time to US, I will have to collect my baggages when I arrive at B, go through immigration, check my luggages back in and then hop on to the Airtrain and reach A. Given the time period, will it be enough for a smooth transit? Just so you know, this will be one single ticket.

I am arriving from Frankfurt(FRA) to Newark(EWR) and I must pass the Customs and Border Control before catching the next flight to Baltimore (BWI). Both flight are on the same ticket by United Airlines (UA51 and UA4775)   Is 2 hours and 45 minutes enough time to catch the next plane, or do I have to expect longer waiting times and should go for a different route? I'll be traveling before the AirTrain starts operating. What is the best way to get from Terminal B to C?  I have heard that there is a transfer shuttle bus that connects the terminals such that you don't need to leave security area. What is the schedule for this bus? I'm not sure about the procedure for arriving from abroad. As far as I understood, I'll need to:  Collect my check-in luggage  Pass border control and customs (Immigration) Transfer from Terminal B to C Check my luggage into Domestic Flight Go through Security Check    Is there a way to optimize this procedure to save time? Can I re-check my luggage in terminal B?  What are my options if I miss the connection? Just go to the UA counter and ask to reserve the next possible flight?


I am traveling to India and I hold two passports from two different countries. Is it ok for me to enter India with one passport and then leave the country and next time to enter with my other passport.I would appreciate if someone could shed a light on this issue. Thank you!

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


I need help removing VirtualBox from my computer.  I've already tried:  sudo apt-get remove virtual-box-* sudo apt-get purge virtual-box-*     it just said it was selecting some stuff and then it said it didn't remove them and commented:  linux-image-generic : Depends: linux-image-4.4.0-87-generic but it is not going to be installed  linux-signed-image-4.4.0-79-generic : Depends: linux-image-4.4.0-79-generic (= 4.4.0-79.100) but it is not going to be installed  linux-signed-image-4.4.0-87-generic : Depends: linux-image-4.4.0-87-generic (= 4.4.0-87.110) but it is not going to be installed   E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).

I had installed VirtualBox but it started giving me problems. So I uninstalled it using:-  sudo apt-get remove virtualbox-\* sudo apt-get purge virtualbox-\*   But when I reinstalled VirtualBox it again resumed to previous settings and started giving same problems. How can i completely remove VirtualBox from my laptop and then reinstall it such that it wont give same problem again?


Dorans blade has 3% lifesteal, if i am carrying it and throwing my spear (Q ability) am I getting the 3% lifesteal with every hit?

What do AD scaling abilities scale on for leech effects? Take the following skill for example, it is pure AD scaling:  Lee Sin Spell Summary Sonic Wave: Lee Sin projects a discordant wave of sound to locate his enemies, dealing (50/80/110/140/170) (+(1 per attack damage point)) physical damage to the first enemy it encounters. If Sonic Wave hits, Lee Sin can cast Resonating Strike for the next 3 seconds. Resonating Strike: Lee Sin dashes to the enemy hit by Sonic Wave, dealing (60/90/120/150/180) (+(1 per attack damage point)) physical damage plus 10% of their missing Health (Max: 400 damage vs. Monsters).  What would I leech health back from?  Life steal Spell vamp Both Neither


Does anyone have experience checking in at a Singapore Airlines transfer desk within Changi Airport, where the flight ticket for the second leg was separately booked using a different passport/name (dual nationality)?  Both tickets would use the same airline (Singapore Airlines), there would not be any checked baggage.  From the Changi Airport , it appears to be possible to check in without having to exit immigration. However they also mention various cases where it is not possible (budget carrier, different carriers & bags not checked through, etc). So, just to be sure, I would like to know if others have done this before without any problems?  Thanks

An excellent  on this topic outlined the various different cases for how to travel on two passports.  One question relating to their Case 4: Different Names, Dual Citizenship Not OK.  (background note: this case involves traveller having Country A passport, and Country B passport, where Country A does not allow dual citizenship. Country C is a neutral third country where the traveller has the right to enter either visa free or with visa.)  When booking ticket A-C-A in Country A name, and C-B-C in Country B name, how do you manage to check into the C-B flight leg?  I.e. is it generally possible to book into the C-B flight leg without having to clear immigration in Country C, say at a transfer desk ? Or could you do this checkin online, and carry a printed boarding pass that gets validated at the transfer desk ?  I plan to travel through Changi airport in the near future, and am not clear if it will be possible to check into this second leg without having to go through immigration.


设f(x)导数处处连续，证明： ∫|f(x)|dx≤MAX{∫|f'(x)|dx,|∫f(x)dx|}. 三个都为定积分 x from 0 to 1.  我用到了MAX{A,B}=(A+B+|A-B|)/2.加上|A-B|≥|A|-|B|. 但是和要证的不等号方向相反。  Translation:  Let $f$ be a function such that $f'$ is continuous everywhere, prove     $$\int_0^1 |f(x)|dx\le\text{max}\left(\int_0^1 |f’(x)|dx, \left\vert\int_0^1 f(x)dx\right\vert\right)$$   I have used $\text{max}(A,B)=\frac{A+B+|A-B|}2$ and $|A-B|\ge|A|-|B|$, however what I need to prove has the reversed inequality sign.

Question:  If $f\in C^1[0,1]$, show that  $$\int_0^1 |f(x)|dx\le\max\left\{\int_0^1 |f'(x)|\,dx,\;\bigg|\int_0^1 f(x)\,dx\bigg|\right\}.$$  I have tried to make connection between $|f|$ and $|f'|$ by using  $$(tf(t))'=f(t)+tf'(t),$$  integrate the equation with $t$ on $[0,1]$, it gets  $$|f(1)|\leq \bigg|\int_0^1 f(t)\,dt\bigg|+\int_0^1 |f'(t)|\,dt,$$  but it is not the desired inequality.


I  that deleting photos from iCloud Photos does not remove them from iPhone. But what should I do to synchronize deleting? I want to leave on iPhone only those photos, that I have in my iCloud Photos

If I delete a photo from my iCloud will it also be removed from my devices that are connected to my account?


I have a polyline(Roads network) and points(Nodes) recorded along the line. I would like to calculate the distance for each point along the line in ArcGIS 10.1. Result will added in a new column and distance should be like Node 1 to - Node 2, Node 3, Node 4, Node 5....., Node 2 to - Node 1, Node 3, Node 4.....

I have a Shapefile (polygon), I need to calculate distance (Node to Node) along the lines in map unit(meter or kilometer).  I want to do it in ArcGIS.


In Internet Explorer 11, the dates below the reputation graph footers are mis-aligned. This is happening for all sites across the network.      Internet Explorer Version: 11.0.9600.19236

The small reputation graph on the profile page is broken in Edge and IE:     While in Chrome it looks like this:    Firefox also shows it correctly. I have not tested Safari.  I know the Edge rendering engine is going to go away at some point, so this issue will disappear in the long run, but it'd be nice if Stack Exchange worked on all browsers, not just the main ones.  Seeing as you are redesigning the profile page, seems like an ideal time to fix it. 🙂  Tested versions: Chrome 71.0.3578.98, Firefox 64.0, Edge 44.17763.1.0, IE 11.195.17763.0, all on Windows 10 1809 (17763).


Is there an adjective for someone who is proud of something that is really unimpressive or otherwise doesn't warrant pride? Some examples would be being a diehard fan of a terrible sports team or claiming that an average or indistinguishable town/city/country is 'the best'.  This is similar to blind worship, but without the religious connotation/idolization element. Something between a blind worshipper and a home-teamer.

Is there a single word for 'blind worship' as in worshiping an actor blindly notwithstanding the bad performance?


I saw this from :  If we now also note that $ 1+2+3+\cdots+p = {(1/2)} \cdot p\cdot(p+1) $  What is the intuitive explanation for this?  How would I go about deriving the latter from the former?  It has the summation express which I am not sure how to deal with, so unfortunately I am not even sure how I would begin to show these are equivalent.

Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$.  How? What's the proof? Or maybe it is self apparent just looking at the above?   PS: This problem is known as "The sum of the first $n$ positive integers".


I own a country level domain called example.lk in Sri Lanka.  Also there was a site called example.com which is own by a reputable company in India. Sadly it is the .com version of my domain.  But they are not operating on that .com domain, instead they bought it and redirect it to their other site called example2.com  So their final product which is example2.com and my site which is example.lk belongs to same industry. Same business, which is classified ad listing.   So when someone in my country just type example word in google we can see their parked domain which is example2.com in search results. ( because it has huge traffic. but they are not doing any businesses in my country )  So if I start my business with my example.lk domain, can my domain beat them and appear on the top result within my country?  Can they acquire my domain?

I want to get a domain for my site. The site's topic would be about Vienna, but the content will be in English.   I was thinking, if I should get .com domain or .at domain. .at is both much cheaper and easier to get (there is less chance that my desired phrase is already registered).   Is there any disadvantage in terms of SEO and page rank, if my domain does not end with .com? The site will be in English and targeted not just for Austria, but globally, mostly foreign tourists.  I don't care if it's easy to remember the address, I expect most traffic to be from search engines anyway.


I am using a random forest regression to model a count of species from a number of different survey areas. Each survey area has a different size. My question is how to model the response variable, to account for these scaling effects? Should I scale the Count prior to fitting the model? Count <- Count / Survey_area_km2 model < fit(Count ~ pred1 + pred2 + ...)  And then when predicting over a set of survey areas, adjust the response variable prediction by the size of the survey areas I am trying to predict. This will give a count that is in proportion to each survey area? Count_predictions <- predict(model, prediction_areas) Rescaled_Counts <- Count_predictions * prediction_areas

Can a Random Forest be trained to appropriately predict count data? How would this proceed? I have quite a extensive range of values so classification doesn't really make sense. If I would use regression would I simply truncate the results? I'm quite lost here. Any ideas?


Here's the code where I should fill the square with different colors using menuBar  import java.awt.*; import java.awt.event.*; import java.awt.font.TextAttribute; import java.text.AttributedString; import javax.swing.*;  public class Hot {     public static void main(String[] args) {         MenuScribble frame;         frame = new MenuScribble("Square");         frame.setVisible(true);     } } class MenuScribble extends JFrame {      public MenuScribble(String s) {          super(s);         //setSize(500,500);         setVisible(true);         //pane.setSize(300, 300);         //add(pane, BorderLayout.CENTER);         MenuBar mb = new MenuBar();         setMenuBar(mb);         Menu menu = new Menu("Options");         mb.add(menu);          MenuShortcut keyYellow = new MenuShortcut(KeyEvent.VK_B);         MenuShortcut keyRed = new MenuShortcut(KeyEvent.VK_N);         MenuShortcut keyLabel = new MenuShortcut(KeyEvent.VK_M);          MenuItem yellow = new MenuItem("Fill with yellow", keyYellow);         MenuItem red = new MenuItem("Fill with red", keyRed);         MenuItem label = new MenuItem("Add a label", keyLabel);          yellow.addActionListener(new ActionListener() {              @Override             public void actionPerformed(ActionEvent e) {                 Pan obj = new Pan();                 obj.draw(1);                 }             });          red.addActionListener(new ActionListener() {              @Override             public void actionPerformed(ActionEvent e) {                 Pan obj = new Pan();                 obj.draw(2);             }         });         label.addActionListener(new ActionListener() {              @Override             public void actionPerformed(ActionEvent e) {                 Pan obj = new Pan();                 obj.draw(3);             }         });          Pan p = new Pan();          menu.add(yellow);         menu.add(red);         menu.add(label);         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         setSize(840, 500);         add(p);         p.setBounds(0, 0, 840, 370);         p.setBackground(Color.BLACK);     }  }   Wnen I'm trying to click on menu items I got that errors:   Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at Pan.draw(Hot.java:85)     at MenuScribble$1.actionPerformed(Hot.java:41)     at java.awt.MenuItem.processActionEvent(Unknown Source)     at java.awt.MenuItem.processEvent(Unknown Source)     at java.awt.MenuComponent.dispatchEventImpl(Unknown Source)   What should I change in the code to avoid errors? ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

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 recently created  and I wonder how can I make the image smaller, because it's too big. The image is added via URL.  I tried using kbd but it maintains it's size.

How can you thumbnail an uploaded image on Stack Overflow?


For division algorithm, would I do something along the lines of n³+2n = 3q+r and go from there?  For induction, I did the base case, which is true, and so then I moved on to the k+1 case, in which I did (n+1)³ + 2(n+1) to get n³+3n²+5n+3, which isn't all the way divisible by 3. WHat step did I do wrong here?

I can do it by induction, thanks to the wonderful people of this website, but I'm not sure how to do it by the Division algorithm. Can anyone help me? I think I can show how 3 divides 2n, but I'm not sure how to show that 3 divides n³.


Vanity Fair magazine (October 23 issue) carried an article titled, “A brief history of Michelle Obama career-goal rumors,” and wrote as follows under the caption, “She’s totally running in California.”     Rumors that the Obamas will relocate to Southern California have been   around for some time. But the idea of her gearing up to replace   Feinstein is somewhat novel. One of Richard Johnson’s unnamed sources   offered this insight into politics in the Golden State: “It’s a   shoo-in. A ham sandwich could get elected on the Democratic line in   California.”**      I was drawn to the expression, “She’s totally running in California,” more than the figurative use of "a ham-sandwich."  Oxford Advanced Learners’ English Dictionary defines “totally” simply as “completely.”  Does “She’s totally running in California” mean Michelle Obama will completely, i.e. definitely / very likely run in California?  “She’s totally running” sounds a bit awkward to me. Is it common to use the word, ‘totally’ in this way?

There was the following sentence in an article titled, “Like, Degrading the Language? No Way” in New York Times (April 5), in which the author says Americans are moving backward on language:     “(Like the use of ‘like’) the use of “totally” mines the same vein.   “He’s totally going to call you” does not mean “He is going to call   you in a total fashion.” It has a more specific meaning, although only   handled subconsciously by speakers, as so much of language is. “He’s   totally going to call you” contains an implication: that someone has   said otherwise or that the chances of it may seem slim at first glance   but in fact aren’t. As with “like,” “totally” tracks and nods to the   opinions of others. It’s totally civilized.”      Although the author explains “totally going to call you” contains an implication of someone having said otherwise, I’m not still clear with the meaning of “He’s totally going to call you.”   What does it mean? He’s totally going to call you “what”?   How does “He’s totally going to call you.” differ from “He’s going to call you.”? Is this expression (use of totally) ubiquitous today as the author asserts?


Let Y be a random variable with $$0\le Y\le 1.$$Show that $$var(Y)\le 1/4 $$ and that $$var(Y)= 1/4 $$ if and only if P(0)=1/2=P(1).

Show that. for any discrete random variable X that takes on values in the range [0,1]. Var[X] $\le$  1/4.  I translate it into a inequality like this: $x_1, x_2, x_3 \cdots ,x_n$ where $0 \le x_i \le 1$, and $p_1, p_2, p_3 \cdots ,p_n$ where $p_1+ p_2+ p_3 \cdots +p_n = 1$, prove that $\sum _1^nx_i^2p_i - (\sum _1^n x_ip_i)^2 \le {1\over 4}$ , how to prove it?  At first I tried cauchy inequatlity, but I fail :(


I've recently been flagged for a question and it was marked as duplicate.  How do I not get flagged for duplicate questions when I searched for a similar question but the search did not result in the questions and answers that I was looking for?

I always search to find whether my question is a duplicate or not before asking the question on Stack Overflow. But often I cannot find anything (maybe this is a language problem) and I ask my question. Then someone finds a duplicate question of my question and votes to close mine. So how can I avoid asking a duplicate question?


I know about the quadratic formula, and the cubic formula, so I was wondering if there were any more. My teacher said there was no such thing as a quintic formula, so I was wondering that if there was no such thing as one, why. Thank you.

There is a general formula for solving quadratic equations, namely the Quadratic Formula:  $$ x = \frac{ -b \pm \sqrt{ b^2 - 4ac } }{ 2a } $$  For third degree equations of the form $ax^3+bx^2+cx+d=0$, there is a set of three equations: one for each root. Is there a general formula for solving equations of the following form? $$ ax^4 + bx^3 + cx^2 + dx + e = 0 $$ How about for higher degrees? If not, why not?


The equality in question is widely used to solve for limits like $\lim_{n\to\infty} \frac{n+1}{n-2}$, but how do you actually prove that  $$\lim_{n\to\infty} \left(1+\frac{k}{n}\right)^n = e^k.$$ Is it possible to prove it using the other formula: $\lim(1+\frac 1 n)^n = e?$  EDIT: I think I already got it: $$(1+ \frac{k}{n})^n = (1+ \frac{1}{\frac{n}{k}})^{k \cdot \frac{n}{k}} \rightarrow e^k$$ Is this correct?

Is it trivial to say  $$\mathop {\lim }\limits_{n \to \infty } {(1 + {k \over n})^n} = e^{k},$$  considering the fact that we know $$\mathop {\lim }\limits_{n \to \infty } {(1 + {1 \over n})^n} = e?$$


I'm trying to get some words in bold and typewriter styles together but only typewriter is been applied. I saw in other question one not should use \bf while nesting, so I tried:  \texttt{\textbf{Mywords}} \textbf{\texttt{Other words}}   but both of them appear only with typewriter style. I'm in a document class scrreprt.

I'm using listings package, and I've added basicstyle=\ttfamily\footnotesize. However, when I do that, the keywords from the embedded source-code are not bold anymore.  I figured that \ttfamily together with \bfseries does not work.  And then I found a , and I tried adding \usepackage[bold-extras], and it didn't work either. What does that package do? Should I just ignore it and move on?  And then I finally found , which may be a duplicate to this one, but was a lot harder to find. I also found , which got me more confused.  So, what should I do in order to get a bold fixed-width font for use within listings?  Using pdflatex from texlive-2010.


Define the sequence of numbers $A_i$ by  $$A_0 = 2$$  $$A_{n+1} = \frac{A_n}{2} + \frac{1}{A_n}  \quad \text{for} \  n \geq 1$$  Prove that  $$ A_n \leq \sqrt{2} + \big(\frac{1}{2}\big)^n \quad \forall n \geq 0. $$ I already tried induction but it didn't help in this case.  The question is : beside induction what is other approach to solve this kind of problem ?

I am working on  problem 3 from MIT's Fall 2010 OCW class 6.042J. This is covered in  which is about recurrences.  Here is the problem:  $$A_0 = 2$$ $$A_{n+1} = A_n/2 + 1/A_n, \forall n \ge 1$$  Prove   $$A_n \le \sqrt2 + 1/2^n,  \forall n \ge 0$$  I have graphed the recurrence and the upper bound and they seem to both converge on $\sqrt2$.    Also, if you ignore the boundary condition $A_0 = 2$ then you find that $\sqrt2$ is a solution to the main part of the recurrence. i.e. $\sqrt2 = \sqrt2/2 + 1/\sqrt2$.  The chapter and videos on recurrences have a lot to say about a kind of cookbook solution to divide and conquer recurrences which they call the Akra-Bazzi Theorem. But this recurrence does not seem to be in the right form for that theorem. If it were in the form $A_{n+1} = A_n/2 + g(n)$ then the theorem would give you an asymptotic bound. But $1/A_n$ is not a simple function of $n$ like a polynomial. Instead it is part of the recurrence.  Also, the chapter has a variety of things to say about how to guess the right solution and plug it into an inductive proof, but I haven't had much success. I have tried possible solutions of various forms like $a_n = \sqrt2+a/b^n$ and tried solving for the constants $a$ and $b$ but to no avail.  So, if someone can point me in the right direction that would be great. I always assume that the problem sets are based on something taught in the videos and in the text of the book but I am having trouble tracking this one down.  Bobby


I was at Cebu International Airport. It was my first time travelling and I didn't know what to do. I got my luggage and exited the airport without passing through customs. How serious is this mistake?

I was a first time traveler and didn't know what to do.  I got my luggage and exited the airport without going through the customs. I didn't pass when I arrived in the country that I travelled to and didn't pass again when I arrived at the country I travelled from.  It's an honest mistake, I just didn't know what to do then until my friend told me.    I am planning to travel again but I am afraid that I may have violated something and they will not allow me to leave.  Can I get penalized?


While I was using Stack Overflow at work, someone's just spoilt the twelve-hour old Game of Thrones season finale for me with an extremely ill-advised question title over on SFF.SE. Hot Network Questions popped it up right there alongside the answer I was reading about whether C++ strictly "includes" C from a language lawyer perspective. My efforts to entirely avoid Facebook, YouTube, Quora, Twitter and SFF.SE itself throughout today were ultimately, then, in vain. The question's title has since been edited (presumably by a higher-rep user — I didn't look at anything but the page title), but it's too late.  The least invasive change I can think of proposing right now is to allow us to remove certain sites from the Hot Network Questions rotation. So if we're in the middle of Game of Thrones season, I'd probably remove SFF.SE and Movies & TV from my HNQ display. I do find myself visiting lots of interesting questions on those sites through HNQ, but short of making spoilers punishable by death and hoping that word of this new law spreads, I can't think of anything else to suggest.

I was going to make a filter for the "" by excluding some sites from it.  I noticed  which talks about "negative filtering" but does not explain how one can do it or if it is possible.  There does not seem to be a way to do this, though.  On the filter page, my only options are:  So how can I do "All sites except [list]"? It would also be nice if this could include similar functionality with the meta checkbox.  Something like "All main & meta sites except..."


I want to concatenate a variable and a string. while read subject; do     pathproc=/projects/guo_lab/cbis/users/yang/DICA_result     echo  ${pathproc}/${subject}"_"weight done < /projects/guo_lab/cbis/users/yang/Fulllist_tractography.txt  The result is this: _weightrojects/guo_lab/cbis/users/yang/DICA_result/609812419171  Why is this happening? The correct form in my mind is: /projects/users/yang/DICA_result/609812419171_weight  How can I get this? By the way, if I delete the _weight, it just give: /projects/users/yang/DICA_result/609812419171  Thanks so much.

I've a file named addresses.txt :  address1@domain.com address2@domain.com address3@domain.com   I'd like to echo "address1@domain.com.html" using for loop. Here's what I did :  cat addresses.txt | while read address do echo "${address}.html" done   Here's the result :  .htmlss1@domain.com .htmlss2@domain.com .htmlss3@domain.com   Same result if I add a space between the variable and ".html"  What am I miss ?  Thanks


My idea is to have the image take the rest of the available viewport height after subtracting the height of the header. For example, if my viewport is 1000px height and my header is 100px height to make the image's height to 900px.   In the example below, I've set the max-height of the image to 100vh, however, since there's a header as well, a scrollbar appear to the side. I'm trying to make the max-height of the image be viewport minus header. Is it correct to assume this is done with JavaScript? Any tips or pointers to use in order to figure out how to do it?    *, *:after, *:before {     margin: 0;     padding: 0;     -webkit-box-sizing: border-box;     box-sizing: border-box;     text-decoration: none; } a {     color: #f1f1f1; } html {     font-size: 16px; } body {     background-color: #fafafa;     font-family: 'Roboto', sans-serif;     height: 100%;     width: 100%; } .navigation {     background-color: #171717; } .navigation-ul {     display: flex; } .navigation-ul>li:not(.dropdown) {     padding: 15px 13px 15px 13px;     font-weight: 500;     text-align: center;     font-size: 1em;     color: white;     background-color: #151719;     list-style-type: none; } .specific-image-flexbox {     display: flex; } .specific-image-column {     flex: 4; } .specific-image-container {     text-align: center;     width: 100%; } .specific-image {     display: block;     max-height: 100vh;     max-width: 100%;     margin: 0 auto; }

Images

Albums

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


I want to export data to a .csv file without having to display the chart. .   I want to skip the chart-display part because I'm working with long times series and if I try to display the chart I get the following error:"Error generating chart: Collection query aborted after accumulating over 5000 elements" as it is shown in the code below.  var regions = ee.FeatureCollection([   ee.Feature(    // San Francisco1.     ee.Geometry.Rectangle(-122.79, 37.82, -122.6, 37.6), {label: 'SF1'}),   ee.Feature(  // San Francisco2.     ee.Geometry.Rectangle(-122.6,  37, -122.48, 36.7), {label: 'SF2'}),  ]); Map.addLayer(regions);  var chl = ee.ImageCollection("NASA/OCEANDATA/MODIS-Aqua/L3SMI")     .filterDate('2003-10-25', '2017-08-25')     .select('chlor_a');  // Create a time series chart. var chltimeseries = ui.Chart.image.seriesByRegion(     chl, regions, ee.Reducer.mean(), 'chlor_a', 200, 'system:time_start', 'label')         .setChartType('ScatterChart')         .setOptions({           title: 'Chlorophyl levels',           vAxis: {title: 'mg/m3'},           lineWidth: 1,           pointSize: 4,           series: {             0: {color: 'FF0000'}, //SF1             1: {color: '00FF00'}, //SF2 }});  // Display. print(chltimeseries);

Following the example provided in the GE tutorial  (see below), how can I export the data to a .csv without using the ui.Chart.image.seriesByRegion?   // Define a FeatureCollection: regions of the American West. var regions = ee.FeatureCollection([   ee.Feature(    // San Francisco.     ee.Geometry.Rectangle(-122.45, 37.74, -122.4, 37.8), {label: 'City'}),   ee.Feature(  // Tahoe National Forest.     ee.Geometry.Rectangle(-121, 39.4, -120.8, 39.8), {label: 'Forest'}),   ee.Feature(  // Black Rock Desert.     ee.Geometry.Rectangle(-119.15, 40.8, -119, 41), {label: 'Desert'}) ]);  // Load Landsat 8 brightness temperature data for 1 year. var temps2013 = ee.ImageCollection('LANDSAT/LC8_L1T_32DAY_TOA')     .filterDate('2012-12-25', '2013-12-25')     .select('B11');  // Create a time series chart. var tempTimeSeries = ui.Chart.image.seriesByRegion(     temps2013, regions, ee.Reducer.mean(), 'B11', 200, 'system:time_start', 'label')         .setChartType('ScatterChart')         .setOptions({           title: 'Temperature over time in regions of the American West',           vAxis: {title: 'Temperature (Kelvin)'},           lineWidth: 1,           pointSize: 4,           series: {             0: {color: 'FF0000'}, // urban             1: {color: '00FF00'}, // forest             2: {color: '0000FF'}  // desert }});  // Display. print(tempTimeSeries);


I want to reedit the algorithm in the paper. But the statement can not stay in the right place when I have a long state in algorithmicx.  I want it aligned as the paper does. Is there any simple solution?  My code is  \documentclass{IEEEtran} \usepackage{algorithm}  \usepackage{algpseudocode}    \begin{document}  \begin{algorithm}     \caption{Funcation scaleUpResources()}      \begin{algorithmic}[1]         \State Select a kind of $newVm$ satisfying the $r_{new}\left(t_{i}\right)+t s_{i} / P_{new}+delay<d_{i}$;         \State Sort $H_a$ in a decreasing order by the remaining MIPS;         \For {$h_k$ in $H_a$}             \If {$h_k$ can accommodate $newVm$}                 \State create $newVm$ on $h_k$;                 \State return $newVm$             \EndIf         \EndFor         \For {$h_s$ in $H_s$}             \State{                 Migrate the VM with minimal MIPS to other hosts with the fault-tolerant requirements: 1. The primary and the backup of one task can not allocate on the same host 2. $t_i^P$ and $t_j^P$ can not  on the same host if $t_i^B$ and $t_j^B$ overlap.             }              \If{$h_s$ can accommodate $newVm$}                 \State Create $newVm$ on $h_s$;                 \State return $newVm$             \EndIf         \EndFor         \State Turn on a host on $h_new$ in $H_s$;         \If{the MIPS of $h_{new}$ satisfies $newVm$}             \State Create $newVm$ on $h_new$             \State return $newVm$         \Else             \State return $NULL$         \EndIf     \end{algorithmic}  \end{algorithm}  \end{document}   The view in my LaTeX:    The view in the paper:

Trying to get the indentation right within the algorithmic environment I run into trouble, and all the solutions posted so far have not been able to solve my problem as I'd like to see it solved.  I want continued lines to have an indentation w.r.t the initial line (new to this forum and yet unable to post images).  However, the best I get with what I've found on this forum is either a fixed indentation for all continued lines (i.e., no difference if the initial line was indented or not), or the same indentation as the initial line (see MWE below).  Anybody has an answer to this?  \documentclass[10pt, A4]{report} \usepackage{algorithm} \usepackage{algpseudocode}  \begin{document}  \begin{algorithmic}\raggedright  \State Define N\_crf as the number of points on the circumference of the hyperstreamline, which will define its cross-sectional area at each r  \For {n = 1 : number of tracts}  \State \parbox[t]{\dimexpr\linewidth-\algorithmicindent\relax}{define N\_crf points creating a unit circle around r(n,i), in the plane perpendicular to t(n,i).}\strut  \EndFor  \end{algorithmic}  \end{document}


I am building a Bluetooth speaker and will have two power options running into a DPDT Switch. One side of the switch will go to an 11.1 volt 2200 milliamp battery which will be regulated to 12v. The other side of the switch will go to an AC adapter receptacle. This will give me the option to run off the battery or a 12v AC adapter but neither at the same time. The battery will be charged separately off a different circuit receptacle.   My question is would it be a good idea to put a diode on the positive battery line running to the DPDT in case the switch ever failed while running off of AC? This would be a safety measure since I know LiPos can be dangerous and I wouldn't want power going back into the battery from the AC adapter source. If this is a good idea what type of diode should I get and would it only go on the positive side and before or after my regulator before going into the switch?

I do understand that similar questions and maybe even the same question has been asked before, I've found them but unfortunately as a result of inexperience on my part I have been unable to adapt the posted solutions to my design specifically.  I am currently working to build the power side of my overall circuit that uses an 18650 (3.7v, 2600mAh) battery that is charged through an MCP73833 IC. The source power for charging will be a 5V wall wart power supply. What I am trying to accomplish now is to create a path or switch that disconnects the battery when the 5V power supply is connected, while preferably allowing the the 5V to be used to power the project and charge the battery at the same time.  Based on prior answers here on EE, I've heard that two Schottky diodes can be used with a little forward voltage drop; I've also seen recommendations for FET's. I'm trying not to add any more IC's to the project if I do not need too especially since I'm hand soldering all of this (not meaning FET's, but actual IC's).   Forward voltage drop is not critical since I'll need to step-up the battery voltage anyway after this circuit (to 5V for MAX7219). So it wouldn't be a big deal to run both power sources through the same booster.  My problem is that I have zero experience with Schottky diodes and even less with Mosfets. I've been reading and trying to understand but just when I think I do, I look at my circuit and my brain turns to mush.     Obviously if you see any errors within the circuit and wouldn't mind pointing them out, I'd appreciate that as well.


I want to write a batch file to execute a Cmd command with parameters:  @ECHO OFF .\someCommand.exe /log verbose.log   If I only provide the log file without a directory, then, for an undetermined reason, the command writes the logfile into some temporary folder.  So if I want to have logging into the file verbose.log in the same directory the command is in, I would have to call:  .\someCommand.exe /log C:\full\path\to\this\directory\verbose.log   However, that full path changes from system to system, and I want a single batch file that works on all systems (as long as the batch file is in the same directory as the someCommand.exe). How can I get that path into that command line parameter?

Is there a Windows command line command that I can use to get the full path to the current working directory?  Also, how can I store this path inside a variable used in a batch file?


I am new to latex i want to set a width and height of the mdframed. can any one help me to achieve this task.  \documentclass{article} \usepackage{xcolor} \usepackage{mdframed} \newtheorem{mdtheorem}{Theorem}  \newenvironment{theorem}%  {\begin{mdframed}[backgroundcolor=lightgray]\begin{mdtheorem}}%  {\end{mdtheorem}\end{mdframed}} \begin{document} \begin{theorem} Sample \end{theorem} \end{document}     My current output is ,  My expected output is

Consider this:  \documentclass{article} \usepackage[framemethod=TikZ]{mdframed}  \begin{document} \begin{mdframed}[innerrightmargin=0pt] TEXT\end{mdframed} \end{document}   This produces a frame that is much wider than its content:    I know this is not a bug: the mdframed documentation mentions a userdefinedwidth parameter that defaults to \linewidth. But how can I get a mdframed frame that has the same width as its content?   (What I actually need is a box with rounded corners and shading options; breaking over multiple pages isn't necessary. mdframed seemed like the easiest way to get the box, but if it's too much hassle to make it size to content, it would be useful to know so I can try pure tikz.)


I have one table like this..  TicketID    Name     111         ABC 111         DEF 222         GHI 333         ABC 333         GHI   I need output like this..  TicketID    Name     111         ABC, DEF 222         GHI 333         ABC, GHI   I have found a same kind of query try to do it with Stuff function but don't know why m not getting exact result  Can anyone give me query for SQL Server.. n tell me how actually it process.

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


I'm trying to parse input on spaces and put these tokens into an array. But taked quoted string as a one word. For example, assume input is:  dsas r2r "this is a sentence" asd   and array elements should be:  array[0]="dsas" array[1]="r2r" array[2]="this is a sentence" array[3]="asd"   To solve the problem I used split method but it didn't help to me     String input1=input.nextLine();    input1=input1.trim();    String delims="[ \"]+";    String[] array=input1.split(delims);   How can I fix this problem? I have to put tokens into an array and i have to don't use arraylist.

I'm new to regular expressions and would appreciate your help.  I'm trying to put together an expression that will split the example string using all spaces that are not surrounded by single or double quotes. My last attempt looks like this: (?!") and isn't quite working. It's splitting on the space before the quote.  Example input:   This is a string that "will be" highlighted when your 'regular expression' matches something.   Desired output:  This is a string that will be highlighted when your regular expression matches something.   Note that "will be" and 'regular expression' retain the space between the words.


What about DPI when sizing to 2048 the long way?  Mine are usually 300dpi but since FB (FaceBook) changes that to 72 dpi, would I be better off to change to 72 dpi myself before uploading?  Thank you!

I often see statements in discussions about web displayed image quality that go something like this: "I only upload pictures at 72 dpi and 1200 pixels on the long edge, so if someone copies and prints the image it won't look as good as if it were 300 dpi."  What? Have I missed something here?  Does an image edited and saved/exported with 1200x800 pixels at 300 ppi look any different online than the same image saved/exported with 1200x800 pixels at 72 ppi? Other than the metadata regarding ppi, is there any difference in the two images at all? If so, what is the difference? If I tell my printer to print the images at 4R (4X6 inches) will there be any difference at all in how the printer creates a print from the 1200x800 @ 300 dpi image versus the 1200x800 @ 72 dpi image?


I know that $\int_{-\infty}^{\infty} x dx= \int_{-\infty}^{0} xdx + \int_{0}^{\infty} xdx$ and both of these integrals is divergent, so the previous integral is divergent too, but I think it is easy to see that $\int_{-\infty}^{\infty} xdx=0$, what is wrong what is wrong with my intuition?

I'm currently studying integrals in calculus. In teaching improper integrals over infinite intervals, I come across this example in my lecture notes,  $$\int_{-\infty}^{\infty} x \ dx$$  Naturally, the integration is split into two halves, such as $\int_{-\infty}^{0}x\ dx=-\infty$ and $\int_{0}^{\infty}x\ dx=\infty$. The lecture notes conclude that since both these improper integrals diverge, then so does the above improper integral, i.e.  $$\Rightarrow\int_{-\infty}^{\infty}x\ dx\ \mathrm{diverges}$$    Intuitively, however, I would expect that the first improper integral, $\int_{-\infty}^{\infty}x\ dx$ should evaluate to $0$, given that,   An intuitive meaning of the definite integral is the area under the curve The curve of $y=x$ gives a negative area for $(-\infty,0)$ and positive area for $(0, \infty)$ The curve of $y=x$ is symmetrical about $y=0$   So, my questions are   Why is this not the case, and Is $\int_{-\infty}^{\infty}x\ dx\ \mathrm{diverges}$ even what I think it means, that $\int_{-\infty}^{\infty}x\ dx=\infty$?


Has Imgur stopped giving direct file links to images uploaded?  I can't see a direct file link to this image:     (I know that the Stack Exchange website still integrates with Imgur, and gets a direct link, but I'm not asking about that.)

It was possible to get the direct link some months ago but now, since Imgur was updated, I am unable to find the direct link. See:


In the following code when I add the the line which is specified with an arrow gives error:      Error in `./a.out': double free or corruption (fasttop):   0x00000000007a7030 * Aborted (core dumped)   The code works if I do not use destructor. Any idea?  #include<iostream> #include<vector>  struct Element {     int *vtx;      ~Element ()     {         delete [] vtx;     } };  int main () {     Element *elm = new Element [2];     elm[0].vtx = new int [2]; // <----- adding this gives error      std::vector <Element> vec;     vec.push_back (elm[0]);     vec.push_back (elm[0]);      return 0; }

I have a class that contains a dynamically allocated array, say  class A {     int* myArray;     A()     {         myArray = 0;     }     A(int size)     {         myArray = new int[size];     }     ~A()     {         // Note that as per MikeB's helpful style critique, no need to check against 0.         delete [] myArray;     } }   But now I want to create a dynamically allocated array of these classes. Here's my current code:  A* arrayOfAs = new A[5]; for (int i = 0; i < 5; ++i) {     arrayOfAs[i] = A(3); }   But this blows up terribly. Because the new A object created (with the A(3) call) gets destructed when the for loop iteration finishes, and this means that the internal myArray of that A instance gets delete []-ed.  So I think my syntax must be terribly wrong? I guess there are a few fixes that seem like overkill, which I'm hoping to avoid:   Creating a copy constructor for A. Using vector<int> and vector<A> so I don't have to worry about all this. Instead of having arrayOfAs be an array of A objects, have it be an array of A* pointers.   I would think this is just some beginners thing where there's a syntax that actually works when attempting to dynamically allocate an array of things that have internal dynamic allocation.  (Also, style critiques appreciated, since it's been a while since I did C++.)  Update for future viewers: All of the answers below are really helpful. Martin's is accepted because of the example code and the useful "rule of 4," but I really suggest reading them all. Some are good, succinct statements of what's wrong, and some point out correctly how and why vectors are a good way to go.


In java it's possible to do that; String a = "aaaa"; Integer b = 1;  and also that; String a = new String("hello "); Integer ad = new Integer(8);  first question : why is that possible and what's name of this standard ? second question : explain how to work this special case ? Third question : Is possible to do the same with my own object ? for example : Person p = "Med";  in place to do that Person p = new Person("Med");

Is it possible to implement autoboxing for your own classes?  To illustrate my example, this is what I might want to write:  Foo foo = "lolcat";   And this is what Java would do (as per my own definitions, somewhere, somehow), under the hood:  Foo foo = new Foo(); foo.setLolcat("lolcat");   So, is this possible somehow, or is it a JVM-feature only?


I have two questions-   List all packages order by name  Search for a specific package that is intalled or not?

I'm on a CentOS machine. I updated and installed some packages a few weeks back, but I don't remember the name of every package or the names of every dependency. I used yum.  Can I list the packages on my system by the date they were last installed or updated?


I'm new to concept of what fillfactor is and why it is used. So far, reading , I've learned that by setting the fillfactor configuration of an index, we specify how much space on each page should remain free, so that whenever a new record needs to be added to a page, there will be some free space for it. My question is that:  Is that free space on each page, intended to remain free? I can guess that, that free space is used when an insert happens, but later the database engine, moves data, so that again we have some free space in each page. Is this what happens in a DBMS?

I have a test scenario where I have added fill-factor = 90 to a clustered index over a random generated GUID primary key.   If I create the table without fill-factor = 90 then the number of page splits is initially 31 for 3974 rows and splits occur with every subsequent insert. When I include the fill-factor = 90 the number of splits on population rises to 35 but splits stop happening with every subsequent insert. All good so far!   The problem is that when I add a non-clustered index although the clustered index still indicates a fill-factor of 90% the initial insert is back to 31 splits and splits are happening again on every subsequent insert indicating that the fill-factor is being ignored.   Does anyone have an idea as to why this might be happening?      /*     scenarios:     1. Create table #Test02 without fillfactor, populate and observe 37 page splits occured, insert two rows at a time and observe page splits occurring     2. Drop and create table #Test02 with filfactor = 90, populate and observe 40 page splits occurred, insert two rows at a time and observe that page splits do not occurr     3. Drop and create table #Test02 with filfactor = 90, insert two rows then populate, observer 38 page splits occurred, insert two rows at a time and observe page splits occurring     4. Drop and create table #Test02 with filfactor = 90, create index IX_#Test02_ProductName, populate and observe 37 & 35 page splits occurred, insert two rows at a time and observe that page splits occur on PK     5. Rebuild index PK_Test02, insert two rows at a time and observe that page splits do not occurr      Conclusion: On an empty table with a PK FF = 90 SQL preserves the fill factor     */      --non-sequential index table     IF OBJECT_ID('tempdb.dbo.#Test02') IS NOT NULL DROP TABLE #Test02     --CREATE TABLE #Test02(ID uniqueidentifier default newid(), ProductName nvarchar(150), CONSTRAINT PK_Test02 PRIMARY KEY CLUSTERED (ID))      CREATE TABLE #Test02(ID uniqueidentifier default newid(), ProductName nvarchar(150), CONSTRAINT PK_Test02 PRIMARY KEY CLUSTERED (ID) WITH (FILLFACTOR = 90))      --ALTER INDEX PK_Test02 ON #Test02 REBUILD WITH (FILLFACTOR = 90);        IF EXISTS (SELECT * FROM tempdb.sys.indexes WHERE name = N'IX_#Test02_ProductName') DROP INDEX IX_#Test02_ProductName ON #Test02     CREATE INDEX IX_#Test02_ProductName ON #Test02(ProductName)      --populate script     INSERT #Test02(ProductName)     SELECT TOP 4000 COALESCE(O1.name,O2.name)       FROM master.sys.objects O1 CROSS JOIN master.sys.objects O2      --two row insert     INSERT #Test02(ProductName) VALUES(N'Straight Banana'),(N'Bent Banana')      --observe page splits     SELECT ios.index_id          , o.name as object_name          , i.name as index_name          , ios.leaf_allocation_count as page_split_for_index          , ios.nonleaf_allocation_count page_allocation_caused_by_pagesplit          , ios.leaf_insert_count          , i.fill_factor       FROM tempdb.sys.dm_db_index_operational_stats(db_id(N'db_name'), null, null, null) ios       JOIN tempdb.sys.indexes i on ios.index_id = i.index_id AND ios.object_id = i.object_id       JOIN tempdb.sys.objects o on ios.object_id = o.object_id      WHERE o.type_desc = N'user_table'         AND o.name like N'#test02%'


I want to plot a subfigure side by side using \ContinuedFloat as shown below:  However, I always get below:  \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------------------------% \usepackage{lipsum}  \begin{document}  \begin{figure}[hb!]     \centering     \begin{subfigure}{0.6\textwidth}         \includegraphics[width=\textwidth]{example-image}         \subcaption{$Q^{*}$ values for arm 1}         \label{fig:arm1}     \end{subfigure}      \begin{subfigure}{0.6\textwidth}         \includegraphics[width=\textwidth]{example-image}         \subcaption{$Q^{*}$ values for arm 2}         \label{fig:arm2}     \end{subfigure}      \begin{subfigure}{0.6\textwidth}         \includegraphics[width=\textwidth]{example-image}         \subcaption{$Q^{*}$ values for arm 3}         \label{fig:arm2}     \end{subfigure}     \caption{$Q^{*}$ values for different arms} \end{figure}%  \begin{figure}[ht]\ContinuedFloat     \centering     \begin{subfigure}{0.45\textwidth}         \includegraphics[width=0.9\textwidth]{example-image-a} %         \subcaption{$Q^{*}$ values for arm 4}         \label{fig:arm3}     \end{subfigure}      \begin{subfigure}{0.45\textwidth}         \includegraphics[width=0.9\textwidth]{example-image-b} %         \subcaption{$Q^{*}$ values for arm 5}         \label{fig:arm4}     \end{subfigure}     \caption{$Q^{*}$ values for different arms (cont.)}     \label{fig:arms} \end{figure}       \begin{figure}     \centering     \begin{minipage}{0.45\textwidth}         \centering         \includegraphics[width=0.9\textwidth]{example-image-a} % first figure itself         \caption{first figure}     \end{minipage}\hfill     \begin{minipage}{0.45\textwidth}         \centering         \includegraphics[width=0.9\textwidth]{example-image-b} % second figure itself         \caption{second figure}     \end{minipage} \end{figure}           \end{document}

I want to arrage two figures in "side-by-side" (left-right). But the out put I got is like this (top-bottom):   My code is here.  \documentclass{article} \usepackage{graphicx} \usepackage{subcaption}  \begin{document}  This is sample latex code.  \begin{figure} \centering \begin{subfigure}{0.4\textwidth}   \includegraphics[width=0.4\linewidth]{linux.jpeg}   \caption{A subfigure}\label{fig1} \end{subfigure}  \begin{subfigure}{0.4\textwidth}   \includegraphics[width=0.4\linewidth]{latex.jpeg}   \caption{A subfigure}\label{fig2} \end{subfigure}  \end{figure}  \end{document}   Obviously, there is a large room to arrange the two figures left and right positions respectively. But latex does this space wasting arrangement. How can I fix it?  Note that I'm using TexLive 2018 installed on Mac.


This is my exercise in Complex Analysis.  $$ \int_0^\infty \left(\frac{\sin x}{x}\right)^2\,dx = ? $$  I tried solving this by $(\sin x)^2=1-\cos(2x)$ but I realized that $\int_0^\infty \frac{dx}{x^2}$ does not converge.  Can someone help me? Thank you so much.

I am trying to compute the following integral using the Residue Theorem but am quite stuck: $$\int_0^\infty \frac{\sin^2x}{x^2}dx$$ I have tried applying Jordan's lemma, having written $\sin(x)$ as $\dfrac{\mathrm{e}^{ix}-\mathrm{e}^{-ix}}{2i}$, to not much avail. I have also tried using a rectangular integration path but it didn't get me far. I'd be grateful for an insightful advice.


This is most likely very easy to show, but with the load of midterms I had, my brain just declines to work properly. How do I determine the convergence of $$\sum_{n\geq 2}{} \frac{(-1)^{n}}{(-1)^n+n}$$?

I have to investigate convergence of series $$\sum_{k=10}^{+\infty}\frac{(-1)^k}{k+(-1)^k}$$ It certainly does not converge absolutely, because it is basically a harmonic series with every two elements flipped and if harmonic series converged, or greater than series $$\sum_{k=10}^{+\infty}\frac{1}{k-1}$$ However, I do not know, how to prove convergence of this series overall. I thought about the fact, that it is basically a harmonic series(well, alternating harmonic or whatever I should call it) with every two elements flipped and if normal "alternating harmonic series" converges, then this rearangement could technically converge too. However, I am not sure if this is sufficient enough and if I can do this and I am afraid that it is not. I was considering those theorems that say "every divergent series with alternating elements can be rearranged to make arbitrary finite sum" and I am not sure if it holds with convergent series, respectively, if it holds against convergent series and infinity - that you can rearrange convergent series to make divergent...  Neverthless, there should be an easy way to prove that this sum is convergent/divergent, since it is in our textbook.  Also I thought, since it is certainly lesser or equal to $1/(k-1)$ and greater or equal to $1/(k+1)$ assigning numbers $S_1$ and $S_2$ to sums of these "alternating harmonics" and just saying that it is lower bounded by $S_2$ and upper bounded by $S_1$, since those series are convergent and have to be upper and lower-bounded too. But also, I am not sure if this is enough.


Is there any way to see a list of downloaded programs like in the Windows 7 control panel?   The downloads section of My Files doesn't appear to hold anything even though I successfully downloaded youtube-dl (and would like to remove it) through the terminal.   Very new to Linux and compsci in general, any help is greatly appreciated. Thanks

I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system.  How would I do this?


Is it true that if $C$ has measure zero and is in $[0,1]$, then $[0,1]\backslash$ $C$ dense in $[0,1]$ for any general $C\subset [0,1]$?  If not, what are some counterexamples?

As a problem during introduction to measure theory, I am asked to prove the following.  Let $A \subset [0,1]$ such that $A$ is measurable with $\mu(A) = 0$ ($\mu$ being the Lebesgue measure). Prove that $A^c =  [0,1] \setminus A$ is dense in $[0,1]$.  This makes intuitive sense to me $-$ since $\mu(A) = 0$, using that $\mu(X) = \mu(X \cap A) + \mu(X \cap A^c)$ for every $X \subseteq \mathbb{R}$ we get $\mu([0,1]) = \mu(A) + \mu(A^c) = \{\mu(A)=0\} = \mu(A^c)$. Thus, $A^c$ has the same measure as $[0,1]$. I am aware that this is not the definition of $A^c$ being dense in $[0,1]$ though, and I do not know how to formalize this proof.  Any advice would be appreciated.


I am building a simple NN for a regression analysis (0.5 mln rows of data) in Keras. # Define model model = Sequential() model.add(Dense(32, activation = 'relu')) model.add(Dense(32, activation = 'sigmoid')) model.add(Dense(1)) # Define model parameters model.compile(optimizer = 'sgd', loss = 'mse', metrics = [tf.keras.metrics.MeanAbsoluteError()])  I am satisfied with results, but would like to know if there is any rule of thumb or recommendations how to build such models for a regression analysis. For example:  How many layers? Which activation functions? Which optimizer?  What is your state of the art approach, when you start to do such type of analysis? Especially appreciate any academic sources.

Is there a standard and accepted method for selecting the number of layers, and the number of nodes in each layer, in a feed-forward neural network? I'm interested in automated ways of building neural networks.


I am not a network person, so, I'm not sure how to ask this question.  Let's say we have our own DNS server that is local to our company.  Someone registers a new domain name or a change is made to DNS records and the authoritative name servers have been updated.  How does our local DNS server know about the new domain name or a change to an existing domain name?  I mean, a request has to come from our local network in order for our local DNS to even know about the name, right?  It's not like authoritative name servers push information to every DNS server automagically.  Am I'm correct that requests have to come from our local DNS servers in order for the local records to be updated?  And does that mean the only way our DNS servers will be updated is when a request is made for a domain name by a user?  thx

when i type www.google.com how does the dns lookup work. According to my knowledge it first goes to the root server and finds out where the .com dns server is. Next it returns the ip address of that server. Next from there is finds out where the google server is. Now it returns a ip address and that would be the place where www.google.com is found.  So to resolve this two dns look ups are needed. Correct me if iam wrong.


I'm creating new input field with JQuery that include a remove button. The remove button works on the original element but does not work on those that were created using JQuery.  document after two new email fields added  <fieldset>                 <legend>Send Email</legend>                 Emails(s) to send notice to.
                     <input type="email" name="emails[]" style="cursor: auto; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHklEQVQ4EaVTO26DQBD1ohQWaS2lg9JybZ+AK7hNwx2oIoVf4UPQ0Lj1FdKktevIpel8AKNUkDcWMxpgSaIEaTVv3sx7uztiTdu2s/98DywOw3Dued4Who/M2aIx5lZV1aEsy0+qiwHELyi+Ytl0PQ69SxAxkWIA4RMRTdNsKE59juMcuZd6xIAFeZ6fGCdJ8kY4y7KAuTRNGd7jyEBXsdOPE3a0QGPsniOnnYMO67LgSQN9T41F2QGrQRRFCwyzoIF2qyBuKKbcOgPXdVeY9rMWgNsjf9ccYesJhk3f5dYT1HX9gR0LLQR30TnjkUEcx2uIuS4RnI+aj6sJR0AM8AaumPaM/rRehyWhXqbFAA9kh3/8/NvHxAYGAsZ/il8IalkCLBfNVAAAAABJRU5ErkJggg==); background-attachment: scroll; background-position: 100% 50%; background-repeat: no-repeat;">x

<input type="email" name="emails[]">x

<input type="email" name="emails[]">x

                     Add Another Email

                     Send Email
             </fieldset>   Script

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Question:  Let $f : A \rightarrow B$ be a function and $C$, $D ⊆ A$ Prove that if $f$ is injective then $f(C) ∩ f(D) \subseteq f(C ∩ D)$.  My attempt:  Let $ y \in f(C) \cap f(D)$ implies $y \in f(C)$  and $y \in f(D)$  which implies $y = f(a)$  for  some $a \in C$  and  $y = f(b)$ for  some  $b\in D$.  I am not sure how to use the fact that $f$ is injective in order to continue.

Let $f:X\to Y$ be a function, and let $\{S_{i}:i\in I\}$ be a family of subsets of $X$. Then, $$f\left(\bigcup_{i \in I}S_i\right) = \bigcup_{i \in I}f(S_i).$$  The case where $f(A\cup B)= f(A)\cup f(B)$ is trivial and I've proved this many times in other classes. However, I believe that the problem I am running into is with notation. That is, I don't understand what the set $I$ is. Will my proof method be just the same?  Also, I would like a little help on one more problem. If $S_{1}$ and $S_{2}$ are subsets of a set $X$, and if $f:X\to Y$ is an injection, then $f(S_{1}\cap S_{2})=f(S_{1})\cap f(S_2)$. Now, I know how to prove $f(S_{1}\cap S_{2})\subseteq f(S_{1})\cap f(S_2)$ if our function is not injective, and I know counterexamples of why it isn't equal our function isn't injective. Unfortunately, I am not sure how to use the fact that our function is injective to prove $f(S_{1})\cap f(S_2) \subseteq f(S_{1}\cap S_{2})$. Any help would be much appreciated. Thank you very much!  Note: These questions are coming from Rotman's Intro to Abstract Algebra Chapter 2.


I am trying to find out how to approach a relief type project. I have a background image and a flat plane mesh to sculpt on, but I actually don´t see any changes looking straight on top. When I tilt the perspective a bit the image disappears.  Is there a way to make the image appear at all perspectives?

Not only in ortho: top, front, back.  Please don't link this answer   I want a background image like this guy has ->


I am using Ubuntu for the first time, I have tried it before, but I accidentally deleted all my partition, after that I installed it on my 16Gb pen drive, but now it is so slow it takes a lot of time on every click. What can I do about it?

I am currently running Ubuntu 11.10 off of a SanDisk 16GB USB. I installed it using a Live USB with the following partition configuration:  6GB Primary /dos   FAT32 5GB Logical /      ext4 5GB Logical /home  ext4   I don't have a hard disk, and don't see myself getting one anytime soon.   I rely solely on this 16GB, and two other 4GB USBs, one of which I used as the LiveUSB. I bring the USBs around, and even use the install at work.   I previously used an install that used a swap file. It functioned fine for the most part, save for a few slow moments, but I came across , and it got me thinking about my USB's life, so I reinstalled with the current config.   My problem now is that it is slower. Applications like Firefox would hang more often. In my previous setup (the automatically partitioned setup), Firefox would start hanging if I was running an unzip or install task on the same partition as /.   Now however, it would hang if I had another window open i.e. the system settings window. My guess is that it may have something to do with the swap file or the install being on a Logical partition rather than a Primary partition, but I don't know.   Any insight as to why it has slowed down?


Does anyone know where I go to customise the below text on my sharepoint 2016 site?

I'm tinkering with SharePoint 2016 RTM and I'm trying to change the top link bar, where at the top it says "SharePoint | Sites". I'd like to change it so that instead of it saying SharePoint, it says something like Intranet  I've been using the following powershell commands, which work in SP2013 but dont seem to work or do anything in SP2016. Does anyone have any ideas?  $myApp = Get-SPWebApplication "http://sp2016" $myApp.SuiteBarBrandingElementHtml = '
Intranet
 $myapp.Update()


Can any one tell me how to prove that the set of rational numbers are countable? Prove give me a prove?  Thanks.

I want to prove that $\mathbb{Q}$ is countable. So basically, I could find a bijection from $\mathbb{Q}$ to $\mathbb{N}$. But I have also recently proved that $\mathbb{Z}$ is countable, so is it equivalent to find a bijection from $\mathbb{Q}$ to $\mathbb{Z}$?


Uni assignment requires that we build a pizza app in C# that derives Sauce from Ingredient. I have a List<Ingredient> that is storing objects of both types.  Pizza.cs calls the method GetInstructions() which is slightly different in the derived method. Unfortunately Sauce.GetInstructions() is never being called. As you can see, there's a debug line in there that should pop up a message box when the program is executing that routine but it's not popping up. Can anyone suggest why not?  Pizza.cs contains the following method:  public string BuildInstructionList()     {   // iterate through list of selected toppings and build a single string for display in the GUI     int count = 1; string instructions = "";     foreach (var i in toppings)         {         instructions = instructions += string.Format("Step {0}: {1}", count, i.GetInstructions());         count++;         }         return instructions;     }   Ingredient.cs contains:  public virtual string GetInstructions()     {         string instructionLine;         string qty = this.GetIngredientQuantity().ToString();         string unit = this.GetIngredientUnit();         string name = this.GetIngredientName();         instructionLine = string.Format("Add {0} {1} of {2} to the pizza.\n", qty, unit, name);         return instructionLine;     }   Sauce.cs contains:  public new string GetInstructions()     {         PizzaGUI.Message("I am here!");         string instructionLine;         string qty = this.GetIngredientQuantity().ToString();         string unit = this.GetIngredientUnit();         string name = this.GetIngredientName();         instructionLine = string.Format("Apply {0} {1} of {2} to the pizza.\n", qty, unit, name);         return instructionLine;     }

What are differences between declaring a method in a base type "virtual" and then overriding it in a child type using the "override" keyword as opposed to simply using the "new" keyword when declaring the matching method in the child type?


Let $f: S^1 \to S^1$ be a continuous map, where $S^1$ is the 1-sphere. Prove that if there is an homotopy between $f$ and a constant map, then $f$ has a fixed point.   I don't know how to prove it. I try with the Brouwer fixed point theorem, but I think that it doesn't work in $S^1$

How to prove that a continuous function, homotopic to the constant map $f:S^1\to S^1$  (a) has a fixed point and that (b) has a point $x$, such that $f$ maps $x$ to its antipodal point $-x$?


I am looking for the derivation of Ohm's Law, i.e., $V$ is directly proportional to $I$. Can someone help me with it?

Is it possible to derive Ohm's law (perhaps in some appropriate limit) from Maxwell's Equations?


I am trying to get a custom command, but when I copy it, ctrl+v doesn't work! I am using version 1.8.3. Help me please!

So I have a mac computer but i plugged in a windows keyboard in my mac. I am still trying to figure out how to paste commands into a command block. So how can I paste a command?


I know it’s an older series; I believe the publication date was around the '80s or early '90s.  The main focus of the books are these magic rocks granting certain powers (lightning, truth seeking, damage absorption—I believe—etc.), and the original stone found is called something like "lamb shabah." It’s all set in early medieval times era. I think it’s called the "Lightning [something]," but I know it’s not The Lightning Thief. After the main character finds the first stone and starts to use it, her main arm (I think her left one) gets heavily scarred; however, the other stones don’t leave as bad marks on their users. Any help identifying what book series this is, or who the author is, will be greatly appreciated, as I would love to read it again. Thanks.

I checked this series out of the library during college, maybe 15 years ago now.    It was based around 'stone magic' – magical stones that granted their bearers enormous power.  Unfortunately, the power of these stones is intermittent, they'll fade out for a long time then fade back in.  The main characters dealt with a 'master' stone of some sort, the first to restore, last to die.  It's also the key to granting other people access to their own powers – I think seals had magic fish they swallowed, which keyed off the master stone, and in the last book I think the character created magic staves for another race. It also had 'slow magic' – longer to set up, less apparently potent than stone magic, but the slow magic, given time to work it, could still be powerful and dramatic.  It just took time and preparation instead of brute force. In one book, the main character faces off against the source (or something like that) of magic, and is about to win when it's discovered she's pregnant.  The source – a dragon? – isn't allowed to harm anyone who doesn't come to it freely, so the main character is forbidden to finish the trial.  In the sequel, her daughter repeats the trial, and becomes immensely powerful by winning, but there was a cost of some sort, something that transformed her A lot of the naming made me think it had a Celtic root.


Sum of the double value is showing wrong result.   public static void main(String[] args) {         Double d =0.0;         d += 300.10;         d += 300.10;         d += 300.10;         d += 600.19;          System.out.println(d);     }   Output is : 1500.4900000000002  Which is incorrect output. If you do addition in excel or normal calculator total value is 1500.49. But why java is adding extra decimal value 00000000002 for double only.  I have tested in Java 1.6 and 1.7 environments and found that if total double value falls in 1000.00 to 2000.00 then extra decimals 00000000001 is showing in java 1.6. But in Java 1.7 total double value falls in 1500.00 to 3000.00 then extra decimals 00000000002.  Why it is behaving for double value in Java?. Can anyone help me on this?  Thanks Vijaya Kumar Rasala IT-Engineer Palair,Khammam,Andhra Pradesh

Seems like the subtraction is triggering some kind of issue and the resulting value is wrong.  double tempCommission = targetPremium.doubleValue()*rate.doubleValue()/100d;   78.75 = 787.5 * 10.0/100d  double netToCompany = targetPremium.doubleValue() - tempCommission;   708.75 = 787.5 - 78.75  double dCommission = request.getPremium().doubleValue() - netToCompany;   877.8499999999999 = 1586.6 - 708.75  The resulting expected value would be 877.85.  What should be done to ensure the correct calculation?


I am trying to integrate $\frac{1-x}{(x+1)^2}$, but I get to answers for two different methods:  First, $\frac{1-x}{(x+1)^2} = \frac{1-x+1-1}{(x+1)^2} = \frac{2}{(x+1)^2} - \frac{x+1}{(x+1)^2} = \frac{2}{(x+1)^2} - \frac{1}{(x+1)}$. Integrating this easily gives $\frac{-2}{(x+1)} - \ln|x+1|$.  Second method: Integration by parts. $u = (1-x)$, $dv = \frac{1}{(1+x)^2}$. $uv - \int v du$ is then equal to $\frac{x-1}{(x+1)} - \ln|x+1|$.  How do I resolve this contradictory conclusions?

Question:  Is it possible to get multiple correct results when evaluating an indefinite integral?  If I use two different techniques to evaluate an integral, and I get two different answers, have I necessarily done something wrong?    Often, an indefinite integral can be evaluated using different techniques.  For example, an integrand might be simplified via partial fractions or other algebraic techniques before integration, or it might be amenable to a clever substitution.  These techniques give different results.  For example, looking over a few other questions on MSE:      From : evaluate $$ \int x(x^2+2)^4\,\mathrm{d}x. $$    Via the substitution $u = x^2+2$, this becomes $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + \frac{32}{5} + C.     $$ However, multiplying out the polynomial and integrating using the power rule gives $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + C    $$     From :  evaluate   $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x. $$    Simplifying the integrand using partial fractions then integrating gives $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{-2}{(x+1)} - \ln|x+1| + C.    $$ Via integration by parts, we get $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{x-1}{(x+1)} - \ln|x+1| + C.    $$     From : evaluate   $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x. $$    Using the substitution $u = \sec(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\sec^2(\pi x)}{4\pi} + C.    $$ Using the substitution $u = \tan(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\tan^2(\pi x)}{4\pi} + C.    $$


I've stumbled upon this lemma a few times in my textbook: $$\sum_{k=0}^{n}\begin{pmatrix}n\\k\end{pmatrix}^2=\begin{pmatrix}2n\\n\end{pmatrix}$$ I've been trying to prove it, but I simply can't seem to see a connection. I've been trying to use proof by induction, but I can't express the statement for $n+1$ via the statement for $n$.  How do I prove it?

I was hoping to find a more "mathematical" proof, instead of proving logically $\displaystyle \sum_{k = 0}^n {n \choose k}^2= {2n \choose n}$.  I already know the logical Proof:  $${n \choose k}^2 = {n \choose k}{ n \choose n-k}$$  Hence summation can be expressed as:  $$\binom{n}{0}\binom{n}{n} + \binom{n}{1}\binom{n}{n-1} + \cdots + \binom{n}{n}\binom{n}{0}$$  One can think of it as choosing $n$ people from a group of $2n$  (imagine dividing a group of $2n$ into $2$ groups of $n$ people each. I can get $k$ people from group $1$ and another $n-k$ people from group $2$. We do this from $k = 0$ to $n$.


I am trying to figure out when my devices (tablet, tv dongle, etc) were activated. Is there a place (in google account settings, device files, anywhere) this data can be obtained?  My devices are rooted, so I can use terminal access to read internal files if needed.  Some suggestions in the net say to find the first day of data usage in the logs, but I want to find an accurate date (preferably a timestamp) of the device activation.  I can't seem t be able to type dialer codes in a tablet, there's no phone app. Also this question is about android devices in general, not only phones.

Someone told me that he has opened a phone only 4 days ago, but by the look of it, it is not less than a month.  When trying to buy a used phone, is there any way to check how long this phone is in use? Or the date when this phone is turned on the first time? Or the time of unboxing? Or the time of the first usage?


So we know we can use create New WiFi network option under wifi menu in Linux desktop to broadcast the WiFi out with custom name&passowrd like the picture below  But is it possible to throw a popup to user when the connection established (first time)? Like what free wifi do, popup a page which require you enter login credential or click ad before you got internet access.  If yes, how?

Based on hostapd, I am building a captive portal.   My Linux Machine provides Wifi access. iPad's and Android clients-tablets connect to this Wifi.   Generally, any client OS checks if a URL is reachable; if not: client OS states it is captive, and displays a popup browser window. The popup is used for login, presentation or else.  I'd like to display such a popup to present my machine's service, but I don't get it. I've avoided the net forward though. All connections are redirected in the machine localhost website.  Why don't I get such a popup? How to get it?  How/Where should I implement it on my localhost?  Similar ideas:        When the popup happens, how is its content is defined? For instance, a restaurant captive portal asks for your secret number on your note; where is this page is stored? How does the OS know the URL to display in the popup?


I'm attempting to design a worksheet for TEFL students. Here's one of the questions:  4) Your friend Tina who lives close by comes to visit you today. You want to ask her what she was doing when it started to rain last night (at around 8pm). How would you ask her?  Should my question say 'Tina who live close by' or 'Tina who lives close by'  My next question question (5) says this:  5) A group of friends who lives close by comes to visit you today. You want to ask them what they were doing when it started to rain last night (at around 8pm). How would you ask them what they were doing?  I assume it's 'who lives close by...' or is it 'who live close by'.  Is there any particular grammatical rule or rule-of-thumb which we can follow to work out if it's 'live' or 'lives'.

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?