When a Force is applied on a body at rest, it produces Acceleration which is equal to change in Velocity. But due to the Force, we see that the Velocity is increasing consequently. So why don't we take both of them proportional to each other rather than Force and Acceleration?

As a layman, i can calculate approx "displacement" just by observing the moving object. And accurately by using a simple "scale". Similarly, again, I can calculate angle from origin by using displacement in $x$ and $y$ dimensions. Similarly I can use a stopwatch and scale to understand velocity.  But when I read about , first of all it confuses with the english word "force", we use in real life. To some extent I am sure, it has nothing to do with that. So exactly what is it in the real sense. How can a layman, see force as, just like he can see displacement or angle? Or force is just a quantity defined by physicists to simplify the combinations of $ma$, they might be facing every time. And thus came up with term "force" ( which is similar in spelling to english word in oxford dictionary). And lastly, why not force has just been called as something proportional to mass and it's displacement or velocity. Why something at the level of change of velocity has been used to define it.


I am implementing logic within a for-loop that will remove any dog objects with status "ACCEPTED" from a kennel Object.   Note that a Kennel can have a List of many dogs.   Loop:   allDogsInKennel = kennel.getDogsList(); for (int i = 0; i < allDogsInKennel.size(); i++) {    //delete any dog object with a status of Accepted    if (allDogsInKennel.get(i).getStatus() == "ACCEPTED") {      kennel.removeDog(allDogsInKennel.get(i));    } }   removeDog method   public void removeDog(Dog d) {         this.dogList.remove(d);  }   The problem I have is e.g. all 6 dogs in the list should be removed, but at present only 3 are being removed.   Example:  original size of list = 6 items  Item removed from index 0 = 5 items  Item removed from index 1 = 4 items  item removed from index 2 = 3 items   Now in the next iteration the loop tries to remove from index 3 due to i++ condition, but the array will only go to index 2 as it now has only 3 items at indexes:   0, 1, 2   How can I change my logic above to ensure that all items are removed from the array?

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


I have a Dell XPS 13 that originally had Windows, but I removed it because I wanted to use Ubuntu. Unfortunately after some time I started having issues with the Wifi (which are a common problem with this laptop) and have decided to resintall windows.  Can I use the OEM key for activating it?  At some point the official Dell support changed a part of my pc because it was making a lot of noise and I was giving a paper with the new OEM key used to activate it.

I got a new laptop; it came with an existing Windows installation, but I wanted to migrate my current backup to the new machine. I dd-ed the new machine's partitions to an external drive:  /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme0n1p3 /dev/nvme0n1p4   and afterwards move my current partitions to the new machine. What followed was a medium-sized nightmare. The new machine would boot, but the wireless network drivers were not recognized and later found out (to the best of my knowledge) they couldn't be installed. I tried:   booting from the console and running:  sfc /scannow chkdsk C: /f /r /x   both seemed to have completed successfully, but now the machine would get stuck in a startup repair loop. I tried resetting the machine (whilst keeping my files), but this failed halfway through. now the machine's still stuck in the loop and decided to try and repair it externally using a bootable Windows 10 . It's likely that I'll need the new machine's Windows 10 key. I'm not sure if it's stored in the BIOS (it came with Windows 10  preinstalled) or somewhere on the partitions.   How can I get the key from the partitions (if it's there at all) while booting from a Linux image?


// Hi Community, I need a help to write a test class for this code, can someone help me with?      public with sharing class PropRentTotalSum {         public static void RentTotal(List<Fee__c> fees) {              List<Id> ids = new List<Id>();             List<Property__c> properties = new List<Property__c>();             for (Fee__c fee : fees) {                 ids.add(fee.Property__c);             }             for (Property__c p : [                     SELECT Id,Monthly_Rate__c, (SELECT Id, Cost__c FROM Fees__r)                     FROM Property__c                     WHERE Id = :ids             ]) {                 Decimal sum = 0;                 for (Fee__c fee : p.Fees__r) {                     sum = sum + fee.Cost__c;                 }                 p.Monthly_Rate__c = sum;                 properties.add(p);             }             try {                 update properties ;             } catch (Exception e) {                 System.debug('Exception :' + e.getMessage());             }         }     }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


I have here 5GB zip file but I have no idea how to unzip that.  I tried:  7z x file.zip    Returns: Error: Can not open file as archive  jar xvf file.zip    Returns: jar: error opening file.zip for reading: Value too large for defined data type  unzip file.zip    Returns:   End-of-central-directory signature not found.  Either this file is not   a zipfile, or it constitutes one disk of a multi-part archive.  In the   latter case the central directory and zipfile comment will be found on   the last disk(s) of this archive. note:  file.zip may be a plain executable, not an archive unzip:  cannot find zipfile directory in one of file.zip or         file.zip.zip, and cannot find file.zip.ZIP, period.   The file does seem to be a zip archive:  $ file file.zip file.zip: Zip archive data, at least v1.0 to extract   Any idea?  Thanks.

I try to unzip a zip file, but got an error:  $ unzip COCR2_100.zip  Archive:  COCR2_100.zip   End-of-central-directory signature not found.  Either this file is not   a zipfile, or it constitutes one disk of a multi-part archive.  In the   latter case the central directory and zipfile comment will be found on   the last disk(s) of this archive. note:  COCR2_100.zip may be a plain executable, not an archive unzip:  cannot find zipfile directory in one of COCR2_100.zip or         COCR2_100.zip.zip, and cannot find COCR2_100.zip.ZIP, period.   I googled but didn't find a solution. I was wondering why it is and how I should fix it? Thanks!  The zip file can be downloaded from . It is an application, and here is its website .  My OS is 10.10.


Given the location of three receivers (say, for instance, sound receivers) and the time at which each receiver “heard” some signal, I’d like to determine the direction of the signal relative to the receivers (i.e. the “Direction of Arrival”). For my purposes, we can assume the receivers and the source are on the surface of the Earth, and we can ignore the curvature of the Earth, if necessary. There’s some information out there, but nothing particularly detailed with regards to implementing something concrete. What are the formulas necessary to compute the direction of the source?

I'm attempting to solve a problem similar to trilateration but with slightly different data.   I want to find the center of a circle (in my case, its coordinate is the origin of a sound wave). Let's call the center of this circle $c$.  Imagine then I have a set of three points $p1...p3$ which are equidistant from each other, but all different distances from the origin of the sound, $c$.  Imagine a circle travelling outward from $c$ (this is the sound wave propagating). It will "hit" one of these points first - let's call this point $p_1$. This point then, by definition, intersects with the circle propagating from $c$ at this point in time.  Imagine for the sake of this explanation that this circle then stops propagating outwards, and instead, circles begin propagating from each of the remaining points $p_2$ and $p_3$ until these circles lie tangentially on the circle centered on $c$ at the moment that it intersects with $p_1$.   I'm hoping that this can be visually intuited with the graph below (The green point is $c$, the point in the bottom right is $p_1$, and the other two points whose circles lie tangentially to the circle centered on $c$ are naturally $p_1...p_2$):     In actuality though, I only have a subset of the data depicted above known to me. That subset is:   The coordinates of $p_1$, $p_2$, and $p_3$. The radii of the circles centered on $p_2$ and $p_3$.   My question: with only these known quantities, is it even possible for me to deduce the center of $c$? If so, how?  I've tried following trilateration tutorials, done a fair bit of article reading, but this seems like a weird sub-field / nuanced problem that seems to be preventing the information from applying completely.  Any help would be much appreciated. Thank you!


I need some help.  I don't fully understand /data modify yet, but I am learning. In the meantime, I would like to modify the data of every Wandering Trader that has the x3 Emeralds > x3 Podzol trade to be a trade for x5 Emeralds > x1 Grass, I want to change ONLY THAT TRADE, I would like the rest of the trades that the Trader spawned with to remain the same.  Here's what I have:  /execute as @e[type=wandering_trader,nbt={Offers:{Recipes:[{sell:{id:"minecraft:podzol"}}]}}] run data modify entity @s ...  and here's the data that I want to replace the podzol trade with:  {maxUses:1,buyB:{id:"minecraft:air",Count:1b},buy:{id:"minecraft:emerald",Count:5},sell:{id:"minecraft:grass",Count:1b},xp:1,uses:0,priceMultiplier:0.05f,specialPrice:0,demand:0,rewardExp:1b}  and that's where my knowledge of modify is exhausted, I have tried many different commands to no avail. I'm pretty sure that I need to use /data modify ... set but I don't know how to...  Thanks in advance. :)

Okay, so I've been searching all over the internet for an explanation of data modify ever since I heard Sethbling passively mention it in one of his videos. The only  thing I could find on it was the wiki and the update log for the 1.14 snapshot. So, I checked these, and they hardly explained it at all. I can get /data modify block 123 20 123... and that's as far as I get.  Minecraft wiki does not at all define clearly what  is (the thing meant to go after coords), nor does it specify what each operation does to what. Operations include (without explanation, and excluding set (which it does explain)): append, insert, merge, and prepend. Then, it has from|value as the next option, which aren't explained either. After this, it just has block/entity and coords/id. So, I know the format (mostly), but I haven't the slightest idea what any of it means. And nothing I've seen on the internet even mentions the command save for Minecraft wiki itself.  Please explain if you know what data modify is. Thanks!


I am getting the following error message:       Run Time Error   Program:C:\PROGRA~1\bin\qgis-bin.exe   R6034   An application made an attempt to load C runtime library incorrectly   Contact application suppliers"   My operating system is Windows 8 2012. I have a 64 bit operating system QGIS version Desktop 2.0.1, Browser 2.0.1. This is following download when I try to open the Desktop   I am not hugely computer operating system literate so please can the answers avoid too much jargon!!

I just installed Dufour on my Windows 7 Lenovo ThinkCentre desktop. When I open 2.0.1 I get this error window:    And when I try to add the 'Add Delimited Text Layer' plugin I get this message:    When I click 'OK' the program closes.   Any help is greatly appreciated - thanks.


I am totally new a pictures and blender therefore I dont know how to ask. I want to add rocket plume but I am not interested with animation. I need to add like texture.     Reference image:

I'm working on a jet in blender. While thinking about the final scene, I wondered if there was a way to create schock diamonds(also known as Mach diamonds, Mach disks, Mach rings, donut tails or thrust diamonds) in blender.  Hopefully somebody can help, I haven't found anything online.      picture from wikipedia  picture from Tom Clancy's H.A.W.X  thanks for any tips.  tags: mach, schock, diamond, jet, exhaust, afterburner, engine, Physical phenomena  edit: added some pictures,


I have two computer in different network.I want to control one system from another.Both system have windows 7 operating system.Do any one have any idea how to do it?? I don't want to use team viewer or any other application.

I'm looking for a way to display a VNC viewer in a thick/rich java client (specifically, I'm using SWT, but if I can get it into AWT/Swing, I can integrate that specifically.)  This is not an applet, but a real, live, thick java client.   is probably sufficient; however, its GPL license is too restrictive for my needs.  Is anyone aware of a Java VNC library available under a less restrictive license?


Is there any official ports of Ubuntu touch for nexus 6? I searched the whole internet and not seems to find anything juicy. I remember it used to support in my old galaxy nexus and nexus 7.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I followed the link below to try and fix this issue but unfortuantly DiskPart, GParted or any other method has been unsuccessful. It's a 32GB flash drive and I'm seeing 1.8GB. Any ways of totally wiping and reformatting this to a stock flash drive?

My USB drive used to be originally 8GB when I bought it.  I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting Format.... But the capacity only shows 250MB.  Is there something I can do to get the original size back? Maybe it got partitioned in a weird way?   The  flash drive is a SanDisk Cruzer Micro 8GB. I got it from Wal-Mart but this is the same drive.


Despite water being a conductor how does light pass through water.[note: electric field inside a conductor is zero due to gauss' law]

Water appears transparent to visible light, yet most other objects are opaque.  Why is that?  Is there an explanation why water appears transparent?  Is water transparent at all wavelengths, or are the visible wavelengths somehow special?  If it is not transparent at all wavelengths, is there some evolutionary explanation why we would expect water to have low absorption at the wavelengths that we can see with our eyes?  Is there some explanation along the lines of "because we evolved in an environment where water plays (some important) role, therefore it's not surprising that our eyes are sensitive to wavelengths where water has low absorption"?


Can someone help me find the continued fraction expansion for $\sqrt{7}$ just like I did for below.  For $\sqrt{3}$ I did this:  I was given that $x = \sqrt{3} -1  $  $x = \frac{1}{1+\frac{1}{2+x}}  $  take the second   $x = \frac{1}{1+\frac{1}{2+x}}  $  $x = \frac{1}{\frac{2+x+1}{2+x}}  $  $x = \frac{2+x}{x+3} $   $x(x+3) = 2+x  $  $x^2 +3x = 2+x \Rightarrow x^2+2x-2=0  $  find x,then we are done   how to write  $x =\sqrt{3}-1$  in continued fraction using  $x = \frac{1}{1+ \frac{1}{2+x}}  $  $\sqrt{3}-1 = \dfrac{1}{1+ \dfrac{1}{2+\dfrac{1}{1+\dfrac{1}{2+\dfrac{1}{1+\d  frac{1}{2+\dfrac{1}{1+\dfrac{1}{2+\dfrac{1}{1+\dfr  ac{1}{2+..}}}}}}}}}}$  I just sub x value each time it will never end   $\sqrt{3}-1 = \dfrac{1}{1+ \dfrac{1}{2+\dfrac{1}{1+\dfrac{1}{2+\dfrac{1}{1+\d  frac{1}{2+\dfrac{1}{1+\dfrac{1}{2+\dfrac{1}{1+\dfr  ac{1}{2+..}}}}}}}}}} $  so   $\sqrt{3} = 1 +\dfrac{1}{1+ \dfrac{1}{2+\dfrac{1}{1+\dfrac{1}{2+\dfrac{1}{1+\d  frac{1}{2+\dfrac{1}{1+\dfrac{1}{2+\dfrac{1}{1+\dfr  ac{1}{2+..}}}}}}}}}} $  So it would be <1;1,2,1,2,1,2>

If I want to find the continued fraction of $\sqrt{n}$ how do I know which number to use for $a_0$? Is there a way to do it without using a calculator or anything like that? What's the general algorithm for computing it? I tried to read the wiki article but was overwhelmed and lost. I tried Googling but couldn't find a website that actually explained this question.  If anyone has a good site that answers these questions either, please let me know. Thanks!


I have string that is dynamic and need to change along with escape character. Suppose  var key = "Any String"; var term = "^"+key+"^"; var description = description.replace(term,"replacement_string");   it replace only first occurrence and works well.it changes like this:     Lorem ipsum dolor sit amet ^Any String^ and Any String Lorem ipsum dolor sit amet ^Any String^   to     Lorem ipsum dolor sit amet replacement_string and Any String Lorem ipsum dolor sit amet ^Any String^    if I use replace globally then it doesn't work  var key = "Any String"; var term = "/\^"+key+"\^/g"; var description = description.replace(term,"replacement_string");   print like this:     Lorem ipsum dolor sit amet ^Any String^ and Any String Lorem ipsum dolor sit amet ^Any String^   I need to change all occurance of ^Any String^ not if Any String doesn't have ^ then it shouldn't change the word. Result should be like this.     This is a description with replacement_string and Any String also need to change replacement_string

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


I've just begun learning about sets. My first language isn't English.  My textbook defines a set as:     A set is a well-defined collection of objects.   While, others define a set as:     A set is a collection of distinct objects.   To me, both definitions do not look the same. Maybe they mean the same thing, but I am not convinced.   What needs to be well-defined or distinct, the collection or the objects?   What does it mean to be "well-defined" here?   If we are given A={2, f, π, €}, can we say that A is a set? In that case, we know that all the elements of this collection are distinct from each other. But, is this collection well-defined? If it is, then what's its definition?

From what I have been told, everything in mathematics has a definition and everything is based on the rules of logic. For example, whether or not .  My question is what the definition of a set is?   I have noticed that many other definitions start with a set and then something. A  with an operation, an equivalence relation is a set, a , even the  of other sets containing the empty set.  I understand that there is a whole area of mathematics (and philosophy?) that deals with . I have looked at a book about this and I understand next to nothing.  From what little I can get, it seems a sets are "anything" that satisfies the axioms of set theory. It isn't enough to just say that a set is any collection of elements because of various paradoxes. So is it, for example, a right definition to say that a set is anything that satisfies the ZFC list of axioms?


I've noticed this strange behavior lately. Whenever I comment on a question or answer, the add/show 1 more comment link is displayed immediately, even when there aren't any new comments. When I click on the link, the message disappears, and no new comments are displayed. I have to reload the page to make sure there are no new comments on the thread. Screenshot:  I'm unable to reproduce the issue with a strict procedure and it doesn't happen all the time. So I believe this to be some kind of race-condition. I've seen  post on Meta and it's marked as  but I'm still experiencing the issue. I've also checked  answer and it says:  Localization is progressing, and the comments feature is on-deck, so I've been putting off spending any more time on comments until that's done. Putting this to  so I won't forget about it.  So, I'm wondering, what's the status on this?

So I've been experiencing this in the last few days: sometimes when someone replies to my comment, and I reply to the reply, then the "add/show 1 more comment" link appears immediately after I post my comment. However, when I click it, it disappears and nothing is shown.  I don't think it's that OP is posting two comments of which he deletes the second one, because this has happened to me several times, even when I was replying within 2-3 seconds.  I do, however, believe that this is more or less the same bug as , except that I don't have to reload the page in order the link to be gone, and I also seem to be getting the erroneous behavior only if I reply to a comment which is itself a reply to an earlier comment of mine.  Unfortunately, I wasn't careful enough to take a screenshot last time this happened, but here's what I am talking about for those who like visual demonstration better:


I DM for a group of 6 people and we play once a week.   Two of the players barely ever show up (less than once a month), and when they do we have to stop, and recap a huge part of story, just for them, which takes a long time. It slows down the whole rhythm of the game and I can see that this reoccurence annoys my "commited" players.  And when these two do show up, they basically spend their time joking around, and placing ill-placed remarks and comments. Their attitude and lack of involvement also has started to dampen my "good" players' moods.  The whole "pretend they're out to do something else", or that "they're there, but not really..." has gotten old, and I just want to keep my "good" players happy. I'm not looking for how to handle their characters while they're absent, though, I want to know what to do with the players.  At what time would it be "ok" for me to ask these disruptive players to step down from the group? Is there any way to deal with them that isn't just asking them to leave?

If you know ahead of time that you're going to be missing a player, do you reschedule? Or just play them as an NPC or as a group puppet?


I thought the singular version was"specie," and the plural was"species." Was "species" always an acceptable equivalent to "specie?"

I've been reading a Wikipedia article that describes the symptoms of rabies in various species, and I want to add a clarification note about which species (or species) a specific paragraph refers to. How can I make it clear that I'm referring either to the singular or plural of the word "species" when the singular of this word is the same as its plural? "Species or species" is the only grammatically correct way that I can think of, but it seems redundant and confusing. Is there any better way to contrast the singular of "species" from the plural of "species"?


I'm trying to let create a user with SFTP permissions to only one directory (that is not his home directory). When he connects through a SFTP client I want him to land on this directory and I don't want him to be able to view any other directory unless it's a sub-directory. I'm using Ubuntu 12.04.  I followed the steps below:  Edit the /etc/ssh/sshd_config file.  Add or modify the Subsystem sftp line to look like the following:  Subsystem sftp internal-sftp   Add the below block of text to the bottom of the file:  Match Group filetransfer     ChrootDirectory %h     X11Forwarding no     AllowTcpForwarding no     ForceCommand internal-sftp   Restart OpenSSH:  service ssh restart   Create a system group for users whom you want to restrict to SFTP access:  addgroup --system filetransfer  sudo adduser username #added user usermod -G filetransfer username #added him to the group chown root:root /home/username #disabled access to his default home directory chmod 755 /home/username   Changed the permissions directory I want him to be able to modify:  cd /srv/www/website_name/public_html/wp-content/themes/ chown username:filetransfer specific_folder chown username:filetransfer specific_folder/*   Set this folder as his home directory:  sudo usermod -d /srv/www/website_name/public_html/wp-content/themes/specific_folder username   But now I'm not able to connect using SFTP. This fails after I change his home directory. What should I do to fix this?

I've been trying to configure sftp in a debian server.sshd_config:  Subsystem sftp internal-sftp  UsePAM no  Match User sftpUser ChrootDirectory /users/sftp/sftpUser ForceCommand internal-sftp AllowTcpForwarding no X11Forwarding no   Directories:   drwxr-xr-x   3 root      root      4096 Oct 20 10:59 users   drwxr-xr-x   3 root      root      4096 Oct 20 11:00 sftp   drwxr-xr-x   2 root      root      4096 Oct 20 11:00 sftpUser   cat /var/log/auth.log  Oct 20 10:58:22 w1 sshd[24634]: Accepted password for sftpUser from 201.156.103.213 port 34106 ssh2 Oct 20 10:58:22 w1 sshd[24636]: fatal: bad ownership or modes for chroot directory component "/"   sftpUser no home, bin/falseand member of user group.  In the client side I'm getting the famous Write failed: Broken pipe and then the connection is dropped.  Commenting the ChrootDirectorycommand in sshd_config makes the connection, but get's the user loose.  What am I doing wrong ?


Today lots of peoples/developers are using VM's in EC2, so keeping in this mind there are lots of VM's were getting created and deleted every day.  Also, EC2 allocates an ID (auto-generated) to each instance in the cloud at the time of VM creation.  So, Is there any chance that this ID gets reused(repeated) considering this same ID was assigned to an instance but now that instance got deleted?  And Is this ID will be unique globally or per user??  Thanks

Today lots of peoples/developers are using VM's in google cloud, so keeping in this mind there are lots of VM's were getting created and deleted every day.  Also, Google compute engine allocates an ID (auto-generated) to each instance in the cloud at the time of VM creation.   So, Is there any chance that this ID gets reused(repeated) considering this same ID was assigned to an instance but now that instance got deleted?  Thanks


Ever since day one of of my Mathematical Logic course, this fact has really bothered me. I cannot wrap my head around how an empty set is a subset of every possible set. Could someone kindly explain how this is true? Any help is appreciated!

Recently I learned that for any set A, we have $\varnothing\subset A$.  I found some explanation of why it holds.     $\varnothing\subset A$ means "for every object $x$, if $x$ belongs to the empty set, then $x$ also belongs to the set A". This is a vacuous truth, because the antecedent ($x$ belongs to the empty set) could never be true, so the conclusion always holds ($x$ also belongs to the set A). So $\varnothing\subset A$ holds.   What confused me was that, the following expression was also a vacuous truth.     For every object  $x$, if $x$ belongs to the empty set, then $x$ doesn't belong to the set A.   According to the definition of the vacuous truth, the conclusion ($x$ doesn't belong to the set A) holds, so $\varnothing\not\subset A$ would be true, too.  Which one is correct? Or is it just a convention to let $\varnothing\subset A$?


From the MTG rules:     302.6. A creature's activated ability with the tap symbol or the untap symbol in its activation cost can't be activated unless the creature   has been under its controller's control continuously since his or her   most recent turn began. A creature can't attack unless it has been   under its controller's control continuously since his or her most   recent turn began. This rule is informally called the "summoning   sickness" rule.   Do I correctly understand then that other abilities, such as the 's ability can be used immediately after being placed onto the battlefield?     {1}{B}, Sacrifice a creature: Target player loses 1 life and you gain   1 life.

I have a  on the battlefield and I played a vampire earlier this turn. Can I tap both to transform Chosen of Markov even though I just played the vampire?  Extra Example: I play  to put two 1/1 white bird tokens into play. Can I now tap a both of them and another creature I control to pay Battle Screech's flashback cost of tapping three white creatures?   Obviously these creatures couldn't use any tap abilities until my next turn, but since the tapping is coming from a different source, I figured the situation might be different.


I've made a MWE below. It's a simple two column {r X} table in tabularx. In the first row, without any xcolor commands, the first lines start in line with each other but in the second row, with colours added, the second cell starts a line below. Why is this happening?  \documentclass{article}     \usepackage{lipsum}     \usepackage{lua-visual-debug}     \usepackage{tabularx}     \usepackage{xcolor}  \begin{document}     \centering     \begin{tabularx}{\textwidth}{r X}         First row & \lipsum[1] \\         {\color{red} Second row} & {\color{blue}\lipsum[2]}     \end{tabularx} \end{document}

The following code shows that a \color{red} command increases the height of a tabular cell. I want to use a switch, not a command as \textcolor{red}{text}.  \documentclass{article}  \usepackage{xcolor} \usepackage{float}  \begin{document}  \begin{table}[H] \begin{tabular}{*{2}{p{0.45\textwidth}}} \hline \color{red} header & header \tabularnewline \hline  %  content  & content \tabularnewline  content  & content \tabularnewline  content  & content \tabularnewline \hline \end{tabular} \end{table}  \end{document}     How can I work around this problem?


Prove that there exists a function $f: \mathbb{N} \to \mathbb{N}$ such that a partitioning of $\{1,2,...,f(n)\}$ into $n$ classes will have some $x,y$ such that $x$, $y$ and $x+y$ all belong to the same class.  I'm very stuck on this... I imagine the answer is something to with Stirling numbers of the second kind but I'm really struggling to achieve any more than this! All I've deduced is the bound that $f(n)>n$ which is pretty trivial really...

Can you give a proof for bounds of  $S(r)$? Please suggest me articles to have better idea of Schur's theorem (Ramsey theory).


I drew a circle of diameter 100mm and set its contour to be 5mm. Now this means that actual size of that circle is 105mm because it's 100mm for the circle and the contour "overflows" 2.5mm on each side.  Is there an easy way to set it up so that no matter how large contour I set, it will all go to the inside of the circle instead of both sides?

When I change the stroke width of a rectangle the width and and height change also. How can I  prevent this from happening?


I know $G/N$ is isomorphic to a proper subgroup of $G$ in this case, so the gut instinct I had was 'no'. But there are examples of groups that are isomorphic to proper subgroups, such as the integers being isomorphic to the even integers, so that reasoning doesn't work. However in this case the even integers are not a quotient of the integers.  edit: I realize now that $G/N$ is not necessarily isomorphic to a proper subgroup of $G$, just a subgroup of $G$.

Let $G$ be any group such that  $$G\cong G/H$$ where $H$ is a normal subgroup of $G$.  If $G$ is finite, then $H$ is the trivial subgroup $\{e\}$. Does the result still hold when $G$ is infinite ? In what kind of group could I search for a counterexample ?


I have a SSD and a HDD on my system. I want to install Ubuntu on the SSD (dual boot with win10) and keep all other files, programs etc. on the HDD? How much disk space I need on the SSD and how can I achieve this?

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


As we know, we define $$\sqrt{-1}=i$$ But I always wondered, what about $\sqrt{i}$? As far as i can see, it is not an integer power of $i$. Every odd root has a solution in an integer power of $i$, but I can't find one for my question. Is there something I am missing here?

If $i=\sqrt{-1}$, is $\large\sqrt{i}$ imaginary?     Is it used or considered often in mathematics? How is it notated?


Bjarne Stroustrup once mentioned in one of his bigthink interviews that one of the greatest problems most programmers have is not finding or using the right libraries.  On stackoverflow and programmers, I've observed a trend towards questions like "I want to do this, is there a [library | programming language] for that", or "I have these {n} [library | language] candidates for my project; which one would yield me the least amount of headache given these requirements".   Since questions like these aren't exactly programming questions in the sense of "this code should do this, but it does this, why?", they are often (though not always) being closed as "not constructive" because they do not have a definite answer (which is true, and according to the FAQ they would be off-topic on both stackoverflow and programmers).  Nonetheless, I think library questions are valid, and that it is helpful for any programmer to receive independent input from experienced programmers (at least it helps me a lot every time I browse through one of those closed questions, which I found through google). Does anyone agree that posting library choice questions should be explicitly allowed on either stackoverflow or programmers?

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.


My code doesnt compile and I'm really confused.When I run the code I get an error in the header file that says "Declaration of 'T' shadows template parameter. My teacher told us in class to put template prefix template before declaration of the operators inside a class definition. I don't know if she's wrong or not but I tried removing the template that were above the declaration of friend functions and when i tried compiling the code i get some errors that have linker Id issues. One of them refers to Matrix::Matrix(int). Honestly I still think what my teacher said about putting the template prefix above the declaration of the operator is right because the operators have the class type in their parameter but can someone help me out!  In my header file I have:  #ifndef __testing_more_stuff__vector__ #define __testing_more_stuff__vector__  #include<iostream> #include<fstream> using namespace std; template <class T> class Matrix{ public:     Matrix();     Matrix(T diagonal);      //template <class T>     friend ostream& operator <<(ostream& outs, const Matrix<T> &obj);     //template <class T>     friend istream& operator >>(istream& in, Matrix<T> &obj);     //template <class T>     friend Matrix<T> operator *(Matrix<T> A, Matrix<T> B);  private:     const static int n=3;     T a[n][n];   };//class declaration  #endif   In my implementation file I have:  #include "vector.h"  template <class T> Matrix<T>::Matrix(){     for (int i=0;i<n;i++)         for (int j=0;j<n;j++)             a[i][j]=0; } template <class T> Matrix<T>::Matrix(T diagonal){     for (int i=0;i<n;i++)         for (int j=0;j<n;j++)             if (i==j)                 a[i][j]=diagonal;             else                 a[i][j]=0; } template <class T> ostream& operator <<(ostream& outs, const Matrix<T> & obj) {     for (int i = 0; i < obj.n; i++){         for (int j = 0; j < obj.n; j++)             outs << " "<< obj.a[i][j];         outs<<endl;     }     outs<<endl;     return outs; } template <class T> istream& operator >>(istream& in, Matrix<T> & obj) {     for (int i = 0; i < obj.n; i++){         for (int j = 0; j < obj.n; j++){              in >> obj.a[i][j];         }     }     return in; } template<class T> Matrix<T> operator *(Matrix<T> A, Matrix<T> B){     Matrix<T> product;     for (int i=0;i<A.n; i++)         for (int j=0;j<A.n; j++) {             T sum=0;             for (int k=0; k<A.n; k++)                 sum = sum+A.a[i][k]*B.a[k][j];             product.a[i][j]=sum;         }     return product; }   In my main file I have:  #include "vector.h"   int main(){     Matrix<int>  A;     Matrix<int>  B(2);     cout << A;     cout <<B;      cout <<"stop here";      ifstream fin;     ofstream fout;     fout.open("output.txt");     if (fout.fail()){         cout <<"error openning output file";         exit(1);     }      fin.open("input.txt");     if (fin.fail()){         cout <<"error openning input file";         exit(1);     }      //input matrix C     Matrix<int> C;     cin >>C;     //fin >>C;     cout <<"C = "<<endl<<C<<endl;     cout <<"B = "<<endl<<B<<endl;     cout <<"C*B = "<<endl<<C*B<<endl;     //fout <<C;     //cout <<C.det();      return 0;  }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


For which value of $n$ the ring $\mathbb{Z}[\sqrt{n}]$ is a UFD ?   I am literally very confused about it. I know that when $n=2,3,-1,-2$ (there are many other value also) then the ring is UFD but I want to know some generalized principles that help in decision making. Your help will be appreciated. Thanks.

I'm considering the ring $\mathbb{Z}[\sqrt{-n}]$, where $n\ge 3$ and square free. I want to see why it's not a UFD.   I defined a norm for the ring by $|a+b\sqrt{-n}|=a^2+nb^2$. Using this I was able to show that $2$, $\sqrt{-n}$ and $1+\sqrt{-n}$ are all irreducible. Is there someway to conclude that $\mathbb{Z}[\sqrt{-n}]$ is not a UFD based on this? Thanks.


When can we use them? Are they the same or different?   "How tall is that building?" Can I use "high" in that sentence or not?  "This is the tallest mountain in Japan." Can I use "highest" in that sentence instead of "tallest"?

The chimney in the picture above is more than 20m high. The chimney in the picture above is more than 20m tall.   Are both high and tall proper in these sentences?   If not, why not? And when should one prefer high over tall, and vice versa?


I have two HDD's installed in my PC with two OS viz. One is Ubuntu 20.04, and the other is Windows 10. Would it be possible to send files and/or folders from Ubuntu to Windows?

I wanna transfer some files from this PC with Ubuntu to a PC with Windows 7 I don't care how to do it (ftp, samba or whatever) I wanna know the steps, I searched a lot but I can't find anything that works. Thank you.


I am posting for a friend: he has a strong feeling that the following should be true but can't prove it:  "Let $(a_n)$ be a real sequence. If $a_n \searrow 0$ and $\sum a_n$ converges, then $n a_n \to 0$."  He has checked all the theorems and exercises in Rudin and Apostol but hasn't found an answer to this question. He thinks the question reduces to showing the existence of a series with positive integers, strictly increasing such that   $$ \frac{1-\frac{n_k}{n_{k+1}}}{1-\frac{n_{k-1}}{n_k}} < \frac{1}{M} $$  for some fixed $M > 1$.

I'm studying for qualifying exams and ran into this problem.  Show that if $\{a_n\}$ is a nonincreasing sequence of positive real numbers such that $\sum_n a_n$ converges, then $\lim_{n \rightarrow \infty} n a_n = 0$.  Using the definition of the limit, this is equivalent to showing \begin{equation} \forall \varepsilon > 0 \; \exists n_0 \text{ such that } |n a_n| < \varepsilon \; \forall n > n_0 \end{equation} or \begin{equation} \forall \varepsilon > 0 \; \exists n_0 \text{ such that } a_n < \frac{\varepsilon}{n} \; \forall n > n_0 \end{equation} Basically, the terms must be bounded by the harmonic series. Thanks, I'm really stuck on this seemingly simple problem!


Question, whenever I start up my Minecraft a notepad application appears on my desktop called "nativelog", how do I remove that from ever popping up? Thanks.

Once I click to run minecraft a small window appears saying "Downloading runtime", then three other folders appear onto my desktop: Game, Native Log, and Runtime. This really annoys me, as I have to keep deleting them after I am done with a session of minecraft. Why is this? It never use to happen before.


I am trying to copy a file from my local machine A to a server C through server B using scp. I have read a couple of things on this, and came up with this:  scp -o ProxyCommand="ssh -J user@serverB:port user@serverC" test.txt user@serverC:~/   It first return a warning:  Pseudo-terminal will not be allocated because stdin is not a terminal.   Then, I enter successfully my two passwords, but it results in:  -bash: line 1: SSH-2.0-OpenSSH_7.6p1: command not found   How do I solve this ?  Note that I am perfectly able to connect to server C using:  ssh -J user@serverB:port user@serverC   such that the problem comes from my use of scp.

I want to download files from my office computer to my laptop.  I can connect my office machine by SSH to the organization server and then SSH from the server to my office machine.  The only commands the organization server accepts are ssh, ssh1, and ssh2.  How can I download a file from my office (remote) machine through the server into my laptop (local) machine?


Consider a Lie group $G$ and let it's Lie algebra be $\mathfrak{g}$. Let the exponential map be denoted by $\exp: \mathfrak{g} \to G$.   Given any $g \in G$, does there exist an open set $O \subset \mathfrak{g}$ with $g \in \exp(O)$ such that the exponential map restricted to $O$ is a diffeomorphism?   Note: I am not conversant with Riemannian geometry.

Let $M$ be a riemannian manifold and $\exp_p: T_pM \rightarrow M$ the exponential map at $p \in M$.  At each point $p\in M$, $\exp_p$ can be restricted to a neighborhood $V$ of $0\in T_pM$ so that $\exp_p|_V$ is a diffeomorphism. Let $U\subset M$ denote image of $V$ under this map.  Choosing an orthonormal basis $\{E_i\}$ for $T_p M$ and using the isomorphism $E: \mathbb R^n \rightarrow T_pM$, where $E(x^1, \dots, x^n)= x^iE_i$, gives normal coordinates $(U, \phi)$, where  $$ \phi := E^{-1} \circ \exp^{-1}_p: U \rightarrow \mathbb R^n $$  My question is: can we fix some $z\in \mathbb R^n$ (small enough) and take some small neighborhood $\widetilde{U}$ of $p$ so that the function $\widetilde \phi$, defined as $$ \widetilde{\phi}_z (p) := \exp_p ( E(z)) $$ is a diffeomorphism when restricted to  $\widetilde{U}$?  (In the definition of $\widetilde \phi$, the isomorphism $E$ will also vary with $p$.)


So i just finished watching Caprica, in what order do I watch the rest BSG? To include, but not limited to TV, mini series, and anything else.

I have watched a few random episodes of BSG here and there and really enjoyed it, but now I want to do it right. I want to go back to the start, and watch it all the way through.  I understand there is the main series, but have also heard of a mini-series, and movies etc. It makes me quite confused, and I have no idea of where to start and in what order I should watch. Can someone please clear this up for me, and give me a list of the entire viewing order?


While doing an English test I've found this question :     A ___________ lives in that house.         fat, small man   small, man fat   man, fat small   small, fat man        Could someone give me an explanation of what's the right answer, and more importantly why?  Is there a difference between British and American English in this case?

I remember being taught that the correct order of adjectives in English was something along the lines of "Opinion-Size-Age-Color-Material-Purpose."  However, it's been a long time and I'm pretty sure I've forgotten a few categories (I think there were eight or nine). Can anyone fill them in?


I see that it has something to do with the variance and one has 12 on the numerator and the other denominator, but why is this the same 12 and how do they become inverse?  Equations:     Kruskal Wallis: The first equation under 3  $$ H = \frac{12}{N(N+1)} \sum_{i=1}^g n_i\bigg(\bar r_{i\cdot}-\frac{N-1}{2} \bigg)^2 $$ Wilcoxon: The one for the variance  \begin{align} z &= \frac{R - \mu_R}{\sigma_R}  \\[5pt] &\text{where}  \\[5pt] \mu_R &= \frac{n_1(n_1 + n_2 + 1)}{2}  \\[8pt] \sigma_R &= \sqrt{\frac{n_1n_2(n_1 + n_2 + 1)}{12}} \end{align}


Stats is not my strong point but trying to run a regression. I'm aware that it happens because some of these variables are perfectly collinear. However, I do not know how to fix this? Any help would be much appreciated. This is my current script:   ### Deviant coding of 'Sex' variable dat_full$deviant_sex <- scale(ifelse(dat_full$sex == "Female",0,1), scale = F)  ## Mean centre predictors  ### Complexity dat_full$stnsci <- scale(ifelse(dat_full$complexity == "scientific", 1, 0), center = T, scale = F) dat_full$stnnon <- scale(ifelse(dat_full$complexity == "none", 1, 0), center = T, scale = F)  ### Timing dat_full$aftbef <- scale(ifelse(dat_full$timing == "before", 1, 0), center = T, scale = F) dat_full$aftnon <- scale(ifelse(dat_full$timing == "none", 1, 0), center = T, scale = F)  #regression fulldata <- lm(verdict ~ stnsci + stnnon +                 aftbef + aftnon + stnsci:aftbef +                stnsci:aftnon + stnnon:aftbef +                 stnnon:aftnon , data=dat_full) summary (fulldata)

I have an independent variable called "quality"; this variable has 3 modalities of response (bad quality; medium quality; high quality). I want to introduce this independent variable into my multiple linear regression. When I have a binary independent variable (dummy variable, I can code 0 / 1) it is easy to introduce it into a multiple linear regression model.  But with 3 modalities of response, I have tried to code this variable like this :  Bad quality      Medium quality      High quality       0                1                  0      1                0                  0      0                0                  1      0                1                  0   But there is a problem when I try to do my multiple linear regression: the modality Medium quality gives me NA:    Coefficients: (1 not defined because of singularities)    How can I code this variable "quality" with 3 modalities? Do I have to create a variable as a factor (factor in R) but then can I introduce this factor in a multiple linear regression?


I need to buy ubuntu 13.04 (or above) DVD, But it is not in the store... Why is that?? And i need to take it via post how can I Do it and.. I need to know the cost. I have some other ubuntu Accessories to buy.. I'am in Sri Lanka

I need to upgrade my existing Ubuntu system, and I also want to install Ubuntu on a new laptop.  I would like to have an installation CD or DVD to do both of these.  Where exactly I can order or request an Ubuntu installation CD/DVD/USB?


Since my Vista is no longer being supported, I want to replace it with Ubuntu.  I had it once before on a different computer, but I'm not sure how to install Ubuntu without deleting my current Operating System. I use my desktop a lot but am not a technician.

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


I'm trying to make a mounted charger with the aforementioned feats (along with Spear Push, Polearm Momentum, and Pinning Challenge).  I've read some conflicting reports about whether you can use all the feats at the same time on Cleave. I'm not very knowledgeable when it comes to various errata and sources, I just use whatever's in the compendium - am I able to use these three feats simultaneously?

What level of stacking is possible with at-will modifying feats? Take, for example, the fighter power: "Cleave"  At-Will        Martial, Weapon Standard Action      Melee weapon Targets: One creature Attack: Strength vs. AC Hit: 1[W] + Strength modifier damage, and an enemy adjacent to you other than the target takes damage equal to your Strength modifier.  Cruel Cut Style (Feat):  Cleave (fighter): If no other enemies are adjacent to the target when you hit the target with this exploit, the target takes ongoing damage equal to your Wisdom modifier (save ends).  Deft Hurler:  Cleave: You can forgo dealing damage to the adjacent enemy to instead make a ranged basic attack with a heavy thrown weapon against one creature other than the target of your cleave. This ranged basic attack does not provoke opportunity attacks.  Criterion of Balic Practice:  When you use a power associated with this feat and hit an enemy with it, you can shift 1 square, or 2 squares if you are an elf. The shift is a free action, and you ignore difficult terrain during it.  and Longhand Student:  If you are attacking with a two-handed polearm or a two-handed spear and you have proficiency with that weapon, you also gain the following benefit. When you hit an enemy with a power associated with this feat, you can push that enemy 1 square.  Without recourse to other rules, all four of these feats are technically compatible with a farbond spellblade glaive. (Note that using all of these at the same time is silly but that's beyond the point.) If all of these are applicable at the same time, what order can or should they be resolved in?


I have a javascript function which I want to execute only if the browser screen with is bigger than 1024px.  if ($(window).width() > 1024) {   The problem with this code is that if a user first load the webpage in a browser screen 800px and then just rescale the browser screen to 1024 (or more) the function is not executed. In order to be executed the screen needs to be refreshed.  Do you have any suggestion how to fix it?

How can I hook into a browser window resize event?  There's  but I would prefer not to bring it into my project for just this one requirement.


I am trying to use sfm module for opencv. The problem is linking that. So, let's see the code.   main.cpp:  ...     cv::sfm::reconstruct(images_paths, Rs_est, ts_est, K2, points3d_estimated, true) ...   I compiled this code to main.o. And now, I would like to link it with libopencv_core.so and libopencv_sfm.so . The second one file contains a definition of function 'reconstruct'. Why am I sure? When I type:  nm -D libopencv_sfm.so | grep reconstruct   I got:   00000000000b4ca0 T _ZN2cv3sfm11reconstructERKNS_11_InputArrayERKNS_12_OutputArrayES6_RKNS_17_InputOutputArrayEb 00000000000b4ba0 T _ZN2cv3sfm11reconstructERKNS_11_InputArrayERKNS_12_OutputArrayES6_RKNS_17_InputOutputArrayES6_b 00000000000b2650 T _ZN2cv3sfm11reconstructESt6vectorISsSaISsEERKNS_12_OutputArrayES6_RKNS_17_InputOutputArrayEb 00000000000b2550 T _ZN2cv3sfm11reconstructESt6vectorISsSaISsEERKNS_12_OutputArrayES6_RKNS_17_InputOutputArrayES6_b   I checked signature of reconstruct function in main.o file. And it match to:   _ZN2cv3sfm11reconstructESt6vectorISsSaISsEERKNS_12_OutputArrayES6_RKNS_17_InputOutputArrayES6_b   So the shared library contains definition of reconstruct.   So now, I link:  g++ libopencv_core.so libopencv_sfm.so main.o -o main   and it gives me error:  undefined reference to `cv::sfm::reconstruct(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, cv::_OutputArray const&, cv::_OutputArray const&, cv::_InputOutputArray const&, cv::_OutputArray const&, bool)'   And I don't understand. After all libopencv_sfm.so contains definition of that function!  And please: don't tell me: use cmake. I tried use cmake and the problem is the same. So I try to understand it on low level.  Thanks in advance.  (gcc version: 5.1.1)

Why does the order in which libraries are linked sometimes cause errors in GCC?


After transcription of the Template strand of DNA, in prokaryotes, the translation process begins immediately. But in eukaryotes the mRNA transcript has both non coding (introns) as well as coding (exons) sequences. So they undergo Post Transcriptional processes i.e. Splicing, Capping and Tailing.  From where do non-coding sequences arise in eukaryotic mRNA? I'm guessing its from Heterochromatin (found only in eukaryotes). Is this correct?  Also the process in prokaryotes seems to be hassle-free and simultaneous. But what is the reason for such a complicated process in the more evolved eukaryotes?

We touched on introns and exons in my bio class, but unfortunately we didn't really talk about why Eukaryotes have introns. It would seem they would have to have some purpose since prokaryotes do not have them and they evolved first chronologically, but I could easily be wrong. Did the junk sections of DNA just evolve there by some sort of randomness or necessity as opposed to an actual evolutionary advantage? Why hasn't evolution stopped us from having introns since they seem to be a 'waste' of time and DNA? Why do prokaryotes not have introns?


I just did a clean install of Ubuntu Server 16.04.3 LTS on VMware machine. During the instalation process I was asked to type username and password and I did. But, I can't login with that user after installation. I'm pretty sure that username and password are correct. I did reinstalled it twice and same problem happens.  I've tried root, sageadmin (created during installation), admin. None of them are correct, it gives me "Login incorrect" message.

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


I have discovered that when I run a CTE in a query window it must have the leading ; but if I am going to run a CTE in a stored procedure it does not need the ;  To me, it would be needed in both places or neither place.  Why is this punctuation need in one area and not the other?

I was just looking at a post on  where Aaron Bertrand proposes using a CTE instead of a numbers table, which is an elegant way of performing the task at hand.  My question is, why does the first line of the CTE begin with a semi-colon?    ;WITH n AS (SELECT TOP (10000) n FROM    (SELECT n = ROW_NUMBER() OVER     (ORDER BY s1.[object_id])     FROM sys.all_objects AS s1     CROSS JOIN sys.all_objects AS s2   ) AS x ORDER BY n ) SELECT n FROM n ORDER BY n; -- look ma, no gaps!   Is this to ensure the WITH statement does not get parsed into a previous SELECT or something?  I see nothing in SQL Server 2005 BOL about using a semi-colon prior to the WITH.


I did search a bit and couldn't find this specific one. So decided to ask. The question is the following. We want to test the mean of a normal population. Suppose that $X_1,\dots,X_n\overset{i.i.d.}\sim N(\mu,1)$. Suppose that we are testing $H_0:\mu = \mu_0$ against the alternative $H_1:\mu\neq \mu_0$. We are looking for a rejection region of the form $|\overline{X}-\mu_0|>c$. Therefore \begin{eqnarray*} P_{\mu_0}(|\overline{X}-\mu_0|>c) &=& \alpha\\ P_{\mu_0}(\sqrt{n}(|\overline{X}-\mu_0|)>c\sqrt{n}) &=& \alpha \end{eqnarray*} This implies that $c\sqrt{n} = z_{{\alpha}/{2}}$. Thus we arrive at a test that calls for rejection of the null-hypothesis if $\sqrt{n}(|\overline{X}-\mu_0|) >z_{{\alpha}/{2}}$. In this test, why is the p-value $P(|Z|>\text{TS})$, where $\text{TS} = \sqrt{n}(|\overline{X}-\mu_0|)$?

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


I am creating a leaderboard that is part of a game that I am working on. Basically, the code I have stores the user's name in the first column and the score associated with that user's name in the second column in a 2D array. It sorts the 2D array in descending order according to the score numbers in the second column. This is the code I have:  String line = null; String lineCounter = null;  try {     BufferedReader br = new BufferedReader(new FileReader("scores.txt"));     while ((lineCounter = br.readLine()) != null) {         lineCount++;     }      String[][] scores = new String[lineCount][2];     int x = 0;      BufferedReader BR = new BufferedReader(new FileReader("scores.txt"));     while ((line = BR.readLine()) != null) {         String[] nums = line.split(": ");         scores[x][0] = nums[0];         scores[x][1] = nums[1];         x++;     }      Arrays.sort(scores, new Comparator<String[]>() {         @Override         public int compare(final String[] first, final String[] second) {             // TODO Auto-generated method stub             return Double.valueOf(second[1]).compareTo(                 Double.valueOf(first[1])             );         }     });     String[][] theCopy = Arrays.copyOf(scores, scores.length);      for (int i = 0; i < theCopy.length; i++) {         System.out.print((i + 1) + ". ");         for (int j = 0; j < 2; j++) {             if(j == 0) System.out.print(theCopy[i][j] + ": ");             if(j == 1) System.out.print(theCopy[i][j]);         }         System.out.println();     } } catch (FileNotFoundException e) {     // TODO Auto-generated catch block     e.printStackTrace(); } catch (IOException e) {     // TODO Auto-generated catch block     e.printStackTrace(); }   This code is inside a while loop. The user has the option to see the leaderboard as many times as they want until the press the correct number to terminate the program. So the problem I have is when the user decides to view the leaderboard, it works the first time, but when the user wants to view the leaderboard a second time, the program crashes.  This is the error message I'm getting:  Exception in thread "main" java.lang.NullPointerException     at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)     at sun.misc.FloatingDecimal.parseDouble(Unknown Source)     at java.lang.Double.parseDouble(Unknown Source)     at java.lang.Double.valueOf(Unknown Source)     at prjTicTacToe.TicTacToe$1.compare(TicTacToe.java:200)     at prjTicTacToe.TicTacToe$1.compare(TicTacToe.java:1)     at java.util.TimSort.binarySort(Unknown Source)     at java.util.TimSort.sort(Unknown Source)     at java.util.Arrays.sort(Unknown Source)     at prjTicTacToe.TicTacToe.main(TicTacToe.java:195)   How do I fix this so the user can view the leaderboard as many times as they want before they want to terminate the program?

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 have 2 passports with same name but different first name and surname, I need to use both in my next travel.  Passport 1 - Name: João Manuel               Surname: da Silva Couto  Passport 2 - Name: João Manuel da Silva               Surname: Couto.   Will I have problems on check-in or at immigration?

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


How can I draw this curve with these vectors and points using tex.

What packages do you use and recommend for creating graphics in your LaTeX documents?     As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document).   We'll eventually sort these answers under headings.


I have to wear glasses when riding by bike and when it rains it can become hard to see my surroundings.  Wiping them with my hand/glove makes things worse as it smudges everything.  Before I resort to wearing contact lenses, I thought I'd ask if anyone has any clever ideas on how to prevent this from happening.

Today in the middle of my ride it started raining and I could barely see due to the amount of rain on my glasses.  This is basically what I could see   I have jokingly talked about using Rain-X on my glasses, but now it's starting to seem like a good idea.  Is there a way to keep this from happening or at least to a minimum?


Let $(\Omega, \mathcal F,P)$ be a probability spaces and $H$ be a Hilbert space. By a random operator $A$ from $H$ to $H$ we mean a linear continuous mapping from $H$ into the Frechet space $L_0^H (\Omega, \mathcal F,P)$ of all $H$-valued random variables. My question is: How Can we define $|A|$ and the adjoint $A^*$?


I'm trying to understand the following proposition, which is Hartshorne Ⅱ prop 6.6. Let $X$ be a noetherian integral separated scheme which is regular in codimension one, then $X \times_{\operatorname{Spec}\mathbb{Z}} \operatorname{Spec}\mathbb{Z}[t]$ is also a noetherian integral separated scheme which is regular in codimension one and $\operatorname{Cl} X\cong \operatorname{Cl}(X\times_{\operatorname{Spec}\mathbb{Z}}\operatorname{Spec}\mathbb{Z}[t])$. I showed when $X$ is affine. I'm in trouble in general case. Let $Y$ be a prime divisor of $X$, then $\pi^{-1}(Y)$ should be a prime divisor of $X\times_{\operatorname{Spec}\mathbb{Z}}\operatorname{Spec}\mathbb{Z}[t]$. But I can't show that $\pi^{-1}(Y)$ is irreducible. $\pi$ is a projetion $X \times_{\operatorname{Spec}\mathbb{Z}} \operatorname{Spec}\mathbb{Z}[t] \rightarrow X$. I know $X \times_{\operatorname{Spec}\mathbb{Z}} \operatorname{Spec}\mathbb{Z}[t]$ is irreducible, so this can be used.

I asked this question and I couldn't understand the following result.  Let $X$ be a noetherian integral separated scheme which is regular in codimension one, $\pi$ is a projection $X \times_{\operatorname{Spec}\mathbb{Z}} \operatorname{Spec}\mathbb{Z}[t] \rightarrow X$,and $Y$ be a prime divisor of $X$. Then, according to the person who answered that question, $\pi^{-1}(Y)=Y\times_{\operatorname{Spec}\mathbb{Z}}\operatorname{Spec}\mathbb{Z}[t]$ . But I can't prove this and I also think this can be true in more general case, that is, $X$,$Y$ be schemes over scheme $S$, $\pi$:$X\times_{S} Y \rightarrow X$ be a projection, $Z\subset X$ be a closed subset. Then $\pi^{-1}(Z)=Z\times Y$. If this is true, I want to know how to prove it, and if this needs some modifications, I want to know it and its proof. This may be a elementary question, so only a good reference will be a great help.


I want to install rabbitmq on my Ubuntu 18.04. I have been following the official . However, my installation is not completed as I am getting stuck on the step: sudo apt-get install rabbitmq-server -y --fix-missing as I face an error: unmet dependencies.  I tried installing libssl and then erlang-crypto, didn't work. I also installed aptitude using which I tried installing erlang-crypto, it also didn't install any package.  The command that I am running is:  sudo apt-get install -y erlang-base \                         erlang-asn1 erlang-crypto erlang-eldap erlang-ftp erlang-inets \                         erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key \                         erlang-runtime-tools erlang-snmp erlang-ssl \                         erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl   I get a failure message:  Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  erlang-crypto : Depends: libssl1.1 (>= 1.1.1) but it is not installable E: Unable to correct problems, you have held broken packages.   The libssl package isn't available and I have successfully installed libssl-dev.  I expect to completely install RabbitMQ and it runs successfully.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I'm trying to make a profile page with a few related blanks e.g username, city, country & address. Currently I'm only working on the username. My question is, how do I update the username on the database according to the logged in user's ID. For starter, I have an ID column for every user, their first name, last name, and email. Currently my WHERE clause in the query says WHERE id = 1 and that is why it stores whatever username I input, in row 1. I want to know, how can I store the username according to the logged in user's ID. And yes, only a logged in user can access the profile page I'm working on.   This is my action.php:  <?php session_start(); //---> start session require('db.php'); ini_set('display_errors', 1); ini_set('log_errors',1); error_reporting(E_ALL); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);  $con = mysqli_connect('localhost', 'id1753243_venom', 'roushan123', 'id1753243_gameware_01'); if(!$con) {     echo 'Not connected to the server'; }  $id = $_SESSION['id'];  if(isset($_POST['username'])) {     $username = $_POST['username'];    $sql = "UPDATE users SET username='".mysqli_real_escape_string($con,$username)."' WHERE id = '.$id.'";     $insert = mysqli_query($con,$sql);     $_SESSION['username'] = $username; //---> this will store username into session variable }  if(!$insert) {     echo 'Not inserted'; } else {     echo 'Inserted'; } header("refresh:2; url=user.php"); ?>   The above WHERE clause doesn't seem to work either. I'm hopping someone here can help me solve my problem as it's really important for me to do so. Thanks in advance!

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


I'm new to programming in Java (even though I'm used to code in C, html and some other languages (vaguely)).  I'm trying to create a simple Hello World program, and I'm unsure of why, and what the "static" tag does. I tried to do some research, and I came up with that the static tag makes the method work as an instance in a moment, instead of having to "launch" it (didn't quite understand it). I'm wondering where, and why to use it.  On the other hand, while I'm compiling, I found out how to make it execute, but some friends of mine have told me that I need to include a manifest, and run it as a .jar, (I'm using:  $ javac Potato.java $ java Potato   )  As a note, I would like to tell you that I'm trying to avoid using 3rd-party softward to learn programming (using the standard Notepad++ and bash).  Thank you ;)  Edit: Sorry, this was my first question.  class Potato { static String textA = "Hello There"; public static void main(String[] args){ System.out.println(textA); }    }   I got this code, and I did some mixing by creating the variable textA inside and outside of the main method.

The method signature of a Java main() method is:  public static void main(String[] args){     ... }   Is there a reason for this method to be static?


When you click the "Improve edit" button when reviewing a suggested edit, your edit will be applied as a separate edit on top of the suggested edit, which will be approved.  The edit summary for your edit is pre-filled with the edit summary of the suggested edit that you are improving on. This is almost never desirable: the edit summary of the suggested edit describes what was already done by the suggested edit.  Since you're making additional changes on top of that, you're almost certainly doing something different. In addition to being unclear to new reviewers (when I encountered it as a new reviewer, I left it because I thought if I changed it, I would be changing it for the suggested edit), I still often forget to change it, resulting in edit summaries that inaccurately describe my edit. Instead, it should leave the edit summary field blank, which would fill it with the default auto-generated edit descriptions if not changed.

The suggested edit screen includes both the suggested edit, and the reason for the edit:        When you click to improve the edit, that comment is left as-is and hidden at the bottom of the post above the save edit button:        At the moment, when I Improve a Suggested Edit, the Comment text for that Edit is retained (though editable). It's unlikely that the comment would still apply (e.g. Suggester added a tag and Approver corrected a typo), so I would rather have the field blank.  Also, it's better to have a blank Comment than an incorrect one... many people don't bother changing the original Comment.  So that box should be blank like this instead:


I'm having a hard time to use a MySQL query.  If I do the following:  SELECT ads.id_ad  FROM tab_ads ads, tab_orders orders  WHERE (ads.id_user = 111 AND ads.id_ad = orders.id_ad)   It gives me the correct answer, which is: "show me the ads belonging to user 111 that have been sold"  What I want is to remove all ads, except the ads that have been sold.  So I change the equal to not equal in the where criteria:  SELECT ads.id_ad  FROM tab_ads ads, tab_orders orders  WHERE (ads.id_user = 111 AND ads.id_ad != orders.id_ad)   And it gives me trash results.  Ex: I have three tables:  tab_ads id_ad - title - etc. 01 - title1 02 - title2 03 - title3  tab_orders id_order - id_ad - amount - etc. XX          - 01     -  $10  tab_users id_user - name - etc. 110 - Dr. Jivago - etc. 111 - Sherlock - etc.   I need to remove all ads from 111 (Sherlock) where there's no sell. So I need to remove ad 02 - title2 and 03 - title3 because ad 01 - title1 has been sold and I need to keep it for future consultation.


I'm using $k$-fold cross validation technique for generating train, test and validation indexes for a neural network. My sample size is 230~700. What is best $k$ for cross validation here. Now I'm using 10-fold cross validation but I think it is too high. What is your idea?

I've been using the $K$-fold cross-validation a few times now to evaluate performance of some learning algorithms, but I've always been puzzled as to how I should choose the value of $K$.  I've often seen and used a value of $K = 10$, but this seems totally arbitrary to me, and I now just use $10$ by habit instead of thinking it over. To me it seems that you're getting a better granularity as you improve the value of $K$, so ideally you should make your $K$ very large, but there is also a risk to be biased.  I'd like to know what the value of $K$ should depend on, and how I should be thinking about this when I evaluate my algorithm. Does it change something if I use the stratified version of the cross-validation or not?


In advance i'd like to thank you for your help. First off, I have installed Ubuntu (Linux) on my chromebook but the problem is it wipes the data and I need the wifi to stay and not forget the network because I need it to remember my school wifi password. So I did it and then he turned developer mode back on without realising so now I can't access it. So, I don't want to go back to him for the wifi password ever again. Anyways, I want to know if there is a way to install it without developer mode of without wiping the wifi password and more. I have also thought of installing ubuntu on a bootable flash drive but again I don't think it's possible yet to boot the chromebook from the flash drive without entering developer mode. You'd think there would be a way to do it by now but I've searched so much and haven't found anything so PLEASE give me a way to do this!  Thanks,  -Josh

I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well.  Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook?  It seems that the Crouton/Ubuntu is not 100% the real thing.  The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS.


I have encountered a very bizarre problem. I am trying to create a function that returns an array of values that enclose a range with a certain step size (such as you might find on the axis of a plot). Instead of just using np.arange(min,max,step), I want something that rounds the step size better. Here is what I tried:  def get_decade(value):     return pow(10,math.floor(math.log10(value)))  def get_steparray(min,max,delta):     delta_step = float(get_decade(delta))     next = math.floor(min/delta_step)*delta_step     print next     array = [next]     while next < max:         next = int((next+delta_step)/delta_step)*delta_step         print next         array.append(next)         print array     print array     return array   The print statements are in there to help me figure out what is going on. Here is what I tried running it with:  print get_steparray(1.032,1.431,0.1)   From this, I was expecting the array to end up as [1.0,1.1,1.2,1.3,1.4,1.5]  Here is what I get from the function:  1.0 1.1 [1.0, 1.1] 1.2 [1.0, 1.1, 1.2000000000000002] 1.3 [1.0, 1.1, 1.2000000000000002, 1.3] 1.4 [1.0, 1.1, 1.2000000000000002, 1.3, 1.4000000000000001] 1.5 [1.0, 1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5] [1.0, 1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5]   As you can see, some of them work, and others have the extra decimals added.  Anyone have any ideas what might be causing this? Thanks for any insight you can provide. Alternatively, I would be just as happy if someone knew a better, more functional way to create such an array. Maybe I should just stick to using np.arange and adjust the max/min/step values?  (Yes, I know my code isn't the cleanest. The function above started out much cleaner, but I added some unnecessary features to it to try to get it to work.)  Edit: While I appreciate everyone's insightful comments, I am still not sure that they address my issue fully. As is visible in the printout, each value is stored to sufficient precision of my needs when as an isolated float type. But when they are added to the array, it is only then that they change precision. I am quite aware of the issues with floating points, in general, but was curious about the specific differences between the float and the array. I wonder if maybe the array is storing the value in a lower number of bits than the individual value.  That being said, I think the suggestion to focus more on formatting at the point of usage is what I will end up doing.  Thanks!

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


This one is very vague because it's been at least 20+ years since I saw this movie, and I was very young. But it's a sci-fi movie that I believe starts with a mummified/dessicated/skeletal body floating in space, and a ship retrieves what I remember as a reddish, football shaped object from it that turns out to be a killer robot that starts murdering people once it forms itself. This sound at all familiar to anyone?

I saw this on TV in mid 90s I think. One or more people travel to another celestial body (might or might not be the/a moon or mars), they find an American football. The football transforms into a robot that is hostile. They later find LOTS of these footballs/disguised robots.  Since there are lots of robotic projects with "football robots" or " robots", it is very hard to filter search results using Google etc.


I am trying to achieve a scene where a cup of glass covered with droplets. I'm using particles system and a group of droplets from separate layer, to make it possible, but I can't get droplets appear with correct direction. I was wondering what kind of settings should be done to fix this problem, please see the screenshots below       I have tried changing the positions of each droplets in the group, but didn't work I have tried changing the rotations under the particles but couldn't reach a good result   thanks for your help

I'm trying to create a mini-world with (among other things) trees on it. I have created an icosphere, modeled several trees and put them in a group. Next I added a particle system to the sphere, and chose hair. In the "render" section I selected Group and the name of the group I created. As expected the trees show up but they're all oriented in the same direction, while I would like them to pop up just like the default hairs do (along the normal of the individual faces). I tried fiddling with all kinds of settings, had them oriented in all kind of ways (e.g. towards the "north pole"). I also tried using the emitter instead of hair setting but without success as well.


I'm not sure if there has recently been a new update, I did notice the top bar on Super User had changed. However, on each community I visit the reputation alongside that community is out of position.    I'm using Firefox so I initially cleared my cache, but still had the same result. I then tested it on Chrome and it worked as normal.

In the sites dropdown, the reputation scores are misaligned:    This seems to happen only on Firefox (56.0), both on macOS (10.13) and Windows (7, 10) (thanks @Tom and @MonicaCellio). I've tested a couple of other browsers which do not have this problem. I've already cleared my cache.


It seems that placing a footnote in a table is different a footnote in the text. Consider this table  \begin{table}     \centering     \caption{Simulation parameters}     \label{sim-param}     \begin{tabular}{| p{2cm} | p{5.1cm} |}         \hline         Processing Nodes &  UltraSPARC III ISA   \\          interconnect \footnote{the text of footnote}        &  something \\         \hline     \end{tabular} \end{table}       In the pdf file, I see the number 1 at the top of interconnect but there is no the text of footnote in the text.   Any way to fix that?

It seems as if footnotes would have only a problem with the table environment but in my minimal example non of those answers        seem to work for the tabular environment.  \documentclass{scrartcl}  \begin{document} \begin{tabular}{l} Content\footnote{Footnote} \end{tabular} \end{document}


On Page 2 of Baby Rudin contain proof of $\sqrt {2}$ is not rational Number .I understand that .But Below that above content is written.How to obtain that relation between p and q I don't understand .Please Help me .

First, my apologies if this has already been asked/answered.  I wasn't able to find this question via search.  My question comes from Rudin's "Principles of Mathematical Analysis," or "Baby Rudin," Ch 1, Example 1.1 on p. 2.  In the second version of the proof, showing that sets A and B do not have greatest or lowest elements respectively, he presents a seemingly arbitrary assignment of a number $q$ that satisfies equations (3) and (4), plus other conditions needed to show that $q$ is the right number for the proof.  As an exercise, I tried to derive his choice of $q$ so that I may learn more about the problem.  If we write equations (3) as $q = p - (p^2 - 2)x$, we can write (4) as   $$ q^2 - 2 = (p^2 - 2)[1 - 2px + (p^2 - 2)x^2]. $$  Here, we need a rational $x > 0$, chosen such that the expression in $[...]$ is positive.  Using the quadratic formula and the sign of $(p^2 - 2)$, it can be shown that we need   $$ x \in \left(0, \frac{1}{p + \sqrt{2}}\right) \mbox{ for } p \in A, $$  or, for $p \in B$, $x < 1/\left(p + \sqrt{2}\right)$ or $x > 1/\left(p - \sqrt{2}\right)$.  Notice that there are MANY solutions to these equations! The easiest to see, perhaps, is letting $x = 1/(p + n)$ for $n \geq 2$.  Notice that Rudin chooses $n = 2$ for his answer, but it checks out easily for other $n$.  The Question:  Why does Rudin choose $x = 1/(p + 2)$ specifically?  Is it just to make the expressions work out clearly algebraically?  Why doesn't he comment on his particular choice or the nature of the set of solutions that will work for the proof?  Is there a simpler derivation for the number $q$ that I am missing?


We all know that gravity decreases as the distance between the two increases. Hence  $$ F = G \frac{Mm}{r^2}. $$  Hence the acceleration due to gravity  $$ g =\frac{F}{m}= G \frac{M}{r^2} $$   increases as $r$ decreases. Then why does it decrease as we go deep into the earth?

Would the effect of gravity on me change if I were to dig a very deep hole and stand in it? If so, how would it change? Am I more likely to be pulled downwards, or pulled towards the edges of the hole? If there would be no change, why not?


Somehow it is not possible to combine tikzcd and newcommand, as shown in the following MWE:  \documentclass{paper} \usepackage{tikz-cd}  \begin{document}  \newcommand{\dotheobvious}[1]{#1} \dotheobvious{\[\begin{tikzcd}X\ar[r] & Y\end{tikzcd}\]}  \end{document}   I get the following error:  ! Undefined control sequence. <argument> \pgf@matrix@last@nextcell@options   l.7 ...{\[\begin{tikzcd}X\ar[r] & Y\end{tikzcd}\]}   The output looks like this, the Y is missing:    What's wrong here?

I’m using tikz-cd for diagrams, and have a medium-sized diagram that I want to re-use several times.  However, when I try using a definition like:  \newcommand{\myarrow}{$\begin{tikzcd} A \ar{r} & B \end{tikzcd}$   I get an error:  ERROR: Package pgfbasematrix Error: Single ampersand used with wrong catcode.   Is it possible to put a tikz-cd diagram into a defined command somehow?


Sometimes ch is pronounced as /k/, as in chorus/chameleon. Sometimes as /tʃ/, as in chamber/chalk.  Why is it so?

I am puzzled on how to pronounce cha- words. For example, I know that "chameleon" or "chamomile" are pronounced with a hard "c" like in "camel", not with a soft "c" like in "change". "Charity", on the other hand, is pronounced as in "change".  Is there some rule to infer the correct pronunciation?


I'm interested in finding an elementary proof for the following sum inequality: $$\sum_{k=1}^n \frac{\sin k}{k} \le \pi-1$$  If this inequality is easy to prove, then one may easily prove that the sum is bounded.

Here is an exercise, on analysis which i am stuck.    How do I prove that if $F_{n}(x)=\sum\limits_{k=1}^{n} \frac{\sin{kx}}{k}$, then the sequence $\{F_{n}(x)\}$ is boundedly convergent on $\mathbb{R}$?


I hope it was purely trial and error and there was no systematic way to arrive at this expression as the textbook didn't provide the work and I'm not able to see how one cooks this up systematically. For example, how would one go about cooking such an expression for showing that the set of rational numbers satisfying $p^2<3$ has no largest number ? I've tried this by replacing $2$ in the given expression by $3$. It doesn't work. Appreciate any ideas. Thanks !


I'm doing Google's android courses on Udacity to learn Android and Java. Currently, the project I'm working on is building an app which represents ordering coffee. There's a quantity TextView, along with a + and - button which on click either increment or decrement the quantity, as well as a submit order button which calls a method that prints out an order summary.  Unfortunately, I lost the original source code for the app, so I tried rebuilding it myself. I got it to work, but not in the way I originally designed it. The issue I'm having is that if I reference the TextView which stores the quantity of coffees ordered outside of its own method, the app immediately crashes due to a NullPointerException. However, if I reference that TextView by creating a method called display(int number), the app runs fine. What is causing this NullPointerException? I've provided links below to the two source codes, one of which works fine and the other of which crashes immediately.  NullPointerException:  The part that is crashing the app in this code is at line 18 in the MainActivity.java file  Works fine:  In this one, on lines 37-39, I create a method that holds the same code to reference the TextView as in the example above, which is later called by the methods for the + and - buttons.  Thank you!

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?


PdfLaTeX can't process a file with the following contents:  \documentclass{article}  \usepackage{tkz-euclide} \usetkzobj{all}  \begin{document}  \end{document}   When called from cmd.exe (pdflatex test.tex), it gives the following error:  ! I can't find file `tkz-obj-angles.tex'. <argument> ...\|=12 \input tkz-obj-\tkz@temp .tex                                                   \catcode `\@ =\csname tkz@... l.4 \usetkzobj{all}   I am using MikTex 2.9, tkz-base version 3.02c, tkz-euclide version 3.02c on Windows 10.

I've been trying to practice tkz-euclide by working through the documentation's examples. But I've been getting errors. Here:  \documentclass{article} \usepackage{xcolor} \usepackage{tkz-euclide} \usepackage{beton} \usepackage{euler}  \begin{document}     \begin{tikzpicture}     \tkzDefPoints{0/0/A,4/0/B}     \tkzDrawLine[red](A,B)     \tkzDefPointOnLine[pos=1.2](A,B)     \tkzGetPoint{P}     \tkzDefPointOnLine[pos=-0.2](A,B)     \tkzGetPoint{R}     \tkzDefPointOnLine[pos=0.5](A,B)     \tkzGetPoint{S}     \tkzLabelPoint[above](P){pos=$1.2$}     \tkzLabelPoint[above](R){pos=$-.2$}     \tkzLabelPoint[above](S){pos=$.5$}     \tkzDrawPoints(A,B,P,R,S)     \tkzLabelPoints[](A,B) \end{tikzpicture} \end{document}   When I try to compile this I get this error despite the command being listed and used in the documentation:  Undefined control sequence. [\tkzDefPointOnLine]   I've checked similar questions, but they all say to add usetkzobj{all} and yet the current README of the package says this is not required. Furthermore, when I do add it in, I get this:  I can't find file `tkz-obj-angles.tex'. [\usetkzobj{all}]   What's going on?


I have read that the shell searches the command in all the directories available in the PATH variable. My first question is what if 2 directories have the files for a command, which one will be executed ?   Second question is, does the shell searches in the directories shown in PATH variable recursively or not ? Thanks.

If I have a PATH variable that (when exploded onto multiple lines) contains something like this (with a few notes added by me):  /Users/brandon/.rvm/gems/ruby-2.0.0-p353/bin /Users/brandon/.rvm/gems/ruby-2.0.0-p353@global/bin /Users/brandon/.rvm/rubies/ruby-2.0.0-p353/bin /opt/local/bin /opt/local/sbin /usr/local/sbin /usr/local/bin   # <<--- notice this path appears again later /usr/bin         # <<--- notice this comes AFTER /usr/local/bin /bin /usr/sbin /sbin /usr/local/bin   # <<--- here it is again! /usr/local/git/bin /Users/brandon/bin /Users/brandon/.homebrew/bin /usr/local/mysql/bin /usr/local/share/npm/bin /Applications/Postgres93.app/Contents/MacOS/bin /Users/brandon/.rvm/bin   is it possible for the presence of the second /usr/local/bin/ to cause the /usr/bin to take precedence over /usr/local/bin?  This seems crazy (to me: I've never heard of such a thing) but that's exactly the behavior I'm seeing.  I've just installed PHP with Homebrew, and yet the system PHP (from /usr/bin) is taking precedence:  $ which php /usr/bin/php   BUT, after manually altering the PATH (rather than digging through all the files sourced by my .zshrc to try to figure out why & where the duplication is coming from) to remove the second instance of /usr/local/bin, I find that /usr/local/bin is taking precedence over /usr/bin as I would have expected it to in the first place:  $ which php /usr/local/bin/php   What would cause this?  Is this normal?


I have a simple project structure like this:  ➜  (venv:evernote) evernote_bear_project git:(master) ✗ tree | grep -v pyc . ├── README.md ... (snip) ... ├── manage.py ├── sample │   ├── EDAMTest.py    <==== here is an import that won't work │   └── enlogo.png └── util     ├── __init__.py     ├── files.py        <====== This is being imported     └── test_files.py   Now I have a relative import in sample/EDAMTest.py:  from ..util.files import *    When I try to run python sample/EDAMTest.py from project root folder in command line, I get an error saying:  ValueError: attempted relative import beyond top-level package   I know this has been asked many times, but I still don't get it.  Since I'm running the script from the project root, in my understanding Python should be able to "know" that when I try to import from ..util.files import *, that it should go up one directory, no?    EDIT  Thanks for all the answers.   So what I understand from the link  is this:   I was running the module sample/EDAMTest.py directly via python sample/EDAMTest.py, and that meant    that the __name__ of the module was __main__  and now the path (sample/) was my "root" so to speak.    So now Python searches only this path and any path that's below it for modules / packages. Hence the error message attempted relative import _beyond top-level package_, so it cannot go one more level up, because it is at the root already.  Also Python cannot look one level "up", since this syntax from ..util.files import * does not go up a level in directory, but in a list of modules / packages it keeps on the "import search path" (sys.path)?  Is that correct?

Imagine this directory structure:  app/    __init__.py    sub1/       __init__.py       mod1.py    sub2/       __init__.py       mod2.py   I'm coding mod1, and I need to import something from mod2. How should I do it?    I tried from ..sub2 import mod2 but I'm getting an "Attempted relative import in non-package".  I googled around but found only "sys.path manipulation" hacks. Isn't there a clean way?      Edit: all my __init__.py's are currently empty    Edit2: I'm trying to do this because sub2 contains classes that are shared across sub packages (sub1, subX, etc.).  Edit3: The behaviour I'm looking for is the same as described in  (thanks John B)


I posted a question earlier and got a great answer but realize I went about my logic the wrong way.  Given a table like this:  Name|ValueA|ValueB1|ValueB2 Bob |     1|    200|    205 Bob |     2|    500|    625 Bob |     7|    450|    850 Bob |     3|    644|    125 Ann |     4|    120|    120 Ann |     8|    451|    191 Ann |     9|    145|    982   I originally was trying to get the max/min values for each unique names and ended up with  Create TableA as (Select Name,Max(ValueA),Min(ValueA),Max(ValueB1,Max(ValueB2) Group by Name)   but this gave me (naturally) the high/low for each of A, B1, B2 e.g.   Bob|1|7|200|644|205|850   What I am looking for are the B1 and B2 values for the each of the lowest and highest A values per unique name in other words in the above I need   Bob|1|7|200|205|450|850 Ann|4|9|120|120|145|982   which gives me the high and low A values and the B1 and B2 for values contained in the high and low A Value records.  (This is NOT a duplicate question. My last question asked and answered how to pull the high and low values for three different fields for a given unique name into a new table.  This turns out to not be what I needed although the first question successfully was answered (and marked as such). What I need are the values for two fields from the high and low values of another field for a given name. If you look at the question you will see this is so and the solutions are in fact different)

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


In Game of Thrones S08E04 The Last of the Starks, Gendry is         legitimized by Daenerys & pronounced as Gendry Baratheon, the Lord of Storms End.      When Gendry finds Arya, he tells him that his earlier name was Gendry Rivers.         and now it's Gendry Baratheon & proposes marriage to her.      As far as I know, Gendry was born in Kings Landing.     Bastards of Kings Landing are named Waters. Bastards of Riverrun are named Rivers & Bastards of Stormlands are called Storm.     So, where exactly was Gendry born?  Was this a plot error from D&D?

Gendry was born in the Crownlands and should therefore be referred to as Gendry Waters. However, he refers to himself as Gendry Rivers.   Did showrunners forget or is Gendry ignorant of the customs?


, the following is written on page $90$: $$dE =\delta Q + \delta W$$  This is much more natural in the language of forms. All of the terms in the first law are one-forms. But the transfer of heat, $\delta Q$, and the work $\delta W$ are not exact one-forms and so can't be written as $d(something)$. In contrast, $dE$ is an exact one-form. That's what the $\delta$ notation is really telling us: it's the way of denoting non-exact one-forms before we had a notion of differential geometry.  This raised a couple of questions:  How is $dE$ a one-form while $\delta Q$ and $\delta W$ are not exact one-forms? What does it mean that $\delta Q$ and $\delta W$ are not exact one-forms?  Possible answer for the latter: it simply means there is no $Q$ and $W$ which can be written as $Q= d\psi \to dQ=0$ and $W= d\phi \to dW=0$. But if it so, why?

In thermodynamics, the first law can be written in differential form as $$dU = \delta Q - \delta W$$ Here, $dU$ is the differential $1$-form of the internal energy but $\delta Q$ and $\delta W$ are inexact differentials, which is emphasized with the replacement of $d$ with $\delta $.   My question is why we regard heat (or work) as differential forms? Suppose our system can be described with state variables $(x_1,\ \cdots ,\ x_n)$. To my understanding, a general $1$-form is written as $$df = f_1\ dx_1 + f_2\ dx_2 + \cdots + f_n\ dx_n$$ In particular, differential forms are linear functionals of our state variables. Is there any good reason to presuppose that $\delta Q$ is linear in the state variables?   In other words, if the infinitesimal heat transferred when moving from state $\mathbf{x}$ to $\mathbf{x} + d\mathbf{x}_1$ is $\delta Q_1$ and from $\mathbf{x}$ to $\mathbf{x} + d\mathbf{x}_2$ is $\delta Q_2$, is there any physical reason why the heat transferred from $\mathbf{x}$ to $\mathbf{x} + d\mathbf{x}_1 + d\mathbf{x}_2$ should be $\delta Q_1 + \delta Q_2$?  I apologize if the question is a bit unclear, I am still trying to formulate some of these ideas in my head.  P.S. I know that for quasi-static processes, we have $\delta Q = T\ dS$ (and $\delta W = p\ dV$) so have shown $\delta Q$ is a differential form in this case. I guess my question is about non-quasi-static processes in general.